code: function () {
      var data = this.data;
  
      this.updateConfig();
      this.animationIsPlaying = false;
      this.animation = anime(this.config);
      this.animation.began = true;
  
      this.removeEventListeners();
      this.addEventListeners();
  
      // Wait for start events for animation.
      if (!data.autoplay || data.startEvents && data.startEvents.length) { return; }
  
      // Delay animation.
      if (data.delay) {
        setTimeout(this.beginAnimation, data.delay);
        return;
      }
  
      // Play animation.
      this.beginAnimation();
    }
docs: Start animation from scratch.