@babylonjs/loaders 5.0.0-rc.7 → 5.0.0-rc.9
Sign up to get free protection for your applications and to get access to all the features.
- package/OBJ/index.d.ts +4 -4
- package/OBJ/index.js +4 -4
- package/OBJ/mtlFileLoader.d.ts +41 -41
- package/OBJ/mtlFileLoader.js +232 -232
- package/OBJ/objFileLoader.d.ts +126 -126
- package/OBJ/objFileLoader.js +296 -296
- package/OBJ/objLoadingOptions.d.ts +43 -43
- package/OBJ/objLoadingOptions.js +1 -1
- package/OBJ/solidParser.d.ts +154 -154
- package/OBJ/solidParser.js +693 -693
- package/STL/index.d.ts +1 -1
- package/STL/index.js +1 -1
- package/STL/stlFileLoader.d.ts +64 -64
- package/STL/stlFileLoader.js +233 -233
- package/glTF/1.0/glTFBinaryExtension.d.ts +13 -13
- package/glTF/1.0/glTFBinaryExtension.js +60 -60
- package/glTF/1.0/glTFLoader.d.ts +136 -136
- package/glTF/1.0/glTFLoader.js +1815 -1815
- package/glTF/1.0/glTFLoaderInterfaces.d.ts +412 -412
- package/glTF/1.0/glTFLoaderInterfaces.js +95 -95
- package/glTF/1.0/glTFLoaderUtils.d.ts +62 -62
- package/glTF/1.0/glTFLoaderUtils.js +250 -250
- package/glTF/1.0/glTFMaterialsCommonExtension.d.ts +10 -10
- package/glTF/1.0/glTFMaterialsCommonExtension.js +129 -129
- package/glTF/1.0/index.d.ts +5 -5
- package/glTF/1.0/index.js +5 -5
- package/glTF/2.0/Extensions/EXT_lights_image_based.d.ts +43 -43
- package/glTF/2.0/Extensions/EXT_lights_image_based.js +117 -117
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.d.ts +36 -36
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +88 -88
- package/glTF/2.0/Extensions/EXT_meshopt_compression.d.ts +34 -34
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js +49 -49
- package/glTF/2.0/Extensions/EXT_texture_webp.d.ts +29 -29
- package/glTF/2.0/Extensions/EXT_texture_webp.js +40 -40
- package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +50 -50
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js +73 -73
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.d.ts +39 -39
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +112 -112
- package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +36 -36
- package/glTF/2.0/Extensions/KHR_lights_punctual.js +89 -89
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +39 -39
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +94 -94
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.d.ts +38 -38
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +53 -53
- package/glTF/2.0/Extensions/KHR_materials_ior.d.ts +42 -42
- package/glTF/2.0/Extensions/KHR_materials_ior.js +62 -62
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.d.ts +38 -38
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +80 -80
- package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +39 -39
- package/glTF/2.0/Extensions/KHR_materials_sheen.js +84 -84
- package/glTF/2.0/Extensions/KHR_materials_specular.d.ts +38 -38
- package/glTF/2.0/Extensions/KHR_materials_specular.js +74 -74
- package/glTF/2.0/Extensions/KHR_materials_translucency.d.ts +39 -39
- package/glTF/2.0/Extensions/KHR_materials_translucency.js +83 -83
- package/glTF/2.0/Extensions/KHR_materials_transmission.d.ts +38 -38
- package/glTF/2.0/Extensions/KHR_materials_transmission.js +288 -288
- package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +38 -38
- package/glTF/2.0/Extensions/KHR_materials_unlit.js +73 -73
- package/glTF/2.0/Extensions/KHR_materials_variants.d.ts +87 -87
- package/glTF/2.0/Extensions/KHR_materials_variants.js +254 -254
- package/glTF/2.0/Extensions/KHR_materials_volume.d.ts +39 -39
- package/glTF/2.0/Extensions/KHR_materials_volume.js +85 -85
- package/glTF/2.0/Extensions/KHR_mesh_quantization.d.ts +22 -22
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js +23 -23
- package/glTF/2.0/Extensions/KHR_texture_basisu.d.ts +29 -29
- package/glTF/2.0/Extensions/KHR_texture_basisu.js +40 -40
- package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +33 -33
- package/glTF/2.0/Extensions/KHR_texture_transform.js +61 -61
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.d.ts +32 -32
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js +49 -49
- package/glTF/2.0/Extensions/MSFT_audio_emitter.d.ts +54 -54
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js +240 -240
- package/glTF/2.0/Extensions/MSFT_lod.d.ts +109 -109
- package/glTF/2.0/Extensions/MSFT_lod.js +369 -369
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.d.ts +14 -14
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +36 -36
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.d.ts +14 -14
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +36 -36
- package/glTF/2.0/Extensions/index.d.ts +26 -26
- package/glTF/2.0/Extensions/index.js +26 -26
- package/glTF/2.0/glTFLoader.d.ts +405 -405
- package/glTF/2.0/glTFLoader.js +2366 -2366
- package/glTF/2.0/glTFLoaderExtension.d.ts +152 -152
- package/glTF/2.0/glTFLoaderExtension.js +1 -1
- package/glTF/2.0/glTFLoaderInterfaces.d.ts +211 -211
- package/glTF/2.0/glTFLoaderInterfaces.js +1 -1
- package/glTF/2.0/index.d.ts +4 -4
- package/glTF/2.0/index.js +4 -4
- package/glTF/glTFFileLoader.d.ts +433 -433
- package/glTF/glTFFileLoader.js +927 -927
- package/glTF/glTFValidation.d.ts +29 -29
- package/glTF/glTFValidation.js +123 -123
- package/glTF/index.d.ts +5 -5
- package/glTF/index.js +5 -5
- package/index.d.ts +3 -3
- package/index.js +3 -3
- package/legacy/legacy-glTF.d.ts +2 -2
- package/legacy/legacy-glTF.js +18 -18
- package/legacy/legacy-glTF1.d.ts +2 -2
- package/legacy/legacy-glTF1.js +14 -14
- package/legacy/legacy-glTF1FileLoader.d.ts +2 -2
- package/legacy/legacy-glTF1FileLoader.js +3 -3
- package/legacy/legacy-glTF2.d.ts +2 -2
- package/legacy/legacy-glTF2.js +32 -32
- package/legacy/legacy-glTF2FileLoader.d.ts +2 -2
- package/legacy/legacy-glTF2FileLoader.js +3 -3
- package/legacy/legacy-glTFFileLoader.d.ts +3 -3
- package/legacy/legacy-glTFFileLoader.js +4 -4
- package/legacy/legacy-objFileLoader.d.ts +1 -1
- package/legacy/legacy-objFileLoader.js +12 -12
- package/legacy/legacy-stlFileLoader.d.ts +1 -1
- package/legacy/legacy-stlFileLoader.js +12 -12
- package/legacy/legacy.d.ts +6 -6
- package/legacy/legacy.js +7 -7
- package/package.json +3 -3
@@ -1,32 +1,32 @@
|
|
1
|
-
import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
2
|
-
import { GLTFLoader } from "../glTFLoader";
|
3
|
-
/**
|
4
|
-
* [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_xmp_json_ld)
|
5
|
-
* @since 5.0.0
|
6
|
-
*/
|
7
|
-
export declare class KHR_xmp_json_ld implements IGLTFLoaderExtension {
|
8
|
-
/**
|
9
|
-
* The name of this extension.
|
10
|
-
*/
|
11
|
-
readonly name = "KHR_xmp_json_ld";
|
12
|
-
/**
|
13
|
-
* Defines whether this extension is enabled.
|
14
|
-
*/
|
15
|
-
enabled: boolean;
|
16
|
-
/**
|
17
|
-
* Defines a number that determines the order the extensions are applied.
|
18
|
-
*/
|
19
|
-
order: number;
|
20
|
-
private _loader;
|
21
|
-
/**
|
22
|
-
* @param loader
|
23
|
-
* @hidden
|
24
|
-
*/
|
25
|
-
constructor(loader: GLTFLoader);
|
26
|
-
/** @hidden */
|
27
|
-
dispose(): void;
|
28
|
-
/**
|
29
|
-
* Called after the loader state changes to LOADING.
|
30
|
-
*/
|
31
|
-
onLoading(): void;
|
32
|
-
}
|
1
|
+
import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
2
|
+
import { GLTFLoader } from "../glTFLoader";
|
3
|
+
/**
|
4
|
+
* [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_xmp_json_ld)
|
5
|
+
* @since 5.0.0
|
6
|
+
*/
|
7
|
+
export declare class KHR_xmp_json_ld implements IGLTFLoaderExtension {
|
8
|
+
/**
|
9
|
+
* The name of this extension.
|
10
|
+
*/
|
11
|
+
readonly name = "KHR_xmp_json_ld";
|
12
|
+
/**
|
13
|
+
* Defines whether this extension is enabled.
|
14
|
+
*/
|
15
|
+
enabled: boolean;
|
16
|
+
/**
|
17
|
+
* Defines a number that determines the order the extensions are applied.
|
18
|
+
*/
|
19
|
+
order: number;
|
20
|
+
private _loader;
|
21
|
+
/**
|
22
|
+
* @param loader
|
23
|
+
* @hidden
|
24
|
+
*/
|
25
|
+
constructor(loader: GLTFLoader);
|
26
|
+
/** @hidden */
|
27
|
+
dispose(): void;
|
28
|
+
/**
|
29
|
+
* Called after the loader state changes to LOADING.
|
30
|
+
*/
|
31
|
+
onLoading(): void;
|
32
|
+
}
|
@@ -1,50 +1,50 @@
|
|
1
|
-
import { GLTFLoader } from "../glTFLoader
|
2
|
-
var NAME = "KHR_xmp_json_ld";
|
3
|
-
/**
|
4
|
-
* [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_xmp_json_ld)
|
5
|
-
* @since 5.0.0
|
6
|
-
*/
|
7
|
-
var KHR_xmp_json_ld = /** @class */ (function () {
|
8
|
-
/**
|
9
|
-
* @param loader
|
10
|
-
* @hidden
|
11
|
-
*/
|
12
|
-
function KHR_xmp_json_ld(loader) {
|
13
|
-
/**
|
14
|
-
* The name of this extension.
|
15
|
-
*/
|
16
|
-
this.name = NAME;
|
17
|
-
/**
|
18
|
-
* Defines a number that determines the order the extensions are applied.
|
19
|
-
*/
|
20
|
-
this.order = 100;
|
21
|
-
this._loader = loader;
|
22
|
-
this.enabled = this._loader.isExtensionUsed(NAME);
|
23
|
-
}
|
24
|
-
/** @hidden */
|
25
|
-
KHR_xmp_json_ld.prototype.dispose = function () {
|
26
|
-
this._loader = null;
|
27
|
-
};
|
28
|
-
/**
|
29
|
-
* Called after the loader state changes to LOADING.
|
30
|
-
*/
|
31
|
-
KHR_xmp_json_ld.prototype.onLoading = function () {
|
32
|
-
var _a, _b, _c;
|
33
|
-
if (this._loader.rootBabylonMesh === null) {
|
34
|
-
return;
|
35
|
-
}
|
36
|
-
var xmp_gltf = (_a = this._loader.gltf.extensions) === null || _a === void 0 ? void 0 : _a.KHR_xmp_json_ld;
|
37
|
-
var xmp_node = (_c = (_b = this._loader.gltf.asset) === null || _b === void 0 ? void 0 : _b.extensions) === null || _c === void 0 ? void 0 : _c.KHR_xmp_json_ld;
|
38
|
-
if (xmp_gltf && xmp_node) {
|
39
|
-
var packet = +xmp_node.packet;
|
40
|
-
if (xmp_gltf.packets && packet < xmp_gltf.packets.length) {
|
41
|
-
this._loader.rootBabylonMesh.metadata = this._loader.rootBabylonMesh.metadata || {};
|
42
|
-
this._loader.rootBabylonMesh.metadata.xmp = xmp_gltf.packets[packet];
|
43
|
-
}
|
44
|
-
}
|
45
|
-
};
|
46
|
-
return KHR_xmp_json_ld;
|
47
|
-
}());
|
48
|
-
export { KHR_xmp_json_ld };
|
49
|
-
GLTFLoader.RegisterExtension(NAME, function (loader) { return new KHR_xmp_json_ld(loader); });
|
1
|
+
import { GLTFLoader } from "../glTFLoader";
|
2
|
+
var NAME = "KHR_xmp_json_ld";
|
3
|
+
/**
|
4
|
+
* [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_xmp_json_ld)
|
5
|
+
* @since 5.0.0
|
6
|
+
*/
|
7
|
+
var KHR_xmp_json_ld = /** @class */ (function () {
|
8
|
+
/**
|
9
|
+
* @param loader
|
10
|
+
* @hidden
|
11
|
+
*/
|
12
|
+
function KHR_xmp_json_ld(loader) {
|
13
|
+
/**
|
14
|
+
* The name of this extension.
|
15
|
+
*/
|
16
|
+
this.name = NAME;
|
17
|
+
/**
|
18
|
+
* Defines a number that determines the order the extensions are applied.
|
19
|
+
*/
|
20
|
+
this.order = 100;
|
21
|
+
this._loader = loader;
|
22
|
+
this.enabled = this._loader.isExtensionUsed(NAME);
|
23
|
+
}
|
24
|
+
/** @hidden */
|
25
|
+
KHR_xmp_json_ld.prototype.dispose = function () {
|
26
|
+
this._loader = null;
|
27
|
+
};
|
28
|
+
/**
|
29
|
+
* Called after the loader state changes to LOADING.
|
30
|
+
*/
|
31
|
+
KHR_xmp_json_ld.prototype.onLoading = function () {
|
32
|
+
var _a, _b, _c;
|
33
|
+
if (this._loader.rootBabylonMesh === null) {
|
34
|
+
return;
|
35
|
+
}
|
36
|
+
var xmp_gltf = (_a = this._loader.gltf.extensions) === null || _a === void 0 ? void 0 : _a.KHR_xmp_json_ld;
|
37
|
+
var xmp_node = (_c = (_b = this._loader.gltf.asset) === null || _b === void 0 ? void 0 : _b.extensions) === null || _c === void 0 ? void 0 : _c.KHR_xmp_json_ld;
|
38
|
+
if (xmp_gltf && xmp_node) {
|
39
|
+
var packet = +xmp_node.packet;
|
40
|
+
if (xmp_gltf.packets && packet < xmp_gltf.packets.length) {
|
41
|
+
this._loader.rootBabylonMesh.metadata = this._loader.rootBabylonMesh.metadata || {};
|
42
|
+
this._loader.rootBabylonMesh.metadata.xmp = xmp_gltf.packets[packet];
|
43
|
+
}
|
44
|
+
}
|
45
|
+
};
|
46
|
+
return KHR_xmp_json_ld;
|
47
|
+
}());
|
48
|
+
export { KHR_xmp_json_ld };
|
49
|
+
GLTFLoader.RegisterExtension(NAME, function (loader) { return new KHR_xmp_json_ld(loader); });
|
50
50
|
//# sourceMappingURL=KHR_xmp_json_ld.js.map
|
@@ -1,54 +1,54 @@
|
|
1
|
-
import { Nullable } from "@babylonjs/core/types.js";
|
2
|
-
import { AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js";
|
3
|
-
import { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
|
4
|
-
import { IScene, INode, IAnimation } from "../glTFLoaderInterfaces";
|
5
|
-
import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
6
|
-
import { GLTFLoader } from "../glTFLoader";
|
7
|
-
/**
|
8
|
-
* [Specification](https://github.com/najadojo/glTF/tree/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter)
|
9
|
-
*/
|
10
|
-
export declare class MSFT_audio_emitter implements IGLTFLoaderExtension {
|
11
|
-
/**
|
12
|
-
* The name of this extension.
|
13
|
-
*/
|
14
|
-
readonly name = "MSFT_audio_emitter";
|
15
|
-
/**
|
16
|
-
* Defines whether this extension is enabled.
|
17
|
-
*/
|
18
|
-
enabled: boolean;
|
19
|
-
private _loader;
|
20
|
-
private _clips;
|
21
|
-
private _emitters;
|
22
|
-
/**
|
23
|
-
* @param loader
|
24
|
-
* @hidden
|
25
|
-
*/
|
26
|
-
constructor(loader: GLTFLoader);
|
27
|
-
/** @hidden */
|
28
|
-
dispose(): void;
|
29
|
-
/** @hidden */
|
30
|
-
onLoading(): void;
|
31
|
-
/**
|
32
|
-
* @param context
|
33
|
-
* @param scene
|
34
|
-
* @hidden
|
35
|
-
*/
|
36
|
-
loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>;
|
37
|
-
/**
|
38
|
-
* @param context
|
39
|
-
* @param node
|
40
|
-
* @param assign
|
41
|
-
* @hidden
|
42
|
-
*/
|
43
|
-
loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>>;
|
44
|
-
/**
|
45
|
-
* @param context
|
46
|
-
* @param animation
|
47
|
-
* @hidden
|
48
|
-
*/
|
49
|
-
loadAnimationAsync(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
|
50
|
-
private _loadClipAsync;
|
51
|
-
private _loadEmitterAsync;
|
52
|
-
private _getEventAction;
|
53
|
-
private _loadAnimationEventAsync;
|
54
|
-
}
|
1
|
+
import { Nullable } from "@babylonjs/core/types.js";
|
2
|
+
import { AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js";
|
3
|
+
import { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
|
4
|
+
import { IScene, INode, IAnimation } from "../glTFLoaderInterfaces";
|
5
|
+
import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
6
|
+
import { GLTFLoader } from "../glTFLoader";
|
7
|
+
/**
|
8
|
+
* [Specification](https://github.com/najadojo/glTF/tree/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter)
|
9
|
+
*/
|
10
|
+
export declare class MSFT_audio_emitter implements IGLTFLoaderExtension {
|
11
|
+
/**
|
12
|
+
* The name of this extension.
|
13
|
+
*/
|
14
|
+
readonly name = "MSFT_audio_emitter";
|
15
|
+
/**
|
16
|
+
* Defines whether this extension is enabled.
|
17
|
+
*/
|
18
|
+
enabled: boolean;
|
19
|
+
private _loader;
|
20
|
+
private _clips;
|
21
|
+
private _emitters;
|
22
|
+
/**
|
23
|
+
* @param loader
|
24
|
+
* @hidden
|
25
|
+
*/
|
26
|
+
constructor(loader: GLTFLoader);
|
27
|
+
/** @hidden */
|
28
|
+
dispose(): void;
|
29
|
+
/** @hidden */
|
30
|
+
onLoading(): void;
|
31
|
+
/**
|
32
|
+
* @param context
|
33
|
+
* @param scene
|
34
|
+
* @hidden
|
35
|
+
*/
|
36
|
+
loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>;
|
37
|
+
/**
|
38
|
+
* @param context
|
39
|
+
* @param node
|
40
|
+
* @param assign
|
41
|
+
* @hidden
|
42
|
+
*/
|
43
|
+
loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>>;
|
44
|
+
/**
|
45
|
+
* @param context
|
46
|
+
* @param animation
|
47
|
+
* @hidden
|
48
|
+
*/
|
49
|
+
loadAnimationAsync(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
|
50
|
+
private _loadClipAsync;
|
51
|
+
private _loadEmitterAsync;
|
52
|
+
private _getEventAction;
|
53
|
+
private _loadAnimationEventAsync;
|
54
|
+
}
|