How to use the animejs/lib/anime.es.js.stagger function in animejs

To help you get started, we’ve selected a few animejs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github codecombat / codecombat / ozaria / engine / cinematic / dialogsystem / DialogSystem.js View on Github external
shownDialogBubbles.push(speechBubbleDiv)
      return anime
        .timeline({
          autoplay: false
        })
        .add({
          targets: `#${this.id}`,
          opacity: 1,
          duration: 100,
          easing: 'easeInOutQuart'
        })
        .add({
          targets: `#${this.id} .letter`,
          opacity: 1,
          duration: 20,
          delay: anime.stagger(textDuration / letters, { easing: 'linear' }),
          easing: 'easeOutQuad'
        })
        .add({
          targets: `#${this.id} .cinematic-speech-bubble-click-continue`,
          opacity: 1,
          duration: 700
        })
    }
  }