@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
48 lines (29 loc) • 1.23 kB
TypeScript
import Vector3 from "../../../../core/geom/Vector3";
import {InterpolationType} from "./InterpolationType";
export default class Path {
public interpolation: InterpolationType
/**
* Absolute length of the path
*/
public readonly length: number
public isEmpty(): boolean
public reverse(): void
public clear(): void
/**
* Number of points that make up this path
*/
public getPointCount(): number
public setPointCount(v: number): void
public removePoint(index: number): boolean
public getPosition(index: number, result: Vector3): void;
public setPosition(index: number, x: number, y: number, z: number): void
public insertPoint(index: number, x: number, y: number, z: number): void
public computeLength(): number
public sample(result: Vector3, offset: number, interpolation?: InterpolationType): boolean
find_index_and_normalized_distance(result:ArrayLike<number>, absolute_distance:number):boolean
public copy(other: Path): void
public clone(): Path
public toJSON(): any
public fromJSON(json: any): void
getLowIndexOfNearestPoint(reference: Vector3): number
}