Tween.js provides wonderful support for tweening between states over a duration of time. But what if you wanted to do a tween based on touch position over an area, or the percentage of a download completed? TweenMachine decouples the tweening logic of Tween.js from the depency of time. Use the same easing & interpolation functions available to Tween.js to build reversible, touch and movement dependent animation.
To start, create a new TweenMachine:
var tween = new TweenMachine(0, 100);
tween.easing('Bounce.InOut')
.interpolation('Bezier')
var valueAtZeroPercent = tween.get(0.0),
valueAtFiftyPercent = tween.get(0.5),
valueAtHundredPercent = tween.get(1);
Based off of Robert Penner's Easing Functions.