Advanced API

This advanced API gives you more control than the shorthand notation.

Example:

spirit.setup().then(() => { // load gsap

  spirit.load('animations.json', document.querySelector('.container')).then(groups => { // load animations

    const timeline = groups.get('ghost').construct() // create gsap timeline
    timeline.play(0) // play timeline

  })

})

results matching ""

    No results matching ""