pmndrs / react-three-flex

💪📦 Flexbox for react-three-fiber
MIT License
1.65k stars 42 forks source link

Sticky #68

Closed bayerlse closed 2 years ago

bayerlse commented 2 years ago

Hey there! :)

Awesome project, thanks for that!

I'm wondering if there is any "simple" logic to get a sticky effect on an element that scrolls into view. E.g. an image thats scroll into view stays there for some scrolls and then it just continues?

Thanks & br, sebi

saitonakamura commented 2 years ago

Not sure if can speak for the maintainers, but I think scroll/overflow and all this stuff are out of the scope of this library That being said, I'm currently implementing a scrollable component using flex so I you can look at this example

It's not simple to do the scroll overflow in threejs/r3f, but you can do powerful abstractions like this Scrollable component https://codesandbox.io/s/r3f-scrollable-component-seq2t?file=/src/index.tsx

bayerlse commented 2 years ago

hey @saitonakamura!

Thanks for your answer, will definetly have a look! :)