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: