Coder Social home page Coder Social logo

fromtheoutfit / gs-animation-tools Goto Github PK

View Code? Open in Web Editor NEW
12.0 5.0 0.0 611 KB

Helpful tools that make animating with GreenSock just a little bit easier.

Home Page: http://fromtheoutfit.github.io/gs-animation-tools/html/

JavaScript 77.61% CSS 2.31% HTML 20.09%
greensock animation-controller animation

gs-animation-tools's Introduction

GreenSock Animation Tools

Helpful tools that make animating with GreenSock just a little bit easier.

Demo

Screen capture of the demo

…or, you can try it yourself on this simple animation.

How to Implement

The order of things is important:

  1. GreenSock's platform file(s); learn more here
  2. Your animation's script; example: <script src="/path/to/animations.js"></script>
  3. This animation tools' script; example: <script src="/path/to/gs-animation-tools.js"></script>
  4. Call the animation tools and pass optional parameters as needed; example: <script>_gsAnimationTools(tlMaster, 0.15, 0.15);</script>

You can see this order in use in the demo's index.html file.

Parameters

_gsAnimationTools(timelineName, seekBackwardDuration, seekForwardDuration); where…

  • timelineName is the name of your primary timeline, and defaults to tl
  • seekBackwardDuration is the number of seconds you want to jump back, and defaults to 0.1
  • seekForwardDuration is the number of seconds you want to jump forward, and defaults to 0.1

…and can be seen in the demo's index.html file, like so: _gsAnimationTools(tlMaster, 0.15, 0.15);

Keyboard Shortcuts

  • Spacebar will toggle between play and pause
  • will seek back by the value you've defined above, or by 0.1 seconds if left undefined
  • will seek forward by the value you've defined above, or by 0.1 seconds if left undefined
  • esc will restart the animation from it's beginning

gs-animation-tools's People

Contributors

marcamos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gs-animation-tools's Issues

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.