react-three-flex icon indicating copy to clipboard operation
react-three-flex copied to clipboard

React-spring compatibility

Open giulioz opened this issue 5 years ago • 2 comments

We should add some examples and investigate how to integrate them nicely with the reflow

giulioz avatar Aug 29 '20 11:08 giulioz

I would also love to see some examples 🤗

promontis avatar Oct 03 '20 15:10 promontis

I think the best way for a react-spring integration would be a decoupling between r3f/flex and three where

      group.position.copy(position)

is set. If instead of setting the position directly, the Box-Element can pass a callback that is saved to the boxRefs, which can still just set the position or use a spring to change the position or execute any other function. This would enable much more control over when and why an element is repositioned while still persisting the current functionality.

I would love to hear your thoughts, and I would also offer to implement this as a PR and make an example 😃

bbohlender avatar Aug 19 '21 21:08 bbohlender