浏览代码

Merge remote-tracking branch 'refs/remotes/BabylonJS/master'

Raanan Weber 9 年之前
父节点
当前提交
2d18ba83d1
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 2 1
      src/Loading/babylon.sceneLoader.js
  2. 2 1
      src/Loading/babylon.sceneLoader.ts

+ 2 - 1
src/Loading/babylon.sceneLoader.js

@@ -97,11 +97,12 @@ var BABYLON;
                     importMeshFromData(data);
                 }, progressCallBack, database);
             };
-            if (scene.getEngine().enableOfflineSupport) {
+            if (scene.getEngine().enableOfflineSupport && !(sceneFilename.substr && sceneFilename.substr(0, 5) === "data:")) {
                 // Checking if a manifest file has been set for this scene and if offline mode has been requested
                 var database = new BABYLON.Database(rootUrl + sceneFilename, manifestChecked);
             }
             else {
+                // If the scene is a data stream or offline support is not enabled, it's a direct load
                 manifestChecked(true);
             }
         };

+ 2 - 1
src/Loading/babylon.sceneLoader.ts

@@ -123,11 +123,12 @@
                 }, progressCallBack, database);
             };
 
-            if (scene.getEngine().enableOfflineSupport) {
+            if (scene.getEngine().enableOfflineSupport && !(sceneFilename.substr && sceneFilename.substr(0, 5) === "data:")) {
                 // Checking if a manifest file has been set for this scene and if offline mode has been requested
                 var database = new Database(rootUrl + sceneFilename, manifestChecked);
             }
             else {
+                // If the scene is a data stream or offline support is not enabled, it's a direct load
                 manifestChecked(true);
             }
         }