Bläddra i källkod

Fixed use of VRFrameData crashing non-VR browsers.

Lewis Weaver 8 år sedan
förälder
incheckning
84acbf6679
1 ändrade filer med 2 tillägg och 1 borttagningar
  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:
              * The idea behind the following lines: