Spirit has been discontinued. Spirit is no longer available as a service and these docs are kept for reference only. Read more.
🕹 Web Player
Play Spirit animations directly on your web page with the open-source Spirit web player.
CDN
Development
With warnings & tips
<script src="https://unpkg.com/spiritjs/dist/spirit.js"></script>Production
Warnings & tips stripped, ~10KB min+gzip
<script src="https://unpkg.com/spiritjs/dist/spirit.min.js"></script>Don’t use the minified version during development, you'll miss out on all the nice warnings for common mistakes
Node
npm install spiritjs --saveUses development/production version based on
process.env.NODE_ENV.
The default animation strategy for animation playback is GSAP, which can be considered as one of the best animation libraries available. It is superior in cross-browser compatibility and performance, plus there are some useful plug-ins available that will speed up your animation workflow.
We're currently developing Spirit Studio 2, which supports other animation strategies like Lottie, Anime as well.
spirit.loadAnimation({ path: './animation.json' });Consult the API reference for more information.