Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.82k stars 821 forks source link

Timelines - Tween containers #914

Open b005t3r opened 7 years ago

b005t3r commented 7 years ago

Chaining multiple tweens, so each one starts after the previous one finished is currently quite fiddly - you basically have to start a new tween from the old one's onComplete handler - not very convenient. It's also currently impossible to create a more complex animations/sequences and play them back and forth, change their transition, etc.

My proposition is to introduce a container class for storing tweens (and other containers) - a Timeline class. They have something like that in this Java lib: http://www.aurelienribon.com/blog/projects/universal-tween-engine/

It's really a must have if you plan to do any more complex animations, so I think this would make a great addition to Starling's tweens.

pSi-X commented 7 years ago

Look at https://github.com/mayakwd/as3-eaze-tween

b005t3r commented 7 years ago

Yeah, but the problem is this is not a part of Starling and Starling's tweening engine is already pretty solid, it just needs timelines.

PrimaryFeather commented 7 years ago

Thanks for the suggestion! I can totally see the sense in that. Anybody who wants do see this, please vote!

BTW, just for reference: it's by far not as elaborate, but there actually is a way you can chain tweens together in the current API: via Tween.nextTween.

b005t3r commented 7 years ago

Tween.nextTween() is OK, but it's not as functional as timelines. It's, for instance, much more inconvenient to pause a complex animation created with nextTweens than to pause a timeline-based one.

If you need any more references, I created something like that some time ago (based on your Tweens), but it's still inconvenient to use, if it's not a part of Starling:

https://github.com/b005t3r/Stork-Extension-Tween/blob/master/extension/src/stork/tween/TimelineNode.as

PrimaryFeather commented 7 years ago

Thanks, I will definitely take a look at that! :smile:

denisgl7 commented 6 years ago

vote!

denisgl7 commented 6 years ago

Daniel Do you consider adding this function in the future?

PrimaryFeather commented 6 years ago

I'm definitely considering that, yes! I can totally see the use of it. As for the priority — anyone, please just keep voting! :smile:

naderalbes commented 6 years ago

vote vote

VladimirCores commented 6 years ago

Any update on Tween Timeline, executing multiple tweens in a sequence?

PrimaryFeather commented 6 years ago

Not yet, sorry! But I'll take this as a "vote"! :wink:

jimmymjing commented 5 years ago

here's my vote! Currently I just have to use TimelineMax...

Shaunmax commented 4 years ago

Vote Vote Vote!

Mintonist commented 3 years ago

Vote!)

chachawu commented 3 years ago

vote!

Adolio commented 3 years ago

+1

denisgl7 commented 3 years ago

Vote