legacy.ts 735 B

12345678910111213141516171819
  1. import * as ProceduralTexturesLib from "../src/index";
  2. /**
  3. * Legacy support, defining window.BABYLON.GridMaterial... (global variable).
  4. *
  5. * This is the entry point for the UMD module.
  6. * The entry point for a future ESM package should be index.ts
  7. */
  8. var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
  9. if (typeof globalObject !== "undefined") {
  10. (<any>globalObject).BABYLON = (<any>globalObject).BABYLON || {};
  11. for (var mat in ProceduralTexturesLib) {
  12. if (ProceduralTexturesLib.hasOwnProperty(mat)) {
  13. (<any>globalObject).BABYLON[mat] = (<any>ProceduralTexturesLib)[mat];
  14. }
  15. }
  16. }
  17. export * from "../src/index";