Does it possible import meshes from a sync function?
It’s very tedious to use ImportMesh as async.
I don’t know how to load the mesh without make some ungly code like this:
SceneLoader.ImportMesh(...params, (meshes) => {
SceneLoader.ImportMesh(...params, (meshes) => {
SceneLoader.ImportMesh(...params, (meshes) => {
// here we can finnish in the hell of assembly.
});
});
});
I’ve tried with encapulating the loaders in a function, and use “await funcLoad()”, but the tsc give me some messages to use another version of target (es2017).
So, there’s some method to make sync load or can you give some “correct” way to do load?
NOTE: Yes, I read the dosc, but it not helps with kind of situation, because for some parts of the dosc, all meshes are in one babylon file, and I have one mesh per babylon file.