ease-tweening
v0.1.1
Published
a light lib of tweening
Downloads
4
Readme
ease-tweening
a light lib of tweening
API
create tweening
var easeNameTweening = tweening.easeName({
from: number, //required
to: number, //required
duration: millisecond //optional default: 1000
onUpdate: function(data, percent){ }, //optional
onEnd: function(data){} //optional
})
Example
var easeTweening = require("ease-tweening");
var easeInTween = easeTweening.easeIn({
to: 1,
from: 1000,
duration: 5000,
onUpdate: function (data, percent) {
console.log(data);
},
});
list of easeName
- linear
- easeInQuad
- easeInCubic
- easeInQuart
- easeInQuint
- easeInSine
- easeInExpo
- easeInCirc
- easeInBounce
- easeInElastic
- easeInBack
- easeOutQuad
- easeOutCubic
- easeOutQuart
- easeOutQuint
- easeOutSine
- easeOutExpo
- easeOutCirc
- easeOutBounce
- easeOutElastic
- easeOutBack
- easeInOutQuad
- easeInOutCubic
- easeInOutQuart
- easeInOutQuint
- easeInOutSine
- easeInOutExpo
- easeInOutCirc
- easeInOutBounce
- easeInOutElastic
- easeInOutBack
Thanks for tween-functions