MilkshakeStudio / nuxt-lenis

Nuxt adaptation for @darkroomengineering/lenis
https://github.com/darkroomengineering/lenis
30 stars 4 forks source link

GSAP ScrollTrigger integration still required? #2

Closed LucaArgentieri closed 9 months ago

LucaArgentieri commented 11 months ago

GSAP ScrollTrigger integration still required? I tried without and it works, I would need confirmation.

aritradey-CS commented 11 months ago

The ScrollTrigger plugin is a part of the GSAP library and is used to trigger animations on the scroll with just a few lines of code. It is built on the GSAP and can be used to trigger those intriguing GSAP animations on the scroll with excellent performance, cross-browser compatibility, and support from the GSAP community 1.

The only required option for ScrollTrigger is trigger, which defines which element triggers the scroll interaction. Importantly, this does not have to be the same element that is animating 2.

It’s recommended to register ScrollTrigger in your JavaScript to avoid tree-shaking with build tools. You can get recent CDN Urls from the GSAP Overview in the docs 3.

I hope this helps!

LucaArgentieri commented 11 months ago

I got my answer here

Thank you!