Runtime Groups

A Spirit group is a collection of GSAP timelines that together form a new "main" timeline instance. Because elements can be part of multiple groups you'll need to construct the timeline once before using it.

A single web page can have multiple animation groups, each with its own controllable timeline.

See Runtime > Registry for API usage.


Play all animations on the web page at once:

import spirit from 'spiritjs'

(async => {

  // load GSAP
  await spirit.setup()

  // load animations
  const groups = await spirit.load('groups.json')

  // construct all groups at once

  // play all animations just once
    group =>


Work in progress!

More detailed documentation is coming soon

results matching ""

    No results matching ""