瀏覽代碼

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

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

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


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


+ 6 - 1
dist/preview release/babylon.max.js

@@ -62199,7 +62199,12 @@ var BABYLON;
         ;
         WebVRFreeCamera.prototype.getForwardRay = function (length) {
             if (length === void 0) { length = 100; }
-            return _super.prototype.getForwardRay.call(this, length, this.leftCamera.getWorldMatrix(), this.position.add(this.devicePosition)); // Need the actual rendered camera
+            if (this.leftCamera) {
+                return _super.prototype.getForwardRay.call(this, length, this.leftCamera.getWorldMatrix(), this.position.add(this.devicePosition)); // Need the actual rendered camera
+            }
+            else {
+                return _super.prototype.getForwardRay.call(this, length);
+            }
         };
         WebVRFreeCamera.prototype._checkInputs = function () {
             if (this._vrEnabled) {

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


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


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

@@ -195,7 +195,12 @@ module BABYLON {
         };
 
         public getForwardRay(length = 100): Ray {
-            return super.getForwardRay(length, this.leftCamera.getWorldMatrix(), this.position.add(this.devicePosition)); // Need the actual rendered camera
+            if (this.leftCamera) {
+                return super.getForwardRay(length, this.leftCamera.getWorldMatrix(), this.position.add(this.devicePosition)); // Need the actual rendered camera
+            }
+            else {
+                return super.getForwardRay(length); 
+            }
         } 
 
         public _checkInputs(): void {

+ 1 - 1
src/Cameras/babylon.camera.ts

@@ -530,7 +530,7 @@
             return target.isCompletelyInFrustum(this._frustumPlanes);
         }
 
-        public getForwardRay(length = 100, transform: Matrix, origin: Vector3): Ray {
+        public getForwardRay(length = 100, transform?: Matrix, origin?: Vector3): Ray {
             if (!transform) {
                 transform = this.getWorldMatrix();
             }