import type { TrackSamples } from './types'; /** * An interpolator produces a sample between two keyframes. * * - `a`, `b`: bracket keyframe values, each of length = `stride` * - `alpha`: interpolation factor in [0, 1] * - `out`: caller-owned output buffer, length = `stride`; the function writes into it in place */ export type Interpolator = (a: Float32Array, b: Float32Array, alpha: number, out: Float32Array) => void; /** Per-component linear interpolation. Works for scalar (stride=1) and any vec length. */ export declare const lerp: Interpolator; /** Step — hold the previous sample. */ export declare const step: Interpolator; /** Nearest — pick whichever bracket endpoint is closer. */ export declare const nearest: Interpolator; /** * Spherical linear interpolation for unit quaternions `[x, y, z, w]`. * * - Inputs are assumed to have length 4. Out buffer must also be length 4. * - Picks the shortest-arc path by flipping sign of `b` when `dot(a, b) < 0`. * - Falls back to `lerp` (and re-normalizes) when the two quats are very close * to avoid division-by-zero. */ export declare const slerpQuat: Interpolator; export interface BracketHint { value: number; } /** * Sample a track at a given time, writing the interpolated value into `out`. * * Pure function — no React, safe to call inside `clock.on('tick')` or any * imperative render loop. Keeps the `findBracket` hint in a caller-owned * container so multiple calls amortize to O(1) during sequential playback. * * Callers must provide `out` sized to `track.stride`. */ export declare function sampleTrack(track: TrackSamples, time: number, interp: Interpolator, hint: BracketHint, out: Float32Array): void; //# sourceMappingURL=interpolators.d.ts.map