Browse Source

Fix bug incremental loading + importMesh

I was trying to use importMesh with incremental loading, but I always got a 404 when trying to fetch each mesh files.
Babylon tries to fetch url like this : http://localhost/undefinedMeshFileName.babylonmeshdata, in parseMesh method (l 275), parsedMesh.delayLoadingFile is not null (l 304), but rootUrl is not found, so setting "undefinedMeshFileName.babylonmeshdata" in mesh.delayLoadingFile (l 306), so adding rootUrl in parseMesh call (l 503) seems to fix this bug.
OBRE Nicolas 12 năm trước cách đây
mục cha
commit
fd91ccb6d0
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      Babylon/Tools/babylon.sceneLoader.js

+ 2 - 2
Babylon/Tools/babylon.sceneLoader.js

@@ -500,7 +500,7 @@
                             }
                         }
 
-                        var mesh = parseMesh(parsedMesh, scene);
+                        var mesh = parseMesh(parsedMesh, scene, rootUrl);
                         meshes.push(mesh);
                     }
                 }
@@ -635,4 +635,4 @@
             }, progressCallBack, database);
         }
     };
-})();
+})();