@babylonjs/loaders 5.0.0-rc.7 → 5.0.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.
- 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/mtlFileLoader.js.map +1 -1
- package/OBJ/objFileLoader.d.ts +126 -126
- package/OBJ/objFileLoader.js +296 -296
- package/OBJ/objFileLoader.js.map +1 -1
- package/OBJ/objLoadingOptions.d.ts +43 -43
- package/OBJ/objLoadingOptions.js +1 -1
- package/OBJ/objLoadingOptions.js.map +1 -1
- package/OBJ/solidParser.d.ts +154 -154
- package/OBJ/solidParser.js +693 -693
- package/OBJ/solidParser.js.map +1 -1
- 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/STL/stlFileLoader.js.map +1 -1
- package/glTF/1.0/glTFBinaryExtension.d.ts +13 -13
- package/glTF/1.0/glTFBinaryExtension.js +60 -60
- package/glTF/1.0/glTFBinaryExtension.js.map +1 -1
- package/glTF/1.0/glTFLoader.d.ts +136 -136
- package/glTF/1.0/glTFLoader.js +1814 -1815
- package/glTF/1.0/glTFLoader.js.map +1 -1
- package/glTF/1.0/glTFLoaderInterfaces.d.ts +412 -412
- package/glTF/1.0/glTFLoaderInterfaces.js +95 -95
- package/glTF/1.0/glTFLoaderInterfaces.js.map +1 -1
- package/glTF/1.0/glTFLoaderUtils.d.ts +63 -62
- package/glTF/1.0/glTFLoaderUtils.js +250 -250
- package/glTF/1.0/glTFLoaderUtils.js.map +1 -1
- package/glTF/1.0/glTFMaterialsCommonExtension.d.ts +10 -10
- package/glTF/1.0/glTFMaterialsCommonExtension.js +129 -129
- package/glTF/1.0/glTFMaterialsCommonExtension.js.map +1 -1
- 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_lights_image_based.js.map +1 -1
- 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_mesh_gpu_instancing.js.map +1 -1
- 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_meshopt_compression.js.map +1 -1
- 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/EXT_texture_webp.js.map +1 -1
- package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +50 -50
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js +73 -73
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js.map +1 -1
- 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_draco_mesh_compression.js.map +1 -1
- 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_lights_punctual.js.map +1 -1
- 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_clearcoat.js.map +1 -1
- 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_emissive_strength.js.map +1 -1
- 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_ior.js.map +1 -1
- 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_pbrSpecularGlossiness.js.map +1 -1
- 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_sheen.js.map +1 -1
- 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_specular.js.map +1 -1
- 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_translucency.js.map +1 -1
- 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_transmission.js.map +1 -1
- 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_unlit.js.map +1 -1
- 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_variants.js.map +1 -1
- 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_materials_volume.js.map +1 -1
- 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_mesh_quantization.js.map +1 -1
- 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_basisu.js.map +1 -1
- 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_texture_transform.js.map +1 -1
- 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/KHR_xmp_json_ld.js.map +1 -1
- 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_audio_emitter.js.map +1 -1
- 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_lod.js.map +1 -1
- 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_minecraftMesh.js.map +1 -1
- 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/MSFT_sRGBFactors.js.map +1 -1
- 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 +406 -405
- package/glTF/2.0/glTFLoader.js +2366 -2366
- package/glTF/2.0/glTFLoader.js.map +1 -1
- package/glTF/2.0/glTFLoaderExtension.d.ts +152 -152
- package/glTF/2.0/glTFLoaderExtension.js +1 -1
- package/glTF/2.0/glTFLoaderExtension.js.map +1 -1
- package/glTF/2.0/glTFLoaderInterfaces.d.ts +211 -211
- package/glTF/2.0/glTFLoaderInterfaces.js +1 -1
- package/glTF/2.0/glTFLoaderInterfaces.js.map +1 -1
- package/glTF/2.0/index.d.ts +4 -4
- package/glTF/2.0/index.js +5 -4
- package/glTF/2.0/index.js.map +1 -1
- package/glTF/glTFFileLoader.d.ts +433 -433
- package/glTF/glTFFileLoader.js +927 -927
- package/glTF/glTFFileLoader.js.map +1 -1
- package/glTF/glTFValidation.d.ts +29 -29
- package/glTF/glTFValidation.js +123 -123
- package/glTF/glTFValidation.js.map +1 -1
- package/glTF/index.d.ts +5 -5
- package/glTF/index.js +6 -5
- package/glTF/index.js.map +1 -1
- package/index.d.ts +3 -3
- package/index.js +4 -3
- package/index.js.map +1 -1
- package/legacy/legacy-glTF.d.ts +2 -2
- package/legacy/legacy-glTF.js +18 -18
- package/legacy/legacy-glTF.js.map +1 -1
- package/legacy/legacy-glTF1.d.ts +2 -2
- package/legacy/legacy-glTF1.js +15 -14
- package/legacy/legacy-glTF1.js.map +1 -1
- package/legacy/legacy-glTF1FileLoader.d.ts +2 -2
- package/legacy/legacy-glTF1FileLoader.js +3 -3
- package/legacy/legacy-glTF1FileLoader.js.map +1 -1
- package/legacy/legacy-glTF2.d.ts +2 -2
- package/legacy/legacy-glTF2.js +33 -32
- package/legacy/legacy-glTF2.js.map +1 -1
- package/legacy/legacy-glTF2FileLoader.d.ts +2 -2
- package/legacy/legacy-glTF2FileLoader.js +3 -3
- package/legacy/legacy-glTF2FileLoader.js.map +1 -1
- package/legacy/legacy-glTFFileLoader.d.ts +3 -3
- package/legacy/legacy-glTFFileLoader.js +4 -4
- package/legacy/legacy-glTFFileLoader.js.map +1 -1
- package/legacy/legacy-objFileLoader.d.ts +1 -1
- package/legacy/legacy-objFileLoader.js +13 -12
- package/legacy/legacy-objFileLoader.js.map +1 -1
- package/legacy/legacy-stlFileLoader.d.ts +1 -1
- package/legacy/legacy-stlFileLoader.js +13 -12
- package/legacy/legacy-stlFileLoader.js.map +1 -1
- package/legacy/legacy.d.ts +6 -6
- package/legacy/legacy.js +8 -7
- package/legacy/legacy.js.map +1 -1
- package/license.md +71 -0
- package/package.json +25 -6
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
import { Nullable } from "@babylonjs/core/types.js";
|
|
2
|
-
import { AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js";
|
|
3
|
-
import { Material } from "@babylonjs/core/Materials/material.js";
|
|
4
|
-
import { Camera } from "@babylonjs/core/Cameras/camera.js";
|
|
5
|
-
import { Geometry } from "@babylonjs/core/Meshes/geometry.js";
|
|
6
|
-
import { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
|
|
7
|
-
import { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
|
|
8
|
-
import { Mesh } from "@babylonjs/core/Meshes/mesh.js";
|
|
9
|
-
import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
|
|
10
|
-
import { IDisposable } from "@babylonjs/core/scene.js";
|
|
11
|
-
import { IScene, INode, IMesh, ISkin, ICamera, IMeshPrimitive, IMaterial, ITextureInfo, IAnimation, ITexture, IBufferView, IBuffer } from "./glTFLoaderInterfaces";
|
|
12
|
-
import { IGLTFLoaderExtension as IGLTFBaseLoaderExtension } from "../glTFFileLoader";
|
|
13
|
-
import { IProperty } from "babylonjs-gltf2interface";
|
|
14
|
-
/**
|
|
15
|
-
* Interface for a glTF loader extension.
|
|
16
|
-
*/
|
|
17
|
-
export interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposable {
|
|
18
|
-
/**
|
|
19
|
-
* Called after the loader state changes to LOADING.
|
|
20
|
-
*/
|
|
21
|
-
onLoading?(): void;
|
|
22
|
-
/**
|
|
23
|
-
* Called after the loader state changes to READY.
|
|
24
|
-
*/
|
|
25
|
-
onReady?(): void;
|
|
26
|
-
/**
|
|
27
|
-
* Define this method to modify the default behavior when loading scenes.
|
|
28
|
-
* @param context The context when loading the asset
|
|
29
|
-
* @param scene The glTF scene property
|
|
30
|
-
* @returns A promise that resolves when the load is complete or null if not handled
|
|
31
|
-
*/
|
|
32
|
-
loadSceneAsync?(context: string, scene: IScene): Nullable<Promise<void>>;
|
|
33
|
-
/**
|
|
34
|
-
* Define this method to modify the default behavior when loading nodes.
|
|
35
|
-
* @param context The context when loading the asset
|
|
36
|
-
* @param node The glTF node property
|
|
37
|
-
* @param assign A function called synchronously after parsing the glTF properties
|
|
38
|
-
* @returns A promise that resolves with the loaded Babylon transform node when the load is complete or null if not handled
|
|
39
|
-
*/
|
|
40
|
-
loadNodeAsync?(context: string, node: INode, assign: (babylonMesh: TransformNode) => void): Nullable<Promise<TransformNode>>;
|
|
41
|
-
/**
|
|
42
|
-
* Define this method to modify the default behavior when loading cameras.
|
|
43
|
-
* @param context The context when loading the asset
|
|
44
|
-
* @param camera The glTF camera property
|
|
45
|
-
* @param assign A function called synchronously after parsing the glTF properties
|
|
46
|
-
* @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled
|
|
47
|
-
*/
|
|
48
|
-
loadCameraAsync?(context: string, camera: ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
|
|
49
|
-
/**
|
|
50
|
-
* @hidden
|
|
51
|
-
* Define this method to modify the default behavior when loading vertex data for mesh primitives.
|
|
52
|
-
* @param context The context when loading the asset
|
|
53
|
-
* @param primitive The glTF mesh primitive property
|
|
54
|
-
* @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled
|
|
55
|
-
*/
|
|
56
|
-
_loadVertexDataAsync?(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
|
|
57
|
-
/**
|
|
58
|
-
* @hidden
|
|
59
|
-
* Define this method to modify the default behavior when loading data for mesh primitives.
|
|
60
|
-
* @param context The context when loading the asset
|
|
61
|
-
* @param name The mesh name when loading the asset
|
|
62
|
-
* @param node The glTF node when loading the asset
|
|
63
|
-
* @param mesh The glTF mesh when loading the asset
|
|
64
|
-
* @param primitive The glTF mesh primitive property
|
|
65
|
-
* @param assign A function called synchronously after parsing the glTF properties
|
|
66
|
-
* @returns A promise that resolves with the loaded mesh when the load is complete or null if not handled
|
|
67
|
-
*/
|
|
68
|
-
_loadMeshPrimitiveAsync?(context: string, name: string, node: INode, mesh: IMesh, primitive: IMeshPrimitive, assign: (babylonMesh: AbstractMesh) => void): Nullable<Promise<AbstractMesh>>;
|
|
69
|
-
/**
|
|
70
|
-
* @hidden
|
|
71
|
-
* Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.
|
|
72
|
-
* @param context The context when loading the asset
|
|
73
|
-
* @param material The glTF material property
|
|
74
|
-
* @param assign A function called synchronously after parsing the glTF properties
|
|
75
|
-
* @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled
|
|
76
|
-
*/
|
|
77
|
-
_loadMaterialAsync?(context: string, material: IMaterial, babylonMesh: Nullable<Mesh>, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
|
|
78
|
-
/**
|
|
79
|
-
* Define this method to modify the default behavior when creating materials.
|
|
80
|
-
* @param context The context when loading the asset
|
|
81
|
-
* @param material The glTF material property
|
|
82
|
-
* @param babylonDrawMode The draw mode for the Babylon material
|
|
83
|
-
* @returns The Babylon material or null if not handled
|
|
84
|
-
*/
|
|
85
|
-
createMaterial?(context: string, material: IMaterial, babylonDrawMode: number): Nullable<Material>;
|
|
86
|
-
/**
|
|
87
|
-
* Define this method to modify the default behavior when loading material properties.
|
|
88
|
-
* @param context The context when loading the asset
|
|
89
|
-
* @param material The glTF material property
|
|
90
|
-
* @param babylonMaterial The Babylon material
|
|
91
|
-
* @returns A promise that resolves when the load is complete or null if not handled
|
|
92
|
-
*/
|
|
93
|
-
loadMaterialPropertiesAsync?(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
|
|
94
|
-
/**
|
|
95
|
-
* Define this method to modify the default behavior when loading texture infos.
|
|
96
|
-
* @param context The context when loading the asset
|
|
97
|
-
* @param textureInfo The glTF texture info property
|
|
98
|
-
* @param assign A function called synchronously after parsing the glTF properties
|
|
99
|
-
* @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled
|
|
100
|
-
*/
|
|
101
|
-
loadTextureInfoAsync?(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
|
|
102
|
-
/**
|
|
103
|
-
* @hidden
|
|
104
|
-
* Define this method to modify the default behavior when loading textures.
|
|
105
|
-
* @param context The context when loading the asset
|
|
106
|
-
* @param texture The glTF texture property
|
|
107
|
-
* @param assign A function called synchronously after parsing the glTF properties
|
|
108
|
-
* @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled
|
|
109
|
-
*/
|
|
110
|
-
_loadTextureAsync?(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
|
|
111
|
-
/**
|
|
112
|
-
* Define this method to modify the default behavior when loading animations.
|
|
113
|
-
* @param context The context when loading the asset
|
|
114
|
-
* @param animation The glTF animation property
|
|
115
|
-
* @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled
|
|
116
|
-
*/
|
|
117
|
-
loadAnimationAsync?(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
|
|
118
|
-
/**
|
|
119
|
-
* @hidden
|
|
120
|
-
* Define this method to modify the default behavior when loading skins.
|
|
121
|
-
* @param context The context when loading the asset
|
|
122
|
-
* @param node The glTF node property
|
|
123
|
-
* @param skin The glTF skin property
|
|
124
|
-
* @returns A promise that resolves when the load is complete or null if not handled
|
|
125
|
-
*/
|
|
126
|
-
_loadSkinAsync?(context: string, node: INode, skin: ISkin): Nullable<Promise<void>>;
|
|
127
|
-
/**
|
|
128
|
-
* @hidden
|
|
129
|
-
* Define this method to modify the default behavior when loading uris.
|
|
130
|
-
* @param context The context when loading the asset
|
|
131
|
-
* @param property The glTF property associated with the uri
|
|
132
|
-
* @param uri The uri to load
|
|
133
|
-
* @returns A promise that resolves with the loaded data when the load is complete or null if not handled
|
|
134
|
-
*/
|
|
135
|
-
_loadUriAsync?(context: string, property: IProperty, uri: string): Nullable<Promise<ArrayBufferView>>;
|
|
136
|
-
/**
|
|
137
|
-
* Define this method to modify the default behavior when loading buffer views.
|
|
138
|
-
* @param context The context when loading the asset
|
|
139
|
-
* @param bufferView The glTF buffer view property
|
|
140
|
-
* @returns A promise that resolves with the loaded data when the load is complete or null if not handled
|
|
141
|
-
*/
|
|
142
|
-
loadBufferViewAsync?(context: string, bufferView: IBufferView): Nullable<Promise<ArrayBufferView>>;
|
|
143
|
-
/**
|
|
144
|
-
* Define this method to modify the default behavior when loading buffers.
|
|
145
|
-
* @param context The context when loading the asset
|
|
146
|
-
* @param buffer The glTF buffer property
|
|
147
|
-
* @param byteOffset The byte offset to load
|
|
148
|
-
* @param byteLength The byte length to load
|
|
149
|
-
* @returns A promise that resolves with the loaded data when the load is complete or null if not handled
|
|
150
|
-
*/
|
|
151
|
-
loadBufferAsync?(context: string, buffer: IBuffer, byteOffset: number, byteLength: number): Nullable<Promise<ArrayBufferView>>;
|
|
152
|
-
}
|
|
1
|
+
import type { Nullable } from "@babylonjs/core/types.js";
|
|
2
|
+
import type { AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js";
|
|
3
|
+
import type { Material } from "@babylonjs/core/Materials/material.js";
|
|
4
|
+
import type { Camera } from "@babylonjs/core/Cameras/camera.js";
|
|
5
|
+
import type { Geometry } from "@babylonjs/core/Meshes/geometry.js";
|
|
6
|
+
import type { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
|
|
7
|
+
import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
|
|
8
|
+
import type { Mesh } from "@babylonjs/core/Meshes/mesh.js";
|
|
9
|
+
import type { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
|
|
10
|
+
import type { IDisposable } from "@babylonjs/core/scene.js";
|
|
11
|
+
import type { IScene, INode, IMesh, ISkin, ICamera, IMeshPrimitive, IMaterial, ITextureInfo, IAnimation, ITexture, IBufferView, IBuffer } from "./glTFLoaderInterfaces";
|
|
12
|
+
import type { IGLTFLoaderExtension as IGLTFBaseLoaderExtension } from "../glTFFileLoader";
|
|
13
|
+
import type { IProperty } from "babylonjs-gltf2interface/.js";
|
|
14
|
+
/**
|
|
15
|
+
* Interface for a glTF loader extension.
|
|
16
|
+
*/
|
|
17
|
+
export interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposable {
|
|
18
|
+
/**
|
|
19
|
+
* Called after the loader state changes to LOADING.
|
|
20
|
+
*/
|
|
21
|
+
onLoading?(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Called after the loader state changes to READY.
|
|
24
|
+
*/
|
|
25
|
+
onReady?(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Define this method to modify the default behavior when loading scenes.
|
|
28
|
+
* @param context The context when loading the asset
|
|
29
|
+
* @param scene The glTF scene property
|
|
30
|
+
* @returns A promise that resolves when the load is complete or null if not handled
|
|
31
|
+
*/
|
|
32
|
+
loadSceneAsync?(context: string, scene: IScene): Nullable<Promise<void>>;
|
|
33
|
+
/**
|
|
34
|
+
* Define this method to modify the default behavior when loading nodes.
|
|
35
|
+
* @param context The context when loading the asset
|
|
36
|
+
* @param node The glTF node property
|
|
37
|
+
* @param assign A function called synchronously after parsing the glTF properties
|
|
38
|
+
* @returns A promise that resolves with the loaded Babylon transform node when the load is complete or null if not handled
|
|
39
|
+
*/
|
|
40
|
+
loadNodeAsync?(context: string, node: INode, assign: (babylonMesh: TransformNode) => void): Nullable<Promise<TransformNode>>;
|
|
41
|
+
/**
|
|
42
|
+
* Define this method to modify the default behavior when loading cameras.
|
|
43
|
+
* @param context The context when loading the asset
|
|
44
|
+
* @param camera The glTF camera property
|
|
45
|
+
* @param assign A function called synchronously after parsing the glTF properties
|
|
46
|
+
* @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled
|
|
47
|
+
*/
|
|
48
|
+
loadCameraAsync?(context: string, camera: ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
|
|
49
|
+
/**
|
|
50
|
+
* @hidden
|
|
51
|
+
* Define this method to modify the default behavior when loading vertex data for mesh primitives.
|
|
52
|
+
* @param context The context when loading the asset
|
|
53
|
+
* @param primitive The glTF mesh primitive property
|
|
54
|
+
* @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled
|
|
55
|
+
*/
|
|
56
|
+
_loadVertexDataAsync?(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
|
|
57
|
+
/**
|
|
58
|
+
* @hidden
|
|
59
|
+
* Define this method to modify the default behavior when loading data for mesh primitives.
|
|
60
|
+
* @param context The context when loading the asset
|
|
61
|
+
* @param name The mesh name when loading the asset
|
|
62
|
+
* @param node The glTF node when loading the asset
|
|
63
|
+
* @param mesh The glTF mesh when loading the asset
|
|
64
|
+
* @param primitive The glTF mesh primitive property
|
|
65
|
+
* @param assign A function called synchronously after parsing the glTF properties
|
|
66
|
+
* @returns A promise that resolves with the loaded mesh when the load is complete or null if not handled
|
|
67
|
+
*/
|
|
68
|
+
_loadMeshPrimitiveAsync?(context: string, name: string, node: INode, mesh: IMesh, primitive: IMeshPrimitive, assign: (babylonMesh: AbstractMesh) => void): Nullable<Promise<AbstractMesh>>;
|
|
69
|
+
/**
|
|
70
|
+
* @hidden
|
|
71
|
+
* Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.
|
|
72
|
+
* @param context The context when loading the asset
|
|
73
|
+
* @param material The glTF material property
|
|
74
|
+
* @param assign A function called synchronously after parsing the glTF properties
|
|
75
|
+
* @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled
|
|
76
|
+
*/
|
|
77
|
+
_loadMaterialAsync?(context: string, material: IMaterial, babylonMesh: Nullable<Mesh>, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
|
|
78
|
+
/**
|
|
79
|
+
* Define this method to modify the default behavior when creating materials.
|
|
80
|
+
* @param context The context when loading the asset
|
|
81
|
+
* @param material The glTF material property
|
|
82
|
+
* @param babylonDrawMode The draw mode for the Babylon material
|
|
83
|
+
* @returns The Babylon material or null if not handled
|
|
84
|
+
*/
|
|
85
|
+
createMaterial?(context: string, material: IMaterial, babylonDrawMode: number): Nullable<Material>;
|
|
86
|
+
/**
|
|
87
|
+
* Define this method to modify the default behavior when loading material properties.
|
|
88
|
+
* @param context The context when loading the asset
|
|
89
|
+
* @param material The glTF material property
|
|
90
|
+
* @param babylonMaterial The Babylon material
|
|
91
|
+
* @returns A promise that resolves when the load is complete or null if not handled
|
|
92
|
+
*/
|
|
93
|
+
loadMaterialPropertiesAsync?(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
|
|
94
|
+
/**
|
|
95
|
+
* Define this method to modify the default behavior when loading texture infos.
|
|
96
|
+
* @param context The context when loading the asset
|
|
97
|
+
* @param textureInfo The glTF texture info property
|
|
98
|
+
* @param assign A function called synchronously after parsing the glTF properties
|
|
99
|
+
* @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled
|
|
100
|
+
*/
|
|
101
|
+
loadTextureInfoAsync?(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
|
|
102
|
+
/**
|
|
103
|
+
* @hidden
|
|
104
|
+
* Define this method to modify the default behavior when loading textures.
|
|
105
|
+
* @param context The context when loading the asset
|
|
106
|
+
* @param texture The glTF texture property
|
|
107
|
+
* @param assign A function called synchronously after parsing the glTF properties
|
|
108
|
+
* @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled
|
|
109
|
+
*/
|
|
110
|
+
_loadTextureAsync?(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
|
|
111
|
+
/**
|
|
112
|
+
* Define this method to modify the default behavior when loading animations.
|
|
113
|
+
* @param context The context when loading the asset
|
|
114
|
+
* @param animation The glTF animation property
|
|
115
|
+
* @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled
|
|
116
|
+
*/
|
|
117
|
+
loadAnimationAsync?(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
|
|
118
|
+
/**
|
|
119
|
+
* @hidden
|
|
120
|
+
* Define this method to modify the default behavior when loading skins.
|
|
121
|
+
* @param context The context when loading the asset
|
|
122
|
+
* @param node The glTF node property
|
|
123
|
+
* @param skin The glTF skin property
|
|
124
|
+
* @returns A promise that resolves when the load is complete or null if not handled
|
|
125
|
+
*/
|
|
126
|
+
_loadSkinAsync?(context: string, node: INode, skin: ISkin): Nullable<Promise<void>>;
|
|
127
|
+
/**
|
|
128
|
+
* @hidden
|
|
129
|
+
* Define this method to modify the default behavior when loading uris.
|
|
130
|
+
* @param context The context when loading the asset
|
|
131
|
+
* @param property The glTF property associated with the uri
|
|
132
|
+
* @param uri The uri to load
|
|
133
|
+
* @returns A promise that resolves with the loaded data when the load is complete or null if not handled
|
|
134
|
+
*/
|
|
135
|
+
_loadUriAsync?(context: string, property: IProperty, uri: string): Nullable<Promise<ArrayBufferView>>;
|
|
136
|
+
/**
|
|
137
|
+
* Define this method to modify the default behavior when loading buffer views.
|
|
138
|
+
* @param context The context when loading the asset
|
|
139
|
+
* @param bufferView The glTF buffer view property
|
|
140
|
+
* @returns A promise that resolves with the loaded data when the load is complete or null if not handled
|
|
141
|
+
*/
|
|
142
|
+
loadBufferViewAsync?(context: string, bufferView: IBufferView): Nullable<Promise<ArrayBufferView>>;
|
|
143
|
+
/**
|
|
144
|
+
* Define this method to modify the default behavior when loading buffers.
|
|
145
|
+
* @param context The context when loading the asset
|
|
146
|
+
* @param buffer The glTF buffer property
|
|
147
|
+
* @param byteOffset The byte offset to load
|
|
148
|
+
* @param byteLength The byte length to load
|
|
149
|
+
* @returns A promise that resolves with the loaded data when the load is complete or null if not handled
|
|
150
|
+
*/
|
|
151
|
+
loadBufferAsync?(context: string, buffer: IBuffer, byteOffset: number, byteLength: number): Nullable<Promise<ArrayBufferView>>;
|
|
152
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=glTFLoaderExtension.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glTFLoaderExtension.js","sourceRoot":"","sources":["../../../../../../lts/loaders/generated/glTF/2.0/glTFLoaderExtension.ts"],"names":[],"mappings":"","sourcesContent":["import { Nullable } from \"core/types\";\r\nimport { AnimationGroup } from \"core/Animations/animationGroup\";\r\nimport { Material } from \"core/Materials/material\";\r\nimport { Camera } from \"core/Cameras/camera\";\r\nimport { Geometry } from \"core/Meshes/geometry\";\r\nimport { TransformNode } from \"core/Meshes/transformNode\";\r\nimport { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport { Mesh } from \"core/Meshes/mesh\";\r\nimport { AbstractMesh } from \"core/Meshes/abstractMesh\";\r\nimport { IDisposable } from \"core/scene\";\r\nimport { IScene, INode, IMesh, ISkin, ICamera, IMeshPrimitive, IMaterial, ITextureInfo, IAnimation, ITexture, IBufferView, IBuffer } from \"./glTFLoaderInterfaces\";\r\nimport { IGLTFLoaderExtension as IGLTFBaseLoaderExtension } from \"../glTFFileLoader\";\r\nimport { IProperty } from \"babylonjs-gltf2interface\";\r\n\r\n/**\r\n * Interface for a glTF loader extension.\r\n */\r\nexport interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposable {\r\n /**\r\n * Called after the loader state changes to LOADING.\r\n */\r\n onLoading?(): void;\r\n\r\n /**\r\n * Called after the loader state changes to READY.\r\n */\r\n onReady?(): void;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading scenes.\r\n * @param context The context when loading the asset\r\n * @param scene The glTF scene property\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n loadSceneAsync?(context: string, scene: IScene): Nullable<Promise<void>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading nodes.\r\n * @param context The context when loading the asset\r\n * @param node The glTF node property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon transform node when the load is complete or null if not handled\r\n */\r\n loadNodeAsync?(context: string, node: INode, assign: (babylonMesh: TransformNode) => void): Nullable<Promise<TransformNode>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading cameras.\r\n * @param context The context when loading the asset\r\n * @param camera The glTF camera property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled\r\n */\r\n loadCameraAsync?(context: string, camera: ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading vertex data for mesh primitives.\r\n * @param context The context when loading the asset\r\n * @param primitive The glTF mesh primitive property\r\n * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled\r\n */\r\n _loadVertexDataAsync?(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading data for mesh primitives.\r\n * @param context The context when loading the asset\r\n * @param name The mesh name when loading the asset\r\n * @param node The glTF node when loading the asset\r\n * @param mesh The glTF mesh when loading the asset\r\n * @param primitive The glTF mesh primitive property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded mesh when the load is complete or null if not handled\r\n */\r\n _loadMeshPrimitiveAsync?(\r\n context: string,\r\n name: string,\r\n node: INode,\r\n mesh: IMesh,\r\n primitive: IMeshPrimitive,\r\n assign: (babylonMesh: AbstractMesh) => void\r\n ): Nullable<Promise<AbstractMesh>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled\r\n */\r\n _loadMaterialAsync?(\r\n context: string,\r\n material: IMaterial,\r\n babylonMesh: Nullable<Mesh>,\r\n babylonDrawMode: number,\r\n assign: (babylonMaterial: Material) => void\r\n ): Nullable<Promise<Material>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when creating materials.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param babylonDrawMode The draw mode for the Babylon material\r\n * @returns The Babylon material or null if not handled\r\n */\r\n createMaterial?(context: string, material: IMaterial, babylonDrawMode: number): Nullable<Material>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading material properties.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param babylonMaterial The Babylon material\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n loadMaterialPropertiesAsync?(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading texture infos.\r\n * @param context The context when loading the asset\r\n * @param textureInfo The glTF texture info property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled\r\n */\r\n loadTextureInfoAsync?(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading textures.\r\n * @param context The context when loading the asset\r\n * @param texture The glTF texture property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled\r\n */\r\n _loadTextureAsync?(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading animations.\r\n * @param context The context when loading the asset\r\n * @param animation The glTF animation property\r\n * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled\r\n */\r\n loadAnimationAsync?(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading skins.\r\n * @param context The context when loading the asset\r\n * @param node The glTF node property\r\n * @param skin The glTF skin property\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n _loadSkinAsync?(context: string, node: INode, skin: ISkin): Nullable<Promise<void>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading uris.\r\n * @param context The context when loading the asset\r\n * @param property The glTF property associated with the uri\r\n * @param uri The uri to load\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n _loadUriAsync?(context: string, property: IProperty, uri: string): Nullable<Promise<ArrayBufferView>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading buffer views.\r\n * @param context The context when loading the asset\r\n * @param bufferView The glTF buffer view property\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n loadBufferViewAsync?(context: string, bufferView: IBufferView): Nullable<Promise<ArrayBufferView>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading buffers.\r\n * @param context The context when loading the asset\r\n * @param buffer The glTF buffer property\r\n * @param byteOffset The byte offset to load\r\n * @param byteLength The byte length to load\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n loadBufferAsync?(context: string, buffer: IBuffer, byteOffset: number, byteLength: number): Nullable<Promise<ArrayBufferView>>;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"glTFLoaderExtension.js","sourceRoot":"","sources":["../../../../../../lts/loaders/generated/glTF/2.0/glTFLoaderExtension.ts"],"names":[],"mappings":"","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport type { AnimationGroup } from \"core/Animations/animationGroup\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { Camera } from \"core/Cameras/camera\";\r\nimport type { Geometry } from \"core/Meshes/geometry\";\r\nimport type { TransformNode } from \"core/Meshes/transformNode\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { Mesh } from \"core/Meshes/mesh\";\r\nimport type { AbstractMesh } from \"core/Meshes/abstractMesh\";\r\nimport type { IDisposable } from \"core/scene\";\r\nimport type { IScene, INode, IMesh, ISkin, ICamera, IMeshPrimitive, IMaterial, ITextureInfo, IAnimation, ITexture, IBufferView, IBuffer } from \"./glTFLoaderInterfaces\";\r\nimport type { IGLTFLoaderExtension as IGLTFBaseLoaderExtension } from \"../glTFFileLoader\";\r\nimport type { IProperty } from \"babylonjs-gltf2interface\";\r\n\r\n/**\r\n * Interface for a glTF loader extension.\r\n */\r\nexport interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposable {\r\n /**\r\n * Called after the loader state changes to LOADING.\r\n */\r\n onLoading?(): void;\r\n\r\n /**\r\n * Called after the loader state changes to READY.\r\n */\r\n onReady?(): void;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading scenes.\r\n * @param context The context when loading the asset\r\n * @param scene The glTF scene property\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n loadSceneAsync?(context: string, scene: IScene): Nullable<Promise<void>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading nodes.\r\n * @param context The context when loading the asset\r\n * @param node The glTF node property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon transform node when the load is complete or null if not handled\r\n */\r\n loadNodeAsync?(context: string, node: INode, assign: (babylonMesh: TransformNode) => void): Nullable<Promise<TransformNode>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading cameras.\r\n * @param context The context when loading the asset\r\n * @param camera The glTF camera property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled\r\n */\r\n loadCameraAsync?(context: string, camera: ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading vertex data for mesh primitives.\r\n * @param context The context when loading the asset\r\n * @param primitive The glTF mesh primitive property\r\n * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled\r\n */\r\n _loadVertexDataAsync?(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading data for mesh primitives.\r\n * @param context The context when loading the asset\r\n * @param name The mesh name when loading the asset\r\n * @param node The glTF node when loading the asset\r\n * @param mesh The glTF mesh when loading the asset\r\n * @param primitive The glTF mesh primitive property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded mesh when the load is complete or null if not handled\r\n */\r\n _loadMeshPrimitiveAsync?(\r\n context: string,\r\n name: string,\r\n node: INode,\r\n mesh: IMesh,\r\n primitive: IMeshPrimitive,\r\n assign: (babylonMesh: AbstractMesh) => void\r\n ): Nullable<Promise<AbstractMesh>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled\r\n */\r\n _loadMaterialAsync?(\r\n context: string,\r\n material: IMaterial,\r\n babylonMesh: Nullable<Mesh>,\r\n babylonDrawMode: number,\r\n assign: (babylonMaterial: Material) => void\r\n ): Nullable<Promise<Material>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when creating materials.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param babylonDrawMode The draw mode for the Babylon material\r\n * @returns The Babylon material or null if not handled\r\n */\r\n createMaterial?(context: string, material: IMaterial, babylonDrawMode: number): Nullable<Material>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading material properties.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param babylonMaterial The Babylon material\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n loadMaterialPropertiesAsync?(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading texture infos.\r\n * @param context The context when loading the asset\r\n * @param textureInfo The glTF texture info property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled\r\n */\r\n loadTextureInfoAsync?(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading textures.\r\n * @param context The context when loading the asset\r\n * @param texture The glTF texture property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled\r\n */\r\n _loadTextureAsync?(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading animations.\r\n * @param context The context when loading the asset\r\n * @param animation The glTF animation property\r\n * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled\r\n */\r\n loadAnimationAsync?(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading skins.\r\n * @param context The context when loading the asset\r\n * @param node The glTF node property\r\n * @param skin The glTF skin property\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n _loadSkinAsync?(context: string, node: INode, skin: ISkin): Nullable<Promise<void>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading uris.\r\n * @param context The context when loading the asset\r\n * @param property The glTF property associated with the uri\r\n * @param uri The uri to load\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n _loadUriAsync?(context: string, property: IProperty, uri: string): Nullable<Promise<ArrayBufferView>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading buffer views.\r\n * @param context The context when loading the asset\r\n * @param bufferView The glTF buffer view property\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n loadBufferViewAsync?(context: string, bufferView: IBufferView): Nullable<Promise<ArrayBufferView>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading buffers.\r\n * @param context The context when loading the asset\r\n * @param buffer The glTF buffer property\r\n * @param byteOffset The byte offset to load\r\n * @param byteLength The byte length to load\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n loadBufferAsync?(context: string, buffer: IBuffer, byteOffset: number, byteLength: number): Nullable<Promise<ArrayBufferView>>;\r\n}\r\n"]}
|