@galacean/engine-loader 1.6.7 → 1.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.
Files changed (107) hide show
  1. package/package.json +4 -4
  2. package/dist/main.js +0 -7355
  3. package/dist/main.js.map +0 -1
  4. package/dist/module.js +0 -7325
  5. package/dist/module.js.map +0 -1
  6. package/types/AnimationClipLoader.d.ts +0 -1
  7. package/types/AnimatorControllerLoader.d.ts +0 -1
  8. package/types/AudioLoader.d.ts +0 -1
  9. package/types/BufferLoader.d.ts +0 -1
  10. package/types/EnvLoader.d.ts +0 -1
  11. package/types/FontLoader.d.ts +0 -1
  12. package/types/GLTFContentRestorer.d.ts +0 -92
  13. package/types/GLTFLoader.d.ts +0 -22
  14. package/types/HDRLoader.d.ts +0 -1
  15. package/types/JSONLoader.d.ts +0 -1
  16. package/types/KTXCubeLoader.d.ts +0 -1
  17. package/types/KTXLoader.d.ts +0 -4
  18. package/types/MaterialLoader.d.ts +0 -1
  19. package/types/MeshLoader.d.ts +0 -1
  20. package/types/PhysicsMaterialLoader.d.ts +0 -1
  21. package/types/PrefabLoader.d.ts +0 -5
  22. package/types/PrimitiveMeshLoader.d.ts +0 -1
  23. package/types/ProjectLoader.d.ts +0 -1
  24. package/types/SceneLoader.d.ts +0 -1
  25. package/types/ShaderChunkLoader.d.ts +0 -9
  26. package/types/ShaderLoader.d.ts +0 -1
  27. package/types/SourceFontLoader.d.ts +0 -1
  28. package/types/SpriteAtlasLoader.d.ts +0 -1
  29. package/types/SpriteLoader.d.ts +0 -1
  30. package/types/TextLoader.d.ts +0 -1
  31. package/types/Texture2DContentRestorer.d.ts +0 -10
  32. package/types/Texture2DLoader.d.ts +0 -20
  33. package/types/TextureCubeContentRestorer.d.ts +0 -10
  34. package/types/TextureCubeLoader.d.ts +0 -1
  35. package/types/compressed-texture/KhronosTextureContainer.d.ts +0 -20
  36. package/types/compressed-texture/index.d.ts +0 -3
  37. package/types/compressed-texture/type.d.ts +0 -87
  38. package/types/gltf/GLTFResource.d.ts +0 -67
  39. package/types/gltf/GLTFSchema.d.ts +0 -822
  40. package/types/gltf/GLTFUtils.d.ts +0 -45
  41. package/types/gltf/extensions/EXT_meshopt_compression.d.ts +0 -26
  42. package/types/gltf/extensions/EXT_texture_webp.d.ts +0 -1
  43. package/types/gltf/extensions/GALACEAN_animation_event.d.ts +0 -1
  44. package/types/gltf/extensions/GALACEAN_materials_remap.d.ts +0 -1
  45. package/types/gltf/extensions/GLTFExtensionParser.d.ts +0 -46
  46. package/types/gltf/extensions/GLTFExtensionSchema.d.ts +0 -168
  47. package/types/gltf/extensions/KHR_lights_punctual.d.ts +0 -1
  48. package/types/gltf/extensions/KHR_materials_anisotropy.d.ts +0 -1
  49. package/types/gltf/extensions/KHR_materials_clearcoat.d.ts +0 -1
  50. package/types/gltf/extensions/KHR_materials_ior.d.ts +0 -1
  51. package/types/gltf/extensions/KHR_materials_iridescence.d.ts +0 -1
  52. package/types/gltf/extensions/KHR_materials_sheen.d.ts +0 -1
  53. package/types/gltf/extensions/KHR_materials_specular.d.ts +0 -1
  54. package/types/gltf/extensions/KHR_materials_transmission.d.ts +0 -1
  55. package/types/gltf/extensions/KHR_materials_unlit.d.ts +0 -1
  56. package/types/gltf/extensions/KHR_materials_variants.d.ts +0 -6
  57. package/types/gltf/extensions/KHR_materials_volume.d.ts +0 -1
  58. package/types/gltf/extensions/KHR_mesh_quantization.d.ts +0 -1
  59. package/types/gltf/extensions/KHR_texture_basisu.d.ts +0 -1
  60. package/types/gltf/extensions/KHR_texture_transform.d.ts +0 -1
  61. package/types/gltf/extensions/MeshoptDecoder.d.ts +0 -12
  62. package/types/gltf/extensions/index.d.ts +0 -21
  63. package/types/gltf/index.d.ts +0 -6
  64. package/types/gltf/parser/GLTFAnimationParser.d.ts +0 -12
  65. package/types/gltf/parser/GLTFAnimatorControllerParser.d.ts +0 -7
  66. package/types/gltf/parser/GLTFBufferParser.d.ts +0 -7
  67. package/types/gltf/parser/GLTFBufferViewParser.d.ts +0 -6
  68. package/types/gltf/parser/GLTFEntityParser.d.ts +0 -6
  69. package/types/gltf/parser/GLTFMaterialParser.d.ts +0 -15
  70. package/types/gltf/parser/GLTFMeshParser.d.ts +0 -20
  71. package/types/gltf/parser/GLTFParser.d.ts +0 -57
  72. package/types/gltf/parser/GLTFParserContext.d.ts +0 -74
  73. package/types/gltf/parser/GLTFSceneParser.d.ts +0 -11
  74. package/types/gltf/parser/GLTFSchemaParser.d.ts +0 -6
  75. package/types/gltf/parser/GLTFSkinParser.d.ts +0 -7
  76. package/types/gltf/parser/GLTFTextureParser.d.ts +0 -15
  77. package/types/gltf/parser/GLTFValidator.d.ts +0 -6
  78. package/types/gltf/parser/index.d.ts +0 -14
  79. package/types/index.d.ts +0 -35
  80. package/types/ktx2/KTX2Container.d.ts +0 -81
  81. package/types/ktx2/KTX2Loader.d.ts +0 -55
  82. package/types/ktx2/KTX2TargetFormat.d.ts +0 -27
  83. package/types/ktx2/WorkerPool.d.ts +0 -32
  84. package/types/ktx2/transcoder/AbstractTranscoder.d.ts +0 -55
  85. package/types/ktx2/transcoder/BinomialLLCTranscoder.d.ts +0 -8
  86. package/types/ktx2/transcoder/BinomialLLCWorkerCode.d.ts +0 -6
  87. package/types/prefab/PrefabParser.d.ts +0 -11
  88. package/types/prefab/PrefabResource.d.ts +0 -25
  89. package/types/resource-deserialize/index.d.ts +0 -21
  90. package/types/resource-deserialize/resources/animationClip/AnimationClipDecoder.d.ts +0 -18
  91. package/types/resource-deserialize/resources/mesh/MeshDecoder.d.ts +0 -8
  92. package/types/resource-deserialize/resources/mesh/type.d.ts +0 -31
  93. package/types/resource-deserialize/resources/parser/HierarchyParser.d.ts +0 -43
  94. package/types/resource-deserialize/resources/parser/ParserContext.d.ts +0 -30
  95. package/types/resource-deserialize/resources/parser/ReflectionParser.d.ts +0 -21
  96. package/types/resource-deserialize/resources/scene/EditorTextureLoader.d.ts +0 -4
  97. package/types/resource-deserialize/resources/scene/SceneParser.d.ts +0 -17
  98. package/types/resource-deserialize/resources/schema/BasicSchema.d.ts +0 -97
  99. package/types/resource-deserialize/resources/schema/MaterialSchema.d.ts +0 -102
  100. package/types/resource-deserialize/resources/schema/ProjectSchema.d.ts +0 -9
  101. package/types/resource-deserialize/resources/schema/SceneSchema.d.ts +0 -80
  102. package/types/resource-deserialize/resources/schema/index.d.ts +0 -4
  103. package/types/resource-deserialize/resources/texture2D/TextureDecoder.d.ts +0 -5
  104. package/types/resource-deserialize/utils/BufferReader.d.ts +0 -28
  105. package/types/resource-deserialize/utils/Decorator.d.ts +0 -11
  106. package/types/resource-deserialize/utils/FileHeader.d.ts +0 -9
  107. package/types/resource-deserialize/utils/Utils.d.ts +0 -5
