import { mat4, vec3, quat } from 'gl-matrix'; import { InstanceData } from './WebGPUMesh'; export interface Bone { name: string; parentName: string | null; originalOffset: vec3; offset: vec3; rotation: quat; scale: vec3; meshType: 'box' | 'sphere' | 'cylinder'; color: vec3; size: vec3; worldMatrix: mat4; } export interface JointTransform { rotation?: quat; position?: vec3; scale?: vec3; } export interface Keyframe { time: number; transforms: Record; } export interface AnimationClip { name: string; duration: number; loop: boolean; keyframes: Keyframe[]; } export declare class CharacterRig { id: string; name: string; bones: Bone[]; animations: Record; constructor(id: string, name: string); getBone(name: string): Bone | undefined; /** * Evaluates and updates the skeleton joints hierarchy transformations. * Traverses bones recursively or in order of hierarchy (parents always defined before children). */ updateSkeleton(rootPos: vec3, rootRot: quat): void; /** * Evaluates keyframe animation at a specific time (seconds) */ sampleAnimation(clipName: string, time: number): void; /** * Converts the calculated world matrices into visual mesh instances ready for WebGPUMesh */ generateInstances(meshType: 'box' | 'sphere' | 'cylinder', overrideColors?: Record): InstanceData[]; } export declare function buildBipedRobotMech(): CharacterRig; export declare function buildBlockyHero(): CharacterRig; export declare function buildArachnidSpider(): CharacterRig; export declare function buildQuadrupedRig(): CharacterRig; //# sourceMappingURL=animation.d.ts.map