three-pathfinding-3d
Version:
A 3D pathfinding library for Three.js, supporting navigation meshes (navmeshes) and various pathfinding algorithms.
52 lines (51 loc) • 1.22 kB
TypeScript
import { Vector3, Mesh } from 'three';
import type { GroupItem } from './type';
/**
* Helper for debugging pathfinding behavior.
*/
declare class PathfindingHelper extends Mesh {
private _playerMarker;
private _targetMarker;
private _nodeMarker;
private _stepMarker;
private _nodePathMarkers;
private _channelLines;
private _pathMarker;
private _pathLineMaterial;
private _pathPointMaterial;
private _pathPointGeometry;
private _channelMaterial;
private _nodeMaterial;
private _markers;
constructor();
/**
* @param path
*/
setPath(path: Array<Vector3>): this;
/**
* @param position
*/
setPlayerPosition(position: Vector3): this;
/**
* @param position
*/
setTargetPosition(position: Vector3): this;
/**
* @param position
*/
setNodePosition(position: Vector3): this;
setNodePath(paths: GroupItem[]): this;
setChannelPath(channels: {
left: Vector3;
right: Vector3;
}[]): this;
/**
* @param position
*/
setStepPosition(position: Vector3): this;
/**
* Hides all markers.
*/
reset(): this;
}
export { PathfindingHelper };