Bloc Animations

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bloc Animations

Sean P. DeNigris
Administrator
I saw this on the Squeak ML [1] and wondered how/if this applies to Bloc…


marcel.taeumel wrote

> You can do a lot of stuff with plain morphs and stepping, too. In the
> Animations framework, the focus was on a more convenient programming
> interface that decouples system load and animation time. So, even if your
> Squeak image has plenty of things to do, the animation X will finish
> after, for example, 250 ms. Yet, you might only see the first and the last
> update then. :D In some way, the Animations framework is kind of Morphic
> stepping but it offers each participant a synchronized progression of
> time, which can then be used to update or interpolate the animation
> progress. Such things are difficult with Morphic stepping because the
> "call me again in 20 ms" via #stepTime treats time different for each
> morph.

1. http://forum.world.st/Fun-with-Animations-tp5029046p5030234.html



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html

Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Bloc Animations

Aliaksei Syrel
Hi Sean,

In Bloc it is exactly as described in the forwarded email. There is no #step, instead everything is handled using a single unified concept of "Animation.
Consider the following example of animated translation:

element := BlElement new
   background: (BlBackground paint: Color blue);
   size: 100 @ 100;
   relocate: 100 @ 100.

(BlTransformAnimation translate: 200 @ 200)
   easing: BlEasing bounceOut;
   duration: 2 seconds;
   startOn: element. 

element

Note, that duration is actually defined as Duration.
Example above will finish after 2 seconds regardless of how many frames actually passed.

Cheers,
Alex

On 26 November 2017 at 00:02, Sean P. DeNigris <[hidden email]> wrote:
I saw this on the Squeak ML [1] and wondered how/if this applies to Bloc…


marcel.taeumel wrote
> You can do a lot of stuff with plain morphs and stepping, too. In the
> Animations framework, the focus was on a more convenient programming
> interface that decouples system load and animation time. So, even if your
> Squeak image has plenty of things to do, the animation X will finish
> after, for example, 250 ms. Yet, you might only see the first and the last
> update then. :D In some way, the Animations framework is kind of Morphic
> stepping but it offers each participant a synchronized progression of
> time, which can then be used to update or interpolate the animation
> progress. Such things are difficult with Morphic stepping because the
> "call me again in 20 ms" via #stepTime treats time different for each
> morph.

1. http://forum.world.st/Fun-with-Animations-tp5029046p5030234.html



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html


Reply | Threaded
Open this post in threaded view
|

Re: Bloc Animations

Stephane Ducasse-3
And this is cool because your animation is not dependent on the machine speed
Of course a faster machine means smoother animation not shorter one :)

On Sun, Nov 26, 2017 at 12:13 AM, Aliaksei Syrel <[hidden email]> wrote:

> Hi Sean,
>
> In Bloc it is exactly as described in the forwarded email. There is no
> #step, instead everything is handled using a single unified concept of
> "Animation.
> Consider the following example of animated translation:
>
>> element := BlElement new
>>    background: (BlBackground paint: Color blue);
>>    size: 100 @ 100;
>>    relocate: 100 @ 100.
>>
>> (BlTransformAnimation translate: 200 @ 200)
>>    easing: BlEasing bounceOut;
>>    duration: 2 seconds;
>>    startOn: element.
>>
>>
>> element
>
>
> Note, that duration is actually defined as Duration.
> Example above will finish after 2 seconds regardless of how many frames
> actually passed.
>
> Cheers,
> Alex
>
> On 26 November 2017 at 00:02, Sean P. DeNigris <[hidden email]>
> wrote:
>>
>> I saw this on the Squeak ML [1] and wondered how/if this applies to Bloc…
>>
>>
>> marcel.taeumel wrote
>> > You can do a lot of stuff with plain morphs and stepping, too. In the
>> > Animations framework, the focus was on a more convenient programming
>> > interface that decouples system load and animation time. So, even if
>> > your
>> > Squeak image has plenty of things to do, the animation X will finish
>> > after, for example, 250 ms. Yet, you might only see the first and the
>> > last
>> > update then. :D In some way, the Animations framework is kind of Morphic
>> > stepping but it offers each participant a synchronized progression of
>> > time, which can then be used to update or interpolate the animation
>> > progress. Such things are difficult with Morphic stepping because the
>> > "call me again in 20 ms" via #stepTime treats time different for each
>> > morph.
>>
>> 1. http://forum.world.st/Fun-with-Animations-tp5029046p5030234.html
>>
>>
>>
>> -----
>> Cheers,
>> Sean
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
>>
>