simple animation library
Transition is a simple animation library. It is based on requestAnimationFrame. Its only job is to calculate a delta based on a duration and an equation. It is kept simple to be able to animate any number of things, with any interpolation logic.
An animation can be
activemeans the animation is started. The animation can be either paused or stopped.
pausedmeans the animation is in a paused state. The animation can be resumed.
idlemeans the animation is neither paused or active. It can be started.
var Transition = require'transition';var equations = require'transition/equations';var animation = 1000 equationssineInconsole.logdelta;;// an animation should be startedanimationstart;// is the animation running?console.loganimationactive; // true// an animation can be paused and resumed.animationpause;animationresume;// an animation can be stoppedanimationstop;// you can also check if it's idle.console.loganimationidle;
var Transform3d = require'transform3d';var Transition = require'transition';var equations = require'transition/equations';var transform1 = ;var transform2 = ;transform1rotateX0rotateY0scale0.9;transform2rotateX360rotateY180scale1.5;var interpolation = transform1interpolationtransform2;var animation = 1000 equationscubicelementstyleWebkitTransform = interpolationstepdeltacompose;;animationstart;