Jump to content
Search Community

Need help for editing horizontalLoop() to become non-loop

kenstephoang

Go to solution Solved by Rodrigo,

Recommended Posts

Posted

Hi everyone,

 

I can understand how horizontalLoop function works and applied it to my project, but it's hard for me now to change it into a non-loop with these behaviors:

  • When we drag the divs beyond the edges, we will add some resistance so that drag will become harder
  • When we release the mouse while dragging beyond the edges, the divs will return to their positions

So can anyone help me change the horizontalLoop function or should I use another function with a different approach?

 

Thank you!

See the Pen gOvvJee by GreenSock (@GreenSock) on CodePen.

Posted

It's not about the "throwResistance" because it's applied while dragging beyond the edges. But I think first we need to change it to non-loop. To archive that I think I need to edit the function populateTimeline(), I just found gsap 1 week ago, I keep trying but still hard for me now :(:(

Posted
5 hours ago, Rodrigo said:

Hi,

 

Maybe these demos can help getting started:

 

 

 

 

 

 

Hopefully this helps

Happy Tweening!

Follow these & others' basic examples and I can create a non-loop carousel of my own with a simple approach

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