KeyframeAnimationDef
Defined in: KeyframeAnimator.ts:11
Definition for a named keyframe animation.
Type Parameters
Section titled “Type Parameters”T extends Interpolatable = Interpolatable
Properties
Section titled “Properties”duration?
Section titled “duration?”
optionalduration?:number
Defined in: KeyframeAnimator.ts:25
easing?
Section titled “easing?”
optionaleasing?:EasingFunction
Defined in: KeyframeAnimator.ts:26
keyframes
Section titled “keyframes”keyframes:
Keyframe<T>[]
Defined in: KeyframeAnimator.ts:12
optionalloop?:boolean
Defined in: KeyframeAnimator.ts:23
onEnter?
Section titled “onEnter?”
optionalonEnter?: () =>void
Defined in: KeyframeAnimator.ts:27
Returns
Section titled “Returns”void
onExit?
Section titled “onExit?”
optionalonExit?: (complete) =>void
Defined in: KeyframeAnimator.ts:28
Parameters
Section titled “Parameters”complete
Section titled “complete”boolean
Returns
Section titled “Returns”void
speed?
Section titled “speed?”
optionalspeed?:number
Defined in: KeyframeAnimator.ts:24
Methods
Section titled “Methods”setter()?
Section titled “setter()?”
optionalsetter(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.
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”void