benoit Posted June 10, 2020 Share Posted June 10, 2020 Hi, I use a Yoyo wrap on a slide and may be if it's 0, return a 0 could be great But I am OK, if this is a good idea to return a NaN gsap.utils.wrapYoyo(0, 0, x ) Link to comment Share on other sites More sharing options...
ZachSaucier Posted June 10, 2020 Share Posted June 10, 2020 Hey benoit. Are you saying that if the same number is passed as both of the first parameters you want that number to be given instead of NaN? I suppose that makes sense but why do you need this? Can you please provide some background behind how this situation might occur? We don't want to needlessly add more conditional logic to the core. 1 Link to comment Share on other sites More sharing options...
benoit Posted June 10, 2020 Author Share Posted June 10, 2020 Just playing with math, design, shapes and an input range. I make many css transforms and I use wrap (yoyo). gsap.utils.wrapYoyo(0, 0 /* the value from my range between 0 and 100 */, x ) Return a NaN not sound like give me a wrap number between x and y. gsap.utils.random(0,0) // 0 ;¬) Just to make sense Link to comment Share on other sites More sharing options...
GreenSock Posted June 10, 2020 Share Posted June 10, 2020 This is fixed in the next release which you can preview at https://assets.codepen.io/16327/gsap-latest-beta.min.js Thanks for letting us know. 2 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