Jump to content
Search Community

Horizontal loop

blya test
Moderator Tag

Recommended Posts

Hello!

 

I have a question, below is an example of the scroll "roulette"
 

I have two questions:
1. Is it possible to do infinite scrolling, for example, it stopped at 100 (------->), the next number is 50 (<-------), and it should continue to scroll right (------>) and stop at 50, not left (<-------)


* -------> - this direction: D

 

2. Is it possible at each start to first do several iterations from start to finish (as when scrolling a wheel) and only after that stop at the desired number? At the moment, if we stand at 10 and select 11, the cursor will move slightly, but it is necessary that he first spins like crazy and only then stops :)

This library is amazing! 🔥

Thanks!

See the Pen vYGpYQj by blyaa (@blyaa) on CodePen

Link to comment
Share on other sites

Hey blya and welcome to the GreenSock forums.

 

31 minutes ago, blya said:

Is it possible to do infinite scrolling, for example, it stopped at 100 (------->), the next number is 50 (<-------), and it should continue to scroll right (------>) and stop at 50, not left (<-------)

Sure it is. Look into this technique:

 

32 minutes ago, blya said:

Is it possible at each start to first do several iterations from start to finish (as when scrolling a wheel) and only after that stop at the desired number? At the moment, if we stand at 10 and select 11, the cursor will move slightly, but it is necessary that he first spins like crazy and only then stops :)

Yep, once you have above implemented, you just have to add the distance of extra scroll that you want to go. So if you want it to go 2 extra loops then 2 * the width of the entire set is what you'd need.

 

If you're still having trouble I recommend using the search functionality in this forum to try and find related threads.

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