@babylonjs/loaders 5.21.0 → 5.22.0
Sign up to get free protection for your applications and to get access to all the features.
- package/OBJ/mtlFileLoader.js +25 -27
- package/OBJ/mtlFileLoader.js.map +1 -1
- package/OBJ/objFileLoader.js +112 -124
- package/OBJ/objFileLoader.js.map +1 -1
- package/OBJ/solidParser.js +118 -125
- package/OBJ/solidParser.js.map +1 -1
- package/STL/stlFileLoader.js +61 -63
- package/STL/stlFileLoader.js.map +1 -1
- package/glTF/1.0/glTFBinaryExtension.js +26 -30
- package/glTF/1.0/glTFBinaryExtension.js.map +1 -1
- package/glTF/1.0/glTFLoader.js +409 -432
- package/glTF/1.0/glTFLoader.js.map +1 -1
- package/glTF/1.0/glTFLoaderUtils.js +33 -37
- package/glTF/1.0/glTFLoaderUtils.js.map +1 -1
- package/glTF/1.0/glTFMaterialsCommonExtension.js +27 -31
- package/glTF/1.0/glTFMaterialsCommonExtension.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_lights_image_based.js +48 -59
- package/glTF/2.0/Extensions/EXT_lights_image_based.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +24 -29
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js +13 -16
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_texture_webp.js +13 -16
- package/glTF/2.0/Extensions/EXT_texture_webp.js.map +1 -1
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js +22 -26
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_animation_pointer.js +63 -76
- package/glTF/2.0/Extensions/KHR_animation_pointer.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_animation_pointer.map.js +90 -120
- package/glTF/2.0/Extensions/KHR_animation_pointer.map.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +25 -28
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_lights_punctual.js +27 -30
- package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +25 -28
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +15 -18
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_ior.js +21 -24
- package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js +27 -31
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +24 -27
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_sheen.js +23 -26
- package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_specular.js +23 -26
- package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_translucency.js +20 -23
- package/glTF/2.0/Extensions/KHR_materials_translucency.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_transmission.js +82 -86
- package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_unlit.js +19 -22
- package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_variants.js +79 -97
- package/glTF/2.0/Extensions/KHR_materials_variants.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_volume.js +20 -23
- package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js +6 -8
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_texture_basisu.js +13 -16
- package/glTF/2.0/Extensions/KHR_texture_basisu.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_texture_transform.js +12 -15
- package/glTF/2.0/Extensions/KHR_texture_transform.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js +12 -15
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js +77 -95
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_lod.js +114 -139
- package/glTF/2.0/Extensions/MSFT_lod.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +12 -15
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +12 -15
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +1 -1
- package/glTF/2.0/glTFLoader.js +739 -823
- package/glTF/2.0/glTFLoader.js.map +1 -1
- package/glTF/glTFFileLoader.js +337 -404
- package/glTF/glTFFileLoader.js.map +1 -1
- package/glTF/glTFValidation.js +32 -39
- package/glTF/glTFValidation.js.map +1 -1
- package/legacy/legacy-glTF.js +3 -3
- package/legacy/legacy-glTF.js.map +1 -1
- package/legacy/legacy-glTF1.js +2 -2
- package/legacy/legacy-glTF1.js.map +1 -1
- package/legacy/legacy-glTF2.js +12 -12
- package/legacy/legacy-glTF2.js.map +1 -1
- package/legacy/legacy-objFileLoader.js +2 -2
- package/legacy/legacy-objFileLoader.js.map +1 -1
- package/legacy/legacy-stlFileLoader.js +2 -2
- package/legacy/legacy-stlFileLoader.js.map +1 -1
- package/package.json +3 -6
package/legacy/legacy-glTF2.js
CHANGED
@@ -6,28 +6,28 @@ import * as GLTF2 from "../glTF/2.0/index.js";
|
|
6
6
|
* This is the entry point for the UMD module.
|
7
7
|
* The entry point for a future ESM package should be index.ts
|
8
8
|
*/
|
9
|
-
|
9
|
+
const globalObject = typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : undefined;
|
10
10
|
if (typeof globalObject !== "undefined") {
|
11
11
|
globalObject.BABYLON = globalObject.BABYLON || {};
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
for (
|
18
|
-
|
12
|
+
const BABYLON = globalObject.BABYLON;
|
13
|
+
BABYLON.GLTF2 = BABYLON.GLTF2 || {};
|
14
|
+
BABYLON.GLTF2.Loader = BABYLON.GLTF2.Loader || {};
|
15
|
+
BABYLON.GLTF2.Loader.Extensions = BABYLON.GLTF2.Loader.Extensions || {};
|
16
|
+
const keys = [];
|
17
|
+
for (const key in Extensions) {
|
18
|
+
BABYLON.GLTF2.Loader.Extensions[key] = Extensions[key];
|
19
19
|
keys.push(key);
|
20
20
|
}
|
21
|
-
for (
|
22
|
-
|
21
|
+
for (const key in Interfaces) {
|
22
|
+
BABYLON.GLTF2.Loader[key] = Interfaces[key];
|
23
23
|
keys.push(key);
|
24
24
|
}
|
25
|
-
for (
|
25
|
+
for (const key in GLTF2) {
|
26
26
|
// Prevent Reassignment.
|
27
27
|
if (keys.indexOf(key) > -1) {
|
28
28
|
continue;
|
29
29
|
}
|
30
|
-
|
30
|
+
BABYLON.GLTF2[key] = GLTF2[key];
|
31
31
|
}
|
32
32
|
}
|
33
33
|
export { GLTF2 };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"legacy-glTF2.js","sourceRoot":"","sources":["../../../../../lts/loaders/generated/legacy/legacy-glTF2.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,UAAU,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAC3C;;;GAGG;AACH,
|
1
|
+
{"version":3,"file":"legacy-glTF2.js","sourceRoot":"","sources":["../../../../../lts/loa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KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;QACrB,wBAAwB;QACxB,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE;YACxB,SAAS;SACZ;QACD,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAS,KAAM,CAAC,GAAG,CAAC,CAAC;KAC1C;CACJ;AACD,OAAO,EAAE,KAAK,EAAE,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\nimport * as Extensions from \"../glTF/2.0/Extensions/index\";\nimport * as Interfaces from \"../glTF/2.0/glTFLoaderInterfaces\";\nimport * as GLTF2 from \"../glTF/2.0/index\";\n/**\n * This is the entry point for the UMD module.\n * The entry point for a future ESM package should be index.ts\n */\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\nif (typeof globalObject !== \"undefined\") {\n (<any>globalObject).BABYLON = (<any>globalObject).BABYLON || {};\n const BABYLON = (<any>globalObject).BABYLON;\n BABYLON.GLTF2 = BABYLON.GLTF2 || {};\n BABYLON.GLTF2.Loader = BABYLON.GLTF2.Loader || {};\n BABYLON.GLTF2.Loader.Extensions = BABYLON.GLTF2.Loader.Extensions || {};\n const keys = [];\n for (const key in Extensions) {\n BABYLON.GLTF2.Loader.Extensions[key] = (<any>Extensions)[key];\n keys.push(key);\n }\n for (const key in Interfaces) {\n BABYLON.GLTF2.Loader[key] = (<any>Interfaces)[key];\n keys.push(key);\n }\n for (const key in GLTF2) {\n // Prevent Reassignment.\n if (keys.indexOf(key) > -1) {\n continue;\n }\n BABYLON.GLTF2[key] = (<any>GLTF2)[key];\n }\n}\nexport { GLTF2 };\n"]}
|
@@ -4,9 +4,9 @@ import * as Loaders from "../OBJ/index.js";
|
|
4
4
|
* This is the entry point for the UMD module.
|
5
5
|
* The entry point for a future ESM package should be index.ts
|
6
6
|
*/
|
7
|
-
|
7
|
+
const globalObject = typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : undefined;
|
8
8
|
if (typeof globalObject !== "undefined") {
|
9
|
-
for (
|
9
|
+
for (const key in Loaders) {
|
10
10
|
if (!globalObject.BABYLON[key]) {
|
11
11
|
globalObject.BABYLON[key] = Loaders[key];
|
12
12
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"legacy-objFileLoader.js","sourceRoot":"","sources":["../../../../../lts/loaders/generated/legacy/legacy-objFileLoader.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC;;;GAGG;AACH,
|
1
|
+
{"version":3,"file":"legacy-objFileLoader.js","sourceRoot":"","sources":["../../../../../lts/loaders/generated/legacy/legacy-objFileLoader.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC;;;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;IACrC,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;QACvB,IAAI,CAAO,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC7B,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAS,OAAQ,CAAC,GAAG,CAAC,CAAC;SAC1D;KACJ;CACJ;AACD,cAAc,cAAc,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\nimport * as Loaders from \"../OBJ/index\";\n/**\n * This is the entry point for the UMD module.\n * The entry point for a future ESM package should be index.ts\n */\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\nif (typeof globalObject !== \"undefined\") {\n for (const key in Loaders) {\n if (!(<any>globalObject).BABYLON[key]) {\n (<any>globalObject).BABYLON[key] = (<any>Loaders)[key];\n }\n }\n}\nexport * from \"../OBJ/index\";\n"]}
|
@@ -4,9 +4,9 @@ import * as Loaders from "../STL/index.js";
|
|
4
4
|
* This is the entry point for the UMD module.
|
5
5
|
* The entry point for a future ESM package should be index.ts
|
6
6
|
*/
|
7
|
-
|
7
|
+
const globalObject = typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : undefined;
|
8
8
|
if (typeof globalObject !== "undefined") {
|
9
|
-
for (
|
9
|
+
for (const key in Loaders) {
|
10
10
|
if (!globalObject.BABYLON[key]) {
|
11
11
|
globalObject.BABYLON[key] = Loaders[key];
|
12
12
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"legacy-stlFileLoader.js","sourceRoot":"","sources":["../../../../../lts/loaders/generated/legacy/legacy-stlFileLoader.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC;;;GAGG;AACH,
|
1
|
+
{"version":3,"file":"legacy-stlFileLoader.js","sourceRoot":"","sources":["../../../../../lts/loaders/generated/legacy/legacy-stlFileLoader.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC;;;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;IACrC,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;QACvB,IAAI,CAAO,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC7B,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAS,OAAQ,CAAC,GAAG,CAAC,CAAC;SAC1D;KACJ;CACJ;AACD,cAAc,cAAc,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\nimport * as Loaders from \"../STL/index\";\n/**\n * This is the entry point for the UMD module.\n * The entry point for a future ESM package should be index.ts\n */\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\nif (typeof globalObject !== \"undefined\") {\n for (const key in Loaders) {\n if (!(<any>globalObject).BABYLON[key]) {\n (<any>globalObject).BABYLON[key] = (<any>Loaders)[key];\n }\n }\n}\nexport * from \"../STL/index\";\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@babylonjs/loaders",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.22.0",
|
4
4
|
"main": "index.js",
|
5
5
|
"module": "index.js",
|
6
6
|
"types": "index.d.ts",
|
@@ -18,14 +18,11 @@
|
|
18
18
|
"postcompile": "build-tools -c add-js-to-es6",
|
19
19
|
"prepublishOnly": "build-tools -c prepare-es6-build"
|
20
20
|
},
|
21
|
-
"dependencies": {
|
22
|
-
"tslib": "^2.4.0"
|
23
|
-
},
|
24
21
|
"devDependencies": {
|
25
|
-
"@babylonjs/core": "^5.
|
22
|
+
"@babylonjs/core": "^5.22.0",
|
26
23
|
"@dev/build-tools": "^1.0.0",
|
27
24
|
"@lts/loaders": "^1.0.0",
|
28
|
-
"babylonjs-gltf2interface": "^5.
|
25
|
+
"babylonjs-gltf2interface": "^5.22.0",
|
29
26
|
"rimraf": "^3.0.2",
|
30
27
|
"typescript": "^4.4.4"
|
31
28
|
},
|