Google News
logo
Anime.js - Interview Questions
What is the RESTART Control in Anime.js?
Restarts an animation from its initial values.
animation.restart();

 

Example : 
var animation = anime({
  targets: '.restart-demo .el',
  translateX: 250,
  delay: function(el, i) { return i * 100; },
  direction: 'alternate',
  loop: true,
  easing: 'easeInOutSine'
});

document.querySelector('.restart-demo .restart').onclick = animation.restart;
Advertisement