Hey,
in my application i am loading some assets using the AssetsManager:
export function loadPlateMesh(assetLoader, callback, plateMaterial) {
var plate = assetLoader.addMeshTask("", "", "/webshop/assets/", "plate.obj");
plate.onSuccess = function() {
var plateMesh = plate.loadedMeshes[0];
plateMesh.scaling = new Vector3(0.7, 0.7, 0.7);
plateMesh.setPositionWithLocalVector(new Vector3(-75, 0, 0));
plateMesh.rotation.x = -Math.PI / 2;
plateMesh.material = plateMaterial;
callback(plateMesh);
};
}
var assetLoader = new AssetsManager(this.babylon.scene);
loadPlateMesh(assetLoader, (mesh) => (this.scene.plateMesh = mesh), this.scene.plateMaterial);
await assetLoader.loadAsync();
Now this works perfectly fine. The AssetsManager tries to fetch an .mtl file tho, which doesn’t exist.
This results in a 404-error and a warning in the console. While its not a big deal, i would like to avoid it.
When using the OBJFileLoader, i saw it is possible, to ignore the .mtl file and just skip it.
Is this possible for the AssetsManager too?
Thanks alot!