Skip to content
Snippets Groups Projects
Commit 015d464d authored by Greg Fodor's avatar Greg Fodor
Browse files

Scale canvas 200% wide so no eye buffers on desktop

parent cd96c791
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"rules": { "rules": {
"indentation": 2, "indentation": 2,
"selector-pseudo-class-no-unknown": [true, { "ignorePseudoClasses": ["local"] }], "selector-pseudo-class-no-unknown": [true, { "ignorePseudoClasses": ["local"] }],
"selector-type-no-unknown": [true, { "ignoreTypes": ["/^a-/"] }],
"no-descending-specificity": false "no-descending-specificity": false
} }
} }
...@@ -7,7 +7,14 @@ ...@@ -7,7 +7,14 @@
@import 'entry'; @import 'entry';
@import 'audio'; @import 'audio';
@import 'info-dialog'; @import 'info-dialog';
@import 'shared';
body.vr-mode {
a-scene.fullscreen {
.a-canvas {
width: 200% !important;
}
}
}
.a-enter-vr, .a-orientation-modal { .a-enter-vr, .a-orientation-modal {
display: none; display: none;
......
...@@ -12,8 +12,6 @@ const POSES = { ...@@ -12,8 +12,6 @@ const POSES = {
mrpDown: "mrpDown" 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 = { export const LEFT_CONTROLLER_OFFSETS = {
default: new THREE.Matrix4(), default: new THREE.Matrix4(),
"oculus-touch-controls": new THREE.Matrix4().makeTranslation(-0.025, -0.03, 0.1), "oculus-touch-controls": new THREE.Matrix4().makeTranslation(-0.025, -0.03, 0.1),
......
...@@ -317,6 +317,9 @@ document.addEventListener("DOMContentLoaded", async () => { ...@@ -317,6 +317,9 @@ document.addEventListener("DOMContentLoaded", async () => {
window.APP.scene = scene; 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(); registerNetworkSchemas();
remountUI({ remountUI({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment