-
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
react-three-gui compatibility #12
Comments
hi, I checked out example codesandbox from 'react-three-gui' repo and tried to replace Canvas with VRCanvas and could replicate the bug. after a couple of minutes with debugger it seems like a problem with context in react-three-gui. there are also other people experiencing the same problem with custom canvas wrappers in this issue birkir/react-three-gui#23 |
it seems like a limitation of react-three-fiber pmndrs/react-three-fiber#43 |
As I see it should be fixe in react-three-gui... Thanks |
If I use an app that use react-three-gui and I'm not in VR, I see the menu (or react-three-gui) but control seems not added.
Example:
<ControlsProvider><Canvas>...</Canvas><Controls /></ControlsProvider> Work but <ControlsProvider><VRCanvas>...</VRCanvas><Controls /></ControlsProvider> not work
Note: I understand that in VR (after pressing the button), we can't use react-three-gui then I understand that for VR it may be a minor issue.
to patch my app, I do something like that but it not clean.
function Canvas2({ children, ...rest }) { var vr = true; // in really VR come from a parameters of the URL (HTTP:https://app?vr=true/false) return vr?<VRCanvas>{children}</VRCanvas>:<ControlsProvider><Canvas>{children}</Canvas><Controls /></ControlsProvider> }
The text was updated successfully, but these errors were encountered: