legacy-glTFFileLoader.ts 987 B

12345678910111213141516171819202122232425262728
  1. import * as FileLoader from "../src/glTF/glTFFileLoader";
  2. import * as GLTF1 from "../src/glTF/1.0";
  3. import * as GLTF2 from "../src/glTF/2.0";
  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 key in FileLoader) {
  12. (<any>globalObject).BABYLON[key] = (<any>FileLoader)[key];
  13. }
  14. (<any>globalObject).BABYLON.GLTF1 = (<any>globalObject).BABYLON.GLTF1 || { };
  15. for (var key in GLTF1) {
  16. (<any>globalObject).BABYLON.GLTF1[key] = (<any>GLTF1)[key];
  17. }
  18. for (var key in GLTF2) {
  19. (<any>globalObject).BABYLON[key] = (<any>GLTF2)[key];
  20. }
  21. }
  22. export * from "../src/glTF/glTFFileLoader";
  23. export {
  24. GLTF1,
  25. GLTF2
  26. };