UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

34 lines 1.54 kB
export class NavigationMesh { topology: BinaryTopology; /** * Used for raycasts and neighborhood search. * @type {BVH} */ bvh: BVH; /** * Build from given scene geometry * @param {BinaryTopology} source * @param {number} [agent_radius] * @param {number} [agent_height] * @param {number} [agent_max_climb_angle] In radians, how steep of an angle can the agent go up by * @param {Vector3} [up] Defines world's "UP" direction, this is what the agent will respect for climbing constraint */ build({ source, agent_radius, agent_height, agent_max_climb_angle, up, }: BinaryTopology): void; /** * Compute a walkable path between the two points. * The result is a sequence of 3d points written into `output`. First point matches start, last point matches goal (snapped onto the mesh). * * @param {Float32Array} output packed XYZ triples * @param {number} start_x * @param {number} start_y * @param {number} start_z * @param {number} goal_x * @param {number} goal_y * @param {number} goal_z * @returns {number} number of 3d points written to `output` (0 if no path was found) */ find_path(output: Float32Array, start_x: number, start_y: number, start_z: number, goal_x: number, goal_y: number, goal_z: number): number; } import { BinaryTopology } from "../../../core/geom/3d/topology/struct/binary/BinaryTopology.js"; import { BVH } from "../../../core/bvh2/bvh3/BVH.js"; //# sourceMappingURL=NavigationMesh.d.ts.map