openfl / actuate

Actuate is a flexible, fast "tween" library for animations in Haxe
MIT License
157 stars 66 forks source link

Reverse should be applied instantly in the frame it's called #41

Open AbelToy opened 10 years ago

AbelToy commented 10 years ago

If I have an element and add a tween with alpha to 0 and then reverse it so it goes from 0 to 1, the first frame it will be visible and then it will actually hide (alpha 0) in the next frame.

The expected behaviour is that it should be alpha 0 from the moment reverse is called.

Thanks!

Tiago-Ling commented 10 years ago

+1 for this.

It would allow the same behavior as the tween type "from" in Greensock's animation framework (as3).

My current workaround for this is to set the visibility of the target object as false and use an Actuate.Timer with 0.1 duration to set the object as visible again after the tween started. This prevents the object from "blinking" from its original location to the final reversed location when using reverse().

So, if i understand Abel's use case, Actuate should apply the properties to its target before starting the tween when using the reverse() mode.

Tiago Ling Alexandre Tel: +55 41 8819-3191

2014-09-04 17:26 GMT-03:00 Abel Toy notifications@github.com:

If I have an element and add a tween with alpha to 0 and then reverse it so it goes from 0 to 1, the first frame it will be visible and then it will actually hide (alpha 0) in the next frame.

The expected behaviour is that it should be alpha 0 from the moment reverse is called.

Thanks!

— Reply to this email directly or view it on GitHub https://github.com/openfl/actuate/issues/41.

AbelToy commented 10 years ago

Exactly.

Also, +1 for just adding a "from()" method that automatically calls tween and reverse.