GSAP - Timelines
Aus Wikizone
Version vom 8. April 2022, 13:13 Uhr von 134.3.74.15 (Diskussion) (Die Seite wurde neu angelegt: „ https://greensock.com/forums/topic/12643-master-timeline-and-the-use-of-functions/ == Master Timeline == Gutes Vorgehen für flexiblen Einsatz: <syntaxhighlig…“)
https://greensock.com/forums/topic/12643-master-timeline-and-the-use-of-functions/
Master Timeline
Gutes Vorgehen für flexiblen Einsatz:
function carMove(){
var tl = new TimelineMax();
tl.to("#car", 2, {x:"+=200"})
/* more tweens go here */
return tl;
}
function wheelsRotate(){
var tl = new TimelineMax();
tl.to("#wheels", 2, {rotation:"+=360"})
/* more tweens go here */
return tl;
}
masterTL
.add( carMove())
.add( wheelsRotate());