Jump to content
Search Community

How to add scroll to horizontalLoop helper?

bleep test
Moderator Tag

Recommended Posts

Hi, I'm trying to edit a GSAP example called horizontalLoop()

I would like to add a scroll listener so that when you scroll up or down anywhere inside the .wrapper, it makes the carousel go left or right, infinitely.

I'd like it to have some lerp or inertia on scroll, and I don't need snapping.

 

What method would you recommend to do this?

 

Side note: the horizontalLoop() official GSAP example sometimes goes crazy with drag velocity going extremely high all of a sudden. Has there been an update on this GSAP example where it doesn't do this? (It does it on my CodePen too)

See the Pen OJdqEVB by bleepbleep (@bleepbleep) on CodePen

Link to comment
Share on other sites

  • 2 weeks later...

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...