Explanation of how the gulp build/start compile the namespace of all the classes

I am still kinda cloudy as to how the different modules end up in the correct name spaces. For example how does BABYLON.Mesh end up scoped under BABYLON without there being any namespaces declared?

I made a similar project (non bjs) layout that was way smaller and simpler so I could understand what was really going on and when I do a build all my classes end up under the global scope and non accessible through the browser when the script is included. So I am kinda confused on what magic we use.

I was digging around through all the github stuff, and have a good idea about a lot of it. But am still kinda looking at how we end up with our namespace scope as witchcraft.

The witchcraft ends up being a lot of custom code and regex creating the file manually from the amd module generated .d.ts file… only options we found unfortunately as all the plugins for webpack were not emitting the correct DTS:

1 Like

Ok cool, I will review all of these! Thank you for pointing me in the correct way.

1 Like

Who set this up was it you @sebavan?

It’s pretty tricky tricky… I like it.

It comes with lots and lots and lots of history…

I can kinda see that, I was trying to just follow along and its pretty well thought out.

hahaha from your response I take it was not that fun to setup.

1 Like