A lightweight tweening micro-framewrok for your JavaScript projects. Only 2.8kb when minified.
MIT License
Simple Tween JS is a tiny microframework for easily integrating Tweens by dropping in a file. The performance is uber optimized and has a minimal impact on your application. Its originally designed for HTML Canvas JavaScript applications, but you can use it for just about anything JavaScript related.
Live demo at http://ashblue.github.com/simple-tween-js/ (demo broken in IE9, but the library does work and has been tested in IE9)
##Setup
Download the minified or regular tween.js file and place it in your project files
Include the tween script at the bottom of your page, before your other JavaScript files
<script type="text/javascript" src="tween.min.js"></script>
You can now create new tweens with syntax similar to the following.
var myTween = new Tween(startValue, distance, duration, animationType, loop);
##Browser Support Known to be stable in the following browsers. Could very well work in older versions such as IE8, haven't tested. Mainly because the demo is written in HTML5's Canvas.
##Usage Guide
Create a new Tween object
var myTween = new Tween(startValue, distance, duration, animationType, loop);
You can then get the tween's current value by calling getValue
myTween.getValue();
For more information please see the documentation built into https://github.com/ashblue/simple-tween-js/blob/master/tween.js
###Available Methods
###Easing Options You can choose from many different easing options for animationType: 'linear', 'quadIn', 'quadOut', 'quadInOut', 'cubeIn', 'cubeOut', 'cubeInOut', 'quartIn', 'quartOut', 'quartInOut', 'quintIn', 'quintOut', 'quintInOut', 'sineIn', 'sineOut', 'sineInOut', 'expoIn', 'expoOut', 'expoInOut', 'circIn', 'circOut', 'circInOut'
###How to make your tweens process faster The library here uses Date.now() to get the current time. If your JavaScript application already has a cached value of the current time, you can substitute all references to Date.now() with it.