@babylonjs/loaders 9.5.0 → 9.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,3 @@
1
1
  import * as GLTF2 from "../glTF/2.0/index.js";
2
- export { GLTF2 };
2
+ declare const GLTF2Legacy: typeof GLTF2;
3
+ export { GLTF2Legacy as GLTF2 };
@@ -2,6 +2,15 @@
2
2
  import * as Extensions from "../glTF/2.0/Extensions/index.js";
3
3
  import * as Interfaces from "../glTF/2.0/glTFLoaderInterfaces.js";
4
4
  import * as GLTF2 from "../glTF/2.0/index.js";
5
+ const LoaderExtensions = { ...Extensions };
6
+ const GLTF2Loader = {
7
+ ...Interfaces,
8
+ ["Extensions"]: LoaderExtensions,
9
+ };
10
+ const GLTF2Legacy = {
11
+ ...GLTF2,
12
+ ["Loader"]: GLTF2Loader,
13
+ };
5
14
  /**
6
15
  * This is the entry point for the UMD module.
7
16
  * The entry point for a future ESM package should be index.ts
@@ -14,22 +23,25 @@ if (typeof GlobalObject !== "undefined") {
14
23
  BABYLON.GLTF2 = BABYLON.GLTF2 || {};
15
24
  BABYLON.GLTF2.Loader = BABYLON.GLTF2.Loader || {};
16
25
  BABYLON.GLTF2.Loader.Extensions = BABYLON.GLTF2.Loader.Extensions || {};
17
- const keys = [];
18
- for (const key in Extensions) {
19
- BABYLON.GLTF2.Loader.Extensions[key] = Extensions[key];
26
+ const keys = ["Loader"];
27
+ for (const key in LoaderExtensions) {
28
+ BABYLON.GLTF2.Loader.Extensions[key] = LoaderExtensions[key];
20
29
  keys.push(key);
21
30
  }
22
- for (const key in Interfaces) {
23
- BABYLON.GLTF2.Loader[key] = Interfaces[key];
31
+ for (const key in GLTF2Loader) {
32
+ if (key === "Extensions") {
33
+ continue;
34
+ }
35
+ BABYLON.GLTF2.Loader[key] = GLTF2Loader[key];
24
36
  keys.push(key);
25
37
  }
26
- for (const key in GLTF2) {
38
+ for (const key in GLTF2Legacy) {
27
39
  // Prevent Reassignment.
28
40
  if (keys.indexOf(key) > -1) {
29
41
  continue;
30
42
  }
31
- BABYLON.GLTF2[key] = GLTF2[key];
43
+ BABYLON.GLTF2[key] = GLTF2Legacy[key];
32
44
  }
33
45
  }
34
- export { GLTF2 };
46
+ export { GLTF2Legacy as GLTF2 };
35
47
  //# sourceMappingURL=legacy-glTF2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"legacy-glTF2.js","sourceRoot":"","sources":["../../../../dev/loaders/src/legacy/legacy-glTF2.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,OAAO,KAAK,UAAU,MAAM,mCAAmC,CAAC;AAChE,OAAO,KAAK,UAAU,MAAM,uCAAuC,CAAC;AACpE,OAAO,KAAK,KAAK,MAAM,wBAAwB,CAAC;AAEhD;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;IAChC,YAAa,CAAC,OAAO,GAAS,YAAa,CAAC,OAAO,IAAI,EAAE,CAAC;IAChE,gEAAgE;IAChE,MAAM,OAAO,GAAS,YAAa,CAAC,OAAO,CAAC;IAC5C,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;IACpC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;IAClD,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;IAExE,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC3B,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAS,UAAW,CAAC,GAAG,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC3B,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,GAAS,UAAW,CAAC,GAAG,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;QACtB,wBAAwB;QACxB,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YACzB,SAAS;QACb,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAS,KAAM,CAAC,GAAG,CAAC,CAAC;IAC3C,CAAC;AACL,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nimport * as Extensions from \"loaders/glTF/2.0/Extensions/index\";\r\nimport * as Interfaces from \"loaders/glTF/2.0/glTFLoaderInterfaces\";\r\nimport * as GLTF2 from \"loaders/glTF/2.0/index\";\r\n\r\n/**\r\n * This is the entry point for the UMD module.\r\n * The entry point for a future ESM package should be index.ts\r\n */\r\nconst GlobalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\r\nif (typeof GlobalObject !== \"undefined\") {\r\n (<any>GlobalObject).BABYLON = (<any>GlobalObject).BABYLON || {};\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const BABYLON = (<any>GlobalObject).BABYLON;\r\n BABYLON.GLTF2 = BABYLON.GLTF2 || {};\r\n BABYLON.GLTF2.Loader = BABYLON.GLTF2.Loader || {};\r\n BABYLON.GLTF2.Loader.Extensions = BABYLON.GLTF2.Loader.Extensions || {};\r\n\r\n const keys = [];\r\n for (const key in Extensions) {\r\n BABYLON.GLTF2.Loader.Extensions[key] = (<any>Extensions)[key];\r\n keys.push(key);\r\n }\r\n for (const key in Interfaces) {\r\n BABYLON.GLTF2.Loader[key] = (<any>Interfaces)[key];\r\n keys.push(key);\r\n }\r\n\r\n for (const key in GLTF2) {\r\n // Prevent Reassignment.\r\n if (keys.indexOf(key) > -1) {\r\n continue;\r\n }\r\n\r\n BABYLON.GLTF2[key] = (<any>GLTF2)[key];\r\n }\r\n}\r\n\r\nexport { GLTF2 };\r\n"]}
