Skip to content

Commit 015d464

Browse files
committed
Scale canvas 200% wide so no eye buffers on desktop
1 parent cd96c79 commit 015d464

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

.stylelintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"rules": {
44
"indentation": 2,
55
"selector-pseudo-class-no-unknown": [true, { "ignorePseudoClasses": ["local"] }],
6+
"selector-type-no-unknown": [true, { "ignoreTypes": ["/^a-/"] }],
67
"no-descending-specificity": false
78
}
89
}

src/assets/stylesheets/hub.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@
77
@import 'entry';
88
@import 'audio';
99
@import 'info-dialog';
10-
@import 'shared';
10+
11+
body.vr-mode {
12+
a-scene.fullscreen {
13+
.a-canvas {
14+
width: 200% !important;
15+
}
16+
}
17+
}
1118

1219
.a-enter-vr, .a-orientation-modal {
1320
display: none;

src/components/hand-controls2.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ const POSES = {
1212
mrpDown: "mrpDown"
1313
};
1414

15-
// TODO: If the hands or controllers are mispositioned, then rightHand.controllerPose and rightHand.pose
16-
// should be bound differently.
1715
export const LEFT_CONTROLLER_OFFSETS = {
1816
default: new THREE.Matrix4(),
1917
"oculus-touch-controls": new THREE.Matrix4().makeTranslation(-0.025, -0.03, 0.1),

src/hub.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,9 @@ document.addEventListener("DOMContentLoaded", async () => {
317317

318318
window.APP.scene = scene;
319319

320+
scene.addEventListener("enter-vr", () => document.body.classList.add("vr-mode"));
321+
scene.addEventListener("exit-vr", () => document.body.classList.remove("vr-mode"));
322+
320323
registerNetworkSchemas();
321324

322325
remountUI({

0 commit comments

Comments
 (0)