The Universal Tween Engine is a free and open-source utility that enables the interpolation of every attribute from any object in any Java project (being Swing, OpenGL, SWT or even Console-based).
Implement the TweenAccessor interface, register it to the engine, and animate anything you want.
In one line, send your objects to another position (here x=20 and y=30), with a smooth elastic transition, during 1 second (1000ms).
Detailed instructions on how to install and use the Universal Tween Engine utility on your Mac are available HERE.
Here are some key features of "Universal Tween Engine":
· Supports every interpolation function defined by Robert Penner: http://www.robertpenner.com/easing/
· Can be used with any object. You just have to implement the TweenAccessor interface when you want interpolation capacities.
· Every attribute can be interpolated. The only requirement is that what you want to interpolate can be represented as a float number.
· One line is sufficient to create and start a simple interpolation.
· Delays can be specified, to trigger the interpolation only after some time.
· Many callbacks can be specified (when tweens complete, start, end, etc.).
· Tweens and Timelines are pooled by default. If enabled, there won't be any object allocation during runtime! You can safely use it in Android game development without fearing the garbage collector.
· Tweens can be sequenced when used in Timelines.
· Tweens can act on more than one value at a time, so a single tween can change the whole position (X and Y) of a sprite for instance !
· Tweens and Timelines can be repeated, with a yoyo style option.
· Simple timers can be built with Tween.call().
· Source code extensively documented!
What's New in This Release: [ read full changelog ]
· Zero allocation! Use the engine safely in Android!
· Very robust engine, shouldn't lost a single millisecond in updates.
· You can now apply tweens directly on your objects, there is no need that they implement some interface!
· As a result, the Tweenable interface is no more. It has been replaced by a TweenAccessor that can be registered statically to the engine.
· Repetitions can now be played in 'yoyo' mode: every odd iteration is played backwards.
· Callbacks were all changed, you have BEGIN, START, END, COMPLETE, and similar ones for backwards playing.
· TweenGroup is no more: welcome 'Timeline'.
· Timelines can be repeated, yoyo style too.
· Nested timelines can be repeated too!
· Timelines now support callbacks! And all the callbacks used in Tween are working in Tiemlines!
· Several protections were added to prevent you from misusing the engine.
· Extensive javadoc was added to every public classes and methods!