Import & Export

Please read the Get Started Page first.

Export

You can export your animation(s) by clicking the copy or save button. The data is outputted as .json and can be loaded with the Web Player.

Animation groups are grouped by a container element (as shown above). You can assign multiple groups to a single container.

Animation playback

To embed the animation on your web page you'll need the Web Player to be included.

The Spirit Web Player is a tiny Javascript library (~10kb) which enables you to play the animations directly on your web page. It uses GSAP as the default animation playback strategy. Other animation strategies are in development (like WAAPI).

Play animation from clipboard data

spirit.loadAnimation({
  animationData: {...}
})

Play animation from url

spirit.loadAnimation({
  path: './animation.json'
})

The spirit.loadAnimation() is a shorthand syntax (Simple API). If you need more control there's an extended API as well.

For more information about the Web Player API, make sure to follow up on the API documentation.

Example:

<script src="https://unpkg.com/spiritjs/dist/spirit.min.js"></script>
<script>
  spirit.loadAnimation({
    loop: true,
    path: './animation.json'
  })
</script>

results matching ""

    No results matching ""