panamera Posted September 30, 2021 Share Posted September 30, 2021 Hello everyone, I would like to recreate this animation. There are 2 banners that move in loop always from left to right. See here: https://ava-digital.ru/ It would be nice that the animation could change depending on the scroll direction. Does anyone have an idea how I can implement this? Thanks Link to comment Share on other sites More sharing options...
OSUblake Posted September 30, 2021 Share Posted September 30, 2021 Welcome to the forums @panamera Check out our loop helper function. https://greensock.com/docs/v3/HelperFunctions#loop Once you get that setup, you should be able to animate the direction change using ScrollTrigger. Some psuedo code... let loop = horizontalLoop(myElements, { paused: false, repeat: -1 }); ScrollTrigger.create({ onUpdate({ direction }) { gsap.to(loop, { timeScale: direction }); } }); 3 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