Skip to content

Commit

Permalink
Scale canvas 200% wide so no eye buffers on desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
gfodor committed Nov 4, 2018
1 parent cd96c79 commit 015d464
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
9 changes: 8 additions & 1 deletion src/assets/stylesheets/hub.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/components/hand-controls2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
3 changes: 3 additions & 0 deletions src/hub.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 015d464

Please sign in to comment.