chrisi51 Posted November 26, 2020 Share Posted November 26, 2020 i try to move all dots randomly started and randomly reversed along the given path from their origin position on ... so its looking like fireflys. For any reason it seems to stuck randomly for some of them. See the Pen MWjWEEK by chrisi51 (@chrisi51) on CodePen Link to comment Share on other sites More sharing options...
chrisi51 Posted November 26, 2020 Author Share Posted November 26, 2020 omg ... i just got a lightning in my head ... it seems like, start/end is not allowed to be like 0.5363453245 instead of 0.53 ... if i round the random value it seems to work. Is this a bug or intended? Link to comment Share on other sites More sharing options...
GreenSock Posted November 27, 2020 Share Posted November 27, 2020 Yes, that does appear to be a bug. I'll look into it, but a workaround is to make sure it's not EXACTLY 1 between the start and end values (offset it by at least 0.0001). 1 Link to comment Share on other sites More sharing options...
chrisi51 Posted November 27, 2020 Author Share Posted November 27, 2020 2 minutes ago, GreenSock said: Yes, that does appear to be a bug. I'll look into it, but a workaround is to make sure it's not EXACTLY 1 between the start and end values (offset it by at least 0.0001). mhh ok ... both seem to work: offset of 0.001 to end var random_start = Math.random(); var random_end = random_start + ((Math.random() <= 0.5) ? 1.001 : -1.001); or rounded start var randomstart = Math.round(Math.random() * 10) / 10; var random_end =random_start + ((Math.random() <= 0.5) ? 1 : -1); Link to comment Share on other sites More sharing options...
Solution GreenSock Posted November 27, 2020 Solution Share Posted November 27, 2020 I believe this is fixed in the upcoming release which you can preview at https://assets.codepen.io/16327/MotionPathPlugin.min.js Better? 2 Link to comment Share on other sites More sharing options...
chrisi51 Posted December 4, 2020 Author Share Posted December 4, 2020 On 11/27/2020 at 9:22 PM, GreenSock said: I believe this is fixed in the upcoming release which you can preview at https://assets.codepen.io/16327/MotionPathPlugin.min.js Better? Yep, with this version i don't need to apply any further check ... can just use it as it was intended by me sorry for the late reply 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