jaden Posted August 27, 2020 Share Posted August 27, 2020 Well title says the whole question. If I use power3.out for example it doesnt happen. What is it and can we work around it without changing ease? See the Pen JjXNvbo by jadenjaden (@jadenjaden) on CodePen 1 Link to comment Share on other sites More sharing options...
PointC Posted August 27, 2020 Share Posted August 27, 2020 hmmm... Not sure what's causing that. @GreenSock will probably have to take a look. Here's the same thing using a custom ease. I just used the ease visualizer to pick expo and then switched to custom so i could copy the data. No other changes made to it. See the Pen 19a3312f4763c4256a7a1a0b843992be by PointC (@PointC) on CodePen 1 Link to comment Share on other sites More sharing options...
jaden Posted August 27, 2020 Author Share Posted August 27, 2020 2 minutes ago, PointC said: hmmm... Not sure what's causing that. @GreenSock will probably have to take a look. Here's the same thing using a custom ease. I just used the ease visualizer to pick expo and then switched to custom so i could copy the data. No other changes made to it. See the Pen See the Pen 19a3312f4763c4256a7a1a0b843992be by PointC (@PointC) on CodePen by PointC (@PointC) on CodePen Alright. I'm happy with other eases, just was wondering if I was doing something wrong Link to comment Share on other sites More sharing options...
PointC Posted August 27, 2020 Share Posted August 27, 2020 13 minutes ago, jaden said: just was wondering if I was doing something wrong Not as far as I can tell. I haven't used an expo ease in a long time, but Jack will give us more answers on this one. 1 Link to comment Share on other sites More sharing options...
GreenSock Posted August 27, 2020 Share Posted August 27, 2020 Yeah, that's just an anomaly due to the inherent inaccuracy of the math: let easeIn = p => p ? 2 ** (10 * (p - 1)) : 0, easeOut = p => 1 - easeIn(1 - p), unsafeIn = p => 2 ** (10 * (p - 1)), unsafeOut = p => 1 - unsafeIn(1 - p); console.log("safe:", easeOut(1), "vs unsafe:", unsafeOut(1)); // safe: 1 vs unsafe: 0.9990234375 It's essential that an easing function converts 1 (the completion value) to exactly 1, otherwise your animation won't quite reach the final values. Notice that first "easeIn" has some conditional logic to check if "p" is non-zero. There's the key. If we remove that, you'll get rid of the "jump" at the end, but you'll sacrifice accuracy because your end value won't be correct. See what I mean? My suggestion would be to avoid Expo. Power4 is almost the same anyway - I'd go with that. A CustomEase is fine too of course. 4 Link to comment Share on other sites More sharing options...
ZachSaucier Posted August 28, 2020 Share Posted August 28, 2020 3 hours ago, GreenSock said: My suggestion would be to avoid Expo. Power4 is almost the same anyway I always thought they were the same. TIL. 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