GithubHelp home page GithubHelp logo

arshiaafr / spirit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spirit/spirit

0.0 0.0 0.0 1.65 MB

๐Ÿ™Œ Play Spirit animations on the web

Home Page: https://spiritapp.io

License: MIT License

JavaScript 100.00%

spirit's Introduction

Spirit

Spirit โšก๏ธ Web Player

travis version greensock downloads release

Lightweight and easy to use
Play your animations on the web

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: dcument.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

spirit's People

Contributors

inlet avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.