@babylonjs/loaders 5.0.0-rc.1 → 5.0.0-rc.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. package/OBJ/index.d.ts +4 -4
  2. package/OBJ/index.js +4 -4
  3. package/OBJ/index.js.map +1 -1
  4. package/OBJ/mtlFileLoader.d.ts +41 -40
  5. package/OBJ/mtlFileLoader.js +232 -231
  6. package/OBJ/mtlFileLoader.js.map +1 -1
  7. package/OBJ/objFileLoader.d.ts +126 -133
  8. package/OBJ/objFileLoader.js +296 -300
  9. package/OBJ/objFileLoader.js.map +1 -1
  10. package/OBJ/objLoadingOptions.d.ts +43 -43
  11. package/OBJ/objLoadingOptions.js +1 -1
  12. package/OBJ/objLoadingOptions.js.map +1 -1
  13. package/OBJ/solidParser.d.ts +154 -153
  14. package/OBJ/solidParser.js +693 -699
  15. package/OBJ/solidParser.js.map +1 -1
  16. package/STL/index.d.ts +1 -1
  17. package/STL/index.js +1 -1
  18. package/STL/index.js.map +1 -1
  19. package/STL/stlFileLoader.d.ts +64 -71
  20. package/STL/stlFileLoader.js +233 -239
  21. package/STL/stlFileLoader.js.map +1 -1
  22. package/glTF/1.0/glTFBinaryExtension.d.ts +13 -13
  23. package/glTF/1.0/glTFBinaryExtension.js +60 -61
  24. package/glTF/1.0/glTFBinaryExtension.js.map +1 -1
  25. package/glTF/1.0/glTFLoader.d.ts +136 -106
  26. package/glTF/1.0/glTFLoader.js +1814 -1696
  27. package/glTF/1.0/glTFLoader.js.map +1 -1
  28. package/glTF/1.0/glTFLoaderInterfaces.d.ts +412 -412
  29. package/glTF/1.0/glTFLoaderInterfaces.js +95 -95
  30. package/glTF/1.0/glTFLoaderInterfaces.js.map +1 -1
  31. package/glTF/1.0/glTFLoaderUtils.d.ts +63 -62
  32. package/glTF/1.0/glTFLoaderUtils.js +250 -232
  33. package/glTF/1.0/glTFLoaderUtils.js.map +1 -1
  34. package/glTF/1.0/glTFMaterialsCommonExtension.d.ts +10 -10
  35. package/glTF/1.0/glTFMaterialsCommonExtension.js +129 -127
  36. package/glTF/1.0/glTFMaterialsCommonExtension.js.map +1 -1
  37. package/glTF/1.0/index.d.ts +5 -5
  38. package/glTF/1.0/index.js +5 -5
  39. package/glTF/1.0/index.js.map +1 -1
  40. package/glTF/2.0/Extensions/EXT_lights_image_based.d.ts +43 -36
  41. package/glTF/2.0/Extensions/EXT_lights_image_based.js +117 -110
  42. package/glTF/2.0/Extensions/EXT_lights_image_based.js.map +1 -1
  43. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.d.ts +36 -28
  44. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +88 -80
  45. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js.map +1 -1
  46. package/glTF/2.0/Extensions/EXT_meshopt_compression.d.ts +34 -27
  47. package/glTF/2.0/Extensions/EXT_meshopt_compression.js +49 -42
  48. package/glTF/2.0/Extensions/EXT_meshopt_compression.js.map +1 -1
  49. package/glTF/2.0/Extensions/EXT_texture_webp.d.ts +29 -21
  50. package/glTF/2.0/Extensions/EXT_texture_webp.js +40 -32
  51. package/glTF/2.0/Extensions/EXT_texture_webp.js.map +1 -1
  52. package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +50 -32
  53. package/glTF/2.0/Extensions/ExtrasAsMetadata.js +73 -55
  54. package/glTF/2.0/Extensions/ExtrasAsMetadata.js.map +1 -1
  55. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.d.ts +39 -31
  56. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +112 -101
  57. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js.map +1 -1
  58. package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +36 -28
  59. package/glTF/2.0/Extensions/KHR_lights_punctual.js +89 -81
  60. package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +1 -1
  61. package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +39 -31
  62. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +94 -86
  63. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -1
  64. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.d.ts +38 -30
  65. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +53 -45
  66. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -1
  67. package/glTF/2.0/Extensions/KHR_materials_ior.d.ts +42 -34
  68. package/glTF/2.0/Extensions/KHR_materials_ior.js +62 -54
  69. package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -1
  70. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.d.ts +38 -30
  71. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +80 -72
  72. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js.map +1 -1
  73. package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +39 -31
  74. package/glTF/2.0/Extensions/KHR_materials_sheen.js +84 -76
  75. package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -1
  76. package/glTF/2.0/Extensions/KHR_materials_specular.d.ts +38 -30
  77. package/glTF/2.0/Extensions/KHR_materials_specular.js +74 -66
  78. package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -1
  79. package/glTF/2.0/Extensions/KHR_materials_translucency.d.ts +39 -31
  80. package/glTF/2.0/Extensions/KHR_materials_translucency.js +83 -76
  81. package/glTF/2.0/Extensions/KHR_materials_translucency.js.map +1 -1
  82. package/glTF/2.0/Extensions/KHR_materials_transmission.d.ts +38 -30
  83. package/glTF/2.0/Extensions/KHR_materials_transmission.js +288 -277
  84. package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -1
  85. package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +38 -30
  86. package/glTF/2.0/Extensions/KHR_materials_unlit.js +73 -65
  87. package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -1
  88. package/glTF/2.0/Extensions/KHR_materials_variants.d.ts +87 -76
  89. package/glTF/2.0/Extensions/KHR_materials_variants.js +254 -243
  90. package/glTF/2.0/Extensions/KHR_materials_variants.js.map +1 -1
  91. package/glTF/2.0/Extensions/KHR_materials_volume.d.ts +39 -31
  92. package/glTF/2.0/Extensions/KHR_materials_volume.js +85 -78
  93. package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -1
  94. package/glTF/2.0/Extensions/KHR_mesh_quantization.d.ts +22 -19
  95. package/glTF/2.0/Extensions/KHR_mesh_quantization.js +23 -21
  96. package/glTF/2.0/Extensions/KHR_mesh_quantization.js.map +1 -1
  97. package/glTF/2.0/Extensions/KHR_texture_basisu.d.ts +29 -21
  98. package/glTF/2.0/Extensions/KHR_texture_basisu.js +40 -32
  99. package/glTF/2.0/Extensions/KHR_texture_basisu.js.map +1 -1
  100. package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +33 -25
  101. package/glTF/2.0/Extensions/KHR_texture_transform.js +61 -53
  102. package/glTF/2.0/Extensions/KHR_texture_transform.js.map +1 -1
  103. package/glTF/2.0/Extensions/KHR_xmp_json_ld.d.ts +32 -29
  104. package/glTF/2.0/Extensions/KHR_xmp_json_ld.js +49 -46
  105. package/glTF/2.0/Extensions/KHR_xmp_json_ld.js.map +1 -1
  106. package/glTF/2.0/Extensions/MSFT_audio_emitter.d.ts +54 -38
  107. package/glTF/2.0/Extensions/MSFT_audio_emitter.js +240 -216
  108. package/glTF/2.0/Extensions/MSFT_audio_emitter.js.map +1 -1
  109. package/glTF/2.0/Extensions/MSFT_lod.d.ts +109 -75
  110. package/glTF/2.0/Extensions/MSFT_lod.js +369 -333
  111. package/glTF/2.0/Extensions/MSFT_lod.js.map +1 -1
  112. package/glTF/2.0/Extensions/MSFT_minecraftMesh.d.ts +14 -14
  113. package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +36 -36
  114. package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +1 -1
  115. package/glTF/2.0/Extensions/MSFT_sRGBFactors.d.ts +14 -14
  116. package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +36 -36
  117. package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +1 -1
  118. package/glTF/2.0/Extensions/index.d.ts +26 -26
  119. package/glTF/2.0/Extensions/index.js +26 -26
  120. package/glTF/2.0/Extensions/index.js.map +1 -1
  121. package/glTF/2.0/glTFLoader.d.ts +406 -357
  122. package/glTF/2.0/glTFLoader.js +2366 -2266
  123. package/glTF/2.0/glTFLoader.js.map +1 -1
  124. package/glTF/2.0/glTFLoaderExtension.d.ts +152 -152
  125. package/glTF/2.0/glTFLoaderExtension.js +1 -1
  126. package/glTF/2.0/glTFLoaderExtension.js.map +1 -1
  127. package/glTF/2.0/glTFLoaderInterfaces.d.ts +211 -209
  128. package/glTF/2.0/glTFLoaderInterfaces.js +1 -1
  129. package/glTF/2.0/glTFLoaderInterfaces.js.map +1 -1
  130. package/glTF/2.0/index.d.ts +4 -4
  131. package/glTF/2.0/index.js +5 -4
  132. package/glTF/2.0/index.js.map +1 -1
  133. package/glTF/glTFFileLoader.d.ts +433 -373
  134. package/glTF/glTFFileLoader.js +927 -870
  135. package/glTF/glTFFileLoader.js.map +1 -1
  136. package/glTF/glTFValidation.d.ts +29 -29
  137. package/glTF/glTFValidation.js +123 -121
  138. package/glTF/glTFValidation.js.map +1 -1
  139. package/glTF/index.d.ts +5 -5
  140. package/glTF/index.js +6 -5
  141. package/glTF/index.js.map +1 -1
  142. package/index.d.ts +3 -3
  143. package/index.js +4 -3
  144. package/index.js.map +1 -1
  145. package/legacy/legacy-glTF.d.ts +2 -2
  146. package/legacy/legacy-glTF.js +18 -18
  147. package/legacy/legacy-glTF.js.map +1 -1
  148. package/legacy/legacy-glTF1.d.ts +2 -2
  149. package/legacy/legacy-glTF1.js +15 -14
  150. package/legacy/legacy-glTF1.js.map +1 -1
  151. package/legacy/legacy-glTF1FileLoader.d.ts +2 -2
  152. package/legacy/legacy-glTF1FileLoader.js +3 -2
  153. package/legacy/legacy-glTF1FileLoader.js.map +1 -1
  154. package/legacy/legacy-glTF2.d.ts +2 -2
  155. package/legacy/legacy-glTF2.js +33 -32
  156. package/legacy/legacy-glTF2.js.map +1 -1
  157. package/legacy/legacy-glTF2FileLoader.d.ts +2 -2
  158. package/legacy/legacy-glTF2FileLoader.js +3 -2
  159. package/legacy/legacy-glTF2FileLoader.js.map +1 -1
  160. package/legacy/legacy-glTFFileLoader.d.ts +3 -3
  161. package/legacy/legacy-glTFFileLoader.js +4 -3
  162. package/legacy/legacy-glTFFileLoader.js.map +1 -1
  163. package/legacy/legacy-objFileLoader.d.ts +1 -1
  164. package/legacy/legacy-objFileLoader.js +13 -12
  165. package/legacy/legacy-objFileLoader.js.map +1 -1
  166. package/legacy/legacy-stlFileLoader.d.ts +1 -1
  167. package/legacy/legacy-stlFileLoader.js +13 -12
  168. package/legacy/legacy-stlFileLoader.js.map +1 -1
  169. package/legacy/legacy.d.ts +6 -6
  170. package/legacy/legacy.js +8 -6
  171. package/legacy/legacy.js.map +1 -1
  172. package/package.json +23 -198
  173. package/readme.md +2 -2
