You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Tween class is doing a lot. Maybe it is starting to grow out of scope for what a Tween is. For example, we can chain, yoyo, repeat tweens, etc. Maybe it would be better to have a cleaner separation of concerns and introduce a new Timeline class (maybe convert Group with Timeline) that would be generally more robust for this.
What could this Timeline API looks like? How would Tween play with Timeline? Perhaps Tweens are added to Timelines.
consttrack1=newSequence([newEmpty(300),newTween(mesh.rotation).to(...,1000),newTween(mesh.position).delay(500).to(...,1000),])consttrack2=newTween(otherThing).to(2000)consttimeline=newTimeline([// parallel// tracks for the timelinetrack1,track2])constanim=newAnimation([timeline]).start()// start/stop/repeat/etc similar to current Tween perhapsrequestAnimationFrame(functionloop(){anim.update()requestAnimationFrame(loop)})consttimeline2=newTimeline([timeline,// this timelinenewTween(...).to(...),// will play in parallel to this tween])constanim2=newAnimation([timeline2])// etc
The text was updated successfully, but these errors were encountered:
The
Tween
class is doing a lot. Maybe it is starting to grow out of scope for what a Tween is. For example, we canchain
,yoyo
,repeat
tweens, etc. Maybe it would be better to have a cleaner separation of concerns and introduce a newTimeline
class (maybe convertGroup
withTimeline
) that would be generally more robust for this.What could this
Timeline
API looks like? How wouldTween
play withTimeline
? PerhapsTweens
are added toTimelines
.This comment has some ideas: #560 (comment)
Food for thought:
The text was updated successfully, but these errors were encountered: