Bläddra i källkod

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 år sedan
förälder
incheckning
fd91ccb6d0
1 ändrade filer med 2 tillägg och 2 borttagningar
  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);
         }
     };
-})();
+})();