Closed andrewhodel closed 1 month ago
This is confusion with the 2nd resume button placed by the browser near the address bar and the VR fullscreen running in the background with one button saying resume and one button saying enter.
There should be a standard word of all VR buttons and Oculus used resume meaning there should be a 3rd state of this button.
I don't see the behaviour you describe. Before the session starts the button reads "Start XR" (or "Enter VR" for VRButton
) and once the session has started shows "Stop XR" (or "Exit VR"). These are the only two states that are relevant for the button.
The Meta Quest Browser does show a "Resume" and "Quit" button near the address bar when showing the webpage while the immersive session is ongoing. At that point however the XRButton
shows "Stop XR" which aligns with the 'Quit' action.
Before/after immersive session | During immersive session |
---|---|
What would the third state be?
Also, it's not possible to programmatically do what the 'Resume' button does AFAIK. Not to mention that it wouldn't make sense on PCVR or handheld AR.
@mrxz
I don't see the behaviour you describe. Before the session starts the button reads "Start XR" (or "Enter VR" for
VRButton
) and once the session has started shows "Stop XR" (or "Exit VR"). These are the only two states that are relevant for the button.The Meta Quest Browser does show a "Resume" and "Quit" button near the address bar when showing the webpage while the immersive session is ongoing. At that point however the
XRButton
shows "Stop XR" which aligns with the 'Quit' action.Before/after immersive session During immersive session What would the third state be?
Also, it's not possible to programmatically do what the 'Resume' button does AFAIK. Not to mention that it wouldn't make sense on PCVR or handheld AR.
Resume is the third state and it is in your 2nd screenshot. It is a third state because your browser shows 3 buttons (Enter, Resume, and Quit). The VRButton
only shows 2 buttons (Enter VR, Exit VR).
@andrewhodel
Resume is the third state and it is in your 2nd screenshot. It is a third state because your browser shows 3 buttons (Enter, Resume, and Quit). The
VRButton
only shows 2 buttons (Enter VR, Exit VR).
Ah, but 'resume' isn't a state, it's an action. The button only cares about the two states of there being an immersive session or not. It already shows the relevant action to transition between these two states.
In any case, it's not possible to implement this "resume" action. And, like I mentioned, won't even make sense for PCVR or handheld AR. Even if it would be possible, I'm not sure it should be included in the VR/XRButton
.
@mrxz a button's state is the text it displays that describe the action it performs.
@Mugen87 this should not be closed.
@mrxz the enter action is described as resume when there is an existing immersive session.
The button should say resume as the browser button does when there is an existing immersive session and the action that it invokes when clicked is the same as the enter action.
@mrxz @Mugen87 why would you want the VRButton to have different wording than the Browser VR buttons?
The button should say resume as the browser button does when there is an existing immersive session and the action that it invokes when clicked is the same as the enter action.
You haven't addressed any of the concerns. The 'Resume' button does something that you can't do programmatically. If it would do the "same as the enter action" it would request a new immersive session when there is already an active session. As per the WebXR spec, this will give an error.
Feel free to verify this behaviour yourself.
why would you want the VRButton to have different wording than the Browser VR buttons?
There are many different WebXR capable user agents, so it's infeasible to try and match the wording used by each one of these. The current wording seem clear enough to me, and if users want to customize it, they can easily make their own version of the button.
If you feel strongly about this feature, you should try and get WebXR spec expanded so that implementing the resume action becomes possible. Until then, there's literally nothing that can be done on the Three.js side.
@mrxz the buttons having different action names than the browser has is not normal.
@mrxz @mrdoob Closing this is incorrect.
Matching the wording and behavior of the Meta Quest Browser — let alone every possible WebXR-compatible browser — is neither a goal of the 200-line XRButton.js
example, nor possible with the WebXR API, as @mrxz has explained above.
@andrewhodel Please be respectful of the time and energy of others: continued argument and @-pings in a closed thread are unhelpful. I would recommend that you create a button customized to your wording needs, if you prefer a different behavior.
Description
The webXR button does not switch states when fullscreen VR is exited using the controller.
If you click the XR button to start fullscreen, then exit fullscreen by pressing a button on the controller the button still says enter while the standard nomenclature of the Oculus browser says resume in the browser placed button near the address bar.
Reproduction steps
Code
NA
Live example
Screenshots
No response
Version
168
Device
Headset
Browser
No response
OS
No response