WARNING:
This is an old project that is no longer developed.
--
I wrote a small animation framework today (56kb signed). It uses Robert Penner's
easing equations for the tweens.
Project Home
http://code.google.com/p/slickfx/
SVN
http://slickfx.googlecode.com/svn/trunk/slickfx/src/
JavaDoc
http://slickfx.googlecode.com/svn/trunk ... index.html
Download
Contains source, slickfx.jar, slickfx-test.jar and javadoc.
http://code.google.com/p/slickfx/downloads/list
How do I use it?
- Define your "entity" (such as a button widget) by implementing the desired FxEntity interfaces, or all of them for full compatibility.
- Set up a timeline (or multiple timelines) for your entity and add some "Fx" for animation. So far you can use: SizeFx, LocationFx, AlphaFx, EmptyFx (delay) and CompoundFx -- or you can make your own Fx. Don't forget to update the timeline!
- Start the timeline with setActive(true). Sit back and watch as it animates gracefully through the set of Fx's you've added!
See documentation and tests for details.
Webstart: Test Smooth UI
A main menu mockup with some neato animations. Design influenced by
Turborilla.
Webstart: Test Fx
Tests the "Fx" helpers (for fading, resizing, moving, etc).
Webstart: Test Easing
Tests the raw easing equations independent of the Fx/Timeline classes.
Webstart: Test CompoundFx
Tests a CompoundFx, which allows you to merge two (or more) Fx into a single animation.
Stripping it Down
SlickFx is pretty small right now, but it can get a bit smaller. You can remove the "mdes.slick.animation.entity.renderable" package if you don't need that functionality (used for fading Slick Images/Animations). You can also pick and choose which entity/Fx helpers you need for your project.
The bulk of the code is contained in the Easing class. Most applications only need a few specific Easings that are repeated throughout. Once you find the Easings that suit your needs, you can strip out the rest.
Planned Fx:
ColorFx (one color to another)
GrowFx (like Rectangle.grow)
Issues:
- Current version uses "ticks" instead of an accurate timer.
- Timeline.fastForward is bugged and has been left out of the current version.
- Needs some more documentation and guides for using the Fx classes.