@pixiv/three-vrm 0.6.4 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/three-vrm.js +3664 -3472
- package/lib/three-vrm.min.js +2 -2
- package/lib/three-vrm.module.js +3644 -3483
- package/lib/three-vrm.module.min.js +2 -2
- package/package.json +6 -9
- package/ts3.4/types/VRMUtils/index.d.ts +2 -0
- package/ts3.4/types/VRMUtils/removeUnnecessaryVertices.d.ts +12 -0
- package/ts3.4/types/material/getTexelDecodingFunction.d.ts +6 -0
- package/types/VRM.d.ts +110 -110
- package/types/VRMImporter.d.ts +42 -42
- package/types/VRMUtils/extractThumbnailBlob.d.ts +10 -10
- package/types/VRMUtils/index.d.ts +9 -7
- package/types/VRMUtils/removeUnnecessaryJoints.d.ts +9 -9
- package/types/VRMUtils/removeUnnecessaryVertices.d.ts +12 -0
- package/types/blendshape/VRMBlendShapeGroup.d.ts +50 -50
- package/types/blendshape/VRMBlendShapeImporter.d.ts +13 -13
- package/types/blendshape/VRMBlendShapeProxy.d.ts +91 -91
- package/types/blendshape/index.d.ts +3 -3
- package/types/debug/VRMDebug.d.ts +28 -28
- package/types/debug/VRMDebugOptions.d.ts +10 -10
- package/types/debug/VRMImporterDebug.d.ts +11 -11
- package/types/debug/VRMLookAtHeadDebug.d.ts +8 -8
- package/types/debug/VRMLookAtImporterDebug.d.ts +9 -9
- package/types/debug/VRMSpringBoneDebug.d.ts +14 -14
- package/types/debug/VRMSpringBoneImporterDebug.d.ts +10 -10
- package/types/debug/VRMSpringBoneManagerDebug.d.ts +11 -11
- package/types/debug/index.d.ts +4 -4
- package/types/firstperson/VRMFirstPerson.d.ts +116 -116
- package/types/firstperson/VRMFirstPersonImporter.d.ts +15 -15
- package/types/firstperson/index.d.ts +2 -2
- package/types/humanoid/VRMHumanBone.d.ts +22 -22
- package/types/humanoid/VRMHumanBoneArray.d.ts +9 -9
- package/types/humanoid/VRMHumanBones.d.ts +8 -8
- package/types/humanoid/VRMHumanDescription.d.ts +14 -14
- package/types/humanoid/VRMHumanLimit.d.ts +12 -12
- package/types/humanoid/VRMHumanoid.d.ts +87 -87
- package/types/humanoid/VRMHumanoidImporter.d.ts +13 -13
- package/types/humanoid/index.d.ts +6 -6
- package/types/index.d.ts +12 -12
- package/types/lookat/VRMCurveMapper.d.ts +36 -36
- package/types/lookat/VRMLookAtApplyer.d.ts +18 -18
- package/types/lookat/VRMLookAtBlendShapeApplyer.d.ts +26 -26
- package/types/lookat/VRMLookAtBoneApplyer.d.ts +28 -28
- package/types/lookat/VRMLookAtHead.d.ts +57 -57
- package/types/lookat/VRMLookAtImporter.d.ts +23 -23
- package/types/lookat/index.d.ts +6 -6
- package/types/material/MToonMaterial.d.ts +206 -206
- package/types/material/VRMMaterialImporter.d.ts +50 -50
- package/types/material/VRMUnlitMaterial.d.ts +46 -46
- package/types/material/getTexelDecodingFunction.d.ts +9 -3
- package/types/material/index.d.ts +3 -3
- package/types/meta/VRMMeta.d.ts +59 -59
- package/types/meta/VRMMetaImporter.d.ts +14 -14
- package/types/meta/VRMMetaImporterOptions.d.ts +9 -9
- package/types/meta/index.d.ts +3 -3
- package/types/springbone/VRMSpringBone.d.ts +130 -130
- package/types/springbone/VRMSpringBoneColliderGroup.d.ts +15 -15
- package/types/springbone/VRMSpringBoneImporter.d.ts +34 -34
- package/types/springbone/VRMSpringBoneManager.d.ts +35 -35
- package/types/springbone/VRMSpringBoneParameters.d.ts +9 -9
- package/types/springbone/index.d.ts +5 -5
- package/types/types/GLTFSchema.d.ts +887 -887
- package/types/types/VRMSchema.d.ts +440 -440
- package/types/types/index.d.ts +3 -3
- package/types/types/types.d.ts +64 -64
- package/types/utils/Matrix4InverseCache.d.ts +28 -28
- package/types/utils/disposer.d.ts +2 -2
- package/types/utils/gltfExtractPrimitivesFromNode.d.ts +22 -22
- package/types/utils/mat4InvertCompat.d.ts +8 -8
- package/types/utils/math.d.ts +40 -40
- package/types/utils/quatInvertCompat.d.ts +8 -8
- package/types/utils/renameMaterialProperty.d.ts +1 -1
|
@@ -1,887 +1,887 @@
|
|
|
1
|
-
export declare namespace GLTFSchema {
|
|
2
|
-
/**
|
|
3
|
-
* The root object for a glTF asset.
|
|
4
|
-
*/
|
|
5
|
-
interface GLTF {
|
|
6
|
-
/**
|
|
7
|
-
* An array of accessors.
|
|
8
|
-
*/
|
|
9
|
-
accessors?: Accessor[];
|
|
10
|
-
/**
|
|
11
|
-
* An array of keyframe animations.
|
|
12
|
-
*/
|
|
13
|
-
animations?: Animation[];
|
|
14
|
-
/**
|
|
15
|
-
* Metadata about the glTF asset.
|
|
16
|
-
*/
|
|
17
|
-
asset: Asset;
|
|
18
|
-
/**
|
|
19
|
-
* An array of buffers.
|
|
20
|
-
*/
|
|
21
|
-
buffers?: Buffer[];
|
|
22
|
-
/**
|
|
23
|
-
* An array of bufferViews.
|
|
24
|
-
*/
|
|
25
|
-
bufferViews?: BufferView[];
|
|
26
|
-
/**
|
|
27
|
-
* An array of cameras.
|
|
28
|
-
*/
|
|
29
|
-
cameras?: Camera[];
|
|
30
|
-
extensions?: {
|
|
31
|
-
[key: string]: {
|
|
32
|
-
[key: string]: any;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Names of glTF extensions required to properly load this asset.
|
|
37
|
-
*/
|
|
38
|
-
extensionsRequired?: string[];
|
|
39
|
-
/**
|
|
40
|
-
* Names of glTF extensions used somewhere in this asset.
|
|
41
|
-
*/
|
|
42
|
-
extensionsUsed?: string[];
|
|
43
|
-
extras?: any;
|
|
44
|
-
/**
|
|
45
|
-
* An array of images.
|
|
46
|
-
*/
|
|
47
|
-
images?: Image[];
|
|
48
|
-
/**
|
|
49
|
-
* An array of materials.
|
|
50
|
-
*/
|
|
51
|
-
materials?: Material[];
|
|
52
|
-
/**
|
|
53
|
-
* An array of meshes.
|
|
54
|
-
*/
|
|
55
|
-
meshes?: Mesh[];
|
|
56
|
-
/**
|
|
57
|
-
* An array of nodes.
|
|
58
|
-
*/
|
|
59
|
-
nodes?: Node[];
|
|
60
|
-
/**
|
|
61
|
-
* An array of samplers.
|
|
62
|
-
*/
|
|
63
|
-
samplers?: Sampler[];
|
|
64
|
-
/**
|
|
65
|
-
* The index of the default scene.
|
|
66
|
-
*/
|
|
67
|
-
scene?: number;
|
|
68
|
-
/**
|
|
69
|
-
* An array of scenes.
|
|
70
|
-
*/
|
|
71
|
-
scenes?: Scene[];
|
|
72
|
-
/**
|
|
73
|
-
* An array of skins.
|
|
74
|
-
*/
|
|
75
|
-
skins?: Skin[];
|
|
76
|
-
/**
|
|
77
|
-
* An array of textures.
|
|
78
|
-
*/
|
|
79
|
-
textures?: Texture[];
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* A typed view into a bufferView. A bufferView contains raw binary data. An accessor
|
|
83
|
-
* provides a typed view into a bufferView or a subset of a bufferView similar to how
|
|
84
|
-
* WebGL's `vertexAttribPointer()` defines an attribute in a buffer.
|
|
85
|
-
*/
|
|
86
|
-
interface Accessor {
|
|
87
|
-
/**
|
|
88
|
-
* The index of the bufferView.
|
|
89
|
-
*/
|
|
90
|
-
bufferView?: number;
|
|
91
|
-
/**
|
|
92
|
-
* The offset relative to the start of the bufferView in bytes.
|
|
93
|
-
*/
|
|
94
|
-
byteOffset?: number;
|
|
95
|
-
/**
|
|
96
|
-
* The datatype of components in the attribute.
|
|
97
|
-
*/
|
|
98
|
-
componentType: number;
|
|
99
|
-
/**
|
|
100
|
-
* The number of attributes referenced by this accessor.
|
|
101
|
-
*/
|
|
102
|
-
count: number;
|
|
103
|
-
extensions?: {
|
|
104
|
-
[key: string]: {
|
|
105
|
-
[key: string]: any;
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
extras?: any;
|
|
109
|
-
/**
|
|
110
|
-
* Maximum value of each component in this attribute.
|
|
111
|
-
*/
|
|
112
|
-
max?: number[];
|
|
113
|
-
/**
|
|
114
|
-
* Minimum value of each component in this attribute.
|
|
115
|
-
*/
|
|
116
|
-
min?: number[];
|
|
117
|
-
/**
|
|
118
|
-
* The user-defined name of this object.
|
|
119
|
-
*/
|
|
120
|
-
name?: string;
|
|
121
|
-
/**
|
|
122
|
-
* Specifies whether integer data values should be normalized.
|
|
123
|
-
*/
|
|
124
|
-
normalized?: boolean;
|
|
125
|
-
/**
|
|
126
|
-
* Sparse storage of attributes that deviate from their initialization value.
|
|
127
|
-
*/
|
|
128
|
-
sparse?: AccessorSparse;
|
|
129
|
-
/**
|
|
130
|
-
* Specifies if the attribute is a scalar, vector, or matrix.
|
|
131
|
-
*/
|
|
132
|
-
type: string;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Sparse storage of attributes that deviate from their initialization value.
|
|
136
|
-
*/
|
|
137
|
-
interface AccessorSparse {
|
|
138
|
-
/**
|
|
139
|
-
* Number of entries stored in the sparse array.
|
|
140
|
-
*/
|
|
141
|
-
count: number;
|
|
142
|
-
extensions?: {
|
|
143
|
-
[key: string]: {
|
|
144
|
-
[key: string]: any;
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
extras?: any;
|
|
148
|
-
/**
|
|
149
|
-
* Index array of size `count` that points to those accessor attributes that deviate from
|
|
150
|
-
* their initialization value. Indices must strictly increase.
|
|
151
|
-
*/
|
|
152
|
-
indices: AccessorSparseIndices;
|
|
153
|
-
/**
|
|
154
|
-
* Array of size `count` times number of components, storing the displaced accessor
|
|
155
|
-
* attributes pointed by `indices`. Substituted values must have the same `componentType`
|
|
156
|
-
* and number of components as the base accessor.
|
|
157
|
-
*/
|
|
158
|
-
values: AccessorSparseValues;
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Index array of size `count` that points to those accessor attributes that deviate from
|
|
162
|
-
* their initialization value. Indices must strictly increase.
|
|
163
|
-
*
|
|
164
|
-
* Indices of those attributes that deviate from their initialization value.
|
|
165
|
-
*/
|
|
166
|
-
interface AccessorSparseIndices {
|
|
167
|
-
/**
|
|
168
|
-
* The index of the bufferView with sparse indices. Referenced bufferView can't have
|
|
169
|
-
* ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
|
|
170
|
-
*/
|
|
171
|
-
bufferView: number;
|
|
172
|
-
/**
|
|
173
|
-
* The offset relative to the start of the bufferView in bytes. Must be aligned.
|
|
174
|
-
*/
|
|
175
|
-
byteOffset?: number;
|
|
176
|
-
/**
|
|
177
|
-
* The indices data type.
|
|
178
|
-
*/
|
|
179
|
-
componentType: number;
|
|
180
|
-
extensions?: {
|
|
181
|
-
[key: string]: {
|
|
182
|
-
[key: string]: any;
|
|
183
|
-
};
|
|
184
|
-
};
|
|
185
|
-
extras?: any;
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Array of size `count` times number of components, storing the displaced accessor
|
|
189
|
-
* attributes pointed by `indices`. Substituted values must have the same `componentType`
|
|
190
|
-
* and number of components as the base accessor.
|
|
191
|
-
*
|
|
192
|
-
* Array of size `accessor.sparse.count` times number of components storing the displaced
|
|
193
|
-
* accessor attributes pointed by `accessor.sparse.indices`.
|
|
194
|
-
*/
|
|
195
|
-
interface AccessorSparseValues {
|
|
196
|
-
/**
|
|
197
|
-
* The index of the bufferView with sparse values. Referenced bufferView can't have
|
|
198
|
-
* ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
|
|
199
|
-
*/
|
|
200
|
-
bufferView: number;
|
|
201
|
-
/**
|
|
202
|
-
* The offset relative to the start of the bufferView in bytes. Must be aligned.
|
|
203
|
-
*/
|
|
204
|
-
byteOffset?: number;
|
|
205
|
-
extensions?: {
|
|
206
|
-
[key: string]: {
|
|
207
|
-
[key: string]: any;
|
|
208
|
-
};
|
|
209
|
-
};
|
|
210
|
-
extras?: any;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* A keyframe animation.
|
|
214
|
-
*/
|
|
215
|
-
interface Animation {
|
|
216
|
-
/**
|
|
217
|
-
* An array of channels, each of which targets an animation's sampler at a node's property.
|
|
218
|
-
* Different channels of the same animation can't have equal targets.
|
|
219
|
-
*/
|
|
220
|
-
channels: AnimationChannel[];
|
|
221
|
-
extensions?: {
|
|
222
|
-
[key: string]: {
|
|
223
|
-
[key: string]: any;
|
|
224
|
-
};
|
|
225
|
-
};
|
|
226
|
-
extras?: any;
|
|
227
|
-
/**
|
|
228
|
-
* The user-defined name of this object.
|
|
229
|
-
*/
|
|
230
|
-
name?: string;
|
|
231
|
-
/**
|
|
232
|
-
* An array of samplers that combines input and output accessors with an interpolation
|
|
233
|
-
* algorithm to define a keyframe graph (but not its target).
|
|
234
|
-
*/
|
|
235
|
-
samplers: AnimationSampler[];
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Targets an animation's sampler at a node's property.
|
|
239
|
-
*/
|
|
240
|
-
interface AnimationChannel {
|
|
241
|
-
extensions?: {
|
|
242
|
-
[key: string]: {
|
|
243
|
-
[key: string]: any;
|
|
244
|
-
};
|
|
245
|
-
};
|
|
246
|
-
extras?: any;
|
|
247
|
-
/**
|
|
248
|
-
* The index of a sampler in this animation used to compute the value for the target.
|
|
249
|
-
*/
|
|
250
|
-
sampler: number;
|
|
251
|
-
/**
|
|
252
|
-
* The index of the node and TRS property to target.
|
|
253
|
-
*/
|
|
254
|
-
target: AnimationChannelTarget;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* The index of the node and TRS property to target.
|
|
258
|
-
*
|
|
259
|
-
* The index of the node and TRS property that an animation channel targets.
|
|
260
|
-
*/
|
|
261
|
-
interface AnimationChannelTarget {
|
|
262
|
-
extensions?: {
|
|
263
|
-
[key: string]: {
|
|
264
|
-
[key: string]: any;
|
|
265
|
-
};
|
|
266
|
-
};
|
|
267
|
-
extras?: any;
|
|
268
|
-
/**
|
|
269
|
-
* The index of the node to target.
|
|
270
|
-
*/
|
|
271
|
-
node?: number;
|
|
272
|
-
/**
|
|
273
|
-
* The name of the node's TRS property to modify, or the "weights" of the Morph Targets it
|
|
274
|
-
* instantiates. For the "translation" property, the values that are provided by the sampler
|
|
275
|
-
* are the translation along the x, y, and z axes. For the "rotation" property, the values
|
|
276
|
-
* are a quaternion in the order (x, y, z, w), where w is the scalar. For the "scale"
|
|
277
|
-
* property, the values are the scaling factors along the x, y, and z axes.
|
|
278
|
-
*/
|
|
279
|
-
path: string;
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* Combines input and output accessors with an interpolation algorithm to define a keyframe
|
|
283
|
-
* graph (but not its target).
|
|
284
|
-
*/
|
|
285
|
-
interface AnimationSampler {
|
|
286
|
-
extensions?: {
|
|
287
|
-
[key: string]: {
|
|
288
|
-
[key: string]: any;
|
|
289
|
-
};
|
|
290
|
-
};
|
|
291
|
-
extras?: any;
|
|
292
|
-
/**
|
|
293
|
-
* The index of an accessor containing keyframe input values, e.g., time.
|
|
294
|
-
*/
|
|
295
|
-
input: number;
|
|
296
|
-
/**
|
|
297
|
-
* Interpolation algorithm.
|
|
298
|
-
*/
|
|
299
|
-
interpolation?: string;
|
|
300
|
-
/**
|
|
301
|
-
* The index of an accessor, containing keyframe output values.
|
|
302
|
-
*/
|
|
303
|
-
output: number;
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* Metadata about the glTF asset.
|
|
307
|
-
*/
|
|
308
|
-
interface Asset {
|
|
309
|
-
/**
|
|
310
|
-
* A copyright message suitable for display to credit the content creator.
|
|
311
|
-
*/
|
|
312
|
-
copyright?: string;
|
|
313
|
-
extensions?: {
|
|
314
|
-
[key: string]: {
|
|
315
|
-
[key: string]: any;
|
|
316
|
-
};
|
|
317
|
-
};
|
|
318
|
-
extras?: any;
|
|
319
|
-
/**
|
|
320
|
-
* Tool that generated this glTF model. Useful for debugging.
|
|
321
|
-
*/
|
|
322
|
-
generator?: string;
|
|
323
|
-
/**
|
|
324
|
-
* The minimum glTF version that this asset targets.
|
|
325
|
-
*/
|
|
326
|
-
minVersion?: string;
|
|
327
|
-
/**
|
|
328
|
-
* The glTF version that this asset targets.
|
|
329
|
-
*/
|
|
330
|
-
version: string;
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* A view into a buffer generally representing a subset of the buffer.
|
|
334
|
-
*/
|
|
335
|
-
interface BufferView {
|
|
336
|
-
/**
|
|
337
|
-
* The index of the buffer.
|
|
338
|
-
*/
|
|
339
|
-
buffer: number;
|
|
340
|
-
/**
|
|
341
|
-
* The total byte length of the buffer view.
|
|
342
|
-
*/
|
|
343
|
-
byteLength: number;
|
|
344
|
-
/**
|
|
345
|
-
* The offset into the buffer in bytes.
|
|
346
|
-
*/
|
|
347
|
-
byteOffset?: number;
|
|
348
|
-
/**
|
|
349
|
-
* The stride, in bytes.
|
|
350
|
-
*/
|
|
351
|
-
byteStride?: number;
|
|
352
|
-
extensions?: {
|
|
353
|
-
[key: string]: {
|
|
354
|
-
[key: string]: any;
|
|
355
|
-
};
|
|
356
|
-
};
|
|
357
|
-
extras?: any;
|
|
358
|
-
/**
|
|
359
|
-
* The user-defined name of this object.
|
|
360
|
-
*/
|
|
361
|
-
name?: string;
|
|
362
|
-
/**
|
|
363
|
-
* The target that the GPU buffer should be bound to.
|
|
364
|
-
*/
|
|
365
|
-
target?: number;
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* A buffer points to binary geometry, animation, or skins.
|
|
369
|
-
*/
|
|
370
|
-
interface Buffer {
|
|
371
|
-
/**
|
|
372
|
-
* The length of the buffer in bytes.
|
|
373
|
-
*/
|
|
374
|
-
byteLength: number;
|
|
375
|
-
extensions?: {
|
|
376
|
-
[key: string]: {
|
|
377
|
-
[key: string]: any;
|
|
378
|
-
};
|
|
379
|
-
};
|
|
380
|
-
extras?: any;
|
|
381
|
-
/**
|
|
382
|
-
* The user-defined name of this object.
|
|
383
|
-
*/
|
|
384
|
-
name?: string;
|
|
385
|
-
/**
|
|
386
|
-
* The uri of the buffer.
|
|
387
|
-
*/
|
|
388
|
-
uri?: string;
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* A camera's projection. A node can reference a camera to apply a transform to place the
|
|
392
|
-
* camera in the scene.
|
|
393
|
-
*/
|
|
394
|
-
interface Camera {
|
|
395
|
-
extensions?: {
|
|
396
|
-
[key: string]: {
|
|
397
|
-
[key: string]: any;
|
|
398
|
-
};
|
|
399
|
-
};
|
|
400
|
-
extras?: any;
|
|
401
|
-
/**
|
|
402
|
-
* The user-defined name of this object.
|
|
403
|
-
*/
|
|
404
|
-
name?: string;
|
|
405
|
-
/**
|
|
406
|
-
* An orthographic camera containing properties to create an orthographic projection matrix.
|
|
407
|
-
*/
|
|
408
|
-
orthographic?: CameraOrthographic;
|
|
409
|
-
/**
|
|
410
|
-
* A perspective camera containing properties to create a perspective projection matrix.
|
|
411
|
-
*/
|
|
412
|
-
perspective?: CameraPerspective;
|
|
413
|
-
/**
|
|
414
|
-
* Specifies if the camera uses a perspective or orthographic projection.
|
|
415
|
-
*/
|
|
416
|
-
type: string;
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
* An orthographic camera containing properties to create an orthographic projection matrix.
|
|
420
|
-
*/
|
|
421
|
-
interface CameraOrthographic {
|
|
422
|
-
extensions?: {
|
|
423
|
-
[key: string]: {
|
|
424
|
-
[key: string]: any;
|
|
425
|
-
};
|
|
426
|
-
};
|
|
427
|
-
extras?: any;
|
|
428
|
-
/**
|
|
429
|
-
* The floating-point horizontal magnification of the view. Must not be zero.
|
|
430
|
-
*/
|
|
431
|
-
xmag: number;
|
|
432
|
-
/**
|
|
433
|
-
* The floating-point vertical magnification of the view. Must not be zero.
|
|
434
|
-
*/
|
|
435
|
-
ymag: number;
|
|
436
|
-
/**
|
|
437
|
-
* The floating-point distance to the far clipping plane. `zfar` must be greater than
|
|
438
|
-
* `znear`.
|
|
439
|
-
*/
|
|
440
|
-
zfar: number;
|
|
441
|
-
/**
|
|
442
|
-
* The floating-point distance to the near clipping plane.
|
|
443
|
-
*/
|
|
444
|
-
znear: number;
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
|
-
* A perspective camera containing properties to create a perspective projection matrix.
|
|
448
|
-
*/
|
|
449
|
-
interface CameraPerspective {
|
|
450
|
-
/**
|
|
451
|
-
* The floating-point aspect ratio of the field of view.
|
|
452
|
-
*/
|
|
453
|
-
aspectRatio?: number;
|
|
454
|
-
extensions?: {
|
|
455
|
-
[key: string]: {
|
|
456
|
-
[key: string]: any;
|
|
457
|
-
};
|
|
458
|
-
};
|
|
459
|
-
extras?: any;
|
|
460
|
-
/**
|
|
461
|
-
* The floating-point vertical field of view in radians.
|
|
462
|
-
*/
|
|
463
|
-
yfov: number;
|
|
464
|
-
/**
|
|
465
|
-
* The floating-point distance to the far clipping plane.
|
|
466
|
-
*/
|
|
467
|
-
zfar?: number;
|
|
468
|
-
/**
|
|
469
|
-
* The floating-point distance to the near clipping plane.
|
|
470
|
-
*/
|
|
471
|
-
znear: number;
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* Image data used to create a texture. Image can be referenced by URI or `bufferView`
|
|
475
|
-
* index. `mimeType` is required in the latter case.
|
|
476
|
-
*/
|
|
477
|
-
interface Image {
|
|
478
|
-
/**
|
|
479
|
-
* The index of the bufferView that contains the image. Use this instead of the image's uri
|
|
480
|
-
* property.
|
|
481
|
-
*/
|
|
482
|
-
bufferView?: number;
|
|
483
|
-
extensions?: {
|
|
484
|
-
[key: string]: {
|
|
485
|
-
[key: string]: any;
|
|
486
|
-
};
|
|
487
|
-
};
|
|
488
|
-
extras?: any;
|
|
489
|
-
/**
|
|
490
|
-
* The image's MIME type. Required if `bufferView` is defined.
|
|
491
|
-
*/
|
|
492
|
-
mimeType?: string;
|
|
493
|
-
/**
|
|
494
|
-
* The user-defined name of this object.
|
|
495
|
-
*/
|
|
496
|
-
name?: string;
|
|
497
|
-
/**
|
|
498
|
-
* The uri of the image.
|
|
499
|
-
*/
|
|
500
|
-
uri?: string;
|
|
501
|
-
}
|
|
502
|
-
/**
|
|
503
|
-
* The material appearance of a primitive.
|
|
504
|
-
*/
|
|
505
|
-
interface Material {
|
|
506
|
-
/**
|
|
507
|
-
* The alpha cutoff value of the material.
|
|
508
|
-
*/
|
|
509
|
-
alphaCutoff?: number;
|
|
510
|
-
/**
|
|
511
|
-
* The alpha rendering mode of the material.
|
|
512
|
-
*/
|
|
513
|
-
alphaMode?: string;
|
|
514
|
-
/**
|
|
515
|
-
* Specifies whether the material is double sided.
|
|
516
|
-
*/
|
|
517
|
-
doubleSided?: boolean;
|
|
518
|
-
/**
|
|
519
|
-
* The emissive color of the material.
|
|
520
|
-
*/
|
|
521
|
-
emissiveFactor?: number[];
|
|
522
|
-
/**
|
|
523
|
-
* The emissive map texture.
|
|
524
|
-
*/
|
|
525
|
-
emissiveTexture?: TextureInfo;
|
|
526
|
-
extensions?: {
|
|
527
|
-
[key: string]: {
|
|
528
|
-
[key: string]: any;
|
|
529
|
-
};
|
|
530
|
-
};
|
|
531
|
-
extras?: any;
|
|
532
|
-
/**
|
|
533
|
-
* The user-defined name of this object.
|
|
534
|
-
*/
|
|
535
|
-
name?: string;
|
|
536
|
-
/**
|
|
537
|
-
* The normal map texture.
|
|
538
|
-
*/
|
|
539
|
-
normalTexture?: MaterialNormalTextureInfoObject;
|
|
540
|
-
/**
|
|
541
|
-
* The occlusion map texture.
|
|
542
|
-
*/
|
|
543
|
-
occlusionTexture?: MaterialOcclusionTextureInfoObject;
|
|
544
|
-
/**
|
|
545
|
-
* A set of parameter values that are used to define the metallic-roughness material model
|
|
546
|
-
* from Physically-Based Rendering (PBR) methodology. When not specified, all the default
|
|
547
|
-
* values of `pbrMetallicRoughness` apply.
|
|
548
|
-
*/
|
|
549
|
-
pbrMetallicRoughness?: MaterialPBRMetallicRoughness;
|
|
550
|
-
}
|
|
551
|
-
/**
|
|
552
|
-
* The emissive map texture.
|
|
553
|
-
*
|
|
554
|
-
* The base color texture.
|
|
555
|
-
*
|
|
556
|
-
* The metallic-roughness texture.
|
|
557
|
-
*
|
|
558
|
-
* Reference to a texture.
|
|
559
|
-
*/
|
|
560
|
-
interface TextureInfo {
|
|
561
|
-
extensions?: {
|
|
562
|
-
[key: string]: {
|
|
563
|
-
[key: string]: any;
|
|
564
|
-
};
|
|
565
|
-
};
|
|
566
|
-
extras?: any;
|
|
567
|
-
/**
|
|
568
|
-
* The index of the texture.
|
|
569
|
-
*/
|
|
570
|
-
index: number;
|
|
571
|
-
/**
|
|
572
|
-
* The set index of texture's TEXCOORD attribute used for texture coordinate mapping.
|
|
573
|
-
*/
|
|
574
|
-
texCoord?: number;
|
|
575
|
-
}
|
|
576
|
-
/**
|
|
577
|
-
* The normal map texture.
|
|
578
|
-
*
|
|
579
|
-
* Reference to a texture.
|
|
580
|
-
*/
|
|
581
|
-
interface MaterialNormalTextureInfoObject {
|
|
582
|
-
extensions?: {
|
|
583
|
-
[key: string]: {
|
|
584
|
-
[key: string]: any;
|
|
585
|
-
};
|
|
586
|
-
};
|
|
587
|
-
extras?: any;
|
|
588
|
-
/**
|
|
589
|
-
* The index of the texture.
|
|
590
|
-
*/
|
|
591
|
-
index: number;
|
|
592
|
-
/**
|
|
593
|
-
* The scalar multiplier applied to each normal vector of the normal texture.
|
|
594
|
-
*/
|
|
595
|
-
scale?: number;
|
|
596
|
-
/**
|
|
597
|
-
* The set index of texture's TEXCOORD attribute used for texture coordinate mapping.
|
|
598
|
-
*/
|
|
599
|
-
texCoord?: number;
|
|
600
|
-
}
|
|
601
|
-
/**
|
|
602
|
-
* The occlusion map texture.
|
|
603
|
-
*
|
|
604
|
-
* Reference to a texture.
|
|
605
|
-
*/
|
|
606
|
-
interface MaterialOcclusionTextureInfoObject {
|
|
607
|
-
extensions?: {
|
|
608
|
-
[key: string]: {
|
|
609
|
-
[key: string]: any;
|
|
610
|
-
};
|
|
611
|
-
};
|
|
612
|
-
extras?: any;
|
|
613
|
-
/**
|
|
614
|
-
* The index of the texture.
|
|
615
|
-
*/
|
|
616
|
-
index: number;
|
|
617
|
-
/**
|
|
618
|
-
* A scalar multiplier controlling the amount of occlusion applied.
|
|
619
|
-
*/
|
|
620
|
-
strength?: number;
|
|
621
|
-
/**
|
|
622
|
-
* The set index of texture's TEXCOORD attribute used for texture coordinate mapping.
|
|
623
|
-
*/
|
|
624
|
-
texCoord?: number;
|
|
625
|
-
}
|
|
626
|
-
/**
|
|
627
|
-
* A set of parameter values that are used to define the metallic-roughness material model
|
|
628
|
-
* from Physically-Based Rendering (PBR) methodology. When not specified, all the default
|
|
629
|
-
* values of `pbrMetallicRoughness` apply.
|
|
630
|
-
*
|
|
631
|
-
* A set of parameter values that are used to define the metallic-roughness material model
|
|
632
|
-
* from Physically-Based Rendering (PBR) methodology.
|
|
633
|
-
*/
|
|
634
|
-
interface MaterialPBRMetallicRoughness {
|
|
635
|
-
/**
|
|
636
|
-
* The material's base color factor.
|
|
637
|
-
*/
|
|
638
|
-
baseColorFactor?: number[];
|
|
639
|
-
/**
|
|
640
|
-
* The base color texture.
|
|
641
|
-
*/
|
|
642
|
-
baseColorTexture?: TextureInfo;
|
|
643
|
-
extensions?: {
|
|
644
|
-
[key: string]: {
|
|
645
|
-
[key: string]: any;
|
|
646
|
-
};
|
|
647
|
-
};
|
|
648
|
-
extras?: any;
|
|
649
|
-
/**
|
|
650
|
-
* The metalness of the material.
|
|
651
|
-
*/
|
|
652
|
-
metallicFactor?: number;
|
|
653
|
-
/**
|
|
654
|
-
* The metallic-roughness texture.
|
|
655
|
-
*/
|
|
656
|
-
metallicRoughnessTexture?: TextureInfo;
|
|
657
|
-
/**
|
|
658
|
-
* The roughness of the material.
|
|
659
|
-
*/
|
|
660
|
-
roughnessFactor?: number;
|
|
661
|
-
}
|
|
662
|
-
/**
|
|
663
|
-
* A set of primitives to be rendered. A node can contain one mesh. A node's transform
|
|
664
|
-
* places the mesh in the scene.
|
|
665
|
-
*/
|
|
666
|
-
interface Mesh {
|
|
667
|
-
extensions?: {
|
|
668
|
-
[key: string]: {
|
|
669
|
-
[key: string]: any;
|
|
670
|
-
};
|
|
671
|
-
};
|
|
672
|
-
extras?: any;
|
|
673
|
-
/**
|
|
674
|
-
* The user-defined name of this object.
|
|
675
|
-
*/
|
|
676
|
-
name?: string;
|
|
677
|
-
/**
|
|
678
|
-
* An array of primitives, each defining geometry to be rendered with a material.
|
|
679
|
-
*/
|
|
680
|
-
primitives: MeshPrimitive[];
|
|
681
|
-
/**
|
|
682
|
-
* Array of weights to be applied to the Morph Targets.
|
|
683
|
-
*/
|
|
684
|
-
weights?: number[];
|
|
685
|
-
}
|
|
686
|
-
/**
|
|
687
|
-
* Geometry to be rendered with the given material.
|
|
688
|
-
*/
|
|
689
|
-
interface MeshPrimitive {
|
|
690
|
-
/**
|
|
691
|
-
* A dictionary object, where each key corresponds to mesh attribute semantic and each value
|
|
692
|
-
* is the index of the accessor containing attribute's data.
|
|
693
|
-
*/
|
|
694
|
-
attributes: {
|
|
695
|
-
[key: string]: number;
|
|
696
|
-
};
|
|
697
|
-
extensions?: {
|
|
698
|
-
[key: string]: {
|
|
699
|
-
[key: string]: any;
|
|
700
|
-
};
|
|
701
|
-
};
|
|
702
|
-
extras?: any;
|
|
703
|
-
/**
|
|
704
|
-
* The index of the accessor that contains the indices.
|
|
705
|
-
*/
|
|
706
|
-
indices?: number;
|
|
707
|
-
/**
|
|
708
|
-
* The index of the material to apply to this primitive when rendering.
|
|
709
|
-
*/
|
|
710
|
-
material?: number;
|
|
711
|
-
/**
|
|
712
|
-
* The type of primitives to render.
|
|
713
|
-
*/
|
|
714
|
-
mode?: number;
|
|
715
|
-
/**
|
|
716
|
-
* An array of Morph Targets, each Morph Target is a dictionary mapping attributes (only
|
|
717
|
-
* `POSITION`, `NORMAL`, and `TANGENT` supported) to their deviations in the Morph Target.
|
|
718
|
-
*/
|
|
719
|
-
targets?: {
|
|
720
|
-
[key: string]: number;
|
|
721
|
-
}[];
|
|
722
|
-
}
|
|
723
|
-
/**
|
|
724
|
-
* A node in the node hierarchy. When the node contains `skin`, all `mesh.primitives` must
|
|
725
|
-
* contain `JOINTS_0` and `WEIGHTS_0` attributes. A node can have either a `matrix` or any
|
|
726
|
-
* combination of `translation`/`rotation`/`scale` (TRS) properties. TRS properties are
|
|
727
|
-
* converted to matrices and postmultiplied in the `T * R * S` order to compose the
|
|
728
|
-
* transformation matrix; first the scale is applied to the vertices, then the rotation, and
|
|
729
|
-
* then the translation. If none are provided, the transform is the identity. When a node is
|
|
730
|
-
* targeted for animation (referenced by an animation.channel.target), only TRS properties
|
|
731
|
-
* may be present; `matrix` will not be present.
|
|
732
|
-
*/
|
|
733
|
-
interface Node {
|
|
734
|
-
/**
|
|
735
|
-
* The index of the camera referenced by this node.
|
|
736
|
-
*/
|
|
737
|
-
camera?: number;
|
|
738
|
-
/**
|
|
739
|
-
* The indices of this node's children.
|
|
740
|
-
*/
|
|
741
|
-
children?: number[];
|
|
742
|
-
extensions?: {
|
|
743
|
-
[key: string]: {
|
|
744
|
-
[key: string]: any;
|
|
745
|
-
};
|
|
746
|
-
};
|
|
747
|
-
extras?: any;
|
|
748
|
-
/**
|
|
749
|
-
* A floating-point 4x4 transformation matrix stored in column-major order.
|
|
750
|
-
*/
|
|
751
|
-
matrix?: number[];
|
|
752
|
-
/**
|
|
753
|
-
* The index of the mesh in this node.
|
|
754
|
-
*/
|
|
755
|
-
mesh?: number;
|
|
756
|
-
/**
|
|
757
|
-
* The user-defined name of this object.
|
|
758
|
-
*/
|
|
759
|
-
name?: string;
|
|
760
|
-
/**
|
|
761
|
-
* The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.
|
|
762
|
-
*/
|
|
763
|
-
rotation?: number[];
|
|
764
|
-
/**
|
|
765
|
-
* The node's non-uniform scale, given as the scaling factors along the x, y, and z axes.
|
|
766
|
-
*/
|
|
767
|
-
scale?: number[];
|
|
768
|
-
/**
|
|
769
|
-
* The index of the skin referenced by this node.
|
|
770
|
-
*/
|
|
771
|
-
skin?: number;
|
|
772
|
-
/**
|
|
773
|
-
* The node's translation along the x, y, and z axes.
|
|
774
|
-
*/
|
|
775
|
-
translation?: number[];
|
|
776
|
-
/**
|
|
777
|
-
* The weights of the instantiated Morph Target. Number of elements must match number of
|
|
778
|
-
* Morph Targets of used mesh.
|
|
779
|
-
*/
|
|
780
|
-
weights?: number[];
|
|
781
|
-
}
|
|
782
|
-
/**
|
|
783
|
-
* Texture sampler properties for filtering and wrapping modes.
|
|
784
|
-
*/
|
|
785
|
-
interface Sampler {
|
|
786
|
-
extensions?: {
|
|
787
|
-
[key: string]: {
|
|
788
|
-
[key: string]: any;
|
|
789
|
-
};
|
|
790
|
-
};
|
|
791
|
-
extras?: any;
|
|
792
|
-
/**
|
|
793
|
-
* Magnification filter.
|
|
794
|
-
*/
|
|
795
|
-
magFilter?: number;
|
|
796
|
-
/**
|
|
797
|
-
* Minification filter.
|
|
798
|
-
*/
|
|
799
|
-
minFilter?: number;
|
|
800
|
-
/**
|
|
801
|
-
* The user-defined name of this object.
|
|
802
|
-
*/
|
|
803
|
-
name?: string;
|
|
804
|
-
/**
|
|
805
|
-
* s wrapping mode.
|
|
806
|
-
*/
|
|
807
|
-
wrapS?: number;
|
|
808
|
-
/**
|
|
809
|
-
* t wrapping mode.
|
|
810
|
-
*/
|
|
811
|
-
wrapT?: number;
|
|
812
|
-
}
|
|
813
|
-
/**
|
|
814
|
-
* The root nodes of a scene.
|
|
815
|
-
*/
|
|
816
|
-
interface Scene {
|
|
817
|
-
extensions?: {
|
|
818
|
-
[key: string]: {
|
|
819
|
-
[key: string]: any;
|
|
820
|
-
};
|
|
821
|
-
};
|
|
822
|
-
extras?: any;
|
|
823
|
-
/**
|
|
824
|
-
* The user-defined name of this object.
|
|
825
|
-
*/
|
|
826
|
-
name?: string;
|
|
827
|
-
/**
|
|
828
|
-
* The indices of each root node.
|
|
829
|
-
*/
|
|
830
|
-
nodes?: number[];
|
|
831
|
-
}
|
|
832
|
-
/**
|
|
833
|
-
* Joints and matrices defining a skin.
|
|
834
|
-
*/
|
|
835
|
-
interface Skin {
|
|
836
|
-
extensions?: {
|
|
837
|
-
[key: string]: {
|
|
838
|
-
[key: string]: any;
|
|
839
|
-
};
|
|
840
|
-
};
|
|
841
|
-
extras?: any;
|
|
842
|
-
/**
|
|
843
|
-
* The index of the accessor containing the floating-point 4x4 inverse-bind matrices. The
|
|
844
|
-
* default is that each matrix is a 4x4 identity matrix, which implies that inverse-bind
|
|
845
|
-
* matrices were pre-applied.
|
|
846
|
-
*/
|
|
847
|
-
inverseBindMatrices?: number;
|
|
848
|
-
/**
|
|
849
|
-
* Indices of skeleton nodes, used as joints in this skin.
|
|
850
|
-
*/
|
|
851
|
-
joints: number[];
|
|
852
|
-
/**
|
|
853
|
-
* The user-defined name of this object.
|
|
854
|
-
*/
|
|
855
|
-
name?: string;
|
|
856
|
-
/**
|
|
857
|
-
* The index of the node used as a skeleton root.
|
|
858
|
-
*/
|
|
859
|
-
skeleton?: number;
|
|
860
|
-
}
|
|
861
|
-
/**
|
|
862
|
-
* A texture and its sampler.
|
|
863
|
-
*/
|
|
864
|
-
interface Texture {
|
|
865
|
-
extensions?: {
|
|
866
|
-
[key: string]: {
|
|
867
|
-
[key: string]: any;
|
|
868
|
-
};
|
|
869
|
-
};
|
|
870
|
-
extras?: any;
|
|
871
|
-
/**
|
|
872
|
-
* The user-defined name of this object.
|
|
873
|
-
*/
|
|
874
|
-
name?: string;
|
|
875
|
-
/**
|
|
876
|
-
* The index of the sampler used by this texture. When undefined, a sampler with repeat
|
|
877
|
-
* wrapping and auto filtering should be used.
|
|
878
|
-
*/
|
|
879
|
-
sampler?: number;
|
|
880
|
-
/**
|
|
881
|
-
* The index of the image used by this texture. When undefined, it is expected that an
|
|
882
|
-
* extension or other mechanism will supply an alternate texture source, otherwise behavior
|
|
883
|
-
* is undefined.
|
|
884
|
-
*/
|
|
885
|
-
source?: number;
|
|
886
|
-
}
|
|
887
|
-
}
|
|
1
|
+
export declare namespace GLTFSchema {
|
|
2
|
+
/**
|
|
3
|
+
* The root object for a glTF asset.
|
|
4
|
+
*/
|
|
5
|
+
interface GLTF {
|
|
6
|
+
/**
|
|
7
|
+
* An array of accessors.
|
|
8
|
+
*/
|
|
9
|
+
accessors?: Accessor[];
|
|
10
|
+
/**
|
|
11
|
+
* An array of keyframe animations.
|
|
12
|
+
*/
|
|
13
|
+
animations?: Animation[];
|
|
14
|
+
/**
|
|
15
|
+
* Metadata about the glTF asset.
|
|
16
|
+
*/
|
|
17
|
+
asset: Asset;
|
|
18
|
+
/**
|
|
19
|
+
* An array of buffers.
|
|
20
|
+
*/
|
|
21
|
+
buffers?: Buffer[];
|
|
22
|
+
/**
|
|
23
|
+
* An array of bufferViews.
|
|
24
|
+
*/
|
|
25
|
+
bufferViews?: BufferView[];
|
|
26
|
+
/**
|
|
27
|
+
* An array of cameras.
|
|
28
|
+
*/
|
|
29
|
+
cameras?: Camera[];
|
|
30
|
+
extensions?: {
|
|
31
|
+
[key: string]: {
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Names of glTF extensions required to properly load this asset.
|
|
37
|
+
*/
|
|
38
|
+
extensionsRequired?: string[];
|
|
39
|
+
/**
|
|
40
|
+
* Names of glTF extensions used somewhere in this asset.
|
|
41
|
+
*/
|
|
42
|
+
extensionsUsed?: string[];
|
|
43
|
+
extras?: any;
|
|
44
|
+
/**
|
|
45
|
+
* An array of images.
|
|
46
|
+
*/
|
|
47
|
+
images?: Image[];
|
|
48
|
+
/**
|
|
49
|
+
* An array of materials.
|
|
50
|
+
*/
|
|
51
|
+
materials?: Material[];
|
|
52
|
+
/**
|
|
53
|
+
* An array of meshes.
|
|
54
|
+
*/
|
|
55
|
+
meshes?: Mesh[];
|
|
56
|
+
/**
|
|
57
|
+
* An array of nodes.
|
|
58
|
+
*/
|
|
59
|
+
nodes?: Node[];
|
|
60
|
+
/**
|
|
61
|
+
* An array of samplers.
|
|
62
|
+
*/
|
|
63
|
+
samplers?: Sampler[];
|
|
64
|
+
/**
|
|
65
|
+
* The index of the default scene.
|
|
66
|
+
*/
|
|
67
|
+
scene?: number;
|
|
68
|
+
/**
|
|
69
|
+
* An array of scenes.
|
|
70
|
+
*/
|
|
71
|
+
scenes?: Scene[];
|
|
72
|
+
/**
|
|
73
|
+
* An array of skins.
|
|
74
|
+
*/
|
|
75
|
+
skins?: Skin[];
|
|
76
|
+
/**
|
|
77
|
+
* An array of textures.
|
|
78
|
+
*/
|
|
79
|
+
textures?: Texture[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* A typed view into a bufferView. A bufferView contains raw binary data. An accessor
|
|
83
|
+
* provides a typed view into a bufferView or a subset of a bufferView similar to how
|
|
84
|
+
* WebGL's `vertexAttribPointer()` defines an attribute in a buffer.
|
|
85
|
+
*/
|
|
86
|
+
interface Accessor {
|
|
87
|
+
/**
|
|
88
|
+
* The index of the bufferView.
|
|
89
|
+
*/
|
|
90
|
+
bufferView?: number;
|
|
91
|
+
/**
|
|
92
|
+
* The offset relative to the start of the bufferView in bytes.
|
|
93
|
+
*/
|
|
94
|
+
byteOffset?: number;
|
|
95
|
+
/**
|
|
96
|
+
* The datatype of components in the attribute.
|
|
97
|
+
*/
|
|
98
|
+
componentType: number;
|
|
99
|
+
/**
|
|
100
|
+
* The number of attributes referenced by this accessor.
|
|
101
|
+
*/
|
|
102
|
+
count: number;
|
|
103
|
+
extensions?: {
|
|
104
|
+
[key: string]: {
|
|
105
|
+
[key: string]: any;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
extras?: any;
|
|
109
|
+
/**
|
|
110
|
+
* Maximum value of each component in this attribute.
|
|
111
|
+
*/
|
|
112
|
+
max?: number[];
|
|
113
|
+
/**
|
|
114
|
+
* Minimum value of each component in this attribute.
|
|
115
|
+
*/
|
|
116
|
+
min?: number[];
|
|
117
|
+
/**
|
|
118
|
+
* The user-defined name of this object.
|
|
119
|
+
*/
|
|
120
|
+
name?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Specifies whether integer data values should be normalized.
|
|
123
|
+
*/
|
|
124
|
+
normalized?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Sparse storage of attributes that deviate from their initialization value.
|
|
127
|
+
*/
|
|
128
|
+
sparse?: AccessorSparse;
|
|
129
|
+
/**
|
|
130
|
+
* Specifies if the attribute is a scalar, vector, or matrix.
|
|
131
|
+
*/
|
|
132
|
+
type: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Sparse storage of attributes that deviate from their initialization value.
|
|
136
|
+
*/
|
|
137
|
+
interface AccessorSparse {
|
|
138
|
+
/**
|
|
139
|
+
* Number of entries stored in the sparse array.
|
|
140
|
+
*/
|
|
141
|
+
count: number;
|
|
142
|
+
extensions?: {
|
|
143
|
+
[key: string]: {
|
|
144
|
+
[key: string]: any;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
extras?: any;
|
|
148
|
+
/**
|
|
149
|
+
* Index array of size `count` that points to those accessor attributes that deviate from
|
|
150
|
+
* their initialization value. Indices must strictly increase.
|
|
151
|
+
*/
|
|
152
|
+
indices: AccessorSparseIndices;
|
|
153
|
+
/**
|
|
154
|
+
* Array of size `count` times number of components, storing the displaced accessor
|
|
155
|
+
* attributes pointed by `indices`. Substituted values must have the same `componentType`
|
|
156
|
+
* and number of components as the base accessor.
|
|
157
|
+
*/
|
|
158
|
+
values: AccessorSparseValues;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Index array of size `count` that points to those accessor attributes that deviate from
|
|
162
|
+
* their initialization value. Indices must strictly increase.
|
|
163
|
+
*
|
|
164
|
+
* Indices of those attributes that deviate from their initialization value.
|
|
165
|
+
*/
|
|
166
|
+
interface AccessorSparseIndices {
|
|
167
|
+
/**
|
|
168
|
+
* The index of the bufferView with sparse indices. Referenced bufferView can't have
|
|
169
|
+
* ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
|
|
170
|
+
*/
|
|
171
|
+
bufferView: number;
|
|
172
|
+
/**
|
|
173
|
+
* The offset relative to the start of the bufferView in bytes. Must be aligned.
|
|
174
|
+
*/
|
|
175
|
+
byteOffset?: number;
|
|
176
|
+
/**
|
|
177
|
+
* The indices data type.
|
|
178
|
+
*/
|
|
179
|
+
componentType: number;
|
|
180
|
+
extensions?: {
|
|
181
|
+
[key: string]: {
|
|
182
|
+
[key: string]: any;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
extras?: any;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Array of size `count` times number of components, storing the displaced accessor
|
|
189
|
+
* attributes pointed by `indices`. Substituted values must have the same `componentType`
|
|
190
|
+
* and number of components as the base accessor.
|
|
191
|
+
*
|
|
192
|
+
* Array of size `accessor.sparse.count` times number of components storing the displaced
|
|
193
|
+
* accessor attributes pointed by `accessor.sparse.indices`.
|
|
194
|
+
*/
|
|
195
|
+
interface AccessorSparseValues {
|
|
196
|
+
/**
|
|
197
|
+
* The index of the bufferView with sparse values. Referenced bufferView can't have
|
|
198
|
+
* ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
|
|
199
|
+
*/
|
|
200
|
+
bufferView: number;
|
|
201
|
+
/**
|
|
202
|
+
* The offset relative to the start of the bufferView in bytes. Must be aligned.
|
|
203
|
+
*/
|
|
204
|
+
byteOffset?: number;
|
|
205
|
+
extensions?: {
|
|
206
|
+
[key: string]: {
|
|
207
|
+
[key: string]: any;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
extras?: any;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* A keyframe animation.
|
|
214
|
+
*/
|
|
215
|
+
interface Animation {
|
|
216
|
+
/**
|
|
217
|
+
* An array of channels, each of which targets an animation's sampler at a node's property.
|
|
218
|
+
* Different channels of the same animation can't have equal targets.
|
|
219
|
+
*/
|
|
220
|
+
channels: AnimationChannel[];
|
|
221
|
+
extensions?: {
|
|
222
|
+
[key: string]: {
|
|
223
|
+
[key: string]: any;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
extras?: any;
|
|
227
|
+
/**
|
|
228
|
+
* The user-defined name of this object.
|
|
229
|
+
*/
|
|
230
|
+
name?: string;
|
|
231
|
+
/**
|
|
232
|
+
* An array of samplers that combines input and output accessors with an interpolation
|
|
233
|
+
* algorithm to define a keyframe graph (but not its target).
|
|
234
|
+
*/
|
|
235
|
+
samplers: AnimationSampler[];
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Targets an animation's sampler at a node's property.
|
|
239
|
+
*/
|
|
240
|
+
interface AnimationChannel {
|
|
241
|
+
extensions?: {
|
|
242
|
+
[key: string]: {
|
|
243
|
+
[key: string]: any;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
extras?: any;
|
|
247
|
+
/**
|
|
248
|
+
* The index of a sampler in this animation used to compute the value for the target.
|
|
249
|
+
*/
|
|
250
|
+
sampler: number;
|
|
251
|
+
/**
|
|
252
|
+
* The index of the node and TRS property to target.
|
|
253
|
+
*/
|
|
254
|
+
target: AnimationChannelTarget;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* The index of the node and TRS property to target.
|
|
258
|
+
*
|
|
259
|
+
* The index of the node and TRS property that an animation channel targets.
|
|
260
|
+
*/
|
|
261
|
+
interface AnimationChannelTarget {
|
|
262
|
+
extensions?: {
|
|
263
|
+
[key: string]: {
|
|
264
|
+
[key: string]: any;
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
extras?: any;
|
|
268
|
+
/**
|
|
269
|
+
* The index of the node to target.
|
|
270
|
+
*/
|
|
271
|
+
node?: number;
|
|
272
|
+
/**
|
|
273
|
+
* The name of the node's TRS property to modify, or the "weights" of the Morph Targets it
|
|
274
|
+
* instantiates. For the "translation" property, the values that are provided by the sampler
|
|
275
|
+
* are the translation along the x, y, and z axes. For the "rotation" property, the values
|
|
276
|
+
* are a quaternion in the order (x, y, z, w), where w is the scalar. For the "scale"
|
|
277
|
+
* property, the values are the scaling factors along the x, y, and z axes.
|
|
278
|
+
*/
|
|
279
|
+
path: string;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Combines input and output accessors with an interpolation algorithm to define a keyframe
|
|
283
|
+
* graph (but not its target).
|
|
284
|
+
*/
|
|
285
|
+
interface AnimationSampler {
|
|
286
|
+
extensions?: {
|
|
287
|
+
[key: string]: {
|
|
288
|
+
[key: string]: any;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
extras?: any;
|
|
292
|
+
/**
|
|
293
|
+
* The index of an accessor containing keyframe input values, e.g., time.
|
|
294
|
+
*/
|
|
295
|
+
input: number;
|
|
296
|
+
/**
|
|
297
|
+
* Interpolation algorithm.
|
|
298
|
+
*/
|
|
299
|
+
interpolation?: string;
|
|
300
|
+
/**
|
|
301
|
+
* The index of an accessor, containing keyframe output values.
|
|
302
|
+
*/
|
|
303
|
+
output: number;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Metadata about the glTF asset.
|
|
307
|
+
*/
|
|
308
|
+
interface Asset {
|
|
309
|
+
/**
|
|
310
|
+
* A copyright message suitable for display to credit the content creator.
|
|
311
|
+
*/
|
|
312
|
+
copyright?: string;
|
|
313
|
+
extensions?: {
|
|
314
|
+
[key: string]: {
|
|
315
|
+
[key: string]: any;
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
extras?: any;
|
|
319
|
+
/**
|
|
320
|
+
* Tool that generated this glTF model. Useful for debugging.
|
|
321
|
+
*/
|
|
322
|
+
generator?: string;
|
|
323
|
+
/**
|
|
324
|
+
* The minimum glTF version that this asset targets.
|
|
325
|
+
*/
|
|
326
|
+
minVersion?: string;
|
|
327
|
+
/**
|
|
328
|
+
* The glTF version that this asset targets.
|
|
329
|
+
*/
|
|
330
|
+
version: string;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* A view into a buffer generally representing a subset of the buffer.
|
|
334
|
+
*/
|
|
335
|
+
interface BufferView {
|
|
336
|
+
/**
|
|
337
|
+
* The index of the buffer.
|
|
338
|
+
*/
|
|
339
|
+
buffer: number;
|
|
340
|
+
/**
|
|
341
|
+
* The total byte length of the buffer view.
|
|
342
|
+
*/
|
|
343
|
+
byteLength: number;
|
|
344
|
+
/**
|
|
345
|
+
* The offset into the buffer in bytes.
|
|
346
|
+
*/
|
|
347
|
+
byteOffset?: number;
|
|
348
|
+
/**
|
|
349
|
+
* The stride, in bytes.
|
|
350
|
+
*/
|
|
351
|
+
byteStride?: number;
|
|
352
|
+
extensions?: {
|
|
353
|
+
[key: string]: {
|
|
354
|
+
[key: string]: any;
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
extras?: any;
|
|
358
|
+
/**
|
|
359
|
+
* The user-defined name of this object.
|
|
360
|
+
*/
|
|
361
|
+
name?: string;
|
|
362
|
+
/**
|
|
363
|
+
* The target that the GPU buffer should be bound to.
|
|
364
|
+
*/
|
|
365
|
+
target?: number;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* A buffer points to binary geometry, animation, or skins.
|
|
369
|
+
*/
|
|
370
|
+
interface Buffer {
|
|
371
|
+
/**
|
|
372
|
+
* The length of the buffer in bytes.
|
|
373
|
+
*/
|
|
374
|
+
byteLength: number;
|
|
375
|
+
extensions?: {
|
|
376
|
+
[key: string]: {
|
|
377
|
+
[key: string]: any;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
extras?: any;
|
|
381
|
+
/**
|
|
382
|
+
* The user-defined name of this object.
|
|
383
|
+
*/
|
|
384
|
+
name?: string;
|
|
385
|
+
/**
|
|
386
|
+
* The uri of the buffer.
|
|
387
|
+
*/
|
|
388
|
+
uri?: string;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* A camera's projection. A node can reference a camera to apply a transform to place the
|
|
392
|
+
* camera in the scene.
|
|
393
|
+
*/
|
|
394
|
+
interface Camera {
|
|
395
|
+
extensions?: {
|
|
396
|
+
[key: string]: {
|
|
397
|
+
[key: string]: any;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
extras?: any;
|
|
401
|
+
/**
|
|
402
|
+
* The user-defined name of this object.
|
|
403
|
+
*/
|
|
404
|
+
name?: string;
|
|
405
|
+
/**
|
|
406
|
+
* An orthographic camera containing properties to create an orthographic projection matrix.
|
|
407
|
+
*/
|
|
408
|
+
orthographic?: CameraOrthographic;
|
|
409
|
+
/**
|
|
410
|
+
* A perspective camera containing properties to create a perspective projection matrix.
|
|
411
|
+
*/
|
|
412
|
+
perspective?: CameraPerspective;
|
|
413
|
+
/**
|
|
414
|
+
* Specifies if the camera uses a perspective or orthographic projection.
|
|
415
|
+
*/
|
|
416
|
+
type: string;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* An orthographic camera containing properties to create an orthographic projection matrix.
|
|
420
|
+
*/
|
|
421
|
+
interface CameraOrthographic {
|
|
422
|
+
extensions?: {
|
|
423
|
+
[key: string]: {
|
|
424
|
+
[key: string]: any;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
extras?: any;
|
|
428
|
+
/**
|
|
429
|
+
* The floating-point horizontal magnification of the view. Must not be zero.
|
|
430
|
+
*/
|
|
431
|
+
xmag: number;
|
|
432
|
+
/**
|
|
433
|
+
* The floating-point vertical magnification of the view. Must not be zero.
|
|
434
|
+
*/
|
|
435
|
+
ymag: number;
|
|
436
|
+
/**
|
|
437
|
+
* The floating-point distance to the far clipping plane. `zfar` must be greater than
|
|
438
|
+
* `znear`.
|
|
439
|
+
*/
|
|
440
|
+
zfar: number;
|
|
441
|
+
/**
|
|
442
|
+
* The floating-point distance to the near clipping plane.
|
|
443
|
+
*/
|
|
444
|
+
znear: number;
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* A perspective camera containing properties to create a perspective projection matrix.
|
|
448
|
+
*/
|
|
449
|
+
interface CameraPerspective {
|
|
450
|
+
/**
|
|
451
|
+
* The floating-point aspect ratio of the field of view.
|
|
452
|
+
*/
|
|
453
|
+
aspectRatio?: number;
|
|
454
|
+
extensions?: {
|
|
455
|
+
[key: string]: {
|
|
456
|
+
[key: string]: any;
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
extras?: any;
|
|
460
|
+
/**
|
|
461
|
+
* The floating-point vertical field of view in radians.
|
|
462
|
+
*/
|
|
463
|
+
yfov: number;
|
|
464
|
+
/**
|
|
465
|
+
* The floating-point distance to the far clipping plane.
|
|
466
|
+
*/
|
|
467
|
+
zfar?: number;
|
|
468
|
+
/**
|
|
469
|
+
* The floating-point distance to the near clipping plane.
|
|
470
|
+
*/
|
|
471
|
+
znear: number;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Image data used to create a texture. Image can be referenced by URI or `bufferView`
|
|
475
|
+
* index. `mimeType` is required in the latter case.
|
|
476
|
+
*/
|
|
477
|
+
interface Image {
|
|
478
|
+
/**
|
|
479
|
+
* The index of the bufferView that contains the image. Use this instead of the image's uri
|
|
480
|
+
* property.
|
|
481
|
+
*/
|
|
482
|
+
bufferView?: number;
|
|
483
|
+
extensions?: {
|
|
484
|
+
[key: string]: {
|
|
485
|
+
[key: string]: any;
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
extras?: any;
|
|
489
|
+
/**
|
|
490
|
+
* The image's MIME type. Required if `bufferView` is defined.
|
|
491
|
+
*/
|
|
492
|
+
mimeType?: string;
|
|
493
|
+
/**
|
|
494
|
+
* The user-defined name of this object.
|
|
495
|
+
*/
|
|
496
|
+
name?: string;
|
|
497
|
+
/**
|
|
498
|
+
* The uri of the image.
|
|
499
|
+
*/
|
|
500
|
+
uri?: string;
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* The material appearance of a primitive.
|
|
504
|
+
*/
|
|
505
|
+
interface Material {
|
|
506
|
+
/**
|
|
507
|
+
* The alpha cutoff value of the material.
|
|
508
|
+
*/
|
|
509
|
+
alphaCutoff?: number;
|
|
510
|
+
/**
|
|
511
|
+
* The alpha rendering mode of the material.
|
|
512
|
+
*/
|
|
513
|
+
alphaMode?: string;
|
|
514
|
+
/**
|
|
515
|
+
* Specifies whether the material is double sided.
|
|
516
|
+
*/
|
|
517
|
+
doubleSided?: boolean;
|
|
518
|
+
/**
|
|
519
|
+
* The emissive color of the material.
|
|
520
|
+
*/
|
|
521
|
+
emissiveFactor?: number[];
|
|
522
|
+
/**
|
|
523
|
+
* The emissive map texture.
|
|
524
|
+
*/
|
|
525
|
+
emissiveTexture?: TextureInfo;
|
|
526
|
+
extensions?: {
|
|
527
|
+
[key: string]: {
|
|
528
|
+
[key: string]: any;
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
extras?: any;
|
|
532
|
+
/**
|
|
533
|
+
* The user-defined name of this object.
|
|
534
|
+
*/
|
|
535
|
+
name?: string;
|
|
536
|
+
/**
|
|
537
|
+
* The normal map texture.
|
|
538
|
+
*/
|
|
539
|
+
normalTexture?: MaterialNormalTextureInfoObject;
|
|
540
|
+
/**
|
|
541
|
+
* The occlusion map texture.
|
|
542
|
+
*/
|
|
543
|
+
occlusionTexture?: MaterialOcclusionTextureInfoObject;
|
|
544
|
+
/**
|
|
545
|
+
* A set of parameter values that are used to define the metallic-roughness material model
|
|
546
|
+
* from Physically-Based Rendering (PBR) methodology. When not specified, all the default
|
|
547
|
+
* values of `pbrMetallicRoughness` apply.
|
|
548
|
+
*/
|
|
549
|
+
pbrMetallicRoughness?: MaterialPBRMetallicRoughness;
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* The emissive map texture.
|
|
553
|
+
*
|
|
554
|
+
* The base color texture.
|
|
555
|
+
*
|
|
556
|
+
* The metallic-roughness texture.
|
|
557
|
+
*
|
|
558
|
+
* Reference to a texture.
|
|
559
|
+
*/
|
|
560
|
+
interface TextureInfo {
|
|
561
|
+
extensions?: {
|
|
562
|
+
[key: string]: {
|
|
563
|
+
[key: string]: any;
|
|
564
|
+
};
|
|
565
|
+
};
|
|
566
|
+
extras?: any;
|
|
567
|
+
/**
|
|
568
|
+
* The index of the texture.
|
|
569
|
+
*/
|
|
570
|
+
index: number;
|
|
571
|
+
/**
|
|
572
|
+
* The set index of texture's TEXCOORD attribute used for texture coordinate mapping.
|
|
573
|
+
*/
|
|
574
|
+
texCoord?: number;
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* The normal map texture.
|
|
578
|
+
*
|
|
579
|
+
* Reference to a texture.
|
|
580
|
+
*/
|
|
581
|
+
interface MaterialNormalTextureInfoObject {
|
|
582
|
+
extensions?: {
|
|
583
|
+
[key: string]: {
|
|
584
|
+
[key: string]: any;
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
extras?: any;
|
|
588
|
+
/**
|
|
589
|
+
* The index of the texture.
|
|
590
|
+
*/
|
|
591
|
+
index: number;
|
|
592
|
+
/**
|
|
593
|
+
* The scalar multiplier applied to each normal vector of the normal texture.
|
|
594
|
+
*/
|
|
595
|
+
scale?: number;
|
|
596
|
+
/**
|
|
597
|
+
* The set index of texture's TEXCOORD attribute used for texture coordinate mapping.
|
|
598
|
+
*/
|
|
599
|
+
texCoord?: number;
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* The occlusion map texture.
|
|
603
|
+
*
|
|
604
|
+
* Reference to a texture.
|
|
605
|
+
*/
|
|
606
|
+
interface MaterialOcclusionTextureInfoObject {
|
|
607
|
+
extensions?: {
|
|
608
|
+
[key: string]: {
|
|
609
|
+
[key: string]: any;
|
|
610
|
+
};
|
|
611
|
+
};
|
|
612
|
+
extras?: any;
|
|
613
|
+
/**
|
|
614
|
+
* The index of the texture.
|
|
615
|
+
*/
|
|
616
|
+
index: number;
|
|
617
|
+
/**
|
|
618
|
+
* A scalar multiplier controlling the amount of occlusion applied.
|
|
619
|
+
*/
|
|
620
|
+
strength?: number;
|
|
621
|
+
/**
|
|
622
|
+
* The set index of texture's TEXCOORD attribute used for texture coordinate mapping.
|
|
623
|
+
*/
|
|
624
|
+
texCoord?: number;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* A set of parameter values that are used to define the metallic-roughness material model
|
|
628
|
+
* from Physically-Based Rendering (PBR) methodology. When not specified, all the default
|
|
629
|
+
* values of `pbrMetallicRoughness` apply.
|
|
630
|
+
*
|
|
631
|
+
* A set of parameter values that are used to define the metallic-roughness material model
|
|
632
|
+
* from Physically-Based Rendering (PBR) methodology.
|
|
633
|
+
*/
|
|
634
|
+
interface MaterialPBRMetallicRoughness {
|
|
635
|
+
/**
|
|
636
|
+
* The material's base color factor.
|
|
637
|
+
*/
|
|
638
|
+
baseColorFactor?: number[];
|
|
639
|
+
/**
|
|
640
|
+
* The base color texture.
|
|
641
|
+
*/
|
|
642
|
+
baseColorTexture?: TextureInfo;
|
|
643
|
+
extensions?: {
|
|
644
|
+
[key: string]: {
|
|
645
|
+
[key: string]: any;
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
extras?: any;
|
|
649
|
+
/**
|
|
650
|
+
* The metalness of the material.
|
|
651
|
+
*/
|
|
652
|
+
metallicFactor?: number;
|
|
653
|
+
/**
|
|
654
|
+
* The metallic-roughness texture.
|
|
655
|
+
*/
|
|
656
|
+
metallicRoughnessTexture?: TextureInfo;
|
|
657
|
+
/**
|
|
658
|
+
* The roughness of the material.
|
|
659
|
+
*/
|
|
660
|
+
roughnessFactor?: number;
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* A set of primitives to be rendered. A node can contain one mesh. A node's transform
|
|
664
|
+
* places the mesh in the scene.
|
|
665
|
+
*/
|
|
666
|
+
interface Mesh {
|
|
667
|
+
extensions?: {
|
|
668
|
+
[key: string]: {
|
|
669
|
+
[key: string]: any;
|
|
670
|
+
};
|
|
671
|
+
};
|
|
672
|
+
extras?: any;
|
|
673
|
+
/**
|
|
674
|
+
* The user-defined name of this object.
|
|
675
|
+
*/
|
|
676
|
+
name?: string;
|
|
677
|
+
/**
|
|
678
|
+
* An array of primitives, each defining geometry to be rendered with a material.
|
|
679
|
+
*/
|
|
680
|
+
primitives: MeshPrimitive[];
|
|
681
|
+
/**
|
|
682
|
+
* Array of weights to be applied to the Morph Targets.
|
|
683
|
+
*/
|
|
684
|
+
weights?: number[];
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Geometry to be rendered with the given material.
|
|
688
|
+
*/
|
|
689
|
+
interface MeshPrimitive {
|
|
690
|
+
/**
|
|
691
|
+
* A dictionary object, where each key corresponds to mesh attribute semantic and each value
|
|
692
|
+
* is the index of the accessor containing attribute's data.
|
|
693
|
+
*/
|
|
694
|
+
attributes: {
|
|
695
|
+
[key: string]: number;
|
|
696
|
+
};
|
|
697
|
+
extensions?: {
|
|
698
|
+
[key: string]: {
|
|
699
|
+
[key: string]: any;
|
|
700
|
+
};
|
|
701
|
+
};
|
|
702
|
+
extras?: any;
|
|
703
|
+
/**
|
|
704
|
+
* The index of the accessor that contains the indices.
|
|
705
|
+
*/
|
|
706
|
+
indices?: number;
|
|
707
|
+
/**
|
|
708
|
+
* The index of the material to apply to this primitive when rendering.
|
|
709
|
+
*/
|
|
710
|
+
material?: number;
|
|
711
|
+
/**
|
|
712
|
+
* The type of primitives to render.
|
|
713
|
+
*/
|
|
714
|
+
mode?: number;
|
|
715
|
+
/**
|
|
716
|
+
* An array of Morph Targets, each Morph Target is a dictionary mapping attributes (only
|
|
717
|
+
* `POSITION`, `NORMAL`, and `TANGENT` supported) to their deviations in the Morph Target.
|
|
718
|
+
*/
|
|
719
|
+
targets?: {
|
|
720
|
+
[key: string]: number;
|
|
721
|
+
}[];
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* A node in the node hierarchy. When the node contains `skin`, all `mesh.primitives` must
|
|
725
|
+
* contain `JOINTS_0` and `WEIGHTS_0` attributes. A node can have either a `matrix` or any
|
|
726
|
+
* combination of `translation`/`rotation`/`scale` (TRS) properties. TRS properties are
|
|
727
|
+
* converted to matrices and postmultiplied in the `T * R * S` order to compose the
|
|
728
|
+
* transformation matrix; first the scale is applied to the vertices, then the rotation, and
|
|
729
|
+
* then the translation. If none are provided, the transform is the identity. When a node is
|
|
730
|
+
* targeted for animation (referenced by an animation.channel.target), only TRS properties
|
|
731
|
+
* may be present; `matrix` will not be present.
|
|
732
|
+
*/
|
|
733
|
+
interface Node {
|
|
734
|
+
/**
|
|
735
|
+
* The index of the camera referenced by this node.
|
|
736
|
+
*/
|
|
737
|
+
camera?: number;
|
|
738
|
+
/**
|
|
739
|
+
* The indices of this node's children.
|
|
740
|
+
*/
|
|
741
|
+
children?: number[];
|
|
742
|
+
extensions?: {
|
|
743
|
+
[key: string]: {
|
|
744
|
+
[key: string]: any;
|
|
745
|
+
};
|
|
746
|
+
};
|
|
747
|
+
extras?: any;
|
|
748
|
+
/**
|
|
749
|
+
* A floating-point 4x4 transformation matrix stored in column-major order.
|
|
750
|
+
*/
|
|
751
|
+
matrix?: number[];
|
|
752
|
+
/**
|
|
753
|
+
* The index of the mesh in this node.
|
|
754
|
+
*/
|
|
755
|
+
mesh?: number;
|
|
756
|
+
/**
|
|
757
|
+
* The user-defined name of this object.
|
|
758
|
+
*/
|
|
759
|
+
name?: string;
|
|
760
|
+
/**
|
|
761
|
+
* The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.
|
|
762
|
+
*/
|
|
763
|
+
rotation?: number[];
|
|
764
|
+
/**
|
|
765
|
+
* The node's non-uniform scale, given as the scaling factors along the x, y, and z axes.
|
|
766
|
+
*/
|
|
767
|
+
scale?: number[];
|
|
768
|
+
/**
|
|
769
|
+
* The index of the skin referenced by this node.
|
|
770
|
+
*/
|
|
771
|
+
skin?: number;
|
|
772
|
+
/**
|
|
773
|
+
* The node's translation along the x, y, and z axes.
|
|
774
|
+
*/
|
|
775
|
+
translation?: number[];
|
|
776
|
+
/**
|
|
777
|
+
* The weights of the instantiated Morph Target. Number of elements must match number of
|
|
778
|
+
* Morph Targets of used mesh.
|
|
779
|
+
*/
|
|
780
|
+
weights?: number[];
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Texture sampler properties for filtering and wrapping modes.
|
|
784
|
+
*/
|
|
785
|
+
interface Sampler {
|
|
786
|
+
extensions?: {
|
|
787
|
+
[key: string]: {
|
|
788
|
+
[key: string]: any;
|
|
789
|
+
};
|
|
790
|
+
};
|
|
791
|
+
extras?: any;
|
|
792
|
+
/**
|
|
793
|
+
* Magnification filter.
|
|
794
|
+
*/
|
|
795
|
+
magFilter?: number;
|
|
796
|
+
/**
|
|
797
|
+
* Minification filter.
|
|
798
|
+
*/
|
|
799
|
+
minFilter?: number;
|
|
800
|
+
/**
|
|
801
|
+
* The user-defined name of this object.
|
|
802
|
+
*/
|
|
803
|
+
name?: string;
|
|
804
|
+
/**
|
|
805
|
+
* s wrapping mode.
|
|
806
|
+
*/
|
|
807
|
+
wrapS?: number;
|
|
808
|
+
/**
|
|
809
|
+
* t wrapping mode.
|
|
810
|
+
*/
|
|
811
|
+
wrapT?: number;
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* The root nodes of a scene.
|
|
815
|
+
*/
|
|
816
|
+
interface Scene {
|
|
817
|
+
extensions?: {
|
|
818
|
+
[key: string]: {
|
|
819
|
+
[key: string]: any;
|
|
820
|
+
};
|
|
821
|
+
};
|
|
822
|
+
extras?: any;
|
|
823
|
+
/**
|
|
824
|
+
* The user-defined name of this object.
|
|
825
|
+
*/
|
|
826
|
+
name?: string;
|
|
827
|
+
/**
|
|
828
|
+
* The indices of each root node.
|
|
829
|
+
*/
|
|
830
|
+
nodes?: number[];
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Joints and matrices defining a skin.
|
|
834
|
+
*/
|
|
835
|
+
interface Skin {
|
|
836
|
+
extensions?: {
|
|
837
|
+
[key: string]: {
|
|
838
|
+
[key: string]: any;
|
|
839
|
+
};
|
|
840
|
+
};
|
|
841
|
+
extras?: any;
|
|
842
|
+
/**
|
|
843
|
+
* The index of the accessor containing the floating-point 4x4 inverse-bind matrices. The
|
|
844
|
+
* default is that each matrix is a 4x4 identity matrix, which implies that inverse-bind
|
|
845
|
+
* matrices were pre-applied.
|
|
846
|
+
*/
|
|
847
|
+
inverseBindMatrices?: number;
|
|
848
|
+
/**
|
|
849
|
+
* Indices of skeleton nodes, used as joints in this skin.
|
|
850
|
+
*/
|
|
851
|
+
joints: number[];
|
|
852
|
+
/**
|
|
853
|
+
* The user-defined name of this object.
|
|
854
|
+
*/
|
|
855
|
+
name?: string;
|
|
856
|
+
/**
|
|
857
|
+
* The index of the node used as a skeleton root.
|
|
858
|
+
*/
|
|
859
|
+
skeleton?: number;
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* A texture and its sampler.
|
|
863
|
+
*/
|
|
864
|
+
interface Texture {
|
|
865
|
+
extensions?: {
|
|
866
|
+
[key: string]: {
|
|
867
|
+
[key: string]: any;
|
|
868
|
+
};
|
|
869
|
+
};
|
|
870
|
+
extras?: any;
|
|
871
|
+
/**
|
|
872
|
+
* The user-defined name of this object.
|
|
873
|
+
*/
|
|
874
|
+
name?: string;
|
|
875
|
+
/**
|
|
876
|
+
* The index of the sampler used by this texture. When undefined, a sampler with repeat
|
|
877
|
+
* wrapping and auto filtering should be used.
|
|
878
|
+
*/
|
|
879
|
+
sampler?: number;
|
|
880
|
+
/**
|
|
881
|
+
* The index of the image used by this texture. When undefined, it is expected that an
|
|
882
|
+
* extension or other mechanism will supply an alternate texture source, otherwise behavior
|
|
883
|
+
* is undefined.
|
|
884
|
+
*/
|
|
885
|
+
source?: number;
|
|
886
|
+
}
|
|
887
|
+
}
|