Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: aframevr/aframe
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: googlecreativelab/aframe
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Oct 3, 2018

  1. Copy the full SHA
    007754e View commit details
  2. Copy the full SHA
    b2416ac View commit details
Showing with 6 additions and 9 deletions.
  1. +1 −1 package.json
  2. +5 −8 src/index.js
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@
"style-attr": "^1.0.2",
"three": "^0.87.0",
"three-bmfont-text": "^2.1.0",
"webvr-polyfill": "^0.9.36"
"webvr-polyfill": "0.10.3"
},
"devDependencies": {
"browserify": "^13.1.0",
13 changes: 5 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -26,23 +26,20 @@ window.Promise = window.Promise || require('promise-polyfill');
// Check before the polyfill runs.
window.hasNativeWebVRImplementation = !!window.navigator.getVRDisplays || !!window.navigator.getVRDevices;

window.WebVRConfig = window.WebVRConfig || {
// WebVR polyfill
var WebVRPolyfill = require('webvr-polyfill');
window.webvrpolyfill = new WebVRPolyfill({
BUFFER_SCALE: 1,
CARDBOARD_UI_DISABLED: true,
ROTATE_INSTRUCTIONS_DISABLED: true,
TOUCH_PANNER_DISABLED: true,
MOUSE_KEYBOARD_CONTROLS_DISABLED: true
};
ROTATE_INSTRUCTIONS_DISABLED: true
});

// Workaround for iOS Safari canvas sizing issues in stereo (webvr-polyfill/issues/102).
// Only for iOS on versions older than 10.
if (utils.device.isIOSOlderThan10(window.navigator.userAgent)) {
window.WebVRConfig.BUFFER_SCALE = 1 / window.devicePixelRatio;
}

// WebVR polyfill
require('webvr-polyfill');

require('present'); // Polyfill `performance.now()`.

// CSS.