From c3d4ef08c998d848e724d5d2da85655d8bb287e5 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Sat, 27 Oct 2012 11:50:09 +0200 Subject: [PATCH] r7 --- README.md | 10 +++++++++- build/tween.min.js | 6 +++--- examples/01_bars.html | 2 +- examples/02_black_and_red.html | 2 +- examples/js/{Stats.js => stats.min.js} | 6 +++--- src/Tween.js | 4 ++-- utils/builder.py | 6 ++++-- utils/compiler/README | 14 +++++++------- utils/compiler/compiler.jar | Bin 5378434 -> 5856710 bytes 9 files changed, 30 insertions(+), 20 deletions(-) rename examples/js/{Stats.js => stats.min.js} (51%) diff --git a/README.md b/README.md index dd56547..8b155a3 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Super simple, fast and easy to use tweening engine which incorporates optimised 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: @@ -94,6 +94,14 @@ No, we like to keep it simple and free of dependencies. Feel free to make one yo ### 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)) diff --git a/build/tween.min.js b/build/tween.min.js index 9292497..90a4463 100644 --- a/build/tween.min.js +++ b/build/tween.min.js @@ -1,7 +1,7 @@ // tween.js - http://github.com/sole/tween.js -var TWEEN=TWEEN||function(){var a=[];return{REVISION:"7dev",getAll:function(){return a},removeAll:function(){a=[]},add:function(c){a.push(c)},remove:function(c){c=a.indexOf(c);-1!==c&&a.splice(c,1)},update:function(c){if(0===a.length)return!1;for(var b=0,d=a.length,c=void 0!==c?c:Date.now();b(a*=2)?0.5*a*a:-0.5*(--a*(a-2)-1)}},Cubic:{In:function(a){return a*a*a},Out:function(a){return--a*a*a+1},InOut:function(a){return 1>(a*=2)?0.5*a*a*a:0.5*((a-=2)*a*a+2)}},Quartic:{In:function(a){return a*a*a*a},Out:function(a){return 1- --a*a*a*a},InOut:function(a){return 1>(a*=2)?0.5*a*a*a*a:-0.5*((a-=2)*a*a*a-2)}},Quintic:{In:function(a){return a*a*a* a*a},Out:function(a){return--a*a*a*a*a+1},InOut:function(a){return 1>(a*=2)?0.5*a*a*a*a*a:0.5*((a-=2)*a*a*a*a+2)}},Sinusoidal:{In:function(a){return 1-Math.cos(a*Math.PI/2)},Out:function(a){return Math.sin(a*Math.PI/2)},InOut:function(a){return 0.5*(1-Math.cos(Math.PI*a))}},Exponential:{In:function(a){return 0===a?0:Math.pow(1024,a-1)},Out:function(a){return 1===a?1:1-Math.pow(2,-10*a)},InOut:function(a){return 0===a?0:1===a?1:1>(a*=2)?0.5*Math.pow(1024,a-1):0.5*(-Math.pow(2,-10*(a-1))+2)}},Circular:{In:function(a){return 1- diff --git a/examples/01_bars.html b/examples/01_bars.html index 34723b0..a7719a3 100644 --- a/examples/01_bars.html +++ b/examples/01_bars.html @@ -14,8 +14,8 @@
+ - + -