import { Vector3 } from 'three/webgpu'; import type { SplatVoxelCollider } from './SplatVoxelCollider.js'; /** Dimensions and movement tuning in world units and seconds. */ export interface VoxelCharacterControllerOptions { /** Capsule radius. Default: 0.25. */ radius?: number | undefined; /** Total capsule height. Default: 1.7. */ height?: number | undefined; /** Maximum step and ground-snap distance. Default: 0.24. */ stepHeight?: number | undefined; /** Walking speed. Default: 2.8. */ speed?: number | undefined; /** Downward acceleration. Default: 18. */ gravity?: number | undefined; /** Upward jump speed. Default: 5.5. */ jumpSpeed?: number | undefined; } /** * Upright capsule movement over a voxel snapshot: wall sliding, small steps, ground snapping, * buffered jumps and coyote time. No input listeners, camera, WASM, or allocations in update(). * Call at a fixed timestep, then interpolate the camera between the previous/current position. */ export declare class VoxelCharacterController { /** Immutable room collision snapshot used by this controller. */ readonly collider: SplatVoxelCollider; /** Capsule center; set it to place or respawn the character. */ readonly position: Vector3; /** World velocity; clear it when respawning. */ readonly velocity: Vector3; /** Capsule radius. */ readonly radius: number; /** Total capsule height. */ readonly height: number; /** Largest step the character can climb or snap down. */ readonly stepHeight: number; /** Walking speed; may be changed for sprinting. */ speed: number; /** Downward acceleration. */ readonly gravity: number; /** Upward jump speed. */ readonly jumpSpeed: number; /** Whether the previous update found a walkable contact. */ grounded: boolean; private _coyote; private _jumpBuffer; private readonly _start; private readonly _candidate; private readonly _stepVelocity; private readonly _wishVelocity; /** Create a controller against an immutable collision snapshot. */ constructor(collider: SplatVoxelCollider, options?: VoxelCharacterControllerOptions); /** Move toward a world-space XZ direction (length clamped to one). Jump is a press, not a held key. */ update(delta: number, direction: Vector3, jump?: boolean): void; }