react-scroll-motion
react-scroll-motion copied to clipboard
Feature request: Callbacks for the animations?
More of a feature request but is it possible to include a callback for the animations? Is this possible now somehow? I would love to know when the element has begun to move or has ended. I would also love to get more information about the scroll position for the different pages. What the position should be when a page starts to move etc.
It's not possible yet. But I can make that hooks. What kind of hooks do you need?
ex) onPageAppear, onPageDisappear... so on
I don't suppose you did this, did you? I have a requirement to animate an image sequence on scroll so I need a way to pass in a prop to a component that represents the scroll position of the <Animator>
as it is scrolled. Then I can calculate the frame number.
I would add some hooks for the page scrolls as you mentioned but also have one that gives you a normalised value of the scroll between 0 and 1 as well as the actual pixel value for the scroll.