Closed spencer17x closed 1 year ago
Maybe you can use something like Promise.all to solve this problem?
use Append / AppendAsync (loading screen automatically appears):
SceneLoader.AppendAsync(
"https://a-cdn.qbox.net/test/models/pmx/[MODELS]%20Lovesick%20girls%20ver.1/[LSG]%20Jennie%20(Miku)%20ver.1.pmx",
undefined,
scene
);
use ImportMesh / ImportMeshAsync (show loading screen manually):
engine.displayLoadingUI();
SceneLoader.ImportMeshAsync(
undefined,
"https://a-cdn.qbox.net/test/models/pmx/[MODELS]%20Lovesick%20girls%20ver.1/[LSG]%20Jennie%20(Miku)%20ver.1.pmx",
undefined,
scene
).then(result => result.meshes[0])
.then(mmdMesh => {
engine.hideLoadingUI();
mmdMesh.receiveShadows = true;
});
or use LoadAssetContainer / LoadAssetContainerAsync (There is a lag while loading without a loading screen)
SceneLoader.LoadAssetContainerAsync(
"https://a-cdn.qbox.net/test/models/pmx/[MODELS]%20Lovesick%20girls%20ver.1/[LSG]%20Jennie%20(Miku)%20ver.1.pmx",
undefined,
scene
).then(result => {
result.addAllToScene();
});
Can't importMeshAsync solve this problem?
It's in the answer I gave you
Other loader using import mesh async does not have this problem, should it also be solved?
Now things will go as you want. However, as it doesn't seem to be a particularly important factor, I won't update the version right now. Please let me know if this is a problem that needs to be solved urgently
If you think this can be fixed with pr, then I can try to bring up a pr.
There seems to be a misunderstanding It's already solved and I just haven't updated the npm package version yet
Are you referring to the problem of this issue? If yes, please inform me if there is any package to update npm, thank you
I mean I don't seem to need to do npm publish right now because the severity of this problem seems low
Yes, but I hope you'll let me know if this issue is fixed after the next npm package is released, which I think is an optimization
Okay, I'll let you know when 0.24.0 released
I plan to do a new release when this issue is resolved.
Nice bro! And i suggest that you use Link Commits to GitHub Issues, which will make it clearer which issues are resolved by which commits, and it will also help your project to be more robust and maintainable.
I think commit already linked this issue
https://github.com/noname0310/babylon-mmd/commit/88a059600e7776ca2a66b1c13f2bbca526cddc64
Nice,i saw it.
babylon-mmd 0.24.0 is released now. see CHANGELOG.md
Nice job! It is solved.
https://github.com/noname0310/babylon-mmd/assets/32794413/4d6939c0-af0c-4edd-8228-20df530a0945
When loading the model, he renders it white without textures.