Jump to content
Search Community

Random values on each timeline repeat

gareth test
Moderator Tag

Recommended Posts

Hey @gareth

 

repeatRefresh might be what you're looking for

 

See the Pen 7bc9f4a88180f4a147869a0e8f7e6153 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)

  • Like 6
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...