Skip to content

KeyframeTrackOptions

Defined in: KeyframeTrack.ts:20

Options for creating a keyframe track.

T extends Interpolatable

optional duration?: number

Defined in: KeyframeTrack.ts:30

Total duration in ms. Defaults to the last keyframe’s time.


optional easing?: EasingFunction

Defined in: KeyframeTrack.ts:36

Default easing between keyframes (default easeLinear).


keyframes: Keyframe<T>[]

Defined in: KeyframeTrack.ts:22

At least 2 keyframes, sorted by time.


optional loop?: boolean

Defined in: KeyframeTrack.ts:32

Whether to loop the track.


optional onComplete?: () => void

Defined in: KeyframeTrack.ts:38

Called when the track completes (non-looping only).

void


optional setter?: (value) => void

Defined in: KeyframeTrack.ts:28

Called each frame with the interpolated value. Optional — omit to run the track purely for its keyframe event callbacks (a “timeline” of side-effects with no per-frame value).

T

void


optional speed?: number

Defined in: KeyframeTrack.ts:34

Playback speed multiplier (default 1).