Skip to content
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

Closed
checksummaster opened this issue Oct 5, 2020 · 3 comments
Closed

react-three-gui compatibility #12

checksummaster opened this issue Oct 5, 2020 · 3 comments

Comments

@checksummaster
Copy link

checksummaster commented Oct 5, 2020

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> }

@sniok
Copy link
Member

sniok commented Oct 5, 2020

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

@sniok
Copy link
Member

sniok commented Oct 5, 2020

it seems like a limitation of react-three-fiber pmndrs/react-three-fiber#43

@checksummaster
Copy link
Author

As I see it should be fixe in react-three-gui... Thanks

@sniok sniok closed this as completed Oct 10, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants