Animatable
Represents an animatable property that can have keyframes or a static value.
Animatable interface
Represents an animatable property that can have keyframes or a static value.
Signature:
interface Animatable<T>Remarks
When isAnimated is false, the property uses staticValue. Setting staticValue when keyframes exist will not affect the animation
Example
// Set static value
layer.position.staticValue = { x: 100, y: 200 };
// Add keyframes for animation
layer.position.addKeyframes([
{ frame: 0, value: { x: 0, y: 0 } },
{ frame: 30, value: { x: 100, y: 200 } },
]);Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| boolean | Whether this property has any keyframes | |
| ReadonlyArray<Keyframe<T>> | Array of all keyframes for this property | |
T | The static value used when the property is not animated |
Methods
Method | Description |
|---|---|
Adds one or more keyframes to this property. | |
Removes all keyframes from this property. | |
Gets the keyframe at a specific frame number, if one exists. | |
Gets the interpolated value of this property at a specific frame, or the current playhead if omitted. |