@@ -74445,6 +74445,34 @@ module.exports.AScene = registerElement('a-scene', {
7444574445 initMetaTags(this);
7444674446 initWakelock(this);
7444774447
74448+ // Handler to exit VR (e.g., Oculus Browser back button).
74449+ this.onVRPresentChangeBound = bind(this.onVRPresentChange, this);
74450+ window.addEventListener('vrdisplaypresentchange', this.onVRPresentChangeBound);
74451+
74452+ // Bind functions.
74453+ this.enterVRBound = function () { self.enterVR(); };
74454+ this.exitVRBound = function () { self.exitVR(); };
74455+ this.exitVRTrueBound = function () { self.exitVR(true); };
74456+ this.pointerRestrictedBound = function () { self.pointerRestricted(); };
74457+ this.pointerUnrestrictedBound = function () { self.pointerUnrestricted(); };
74458+
74459+ if (!isWebXRAvailable) {
74460+ // Exit VR on `vrdisplaydeactivate` (e.g. taking off Rift headset).
74461+ window.addEventListener('vrdisplaydeactivate', this.exitVRBound);
74462+
74463+ // Exit VR on `vrdisplaydisconnect` (e.g. unplugging Rift headset).
74464+ window.addEventListener('vrdisplaydisconnect', this.exitVRTrueBound);
74465+
74466+ // Register for mouse restricted events while in VR
74467+ // (e.g. mouse no longer available on desktop 2D view)
74468+ window.addEventListener('vrdisplaypointerrestricted', this.pointerRestrictedBound);
74469+
74470+ // Register for mouse unrestricted events while in VR
74471+ // (e.g. mouse once again available on desktop 2D view)
74472+ window.addEventListener('vrdisplaypointerunrestricted',
74473+ this.pointerUnrestrictedBound);
74474+ }
74475+
7444874476 // Camera set up by camera system.
7444974477 this.addEventListener('cameraready', function () {
7445074478 self.attachedCallbackPostCamera();
@@ -74477,36 +74505,6 @@ module.exports.AScene = registerElement('a-scene', {
7447774505
7447874506 // Add to scene index.
7447974507 scenes.push(this);
74480-
74481- // Handler to exit VR (e.g., Oculus Browser back button).
74482- this.onVRPresentChangeBound = bind(this.onVRPresentChange, this);
74483- window.addEventListener('vrdisplaypresentchange', this.onVRPresentChangeBound);
74484-
74485- // bind functions
74486- this.enterVRBound = function () { self.enterVR(); };
74487- this.exitVRBound = function () { self.exitVR(); };
74488- this.exitVRTrueBound = function () { self.exitVR(true); };
74489- this.pointerRestrictedBound = function () { self.pointerRestricted(); };
74490- this.pointerUnrestrictedBound = function () { self.pointerUnrestricted(); };
74491-
74492- if (!isWebXRAvailable) {
74493- // Enter VR on `vrdisplayactivate` (e.g. putting on Rift headset).
74494- window.addEventListener('vrdisplayactivate', this.enterVRBound);
74495-
74496- // Exit VR on `vrdisplaydeactivate` (e.g. taking off Rift headset).
74497- window.addEventListener('vrdisplaydeactivate', this.exitVRBound);
74498-
74499- // Exit VR on `vrdisplaydisconnect` (e.g. unplugging Rift headset).
74500- window.addEventListener('vrdisplaydisconnect', this.exitVRTrueBound);
74501-
74502- // Register for mouse restricted events while in VR
74503- // (e.g. mouse no longer available on desktop 2D view)
74504- window.addEventListener('vrdisplaypointerrestricted', this.pointerRestrictedBound);
74505-
74506- // Register for mouse unrestricted events while in VR
74507- // (e.g. mouse once again available on desktop 2D view)
74508- window.addEventListener('vrdisplaypointerunrestricted', this.pointerUnrestrictedBound);
74509- }
7451074508 },
7451174509 writable: window.debug
7451274510 },
@@ -77026,7 +77024,7 @@ _dereq_('./core/a-mixin');
7702677024_dereq_('./extras/components/');
7702777025_dereq_('./extras/primitives/');
7702877026
77029- console.log('A-Frame Version: 0.9.2 (Date 2019-05-06, Commit #a3534e2 )');
77027+ console.log('A-Frame Version: 0.9.2 (Date 2019-05-06, Commit #f57a1fa )');
7703077028console.log('three Version (https://github.com/supermedium/three.js):',
7703177029 pkg.dependencies['super-three']);
7703277030console.log('WebVR Polyfill Version:', pkg.dependencies['webvr-polyfill']);
0 commit comments