Strange behaviour es6 module

Hey @sebavan
One more issue related to es6 modules. The last one I hope
here: BabylonJS ES6 - CodeSandbox
Can you please tell me why if I uncomment line 47. the importMesh function no more work.
More than that, if I’ll comment import function and keep only the line 47, nothing apear. I expect to create a sphere.
Thank you and sorry for bothering you again on this subject. Cheers!

This is indeed pretty strange I ll try to have a look ASAP but I am with amazingly bad connectivity till next week so it might have to wait on Monday, I ll do my max to fix it before.

So about the second issue, without the loader, you need the standardMaterial imported for sideEffect to populate the default material. Basically, we do not embed the std mat by default cause it is big and unnecessary if you for instance only rely on PBR:

When you import the loaders, it is automatically imported through some dependencies which explain why it works.

About the 1st one you need the full loader, not just the draco part:

1 Like

Greeeeat. Many thanks!
I wanted to ask to add this info about default material to the doc, but I found it …now :yum:

1 Like