pmndrs / drei

🥉 useful helpers for react-three-fiber
https://docs.pmnd.rs/drei
MIT License
8.3k stars 687 forks source link

Export OrbitControls from another lib in native #1836

Open TiagoCavalcante opened 7 months ago

TiagoCavalcante commented 7 months ago

Hi, I'm the developer of r3f-native-orbitcontrols, which has almost 30k downloads in NPM now.

The current version of drei's OrbitControls doesn't work in React Native, so I suggest exporting the orbit controls from my library, which works in native (but not on the web though).

CodyJasonBennett commented 7 months ago

This is a breaking change in Drei WRT API, so I'd prefer to do so only as a last resort, and/or amortize with the next major release. I see a publishing issue in your library which I'll address momentarily there.

I think I'd much rather implement the basic EventEmitter interface for examples/jsm controls to work, which is a little more complicated than https://github.com/pmndrs/react-three-fiber/issues/3173 since they access document and element-document references for focus states. Not mentioned there, but there is a regression since we switched to gestures where the R3F canvas isn't compatible with your controls since it overrides gesture props instead of joining them into separate callbacks; fix is as described upstream.

TiagoCavalcante commented 7 months ago

This is a breaking change in Drei WRT API, so I'd prefer to do so only as a last resort, and/or amortize with the next major release. I see a publishing issue in your library which I'll address momentarily there.

I think I'd much rather implement the basic EventEmitter interface for examples/jsm controls to work, which is a little more complicated than pmndrs/react-three-fiber#3173 since they access document and element-document references for focus states.

Makes sense.

Not mentioned there, but there is a regression since we switched to gestures where the R3F canvas isn't compatible with your controls since it overrides gesture props instead of joining them into separate callbacks;

Which gestures aren't working?

fix is as described upstream.

I didn't understand in which repository the fix was described.

CodyJasonBennett commented 7 months ago

In R3F we'll need fixes so you can spread GestureResponder props over Canvas. Looking into it already, but I believe we or someone using your library found this in our Discord.