Share Posted July 18 Hi, I'm trying to implement the fake horizontal scroll with some elements lerping. I've pretty much just merged the two scroll trigger demos. At times it works perfectly, but then seems to lose all lerping functionality, especially when passing the end trigger. Any help is appreciated. Thanks. See the Pen gOegNvP by dominiclgit (@dominiclgit) on CodePen 1 Link to comment Share on other sites More sharing options...
Share Posted July 18 Hey there! Sorry, but I'm a bit confused about what you're trying to do. Can you link to the demos you've 'merged' Thanks! Link to comment Share on other sites More sharing options...
Author Share Posted July 18 Sure these are the two demos which I took code from. Horizontal scroll See the Pen YzygYvM by GreenSock (@GreenSock) on CodePen Lerping See the Pen wvMeNee by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
Solution Solution Share Posted July 19 Are you looking for something like this?: See the Pen poLePrv?editors=0010 by GreenSock (@GreenSock) on CodePen The code could be simplified. The new-ish gsap.quickTo() is useful here. One of the main issues with your demo was actually an order-of-operation thing where your ScrollTrigger's onUpdate was firing BEFORE the scrub tween had a chance to render, and you circumvented that render by invalidating the tween and restarting it, so it wouldn't actually kick in until the containerAnimation stopped moving (stopped hijacking those renders). 2 1 Link to comment Share on other sites More sharing options...
Author Share Posted July 19 Yep that is exactly what I'm look for. Thanks for all your help! 1 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