import type { EntityStore } from "../scene/entityStore.js"; /** A render pose sampled between two simulation steps: `[x, y, z, rotationY]`. */ export type RenderPose = [x: number, y: number, z: number, rotationY: number]; /** Serializable previous-step poses keyed by entity id. */ export interface PoseHistoryState { previous: Record; } /** Previous-step pose buffer: capture at each fixed step, sample between steps for rendering. */ export interface PoseHistory { /** Capture every entity's current pose as the "previous" step. Call once at the start of each fixed step. */ beginStep(entities: EntityStore): void; /** * Write the pose `alpha` of the way from the previous step to the live pose into `out`. Returns `false` (and * leaves `out` untouched) when the entity is unknown; an entity with no history or one that jumped farther * than `snapDistance` gets its live pose. */ sample(entities: EntityStore, id: string, alpha: number, out: RenderPose): boolean; /** Forget an entity's previous pose so its next frame renders live (respawn, teleport). */ snap(id: string): void; retune(options: { snapDistance?: number; }): void; snapshot(): PoseHistoryState; restore(state: PoseHistoryState): void; } /** Shortest-arc interpolation between two yaw angles. */ export declare function lerpAngle(from: number, to: number, t: number): number; /** * Previous-step pose buffer for render interpolation under a fixed-step loop. Reuses one 4-slot array per * entity so a step over N entities allocates only for entities seen for the first time. * * @capability pose-interpolation render entity poses between fixed simulation steps without stutter */ export declare function createPoseHistory(options?: { snapDistance?: number; }): PoseHistory;