Keyframes define specific property values at specific times, with interpolation between them to create smooth animations.
| Prop | Type | Required | Example | Value Range | Description |
|---|---|---|---|---|---|
| id | string | true | - | - | The unique identifier of the keyframe. |
| time | number | true | - | - | The time at which the keyframe occurs, in seconds (relative to element start time). |
| stateObj | object | true | - | - | The state object containing property values at this keyframe. Can include any animatable property like x, y, rotation, scaleX, scaleY, alpha, etc. |
| cp1 | object | false | - | - | The first control point for Bezier curve easing. Coordinates are normalized (0-1 range). Example: {x: 0.25, y: 0.1} |
| cp2 | object | false | - | - | The second control point for Bezier curve easing. Coordinates are normalized (0-1 range). Example: {x: 0.25, y: 1} |
The cp1 and cp2 properties define a cubic Bezier curve for custom easing between keyframes:
cp1: {x: 0.42, y: 0}, cp2: {x: 0.58, y: 1}cp1: {x: 0.42, y: 0}, cp2: {x: 1, y: 1}cp1: {x: 0, y: 0}, cp2: {x: 0.58, y: 1}1{
2 "id": "39ecb75a-3490-43bd-84c2-72366c2f39f2",
3 "type": "Image",
4 "start": 0,
5 "duration": 5,
6 "trackIndex": 0,
7 "x": 0,
8 "y": 0,
9 "blendMode": "normal",
10 "anchorX": 1302,
11 "anchorY": 2312,
12 "rotation": 0,
13 "scaleX": 0.23356401384083045,
14 "scaleY": 0.23356401384083045,
15 "alpha": 1,
16 "skewX": 0,
17 "skewY": 0,
18 "keyframes": [
19 {
20 "id": "800350bd-4a24-4440-904c-ec08a8159508",
21 "time": 0,
22 "stateObj": {
23 "alpha": 0
24 },
25 "cp1": {
26 "x": 0.25,
27 "y": 0.1
28 },
29 "cp2": {
30 "x": 0.25,
31 "y": 1
32 }
33 },
34 {
35 "id": "ce3f9b10-2b9e-4266-8cdb-77167f9f16aa",
36 "time": 3,
37 "stateObj": {
38 "alpha": 1
39 },
40 "cp1": {
41 "x": 0.25,
42 "y": 0
43 },
44 "cp2": {
45 "x": 0.25,
46 "y": 0.9
47 }
48 }
49 ],
50 "externalUrl": "https://images.pexels.com/photos/30465303/pexels-photo-30465303.jpeg",
51 "ext": "jpeg"
52}
53When an element has multiple animation methods applied:
keyframes array) - standard property animationsanimations array) - advanced animations like expressions, paths, sequencesIf the same property is animated by multiple methods, the priority order is:
This allows advanced animations to override keyframe values when needed.
time values are relative to the element's start time, not absolute timeline time.stateObj.cp1 and cp2 Bezier control points.fill, stroke) are interpolated in RGB space.