浏览代码

Fixed use of VRFrameData crashing non-VR browsers.

Lewis Weaver 8 年之前
父节点
当前提交
84acbf6679
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Cameras/VR/babylon.webVRCamera.ts

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

@@ -113,7 +113,8 @@ module BABYLON {
                 }
             });
 
-            this._frameData = new VRFrameData();
+            if (typeof(VRFrameData) !== "undefined")
+                this._frameData = new VRFrameData();
 
             /**
              * The idea behind the following lines: