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:32

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


optional easing?: EasingFunction

Defined in: KeyframeTrack.ts:38

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:34

Whether to loop the track.


optional onComplete?: () => void

Defined in: KeyframeTrack.ts:40

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

void


optional setter?: (value) => void

Defined in: KeyframeTrack.ts:30

Called with the interpolated value on every tick of the clock the track is scheduled on. The tick that wraps a looping track back to time 0 skips the setter, so the previous value holds for one tick. Optional — omit to run the track purely for its keyframe event callbacks (a “timeline” of side-effects with no per-tick value).

T

void


optional speed?: number

Defined in: KeyframeTrack.ts:36

Playback speed multiplier (default 1).