But, I am not sure how to import MeshWriter and use that correctly. Does anyone have an example? I have been reading over these pages but still can’t seem to figure it out.
If you have loaded it through NPM, then, if you do: “require(“meshwriter”)” will put it in global.MeshWriter. This is almost at the bottom of the readme in github. (Sadly the readme in NPM is one revision back and does not say this.)
If MeshWriter can find BABYLON in the global address space it, will also attach itself to BABYLON.MeshWriter. This approach had been my main target and should work in all environments and with all loading tools.
I did not test the syntax and result using ‘import’. I should. I will.
If you have further problems, you can find me on this channel.
If you feel like giving back, you can give me a critique of the section “Loading MeshWriter” on GitHub. I am sure it can be improved.