On Oct 16, 2013, at 5:16 PM, Alexandre Bergel <alexandre.bergel(a)me.com> wrote:
Hi Uko,
I've just committed a new version of Roassal that contains a class ROTimelyAnimation.
On some point, all the animations should be a subclass of that class.
I have also produced ROLinearMoveT and ROPluggableAnimationT as you seems to need it. You
are very welcome to contribute to it to fit your need.
Some usage:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| view el |
view := ROView new.
el := (ROBox blue size: 30) element.
view add: el.
ROLinearMoveT new for: el to: 200 @ 60 during: 500.
view open.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| view el |
view := ROView new.
el := (ROBox blue size: 30) element.
view add: el.
ROPluggableAnimationT new
block: [ :animation | el translateTo: (animation elapsedTimeNormalized * 500) @ 0 ];
duration: 2000;
on: view.
view open.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
As you can see, you provide a duration in milliseconds. I have also used #cull: as you
suggested. This is indeed a good point.
The important point of these animations, is that are based on the elapsed time.
#elapsedTimeNormalized returns a value between 0.0 and 1.0. If 1.0, the animation has
ended. I took these ideas form Igor's Viva.
Cheers,
Alexandre
On Oct 16, 2013, at 8:39 AM, Yuriy Tymchuk <yuriy.tymchuk(a)me.com> wrote:
Hi,
what do you thing about replacing ROPluggableAnimation's>>doStep
`block value`
with
`block cull: self elapsedCycles`?
Because this way you can have a block hooked to the number of cycle.
Cheers.
Uko
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch