Skip to content

Commit

Permalink
Remove cardboardModeEnabled property in xr-mode-ui now that we remove…
Browse files Browse the repository at this point in the history
…d webvr-polyfill and WebVRManager (#5638)
  • Loading branch information
vincentfretin authored Jan 23, 2025
1 parent a772832 commit b8f407c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion docs/components/xr-mode-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ to the [`<a-scene>` element][scene]. If we wish to simply toggle the UI, use CSS

| 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 |
Expand Down
3 changes: 1 addition & 2 deletions src/components/scene/xr-mode-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export var Component = registerComponent('xr-mode-ui', {

schema: {
enabled: {default: true},
cardboardModeEnabled: {default: false},
enterVRButton: {default: ''},
enterVREnabled: {default: true},
enterARButton: {default: ''},
Expand Down Expand Up @@ -146,7 +145,7 @@ export var Component = registerComponent('xr-mode-ui', {
var sceneEl = this.el;
if (!this.enterVREl) { return; }
if (sceneEl.is('vr-mode') ||
((sceneEl.isMobile || utils.device.isMobileDeviceRequestingDesktopSite()) && !this.data.cardboardModeEnabled && !utils.device.checkVRSupport())) {
((sceneEl.isMobile || utils.device.isMobileDeviceRequestingDesktopSite()) && !utils.device.checkVRSupport())) {
this.enterVREl.classList.add(HIDDEN_CLASS);
} else {
if (!utils.device.checkVRSupport()) { this.enterVREl.classList.add('fullscreen'); }
Expand Down

0 comments on commit b8f407c

Please sign in to comment.