chapolote
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by chapolote
-
-
I want a timeline which sets an element on repeat in different positions.
What I did is to set variables to a random start- and end-value for y-position and use this values in my timeline. In my timeline I set the start-point of the element, then the element moves to right, then it's positioned to another random y-value as end-position and then it moves back left. On repeat of the timeline, I call a function which sets the variables of my start- and end-position on a new random value.
But it seems as on repeat always the initial definitions of my variables are used and not the new calculated values. How can I achieve, that the new calcuated values of my variables are used in my timeline?
See the Pen PEbjdJ by chapolote (@chapolote) on CodePen
TimelineMax - change values on repeat
in GSAP
Posted
Great, that's it
Thank you and merry X-Mas