@babylonjs/loaders 5.0.0-beta.9 → 5.0.0-rc.10
Sign up to get free protection for your applications and to get access to all the features.
- package/OBJ/index.d.ts +4 -4
- package/OBJ/index.js +4 -4
- package/OBJ/index.js.map +1 -1
- package/OBJ/mtlFileLoader.d.ts +41 -40
- package/OBJ/mtlFileLoader.js +232 -221
- package/OBJ/mtlFileLoader.js.map +1 -1
- package/OBJ/objFileLoader.d.ts +126 -133
- package/OBJ/objFileLoader.js +296 -300
- package/OBJ/objFileLoader.js.map +1 -1
- package/OBJ/objLoadingOptions.d.ts +43 -43
- package/OBJ/objLoadingOptions.js +1 -1
- package/OBJ/objLoadingOptions.js.map +1 -1
- package/OBJ/solidParser.d.ts +154 -153
- package/OBJ/solidParser.js +693 -699
- package/OBJ/solidParser.js.map +1 -1
- package/STL/index.d.ts +1 -1
- package/STL/index.js +1 -1
- package/STL/index.js.map +1 -1
- package/STL/stlFileLoader.d.ts +64 -71
- package/STL/stlFileLoader.js +233 -239
- package/STL/stlFileLoader.js.map +1 -1
- package/glTF/1.0/glTFBinaryExtension.d.ts +13 -13
- package/glTF/1.0/glTFBinaryExtension.js +60 -61
- package/glTF/1.0/glTFBinaryExtension.js.map +1 -1
- package/glTF/1.0/glTFLoader.d.ts +136 -106
- package/glTF/1.0/glTFLoader.js +1814 -1696
- package/glTF/1.0/glTFLoader.js.map +1 -1
- package/glTF/1.0/glTFLoaderInterfaces.d.ts +412 -412
- package/glTF/1.0/glTFLoaderInterfaces.js +95 -95
- package/glTF/1.0/glTFLoaderInterfaces.js.map +1 -1
- package/glTF/1.0/glTFLoaderUtils.d.ts +63 -62
- package/glTF/1.0/glTFLoaderUtils.js +250 -232
- package/glTF/1.0/glTFLoaderUtils.js.map +1 -1
- package/glTF/1.0/glTFMaterialsCommonExtension.d.ts +10 -10
- package/glTF/1.0/glTFMaterialsCommonExtension.js +129 -127
- package/glTF/1.0/glTFMaterialsCommonExtension.js.map +1 -1
- package/glTF/1.0/index.d.ts +5 -5
- package/glTF/1.0/index.js +5 -5
- package/glTF/1.0/index.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_lights_image_based.d.ts +43 -36
- package/glTF/2.0/Extensions/EXT_lights_image_based.js +117 -110
- package/glTF/2.0/Extensions/EXT_lights_image_based.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.d.ts +36 -27
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +88 -79
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_meshopt_compression.d.ts +34 -27
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js +49 -42
- package/glTF/2.0/Extensions/EXT_meshopt_compression.js.map +1 -1
- package/glTF/2.0/Extensions/EXT_texture_webp.d.ts +29 -21
- package/glTF/2.0/Extensions/EXT_texture_webp.js +40 -32
- package/glTF/2.0/Extensions/EXT_texture_webp.js.map +1 -1
- package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +50 -32
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js +73 -55
- package/glTF/2.0/Extensions/ExtrasAsMetadata.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.d.ts +39 -31
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +112 -101
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +36 -28
- package/glTF/2.0/Extensions/KHR_lights_punctual.js +89 -81
- package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +39 -31
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +94 -86
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.d.ts +38 -30
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +53 -45
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_ior.d.ts +42 -34
- package/glTF/2.0/Extensions/KHR_materials_ior.js +62 -54
- package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.d.ts +38 -30
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +80 -72
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +39 -31
- package/glTF/2.0/Extensions/KHR_materials_sheen.js +84 -76
- package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_specular.d.ts +38 -30
- package/glTF/2.0/Extensions/KHR_materials_specular.js +74 -66
- package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_translucency.d.ts +39 -31
- package/glTF/2.0/Extensions/KHR_materials_translucency.js +83 -76
- package/glTF/2.0/Extensions/KHR_materials_translucency.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_transmission.d.ts +38 -30
- package/glTF/2.0/Extensions/KHR_materials_transmission.js +288 -277
- package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +38 -30
- package/glTF/2.0/Extensions/KHR_materials_unlit.js +73 -65
- package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_variants.d.ts +87 -76
- package/glTF/2.0/Extensions/KHR_materials_variants.js +254 -243
- package/glTF/2.0/Extensions/KHR_materials_variants.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_materials_volume.d.ts +39 -31
- package/glTF/2.0/Extensions/KHR_materials_volume.js +85 -78
- package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_mesh_quantization.d.ts +22 -19
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js +23 -21
- package/glTF/2.0/Extensions/KHR_mesh_quantization.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_texture_basisu.d.ts +29 -21
- package/glTF/2.0/Extensions/KHR_texture_basisu.js +40 -32
- package/glTF/2.0/Extensions/KHR_texture_basisu.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +33 -25
- package/glTF/2.0/Extensions/KHR_texture_transform.js +61 -53
- package/glTF/2.0/Extensions/KHR_texture_transform.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.d.ts +32 -29
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js +49 -46
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_audio_emitter.d.ts +54 -38
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js +240 -216
- package/glTF/2.0/Extensions/MSFT_audio_emitter.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_lod.d.ts +109 -75
- package/glTF/2.0/Extensions/MSFT_lod.js +369 -333
- package/glTF/2.0/Extensions/MSFT_lod.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.d.ts +14 -14
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +36 -36
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +1 -1
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.d.ts +14 -14
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +36 -36
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +1 -1
- package/glTF/2.0/Extensions/index.d.ts +26 -26
- package/glTF/2.0/Extensions/index.js +26 -26
- package/glTF/2.0/Extensions/index.js.map +1 -1
- package/glTF/2.0/glTFLoader.d.ts +406 -357
- package/glTF/2.0/glTFLoader.js +2366 -2249
- package/glTF/2.0/glTFLoader.js.map +1 -1
- package/glTF/2.0/glTFLoaderExtension.d.ts +152 -152
- package/glTF/2.0/glTFLoaderExtension.js +1 -1
- package/glTF/2.0/glTFLoaderExtension.js.map +1 -1
- package/glTF/2.0/glTFLoaderInterfaces.d.ts +211 -209
- package/glTF/2.0/glTFLoaderInterfaces.js +1 -1
- package/glTF/2.0/glTFLoaderInterfaces.js.map +1 -1
- package/glTF/2.0/index.d.ts +4 -4
- package/glTF/2.0/index.js +5 -4
- package/glTF/2.0/index.js.map +1 -1
- package/glTF/glTFFileLoader.d.ts +433 -368
- package/glTF/glTFFileLoader.js +927 -869
- package/glTF/glTFFileLoader.js.map +1 -1
- package/glTF/glTFValidation.d.ts +29 -29
- package/glTF/glTFValidation.js +123 -121
- package/glTF/glTFValidation.js.map +1 -1
- package/glTF/index.d.ts +5 -5
- package/glTF/index.js +6 -5
- package/glTF/index.js.map +1 -1
- package/index.d.ts +3 -3
- package/index.js +4 -3
- package/index.js.map +1 -1
- package/legacy/legacy-glTF.d.ts +2 -2
- package/legacy/legacy-glTF.js +18 -18
- package/legacy/legacy-glTF.js.map +1 -1
- package/legacy/legacy-glTF1.d.ts +2 -2
- package/legacy/legacy-glTF1.js +15 -14
- package/legacy/legacy-glTF1.js.map +1 -1
- package/legacy/legacy-glTF1FileLoader.d.ts +2 -2
- package/legacy/legacy-glTF1FileLoader.js +3 -2
- package/legacy/legacy-glTF1FileLoader.js.map +1 -1
- package/legacy/legacy-glTF2.d.ts +2 -2
- package/legacy/legacy-glTF2.js +33 -32
- package/legacy/legacy-glTF2.js.map +1 -1
- package/legacy/legacy-glTF2FileLoader.d.ts +2 -2
- package/legacy/legacy-glTF2FileLoader.js +3 -2
- package/legacy/legacy-glTF2FileLoader.js.map +1 -1
- package/legacy/legacy-glTFFileLoader.d.ts +3 -3
- package/legacy/legacy-glTFFileLoader.js +4 -3
- package/legacy/legacy-glTFFileLoader.js.map +1 -1
- package/legacy/legacy-objFileLoader.d.ts +1 -1
- package/legacy/legacy-objFileLoader.js +13 -12
- package/legacy/legacy-objFileLoader.js.map +1 -1
- package/legacy/legacy-stlFileLoader.d.ts +1 -1
- package/legacy/legacy-stlFileLoader.js +13 -12
- package/legacy/legacy-stlFileLoader.js.map +1 -1
- package/legacy/legacy.d.ts +6 -6
- package/legacy/legacy.js +8 -6
- package/legacy/legacy.js.map +1 -1
- package/package.json +23 -198
- package/readme.md +2 -2
@@ -1,209 +1,211 @@
|
|
1
|
-
import { AnimationGroup } from "@babylonjs/core/Animations/animationGroup";
|
2
|
-
import { Skeleton } from "@babylonjs/core/Bones/skeleton";
|
3
|
-
import { Material } from "@babylonjs/core/Materials/material";
|
4
|
-
import { TransformNode } from "@babylonjs/core/Meshes/transformNode";
|
5
|
-
import { Buffer, VertexBuffer } from "@babylonjs/core/Buffers/buffer";
|
6
|
-
import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh";
|
7
|
-
import { Mesh } from "@babylonjs/core/Meshes/mesh";
|
8
|
-
import * as GLTF2 from "babylonjs-gltf2interface";
|
9
|
-
/**
|
10
|
-
* Loader interface with an index field.
|
11
|
-
*/
|
12
|
-
export interface IArrayItem {
|
13
|
-
/**
|
14
|
-
* The index of this item in the array.
|
15
|
-
*/
|
16
|
-
index: number;
|
17
|
-
}
|
18
|
-
/**
|
19
|
-
* Loader interface with additional members.
|
20
|
-
*/
|
21
|
-
export interface IAccessor extends GLTF2.IAccessor, IArrayItem {
|
22
|
-
/** @hidden */
|
23
|
-
_data?: Promise<ArrayBufferView>;
|
24
|
-
/** @hidden */
|
25
|
-
_babylonVertexBuffer?: {
|
26
|
-
[kind: string]: Promise<VertexBuffer>;
|
27
|
-
};
|
28
|
-
}
|
29
|
-
/**
|
30
|
-
* Loader interface with additional members.
|
31
|
-
*/
|
32
|
-
export interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {
|
33
|
-
}
|
34
|
-
/** @hidden */
|
35
|
-
export interface _IAnimationSamplerData {
|
36
|
-
input: Float32Array;
|
37
|
-
interpolation: GLTF2.AnimationSamplerInterpolation;
|
38
|
-
output: Float32Array;
|
39
|
-
}
|
40
|
-
/**
|
41
|
-
* Loader interface with additional members.
|
42
|
-
*/
|
43
|
-
export interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {
|
44
|
-
/** @hidden */
|
45
|
-
_data?: Promise<_IAnimationSamplerData>;
|
46
|
-
}
|
47
|
-
/**
|
48
|
-
* Loader interface with additional members.
|
49
|
-
*/
|
50
|
-
export interface IAnimation extends GLTF2.IAnimation, IArrayItem {
|
51
|
-
channels: IAnimationChannel[];
|
52
|
-
samplers: IAnimationSampler[];
|
53
|
-
/** @hidden */
|
54
|
-
_babylonAnimationGroup?: AnimationGroup;
|
55
|
-
}
|
56
|
-
/**
|
57
|
-
* Loader interface with additional members.
|
58
|
-
*/
|
59
|
-
export interface IBuffer extends GLTF2.IBuffer, IArrayItem {
|
60
|
-
/** @hidden */
|
61
|
-
_data?: Promise<ArrayBufferView>;
|
62
|
-
}
|
63
|
-
/**
|
64
|
-
* Loader interface with additional members.
|
65
|
-
*/
|
66
|
-
export interface IBufferView extends GLTF2.IBufferView, IArrayItem {
|
67
|
-
/** @hidden */
|
68
|
-
_data?: Promise<ArrayBufferView>;
|
69
|
-
/** @hidden */
|
70
|
-
_babylonBuffer?: Promise<Buffer>;
|
71
|
-
}
|
72
|
-
/**
|
73
|
-
* Loader interface with additional members.
|
74
|
-
*/
|
75
|
-
export interface ICamera extends GLTF2.ICamera, IArrayItem {
|
76
|
-
}
|
77
|
-
/**
|
78
|
-
* Loader interface with additional members.
|
79
|
-
*/
|
80
|
-
export interface IImage extends GLTF2.IImage, IArrayItem {
|
81
|
-
/** @hidden */
|
82
|
-
_data?: Promise<ArrayBufferView>;
|
83
|
-
}
|
84
|
-
/**
|
85
|
-
* Loader interface with additional members.
|
86
|
-
*/
|
87
|
-
export interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {
|
88
|
-
}
|
89
|
-
/**
|
90
|
-
* Loader interface with additional members.
|
91
|
-
*/
|
92
|
-
export interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
|
93
|
-
}
|
94
|
-
/**
|
95
|
-
* Loader interface with additional members.
|
96
|
-
*/
|
97
|
-
export interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {
|
98
|
-
baseColorTexture?: ITextureInfo;
|
99
|
-
metallicRoughnessTexture?: ITextureInfo;
|
100
|
-
}
|
101
|
-
/**
|
102
|
-
* Loader interface with additional members.
|
103
|
-
*/
|
104
|
-
export interface IMaterial extends GLTF2.IMaterial, IArrayItem {
|
105
|
-
pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;
|
106
|
-
normalTexture?: IMaterialNormalTextureInfo;
|
107
|
-
occlusionTexture?: IMaterialOcclusionTextureInfo;
|
108
|
-
emissiveTexture?: ITextureInfo;
|
109
|
-
/** @hidden */
|
110
|
-
_data?: {
|
111
|
-
[babylonDrawMode: number]: {
|
112
|
-
babylonMaterial: Material;
|
113
|
-
babylonMeshes: AbstractMesh[];
|
114
|
-
promise: Promise<void>;
|
115
|
-
};
|
116
|
-
};
|
117
|
-
}
|
118
|
-
/**
|
119
|
-
* Loader interface with additional members.
|
120
|
-
*/
|
121
|
-
export interface IMesh extends GLTF2.IMesh, IArrayItem {
|
122
|
-
primitives: IMeshPrimitive[];
|
123
|
-
}
|
124
|
-
/**
|
125
|
-
* Loader interface with additional members.
|
126
|
-
*/
|
127
|
-
export interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
|
128
|
-
/** @hidden */
|
129
|
-
_instanceData?: {
|
130
|
-
babylonSourceMesh: Mesh;
|
131
|
-
promise: Promise<any>;
|
132
|
-
};
|
133
|
-
}
|
134
|
-
/**
|
135
|
-
* Loader interface with additional members.
|
136
|
-
*/
|
137
|
-
export interface INode extends GLTF2.INode, IArrayItem {
|
138
|
-
/**
|
139
|
-
* The parent glTF node.
|
140
|
-
*/
|
141
|
-
parent?: INode;
|
142
|
-
/** @hidden */
|
143
|
-
_babylonTransformNode?: TransformNode;
|
144
|
-
/** @hidden */
|
145
|
-
|
146
|
-
/** @hidden */
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
1
|
+
import type { AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js";
|
2
|
+
import type { Skeleton } from "@babylonjs/core/Bones/skeleton.js";
|
3
|
+
import type { Material } from "@babylonjs/core/Materials/material.js";
|
4
|
+
import type { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
|
5
|
+
import type { Buffer, VertexBuffer } from "@babylonjs/core/Buffers/buffer.js";
|
6
|
+
import type { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
|
7
|
+
import type { Mesh } from "@babylonjs/core/Meshes/mesh.js";
|
8
|
+
import type * as GLTF2 from "babylonjs-gltf2interface";
|
9
|
+
/**
|
10
|
+
* Loader interface with an index field.
|
11
|
+
*/
|
12
|
+
export interface IArrayItem {
|
13
|
+
/**
|
14
|
+
* The index of this item in the array.
|
15
|
+
*/
|
16
|
+
index: number;
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* Loader interface with additional members.
|
20
|
+
*/
|
21
|
+
export interface IAccessor extends GLTF2.IAccessor, IArrayItem {
|
22
|
+
/** @hidden */
|
23
|
+
_data?: Promise<ArrayBufferView>;
|
24
|
+
/** @hidden */
|
25
|
+
_babylonVertexBuffer?: {
|
26
|
+
[kind: string]: Promise<VertexBuffer>;
|
27
|
+
};
|
28
|
+
}
|
29
|
+
/**
|
30
|
+
* Loader interface with additional members.
|
31
|
+
*/
|
32
|
+
export interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {
|
33
|
+
}
|
34
|
+
/** @hidden */
|
35
|
+
export interface _IAnimationSamplerData {
|
36
|
+
input: Float32Array;
|
37
|
+
interpolation: GLTF2.AnimationSamplerInterpolation;
|
38
|
+
output: Float32Array;
|
39
|
+
}
|
40
|
+
/**
|
41
|
+
* Loader interface with additional members.
|
42
|
+
*/
|
43
|
+
export interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {
|
44
|
+
/** @hidden */
|
45
|
+
_data?: Promise<_IAnimationSamplerData>;
|
46
|
+
}
|
47
|
+
/**
|
48
|
+
* Loader interface with additional members.
|
49
|
+
*/
|
50
|
+
export interface IAnimation extends GLTF2.IAnimation, IArrayItem {
|
51
|
+
channels: IAnimationChannel[];
|
52
|
+
samplers: IAnimationSampler[];
|
53
|
+
/** @hidden */
|
54
|
+
_babylonAnimationGroup?: AnimationGroup;
|
55
|
+
}
|
56
|
+
/**
|
57
|
+
* Loader interface with additional members.
|
58
|
+
*/
|
59
|
+
export interface IBuffer extends GLTF2.IBuffer, IArrayItem {
|
60
|
+
/** @hidden */
|
61
|
+
_data?: Promise<ArrayBufferView>;
|
62
|
+
}
|
63
|
+
/**
|
64
|
+
* Loader interface with additional members.
|
65
|
+
*/
|
66
|
+
export interface IBufferView extends GLTF2.IBufferView, IArrayItem {
|
67
|
+
/** @hidden */
|
68
|
+
_data?: Promise<ArrayBufferView>;
|
69
|
+
/** @hidden */
|
70
|
+
_babylonBuffer?: Promise<Buffer>;
|
71
|
+
}
|
72
|
+
/**
|
73
|
+
* Loader interface with additional members.
|
74
|
+
*/
|
75
|
+
export interface ICamera extends GLTF2.ICamera, IArrayItem {
|
76
|
+
}
|
77
|
+
/**
|
78
|
+
* Loader interface with additional members.
|
79
|
+
*/
|
80
|
+
export interface IImage extends GLTF2.IImage, IArrayItem {
|
81
|
+
/** @hidden */
|
82
|
+
_data?: Promise<ArrayBufferView>;
|
83
|
+
}
|
84
|
+
/**
|
85
|
+
* Loader interface with additional members.
|
86
|
+
*/
|
87
|
+
export interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {
|
88
|
+
}
|
89
|
+
/**
|
90
|
+
* Loader interface with additional members.
|
91
|
+
*/
|
92
|
+
export interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
|
93
|
+
}
|
94
|
+
/**
|
95
|
+
* Loader interface with additional members.
|
96
|
+
*/
|
97
|
+
export interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {
|
98
|
+
baseColorTexture?: ITextureInfo;
|
99
|
+
metallicRoughnessTexture?: ITextureInfo;
|
100
|
+
}
|
101
|
+
/**
|
102
|
+
* Loader interface with additional members.
|
103
|
+
*/
|
104
|
+
export interface IMaterial extends GLTF2.IMaterial, IArrayItem {
|
105
|
+
pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;
|
106
|
+
normalTexture?: IMaterialNormalTextureInfo;
|
107
|
+
occlusionTexture?: IMaterialOcclusionTextureInfo;
|
108
|
+
emissiveTexture?: ITextureInfo;
|
109
|
+
/** @hidden */
|
110
|
+
_data?: {
|
111
|
+
[babylonDrawMode: number]: {
|
112
|
+
babylonMaterial: Material;
|
113
|
+
babylonMeshes: AbstractMesh[];
|
114
|
+
promise: Promise<void>;
|
115
|
+
};
|
116
|
+
};
|
117
|
+
}
|
118
|
+
/**
|
119
|
+
* Loader interface with additional members.
|
120
|
+
*/
|
121
|
+
export interface IMesh extends GLTF2.IMesh, IArrayItem {
|
122
|
+
primitives: IMeshPrimitive[];
|
123
|
+
}
|
124
|
+
/**
|
125
|
+
* Loader interface with additional members.
|
126
|
+
*/
|
127
|
+
export interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
|
128
|
+
/** @hidden */
|
129
|
+
_instanceData?: {
|
130
|
+
babylonSourceMesh: Mesh;
|
131
|
+
promise: Promise<any>;
|
132
|
+
};
|
133
|
+
}
|
134
|
+
/**
|
135
|
+
* Loader interface with additional members.
|
136
|
+
*/
|
137
|
+
export interface INode extends GLTF2.INode, IArrayItem {
|
138
|
+
/**
|
139
|
+
* The parent glTF node.
|
140
|
+
*/
|
141
|
+
parent?: INode;
|
142
|
+
/** @hidden */
|
143
|
+
_babylonTransformNode?: TransformNode;
|
144
|
+
/** @hidden */
|
145
|
+
_babylonTransformNodeForSkin?: TransformNode;
|
146
|
+
/** @hidden */
|
147
|
+
_primitiveBabylonMeshes?: AbstractMesh[];
|
148
|
+
/** @hidden */
|
149
|
+
_numMorphTargets?: number;
|
150
|
+
}
|
151
|
+
/** @hidden */
|
152
|
+
export interface _ISamplerData {
|
153
|
+
noMipMaps: boolean;
|
154
|
+
samplingMode: number;
|
155
|
+
wrapU: number;
|
156
|
+
wrapV: number;
|
157
|
+
}
|
158
|
+
/**
|
159
|
+
* Loader interface with additional members.
|
160
|
+
*/
|
161
|
+
export interface ISampler extends GLTF2.ISampler, IArrayItem {
|
162
|
+
/** @hidden */
|
163
|
+
_data?: _ISamplerData;
|
164
|
+
}
|
165
|
+
/**
|
166
|
+
* Loader interface with additional members.
|
167
|
+
*/
|
168
|
+
export interface IScene extends GLTF2.IScene, IArrayItem {
|
169
|
+
}
|
170
|
+
/**
|
171
|
+
* Loader interface with additional members.
|
172
|
+
*/
|
173
|
+
export interface ISkin extends GLTF2.ISkin, IArrayItem {
|
174
|
+
/** @hidden */
|
175
|
+
_data?: {
|
176
|
+
babylonSkeleton: Skeleton;
|
177
|
+
promise: Promise<void>;
|
178
|
+
};
|
179
|
+
}
|
180
|
+
/**
|
181
|
+
* Loader interface with additional members.
|
182
|
+
*/
|
183
|
+
export interface ITexture extends GLTF2.ITexture, IArrayItem {
|
184
|
+
/** @hidden */
|
185
|
+
_textureInfo: ITextureInfo;
|
186
|
+
}
|
187
|
+
/**
|
188
|
+
* Loader interface with additional members.
|
189
|
+
*/
|
190
|
+
export interface ITextureInfo extends GLTF2.ITextureInfo {
|
191
|
+
/** false or undefined if the texture holds color data (true if data are roughness, normal, ...) */
|
192
|
+
nonColorData?: boolean;
|
193
|
+
}
|
194
|
+
/**
|
195
|
+
* Loader interface with additional members.
|
196
|
+
*/
|
197
|
+
export interface IGLTF extends GLTF2.IGLTF {
|
198
|
+
accessors?: IAccessor[];
|
199
|
+
animations?: IAnimation[];
|
200
|
+
buffers?: IBuffer[];
|
201
|
+
bufferViews?: IBufferView[];
|
202
|
+
cameras?: ICamera[];
|
203
|
+
images?: IImage[];
|
204
|
+
materials?: IMaterial[];
|
205
|
+
meshes?: IMesh[];
|
206
|
+
nodes?: INode[];
|
207
|
+
samplers?: ISampler[];
|
208
|
+
scenes?: IScene[];
|
209
|
+
skins?: ISkin[];
|
210
|
+
textures?: ITexture[];
|
211
|
+
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
2
2
|
//# sourceMappingURL=glTFLoaderInterfaces.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"glTFLoaderInterfaces.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"glTFLoaderInterfaces.js","sourceRoot":"","sources":["../../../../../../lts/loaders/generated/glTF/2.0/glTFLoaderInterfaces.ts"],"names":[],"mappings":"","sourcesContent":["import type { AnimationGroup } from \"core/Animations/animationGroup\";\r\nimport type { Skeleton } from \"core/Bones/skeleton\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { TransformNode } from \"core/Meshes/transformNode\";\r\nimport type { Buffer, VertexBuffer } from \"core/Buffers/buffer\";\r\nimport type { AbstractMesh } from \"core/Meshes/abstractMesh\";\r\nimport type { Mesh } from \"core/Meshes/mesh\";\r\n\r\nimport type * as GLTF2 from \"babylonjs-gltf2interface\";\r\n\r\n/**\r\n * Loader interface with an index field.\r\n */\r\nexport interface IArrayItem {\r\n /**\r\n * The index of this item in the array.\r\n */\r\n index: number;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAccessor extends GLTF2.IAccessor, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n\r\n /** @hidden */\r\n _babylonVertexBuffer?: { [kind: string]: Promise<VertexBuffer> };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {}\r\n\r\n/** @hidden */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport interface _IAnimationSamplerData {\r\n input: Float32Array;\r\n interpolation: GLTF2.AnimationSamplerInterpolation;\r\n output: Float32Array;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<_IAnimationSamplerData>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimation extends GLTF2.IAnimation, IArrayItem {\r\n channels: IAnimationChannel[];\r\n samplers: IAnimationSampler[];\r\n\r\n /** @hidden */\r\n _babylonAnimationGroup?: AnimationGroup;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IBuffer extends GLTF2.IBuffer, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IBufferView extends GLTF2.IBufferView, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n\r\n /** @hidden */\r\n _babylonBuffer?: Promise<Buffer>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ICamera extends GLTF2.ICamera, IArrayItem {}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IImage extends GLTF2.IImage, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {\r\n baseColorTexture?: ITextureInfo;\r\n metallicRoughnessTexture?: ITextureInfo;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterial extends GLTF2.IMaterial, IArrayItem {\r\n pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;\r\n normalTexture?: IMaterialNormalTextureInfo;\r\n occlusionTexture?: IMaterialOcclusionTextureInfo;\r\n emissiveTexture?: ITextureInfo;\r\n\r\n /** @hidden */\r\n _data?: {\r\n [babylonDrawMode: number]: {\r\n babylonMaterial: Material;\r\n babylonMeshes: AbstractMesh[];\r\n promise: Promise<void>;\r\n };\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMesh extends GLTF2.IMesh, IArrayItem {\r\n primitives: IMeshPrimitive[];\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {\r\n /** @hidden */\r\n _instanceData?: {\r\n babylonSourceMesh: Mesh;\r\n promise: Promise<any>;\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface INode extends GLTF2.INode, IArrayItem {\r\n /**\r\n * The parent glTF node.\r\n */\r\n parent?: INode;\r\n\r\n /** @hidden */\r\n _babylonTransformNode?: TransformNode;\r\n\r\n /** @hidden */\r\n _babylonTransformNodeForSkin?: TransformNode;\r\n\r\n /** @hidden */\r\n _primitiveBabylonMeshes?: AbstractMesh[];\r\n\r\n /** @hidden */\r\n _numMorphTargets?: number;\r\n}\r\n\r\n/** @hidden */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport interface _ISamplerData {\r\n noMipMaps: boolean;\r\n samplingMode: number;\r\n wrapU: number;\r\n wrapV: number;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ISampler extends GLTF2.ISampler, IArrayItem {\r\n /** @hidden */\r\n _data?: _ISamplerData;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IScene extends GLTF2.IScene, IArrayItem {}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ISkin extends GLTF2.ISkin, IArrayItem {\r\n /** @hidden */\r\n _data?: {\r\n babylonSkeleton: Skeleton;\r\n promise: Promise<void>;\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ITexture extends GLTF2.ITexture, IArrayItem {\r\n /** @hidden */\r\n _textureInfo: ITextureInfo;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ITextureInfo extends GLTF2.ITextureInfo {\r\n /** false or undefined if the texture holds color data (true if data are roughness, normal, ...) */\r\n nonColorData?: boolean;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IGLTF extends GLTF2.IGLTF {\r\n accessors?: IAccessor[];\r\n animations?: IAnimation[];\r\n buffers?: IBuffer[];\r\n bufferViews?: IBufferView[];\r\n cameras?: ICamera[];\r\n images?: IImage[];\r\n materials?: IMaterial[];\r\n meshes?: IMesh[];\r\n nodes?: INode[];\r\n samplers?: ISampler[];\r\n scenes?: IScene[];\r\n skins?: ISkin[];\r\n textures?: ITexture[];\r\n}\r\n"]}
|
package/glTF/2.0/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export * from "./glTFLoader";
|
2
|
-
export * from "./glTFLoaderExtension";
|
3
|
-
export * from "./glTFLoaderInterfaces";
|
4
|
-
export * from "./Extensions/index";
|
1
|
+
export * from "./glTFLoader";
|
2
|
+
export * from "./glTFLoaderExtension";
|
3
|
+
export * from "./glTFLoaderInterfaces";
|
4
|
+
export * from "./Extensions/index";
|
package/glTF/2.0/index.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
|
2
|
-
export * from "./
|
3
|
-
export * from "./
|
4
|
-
export * from "./
|
1
|
+
/* eslint-disable import/no-internal-modules */
|
2
|
+
export * from "./glTFLoader";
|
3
|
+
export * from "./glTFLoaderExtension";
|
4
|
+
export * from "./glTFLoaderInterfaces";
|
5
|
+
export * from "./Extensions/index";
|
5
6
|
//# sourceMappingURL=index.js.map
|
package/glTF/2.0/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../lts/loaders/generated/glTF/2.0/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nexport * from \"./glTFLoader\";\r\nexport * from \"./glTFLoaderExtension\";\r\nexport * from \"./glTFLoaderInterfaces\";\r\nexport * from \"./Extensions/index\";\r\n"]}
|