Hello,
I would like to set elements from an array to random x and y, move them to a new random x and y position and finally have them go back to their recorded first x and y position. The following doesn't work because there is a jump between the last two tweens:
var myArray = [{x:10,y:10},{x:10,y:55},{x:10,y:100}];
var tl = gsap.timeline()
tl.set(myArray,{x:"random(20,280)", y:"random(20,230)"})
tl.to(myArray,{x:"random(20,280)", y:"random(20,230)", duration:5})
tl.from(myArray,{x:"random(20,280)", y:"random(20,230)", duration:3})
How can I do that? Is there a better approach?
Thank you,
fred