TimelineTrackData
ceramic.TimelineTrackData (Typedef)
Data structure representing an animation track in serialized form.
This typedef is used for storing and loading timeline track data, typically from fragment files. It defines which entity property to animate and contains all the keyframes for that animation.
At runtime, this data is converted into typed TimelineTrack instances based on the field type:
- Bool fields -> TimelineBoolTrack
- Float/numeric fields -> TimelineFloatTrack
- Color fields -> TimelineColorTrack
- Array fields -> TimelineFloatArrayTrack
Example in fragment data:
{
"loop": false,
"entity": "mySprite",
"field": "x",
"keyframes": [
{ "index": 0, "easing": "LINEAR", "value": 0 },
{ "index": 30, "easing": "EASE_OUT", "value": 100 },
{ "index": 60, "easing": "BOUNCE_EASE_OUT", "value": 200 }
]
}