pietM Posted June 13, 2020 Share Posted June 13, 2020 Hi everyone, Another simple question from a newbie. How do I write a simple function to reset the random colors values for the enclosed. I appreciate your help! M See the Pen yLeJaBr by euqio (@euqio) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted June 13, 2020 Share Posted June 13, 2020 Hey piet. You can just set repeatRefresh: true on the timeline and it will have new random values every time. However, that creates an issue because you use a .from opacity of 0 but after the first iteration the opacity is 0 so it animates from and to 0, keeping the elements hidden. There are several ways to fix that, a simple one is to use a fromTo: See the Pen VwejKpM?editors=0010 by GreenSock (@GreenSock) on CodePen 3 Link to comment Share on other sites More sharing options...
pietM Posted June 13, 2020 Author Share Posted June 13, 2020 Perfect, Zach. Thanks again! Support from you and this community is truly exceptional. Thank you! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now