Monday, February 2, 2009

GTween Beta 5 Released

GTween Beta 5 has been released! While on some AS3 projects, I was using TweenMax which is also another great tween library. GTween uses a different approach, keeping your code small. The way I see it, GTween is great for integrating into an existing library or a project with size requirements such as a banner ad. TweenMax is better for those of you who want a quick and dirty turnaround with less coding.

The GTween Class is only 4.5kb and runs 3,000 tween instances at about 37fps. Whereas TweenLite with fast transform is about 24fps and is about 2.8kb (5kb with default plugins).

GTween (4.5kb)
Throw in the target, target properties and tween properties and watch your object animate.

var myTween:GTween = new GTween(myTarget, duration, targetProperties, tweenProperties);


GTweenFilter (0.5kb)
This one I wasn't too excited about, being used to the TweenMax filter control, but do see the purpose. The problem I had was that you must manually add in the filters to your object. Then use GTweenFilter to tween a specified filter from your object's filter array. I got so used to just poping in a dropShadowFilter param alongside an x and y param to create a box that added a shadow as it moved from point A to point B. In GTween, to do this you must call two tweens, one for your object attributes (GTween), and the second for the filter attributes (GTweenFilter). Why this can be good? One, you can substitute GTween for GTweeny and still use GTweenFilter with it. Two, a bit more control and efficiency.

GTweenTimeline (1kb)
This is what makes GTween so attractive. It creates a virtual timeline of your tweens. You can pause, rewind, or jump to a specified point in the timeline.

GTweeny (3kb)
A lighter, stripped down version of GTween. GTweeny can be used for those projects with either simple animations or projects with restricted size requirements.

0 comments: