Stop all animations that were created with applyTo.
Apply this animation to an HTML element or array of HTML elements. Embeds a style element in the HTML document with the animations and keyframes, and then sets the CSS of the given HTML elements to use those animations.
Promise that resolves once the animation is completed and the animation style removed. Infinite animations never resolve.
Clears all components from the transformation chain.
Reload a Complex composition from a serialized operation.
Array of ComponentOptions objects from serialize
Retrieve keyframes to embed as CSS or as an array of Animation Keyframe objects to use with Web Animation API.
Defaults to 'webapi'
Output options. See KeyframeOptions
CSS or array of objects depending on the type given
Removes a component from the transformation chain.
Remove transformation component at index; if omitted, all components are removed
Outputs the Complex composition to an array of component options that can be reloaded via deserialize. Useful for saving preset animations.
Does the browser have CSS support for animations?
Construct a complex 2D animation using a chained composition of any number of the following transforms:
See ComponentOptions for a list of options that can be applied per transformation component.
Basic Usage
new Complex() .scale({ from: 0.5, to: 1, duration: 250 }) .rotate({ from: -90, to: 0, delay: 250, duration: 500 }) .get();