1
+ {"version":3,"file":"legacy-glTF2.js","sourceRoot":"","sources":["../../../../dev/loaders/src/legacy/legacy-glTF2.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,OAAO,KAAK,UAAU,MAAM,mCAAmC,CAAC;AAChE,OAAO,KAAK,UAAU,MAAM,uCAAuC,CAAC;AACpE,OAAO,KAAK,KAAK,MAAM,wBAAwB,CAAC;AAEhD,MAAM,gBAAgB,GAAG,EAAE,GAAG,UAAU,EAAE,CAAC;AAC3C,MAAM,WAAW,GAAG;IAChB,GAAG,UAAU;IACb,CAAC,YAAY,CAAC,EAAE,gBAAgB;CACnC,CAAC;AACF,MAAM,WAAW,GAAG;IAChB,GAAG,KAAK;IACR,CAAC,QAAQ,CAAC,EAAE,WAAW;CACV,CAAC;AAElB;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;IAChC,YAAa,CAAC,OAAO,GAAS,YAAa,CAAC,OAAO,IAAI,EAAE,CAAC;IAChE,gEAAgE;IAChE,MAAM,OAAO,GAAS,YAAa,CAAC,OAAO,CAAC;IAC5C,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;IACpC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;IAClD,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;IAExE,MAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxB,KAAK,MAAM,GAAG,IAAI,gBAAgB,EAAE,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAS,gBAAiB,CAAC,GAAG,CAAC,CAAC;QACpE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;QAC5B,IAAI,GAAG,KAAK,YAAY,EAAE,CAAC;YACvB,SAAS;QACb,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,GAAS,WAAY,CAAC,GAAG,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;QAC5B,wBAAwB;QACxB,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YACzB,SAAS;QACb,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAS,WAAY,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;AACL,CAAC;AAED,OAAO,EAAE,WAAW,IAAI,KAAK,EAAE,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nimport * as Extensions from \"loaders/glTF/2.0/Extensions/index\";\r\nimport * as Interfaces from \"loaders/glTF/2.0/glTFLoaderInterfaces\";\r\nimport * as GLTF2 from \"loaders/glTF/2.0/index\";\r\n\r\nconst LoaderExtensions = { ...Extensions };\r\nconst GLTF2Loader = {\r\n ...Interfaces,\r\n [\"Extensions\"]: LoaderExtensions,\r\n};\r\nconst GLTF2Legacy = {\r\n ...GLTF2,\r\n [\"Loader\"]: GLTF2Loader,\r\n} as typeof GLTF2;\r\n\r\n/**\r\n * This is the entry point for the UMD module.\r\n * The entry point for a future ESM package should be index.ts\r\n */\r\nconst GlobalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\r\nif (typeof GlobalObject !== \"undefined\") {\r\n (<any>GlobalObject).BABYLON = (<any>GlobalObject).BABYLON || {};\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const BABYLON = (<any>GlobalObject).BABYLON;\r\n BABYLON.GLTF2 = BABYLON.GLTF2 || {};\r\n BABYLON.GLTF2.Loader = BABYLON.GLTF2.Loader || {};\r\n BABYLON.GLTF2.Loader.Extensions = BABYLON.GLTF2.Loader.Extensions || {};\r\n\r\n const keys = [\"Loader\"];\r\n for (const key in LoaderExtensions) {\r\n BABYLON.GLTF2.Loader.Extensions[key] = (<any>LoaderExtensions)[key];\r\n keys.push(key);\r\n }\r\n for (const key in GLTF2Loader) {\r\n if (key === \"Extensions\") {\r\n continue;\r\n }\r\n\r\n BABYLON.GLTF2.Loader[key] = (<any>GLTF2Loader)[key];\r\n keys.push(key);\r\n }\r\n\r\n for (const key in GLTF2Legacy) {\r\n // Prevent Reassignment.\r\n if (keys.indexOf(key) > -1) {\r\n continue;\r\n }\r\n\r\n BABYLON.GLTF2[key] = (<any>GLTF2Legacy)[key];\r\n }\r\n}\r\n\r\nexport { GLTF2Legacy as GLTF2 };\r\n"]}
@@ -3,6 +3,6 @@ export * from "./legacy-bvhFileLoader.js";
3
3
  export * from "./legacy-dynamic.js";
