node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

properjs-tween

Tween

A simple tween class using request animation frame. For when just a simple animation utility will do, which is most times :)

Installation

npm install properjs-tween --save-dev

Usage

var Tween = require( "properjs-tween" );
var tween = new Tween({
    from: 0,
    to: 500,
    update: function ( t ) {
        // Update stuff here 
    },
    complete: function ( t ) {
        // Animation all done ! 
    },
    ease: Easing.easeInOutQuad,
    delay: 0
});