@@ -74635,6 +74635,34 @@ module.exports.AScene = registerElement('a-scene', {
7463574635 initMetaTags(this);
7463674636 initWakelock(this);
7463774637
74638+ // Handler to exit VR (e.g., Oculus Browser back button).
74639+ this.onVRPresentChangeBound = bind(this.onVRPresentChange, this);
74640+ window.addEventListener('vrdisplaypresentchange', this.onVRPresentChangeBound);
74641+
74642+ // Bind functions.
74643+ this.enterVRBound = function () { self.enterVR(); };
74644+ this.exitVRBound = function () { self.exitVR(); };
74645+ this.exitVRTrueBound = function () { self.exitVR(true); };
74646+ this.pointerRestrictedBound = function () { self.pointerRestricted(); };
74647+ this.pointerUnrestrictedBound = function () { self.pointerUnrestricted(); };
74648+
74649+ if (!isWebXRAvailable) {
74650+ // Exit VR on `vrdisplaydeactivate` (e.g. taking off Rift headset).
74651+ window.addEventListener('vrdisplaydeactivate', this.exitVRBound);
74652+
74653+ // Exit VR on `vrdisplaydisconnect` (e.g. unplugging Rift headset).
74654+ window.addEventListener('vrdisplaydisconnect', this.exitVRTrueBound);
74655+
74656+ // Register for mouse restricted events while in VR
74657+ // (e.g. mouse no longer available on desktop 2D view)
74658+ window.addEventListener('vrdisplaypointerrestricted', this.pointerRestrictedBound);
74659+
74660+ // Register for mouse unrestricted events while in VR
74661+ // (e.g. mouse once again available on desktop 2D view)
74662+ window.addEventListener('vrdisplaypointerunrestricted',
74663+ this.pointerUnrestrictedBound);
74664+ }
74665+
7463874666 // Camera set up by camera system.
7463974667 this.addEventListener('cameraready', function () {
7464074668 self.attachedCallbackPostCamera();
@@ -74667,36 +74695,6 @@ module.exports.AScene = registerElement('a-scene', {
7466774695
7466874696 // Add to scene index.
7466974697 scenes.push(this);
74670-
74671- // Handler to exit VR (e.g., Oculus Browser back button).
74672- this.onVRPresentChangeBound = bind(this.onVRPresentChange, this);
74673- window.addEventListener('vrdisplaypresentchange', this.onVRPresentChangeBound);
74674-
74675- // bind functions
74676- this.enterVRBound = function () { self.enterVR(); };
74677- this.exitVRBound = function () { self.exitVR(); };
74678- this.exitVRTrueBound = function () { self.exitVR(true); };
74679- this.pointerRestrictedBound = function () { self.pointerRestricted(); };
74680- this.pointerUnrestrictedBound = function () { self.pointerUnrestricted(); };
74681-
74682- if (!isWebXRAvailable) {
74683- // Enter VR on `vrdisplayactivate` (e.g. putting on Rift headset).
74684- window.addEventListener('vrdisplayactivate', this.enterVRBound);
74685-
74686- // Exit VR on `vrdisplaydeactivate` (e.g. taking off Rift headset).
74687- window.addEventListener('vrdisplaydeactivate', this.exitVRBound);
74688-
74689- // Exit VR on `vrdisplaydisconnect` (e.g. unplugging Rift headset).
74690- window.addEventListener('vrdisplaydisconnect', this.exitVRTrueBound);
74691-
74692- // Register for mouse restricted events while in VR
74693- // (e.g. mouse no longer available on desktop 2D view)
74694- window.addEventListener('vrdisplaypointerrestricted', this.pointerRestrictedBound);
74695-
74696- // Register for mouse unrestricted events while in VR
74697- // (e.g. mouse once again available on desktop 2D view)
74698- window.addEventListener('vrdisplaypointerunrestricted', this.pointerUnrestrictedBound);
74699- }
7470074698 },
7470174699 writable: window.debug
7470274700 },
@@ -77216,7 +77214,7 @@ _dereq_('./core/a-mixin');
7721677214_dereq_('./extras/components/');
7721777215_dereq_('./extras/primitives/');
7721877216
77219- console.log('A-Frame Version: 0.9.2 (Date 2019-05-06, Commit #a0182db )');
77217+ console.log('A-Frame Version: 0.9.2 (Date 2019-05-06, Commit #f57a1fa )');
7722077218console.log('three Version (https://github.com/supermedium/three.js):',
7722177219 pkg.dependencies['super-three']);
7722277220console.log('WebVR Polyfill Version:', pkg.dependencies['webvr-polyfill']);
0 commit comments