ashthornton / asscroll

Ash's Smooth Scroll 🍑
MIT License
946 stars 27 forks source link

How to use with libs like AOS (animate on scroll)? #37

Closed urbgimtam closed 3 years ago

urbgimtam commented 3 years ago

Hi.

When using with other libraries that use intersectionObserver like AOS, scrolling is smooth but the other library only executes/affects its target elements after smooth scroll stops.

This leaves a huge blank area that looks an error, until the user stops scrolling, which then updates all effects.

Any ideas on what can be done? I know that in GSAP we can use ScrollProxy, but AOS doesn't have anything like that.

ashthornton commented 3 years ago

Hi @urbgimtam, if that library relies solely on IntersectionObserver to detect when elements are in view, then unfortunately it won't be compatible with the smooth scroll technique that transforms the page, which is used by ASScroll and most other popular libraries.

This would be something I would ask the author of AOS about to see if there is a workaround.

urbgimtam commented 3 years ago

Ok, thank you

On Fri, Mar 26, 2021, 14:41 Ash Thornton @.***> wrote:

Closed #37 https://github.com/ashthornton/asscroll/issues/37.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ashthornton/asscroll/issues/37#event-4514299339, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIDITLOTKYULN7NVP6ZCM3TFSMJTANCNFSM4Z3P5G6A .