@babylonjs/loaders 5.0.0-beta.8 → 5.0.0-beta.8-snapshot

Sign up to get free protection for your applications and to get access to all the features.
Files changed (172) hide show
  1. package/package.json +20 -198
  2. package/OBJ/index.d.ts +0 -4
  3. package/OBJ/index.js +0 -5
  4. package/OBJ/index.js.map +0 -1
  5. package/OBJ/mtlFileLoader.d.ts +0 -40
  6. package/OBJ/mtlFileLoader.js +0 -222
  7. package/OBJ/mtlFileLoader.js.map +0 -1
  8. package/OBJ/objFileLoader.d.ts +0 -133
  9. package/OBJ/objFileLoader.js +0 -301
  10. package/OBJ/objFileLoader.js.map +0 -1
  11. package/OBJ/objLoadingOptions.d.ts +0 -43
  12. package/OBJ/objLoadingOptions.js +0 -2
  13. package/OBJ/objLoadingOptions.js.map +0 -1
  14. package/OBJ/solidParser.d.ts +0 -153
  15. package/OBJ/solidParser.js +0 -700
  16. package/OBJ/solidParser.js.map +0 -1
  17. package/STL/index.d.ts +0 -1
  18. package/STL/index.js +0 -2
  19. package/STL/index.js.map +0 -1
  20. package/STL/stlFileLoader.d.ts +0 -71
  21. package/STL/stlFileLoader.js +0 -240
  22. package/STL/stlFileLoader.js.map +0 -1
  23. package/glTF/1.0/glTFBinaryExtension.d.ts +0 -13
  24. package/glTF/1.0/glTFBinaryExtension.js +0 -62
  25. package/glTF/1.0/glTFBinaryExtension.js.map +0 -1
  26. package/glTF/1.0/glTFLoader.d.ts +0 -106
  27. package/glTF/1.0/glTFLoader.js +0 -1697
  28. package/glTF/1.0/glTFLoader.js.map +0 -1
  29. package/glTF/1.0/glTFLoaderInterfaces.d.ts +0 -412
  30. package/glTF/1.0/glTFLoaderInterfaces.js +0 -96
  31. package/glTF/1.0/glTFLoaderInterfaces.js.map +0 -1
  32. package/glTF/1.0/glTFLoaderUtils.d.ts +0 -62
  33. package/glTF/1.0/glTFLoaderUtils.js +0 -233
  34. package/glTF/1.0/glTFLoaderUtils.js.map +0 -1
  35. package/glTF/1.0/glTFMaterialsCommonExtension.d.ts +0 -10
  36. package/glTF/1.0/glTFMaterialsCommonExtension.js +0 -128
  37. package/glTF/1.0/glTFMaterialsCommonExtension.js.map +0 -1
  38. package/glTF/1.0/index.d.ts +0 -5
  39. package/glTF/1.0/index.js +0 -6
  40. package/glTF/1.0/index.js.map +0 -1
  41. package/glTF/2.0/Extensions/EXT_lights_image_based.d.ts +0 -36
  42. package/glTF/2.0/Extensions/EXT_lights_image_based.js +0 -111
  43. package/glTF/2.0/Extensions/EXT_lights_image_based.js.map +0 -1
  44. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.d.ts +0 -27
  45. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +0 -80
  46. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js.map +0 -1
  47. package/glTF/2.0/Extensions/EXT_meshopt_compression.d.ts +0 -27
  48. package/glTF/2.0/Extensions/EXT_meshopt_compression.js +0 -43
  49. package/glTF/2.0/Extensions/EXT_meshopt_compression.js.map +0 -1
  50. package/glTF/2.0/Extensions/EXT_texture_webp.d.ts +0 -21
  51. package/glTF/2.0/Extensions/EXT_texture_webp.js +0 -33
  52. package/glTF/2.0/Extensions/EXT_texture_webp.js.map +0 -1
  53. package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +0 -32
  54. package/glTF/2.0/Extensions/ExtrasAsMetadata.js +0 -56
  55. package/glTF/2.0/Extensions/ExtrasAsMetadata.js.map +0 -1
  56. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.d.ts +0 -31
  57. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +0 -102
  58. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js.map +0 -1
  59. package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +0 -28
  60. package/glTF/2.0/Extensions/KHR_lights_punctual.js +0 -82
  61. package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +0 -1
  62. package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +0 -31
  63. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +0 -87
  64. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +0 -1
  65. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.d.ts +0 -30
  66. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +0 -46
  67. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +0 -1
  68. package/glTF/2.0/Extensions/KHR_materials_ior.d.ts +0 -34
  69. package/glTF/2.0/Extensions/KHR_materials_ior.js +0 -55
  70. package/glTF/2.0/Extensions/KHR_materials_ior.js.map +0 -1
  71. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.d.ts +0 -30
  72. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +0 -73
  73. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js.map +0 -1
  74. package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +0 -31
  75. package/glTF/2.0/Extensions/KHR_materials_sheen.js +0 -77
  76. package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +0 -1
  77. package/glTF/2.0/Extensions/KHR_materials_specular.d.ts +0 -30
  78. package/glTF/2.0/Extensions/KHR_materials_specular.js +0 -67
  79. package/glTF/2.0/Extensions/KHR_materials_specular.js.map +0 -1
  80. package/glTF/2.0/Extensions/KHR_materials_translucency.d.ts +0 -31
  81. package/glTF/2.0/Extensions/KHR_materials_translucency.js +0 -77
  82. package/glTF/2.0/Extensions/KHR_materials_translucency.js.map +0 -1
  83. package/glTF/2.0/Extensions/KHR_materials_transmission.d.ts +0 -30
  84. package/glTF/2.0/Extensions/KHR_materials_transmission.js +0 -278
  85. package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +0 -1
  86. package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +0 -30
  87. package/glTF/2.0/Extensions/KHR_materials_unlit.js +0 -66
  88. package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +0 -1
  89. package/glTF/2.0/Extensions/KHR_materials_variants.d.ts +0 -76
  90. package/glTF/2.0/Extensions/KHR_materials_variants.js +0 -244
  91. package/glTF/2.0/Extensions/KHR_materials_variants.js.map +0 -1
  92. package/glTF/2.0/Extensions/KHR_materials_volume.d.ts +0 -31
  93. package/glTF/2.0/Extensions/KHR_materials_volume.js +0 -79
  94. package/glTF/2.0/Extensions/KHR_materials_volume.js.map +0 -1
  95. package/glTF/2.0/Extensions/KHR_mesh_quantization.d.ts +0 -19
  96. package/glTF/2.0/Extensions/KHR_mesh_quantization.js +0 -22
  97. package/glTF/2.0/Extensions/KHR_mesh_quantization.js.map +0 -1
  98. package/glTF/2.0/Extensions/KHR_texture_basisu.d.ts +0 -21
  99. package/glTF/2.0/Extensions/KHR_texture_basisu.js +0 -33
  100. package/glTF/2.0/Extensions/KHR_texture_basisu.js.map +0 -1
  101. package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +0 -25
  102. package/glTF/2.0/Extensions/KHR_texture_transform.js +0 -54
  103. package/glTF/2.0/Extensions/KHR_texture_transform.js.map +0 -1
  104. package/glTF/2.0/Extensions/KHR_xmp_json_ld.d.ts +0 -29
  105. package/glTF/2.0/Extensions/KHR_xmp_json_ld.js +0 -47
  106. package/glTF/2.0/Extensions/KHR_xmp_json_ld.js.map +0 -1
  107. package/glTF/2.0/Extensions/MSFT_audio_emitter.d.ts +0 -38
  108. package/glTF/2.0/Extensions/MSFT_audio_emitter.js +0 -217
  109. package/glTF/2.0/Extensions/MSFT_audio_emitter.js.map +0 -1
  110. package/glTF/2.0/Extensions/MSFT_lod.d.ts +0 -75
  111. package/glTF/2.0/Extensions/MSFT_lod.js +0 -334
  112. package/glTF/2.0/Extensions/MSFT_lod.js.map +0 -1
  113. package/glTF/2.0/Extensions/MSFT_minecraftMesh.d.ts +0 -14
  114. package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +0 -37
  115. package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +0 -1
  116. package/glTF/2.0/Extensions/MSFT_sRGBFactors.d.ts +0 -14
  117. package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +0 -37
  118. package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +0 -1
  119. package/glTF/2.0/Extensions/index.d.ts +0 -26
  120. package/glTF/2.0/Extensions/index.js +0 -27
  121. package/glTF/2.0/Extensions/index.js.map +0 -1
  122. package/glTF/2.0/glTFLoader.d.ts +0 -357
  123. package/glTF/2.0/glTFLoader.js +0 -2249
  124. package/glTF/2.0/glTFLoader.js.map +0 -1
  125. package/glTF/2.0/glTFLoaderExtension.d.ts +0 -152
  126. package/glTF/2.0/glTFLoaderExtension.js +0 -2
  127. package/glTF/2.0/glTFLoaderExtension.js.map +0 -1
  128. package/glTF/2.0/glTFLoaderInterfaces.d.ts +0 -209
  129. package/glTF/2.0/glTFLoaderInterfaces.js +0 -2
  130. package/glTF/2.0/glTFLoaderInterfaces.js.map +0 -1
  131. package/glTF/2.0/index.d.ts +0 -4
  132. package/glTF/2.0/index.js +0 -5
  133. package/glTF/2.0/index.js.map +0 -1
  134. package/glTF/glTFFileLoader.d.ts +0 -368
  135. package/glTF/glTFFileLoader.js +0 -869
  136. package/glTF/glTFFileLoader.js.map +0 -1
  137. package/glTF/glTFValidation.d.ts +0 -29
  138. package/glTF/glTFValidation.js +0 -122
  139. package/glTF/glTFValidation.js.map +0 -1
  140. package/glTF/index.d.ts +0 -5
  141. package/glTF/index.js +0 -6
  142. package/glTF/index.js.map +0 -1
  143. package/index.d.ts +0 -3
  144. package/index.js.map +0 -1
  145. package/legacy/legacy-glTF.d.ts +0 -2
  146. package/legacy/legacy-glTF.js +0 -19
  147. package/legacy/legacy-glTF.js.map +0 -1
  148. package/legacy/legacy-glTF1.d.ts +0 -2
  149. package/legacy/legacy-glTF1.js +0 -15
  150. package/legacy/legacy-glTF1.js.map +0 -1
  151. package/legacy/legacy-glTF1FileLoader.d.ts +0 -2
  152. package/legacy/legacy-glTF1FileLoader.js +0 -3
  153. package/legacy/legacy-glTF1FileLoader.js.map +0 -1
  154. package/legacy/legacy-glTF2.d.ts +0 -2
  155. package/legacy/legacy-glTF2.js +0 -33
  156. package/legacy/legacy-glTF2.js.map +0 -1
  157. package/legacy/legacy-glTF2FileLoader.d.ts +0 -2
  158. package/legacy/legacy-glTF2FileLoader.js +0 -3
  159. package/legacy/legacy-glTF2FileLoader.js.map +0 -1
  160. package/legacy/legacy-glTFFileLoader.d.ts +0 -3
  161. package/legacy/legacy-glTFFileLoader.js +0 -4
  162. package/legacy/legacy-glTFFileLoader.js.map +0 -1
  163. package/legacy/legacy-objFileLoader.d.ts +0 -1
  164. package/legacy/legacy-objFileLoader.js +0 -13
  165. package/legacy/legacy-objFileLoader.js.map +0 -1
  166. package/legacy/legacy-stlFileLoader.d.ts +0 -1
  167. package/legacy/legacy-stlFileLoader.js +0 -13
  168. package/legacy/legacy-stlFileLoader.js.map +0 -1
  169. package/legacy/legacy.d.ts +0 -6
  170. package/legacy/legacy.js +0 -7
  171. package/legacy/legacy.js.map +0 -1
  172. package/readme.md +0 -24
@@ -1,357 +0,0 @@
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
- }