KeyframeEffect

open class KeyframeEffect(    var target: Element?,     keyframes: ReadonlyArray<Keyframe>?,     options: Double = definedExternally) : AnimationEffect(source)

The KeyframeEffect interface of the Web Animations API lets us create sets of animatable properties and values, called keyframes. These can then be played using the Animation.Animation constructor.

MDN Reference

Constructors

Link copied to clipboard
constructor(target: Element?, keyframes: ReadonlyArray<Keyframe>?, options: KeyframeEffectOptions)
constructor(target: Element?, keyframes: PropertyIndexedKeyframes?, options: Double = definedExternally)
constructor(target: Element?, keyframes: PropertyIndexedKeyframes?, options: KeyframeEffectOptions)
constructor(source: KeyframeEffect)
constructor(target: Element?, keyframes: ReadonlyArray<Keyframe>?, options: Double = definedExternally)

Properties

Link copied to clipboard

The composite property of a KeyframeEffect resolves how an element's animation impacts its underlying property values.

Link copied to clipboard

The iterationComposite property of a KeyframeEffect resolves how the animation's property value changes accumulate or override each other upon each of the animation's iterations.

Link copied to clipboard

The pseudoElement property of a KeyframeEffect interface is a string representing the pseudo-element being animated.

Link copied to clipboard

The target property of a KeyframeEffect interface represents the element or pseudo-element being animated.

Functions

Link copied to clipboard

The getComputedTiming() method of the AnimationEffect interface returns the calculated timing properties for this animation effect.

Link copied to clipboard

The getKeyframes() method of a KeyframeEffect returns an Array of the computed keyframes that make up this animation along with their computed offsets.

Link copied to clipboard

The AnimationEffect.getTiming() method of the AnimationEffect interface returns an object containing the timing properties for the Animation Effect.

Link copied to clipboard

The setKeyframes() method of the KeyframeEffect interface replaces the keyframes that make up the affected KeyframeEffect with a new set of keyframes.

Link copied to clipboard
fun updateTiming(timing: OptionalEffectTiming = definedExternally)

The updateTiming() method of the AnimationEffect interface updates the specified timing properties for an animation effect.