diff --git a/.stylelintrc b/.stylelintrc index 806eeab4265711a76a9ce0eca891ea5d97b7c372..e0ae6ebc3af483a2cae7c97db51908b7680b9cff 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -3,6 +3,7 @@ "rules": { "indentation": 2, "selector-pseudo-class-no-unknown": [true, { "ignorePseudoClasses": ["local"] }], + "selector-type-no-unknown": [true, { "ignoreTypes": ["/^a-/"] }], "no-descending-specificity": false } } diff --git a/src/assets/stylesheets/hub.scss b/src/assets/stylesheets/hub.scss index 8ce382b26542abc5df4cc138c0846035c700f81a..1f7f530e911e8730be9a4a49f9e8a39fd33542e6 100644 --- a/src/assets/stylesheets/hub.scss +++ b/src/assets/stylesheets/hub.scss @@ -7,7 +7,14 @@ @import 'entry'; @import 'audio'; @import 'info-dialog'; -@import 'shared'; + +body.vr-mode { + a-scene.fullscreen { + .a-canvas { + width: 200% !important; + } + } +} .a-enter-vr, .a-orientation-modal { display: none; diff --git a/src/components/hand-controls2.js b/src/components/hand-controls2.js index fa2cc938c0430b6bbcbbe870a018b39a807b49b6..ff1d2e87bbbd596e3381017b7695c5b2f2dfedc5 100644 --- a/src/components/hand-controls2.js +++ b/src/components/hand-controls2.js @@ -12,8 +12,6 @@ const POSES = { mrpDown: "mrpDown" }; -// TODO: If the hands or controllers are mispositioned, then rightHand.controllerPose and rightHand.pose -// should be bound differently. export const LEFT_CONTROLLER_OFFSETS = { default: new THREE.Matrix4(), "oculus-touch-controls": new THREE.Matrix4().makeTranslation(-0.025, -0.03, 0.1), diff --git a/src/hub.js b/src/hub.js index 5483dfa13afcf125ece5a026b17ac541a07852de..cee2b1be8448112241012b9e8c1986f3130afb09 100644 --- a/src/hub.js +++ b/src/hub.js @@ -317,6 +317,9 @@ document.addEventListener("DOMContentLoaded", async () => { window.APP.scene = scene; + scene.addEventListener("enter-vr", () => document.body.classList.add("vr-mode")); + scene.addEventListener("exit-vr", () => document.body.classList.remove("vr-mode")); + registerNetworkSchemas(); remountUI({