drei icon indicating copy to clipboard operation
drei copied to clipboard

View for React-Native

Open bchang1217 opened this issue 1 year ago • 4 comments

Is there anyway to make this work?

bchang1217 avatar Sep 13 '23 21:09 bchang1217

where is the code ?

ryadhoussam avatar Sep 15 '23 08:09 ryadhoussam

Source is https://github.com/pmndrs/drei/blob/master/src/web/View.tsx. I realize the naming is a bit awkward on react-native, but you can measure layout dimensions with https://reactnative.dev/docs/view#onlayout.

CodyJasonBennett avatar Sep 15 '23 16:09 CodyJasonBennett

My understanding of the issue is that View needs to track a React DOM, but I'm unsure how to track a React-Native View

bchang1217 avatar Sep 15 '23 16:09 bchang1217

So, using several Views in one Canvas does not work in react native? Something like this: https://codesandbox.io/p/sandbox/view-skissor-1wmlew?file=%2Fsrc%2FApp.js%3A15%2C32

For now: Module '"@react-three/drei/native"' has no exported member 'View'.ts(2305)

MainzerKaiser avatar Jan 05 '24 14:01 MainzerKaiser