Share Posted January 24, 2020 Hi, I have a spin to wheel animation which I found elsewhere on this forum. My use case is a bit different though as I would like to keep the wheel spinning while I make a request to a server which will tell me which slice the animation should land on and then manually stop the wheel but slowly. The issue is my animations end up being choppy since I am changing the easing functions. Any tips anyone might have to make this work smoothly would really be appreciated. See the Pen dyPrprM by eni9889 (@eni9889) on CodePen Link to comment Share on other sites More sharing options...
Share Posted January 24, 2020 Track velocity using inertia plugin , then tween to end value using inertia plugin. I am using GSAP 3 in new demo, using getProperty in place of _gsTransform. See the Pen povYRpN?editors=0010 by Sahil89 (@Sahil89) on CodePen 2 Link to comment Share on other sites More sharing options...
Author Share Posted January 24, 2020 This is pretty amazing! Sorry to be a pest but how would I add an easing function so the wheel doesn’t start abruptly? Link to comment Share on other sites More sharing options...
Share Posted January 24, 2020 You could keep the timeline paused initially and timescale it when the button is clicked: See the Pen KKwEWwv?editors=0010 by GreenSock (@GreenSock) on CodePen 3 Link to comment Share on other sites More sharing options...
Author Share Posted January 24, 2020 Wow you guys are amazing thank you this is perfect. 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