Search In
• More options...
Find results that contain...
Find results in...

# timeline Horizontal loop

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

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