Hi,
I need to load babylon.js source code in a dynamic manner. I’m not sure if I’ll be loading it at all or what version will I be uploading if so. This seems to work fine for me while loading the code from my CDN with a copy of this file for example for version 4.2.1.
This is also the case for loading BabylonJs materials library. Problem is, loading this code throws an error:
cell.fragment.ts:137 Uncaught TypeError: Cannot read properties of undefined (reading 'ShaderStore')
at Module../cell/cell.fragment.ts (<anonymous>:433:59)
at __webpack_require__ (<anonymous>:30:30)
at Module../cell/cellMaterial.ts (<anonymous>:488:72)
at __webpack_require__ (<anonymous>:30:30)
at Module../cell/index.ts (<anonymous>:793:71)
at __webpack_require__ (<anonymous>:30:30)
at Module../index.ts (<anonymous>:3055:69)
at __webpack_require__ (<anonymous>:30:30)
at Module.<anonymous> (<anonymous>:3619:110)
at Module../legacy/legacy.ts (<anonymous>:3674:30)
Note that self.BABYLON is not undefined when loading this file and runing his code.
Is there a way to use BabylonJs materials library without importing it as a module but dynamically loading it at runtime?
Thanks.
