import * as THREE from 'three'; import type { Disposable, FrameContext } from '../types.js'; /** Tuning for {@link createPathCamera}: look-around ranges (radians), look smoothing, and travel speed. */ export interface PathCameraOptions { /** Max look-around yaw in radians. Default 0.25 (~14°). */ yawRange?: number; /** Max look-around pitch in radians. Default 0.18. */ pitchRange?: number; /** Look smoothing rate (higher = snappier). Default 6. */ smoothing?: number; /** Units per second along the curve. Default 2. */ speed?: number; } /** What a path camera rides: a curve plus its total length. `SegmentStream` satisfies it. */ export interface PathCameraSource { /** Current path curve. May be swapped/rebuilt between frames. */ curve: THREE.Curve & { points?: THREE.Vector3[]; }; /** Total path length in world units. */ total: number; } /** Handle returned by {@link createPathCamera}. `distance` is writable for seeking; `dispose()` removes the pointer listeners. */ export interface PathCamera extends Disposable { /** Distance travelled along the curve (writable for seeking). */ distance: number; /** Advance and orient the camera. Call once per frame. */ update(ctx: FrameContext, speedOverride?: number): void; } /** * Rail-riding camera: advances `distance` along the source curve at `speed`, * orients along the tangent, and layers smoothed pointer look-around within * the yaw/pitch ranges. * * @param camera - Perspective camera to drive. * @param source - Curve + total length; may be swapped between frames * (segment streams rebuild it as segments append). * @param element - Element whose pointer movement drives look-around. * @param options - Ranges, smoothing, and speed. * @returns A {@link PathCamera}; call `update(ctx)` once per frame. */ export declare function createPathCamera(camera: THREE.PerspectiveCamera, path: PathCameraSource, element: HTMLElement, { yawRange, pitchRange, smoothing, speed }?: PathCameraOptions): PathCamera; //# sourceMappingURL=path-camera.d.ts.map