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