AppendSceneAsync doesn’t return meshes that are appended to the scene. It seems useless in my case. I want to have a reference to the appended mesh to manipulate it, so I don’t consider it a replacement for ImportMeshAsync.
In this case it is better to use LoadAssetContainerAsync, it has all needed options.
Note that loadAssetContainerAsync (starting with the small “l”) is deprecated.
Hi @Andriy_Lysnevych !
could you give a small sample (playground) how you use LoadAssetContainerAsync to load glb manually (perhaps from arrayBuffer)? Thanks in advance!
Tim
Hi @alexchuber !
Many thanks for reply!
How do i get a arrayBufferView?
I have a normal arrayBuffer with the glb as content.
How do i “convert” the arrayBuffer into a arrayBufferView?
If you’re running your babylon code on localhost, then localhost should serve the file. So if file.glb is in the same directory as index.html, then you should be able to do something like http://localhost:8080/file.glb. Note 8080 is an arbitrary port number I chose, and yours could be different. Or just load index.html directly in the browser as a local file file:///path/to/index.html, and then you’ll be able to load local files.
I think, the converting is correct now: the glb is loading in a playground: Load GLB from arrayBuffer
But: i got a error message in my real project:
“Loading from ArrayBufferView can not be used with plugins that don’t support binary loading.”
Do you know the reason for that?
My best guess would be that there’s a missing import somewhere, but not sure without seeing a repro. Are you registering the plugin extensions like in this code snippet Babylon.js docs ?