Skip to content

@modoki/engine / index / TrackValueType

Type Alias: TrackValueType

TrackValueType = "number" | "color" | "boolean" | "enum"

Keyframe animation data model — the on-disk .anim.json clip format.

A clip animates fields of ECS traits over time. Tracks bind to entities by a relative name-path from the entity that carries the Animator trait (the "root"), so a clip is a reusable asset that works across prefab instances — the same model as Unity's AnimationClip + Animator.

Values are plain numbers:

  • number tracks → the field value directly.
  • color tracks → a packed 0xRRGGBB integer (interpolated per channel).
  • boolean tracks → 0 | 1 (always stepped).
  • enum tracks → the option index into the field's static option list (always stepped; decoded back to the string on apply).

Built with Modoki.