KeyframeTrackOptions
Defined in: KeyframeTrack.ts:20
Options for creating a keyframe track.
Type Parameters
Section titled “Type Parameters”T extends Interpolatable
Properties
Section titled “Properties”duration?
Section titled “duration?”
optionalduration?:number
Defined in: KeyframeTrack.ts:32
Total duration in seconds. Defaults to the last keyframe’s time.
easing?
Section titled “easing?”
optionaleasing?:EasingFunction
Defined in: KeyframeTrack.ts:38
Default easing between keyframes (default easeLinear).
keyframes
Section titled “keyframes”keyframes:
Keyframe<T>[]
Defined in: KeyframeTrack.ts:22
At least 2 keyframes, sorted by time.
optionalloop?:boolean
Defined in: KeyframeTrack.ts:34
Whether to loop the track.
onComplete?
Section titled “onComplete?”
optionalonComplete?: () =>void
Defined in: KeyframeTrack.ts:40
Called when the track completes (non-looping only).
Returns
Section titled “Returns”void
setter?
Section titled “setter?”
optionalsetter?: (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).
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”void
speed?
Section titled “speed?”
optionalspeed?:number
Defined in: KeyframeTrack.ts:36
Playback speed multiplier (default 1).