PrimaryFeather/Starling-Framework — Issue #57: Tween API improvements
Author: elsassph
Created: 2011-12-07 10:17:00+00:00
State: open

Tween methods currently all return void and require to write lots of code for simple things.

That's a big missed opportunity to allow chaining for cheap by just returning the tween instance, so your Tween example could look like:

new Tween(object, 2.0, Transitions.EASE_IN_OUT)
.animate("x", object.x + 50)
.animate("rotation", deg2rad(45))
.fadeTo(0) // equivalent to 'animate("alpha", 0)'
.run(); // equivalent to Starling.juggler.add(tween);

Add a static helper and you have an all modern API:
Tween.select(object, 2.0, Transitions.EASE_IN_OUT).fadeTo(1).run();