/** A three-dimensional point or direction represented without a renderer dependency. */ export type Vec3 = readonly [number, number, number]; /** A mutable three-dimensional tuple used by allocation-aware solver outputs. */ export type MutableVec3 = [number, number, number]; /** A quaternion in `(x, y, z, w)` order. */ export type Quat = readonly [number, number, number, number]; /** Inputs for {@link solveTwoBone}. */ export interface TwoBoneInput { root: Vec3; mid: Vec3; tip: Vec3; target: Vec3; pole: Vec3; } /** Reused output buffers filled by {@link solveTwoBone}. */ export interface TwoBoneOutput { mid: MutableVec3; tip: MutableVec3; } /** Iteration budget and convergence threshold for {@link solveFabrik}. */ export interface FabrikOptions { iterations?: number; tolerance?: number; } /** Inputs for {@link lookAt}. Angles are in radians. */ export interface LookAtInput { from: Vec3; target: Vec3; up: Vec3; maxYaw?: number; maxPitch?: number; } /** * Solves a two-segment chain analytically, placing the middle and tip joints toward `target` and `pole`. * The root remains fixed, and unreachable targets are clamped to the chain's maximum reach. * * @capability animation inverse kinematics solve a two-bone chain from a target and bend pole */ export declare function solveTwoBone(input: TwoBoneInput, out: TwoBoneOutput): TwoBoneOutput; /** * The product of two quaternions (`a` applied after `b`), both as `[x, y, z, w]`. * * @capability animation inverse kinematics compose two rotations */ export declare function multiplyQuaternions(a: Quat, b: Quat): Quat; /** * The shortest rotation taking one unit direction to another, as a quaternion. Parallel directions * give the identity; opposite directions give a half turn about a perpendicular axis. Returns the * identity for a zero-length input. * * @capability animation inverse kinematics the shortest rotation between two directions */ export declare function quaternionFromUnitVectors(from: Vec3, to: Vec3): Quat; /** * Solves a chain with the FABRIK forward-and-backward reaching algorithm. * Returned tuples are new values; the input chain is not modified. * * @capability animation inverse kinematics solve an arbitrary tuple chain toward a target */ export declare function solveFabrik(chain: readonly Vec3[], target: Vec3, options?: FabrikOptions): MutableVec3[]; /** Returns a quaternion that points a +Z bone from `from` toward `target`, with optional yaw and pitch limits. * * @capability animation inverse kinematics orient a bone toward a target with constrained yaw and pitch */ export declare function lookAt(input: LookAtInput): Quat;