Просмотр исходного кода

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 лет назад
Родитель
Сommit
fd91ccb6d0
1 измененных файлов с 2 добавлено и 2 удалено
  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);
         }
     };
-})();
+})();