legacy.ts 654 B

1234567891011121314151617
  1. import * as ProceduralTexturesLib from "../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. (<any>globalObject).BABYLON[mat] = (<any>ProceduralTexturesLib)[mat];
  13. }
  14. }
  15. export * from "../index";