AntoineW / luge

Luge
290 stars 10 forks source link

To replace smooth scroll with Lenis #29

Closed clementroche closed 1 year ago

clementroche commented 2 years ago

This PR replace smooth scroll with Lenis and add docs for dev purpose. I left the old script commented in case i forgot some features. We can clean later if PR is accepted.

Breaking change: page doens't require a scroll container anymore, the data-lg-smooth has to be added to html element instead.

nicholasruggeri commented 1 year ago

Any change to get Lenis in the final release?

AntoineW commented 1 year ago

Hello, Unfortunately no, I'm not too sure about the way lenis handles scroll using a duration and easing function. I'm working on revamped version of luge SmoothScroll to integrate a simpler solution using a similar approach.

Though, would you be interested in using both luge and lenis?

nicholasruggeri commented 1 year ago

@AntoineW Yes, I'd like to use both. I think it's a good combo.

AntoineW commented 1 year ago

The smooth scroll has been updated to use window.scrollTo + virtual scroll technique.