Controls: How Can They be Used?
Anime.js provides a variety of controls that allow you to manipulate the playback of your animations. These controls include:
-
- play(): Plays a paused animation, or starts the animation if the autoplay parameter is set to false.
- pause(): Pauses a running animation.
- restart(): Restarts an animation from its initial values.
- seek(): Skips to a certain point in the animation. You can specify a time or percentage value.
- reverse(): Reverses the direction of the animation.
The play(), pause(), and restart() functions are shown in the example that is displayed here.