Explorar o código

Merge pull request #2854 from leweaver/vrframedata-bugfix

Fixed use of VRFrameData in non-VR browsers.
Raanan Weber %!s(int64=8) %!d(string=hai) anos
pai
achega
8c1c8839fd
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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: