Skip to main content

Animation System

Yugma includes a keyframe-based animation system accessible via the Timeline panel at the bottom of the editor.

Timeline Panel​

The Timeline sits at the bottom of the viewport and provides:

  • Play/Pause controls
  • Keyframe track per object — visual diamond markers for each keyframe
  • Playhead — Draggable time cursor showing current frame
  • FPS control — Adjustable frames per second (default: 24)

Working with Keyframes​

Adding Keyframes​

  1. Select an object
  2. Move the playhead to the desired frame
  3. Modify the object's transform (position, rotation, scale)
  4. A keyframe is automatically recorded at that frame

Playback​

Press the Play button or use the timeline controls to preview the animation. Objects interpolate between keyframes according to each keyframe's interpolation mode.

Interpolation & Easing​

Each keyframe carries an interpolation mode — linear (the default for timeline-recorded keyframes), cubic (eased), or step. The AI set_animation tool sets it via a per-keyframe easing hint: ease-in, ease-out, ease-in-out, and spring map to cubic, step to step.

Animation Data​

Keyframes are stored per-object in the scene state:

{
"keyframes": {
"0": {
"position": [0, 0, 0],
"rotation": [0, 0, 0],
"scale": [1, 1, 1]
},
"24": {
"position": [2, 0, 0],
"rotation": [0, 1.57, 0],
"scale": [1, 1, 1]
}
}
}

Joint & Clip Animation​

Beyond transform keyframes, two AI-driven animation paths exist for imported models:

  • Joint-space animation — for kinematic catalog/URDF models, the AI set_animation tool accepts jointTargets: each entry eases a named joint from its current value to an absolute target (radians for revolute/continuous joints, meters for prismatic), clamped to the joint's URDF limits.
  • Embedded GLB clips — imported GLB models with baked animation clips can play them via the AI play_animation tool.

Current Limitations​

  • Timeline keyframes drive transform properties only (position, rotation, scale)
  • No material property animation (planned)