Hey, nice. I need to have look inside the code to also get the evil laugh thing. Let's get moving. Phil On Wed, Nov 23, 2016 at 11:49 AM, Thibault Raffaillac < thibault.raffaillac@inria.fr> wrote:
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 :)