1.0.0 • Published 5 years ago

animation-stepper v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

animation-stepper

npm version

NPM

Javascript library to handle several animations at once using a singleton approach. One window.requestAnimationFrame instance will be running in the background to orchest all animations.

1 Quick start

1.1 Download and Install animation-stepper

2 Include dependences

$ yarn add animation-stepper
# or
$ npm install animation-stepper

2.1 In your HTML

<script src="./node_modules/animation-stepper/dist/animation-stepper.min.js"></script>

2.2 In your js code

<script>
AS.attachAnimation({
    stepsNum: 5,
    milisecondsStep: 25,
    func: function( _animation ) {
        ...
    },
    onStart: function() { 
        console.log("animation: onStart!");
        ...
    },
    whenFinish: function() {
        console.log("animation: whenFinish!");
        ...
    }
})
</script>

Full examples available in demo folder.

Development instructions

$ yarn install

grunt build

License

flying-canvas is MIT licensed.