@babylonjs/loaders 5.23.0 → 5.25.0
Sign up to get free protection for your applications and to get access to all the features.
- package/OBJ/mtlFileLoader.d.ts +1 -1
- package/OBJ/mtlFileLoader.js +1 -1
- package/OBJ/mtlFileLoader.js.map +1 -1
- package/STL/stlFileLoader.d.ts +4 -4
- package/STL/stlFileLoader.js +4 -4
- package/STL/stlFileLoader.js.map +1 -1
- package/glTF/1.0/glTFBinaryExtension.d.ts +1 -1
- package/glTF/1.0/glTFBinaryExtension.js +1 -1
- package/glTF/1.0/glTFBinaryExtension.js.map +1 -1
- package/glTF/1.0/glTFLoader.d.ts +3 -3
- package/glTF/1.0/glTFLoader.js +3 -3
- package/glTF/1.0/glTFLoader.js.map +1 -1
- package/glTF/1.0/glTFLoaderInterfaces.d.ts +45 -45
- package/glTF/1.0/glTFLoaderInterfaces.js +8 -8
- package/glTF/1.0/glTFLoaderInterfaces.js.map +1 -1
- package/glTF/1.0/glTFLoaderUtils.d.ts +1 -1
- package/glTF/1.0/glTFLoaderUtils.js +1 -1
- package/glTF/1.0/glTFLoaderUtils.js.map +1 -1
- package/glTF/1.0/glTFMaterialsCommonExtension.d.ts +1 -1
- package/glTF/1.0/glTFMaterialsCommonExtension.js +1 -1
- package/glTF/1.0/glTFMaterialsCommonExtension.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_lights_image_based.d.ts +5 -8
- package/glTF/2.0/Extensions/EXT_lights_image_based.js +4 -7
- package/glTF/2.0/Extensions/EXT_lights_image_based.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.d.ts +3 -7
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +3 -7
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_meshopt_compression.d.ts +3 -6
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js +3 -6
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_texture_webp.d.ts +3 -7
- package/glTF/2.0/Extensions/EXT_texture_webp.js +3 -7
- package/glTF/2.0/Extensions/EXT_texture_webp.js.map +1 -1
- package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +5 -15
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js +5 -15
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_animation_pointer.d.ts +5 -7
- package/glTF/2.0/Extensions/KHR_animation_pointer.js +5 -7
- package/glTF/2.0/Extensions/KHR_animation_pointer.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +3 -7
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +4 -8
- package/glTF/2.0/Extensions/KHR_lights_punctual.js +4 -8
- package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_ior.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_ior.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_iridescence.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_iridescence.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_sheen.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_specular.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_specular.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_translucency.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_translucency.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_translucency.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_transmission.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_transmission.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_unlit.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_variants.d.ts +4 -11
- package/glTF/2.0/Extensions/KHR_materials_variants.js +4 -11
- package/glTF/2.0/Extensions/KHR_materials_variants.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_volume.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_materials_volume.js +3 -7
- package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_mesh_quantization.d.ts +2 -3
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js +2 -3
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_texture_basisu.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_texture_basisu.js +3 -7
- package/glTF/2.0/Extensions/KHR_texture_basisu.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +3 -7
- package/glTF/2.0/Extensions/KHR_texture_transform.js +3 -7
- package/glTF/2.0/Extensions/KHR_texture_transform.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.d.ts +2 -3
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js +2 -3
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_audio_emitter.d.ts +6 -14
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js +6 -14
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_lod.d.ts +8 -26
- package/glTF/2.0/Extensions/MSFT_lod.js +8 -26
- package/glTF/2.0/Extensions/MSFT_lod.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.d.ts +1 -1
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +1 -1
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.d.ts +1 -1
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +1 -1
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +1 -1
- package/glTF/2.0/glTFLoader.d.ts +14 -45
- package/glTF/2.0/glTFLoader.js +14 -45
- package/glTF/2.0/glTFLoader.js.map +1 -1
- package/glTF/2.0/glTFLoaderExtension.d.ts +6 -6
- package/glTF/2.0/glTFLoaderExtension.js.map +1 -1
- package/glTF/2.0/glTFLoaderInterfaces.d.ts +21 -21
- package/glTF/2.0/glTFLoaderInterfaces.js.map +1 -1
- package/glTF/glTFFileLoader.d.ts +20 -53
- package/glTF/glTFFileLoader.js +17 -50
- package/glTF/glTFFileLoader.js.map +1 -1
- package/package.json +3 -3
package/glTF/2.0/glTFLoader.d.ts
CHANGED
@@ -38,15 +38,15 @@ export declare class ArrayItem {
|
|
38
38
|
* The glTF 2.0 loader
|
39
39
|
*/
|
40
40
|
export declare class GLTFLoader implements IGLTFLoader {
|
41
|
-
/** @
|
41
|
+
/** @internal */
|
42
42
|
static readonly _KHRAnimationPointerName = "KHR_animation_pointer";
|
43
|
-
/** @
|
43
|
+
/** @internal */
|
44
44
|
readonly _completePromises: Promise<any>[];
|
45
|
-
/** @
|
45
|
+
/** @internal */
|
46
46
|
_assetContainer: Nullable<AssetContainer>;
|
47
47
|
/** Storage */
|
48
48
|
_babylonLights: Light[];
|
49
|
-
/** @
|
49
|
+
/** @internal */
|
50
50
|
_disableInstancedMesh: number;
|
51
51
|
private readonly _parent;
|
52
52
|
private readonly _extensions;
|
@@ -98,30 +98,17 @@ export declare class GLTFLoader implements IGLTFLoader {
|
|
98
98
|
*/
|
99
99
|
get rootBabylonMesh(): Nullable<Mesh>;
|
100
100
|
/**
|
101
|
-
* @
|
102
|
-
* @hidden
|
101
|
+
* @internal
|
103
102
|
*/
|
104
103
|
constructor(parent: GLTFFileLoader);
|
105
|
-
/** @
|
104
|
+
/** @internal */
|
106
105
|
dispose(): void;
|
107
106
|
/**
|
108
|
-
* @
|
109
|
-
* @param scene
|
110
|
-
* @param container
|
111
|
-
* @param data
|
112
|
-
* @param rootUrl
|
113
|
-
* @param onProgress
|
114
|
-
* @param fileName
|
115
|
-
* @hidden
|
107
|
+
* @internal
|
116
108
|
*/
|
117
109
|
importMeshAsync(meshesNames: any, scene: Scene, container: Nullable<AssetContainer>, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
|
118
110
|
/**
|
119
|
-
* @
|
120
|
-
* @param data
|
121
|
-
* @param rootUrl
|
122
|
-
* @param onProgress
|
123
|
-
* @param fileName
|
124
|
-
* @hidden
|
111
|
+
* @internal
|
125
112
|
*/
|
126
113
|
loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<void>;
|
127
114
|
private _loadAsync;
|
@@ -154,7 +141,7 @@ export declare class GLTFLoader implements IGLTFLoader {
|
|
154
141
|
loadNodeAsync(context: string, node: INode, assign?: (babylonTransformNode: TransformNode) => void): Promise<TransformNode>;
|
155
142
|
private _loadMeshAsync;
|
156
143
|
/**
|
157
|
-
* @
|
144
|
+
* @internal Define this method to modify the default behavior when loading data for mesh primitives.
|
158
145
|
* @param context The context when loading the asset
|
159
146
|
* @param name The mesh name when loading the asset
|
160
147
|
* @param node The glTF node when loading the asset
|
@@ -210,9 +197,7 @@ export declare class GLTFLoader implements IGLTFLoader {
|
|
210
197
|
loadBufferViewAsync(context: string, bufferView: IBufferView): Promise<ArrayBufferView>;
|
211
198
|
private _loadAccessorAsync;
|
212
199
|
/**
|
213
|
-
* @
|
214
|
-
* @param accessor
|
215
|
-
* @hidden
|
200
|
+
* @internal
|
216
201
|
*/
|
217
202
|
_loadFloatAccessorAsync(context: string, accessor: IAccessor): Promise<Float32Array>;
|
218
203
|
private _loadIndicesAccessorAsync;
|
@@ -220,12 +205,7 @@ export declare class GLTFLoader implements IGLTFLoader {
|
|
220
205
|
private _loadVertexAccessorAsync;
|
221
206
|
private _loadMaterialMetallicRoughnessPropertiesAsync;
|
222
207
|
/**
|
223
|
-
* @
|
224
|
-
* @param material
|
225
|
-
* @param babylonMesh
|
226
|
-
* @param babylonDrawMode
|
227
|
-
* @param assign
|
228
|
-
* @hidden
|
208
|
+
* @internal
|
229
209
|
*/
|
230
210
|
_loadMaterialAsync(context: string, material: IMaterial, babylonMesh: Nullable<Mesh>, babylonDrawMode: number, assign?: (babylonMaterial: Material) => void): Promise<Material>;
|
231
211
|
private _createDefaultMaterial;
|
@@ -270,20 +250,11 @@ export declare class GLTFLoader implements IGLTFLoader {
|
|
270
250
|
*/
|
271
251
|
loadTextureInfoAsync(context: string, textureInfo: ITextureInfo, assign?: (babylonTexture: BaseTexture) => void): Promise<BaseTexture>;
|
272
252
|
/**
|
273
|
-
* @
|
274
|
-
* @param texture
|
275
|
-
* @param assign
|
276
|
-
* @hidden
|
253
|
+
* @internal
|
277
254
|
*/
|
278
255
|
_loadTextureAsync(context: string, texture: ITexture, assign?: (babylonTexture: BaseTexture) => void): Promise<BaseTexture>;
|
279
256
|
/**
|
280
|
-
* @
|
281
|
-
* @param sampler
|
282
|
-
* @param image
|
283
|
-
* @param assign
|
284
|
-
* @param textureLoaderOptions
|
285
|
-
* @param useSRGBBuffer
|
286
|
-
* @hidden
|
257
|
+
* @internal
|
287
258
|
*/
|
288
259
|
_createTextureAsync(context: string, sampler: ISampler, image: IImage, assign?: (babylonTexture: BaseTexture) => void, textureLoaderOptions?: any, useSRGBBuffer?: boolean): Promise<BaseTexture>;
|
289
260
|
private _loadSampler;
|
@@ -318,9 +289,7 @@ export declare class GLTFLoader implements IGLTFLoader {
|
|
318
289
|
private static _GetNumComponents;
|
319
290
|
private static _ValidateUri;
|
320
291
|
/**
|
321
|
-
* @
|
322
|
-
* @param mode
|
323
|
-
* @hidden
|
292
|
+
* @internal
|
324
293
|
*/
|
325
294
|
static _GetDrawMode(context: string, mode: number | undefined): number;
|
326
295
|
private _compileMaterialsAsync;
|
package/glTF/2.0/glTFLoader.js
CHANGED
@@ -74,17 +74,16 @@ function mergeDeep(...objects) {
|
|
74
74
|
*/
|
75
75
|
export class GLTFLoader {
|
76
76
|
/**
|
77
|
-
* @
|
78
|
-
* @hidden
|
77
|
+
* @internal
|
79
78
|
*/
|
80
79
|
constructor(parent) {
|
81
|
-
/** @
|
80
|
+
/** @internal */
|
82
81
|
this._completePromises = new Array();
|
83
|
-
/** @
|
82
|
+
/** @internal */
|
84
83
|
this._assetContainer = null;
|
85
84
|
/** Storage */
|
86
85
|
this._babylonLights = [];
|
87
|
-
/** @
|
86
|
+
/** @internal */
|
88
87
|
this._disableInstancedMesh = 0;
|
89
88
|
this._extensions = new Array();
|
90
89
|
this._disposed = false;
|
@@ -158,7 +157,7 @@ export class GLTFLoader {
|
|
158
157
|
get rootBabylonMesh() {
|
159
158
|
return this._rootBabylonMesh;
|
160
159
|
}
|
161
|
-
/** @
|
160
|
+
/** @internal */
|
162
161
|
dispose() {
|
163
162
|
if (this._disposed) {
|
164
163
|
return;
|
@@ -176,14 +175,7 @@ export class GLTFLoader {
|
|
176
175
|
this._parent.dispose();
|
177
176
|
}
|
178
177
|
/**
|
179
|
-
* @
|
180
|
-
* @param scene
|
181
|
-
* @param container
|
182
|
-
* @param data
|
183
|
-
* @param rootUrl
|
184
|
-
* @param onProgress
|
185
|
-
* @param fileName
|
186
|
-
* @hidden
|
178
|
+
* @internal
|
187
179
|
*/
|
188
180
|
importMeshAsync(meshesNames, scene, container, data, rootUrl, onProgress, fileName = "") {
|
189
181
|
return Promise.resolve().then(() => {
|
@@ -223,12 +215,7 @@ export class GLTFLoader {
|
|
223
215
|
});
|
224
216
|
}
|
225
217
|
/**
|
226
|
-
* @
|
227
|
-
* @param data
|
228
|
-
* @param rootUrl
|
229
|
-
* @param onProgress
|
230
|
-
* @param fileName
|
231
|
-
* @hidden
|
218
|
+
* @internal
|
232
219
|
*/
|
233
220
|
loadAsync(scene, data, rootUrl, onProgress, fileName = "") {
|
234
221
|
return Promise.resolve().then(() => {
|
@@ -691,7 +678,7 @@ export class GLTFLoader {
|
|
691
678
|
});
|
692
679
|
}
|
693
680
|
/**
|
694
|
-
* @
|
681
|
+
* @internal Define this method to modify the default behavior when loading data for mesh primitives.
|
695
682
|
* @param context The context when loading the asset
|
696
683
|
* @param name The mesh name when loading the asset
|
697
684
|
* @param node The glTF node when loading the asset
|
@@ -1330,9 +1317,7 @@ export class GLTFLoader {
|
|
1330
1317
|
return accessor._data;
|
1331
1318
|
}
|
1332
1319
|
/**
|
1333
|
-
* @
|
1334
|
-
* @param accessor
|
1335
|
-
* @hidden
|
1320
|
+
* @internal
|
1336
1321
|
*/
|
1337
1322
|
_loadFloatAccessorAsync(context, accessor) {
|
1338
1323
|
return this._loadAccessorAsync(context, accessor, Float32Array);
|
@@ -1435,12 +1420,7 @@ export class GLTFLoader {
|
|
1435
1420
|
return Promise.all(promises).then(() => { });
|
1436
1421
|
}
|
1437
1422
|
/**
|
1438
|
-
* @
|
1439
|
-
* @param material
|
1440
|
-
* @param babylonMesh
|
1441
|
-
* @param babylonDrawMode
|
1442
|
-
* @param assign
|
1443
|
-
* @hidden
|
1423
|
+
* @internal
|
1444
1424
|
*/
|
1445
1425
|
_loadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign = () => { }) {
|
1446
1426
|
const extensionPromise = this._extensionsLoadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign);
|
@@ -1642,10 +1622,7 @@ export class GLTFLoader {
|
|
1642
1622
|
return promise;
|
1643
1623
|
}
|
1644
1624
|
/**
|
1645
|
-
* @
|
1646
|
-
* @param texture
|
1647
|
-
* @param assign
|
1648
|
-
* @hidden
|
1625
|
+
* @internal
|
1649
1626
|
*/
|
1650
1627
|
_loadTextureAsync(context, texture, assign = () => { }) {
|
1651
1628
|
const extensionPromise = this._extensionsLoadTextureAsync(context, texture, assign);
|
@@ -1660,13 +1637,7 @@ export class GLTFLoader {
|
|
1660
1637
|
return promise;
|
1661
1638
|
}
|
1662
1639
|
/**
|
1663
|
-
* @
|
1664
|
-
* @param sampler
|
1665
|
-
* @param image
|
1666
|
-
* @param assign
|
1667
|
-
* @param textureLoaderOptions
|
1668
|
-
* @param useSRGBBuffer
|
1669
|
-
* @hidden
|
1640
|
+
* @internal
|
1670
1641
|
*/
|
1671
1642
|
_createTextureAsync(context, sampler, image, assign = () => { }, textureLoaderOptions, useSRGBBuffer) {
|
1672
1643
|
const samplerData = this._loadSampler(`/samplers/${sampler.index}`, sampler);
|
@@ -1898,9 +1869,7 @@ export class GLTFLoader {
|
|
1898
1869
|
return Tools.IsBase64(uri) || uri.indexOf("..") === -1;
|
1899
1870
|
}
|
1900
1871
|
/**
|
1901
|
-
* @
|
1902
|
-
* @param mode
|
1903
|
-
* @hidden
|
1872
|
+
* @internal
|
1904
1873
|
*/
|
1905
1874
|
static _GetDrawMode(context, mode) {
|
1906
1875
|
if (mode == undefined) {
|
@@ -2127,7 +2096,7 @@ export class GLTFLoader {
|
|
2127
2096
|
this._parent._endPerformanceCounter(counterName);
|
2128
2097
|
}
|
2129
2098
|
}
|
2130
|
-
/** @
|
2099
|
+
/** @internal */
|
2131
2100
|
// note : KHR_animation_pointer is used to load animation in ALL case, turning everything
|
2132
2101
|
// into pointer. This is the reason why this value is located here.
|
2133
2102
|
GLTFLoader._KHRAnimationPointerName = "KHR_animation_pointer";
|