Skip to content

KeyframeAnimationDef

Defined in: KeyframeAnimator.ts:11

Definition for a named keyframe animation.

T extends Interpolatable = Interpolatable

optional duration?: number

Defined in: KeyframeAnimator.ts:25


optional easing?: EasingFunction

Defined in: KeyframeAnimator.ts:26


keyframes: Keyframe<T>[]

Defined in: KeyframeAnimator.ts:12


optional loop?: boolean

Defined in: KeyframeAnimator.ts:23


optional onEnter?: () => void

Defined in: KeyframeAnimator.ts:27

void


optional onExit?: (complete) => void

Defined in: KeyframeAnimator.ts:28

boolean

void


optional speed?: number

Defined in: KeyframeAnimator.ts:24

optional setter(value): void

Defined in: KeyframeAnimator.ts:22

Receives the interpolated value each frame. Optional — when omitted the animator only fires keyframe event callbacks (pure-timeline use case).

Declared as a method signature (rather than a (value: T) => void property) so the parameter type is bivariant — this is what lets a Record<string, KeyframeAnimationDef<number>> literal flow into the KeyframeAnimator constructor without per-key casts.

T

void