From c82aef828a45b6b9728f0ddbcd1f00f735045eef Mon Sep 17 00:00:00 2001 From: James Maki Date: Sat, 23 Dec 2023 14:10:42 -0800 Subject: [PATCH 1/3] Update xr-mode-ui.md Corrected default values for enterVREnabled and enterAREnabled. Added examples to clarify customization options. Seperated out "one of" into seperate column for greater clarity. --- docs/components/xr-mode-ui.md | 49 +++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/docs/components/xr-mode-ui.md b/docs/components/xr-mode-ui.md index 4da34e673a0..eb678f0e7a5 100644 --- a/docs/components/xr-mode-ui.md +++ b/docs/components/xr-mode-ui.md @@ -19,25 +19,52 @@ to the [`` element][scene]. If we wish to simply toggle the UI, use CSS ## Properties -| Property | Description | Default Value | -|-----------------------|---------------------------------------------------------------------|---------------| -| cardboardModeEnabled | Enables the now deprecated cardboard mode. | false | -| enabled | Whether or not to display UI related to entering VR. | true | -| enterVRButton | Selector to a custom VR button. On click, the button will enter VR. | '' | -| enterVREnabled | If the VR button is displayed when applicable | false | -| enterARButton | Selector to a custom AR button. On click, the button will enter AR. | '' | -| enterAREnabled | If the AR button is displayed when applicable | false | -| XRMode | If the AR, VR button or both will be displayed. One of 'ar', 'vr' or 'xr'.| vr | +| Property | Description | Default Value | One of | +|-------------------------|---------------------------------------------------------------------|---------------|--------| +| `cardboardModeEnabled` | Enables the now deprecated cardboard mode. | `false` | - +| `enabled` | Whether or not to display UI related to entering VR. | `true` | - +| `enterVRButton` | Selector to a custom VR button. On click, the button will enter VR. | `''` | - +| `enterVREnabled` | If the VR button is displayed when applicable. | `true` | - +| `enterARButton` | Selector to a custom AR button. On click, the button will enter AR. | `''` | - +| `enterAREnabled` | If the AR button is displayed when applicable. | `true` | - +| `XRMode` | If the AR button, VR button, or both buttons will be displayed. | `vr` | `ar`, `vr`, `xr` ### Specifying a Custom Enter VR Button +Display only a custom Enter VR button when VR is supported. A custom AR button will not be displayed. + +```html + + + + +``` + +### Specifying a Custom Enter AR Button + +Display only a custom Enter AR button when AR is supported. A custom VR button will not be displayed. + +```html + + + + +``` + +### Specifying Custom Enter VR and Enter AR Buttons + +Display a custom Enter VR Button when VR is supported and a custom Enter AR button when AR is supported. + ```html - + xr-mode-ui="enterVRButton: #myEnterVRButton; enterARButton: #myEnterARButton; XRMode: xr;"> + ``` +> ( i ) This is similar to the behavior of the `vr-mode-ui` component that the `xr-mode-ui` component replaced in A-Frame 1.5.0. [scene]: ../core/scene.md From dba106b28cce9e5299f7ebff18e03c3d3a21d4a5 Mon Sep 17 00:00:00 2001 From: Omegahed Date: Fri, 12 Jan 2024 10:41:16 -0800 Subject: [PATCH 2/3] Updated formatting and removed extra sections. --- docs/components/xr-mode-ui.md | 50 ++++++++--------------------------- 1 file changed, 11 insertions(+), 39 deletions(-) diff --git a/docs/components/xr-mode-ui.md b/docs/components/xr-mode-ui.md index eb678f0e7a5..531eccf2e16 100644 --- a/docs/components/xr-mode-ui.md +++ b/docs/components/xr-mode-ui.md @@ -10,7 +10,6 @@ The xr-mode-ui component allows configuring and disabling of UI such as the ente modal, and orientation modal for mobile. The xr-mode-ui component applies only to the [`` element][scene]. If we wish to simply toggle the UI, use CSS instead. - ## Example ```html @@ -19,52 +18,25 @@ to the [`` element][scene]. If we wish to simply toggle the UI, use CSS ## Properties -| Property | Description | Default Value | One of | -|-------------------------|---------------------------------------------------------------------|---------------|--------| -| `cardboardModeEnabled` | Enables the now deprecated cardboard mode. | `false` | - -| `enabled` | Whether or not to display UI related to entering VR. | `true` | - -| `enterVRButton` | Selector to a custom VR button. On click, the button will enter VR. | `''` | - -| `enterVREnabled` | If the VR button is displayed when applicable. | `true` | - -| `enterARButton` | Selector to a custom AR button. On click, the button will enter AR. | `''` | - -| `enterAREnabled` | If the AR button is displayed when applicable. | `true` | - -| `XRMode` | If the AR button, VR button, or both buttons will be displayed. | `vr` | `ar`, `vr`, `xr` - -### Specifying a Custom Enter VR Button - -Display only a custom Enter VR button when VR is supported. A custom AR button will not be displayed. - -```html - - - - -``` - -### Specifying a Custom Enter AR Button +| Property | Description | Default Value | +| - | - | - | +| cardboardModeEnabled | Enables the now deprecated cardboard mode. | false | +| enabled | Whether or not to display UI related to entering VR. | true | +| enterVRButton | Selector to a custom VR button. On click, the button will enter VR. | '' | +| enterVREnabled | If the VR button is displayed when applicable.| true | +| enterARButton | Selector to a custom AR button. On click, the button will enter AR. | '' | +| enterAREnabled | If the AR button is displayed when applicable. | true | +| XRMode | If the AR button, VR button, or both buttons will be displayed. | vr | -Display only a custom Enter AR button when AR is supported. A custom VR button will not be displayed. - -```html - - - - -``` - -### Specifying Custom Enter VR and Enter AR Buttons - -Display a custom Enter VR Button when VR is supported and a custom Enter AR button when AR is supported. +### Specifying Custom Enter VR and AR Buttons ```html - + ``` -> ( i ) This is similar to the behavior of the `vr-mode-ui` component that the `xr-mode-ui` component replaced in A-Frame 1.5.0. [scene]: ../core/scene.md From dbadea8a022c58e90665241d85ea67006599f1ed Mon Sep 17 00:00:00 2001 From: Omegahed Date: Fri, 12 Jan 2024 10:43:55 -0800 Subject: [PATCH 3/3] Updated the general description --- docs/components/xr-mode-ui.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/components/xr-mode-ui.md b/docs/components/xr-mode-ui.md index 531eccf2e16..9ebadc2c86c 100644 --- a/docs/components/xr-mode-ui.md +++ b/docs/components/xr-mode-ui.md @@ -6,8 +6,7 @@ parent_section: components source_code: src/components/scene/xr-mode-ui.js --- -The xr-mode-ui component allows configuring and disabling of UI such as the enter VR / AR button, compatibility -modal, and orientation modal for mobile. The xr-mode-ui component applies only +The xr-mode-ui component configures or disables the enter VR and AR buttons. Buttons only display if the browser supports the corresponding modes (AR or VR). The xr-mode-ui component applies only to the [`` element][scene]. If we wish to simply toggle the UI, use CSS instead. ## Example