4
4
  export * from "./legacy-glTF.js";
5
5
  export * from "./legacy-glTF1.js";
6
- export * from "./legacy-glTF2.js";
6
+ export { GLTF2 } from "./legacy-glTF2.js";
7
7
  export * from "./legacy-objFileLoader.js";
8
8
  export * from "./legacy-stlFileLoader.js";
package/legacy/legacy.js CHANGED
@@ -4,7 +4,7 @@ export * from "./legacy-bvhFileLoader.js";
4
4
  export * from "./legacy-dynamic.js";
5
5
  export * from "./legacy-glTF.js";
6
6
  export * from "./legacy-glTF1.js";
7
- export * from "./legacy-glTF2.js";
7
+ export { GLTF2 } from "./legacy-glTF2.js";
8
8
  export * from "./legacy-objFileLoader.js";
9
9
  export * from "./legacy-stlFileLoader.js";
10
10
  //# sourceMappingURL=legacy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"legacy.js","sourceRoot":"","sources":["../../../../dev/loaders/src/legacy/legacy.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nexport * from \"loaders/index\";\r\nexport * from \"./legacy-bvhFileLoader\";\r\nexport * from \"./legacy-dynamic\";\r\nexport * from \"./legacy-glTF\";\r\nexport * from \"./legacy-glTF1\";\r\nexport * from \"./legacy-glTF2\";\r\nexport * from \"./legacy-objFileLoader\";\r\nexport * from \"./legacy-stlFileLoader\";\r\n"]}
1
+ {"version":3,"file":"legacy.js","sourceRoot":"","sources":["../../../../dev/loaders/src/legacy/legacy.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nexport * from \"loaders/index\";\r\nexport * from \"./legacy-bvhFileLoader\";\r\nexport * from \"./legacy-dynamic\";\r\nexport * from \"./legacy-glTF\";\r\nexport * from \"./legacy-glTF1\";\r\nexport { GLTF2 } from \"./legacy-glTF2\";\r\nexport * from \"./legacy-objFileLoader\";\r\nexport * from \"./legacy-stlFileLoader\";\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/loaders",
3
- "version": "9.5.0",
3
+ "version": "9.5.1",
4
4
  "main": "index.js",
5
5
  "module": "index.js",
6
6
  "types": "index.d.ts",
@@ -18,10 +18,10 @@
18
18
  "postcompile": "build-tools -c add-js-to-es6"
19
19
  },
20
20
  "devDependencies": {
21
- "@babylonjs/core": "9.5.0",
21
+ "@babylonjs/core": "9.5.1",
22
22
  "@dev/build-tools": "^1.0.0",
23
23
  "@dev/loaders": "^1.0.0",
24
- "babylonjs-gltf2interface": "9.5.0"
24
+ "babylonjs-gltf2interface": "9.5.1"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@babylonjs/core": "^9.0.0",