# tween.js
**Repository Path**: mirrors_ReneNyffenegger/tween.js
## Basic Information
- **Project Name**: tween.js
- **Description**: Javascript tweening engine
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-11-23
- **Last Updated**: 2026-07-05
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
tween.js
========
#### Javascript Tweening Engine ####
[](https://flattr.com/thing/45014/tween-js)
Super simple, fast and easy to use tweening engine which incorporates optimised Robert Penner's equations.
[Contributors](http://github.com/sole/tween.js/contributors)
### Examples ###
[](http://sole.github.com/tween.js/examples/07_dynamic_to.html)
[](http://sole.github.com/tween.js/examples/06_array_interpolation.html)
[](http://sole.github.com/tween.js/examples/05_video_and_time.html)
[](http://sole.github.com/tween.js/examples/04_simplest.html)
[](http://sole.github.com/tween.js/examples/03_graphs.html)
[](http://sole.github.com/tween.js/examples/02_black_and_red.html)
[](http://sole.github.com/tween.js/examples/01_bars.html)
[](http://sole.github.com/tween.js/examples/00_hello_world.html)
### Projects using tween.js ###
[](http://egraether.com/mine3d/)
[](http://ro.me)
[](http://data-arts.appspot.com/globe)
[](http://www.androidify.com/)
[](http://www.floweroscope.com/)
[](http://thewildernessdowntown.com/)
[](http://dejavis.org/linechart)
### Usage ###
Download the [minified library](http://github.com/sole/tween.js/raw/master/build/Tween.js) and include it in your html.
```html
```
The following code creates a Tween which will change the `x` attribute in a position variable, so that it goes from 50 to 400 in 2 seconds. The anonymous function set up with an interval will update the screen so that we can see something happening:
```html
```
Note: this corresponds to the example [04_simplest.html](http://sole.github.com/tween.js/examples/04_simplest.html) that you can find in the ```examples``` folder.
Have a look at that folder to discover more functionalities of the library!
Also, Jerome Etienne has written a [tutorial](http://learningthreejs.com/blog/2011/08/17/tweenjs-for-smooth-animation/) demonstrating how to use tween.js with three.js, and it's also great for understanding how tweens work!
### FAQ ###
**How do you set a tween to start after a while?**
Use the `delay()` method: `var t = new TWEEN.Tween({...}).delay(1000);`
**Is there a jQuery plug-in?**
No, we like to keep it simple and free of dependencies. Feel free to make one yourself, though! :-)
### Change log ###
2012 10 27 - **r7** (4,882 KB, gzip: 1,714 KB)
* Fixed start time of chained tweens when using custom timing. ([egraether](http://github.com/egraether))
* TWEEN.update() now returns a boolean (tweens pending or not). ([mrdoob](http://github.com/mrdoob))
* Added tween.onStart(). ([mrdoob](http://github.com/mrdoob))
* tween.chain() now accepts multiple tweens. ([mrdoob](http://github.com/mrdoob))
2012 04 10 - **r6** (4,707 KB, gzip: 1,630 KB)
* Returning instance also in `.chain()`. ([mrdoob](http://github.com/mrdoob))
* Refactoring and code clean up. ([egraether](http://github.com/egraether))
* Simplified easing formulas. ([infusion](http://github.com/infusion))
* Added support to arrays in `.to()` using linear, catmull-rom or bezier `.interpolation()`. ([egraether](http://github.com/egraether))
* Removed autostart/stop. ([mrdoob](http://github.com/mrdoob))
* Renamed `EaseNone`, `EaseIn`, `EaseOut` ane `EaseInOut`, to `None`, `In`, `Out` and `InOut`. ([mrdoob](http://github.com/mrdoob))
* Made `.to()` values dynamic. ([egraether](http://github.com/egraether) and [jeromeetienne](http://github.com/jeromeetienne))
2011 10 15 - **r5** (4,733 KB, gzip: 1,379 KB)
* Add autostart/stop functionalities ([jocafa](http://github.com/jocafa) and [sole](http://github.com/sole))
* Add 07_autostart example demonstrating the new functionalities ([sole](http://github.com/sole))
2011 10 15 - **r4**
* Use ``Date.now()`` instead of ``new Date.getTime()`` as it's faster ([mrdoob](http://github.com/mrdoob))
2011 09 30 - **r3**
* Added new ``time`` parameter to TWEEN.update, in order to allow synchronizing the tweens to an external timeline ([lechecacharro](http://github.com/lechecacharro))
* Added example to demonstrate the new synchronizing feature. ([sole](http://github.com/sole))
2011 06 18 - **r2**
* Added new utility methods getAll and removeAll for getting and removing all tweens ([Paul Lewis](http://github.com/paullewis))
2011 05 18 - **r1**
* Started using revision numbers in the build file
* Consider this kind of an stable revision :-)