This Pull Request introduces an enhancement to the useLottieInteractivity hook by adding an option to specify the scroll direction. This improvement allows users to set the scroll direction to horizontal, making it compatible with smooth scroll libraries such as Lenis.
Background
While integrating lottie-react with Lenis for smooth horizontal scrolling, I encountered the need to adapt the useLottieInteractivity hook to function correctly with horizontal scroll behavior. By adding a scroll direction option, the hook now supports both vertical and horizontal scrolling, providing greater flexibility and functionality for various scrolling use cases.
Changes
Added a scrollDirection parameter to the useLottieInteractivity hook.
Updated the hook to handle both vertical and horizontal scroll directions.
Ensured backward compatibility by defaulting the scroll direction to vertical.
This enhancement enables seamless integration of Lottie animations with smooth horizontal scrolling, expanding the usability of the useLottieInteractivity hook in projects requiring different scroll directions.
Description
This Pull Request introduces an enhancement to the useLottieInteractivity hook by adding an option to specify the scroll direction. This improvement allows users to set the scroll direction to horizontal, making it compatible with smooth scroll libraries such as Lenis.
Background
While integrating lottie-react with Lenis for smooth horizontal scrolling, I encountered the need to adapt the useLottieInteractivity hook to function correctly with horizontal scroll behavior. By adding a scroll direction option, the hook now supports both vertical and horizontal scrolling, providing greater flexibility and functionality for various scrolling use cases.
Changes