@@ -1,822 +0,0 @@
1
- /**
2
- * Module for glTF 2.0 Interface
3
- */
4
- import type { MeshTopology, TextureFilterMode, TextureWrapMode as EngineTextureWrapMode } from "@galacean/engine-core";
5
- /**
6
- * The datatype of the components in the attribute
7
- */
8
- export declare enum AccessorComponentType {
9
- /**
10
- * Byte
11
- */
12
- BYTE = 5120,
13
- /**
14
- * Unsigned Byte
15
- */
16
- UNSIGNED_BYTE = 5121,
17
- /**
18
- * Short
19
- */
20
- SHORT = 5122,
21
- /**
22
- * Unsigned Short
23
- */
24
- UNSIGNED_SHORT = 5123,
25
- /**
26
- * Unsigned Int
27
- */
28
- UNSIGNED_INT = 5125,
29
- /**
30
- * Float
31
- */
32
- FLOAT = 5126
33
- }
34
- /**
35
- * Specifies if the attirbute is a scalar, vector, or matrix
36
- */
37
- export declare enum AccessorType {
38
- /**
39
- * Scalar
40
- */
41
- SCALAR = "SCALAR",
42
- /**
43
- * Vector2
44
- */
45
- VEC2 = "VEC2",
46
- /**
47
- * Vector3
48
- */
49
- VEC3 = "VEC3",
50
- /**
51
- * Vector4
52
- */
53
- VEC4 = "VEC4",
54
- /**
55
- * Matrix2x2
56
- */
57
- MAT2 = "MAT2",
58
- /**
59
- * Matrix3x3
60
- */
61
- MAT3 = "MAT3",
62
- /**
63
- * Matrix4x4
64
- */
65
- MAT4 = "MAT4"
66
- }
67
- /**
68
- * The name of the node's TRS property to modify, or the weights of the Morph Targets it instantiates
69
- */
70
- export declare enum AnimationChannelTargetPath {
71
- /**
72
- * Translation
73
- */
74
- TRANSLATION = "translation",
75
- /**
76
- * Rotation
77
- */
78
- ROTATION = "rotation",
79
- /**
80
- * Scale
81
- */
82
- SCALE = "scale",
83
- /**
84
- * Weights
85
- */
86
- WEIGHTS = "weights"
87
- }
88
- /**
89
- * Interpolation algorithm
90
- */
91
- export declare enum AnimationSamplerInterpolation {
92
- /**
93
- * The animated values are linearly interpolated between keyframes
94
- */
95
- Linear = "LINEAR",
96
- /**
97
- * The animated values remain constant to the output of the first keyframe, until the next keyframe
98
- */
99
- Step = "STEP",
100
- /**
101
- * The animation's interpolation is computed using a cubic spline with specified tangents
102
- */
103
- CubicSpine = "CUBICSPLINE"
104
- }
105
- /**
106
- * A camera's projection. A node can reference a camera to apply a transform to place the camera in the scene
107
- */
108
- export declare enum CameraType {
109
- /**
110
- * A perspective camera containing properties to create a perspective projection matrix
111
- */
112
- PERSPECTIVE = "perspective",
113
- /**
114
- * An orthographic camera containing properties to create an orthographic projection matrix
115
- */
116
- ORTHOGRAPHIC = "orthographic"
117
- }
118
- /**
119
- * The mime-type of the image
120
- */
121
- export declare enum ImageMimeType {
122
- /**
123
- * JPEG Mime-type
124
- */
125
- JPEG = "image/jpeg",
126
- /**
127
- * PNG Mime-type
128
- */
129
- PNG = "image/png"
130
- }
131
- /**
132
- * The alpha rendering mode of the material
133
- */
134
- export declare enum MaterialAlphaMode {
135
- /**
136
- * The alpha value is ignored and the rendered output is fully opaque
137
- */
138
- OPAQUE = "OPAQUE",
139
- /**
140
- * The rendered output is either fully opaque or fully transparent depending on the alpha value and the specified alpha cutoff value
141
- */
142
- MASK = "MASK",
143
- /**
144
- * The alpha value is used to composite the source and destination areas. The rendered output is combined with the background using the normal painting operation (i.e. the Porter and Duff over operator)
145
- */
146
- BLEND = "BLEND"
147
- }
148
- /**
149
- * Magnification filter. Valid values correspond to WebGL enums: 9728 (NEAREST) and 9729 (LINEAR)
150
- */
151
- export declare enum TextureMagFilter {
152
- /**
153
- * Nearest
154
- */
155
- NEAREST = 9728,
156
- /**
157
- * Linear
158
- */
159
- LINEAR = 9729
160
- }
161
- /**
162
- * Minification filter. All valid values correspond to WebGL enums
163
- */
164
- export declare enum TextureMinFilter {
165
- /**
166
- * Nearest
167
- */
168
- NEAREST = 9728,
169
- /**
170
- * Linear
171
- */
172
- LINEAR = 9729,
173
- /**
174
- * Nearest Mip-Map Nearest
175
- */
176
- NEAREST_MIPMAP_NEAREST = 9984,
177
- /**
178
- * Linear Mipmap Nearest
179
- */
180
- LINEAR_MIPMAP_NEAREST = 9985,
181
- /**
182
- * Nearest Mipmap Linear
183
- */
184
- NEAREST_MIPMAP_LINEAR = 9986,
185
- /**
186
- * Linear Mipmap Linear
187
- */
188
- LINEAR_MIPMAP_LINEAR = 9987
189
- }
190
- /**
191
- * S (U) wrapping mode. All valid values correspond to WebGL enums
192
- */
193
- export declare enum TextureWrapMode {
194
- /**
195
- * Clamp to Edge
196
- */
197
- CLAMP_TO_EDGE = 33071,
198
- /**
199
- * Mirrored Repeat
200
- */
201
- MIRRORED_REPEAT = 33648,
202
- /**
203
- * Repeat
204
- */
205
- REPEAT = 10497
206
- }
207
- /**
208
- * glTF Property
209
- */
210
- export interface IProperty {
211
- /**
212
- * Dictionary object with extension-specific objects
213
- */
214
- extensions?: {
215
- [key: string]: any;
216
- };
217
- /**
218
- * Application-Specific data
219
- */
220
- extras?: any;
221
- }
222
- /**
223
- * glTF Child of Root Property
224
- */
225
- export interface IChildRootProperty extends IProperty {
226
- /**
227
- * The user-defined name of this object
228
- */
229
- name?: string;
230
- }
231
- /**
232
- * Indices of those attributes that deviate from their initialization value
233
- */
234
- export interface IAccessorSparseIndices extends IProperty {
235
- /**
236
- * The index of the bufferView with sparse indices. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target
237
- */
238
- bufferView: number;
239
- /**
240
- * The offset relative to the start of the bufferView in bytes. Must be aligned
241
- */
242
- byteOffset?: number;
243
- /**
244
- * The indices data type. Valid values correspond to WebGL enums: 5121 (UNSIGNED_BYTE), 5123 (UNSIGNED_SHORT), 5125 (UNSIGNED_INT)
245
- */
246
- componentType: AccessorComponentType;
247
- }
248
- /**
249
- * Array of size accessor.sparse.count times number of components storing the displaced accessor attributes pointed by accessor.sparse.indices
250
- */
251
- export interface IAccessorSparseValues extends IProperty {
252
- /**
253
- * The index of the bufferView with sparse values. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target
254
- */
255
- bufferView: number;
256
- /**
257
- * The offset relative to the start of the bufferView in bytes. Must be aligned
258
- */
259
- byteOffset?: number;
260
- }
261
- /**
262
- * Sparse storage of attributes that deviate from their initialization value
263
- */
264
- export interface IAccessorSparse extends IProperty {
265
- /**
266
- * The number of attributes encoded in this sparse accessor
267
- */
268
- count: number;
269
- /**
270
- * Index array of size count that points to those accessor attributes that deviate from their initialization value. Indices must strictly increase
271
- */
272
- indices: IAccessorSparseIndices;
273
- /**
274
- * Array of size count times number of components, storing the displaced accessor attributes pointed by indices. Substituted values must have the same componentType and number of components as the base accessor
275
- */
276
- values: IAccessorSparseValues;
277
- }
278
- /**
279
- * A typed view into a bufferView. A bufferView contains raw binary data. An accessor provides a typed view into a bufferView or a subset of a bufferView similar to how WebGL's vertexAttribPointer() defines an attribute in a buffer
280
- */
281
- export interface IAccessor extends IChildRootProperty {
282
- /**
283
- * The index of the bufferview
284
- */
285
- bufferView?: number;
286
- /**
287
- * The offset relative to the start of the bufferView in bytes
288
- */
289
- byteOffset?: number;
290
- /**
291
- * The datatype of components in the attribute
292
- */
293
- componentType: AccessorComponentType;
294
- /**
295
- * Specifies whether integer data values should be normalized
296
- */
297
- normalized?: boolean;
298
- /**
299
- * The number of attributes referenced by this accessor
300
- */
301
- count: number;
302
- /**
303
- * Specifies if the attribute is a scalar, vector, or matrix
304
- */
305
- type: AccessorType;
306
- /**
307
- * Maximum value of each component in this attribute
308
- */
309
- max?: number[];
310
- /**
311
- * Minimum value of each component in this attribute
312
- */
313
- min?: number[];
314
- /**
315
- * Sparse storage of attributes that deviate from their initialization value
316
- */
317
- sparse?: IAccessorSparse;
318
- }
319
- /**
320
- * Targets an animation's sampler at a node's property
321
- */
322
- export interface IAnimationChannel extends IProperty {
323
- /**
324
- * The index of a sampler in this animation used to compute the value for the target
325
- */
326
- sampler: number;
327
- /**
328
- * The index of the node and TRS property to target
329
- */
330
- target: IAnimationChannelTarget;
331
- }
332
- /**
333
- * The index of the node and TRS property that an animation channel targets
334
- */
335
- export interface IAnimationChannelTarget extends IProperty {
336
- /**
337
- * The index of the node to target
338
- */
339
- node: number;
340
- /**
341
- * The name of the node's TRS property to modify, or the weights of the Morph Targets it instantiates
342
- */
343
- path: AnimationChannelTargetPath;
344
- }
345
- /**
346
- * Combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target)
347
- */
348
- export interface IAnimationSampler extends IProperty {
349
- /**
350
- * The index of an accessor containing keyframe input values, e.g., time
351
- */
352
- input: number;
353
- /**
354
- * Interpolation algorithm
355
- */
356
- interpolation?: AnimationSamplerInterpolation;
357
- /**
358
- * The index of an accessor, containing keyframe output values
359
- */
360
- output: number;
361
- }
362
- /**
363
- * A keyframe animation
364
- */
365
- export interface IAnimation extends IChildRootProperty {
366
- /**
367
- * An array of channels, each of which targets an animation's sampler at a node's property
368
- */
369
- channels: IAnimationChannel[];
370
- /**
371
- * An array of samplers that combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target)
372
- */
373
- samplers: IAnimationSampler[];
374
- }
375
- /**
376
- * Metadata about the glTF asset
377
- */
378
- export interface IAsset extends IChildRootProperty {
379
- /**
380
- * A copyright message suitable for display to credit the content creator
381
- */
382
- copyright?: string;
383
- /**
384
- * Tool that generated this glTF model. Useful for debugging
385
- */
386
- generator?: string;
387
- /**
388
- * The glTF version that this asset targets
389
- */
390
- version: string;
391
- /**
392
- * The minimum glTF version that this asset targets
393
- */
394
- minVersion?: string;
395
- }
396
- /**
397
- * A buffer points to binary geometry, animation, or skins
398
- */
399
- export interface IBuffer extends IChildRootProperty {
400
- /**
401
- * The uri of the buffer. Relative paths are relative to the .gltf file. Instead of referencing an external file, the uri can also be a data-uri
402
- */
403
- uri?: string;
404
- /**
405
- * The length of the buffer in bytes
406
- */
407
- byteLength: number;
408
- }
409
- /**
410
- * A view into a buffer generally representing a subset of the buffer
411
- */
412
- export interface IBufferView extends IChildRootProperty {
413
- /**
414
- * The index of the buffer
415
- */
416
- buffer: number;
417
- /**
418
- * The offset into the buffer in bytes
419
- */
420
- byteOffset?: number;
421
- /**
422
- * The length of the bufferView in bytes
423
- */
424
- byteLength: number;
425
- /**
426
- * The stride, in bytes
427
- */
428
- byteStride?: number;
429
- }
430
- /**
431
- * An orthographic camera containing properties to create an orthographic projection matrix
432
- */
433
- export interface ICameraOrthographic extends IProperty {
434
- /**
435
- * The floating-point horizontal magnification of the view. Must not be zero
436
- */
437
- xmag: number;
438
- /**
439
- * The floating-point vertical magnification of the view. Must not be zero
440
- */
441
- ymag: number;
442
- /**
443
- * The floating-point distance to the far clipping plane. zfar must be greater than znear
444
- */
445
- zfar: number;
446
- /**
447
- * The floating-point distance to the near clipping plane
448
- */
449
- znear: number;
450
- }
451
- /**
452
- * A perspective camera containing properties to create a perspective projection matrix
453
- */
454
- export interface ICameraPerspective extends IProperty {
455
- /**
456
- * The floating-point aspect ratio of the field of view
457
- */
458
- aspectRatio?: number;
459
- /**
460
- * The floating-point vertical field of view in radians
461
- */
462
- yfov: number;
463
- /**
464
- * The floating-point distance to the far clipping plane
465
- */
466
- zfar?: number;
467
- /**
468
- * The floating-point distance to the near clipping plane
469
- */
470
- znear: number;
471
- }
472
- /**
473
- * A camera's projection. A node can reference a camera to apply a transform to place the camera in the scene
474
- */
475
- export interface ICamera extends IChildRootProperty {
476
- /**
477
- * An orthographic camera containing properties to create an orthographic projection matrix
478
- */
479
- orthographic?: ICameraOrthographic;
480
- /**
481
- * A perspective camera containing properties to create a perspective projection matrix
482
- */
483
- perspective?: ICameraPerspective;
484
- /**
485
- * Specifies if the camera uses a perspective or orthographic projection
486
- */
487
- type: CameraType;
488
- }
489
- /**
490
- * Image data used to create a texture. Image can be referenced by URI or bufferView index. mimeType is required in the latter case
491
- */
492
- export interface IImage extends IChildRootProperty {
493
- /**
494
- * The uri of the image. Relative paths are relative to the .gltf file. Instead of referencing an external file, the uri can also be a data-uri. The image format must be jpg or png
495
- */
496
- uri?: string;
497
- /**
498
- * The image's MIME type
499
- */
500
- mimeType?: ImageMimeType;
501
- /**
502
- * The index of the bufferView that contains the image. Use this instead of the image's uri property
503
- */
504
- bufferView?: number;
505
- }
506
- /**
507
- * Material Normal Texture Info
508
- */
509
- export interface IMaterialNormalTextureInfo extends ITextureInfo {
510
- /**
511
- * The scalar multiplier applied to each normal vector of the normal texture
512
- */
513
- scale?: number;
514
- }
515
- /**
516
- * Material Occlusion Texture Info
517
- */
518
- export interface IMaterialOcclusionTextureInfo extends ITextureInfo {
519
- /**
520
- * A scalar multiplier controlling the amount of occlusion applied
521
- */
522
- strength?: number;
523
- }
524
- /**
525
- * A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology
526
- */
527
- export interface IMaterialPbrMetallicRoughness {
528
- /**
529
- * The material's base color factor
530
- */
531
- baseColorFactor?: number[];
532
- /**
533
- * The base color texture
534
- */
535
- baseColorTexture?: ITextureInfo;
536
- /**
537
- * The metalness of the material
538
- */
539
- metallicFactor?: number;
540
- /**
541
- * The roughness of the material
542
- */
543
- roughnessFactor?: number;
544
- /**
545
- * The metallic-roughness texture
546
- */
547
- metallicRoughnessTexture?: ITextureInfo;
548
- }
549
- /**
550
- * The material appearance of a primitive
551
- */
552
- export interface IMaterial extends IChildRootProperty {
553
- /**
554
- * A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. When not specified, all the default values of pbrMetallicRoughness apply
555
- */
556
- pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;
557
- /**
558
- * The normal map texture
559
- */
560
- normalTexture?: IMaterialNormalTextureInfo;
561
- /**
562
- * The occlusion map texture
563
- */
564
- occlusionTexture?: IMaterialOcclusionTextureInfo;
565
- /**
566
- * The emissive map texture
567
- */
568
- emissiveTexture?: ITextureInfo;
569
- /**
570
- * The RGB components of the emissive color of the material. These values are linear. If an emissiveTexture is specified, this value is multiplied with the texel values
571
- */
572
- emissiveFactor?: number[];
573
- /**
574
- * The alpha rendering mode of the material
575
- */
576
- alphaMode?: MaterialAlphaMode;
577
- /**
578
- * The alpha cutoff value of the material
579
- */
580
- alphaCutoff?: number;
581
- /**
582
- * Specifies whether the material is double sided
583
- */
584
- doubleSided?: boolean;
585
- }
586
- /**
587
- * Geometry to be rendered with the given material
588
- */
589
- export interface IMeshPrimitive extends IProperty {
590
- /**
591
- * A dictionary object, where each key corresponds to mesh attribute semantic and each value is the index of the accessor containing attribute's data
592
- */
593
- attributes: {
594
- [name: string]: number;
595
- };
596
- /**
597
- * The index of the accessor that contains the indices
598
- */
599
- indices?: number;
600
- /**
601
- * The index of the material to apply to this primitive when rendering
602
- */
603
- material?: number;
604
- /**
605
- * The type of primitives to render. All valid values correspond to WebGL enums
606
- */
607
- mode?: MeshTopology;
608
- /**
609
- * An array of Morph Targets, each Morph Target is a dictionary mapping attributes (only POSITION, NORMAL, and TANGENT supported) to their deviations in the Morph Target
610
- */
611
- targets?: {
612
- [name: string]: number;
613
- }[];
614
- }
615
- /**
616
- * A set of primitives to be rendered. A node can contain one mesh. A node's transform places the mesh in the scene
617
- */
618
- export interface IMesh extends IChildRootProperty {
619
- /**
620
- * An array of primitives, each defining geometry to be rendered with a material
621
- */
622
- primitives: IMeshPrimitive[];
623
- /**
624
- * Array of weights to be applied to the Morph Targets
625
- */
626
- weights?: number[];
627
- }
628
- /**
629
- * A node in the node hierarchy
630
- */
631
- export interface INode extends IChildRootProperty {
632
- /**
633
- * The index of the camera referenced by this node
634
- */
635
- camera?: number;
636
- /**
637
- * The indices of this node's children
638
- */
639
- children?: number[];
640
- /**
641
- * The index of the skin referenced by this node
642
- */
643
- skin?: number;
644
- /**
645
- * A floating-point 4x4 transformation matrix stored in column-major order
646
- */
647
- matrix?: number[];
648
- /**
649
- * The index of the mesh in this node
650
- */
651
- mesh?: number;
652
- /**
653
- * The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar
654
- */
655
- rotation?: number[];
656
- /**
657
- * The node's non-uniform scale, given as the scaling factors along the x, y, and z axes
658
- */
659
- scale?: number[];
660
- /**
661
- * The node's translation along the x, y, and z axes
662
- */
663
- translation?: number[];
664
- /**
665
- * The weights of the instantiated Morph Target. Number of elements must match number of Morph Targets of used mesh
666
- */
667
- weights?: number[];
668
- }
669
- /**
670
- * Texture sampler properties for filtering and wrapping modes
671
- */
672
- export interface ISampler extends IChildRootProperty {
673
- /**
674
- * Magnification filter. Valid values correspond to WebGL enums: 9728 (NEAREST) and 9729 (LINEAR)
675
- */
676
- magFilter?: TextureMagFilter;
677
- /**
678
- * Minification filter. All valid values correspond to WebGL enums
679
- */
680
- minFilter?: TextureMinFilter;
681
- /**
682
- * S (U) wrapping mode. All valid values correspond to WebGL enums
683
- */
684
- wrapS?: TextureWrapMode;
685
- /**
686
- * T (V) wrapping mode. All valid values correspond to WebGL enums
687
- */
688
- wrapT?: TextureWrapMode;
689
- }
690
- /**
691
- * The root nodes of a scene
692
- */
693
- export interface IScene extends IChildRootProperty {
694
- /**
695
- * The indices of each root node
696
- */
697
- nodes?: number[];
698
- }
699
- /**
700
- * Joints and matrices defining a skin
701
- */
702
- export interface ISkin extends IChildRootProperty {
703
- /**
704
- * The index of the accessor containing the floating-point 4x4 inverse-bind matrices. The default is that each matrix is a 4x4 identity matrix, which implies that inverse-bind matrices were pre-applied
705
- */
706
- inverseBindMatrices?: number;
707
- /**
708
- * The index of the node used as a skeleton root. When undefined, joints transforms resolve to scene root
709
- */
710
- skeleton?: number;
711
- /**
712
- * Indices of skeleton nodes, used as joints in this skin. The array length must be the same as the count property of the inverseBindMatrices accessor (when defined)
713
- */
714
- joints: number[];
715
- }
716
- /**
717
- * A texture and its sampler
718
- */
719
- export interface ITexture extends IChildRootProperty {
720
- /**
721
- * The index of the sampler used by this texture. When undefined, a sampler with repeat wrapping and auto filtering should be used
722
- */
723
- sampler?: number;
724
- /**
725
- * The index of the image used by this texture
726
- */
727
- source?: number;
728
- }
729
- /**
730
- * Reference to a texture
731
- */
732
- export interface ITextureInfo extends IProperty {
733
- /**
734
- * The index of the texture
735
- */
736
- index: number;
737
- /**
738
- * The set index of texture's TEXCOORD attribute used for texture coordinate mapping
739
- */
740
- texCoord?: number;
741
- }
742
- /**
743
- * The root object for a glTF asset
744
- */
745
- export interface IGLTF extends IProperty {
746
- /**
747
- * An array of accessors. An accessor is a typed view into a bufferView
748
- */
749
- accessors?: IAccessor[];
750
- /**
751
- * An array of keyframe animations
752
- */
753
- animations?: IAnimation[];
754
- /**
755
- * Metadata about the glTF asset
756
- */
757
- asset: IAsset;
758
- /**
759
- * An array of buffers. A buffer points to binary geometry, animation, or skins
760
- */
761
- buffers?: IBuffer[];
762
- /**
763
- * An array of bufferViews. A bufferView is a view into a buffer generally representing a subset of the buffer
764
- */
765
- bufferViews?: IBufferView[];
766
- /**
767
- * An array of cameras
768
- */
769
- cameras?: ICamera[];
770
- /**
771
- * Names of glTF extensions used somewhere in this asset
772
- */
773
- extensionsUsed?: string[];
774
- /**
775
- * Names of glTF extensions required to properly load this asset
776
- */
777
- extensionsRequired?: string[];
778
- /**
779
- * An array of images. An image defines data used to create a texture
780
- */
781
- images?: IImage[];
782
- /**
783
- * An array of materials. A material defines the appearance of a primitive
784
- */
785
- materials?: IMaterial[];
786
- /**
787
- * An array of meshes. A mesh is a set of primitives to be rendered
788
- */
789
- meshes?: IMesh[];
790
- /**
791
- * An array of nodes
792
- */
793
- nodes?: INode[];
794
- /**
795
- * An array of samplers. A sampler contains properties for texture filtering and wrapping modes
796
- */
797
- samplers?: ISampler[];
798
- /**
799
- * The index of the default scene
800
- */
801
- scene?: number;
802
- /**
803
- * An array of scenes
804
- */
805
- scenes?: IScene[];
806
- /**
807
- * An array of skins. A skin is defined by joints and matrices
808
- */
809
- skins?: ISkin[];
810
- /**
811
- * An array of textures
812
- */
813
- textures?: ITexture[];
814
- }
815
- /** glTF extensible owner schema. */
816
- export type GLTFExtensionOwnerSchema = IMeshPrimitive | IMaterial | ITextureInfo | INode;
817
- export interface ISamplerInfo {
818
- filterMode?: TextureFilterMode;
819
- wrapModeU?: EngineTextureWrapMode;
820
- wrapModeV?: EngineTextureWrapMode;
821
- mipmap?: boolean;
822
- }