Share Posted February 7 Hello again! I need an extra help I've been working on a solution to make animations on a scrolltrigger play automatically, at the user's will. I've got it to work but I'm not 100% sure it's the best solution! I don't know if there is something already thought and developed about it. Thanks in advance. See the Pen wvxQzqa by juanadie (@juanadie) on CodePen Link to comment Share on other sites More sharing options...
Share Posted February 7 Hi, I think you're using the worst possible approach for this. I don't mean it in a critical way though, just in the fact that it doesn't look really good. At least in my system (Ubuntu 20 and 22) in Firefox and Chrome it looks choppy and jumpy, not great UX IMHO. I've been fiddling a bit with your example and is not a simple thing to solve as there are a few things to consider. I'll try to circle back to this later and see if I can provide a better and more robust approach, since there are a few moving parts that you need to consider, not just the mouse wheel. I think a good starting point would be to create a global ScrollTrigger instance in the document element and use that and a delayed call to restart the auto scroll functionality. As I mentioned this is not the simplest thing to achieve and while your current approach kind of works right now is not robust enough IMHO. Happy Tweening! Link to comment Share on other sites More sharing options...
Author Share Posted February 7 Hello!! OKAY! Thanks for your time. Yes, I already imagined that it was not well focused... Thank you! 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