darkroomengineering / lenis

How smooth scroll should be
https://lenis.darkroom.engineering
MIT License
7.35k stars 315 forks source link

Infinite Scroll jumps #295

Closed joebentaylor1995 closed 4 months ago

joebentaylor1995 commented 4 months ago

Describe the bug When using the infinite: true option, the content loops indefinitely, but there is a notable jump of content vs it looking smooth.

To Reproduce Literally just add infinite: true to your lenis config.

Attached is an example of what is happening with my current code. Is there extra steps needed for lenis to calculate infinite scrolling properly?

https://github.com/studio-freight/lenis/assets/54585427/188e6c5f-ec1a-4dcd-8c48-966faee4ea37

clementroche commented 4 months ago

To have a seamless infinite list you need to duplicate your content and have it 100vh sized. Here is an example: https://codepen.io/ClementRoche/pen/OJqBLod

joebentaylor1995 commented 4 months ago

Hi, I have this and it still doesn't work, do you have any time free to take a look with me so I understand what I may be doing wrong?

I created the clone, but the jump still remains

joebentaylor1995 commented 4 months ago

I can add you to my repo if need be to look at what I'm doing if need be

clementroche commented 4 months ago

What is your email address @joebentaylor1995 ?

joebentaylor1995 commented 4 months ago

joebentaylor1995@icloud.com

clementroche commented 4 months ago

email sent