Skip to main content

public 3d-motion repository

spirit

// spirit/spirit

🙌 Play Spirit animations on the web

$ git log --oneline --stat
stars:762forks:26updated:2026-07-11
README.md
readonly

Spirit

travis

version

greensock

downloads

release

Getting Started:

Browser:

<svg>
  <g id="container">
    <path d="..." data-spirit-id="body" />
    <path d="..." data-spirit-id="mouth" />
    <path d="..." data-spirit-id="legs" />
  </g>
</svg>

<script src="https://unpkg.com/spiritjs/dist/spirit.min.js"></script>
<script>
  spirit
    .loadAnimation({
      path: './animation.json',
      container: document.getElementById('container'),
    })
    .then(timeline => timeline.play());
</script>

Node:

install:

npm install spiritjs --save

Usage:

// load GSAP from CDN

import spirit from 'spiritjs';

spirit.loadAnimation({ path: './animation.json' }).then(timeline => timeline.play());
// use existing GSAP instance

import gsap from 'gsap';
import spirit from 'spiritjs';

spirit.setup(gsap).then(() => {
  spirit.loadAnimation({ path: './animation.json' }).then(timeline => timeline.play());
});

For more info check out the API Documentation.

Links

Examples

README image

README image

README image

README image

README image

README image

README image

README image

metadata.json
JavaScriptanimationappGSAPplayerruntimetool

[INFO] 1 topic link to curated motion topic pages.