You could get the indices and positions of a mesh like this if that’s what you’re after? I’m not for sure though if you’re trying to import an existing mesh into your Babylon scene or export one out of your Babylon scene?
const indices = mesh.getIndices();
const positions = mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind);
Adding to what Blake said, you need to get that and then build a string with those, then save it in some way (copy&paste, downloading, showing on console, alert etc).
Edit: you certainly is not willing indices and vertices from that sample box. You should change the PG to load your model and get those from it.
Of course, if your object is too complex (too many vertices and triangles), then this won’t be ideal. In that case you probably will want to extend it to download the list as a file, but that is left as an exercise. For a moderately complex model, you can just copy from the console or from the alert. =)
Ah cool. So yes I think that might work.
I would load the model e.g. via gltf and then read out the properties.
Store it in the array and rebuild it.
Thank you very much!
Best. Werner.
Thx for the sample. Thats cool.