### Overview Add the ability to play animation clips on skeletons, animating bone transforms over time. ### Current State _No response_ ### Scope **Goals:** - Animation player component - Play/pause/stop controls - Playback speed control - Loop modes - Animation events (on loop, on finish) **Non-Goals:** - Animation blending - Animation state machine - Root motion ### Proposed API ```rust pub struct SkeletalAnimationClip { bone_tracks: HashMap<usize, AnimationTrack<Transform>>, duration: f32, } pub struct AnimationPlayer { clip: Handle<SkeletalAnimationClip>, time: f32, speed: f32, playing: bool, looping: bool, } impl AnimationPlayer { pub fn new(clip: Handle<SkeletalAnimationClip>) -> Self; pub fn play(&mut self); pub fn pause(&mut self); pub fn stop(&mut self); pub fn set_speed(&mut self, speed: f32); pub fn set_looping(&mut self, looping: bool); pub fn update(&mut self, dt: f32); pub fn apply_to_pose(&self, clip: &SkeletalAnimationClip, pose: &mut Pose); } ``` ### Acceptance Criteria - [ ] Animation plays at correct speed - [ ] Bone transforms update per frame - [ ] Looping restarts at end - [ ] Speed multiplier works (0.5x, 2x) - [ ] Pose reflects animation state ### Affected Crates lambda-rs ### Notes - Track per bone index, not name (for speed) - Consider lazy pose computation
Activity