Jump to content
Search Community

Banner Animation in Loop

panamera test
Moderator Tag

Recommended Posts

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

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
    });
  }
});

 

  • Like 3
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...