Giter VIP home page Giter VIP logo

spirit's Introduction

Spirit

Spirit - Player for the Web

version travis greensock downloads release

Lightweight and easy to use
Play your (with Spirit Studio) created animations directly on your web page

โฏ Getting Started:

โฏ Install

browser:

<script src="https://unpkg.com/spiritjs/dist/spirit.min.js"></script>

node:

# with npm
npm install spiritjs --save

# or yarn
yarn add spiritjs

โฏ Usage

<!--include the runtime-->
<script src="https://unpkg.com/spiritjs/dist/spirit.js"></script>

<!--script to play the created animation-->
<script>

  // Basic Usage

  // note: use `path` or `animationData`
  // to determine how to load animation data

  // load animation data
  spirit.loadAnimation({
    loop: true,
    yoyo: true,
    delay: 0,
    autoPlay: true,
    path: './animation.json',
    animationData: data
  }).then(
    // play it
    timeline => timeline.play()
  )

  // Extended Usage

// load GSAP from CDN
  spirit.setup().then(() => {
    // load animation data
    spirit.load('animation.json').then(groups => {
      // construct first group and play it
      groups.at(0).construct().play()
    })
  })
</script>

Head over to the API Documentation for more information.

Examples

spirit's People

Contributors

inlet 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.