A WeakMap of Animations
The keyframes for individual animations
A WeakMap that stores all the fully calculated keyframes for individual Animation instances.
Note: the computedKeyframes are changed to their proper Animation instance options, so, some of the names are different, and options that can't be computed are not present. E.g. translateX, skew, etc..., they've all been turned into the transform property.*
The options for individual animations
A WeakMap that stores all the fully calculated options for individual Animation instances.
Note: the computedOptions are changed to their proper Animation instance options, so, some of the names are different, and options that can't be computed are not present. E.g. fillMode in the animation options is now just fill in the computedOptions.*
Note: keyframes are not included, both the array form and the object form; the options, speed, extend, padEndDelay, and autoplay animation options are not included
An event emitter
A WeakMap of KeyFrameEffects
Stores an animation that runs on the total duration of all the Animation instances, and as such it's the main Animation.
The Element the mainAnimation runs on
The Keyframe Effect for the mainAnimation
The smallest speed out of all Animation's
The smallest delay out of all Animation's
Stores the options for the current animation
Read more about the DefaultAnimationOptions
Returns a promise that is fulfilled when the mainAnimation is finished
The properties to animate
The indexs of target Elements in Animate
The list of Elements to Animate
The total duration of all Animation's
Store the last remebered playstate before page was hidden
Stores all currently running instances of the Animate Class that are actively using requestAnimationFrame to check progress, it's meant to ensure you don't have multiple instances of the Animate Class creating multiple requestAnimationFrames at the same time this can cause performance hiccups
Stores request frame calls
Tells all animate instances to pause when the page is hidden
The Symbol.toStringTag well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the Object.prototype.toString() method.
Adds a target to the Animate instance, and update the animation options with the change
Note: KeyframeEffect support is really low, so, I am suggest that you avoid using the add method, until browser support for KeyframeEffect.updateTiming(...) and KeyframeEffefct.setKeyframes(...) is better
Calls a method that affects all animations including the mainAnimation; the method only allows the animation parameter
Calls a method that affects all animations excluding the mainAnimation; the method only allows the animation parameter
Register the begin event
Cancels all Animations
Catches error that occur in the this.promise Promise
Creates animations out of an array of computed options
Returns an array of computed options
Call all listeners within an event
If you don't care if the this.promise Promise has either been rejected or resolved
Force complete all Animations
Get a specific Animation from an Animate instance
Returns the current time of the Main Animation
Returns the current playing state
Returns the Animation progress as a fraction of the current time / duration * 100
Return the playback speed of the animation
Returns the timings of an Animation, given a target E.g. { duration, endDelay, delay, iterations, iterationStart, direction, easing, fill, etc... }
Returns a boolean determining if the animate instances playstate is equal to the playstate parameter.
Represents an Animation Frame Loop
Returns a new Promise that is resolved when the animation finishes
Removes a listener from an event
Adds a listener for a given event
document visibilitychange event handler
Pause Animation
Play Animation
Removes a target from an Animate instance, and update the animation options with the change
Note: KeyframeEffect support is really low, so, I am suggest that you avoid using the remove method, until browser support for KeyframeEffect.updateTiming(...) and KeyframeEffefct.setKeyframes(...) is better
Removes a target from an Animate instance
Note: it doesn't update the current running options, you need to use the Animate.prototype.remove(...) method if you want to also update the running options
Reset all Animations
Reverse Animation
Set the current time of the Main Animation
Set the Animation progress as a value from 0 to 100
Set the playback speed of an Animation
Cancels & Clears all Animations
Cancels animation frame
Fulfills the this.promise Promise
Returns the Animate options, as JSON
Update the options for all targets
Note: KeyframeEffect support is really low, so, I am suggest that you avoid using the updateOptions method, until browser support for KeyframeEffect.updateTiming(...) and KeyframeEffefct.setKeyframes(...) is better
Cancels animationFrame
Calls requestAnimationFrame for each running instance of Animate
Generated using TypeDoc
Extends Animate stop method, so, it automatically removes the target elements from the dom