Good Morning,
i have executed a React App local with yarn and in the Browser as build Version. Local there are no Errors. At the Browser there is logging in the console following Error: Unable to import meshes from bike.babylon: 404 Not Found undefined.
I’dont know why the App can’t find the bike.babylon. The JS-File is including in the index.html. The index.html is in the same Folder as the babylon File.
This is the Code:
loadModels = () => {
let loader = new AssetsManager(this.scene)
// Arguments: "ID", "Root URL", "URL Prefix", "Filename"
let loadBikeModel = loader.addMeshTask("bike", "", "", "bike.babylon")
loadBikeModel.onSuccess = ( t ) => {
this.scene.getMeshByID('Sa').material = this.scene.getMeshByID('Sa').material.clone()
this.scene.getMeshByID('Ghidon').material = this.scene.getMeshByID('Ghidon').material.clone()
this.scene.getMeshByID('BidonRosu').material = this.scene.getMeshByID('BidonRosu').material.clone()
this.scene.getMeshByID('Furca').material = this.scene.getMeshByID('Furca').material.clone()
this.scene.getMeshByID('Cadru1').material.diffuseColor = this.scene.getMeshByID('Cadru1').material.clone()
this.scene.getMeshByID('Sa').material.diffuseColor = this.colors['grey']
this.scene.getMeshByID('Ghidon').material.diffuseColor = this.colors['grey']
this.scene.getMeshByID('BidonRosu').material.diffuseColor = this.colors['grey']
this.scene.getMeshByID('Furca').material.diffuseColor = this.colors['black']
this.scene.getMeshByID('Cadru1').material.diffuseColor = this.colors['white']
this.engine.runRenderLoop(() => {
this.scene.render()
})
new HemisphericLight('light1', new Vector3(0,1,0), this.scene)
}
loadBikeModel.onError = function (task, message, exception) {
console.log(message, exception);
}
return loader
}
Anyone have an Idea why the bike.babylon can’t be load?