@@ -1,357 +1,406 @@
1
- import { Nullable } from "@babylonjs/core/types";
2
- import { Camera } from "@babylonjs/core/Cameras/camera";
3
- import { AnimationGroup } from "@babylonjs/core/Animations/animationGroup";
4
- import { Material } from "@babylonjs/core/Materials/material";
5
- import { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture";
6
- import { TransformNode } from "@babylonjs/core/Meshes/transformNode";
7
- import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh";
8
- import { Mesh } from "@babylonjs/core/Meshes/mesh";
9
- import { ISceneLoaderAsyncResult, ISceneLoaderProgressEvent } from "@babylonjs/core/Loading/sceneLoader";
10
- import { Scene } from "@babylonjs/core/scene";
11
- import { IProperty } from "babylonjs-gltf2interface";
12
- import { IGLTF, ISampler, INode, IScene, IMesh, IAccessor, ICamera, IAnimation, IAnimationChannel, IBuffer, IBufferView, IMaterial, ITextureInfo, ITexture, IImage, IMeshPrimitive, IArrayItem as IArrItem } from "./glTFLoaderInterfaces";
13
- import { IGLTFLoaderExtension } from "./glTFLoaderExtension";
14
- import { IGLTFLoader, GLTFFileLoader, IGLTFLoaderData } from "../glTFFileLoader";
15
- import { IAnimatable } from '@babylonjs/core/Animations/animatable.interface';
16
- import { IDataBuffer } from '@babylonjs/core/Misc/dataReader';
17
- import { Light } from '@babylonjs/core/Lights/light';
18
- import { AssetContainer } from "@babylonjs/core/assetContainer";
19
- /**
20
- * Helper class for working with arrays when loading the glTF asset
21
- */
22
- export declare class ArrayItem {
23
- /**
24
- * Gets an item from the given array.
25
- * @param context The context when loading the asset
26
- * @param array The array to get the item from
27
- * @param index The index to the array
28
- * @returns The array item
29
- */
30
- static Get<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T;
31
- /**
32
- * Assign an `index` field to each item of the given array.
33
- * @param array The array of items
34
- */
35
- static Assign(array?: IArrItem[]): void;
36
- }
37
- /**
38
- * The glTF 2.0 loader
39
- */
40
- export declare class GLTFLoader implements IGLTFLoader {
41
- /** @hidden */
42
- _completePromises: Promise<any>[];
43
- /** @hidden */
44
- _assetContainer: Nullable<AssetContainer>;
45
- /** Storage */
46
- _babylonLights: Light[];
47
- /** @hidden */
48
- _disableInstancedMesh: number;
49
- private readonly _parent;
50
- private readonly _extensions;
51
- private _disposed;
52
- private _rootUrl;
53
- private _fileName;
54
- private _uniqueRootUrl;
55
- private _gltf;
56
- private _bin;
57
- private _babylonScene;
58
- private _rootBabylonMesh;
59
- private _defaultBabylonMaterialData;
60
- private _postSceneLoadActions;
61
- private static _RegisteredExtensions;
62
- /**
63
- * The default glTF sampler.
64
- */
65
- static readonly DefaultSampler: ISampler;
66
- /**
67
- * Registers a loader extension.
68
- * @param name The name of the loader extension.
69
- * @param factory The factory function that creates the loader extension.
70
- */
71
- static RegisterExtension(name: string, factory: (loader: GLTFLoader) => IGLTFLoaderExtension): void;
72
- /**
73
- * Unregisters a loader extension.
74
- * @param name The name of the loader extension.
75
- * @returns A boolean indicating whether the extension has been unregistered
76
- */
77
- static UnregisterExtension(name: string): boolean;
78
- /**
79
- * The object that represents the glTF JSON.
80
- */
81
- get gltf(): IGLTF;
82
- /**
83
- * The BIN chunk of a binary glTF.
84
- */
85
- get bin(): Nullable<IDataBuffer>;
86
- /**
87
- * The parent file loader.
88
- */
89
- get parent(): GLTFFileLoader;
90
- /**
91
- * The Babylon scene when loading the asset.
92
- */
93
- get babylonScene(): Scene;
94
- /**
95
- * The root Babylon mesh when loading the asset.
96
- */
97
- get rootBabylonMesh(): Nullable<Mesh>;
98
- /** @hidden */
99
- constructor(parent: GLTFFileLoader);
100
- /** @hidden */
101
- dispose(): void;
102
- /** @hidden */
103
- importMeshAsync(meshesNames: any, scene: Scene, container: Nullable<AssetContainer>, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
104
- /** @hidden */
105
- loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<void>;
106
- private _loadAsync;
107
- private _loadData;
108
- private _setupData;
109
- private _loadExtensions;
110
- private _checkExtensions;
111
- private _createRootNode;
112
- /**
113
- * Loads a glTF scene.
114
- * @param context The context when loading the asset
115
- * @param scene The glTF scene property
116
- * @returns A promise that resolves when the load is complete
117
- */
118
- loadSceneAsync(context: string, scene: IScene): Promise<void>;
119
- private _forEachPrimitive;
120
- private _getGeometries;
121
- private _getMeshes;
122
- private _getTransformNodes;
123
- private _getSkeletons;
124
- private _getAnimationGroups;
125
- private _startAnimations;
126
- /**
127
- * Loads a glTF node.
128
- * @param context The context when loading the asset
129
- * @param node The glTF node property
130
- * @param assign A function called synchronously after parsing the glTF properties
131
- * @returns A promise that resolves with the loaded Babylon mesh when the load is complete
132
- */
133
- loadNodeAsync(context: string, node: INode, assign?: (babylonTransformNode: TransformNode) => void): Promise<TransformNode>;
134
- private _loadMeshAsync;
135
- /**
136
- * @hidden Define this method to modify the default behavior when loading data for mesh primitives.
137
- * @param context The context when loading the asset
138
- * @param name The mesh name when loading the asset
139
- * @param node The glTF node when loading the asset
140
- * @param mesh The glTF mesh when loading the asset
141
- * @param primitive The glTF mesh primitive property
142
- * @param assign A function called synchronously after parsing the glTF properties
143
- * @returns A promise that resolves with the loaded mesh when the load is complete or null if not handled
144
- */
145
- _loadMeshPrimitiveAsync(context: string, name: string, node: INode, mesh: IMesh, primitive: IMeshPrimitive, assign: (babylonMesh: AbstractMesh) => void): Promise<AbstractMesh>;
146
- private _loadVertexDataAsync;
147
- private _createMorphTargets;
148
- private _loadMorphTargetsAsync;
149
- private _loadMorphTargetVertexDataAsync;
150
- private static _LoadTransform;
151
- private _loadSkinAsync;
152
- private _loadBones;
153
- private _findSkeletonRootNode;
154
- private _loadBone;
155
- private _loadSkinInverseBindMatricesDataAsync;
156
- private _updateBoneMatrices;
157
- private _getNodeMatrix;
158
- /**
159
- * Loads a glTF camera.
160
- * @param context The context when loading the asset
161
- * @param camera The glTF camera property
162
- * @param assign A function called synchronously after parsing the glTF properties
163
- * @returns A promise that resolves with the loaded Babylon camera when the load is complete
164
- */
165
- loadCameraAsync(context: string, camera: ICamera, assign?: (babylonCamera: Camera) => void): Promise<Camera>;
166
- private _loadAnimationsAsync;
167
- /**
168
- * Loads a glTF animation.
169
- * @param context The context when loading the asset
170
- * @param animation The glTF animation property
171
- * @returns A promise that resolves with the loaded Babylon animation group when the load is complete
172
- */
173
- loadAnimationAsync(context: string, animation: IAnimation): Promise<AnimationGroup>;
174
- /**
175
- * @hidden Loads a glTF animation channel.
176
- * @param context The context when loading the asset
177
- * @param animationContext The context of the animation when loading the asset
178
- * @param animation The glTF animation property
179
- * @param channel The glTF animation channel property
180
- * @param babylonAnimationGroup The babylon animation group property
181
- * @param animationTargetOverride The babylon animation channel target override property. My be null.
182
- * @returns A void promise when the channel load is complete
183
- */
184
- _loadAnimationChannelAsync(context: string, animationContext: string, animation: IAnimation, channel: IAnimationChannel, babylonAnimationGroup: AnimationGroup, animationTargetOverride?: Nullable<IAnimatable>): Promise<void>;
185
- private _loadAnimationSamplerAsync;
186
- /**
187
- * Loads a glTF buffer.
188
- * @param context The context when loading the asset
189
- * @param buffer The glTF buffer property
190
- * @param byteOffset The byte offset to use
191
- * @param byteLength The byte length to use
192
- * @returns A promise that resolves with the loaded data when the load is complete
193
- */
194
- loadBufferAsync(context: string, buffer: IBuffer, byteOffset: number, byteLength: number): Promise<ArrayBufferView>;
195
- /**
196
- * Loads a glTF buffer view.
197
- * @param context The context when loading the asset
198
- * @param bufferView The glTF buffer view property
199
- * @returns A promise that resolves with the loaded data when the load is complete
200
- */
201
- loadBufferViewAsync(context: string, bufferView: IBufferView): Promise<ArrayBufferView>;
202
- private _loadAccessorAsync;
203
- /** @hidden */
204
- _loadFloatAccessorAsync(context: string, accessor: IAccessor): Promise<Float32Array>;
205
- private _loadIndicesAccessorAsync;
206
- private _loadVertexBufferViewAsync;
207
- private _loadVertexAccessorAsync;
208
- private _loadMaterialMetallicRoughnessPropertiesAsync;
209
- /** @hidden */
210
- _loadMaterialAsync(context: string, material: IMaterial, babylonMesh: Nullable<Mesh>, babylonDrawMode: number, assign?: (babylonMaterial: Material) => void): Promise<Material>;
211
- private _createDefaultMaterial;
212
- /**
213
- * Creates a Babylon material from a glTF material.
214
- * @param context The context when loading the asset
215
- * @param material The glTF material property
216
- * @param babylonDrawMode The draw mode for the Babylon material
217
- * @returns The Babylon material
218
- */
219
- createMaterial(context: string, material: IMaterial, babylonDrawMode: number): Material;
220
- /**
221
- * Loads properties from a glTF material into a Babylon material.
222
- * @param context The context when loading the asset
223
- * @param material The glTF material property
224
- * @param babylonMaterial The Babylon material
225
- * @returns A promise that resolves when the load is complete
226
- */
227
- loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Promise<void>;
228
- /**
229
- * Loads the normal, occlusion, and emissive properties from a glTF material into a Babylon material.
230
- * @param context The context when loading the asset
231
- * @param material The glTF material property
232
- * @param babylonMaterial The Babylon material
233
- * @returns A promise that resolves when the load is complete
234
- */
235
- loadMaterialBasePropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Promise<void>;
236
- /**
237
- * Loads the alpha properties from a glTF material into a Babylon material.
238
- * Must be called after the setting the albedo texture of the Babylon material when the material has an albedo texture.
239
- * @param context The context when loading the asset
240
- * @param material The glTF material property
241
- * @param babylonMaterial The Babylon material
242
- */
243
- loadMaterialAlphaProperties(context: string, material: IMaterial, babylonMaterial: Material): void;
244
- /**
245
- * Loads a glTF texture info.
246
- * @param context The context when loading the asset
247
- * @param textureInfo The glTF texture info property
248
- * @param assign A function called synchronously after parsing the glTF properties
249
- * @returns A promise that resolves with the loaded Babylon texture when the load is complete
250
- */
251
- loadTextureInfoAsync(context: string, textureInfo: ITextureInfo, assign?: (babylonTexture: BaseTexture) => void): Promise<BaseTexture>;
252
- /** @hidden */
253
- _loadTextureAsync(context: string, texture: ITexture, assign?: (babylonTexture: BaseTexture) => void): Promise<BaseTexture>;
254
- /** @hidden */
255
- _createTextureAsync(context: string, sampler: ISampler, image: IImage, assign?: (babylonTexture: BaseTexture) => void, textureLoaderOptions?: any, useSRGBBuffer?: boolean): Promise<BaseTexture>;
256
- private _loadSampler;
257
- /**
258
- * Loads a glTF image.
259
- * @param context The context when loading the asset
260
- * @param image The glTF image property
261
- * @returns A promise that resolves with the loaded data when the load is complete
262
- */
263
- loadImageAsync(context: string, image: IImage): Promise<ArrayBufferView>;
264
- /**
265
- * Loads a glTF uri.
266
- * @param context The context when loading the asset
267
- * @param property The glTF property associated with the uri
268
- * @param uri The base64 or relative uri
269
- * @returns A promise that resolves with the loaded data when the load is complete
270
- */
271
- loadUriAsync(context: string, property: IProperty, uri: string): Promise<ArrayBufferView>;
272
- /**
273
- * Adds a JSON pointer to the metadata of the Babylon object at `<object>.metadata.gltf.pointers`.
274
- * @param babylonObject the Babylon object with metadata
275
- * @param pointer the JSON pointer
276
- */
277
- static AddPointerMetadata(babylonObject: {
278
- metadata: any;
279
- }, pointer: string): void;
280
- private static _GetTextureWrapMode;
281
- private static _GetTextureSamplingMode;
282
- private static _GetTypedArrayConstructor;
283
- private static _GetTypedArray;
284
- private static _GetNumComponents;
285
- private static _ValidateUri;
286
- /** @hidden */
287
- static _GetDrawMode(context: string, mode: number | undefined): number;
288
- private _compileMaterialsAsync;
289
- private _compileShadowGeneratorsAsync;
290
- private _forEachExtensions;
291
- private _applyExtensions;
292
- private _extensionsOnLoading;
293
- private _extensionsOnReady;
294
- private _extensionsLoadSceneAsync;
295
- private _extensionsLoadNodeAsync;
296
- private _extensionsLoadCameraAsync;
297
- private _extensionsLoadVertexDataAsync;
298
- private _extensionsLoadMeshPrimitiveAsync;
299
- private _extensionsLoadMaterialAsync;
300
- private _extensionsCreateMaterial;
301
- private _extensionsLoadMaterialPropertiesAsync;
302
- private _extensionsLoadTextureInfoAsync;
303
- private _extensionsLoadTextureAsync;
304
- private _extensionsLoadAnimationAsync;
305
- private _extensionsLoadSkinAsync;
306
- private _extensionsLoadUriAsync;
307
- private _extensionsLoadBufferViewAsync;
308
- private _extensionsLoadBufferAsync;
309
- /**
310
- * Helper method called by a loader extension to load an glTF extension.
311
- * @param context The context when loading the asset
312
- * @param property The glTF property to load the extension from
313
- * @param extensionName The name of the extension to load
314
- * @param actionAsync The action to run
315
- * @returns The promise returned by actionAsync or null if the extension does not exist
316
- */
317
- static LoadExtensionAsync<TExtension = any, TResult = void>(context: string, property: IProperty, extensionName: string, actionAsync: (extensionContext: string, extension: TExtension) => Nullable<Promise<TResult>>): Nullable<Promise<TResult>>;
318
- /**
319
- * Helper method called by a loader extension to load a glTF extra.
320
- * @param context The context when loading the asset
321
- * @param property The glTF property to load the extra from
322
- * @param extensionName The name of the extension to load
323
- * @param actionAsync The action to run
324
- * @returns The promise returned by actionAsync or null if the extra does not exist
325
- */
326
- static LoadExtraAsync<TExtra = any, TResult = void>(context: string, property: IProperty, extensionName: string, actionAsync: (extraContext: string, extra: TExtra) => Nullable<Promise<TResult>>): Nullable<Promise<TResult>>;
327
- /**
328
- * Checks for presence of an extension.
329
- * @param name The name of the extension to check
330
- * @returns A boolean indicating the presence of the given extension name in `extensionsUsed`
331
- */
332
- isExtensionUsed(name: string): boolean;
333
- /**
334
- * Increments the indentation level and logs a message.
335
- * @param message The message to log
336
- */
337
- logOpen(message: string): void;
338
- /**
339
- * Decrements the indentation level.
340
- */
341
- logClose(): void;
342
- /**
343
- * Logs a message
344
- * @param message The message to log
345
- */
346
- log(message: string): void;
347
- /**
348
- * Starts a performance counter.
349
- * @param counterName The name of the performance counter
350
- */
351
- startPerformanceCounter(counterName: string): void;
352
- /**
353
- * Ends a performance counter.
354
- * @param counterName The name of the performance counter
355
- */
356
- endPerformanceCounter(counterName: string): void;
357
- }
1
+ import type { Nullable } from "@babylonjs/core/types.js";
2
+ import { Camera } from "@babylonjs/core/Cameras/camera.js";
3
+ import { AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js";
4
+ import { Material } from "@babylonjs/core/Materials/material.js";
5
+ import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
6
+ import { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
7
+ import type { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
8
+ import { Mesh } from "@babylonjs/core/Meshes/mesh.js";
9
+ import type { ISceneLoaderAsyncResult, ISceneLoaderProgressEvent } from "@babylonjs/core/Loading/sceneLoader.js";
10
+ import type { Scene } from "@babylonjs/core/scene.js";
11
+ import type { IProperty } from "babylonjs-gltf2interface";
12
+ import type { IGLTF, ISampler, INode, IScene, IMesh, IAccessor, ICamera, IAnimation, IAnimationChannel, IBuffer, IBufferView, IMaterial, ITextureInfo, ITexture, IImage, IMeshPrimitive, IArrayItem as IArrItem } from "./glTFLoaderInterfaces";
13
+ import type { IGLTFLoaderExtension } from "./glTFLoaderExtension";
14
+ import type { IGLTFLoader, IGLTFLoaderData } from "../glTFFileLoader";
15
+ import { GLTFFileLoader } from "../glTFFileLoader";
16
+ import type { IAnimatable } from "@babylonjs/core/Animations/animatable.interface.js";
17
+ import type { IDataBuffer } from "@babylonjs/core/Misc/dataReader.js";
18
+ import type { Light } from "@babylonjs/core/Lights/light.js";
19
+ import type { AssetContainer } from "@babylonjs/core/assetContainer.js";
20
+ /**
21
+ * Helper class for working with arrays when loading the glTF asset
22
+ */
23
+ export declare class ArrayItem {
24
+ /**
25
+ * Gets an item from the given array.
26
+ * @param context The context when loading the asset
27
+ * @param array The array to get the item from
28
+ * @param index The index to the array
29
+ * @returns The array item
30
+ */
31
+ static Get<T>(context: string, array: ArrayLike<T> | undefined, index: number | undefined): T;
32
+ /**
33
+ * Assign an `index` field to each item of the given array.
34
+ * @param array The array of items
35
+ */
36
+ static Assign(array?: IArrItem[]): void;
37
+ }
38
+ /**
39
+ * The glTF 2.0 loader
40
+ */
41
+ export declare class GLTFLoader implements IGLTFLoader {
42
+ /** @hidden */
43
+ _completePromises: Promise<any>[];
44
+ /** @hidden */
45
+ _assetContainer: Nullable<AssetContainer>;
46
+ /** Storage */
47
+ _babylonLights: Light[];
48
+ /** @hidden */
49
+ _disableInstancedMesh: number;
50
+ private readonly _parent;
51
+ private readonly _extensions;
52
+ private _disposed;
53
+ private _rootUrl;
54
+ private _fileName;
55
+ private _uniqueRootUrl;
56
+ private _gltf;
57
+ private _bin;
58
+ private _babylonScene;
59
+ private _rootBabylonMesh;
60
+ private _defaultBabylonMaterialData;
61
+ private _postSceneLoadActions;
62
+ private static _RegisteredExtensions;
63
+ /**
64
+ * The default glTF sampler.
65
+ */
66
+ static readonly DefaultSampler: ISampler;
67
+ /**
68
+ * Registers a loader extension.
69
+ * @param name The name of the loader extension.
70
+ * @param factory The factory function that creates the loader extension.
71
+ */
72
+ static RegisterExtension(name: string, factory: (loader: GLTFLoader) => IGLTFLoaderExtension): void;
73
+ /**
74
+ * Unregisters a loader extension.
75
+ * @param name The name of the loader extension.
76
+ * @returns A boolean indicating whether the extension has been unregistered
77
+ */
78
+ static UnregisterExtension(name: string): boolean;
79
+ /**
80
+ * The object that represents the glTF JSON.
81
+ */
82
+ get gltf(): IGLTF;
83
+ /**
84
+ * The BIN chunk of a binary glTF.
85
+ */
86
+ get bin(): Nullable<IDataBuffer>;
87
+ /**
88
+ * The parent file loader.
89
+ */
90
+ get parent(): GLTFFileLoader;
91
+ /**
92
+ * The Babylon scene when loading the asset.
93
+ */
94
+ get babylonScene(): Scene;
95
+ /**
96
+ * The root Babylon mesh when loading the asset.
97
+ */
98
+ get rootBabylonMesh(): Nullable<Mesh>;
99
+ /**
100
+ * @param parent
101
+ * @hidden
102
+ */
103
+ constructor(parent: GLTFFileLoader);
104
+ /** @hidden */
105
+ dispose(): void;
106
+ /**
107
+ * @param meshesNames
108
+ * @param scene
109
+ * @param container
110
+ * @param data
111
+ * @param rootUrl
112
+ * @param onProgress
113
+ * @param fileName
114
+ * @hidden
115
+ */
116
+ importMeshAsync(meshesNames: any, scene: Scene, container: Nullable<AssetContainer>, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
117
+ /**
118
+ * @param scene
119
+ * @param data
120
+ * @param rootUrl
121
+ * @param onProgress
122
+ * @param fileName
123
+ * @hidden
124
+ */
125
+ loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<void>;
126
+ private _loadAsync;
127
+ private _loadData;
128
+ private _setupData;
129
+ private _loadExtensions;
130
+ private _checkExtensions;
131
+ private _createRootNode;
132
+ /**
133
+ * Loads a glTF scene.
134
+ * @param context The context when loading the asset
135
+ * @param scene The glTF scene property
136
+ * @returns A promise that resolves when the load is complete
137
+ */
138
+ loadSceneAsync(context: string, scene: IScene): Promise<void>;
139
+ private _forEachPrimitive;
140
+ private _getGeometries;
141
+ private _getMeshes;
142
+ private _getTransformNodes;
143
+ private _getSkeletons;
144
+ private _getAnimationGroups;
145
+ private _startAnimations;
146
+ /**
147
+ * Loads a glTF node.
148
+ * @param context The context when loading the asset
149
+ * @param node The glTF node property
150
+ * @param assign A function called synchronously after parsing the glTF properties
151
+ * @returns A promise that resolves with the loaded Babylon mesh when the load is complete
152
+ */
153
+ loadNodeAsync(context: string, node: INode, assign?: (babylonTransformNode: TransformNode) => void): Promise<TransformNode>;
154
+ private _loadMeshAsync;
155
+ /**
156
+ * @hidden Define this method to modify the default behavior when loading data for mesh primitives.
157
+ * @param context The context when loading the asset
158
+ * @param name The mesh name when loading the asset
159
+ * @param node The glTF node when loading the asset
160
+ * @param mesh The glTF mesh when loading the asset
161
+ * @param primitive The glTF mesh primitive property
162
+ * @param assign A function called synchronously after parsing the glTF properties
163
+ * @returns A promise that resolves with the loaded mesh when the load is complete or null if not handled
164
+ */
165
+ _loadMeshPrimitiveAsync(context: string, name: string, node: INode, mesh: IMesh, primitive: IMeshPrimitive, assign: (babylonMesh: AbstractMesh) => void): Promise<AbstractMesh>;
166
+ private _loadVertexDataAsync;
167
+ private _createMorphTargets;
168
+ private _loadMorphTargetsAsync;
169
+ private _loadMorphTargetVertexDataAsync;
170
+ private static _LoadTransform;
171
+ private _loadSkinAsync;
172
+ private _loadBones;
173
+ private _findSkeletonRootNode;
174
+ private _loadBone;
175
+ private _loadSkinInverseBindMatricesDataAsync;
176
+ private _updateBoneMatrices;
177
+ private _getNodeMatrix;
178
+ /**
179
+ * Loads a glTF camera.
180
+ * @param context The context when loading the asset
181
+ * @param camera The glTF camera property
182
+ * @param assign A function called synchronously after parsing the glTF properties
183
+ * @returns A promise that resolves with the loaded Babylon camera when the load is complete
184
+ */
185
+ loadCameraAsync(context: string, camera: ICamera, assign?: (babylonCamera: Camera) => void): Promise<Camera>;
186
+ private _loadAnimationsAsync;
187
+ /**
188
+ * Loads a glTF animation.
189
+ * @param context The context when loading the asset
190
+ * @param animation The glTF animation property
191
+ * @returns A promise that resolves with the loaded Babylon animation group when the load is complete
192
+ */
193
+ loadAnimationAsync(context: string, animation: IAnimation): Promise<AnimationGroup>;
194
+ /**
195
+ * @hidden Loads a glTF animation channel.
196
+ * @param context The context when loading the asset
197
+ * @param animationContext The context of the animation when loading the asset
198
+ * @param animation The glTF animation property
199
+ * @param channel The glTF animation channel property
200
+ * @param babylonAnimationGroup The babylon animation group property
201
+ * @param animationTargetOverride The babylon animation channel target override property. My be null.
202
+ * @returns A void promise when the channel load is complete
203
+ */
204
+ _loadAnimationChannelAsync(context: string, animationContext: string, animation: IAnimation, channel: IAnimationChannel, babylonAnimationGroup: AnimationGroup, animationTargetOverride?: Nullable<IAnimatable>): Promise<void>;
205
+ private _loadAnimationSamplerAsync;
206
+ /**
207
+ * Loads a glTF buffer.
208
+ * @param context The context when loading the asset
209
+ * @param buffer The glTF buffer property
210
+ * @param byteOffset The byte offset to use
211
+ * @param byteLength The byte length to use
212
+ * @returns A promise that resolves with the loaded data when the load is complete
213
+ */
214
+ loadBufferAsync(context: string, buffer: IBuffer, byteOffset: number, byteLength: number): Promise<ArrayBufferView>;
215
+ /**
216
+ * Loads a glTF buffer view.
217
+ * @param context The context when loading the asset
218
+ * @param bufferView The glTF buffer view property
219
+ * @returns A promise that resolves with the loaded data when the load is complete
220
+ */
221
+ loadBufferViewAsync(context: string, bufferView: IBufferView): Promise<ArrayBufferView>;
222
+ private _loadAccessorAsync;
223
+ /**
224
+ * @param context
225
+ * @param accessor
226
+ * @hidden
227
+ */
228
+ _loadFloatAccessorAsync(context: string, accessor: IAccessor): Promise<Float32Array>;
229
+ private _loadIndicesAccessorAsync;
230
+ private _loadVertexBufferViewAsync;
231
+ private _loadVertexAccessorAsync;
232
+ private _loadMaterialMetallicRoughnessPropertiesAsync;
233
+ /**
234
+ * @param context
235
+ * @param material
236
+ * @param babylonMesh
237
+ * @param babylonDrawMode
238
+ * @param assign
239
+ * @hidden
240
+ */
241
+ _loadMaterialAsync(context: string, material: IMaterial, babylonMesh: Nullable<Mesh>, babylonDrawMode: number, assign?: (babylonMaterial: Material) => void): Promise<Material>;
242
+ private _createDefaultMaterial;
243
+ /**
244
+ * Creates a Babylon material from a glTF material.
245
+ * @param context The context when loading the asset
246
+ * @param material The glTF material property
247
+ * @param babylonDrawMode The draw mode for the Babylon material
248
+ * @returns The Babylon material
249
+ */
250
+ createMaterial(context: string, material: IMaterial, babylonDrawMode: number): Material;
251
+ /**
252
+ * Loads properties from a glTF material into a Babylon material.
253
+ * @param context The context when loading the asset
254
+ * @param material The glTF material property
255
+ * @param babylonMaterial The Babylon material
256
+ * @returns A promise that resolves when the load is complete
257
+ */
258
+ loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Promise<void>;
259
+ /**
260
+ * Loads the normal, occlusion, and emissive properties from a glTF material into a Babylon material.
261
+ * @param context The context when loading the asset
262
+ * @param material The glTF material property
263
+ * @param babylonMaterial The Babylon material
264
+ * @returns A promise that resolves when the load is complete
265
+ */
266
+ loadMaterialBasePropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Promise<void>;
267
+ /**
268
+ * Loads the alpha properties from a glTF material into a Babylon material.
269
+ * Must be called after the setting the albedo texture of the Babylon material when the material has an albedo texture.
270
+ * @param context The context when loading the asset
271
+ * @param material The glTF material property
272
+ * @param babylonMaterial The Babylon material
273
+ */
274
+ loadMaterialAlphaProperties(context: string, material: IMaterial, babylonMaterial: Material): void;
275
+ /**
276
+ * Loads a glTF texture info.
277
+ * @param context The context when loading the asset
278
+ * @param textureInfo The glTF texture info property
279
+ * @param assign A function called synchronously after parsing the glTF properties
280
+ * @returns A promise that resolves with the loaded Babylon texture when the load is complete
281
+ */
282
+ loadTextureInfoAsync(context: string, textureInfo: ITextureInfo, assign?: (babylonTexture: BaseTexture) => void): Promise<BaseTexture>;
283
+ /**
284
+ * @param context
285
+ * @param texture
286
+ * @param assign
287
+ * @hidden
288
+ */
289
+ _loadTextureAsync(context: string, texture: ITexture, assign?: (babylonTexture: BaseTexture) => void): Promise<BaseTexture>;
290
+ /**
291
+ * @param context
292
+ * @param sampler
293
+ * @param image
294
+ * @param assign
295
+ * @param textureLoaderOptions
296
+ * @param useSRGBBuffer
297
+ * @hidden
298
+ */
299
+ _createTextureAsync(context: string, sampler: ISampler, image: IImage, assign?: (babylonTexture: BaseTexture) => void, textureLoaderOptions?: any, useSRGBBuffer?: boolean): Promise<BaseTexture>;
300
+ private _loadSampler;
301
+ /**
302
+ * Loads a glTF image.
303
+ * @param context The context when loading the asset
304
+ * @param image The glTF image property
305
+ * @returns A promise that resolves with the loaded data when the load is complete
306
+ */
307
+ loadImageAsync(context: string, image: IImage): Promise<ArrayBufferView>;
308
+ /**
309
+ * Loads a glTF uri.
310
+ * @param context The context when loading the asset
311
+ * @param property The glTF property associated with the uri
312
+ * @param uri The base64 or relative uri
313
+ * @returns A promise that resolves with the loaded data when the load is complete
314
+ */
315
+ loadUriAsync(context: string, property: IProperty, uri: string): Promise<ArrayBufferView>;
316
+ /**
317
+ * Adds a JSON pointer to the metadata of the Babylon object at `<object>.metadata.gltf.pointers`.
318
+ * @param babylonObject the Babylon object with metadata
319
+ * @param babylonObject.metadata
320
+ * @param pointer the JSON pointer
321
+ */
322
+ static AddPointerMetadata(babylonObject: {
323
+ metadata: any;
324
+ }, pointer: string): void;
325
+ private static _GetTextureWrapMode;
326
+ private static _GetTextureSamplingMode;
327
+ private static _GetTypedArrayConstructor;
328
+ private static _GetTypedArray;
329
+ private static _GetNumComponents;
330
+ private static _ValidateUri;
331
+ /**
332
+ * @param context
333
+ * @param mode
334
+ * @hidden
335
+ */
336
+ static _GetDrawMode(context: string, mode: number | undefined): number;
337
+ private _compileMaterialsAsync;
338
+ private _compileShadowGeneratorsAsync;
339
+ private _forEachExtensions;
340
+ private _applyExtensions;
341
+ private _extensionsOnLoading;
342
+ private _extensionsOnReady;
343
+ private _extensionsLoadSceneAsync;
344
+ private _extensionsLoadNodeAsync;
345
+ private _extensionsLoadCameraAsync;
346
+ private _extensionsLoadVertexDataAsync;
347
+ private _extensionsLoadMeshPrimitiveAsync;
348
+ private _extensionsLoadMaterialAsync;
349
+ private _extensionsCreateMaterial;
350
+ private _extensionsLoadMaterialPropertiesAsync;
351
+ private _extensionsLoadTextureInfoAsync;
352
+ private _extensionsLoadTextureAsync;
353
+ private _extensionsLoadAnimationAsync;
354
+ private _extensionsLoadSkinAsync;
355
+ private _extensionsLoadUriAsync;
356
+ private _extensionsLoadBufferViewAsync;
357
+ private _extensionsLoadBufferAsync;
358
+ /**
359
+ * Helper method called by a loader extension to load an glTF extension.
360
+ * @param context The context when loading the asset
361
+ * @param property The glTF property to load the extension from
362
+ * @param extensionName The name of the extension to load
363
+ * @param actionAsync The action to run
364
+ * @returns The promise returned by actionAsync or null if the extension does not exist
365
+ */
366
+ static LoadExtensionAsync<TExtension = any, TResult = void>(context: string, property: IProperty, extensionName: string, actionAsync: (extensionContext: string, extension: TExtension) => Nullable<Promise<TResult>>): Nullable<Promise<TResult>>;
367
+ /**
368
+ * Helper method called by a loader extension to load a glTF extra.
369
+ * @param context The context when loading the asset
370
+ * @param property The glTF property to load the extra from
371
+ * @param extensionName The name of the extension to load
372
+ * @param actionAsync The action to run
373
+ * @returns The promise returned by actionAsync or null if the extra does not exist
374
+ */
375
+ static LoadExtraAsync<TExtra = any, TResult = void>(context: string, property: IProperty, extensionName: string, actionAsync: (extraContext: string, extra: TExtra) => Nullable<Promise<TResult>>): Nullable<Promise<TResult>>;
376
+ /**
377
+ * Checks for presence of an extension.
378
+ * @param name The name of the extension to check
379
+ * @returns A boolean indicating the presence of the given extension name in `extensionsUsed`
380
+ */
381
+ isExtensionUsed(name: string): boolean;
382
+ /**
383
+ * Increments the indentation level and logs a message.
384
+ * @param message The message to log
385
+ */
386
+ logOpen(message: string): void;
387
+ /**
388
+ * Decrements the indentation level.
389
+ */
390
+ logClose(): void;
391
+ /**
392
+ * Logs a message
393
+ * @param message The message to log
394
+ */
395
+ log(message: string): void;
396
+ /**
397
+ * Starts a performance counter.
398
+ * @param counterName The name of the performance counter
399
+ */
400
+ startPerformanceCounter(counterName: string): void;
401
+ /**
402
+ * Ends a performance counter.
403
+ * @param counterName The name of the performance counter
404
+ */
405
+ endPerformanceCounter(counterName: string): void;
406
+ }