Share Posted November 29, 2020 Is it possible to refresh random values on every repeat of a timeline? I have the the random values on each tween creation, but it just loops the same values. See the Pen BaLyqbb by garethj (@garethj) on CodePen Link to post Share on other sites
Share Posted November 29, 2020 Hey @gareth repeatRefresh might be what you're looking for See the Pen wvzBYLb by akapowl (@akapowl) on CodePen repeatRefresh Setting repeatRefresh: true causes a repeating timeline to invalidate() all of its child tweens and re-record their starting/ending values internally on each full iteration (not including yoyo's). This is useful when you use dynamic values (relative, random, or function-based). For example, x: "random(-100, 100)" would get a new random x value on each repeat. duration, delay, and stagger do NOT refresh. (from the docs) 4 Link to post Share on other sites
Author Share Posted November 29, 2020 ok wow, so simple - thank you ! 1 Link to post Share on other sites
Share Posted November 29, 2020 Hey @gareth, ... and a loop for the duration: duration, delay, and stagger do NOT refresh. See the Pen OJRPaPG?editors=1010 by mikeK (@mikeK) on CodePen Happy looping ... Mikel 3 Link to post Share on other sites