kindoflew / svelte-parallax

a (small) spring-based parallax component library for Svelte
MIT License
145 stars 5 forks source link

[FEATURE]: implement onScroll and update onProgress params #32

Closed kindoflew closed 2 years ago

kindoflew commented 2 years ago

This PR implements the onScroll prop to give users access to scrollTop (the number of pixels scrolled while the parallax effect is active) and updates onProgress to only use one value -- a float between 0 and 1 that represents the scroll progress of the Parallax container.