Skip to main content

Module timeline

Module timeline 

Source
Expand description

Animation Timeline — keyframe curves for bone FK rotations, SDF morph targets, and kit parameter animation.

§Architecture

The timeline owns a list of AnimTrack values — one per animated property. A track holds a sorted list of Keyframe values and a CurveInterp mode. Evaluating a track at time t returns the interpolated TrackValue.

§Track types

  • BoneRotation: quaternion rotation for a named bone.
  • BoneTranslation: Vec3 translation for a named bone.
  • BoneScale: Vec3 scale for a named bone.
  • SdfMorph: blend factor [0,1] between two SDF graphs by name.
  • KitFloat: any f32 kit parameter (bloom, AO strength, etc.).
  • KitVec3: any Vec3 kit parameter (light direction, etc.).
  • KitColor: RGBA colour parameter.

§Playback

Timeline::step advances the playhead by dt seconds and evaluates all tracks, returning a FrameSnapshot with all current animated values.

§Editing

Keys are inserted/moved/deleted through the TimelineEditor wrapper, which maintains an undo stack of TimelineEdit entries.

Structs§

AnimClip
AnimTrack
A single animated property track.
FrameSnapshot
KeyId
KeySelection
Selected set of (track, key) pairs.
Keyframe
A single key in an animation track.
Timeline
Master timeline — owns all animation clips plus playback state.
TimelineEditor
Full editor wrapper around Timeline.
TrackId

Enums§

CurveInterp
How to interpolate between two keyframes.
EaseKind
LoopMode
PlaybackState
TimelineEdit
TrackTarget
TrackValue
The union of all possible track value types.

Type Aliases§

Time
Timeline time in seconds (f32 for GPU-side compatibility).