import type { Vector2Like } from '@flighthq/geometry/contract'; import type { Path } from '@flighthq/path/contract'; import type { MotionPathDirection, MotionPathLoopMode, MotionPathRaw } from './contract.motionpath-types.ts'; /** * Allocates a motion-path marker at the start of `path` (TS `createMotionPath`): distance 0, * direction forward. `speed` is the traversal rate (a magnitude, path units per * `updateMotionPath` delta-time unit), * `loopMode` the end behavior. The path arc length is measured once with * `getPathLength(path, tolerance)` and cached in `length`; `tolerance` is the curve-flattening * tolerance forwarded to that measurement. The path handle is retained, not copied. */ export declare function createMotionPath(path: Path, speed?: number, loopMode?: MotionPathLoopMode, tolerance?: number): MotionPathRaw; /** * Returns the marker's heading angle in radians — `atan2(tangentY, tangentX)` of the path tangent * at the current distance (TS `getMotionPathHeading`). An empty/degenerate path falls back to the * path tangent's `(1, 0)` default, giving a heading of 0. */ export declare function getMotionPathHeading(mp: MotionPathRaw): number; /** * Samples the marker's current world position and unit tangent into `pointOut` and `tangentOut` * (TS `getMotionPathPosition`). Returns false for an empty/degenerate path, in which case the point * output is left unchanged. */ export declare function getMotionPathPosition(mp: MotionPathRaw, pointOut: Vector2Like, tangentOut: Vector2Like): boolean; /** * Returns the marker's normalized progress `distance / length` in `[0, 1]` (TS * `getMotionPathProgress`). A zero-length path reports 0. */ export declare function getMotionPathProgress(mp: MotionPathRaw): number; /** * Initializes a motion-path marker under construction (TS `initializeMotionPath`): direction * forward, distance 0, the retained `path`, `speed`, `loopMode`, and the arc length measured once * with `getPathLength(path, tolerance)`. */ export declare function initializeMotionPath(out: MotionPathRaw, path: Path, speed?: number, loopMode?: MotionPathLoopMode, tolerance?: number): void; /** * True when the marker sits at the terminal edge for its current direction (TS * `isMotionPathAtEnd`). */ export declare function isMotionPathAtEnd(mp: MotionPathRaw): boolean; /** * Sets the traversal direction without changing the distance (TS `setMotionPathDirection`). */ export declare function setMotionPathDirection(mp: MotionPathRaw, direction: MotionPathDirection): void; /** * Seeks the marker to an absolute arc-length distance, clamping to `[0, length]` (TS * `setMotionPathDistance`). Direction and speed are unchanged. */ export declare function setMotionPathDistance(mp: MotionPathRaw, distance: number): void; /** * Seeks the marker to a normalized progress, clamping `t` to `[0, 1]` and setting * `distance = t * length` (TS `setMotionPathProgress`). Direction and speed are unchanged. */ export declare function setMotionPathProgress(mp: MotionPathRaw, t: number): void; /** * Advances the marker by `deltaTime` milliseconds: moves `speed * deltaTime` path units along the * current direction, then resolves the loop mode (TS `updateMotionPath`). A non-positive delta or a * zero-length path is a no-op. All inputs are read before any write. */ export declare function updateMotionPath(mp: MotionPathRaw, deltaTime: number): void; //# sourceMappingURL=motionPath.d.ts.map