KeyframeKit / KeyframeEffectParameters
Class KeyframeEffectParameters
Provides a more convenient way to define animations than is offered natively.
See
Web Animations Module Level 1 - The KeyframeEffect interface
Constructors
Constructor
ts
new KeyframeEffectParameters(obj: {
keyframes: KeyframeArgument;
options?: number | KeyframeEffectOptions;
}): KeyframeEffectParameters;Parameters
obj
keyframes
A keyframes object. MDN Reference
options?
number | KeyframeEffectOptions = {}
Keyframe effect options. MDN Reference
Returns
KeyframeEffectParameters
Methods
toAnimation()
ts
toAnimation(obj: {
options?: number | KeyframeEffectOptions;
target: Element | null;
timeline?: AnimationTimeline | null;
}): Animation;Parameters
obj
options?
number | KeyframeEffectOptions = {}
Additional keyframe effect options. Can override existing keys. MDN Reference
target
Element | null
An element to attach the animation to.
timeline?
AnimationTimeline | null = document.timeline
The timeline with which to associate the animation. MDN Reference
Returns
See
- Web Animations Module Level 1 - The KeyframeEffect interface
- Web Animations Module Level 1 - The Animation interface
Properties
keyframes
ts
keyframes: KeyframeArgument;options
ts
options: KeyframeEffectOptions;