New Animation Package

Hello,

I am happy to release the Animation package at last! http://smalltalkhub.com/#!/~ThibaultRaffaillac/Animation
This is a general animation system, which can turn any setter message into a smooth transition (provided the target value supports + and *Float).

Examples:
AnimationProperty new at: morph set: #position: to: 100@100 during: 2 seconds easing: #backOut.
AnimationProperty new at: morph set: #color: to: Color red during: 2 seconds easing: #linear.
AnimationProperty new at: morph set: #title: to: ‘tutututu’ during: 2 seconds easing: #linear.

Or equivalently (don’t choke):
morph position: (100@100 during: 2 seconds easing: #backOut).
morph color: (Color red during: 2 seconds).
morph title: (‘tutututu’ during: 2 seconds).

It basically sends the setter message repeatedly during the target delay, each time with a slightly different value. It should also work with Bloc, although the update mechanism depends on Morphic’s deferredUIMessage at the moment.

Cheers,
Thibault

ps: Thanks to anonymous contributor for the second syntax, it was a lot of fun – and evil laughs 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: