瀏覽代碼

Fix a bug when no headset was connected on edge when using webVRcamera

David Catuhe 8 年之前
父節點
當前提交
81d5d07558

文件差異過大導致無法顯示
+ 6255 - 6255
dist/preview release/babylon.d.ts


文件差異過大導致無法顯示
+ 3 - 3
dist/preview release/babylon.js


+ 2 - 2
dist/preview release/babylon.max.js

@@ -17785,7 +17785,7 @@ var BABYLON;
             };
             this._onPointerUp = function (evt) {
                 if (!_this._isButtonPressed) {
-                    return;
+                    return; // So we need to test it the pointer down was pressed before.
                 }
                 _this._isButtonPressed = false;
                 _this._pickedUpMesh = null;
@@ -67228,7 +67228,7 @@ var BABYLON;
             } };
             engine.onVRRequestPresentComplete.add(_this._onVREnabled);
             engine.initWebVR().add(function (event) {
-                if (_this._vrDevice === event.vrDisplay) {
+                if (!_this._vrDevice || _this._vrDevice === event.vrDisplay) {
                     return;
                 }
                 _this._vrDevice = event.vrDisplay;

文件差異過大導致無法顯示
+ 6255 - 6255
dist/preview release/babylon.module.d.ts


文件差異過大導致無法顯示
+ 3 - 3
dist/preview release/babylon.worker.js


文件差異過大導致無法顯示
+ 6357 - 6357
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


文件差異過大導致無法顯示
+ 3 - 3
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 2 - 2
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -17785,7 +17785,7 @@ var BABYLON;
             };
             this._onPointerUp = function (evt) {
                 if (!_this._isButtonPressed) {
-                    return;
+                    return; // So we need to test it the pointer down was pressed before.
                 }
                 _this._isButtonPressed = false;
                 _this._pickedUpMesh = null;
@@ -67228,7 +67228,7 @@ var BABYLON;
             } };
             engine.onVRRequestPresentComplete.add(_this._onVREnabled);
             engine.initWebVR().add(function (event) {
-                if (_this._vrDevice === event.vrDisplay) {
+                if (!_this._vrDevice || _this._vrDevice === event.vrDisplay) {
                     return;
                 }
                 _this._vrDevice = event.vrDisplay;

文件差異過大導致無法顯示
+ 6357 - 6357
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts


+ 1 - 1
src/Cameras/VR/babylon.webVRCamera.ts

@@ -99,7 +99,7 @@ module BABYLON {
             this._onVREnabled = (success: boolean) => { if (success) { this.initControllers(); } };
             engine.onVRRequestPresentComplete.add(this._onVREnabled);
             engine.initWebVR().add((event: IDisplayChangedEventArgs) => {
-                if (this._vrDevice === event.vrDisplay) {
+                if (!this._vrDevice || this._vrDevice === event.vrDisplay) {
                     return;
                 }