@loaders.gl/gltf 4.0.0-alpha.6 → 4.0.0-alpha.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/dist/dist.min.js +1661 -1459
- package/dist/es5/glb-loader.js +2 -2
- package/dist/es5/glb-loader.js.map +1 -1
- package/dist/es5/glb-writer.js +3 -4
- package/dist/es5/glb-writer.js.map +1 -1
- package/dist/es5/gltf-loader.js +3 -3
- package/dist/es5/gltf-loader.js.map +1 -1
- package/dist/es5/index.js +9 -3
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/lib/api/gltf-extensions.js.map +1 -1
- package/dist/es5/lib/api/gltf-scenegraph.js +52 -32
- package/dist/es5/lib/api/gltf-scenegraph.js.map +1 -1
- package/dist/es5/lib/api/post-process-gltf.js +164 -116
- package/dist/es5/lib/api/post-process-gltf.js.map +1 -1
- package/dist/es5/lib/encoders/encode-glb.js +1 -1
- package/dist/es5/lib/encoders/encode-glb.js.map +1 -1
- package/dist/es5/lib/encoders/encode-gltf.js +2 -3
- package/dist/es5/lib/encoders/encode-gltf.js.map +1 -1
- package/dist/es5/lib/extensions/EXT_meshopt_compression.js +3 -5
- package/dist/es5/lib/extensions/EXT_meshopt_compression.js.map +1 -1
- package/dist/es5/lib/extensions/EXT_texture_webp.js +2 -3
- package/dist/es5/lib/extensions/EXT_texture_webp.js.map +1 -1
- package/dist/es5/lib/extensions/KHR_binary_gltf.js +2 -3
- package/dist/es5/lib/extensions/KHR_binary_gltf.js.map +1 -1
- package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js +6 -5
- package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js.map +1 -1
- package/dist/es5/lib/extensions/KHR_texture_basisu.js +3 -4
- package/dist/es5/lib/extensions/KHR_texture_basisu.js.map +1 -1
- package/dist/es5/lib/extensions/KHR_texture_transform.js +9 -8
- package/dist/es5/lib/extensions/KHR_texture_transform.js.map +1 -1
- package/dist/es5/lib/extensions/deprecated/EXT_feature_metadata.js +195 -17
- package/dist/es5/lib/extensions/deprecated/EXT_feature_metadata.js.map +1 -1
- package/dist/es5/lib/extensions/deprecated/KHR_lights_punctual.js +3 -3
- package/dist/es5/lib/extensions/deprecated/KHR_lights_punctual.js.map +1 -1
- package/dist/es5/lib/extensions/deprecated/KHR_materials_unlit.js +3 -3
- package/dist/es5/lib/extensions/deprecated/KHR_materials_unlit.js.map +1 -1
- package/dist/es5/lib/extensions/deprecated/KHR_techniques_webgl.js +2 -2
- package/dist/es5/lib/extensions/deprecated/KHR_techniques_webgl.js.map +1 -1
- package/dist/es5/lib/gltf-utils/gltf-attribute-utils.js.map +1 -1
- package/dist/es5/lib/gltf-utils/gltf-utils.js +24 -0
- package/dist/es5/lib/gltf-utils/gltf-utils.js.map +1 -1
- package/dist/es5/lib/parsers/parse-glb.js +10 -10
- package/dist/es5/lib/parsers/parse-glb.js.map +1 -1
- package/dist/es5/lib/parsers/parse-gltf.js +18 -25
- package/dist/es5/lib/parsers/parse-gltf.js.map +1 -1
- package/dist/es5/lib/types/gltf-json-schema.js.map +1 -1
- package/dist/es5/lib/types/gltf-postprocessed-schema.js.map +1 -1
- package/dist/es5/lib/types/gltf-types.js.map +1 -1
- package/dist/es5/lib/utils/version.js +1 -1
- package/dist/esm/glb-loader.js +1 -1
- package/dist/esm/glb-loader.js.map +1 -1
- package/dist/esm/glb-writer.js +1 -1
- package/dist/esm/glb-writer.js.map +1 -1
- package/dist/esm/gltf-loader.js +3 -3
- package/dist/esm/gltf-loader.js.map +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/api/gltf-extensions.js.map +1 -1
- package/dist/esm/lib/api/gltf-scenegraph.js +45 -31
- package/dist/esm/lib/api/gltf-scenegraph.js.map +1 -1
- package/dist/esm/lib/api/post-process-gltf.js +167 -112
- package/dist/esm/lib/api/post-process-gltf.js.map +1 -1
- package/dist/esm/lib/encoders/encode-glb.js +1 -1
- package/dist/esm/lib/encoders/encode-glb.js.map +1 -1
- package/dist/esm/lib/encoders/encode-gltf.js +1 -1
- package/dist/esm/lib/encoders/encode-gltf.js.map +1 -1
- package/dist/esm/lib/extensions/EXT_meshopt_compression.js +2 -3
- package/dist/esm/lib/extensions/EXT_meshopt_compression.js.map +1 -1
- package/dist/esm/lib/extensions/EXT_texture_webp.js +1 -1
- package/dist/esm/lib/extensions/EXT_texture_webp.js.map +1 -1
- package/dist/esm/lib/extensions/KHR_binary_gltf.js +1 -1
- package/dist/esm/lib/extensions/KHR_binary_gltf.js.map +1 -1
- package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js +5 -4
- package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js.map +1 -1
- package/dist/esm/lib/extensions/KHR_texture_basisu.js +2 -2
- package/dist/esm/lib/extensions/KHR_texture_basisu.js.map +1 -1
- package/dist/esm/lib/extensions/KHR_texture_transform.js +7 -6
- package/dist/esm/lib/extensions/KHR_texture_transform.js.map +1 -1
- package/dist/esm/lib/extensions/deprecated/EXT_feature_metadata.js +161 -15
- package/dist/esm/lib/extensions/deprecated/EXT_feature_metadata.js.map +1 -1
- package/dist/esm/lib/extensions/deprecated/KHR_lights_punctual.js +1 -1
- package/dist/esm/lib/extensions/deprecated/KHR_lights_punctual.js.map +1 -1
- package/dist/esm/lib/extensions/deprecated/KHR_materials_unlit.js +1 -1
- package/dist/esm/lib/extensions/deprecated/KHR_materials_unlit.js.map +1 -1
- package/dist/esm/lib/extensions/deprecated/KHR_techniques_webgl.js +1 -1
- package/dist/esm/lib/extensions/deprecated/KHR_techniques_webgl.js.map +1 -1
- package/dist/esm/lib/gltf-utils/gltf-attribute-utils.js.map +1 -1
- package/dist/esm/lib/gltf-utils/gltf-utils.js +20 -0
- package/dist/esm/lib/gltf-utils/gltf-utils.js.map +1 -1
- package/dist/esm/lib/parsers/parse-glb.js +10 -10
- package/dist/esm/lib/parsers/parse-glb.js.map +1 -1
- package/dist/esm/lib/parsers/parse-gltf.js +7 -12
- package/dist/esm/lib/parsers/parse-gltf.js.map +1 -1
- package/dist/esm/lib/types/gltf-json-schema.js.map +1 -1
- package/dist/esm/lib/types/gltf-postprocessed-schema.js.map +1 -1
- package/dist/esm/lib/types/gltf-types.js.map +1 -1
- package/dist/esm/lib/utils/version.js +1 -1
- package/dist/glb-loader.d.ts +2 -2
- package/dist/glb-loader.js +2 -5
- package/dist/glb-writer.d.ts.map +1 -1
- package/dist/glb-writer.js +4 -6
- package/dist/gltf-loader.d.ts +5 -5
- package/dist/gltf-loader.d.ts.map +1 -1
- package/dist/gltf-loader.js +3 -3
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -5
- package/dist/lib/api/gltf-extensions.d.ts +1 -1
- package/dist/lib/api/gltf-extensions.d.ts.map +1 -1
- package/dist/lib/api/gltf-extensions.js +1 -1
- package/dist/lib/api/gltf-scenegraph.d.ts +8 -5
- package/dist/lib/api/gltf-scenegraph.d.ts.map +1 -1
- package/dist/lib/api/gltf-scenegraph.js +47 -33
- package/dist/lib/api/post-process-gltf.d.ts +4 -1
- package/dist/lib/api/post-process-gltf.d.ts.map +1 -1
- package/dist/lib/api/post-process-gltf.js +186 -123
- package/dist/lib/encoders/encode-glb.d.ts +13 -1
- package/dist/lib/encoders/encode-glb.d.ts.map +1 -1
- package/dist/lib/encoders/encode-glb.js +15 -4
- package/dist/lib/encoders/encode-gltf.js +2 -5
- package/dist/lib/extensions/EXT_meshopt_compression.d.ts +1 -1
- package/dist/lib/extensions/EXT_meshopt_compression.d.ts.map +1 -1
- package/dist/lib/extensions/EXT_meshopt_compression.js +3 -7
- package/dist/lib/extensions/EXT_texture_webp.d.ts +1 -1
- package/dist/lib/extensions/EXT_texture_webp.d.ts.map +1 -1
- package/dist/lib/extensions/EXT_texture_webp.js +2 -5
- package/dist/lib/extensions/KHR_binary_gltf.d.ts +1 -1
- package/dist/lib/extensions/KHR_binary_gltf.d.ts.map +1 -1
- package/dist/lib/extensions/KHR_binary_gltf.js +2 -5
- package/dist/lib/extensions/KHR_draco_mesh_compression.d.ts +1 -1
- package/dist/lib/extensions/KHR_draco_mesh_compression.d.ts.map +1 -1
- package/dist/lib/extensions/KHR_draco_mesh_compression.js +5 -8
- package/dist/lib/extensions/KHR_texture_basisu.d.ts +1 -1
- package/dist/lib/extensions/KHR_texture_basisu.d.ts.map +1 -1
- package/dist/lib/extensions/KHR_texture_basisu.js +3 -6
- package/dist/lib/extensions/KHR_texture_transform.d.ts.map +1 -1
- package/dist/lib/extensions/KHR_texture_transform.js +7 -10
- package/dist/lib/extensions/deprecated/EXT_feature_metadata.d.ts +3 -2
- package/dist/lib/extensions/deprecated/EXT_feature_metadata.d.ts.map +1 -1
- package/dist/lib/extensions/deprecated/EXT_feature_metadata.js +195 -23
- package/dist/lib/extensions/deprecated/KHR_lights_punctual.d.ts +1 -1
- package/dist/lib/extensions/deprecated/KHR_lights_punctual.d.ts.map +1 -1
- package/dist/lib/extensions/deprecated/KHR_lights_punctual.js +3 -6
- package/dist/lib/extensions/deprecated/KHR_materials_unlit.d.ts +1 -1
- package/dist/lib/extensions/deprecated/KHR_materials_unlit.d.ts.map +1 -1
- package/dist/lib/extensions/deprecated/KHR_materials_unlit.js +3 -6
- package/dist/lib/extensions/deprecated/KHR_techniques_webgl.d.ts +1 -1
- package/dist/lib/extensions/deprecated/KHR_techniques_webgl.d.ts.map +1 -1
- package/dist/lib/extensions/deprecated/KHR_techniques_webgl.js +2 -5
- package/dist/lib/gltf-utils/gltf-attribute-utils.d.ts +1 -1
- package/dist/lib/gltf-utils/gltf-attribute-utils.d.ts.map +1 -1
- package/dist/lib/gltf-utils/gltf-utils.d.ts +7 -0
- package/dist/lib/gltf-utils/gltf-utils.d.ts.map +1 -1
- package/dist/lib/gltf-utils/gltf-utils.js +28 -1
- package/dist/lib/parsers/parse-glb.d.ts +15 -3
- package/dist/lib/parsers/parse-glb.d.ts.map +1 -1
- package/dist/lib/parsers/parse-glb.js +43 -18
- package/dist/lib/parsers/parse-gltf.d.ts +8 -4
- package/dist/lib/parsers/parse-gltf.d.ts.map +1 -1
- package/dist/lib/parsers/parse-gltf.js +17 -41
- package/dist/lib/types/gltf-json-schema.d.ts +153 -139
- package/dist/lib/types/gltf-json-schema.d.ts.map +1 -1
- package/dist/lib/types/gltf-postprocessed-schema.d.ts +174 -209
- package/dist/lib/types/gltf-postprocessed-schema.d.ts.map +1 -1
- package/dist/lib/types/gltf-postprocessed-schema.js +1 -1
- package/dist/lib/types/gltf-types.d.ts +18 -6
- package/dist/lib/types/gltf-types.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/glb-loader.ts +3 -3
- package/src/glb-writer.ts +3 -1
- package/src/gltf-loader.ts +12 -8
- package/src/index.ts +32 -13
- package/src/lib/api/gltf-extensions.ts +1 -1
- package/src/lib/api/gltf-scenegraph.ts +60 -41
- package/src/lib/api/post-process-gltf.ts +275 -150
- package/src/lib/encoders/encode-glb.ts +15 -5
- package/src/lib/encoders/encode-gltf.ts +1 -1
- package/src/lib/extensions/EXT_meshopt_compression.ts +4 -6
- package/src/lib/extensions/EXT_texture_webp.ts +2 -2
- package/src/lib/extensions/KHR_binary_gltf.ts +2 -2
- package/src/lib/extensions/KHR_draco_mesh_compression.ts +7 -7
- package/src/lib/extensions/KHR_texture_basisu.ts +3 -3
- package/src/lib/extensions/KHR_texture_transform.ts +22 -19
- package/src/lib/extensions/deprecated/EXT_feature_metadata.ts +264 -23
- package/src/lib/extensions/deprecated/KHR_lights_punctual.ts +2 -2
- package/src/lib/extensions/deprecated/KHR_materials_unlit.ts +2 -2
- package/src/lib/extensions/deprecated/KHR_techniques_webgl.ts +2 -2
- package/src/lib/gltf-utils/gltf-attribute-utils.ts +1 -1
- package/src/lib/gltf-utils/gltf-utils.ts +31 -0
- package/src/lib/parsers/parse-glb.ts +50 -24
- package/src/lib/parsers/parse-gltf.ts +26 -25
- package/src/lib/types/gltf-json-schema.ts +168 -138
- package/src/lib/types/gltf-postprocessed-schema.ts +289 -212
- package/src/lib/types/gltf-types.ts +35 -59
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
// Types forked from https://github.com/bwasty/gltf-loader-ts under MIT license
|
|
2
|
-
// Generated from official JSON schema using `npm run generate-
|
|
2
|
+
// Generated from official JSON schema using `npm run generate-type` = on 2018-02-24
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
// tslint:disable:max-line-length
|
|
4
|
+
import type {TypedArray} from '@loaders.gl/loader-utils';
|
|
6
5
|
|
|
7
6
|
export type GlTfId = number;
|
|
7
|
+
|
|
8
|
+
// GLTF attributes (possibly overridden)
|
|
9
|
+
|
|
8
10
|
/**
|
|
9
11
|
* Indices of those attributes that deviate from their initialization value.
|
|
10
12
|
*/
|
|
11
|
-
export
|
|
13
|
+
export type AccessorSparseIndices = {
|
|
14
|
+
id: string;
|
|
15
|
+
|
|
16
|
+
// GLTF attributes (possibly overridden)
|
|
12
17
|
/**
|
|
13
18
|
* The index of the bufferView with sparse indices. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
|
|
14
19
|
*/
|
|
@@ -23,12 +28,16 @@ export interface AccessorSparseIndices {
|
|
|
23
28
|
componentType: 5121 | 5123 | 5125 | number;
|
|
24
29
|
extensions?: any;
|
|
25
30
|
extras?: any;
|
|
26
|
-
[k: string]: any;
|
|
27
|
-
}
|
|
31
|
+
// [k: string]: any;
|
|
32
|
+
};
|
|
33
|
+
|
|
28
34
|
/**
|
|
29
35
|
* Array of size `accessor.sparse.count` times number of components storing the displaced accessor attributes pointed by `accessor.sparse.indices`.
|
|
30
36
|
*/
|
|
31
|
-
export
|
|
37
|
+
export type AccessorSparseValues = {
|
|
38
|
+
id: string;
|
|
39
|
+
|
|
40
|
+
// GLTF attributes (possibly overridden)
|
|
32
41
|
/**
|
|
33
42
|
* The index of the bufferView with sparse values. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
|
|
34
43
|
*/
|
|
@@ -39,12 +48,16 @@ export interface AccessorSparseValues {
|
|
|
39
48
|
byteOffset?: number;
|
|
40
49
|
extensions?: any;
|
|
41
50
|
extras?: any;
|
|
42
|
-
[k: string]: any;
|
|
43
|
-
}
|
|
51
|
+
// [k: string]: any;
|
|
52
|
+
};
|
|
53
|
+
|
|
44
54
|
/**
|
|
45
55
|
* Sparse storage of attributes that deviate from their initialization value.
|
|
46
56
|
*/
|
|
47
|
-
export
|
|
57
|
+
export type AccessorSparse = {
|
|
58
|
+
id: string;
|
|
59
|
+
|
|
60
|
+
// GLTF attributes (possibly overridden)
|
|
48
61
|
/**
|
|
49
62
|
* Number of entries stored in the sparse array.
|
|
50
63
|
*/
|
|
@@ -59,16 +72,24 @@ export interface AccessorSparse {
|
|
|
59
72
|
values: AccessorSparseValues;
|
|
60
73
|
extensions?: any;
|
|
61
74
|
extras?: any;
|
|
62
|
-
[k: string]: any;
|
|
63
|
-
}
|
|
75
|
+
// [k: string]: any;
|
|
76
|
+
};
|
|
77
|
+
|
|
64
78
|
/**
|
|
65
79
|
* 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.
|
|
66
80
|
*/
|
|
67
|
-
export
|
|
81
|
+
export type GLTFAccessorPostprocessed = {
|
|
82
|
+
id: string;
|
|
83
|
+
components: number;
|
|
84
|
+
bytesPerComponent: number;
|
|
85
|
+
bytesPerElement: number;
|
|
86
|
+
value: TypedArray;
|
|
87
|
+
|
|
88
|
+
// GLTF attributes (possibly overridden)
|
|
68
89
|
/**
|
|
69
90
|
* The index of the bufferView.
|
|
70
91
|
*/
|
|
71
|
-
bufferView?:
|
|
92
|
+
bufferView?: GLTFBufferViewPostprocessed;
|
|
72
93
|
/**
|
|
73
94
|
* The offset relative to the start of the bufferView in bytes.
|
|
74
95
|
*/
|
|
@@ -104,12 +125,16 @@ export interface Accessor {
|
|
|
104
125
|
name?: any;
|
|
105
126
|
extensions?: any;
|
|
106
127
|
extras?: any;
|
|
107
|
-
[k: string]: any;
|
|
108
|
-
}
|
|
128
|
+
// [k: string]: any;
|
|
129
|
+
};
|
|
130
|
+
|
|
109
131
|
/**
|
|
110
132
|
* The index of the node and TRS property that an animation channel targets.
|
|
111
133
|
*/
|
|
112
|
-
export
|
|
134
|
+
export type AnimationChannelTarget = {
|
|
135
|
+
id: string;
|
|
136
|
+
|
|
137
|
+
// GLTF attributes (possibly overridden)
|
|
113
138
|
/**
|
|
114
139
|
* The index of the node to target.
|
|
115
140
|
*/
|
|
@@ -120,12 +145,16 @@ export interface AnimationChannelTarget {
|
|
|
120
145
|
path: 'translation' | 'rotation' | 'scale' | 'weights' | string;
|
|
121
146
|
extensions?: any;
|
|
122
147
|
extras?: any;
|
|
123
|
-
[k: string]: any;
|
|
124
|
-
}
|
|
148
|
+
// [k: string]: any;
|
|
149
|
+
};
|
|
150
|
+
|
|
125
151
|
/**
|
|
126
152
|
* Targets an animation's sampler at a node's property.
|
|
127
153
|
*/
|
|
128
|
-
export
|
|
154
|
+
export type AnimationChannel = {
|
|
155
|
+
id: string;
|
|
156
|
+
|
|
157
|
+
// GLTF attributes (possibly overridden)
|
|
129
158
|
/**
|
|
130
159
|
* The index of a sampler in this animation used to compute the value for the target.
|
|
131
160
|
*/
|
|
@@ -136,12 +165,16 @@ export interface AnimationChannel {
|
|
|
136
165
|
target: AnimationChannelTarget;
|
|
137
166
|
extensions?: any;
|
|
138
167
|
extras?: any;
|
|
139
|
-
[k: string]: any;
|
|
140
|
-
}
|
|
168
|
+
// [k: string]: any;
|
|
169
|
+
};
|
|
170
|
+
|
|
141
171
|
/**
|
|
142
172
|
* Combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
|
|
143
173
|
*/
|
|
144
|
-
export
|
|
174
|
+
export type AnimationSampler = {
|
|
175
|
+
id: string;
|
|
176
|
+
|
|
177
|
+
// GLTF attributes (possibly overridden)
|
|
145
178
|
/**
|
|
146
179
|
* The index of an accessor containing keyframe input values, e.g., time.
|
|
147
180
|
*/
|
|
@@ -156,29 +189,31 @@ export interface AnimationSampler {
|
|
|
156
189
|
output: GlTfId;
|
|
157
190
|
extensions?: any;
|
|
158
191
|
extras?: any;
|
|
159
|
-
[k: string]: any;
|
|
160
|
-
}
|
|
192
|
+
// [k: string]: any;
|
|
193
|
+
};
|
|
194
|
+
|
|
161
195
|
/**
|
|
162
196
|
* A keyframe animation.
|
|
163
197
|
*/
|
|
164
|
-
export
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
198
|
+
export type GLTFAnimationPostprocessed = {
|
|
199
|
+
id: string;
|
|
200
|
+
|
|
201
|
+
// GLTF attributes (possibly overridden)
|
|
202
|
+
/** An array of channels, each of which targets an animation's sampler at a node's property. Different channels of the same animation can't have equal targets. */
|
|
168
203
|
channels: AnimationChannel[];
|
|
169
|
-
/**
|
|
170
|
-
* An array of samplers that combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
|
|
171
|
-
*/
|
|
204
|
+
/** An array of samplers that combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target). */
|
|
172
205
|
samplers: AnimationSampler[];
|
|
173
206
|
name?: any;
|
|
174
207
|
extensions?: any;
|
|
175
208
|
extras?: any;
|
|
176
|
-
[k: string]: any;
|
|
177
|
-
}
|
|
209
|
+
// [k: string]: any;
|
|
210
|
+
};
|
|
211
|
+
|
|
178
212
|
/**
|
|
179
213
|
* Metadata about the glTF asset.
|
|
180
214
|
*/
|
|
181
|
-
export
|
|
215
|
+
export type Asset = {
|
|
216
|
+
// GLTF attributes (possibly overridden)
|
|
182
217
|
/**
|
|
183
218
|
* A copyright message suitable for display to credit the content creator.
|
|
184
219
|
*/
|
|
@@ -197,34 +232,41 @@ export interface Asset {
|
|
|
197
232
|
minVersion?: string;
|
|
198
233
|
extensions?: any;
|
|
199
234
|
extras?: any;
|
|
200
|
-
[k: string]: any;
|
|
201
|
-
}
|
|
235
|
+
// [k: string]: any;
|
|
236
|
+
};
|
|
237
|
+
|
|
202
238
|
/**
|
|
203
239
|
* A buffer points to binary geometry, animation, or skins.
|
|
204
240
|
*/
|
|
205
|
-
export
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
*/
|
|
241
|
+
export type GLTFBufferPostprocessed = {
|
|
242
|
+
id?: string;
|
|
243
|
+
arrayBuffer: ArrayBuffer;
|
|
244
|
+
byteOffset: number;
|
|
245
|
+
|
|
246
|
+
// GLTF attributes (possibly overridden)
|
|
247
|
+
/** The length of the buffer in bytes. */
|
|
213
248
|
byteLength: number;
|
|
249
|
+
|
|
250
|
+
/** The uri of the buffer. */
|
|
251
|
+
uri?: string;
|
|
214
252
|
name?: any;
|
|
215
253
|
extensions?: any;
|
|
216
254
|
extras?: any;
|
|
217
|
-
[k: string]: any;
|
|
218
|
-
}
|
|
255
|
+
// [k: string]: any;
|
|
256
|
+
};
|
|
257
|
+
|
|
219
258
|
/**
|
|
220
259
|
* A view into a buffer generally representing a subset of the buffer.
|
|
221
260
|
*/
|
|
222
|
-
export
|
|
261
|
+
export type GLTFBufferViewPostprocessed = {
|
|
223
262
|
id: string;
|
|
263
|
+
data: Uint8Array;
|
|
264
|
+
|
|
265
|
+
// GLTF attributes (possibly overridden)
|
|
224
266
|
/**
|
|
225
267
|
* The index of the buffer.
|
|
226
268
|
*/
|
|
227
|
-
buffer:
|
|
269
|
+
buffer: GLTFBufferPostprocessed;
|
|
228
270
|
/**
|
|
229
271
|
* The offset into the buffer in bytes.
|
|
230
272
|
*/
|
|
@@ -244,12 +286,16 @@ export interface BufferView {
|
|
|
244
286
|
name?: any;
|
|
245
287
|
extensions?: any;
|
|
246
288
|
extras?: any;
|
|
247
|
-
[k: string]: any;
|
|
248
|
-
}
|
|
289
|
+
// [k: string]: any;
|
|
290
|
+
};
|
|
291
|
+
|
|
249
292
|
/**
|
|
250
293
|
* An orthographic camera containing properties to create an orthographic projection matrix.
|
|
251
294
|
*/
|
|
252
|
-
export
|
|
295
|
+
export type CameraOrthographic = {
|
|
296
|
+
id: string;
|
|
297
|
+
|
|
298
|
+
// GLTF attributes (possibly overridden)
|
|
253
299
|
/**
|
|
254
300
|
* The floating-point horizontal magnification of the view. Must not be zero.
|
|
255
301
|
*/
|
|
@@ -268,12 +314,16 @@ export interface CameraOrthographic {
|
|
|
268
314
|
znear: number;
|
|
269
315
|
extensions?: any;
|
|
270
316
|
extras?: any;
|
|
271
|
-
[k: string]: any;
|
|
272
|
-
}
|
|
317
|
+
// [k: string]: any;
|
|
318
|
+
};
|
|
319
|
+
|
|
273
320
|
/**
|
|
274
321
|
* A perspective camera containing properties to create a perspective projection matrix.
|
|
275
322
|
*/
|
|
276
|
-
export
|
|
323
|
+
export type CameraPerspective = {
|
|
324
|
+
id: string;
|
|
325
|
+
|
|
326
|
+
// GLTF attributes (possibly overridden)
|
|
277
327
|
/**
|
|
278
328
|
* The floating-point aspect ratio of the field of view.
|
|
279
329
|
*/
|
|
@@ -292,12 +342,14 @@ export interface CameraPerspective {
|
|
|
292
342
|
znear: number;
|
|
293
343
|
extensions?: any;
|
|
294
344
|
extras?: any;
|
|
295
|
-
[k: string]: any;
|
|
296
|
-
}
|
|
345
|
+
// [k: string]: any;
|
|
346
|
+
};
|
|
347
|
+
|
|
297
348
|
/**
|
|
298
349
|
* A camera's projection. A node can reference a camera to apply a transform to place the camera in the scene.
|
|
299
350
|
*/
|
|
300
|
-
export
|
|
351
|
+
export type GLTFCameraPostprocessed = {
|
|
352
|
+
// GLTF attributes (possibly overridden)
|
|
301
353
|
/**
|
|
302
354
|
* An orthographic camera containing properties to create an orthographic projection matrix.
|
|
303
355
|
*/
|
|
@@ -313,12 +365,30 @@ export interface Camera {
|
|
|
313
365
|
name?: any;
|
|
314
366
|
extensions?: any;
|
|
315
367
|
extras?: any;
|
|
316
|
-
[k: string]: any;
|
|
317
|
-
}
|
|
368
|
+
// [k: string]: any;
|
|
369
|
+
};
|
|
370
|
+
|
|
318
371
|
/**
|
|
319
|
-
*
|
|
372
|
+
* GLTFImagePostprocessed data used to create a texture.
|
|
373
|
+
* GLTFImagePostprocessed can be referenced by URI or `bufferView` index.
|
|
374
|
+
* `mimeType` is required in the latter case.
|
|
375
|
+
* @todo GLTF image postprocessing
|
|
320
376
|
*/
|
|
321
|
-
export
|
|
377
|
+
export type GLTFImagePostprocessed = {
|
|
378
|
+
id: string;
|
|
379
|
+
// TODO - extend
|
|
380
|
+
image: {
|
|
381
|
+
data: Uint8Array;
|
|
382
|
+
compressed?: boolean;
|
|
383
|
+
height?: number;
|
|
384
|
+
width?: number;
|
|
385
|
+
components?: number;
|
|
386
|
+
mimeType?: string;
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
compressed?: boolean;
|
|
390
|
+
|
|
391
|
+
// GLTF attributes (possibly overridden)
|
|
322
392
|
/**
|
|
323
393
|
* The uri of the image.
|
|
324
394
|
*/
|
|
@@ -330,16 +400,21 @@ export interface Image {
|
|
|
330
400
|
/**
|
|
331
401
|
* The index of the bufferView that contains the image. Use this instead of the image's uri property.
|
|
332
402
|
*/
|
|
333
|
-
bufferView?:
|
|
403
|
+
bufferView?: GLTFBufferViewPostprocessed;
|
|
334
404
|
name?: any;
|
|
335
405
|
extensions?: any;
|
|
336
406
|
extras?: any;
|
|
337
|
-
[k: string]: any;
|
|
338
|
-
}
|
|
407
|
+
// [k: string]: any;
|
|
408
|
+
};
|
|
409
|
+
|
|
339
410
|
/**
|
|
340
411
|
* Reference to a texture.
|
|
341
412
|
*/
|
|
342
|
-
export
|
|
413
|
+
export type GLTFTextureInfoPostprocessed = {
|
|
414
|
+
id: string;
|
|
415
|
+
texture: GLTFTexturePostprocessed;
|
|
416
|
+
|
|
417
|
+
// GLTF attributes (possibly overridden)
|
|
343
418
|
/**
|
|
344
419
|
* The index of the texture.
|
|
345
420
|
*/
|
|
@@ -350,12 +425,16 @@ export interface TextureInfo {
|
|
|
350
425
|
texCoord?: number;
|
|
351
426
|
extensions?: any;
|
|
352
427
|
extras?: any;
|
|
353
|
-
[k: string]: any;
|
|
354
|
-
}
|
|
428
|
+
// [k: string]: any;
|
|
429
|
+
};
|
|
430
|
+
|
|
355
431
|
/**
|
|
356
432
|
* A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.
|
|
357
433
|
*/
|
|
358
|
-
export
|
|
434
|
+
export type MaterialPbrMetallicRoughnessPostprocessed = {
|
|
435
|
+
id: string;
|
|
436
|
+
|
|
437
|
+
// GLTF attributes (possibly overridden)
|
|
359
438
|
/**
|
|
360
439
|
* The material's base color factor.
|
|
361
440
|
*/
|
|
@@ -363,7 +442,7 @@ export interface MaterialPbrMetallicRoughness {
|
|
|
363
442
|
/**
|
|
364
443
|
* The base color texture.
|
|
365
444
|
*/
|
|
366
|
-
baseColorTexture?:
|
|
445
|
+
baseColorTexture?: GLTFTextureInfoPostprocessed;
|
|
367
446
|
/**
|
|
368
447
|
* The metalness of the material.
|
|
369
448
|
*/
|
|
@@ -375,12 +454,17 @@ export interface MaterialPbrMetallicRoughness {
|
|
|
375
454
|
/**
|
|
376
455
|
* The metallic-roughness texture.
|
|
377
456
|
*/
|
|
378
|
-
metallicRoughnessTexture?:
|
|
457
|
+
metallicRoughnessTexture?: GLTFTextureInfoPostprocessed;
|
|
379
458
|
extensions?: any;
|
|
380
459
|
extras?: any;
|
|
381
|
-
[k: string]: any;
|
|
382
|
-
}
|
|
383
|
-
|
|
460
|
+
// [k: string]: any;
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
export type MaterialNormalTextureInfoPostprocessed = {
|
|
464
|
+
id: string;
|
|
465
|
+
texture: GLTFTexturePostprocessed;
|
|
466
|
+
|
|
467
|
+
// GLTF attributes (possibly overridden)
|
|
384
468
|
index?: any;
|
|
385
469
|
texCoord?: any;
|
|
386
470
|
/**
|
|
@@ -389,9 +473,14 @@ export interface MaterialNormalTextureInfo {
|
|
|
389
473
|
scale?: number;
|
|
390
474
|
extensions?: any;
|
|
391
475
|
extras?: any;
|
|
392
|
-
[k: string]: any;
|
|
393
|
-
}
|
|
394
|
-
|
|
476
|
+
// [k: string]: any;
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
export type MaterialOcclusionTextureInfoPostprocessed = {
|
|
480
|
+
id: string;
|
|
481
|
+
texture: GLTFTexturePostprocessed;
|
|
482
|
+
|
|
483
|
+
// GLTF attributes (possibly overridden)
|
|
395
484
|
index?: any;
|
|
396
485
|
texCoord?: any;
|
|
397
486
|
/**
|
|
@@ -400,31 +489,35 @@ export interface MaterialOcclusionTextureInfo {
|
|
|
400
489
|
strength?: number;
|
|
401
490
|
extensions?: any;
|
|
402
491
|
extras?: any;
|
|
403
|
-
[k: string]: any;
|
|
404
|
-
}
|
|
492
|
+
// [k: string]: any;
|
|
493
|
+
};
|
|
494
|
+
|
|
405
495
|
/**
|
|
406
496
|
* The material appearance of a primitive.
|
|
407
497
|
*/
|
|
408
|
-
export
|
|
498
|
+
export type GLTFMaterialPostprocessed = {
|
|
499
|
+
id: string;
|
|
500
|
+
|
|
501
|
+
// GLTF attributes (possibly overridden)
|
|
409
502
|
name?: any;
|
|
410
503
|
extensions?: any;
|
|
411
504
|
extras?: any;
|
|
412
505
|
/**
|
|
413
506
|
* 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.
|
|
414
507
|
*/
|
|
415
|
-
pbrMetallicRoughness?:
|
|
508
|
+
pbrMetallicRoughness?: MaterialPbrMetallicRoughnessPostprocessed;
|
|
416
509
|
/**
|
|
417
510
|
* The normal map texture.
|
|
418
511
|
*/
|
|
419
|
-
normalTexture?:
|
|
512
|
+
normalTexture?: MaterialNormalTextureInfoPostprocessed;
|
|
420
513
|
/**
|
|
421
514
|
* The occlusion map texture.
|
|
422
515
|
*/
|
|
423
|
-
occlusionTexture?:
|
|
516
|
+
occlusionTexture?: MaterialOcclusionTextureInfoPostprocessed;
|
|
424
517
|
/**
|
|
425
518
|
* The emissive map texture.
|
|
426
519
|
*/
|
|
427
|
-
emissiveTexture?:
|
|
520
|
+
emissiveTexture?: GLTFTextureInfoPostprocessed;
|
|
428
521
|
/**
|
|
429
522
|
* The emissive color of the material.
|
|
430
523
|
*/
|
|
@@ -441,48 +534,50 @@ export interface Material {
|
|
|
441
534
|
* Specifies whether the material is double sided.
|
|
442
535
|
*/
|
|
443
536
|
doubleSided?: boolean;
|
|
444
|
-
[k: string]: any;
|
|
445
|
-
}
|
|
537
|
+
// [k: string]: any;
|
|
538
|
+
};
|
|
539
|
+
|
|
446
540
|
/**
|
|
447
541
|
* Geometry to be rendered with the given material.
|
|
448
542
|
*/
|
|
449
|
-
export
|
|
543
|
+
export type GLTFMeshPrimitivePostprocessed = {
|
|
544
|
+
// GLTF attributes (possibly overridden)
|
|
450
545
|
/**
|
|
451
546
|
* A dictionary object, where each key corresponds to mesh attribute semantic and each value is the index of the accessor containing attribute's data.
|
|
452
547
|
*/
|
|
453
548
|
attributes: {
|
|
454
|
-
[k: string]:
|
|
549
|
+
[k: string]: GLTFAccessorPostprocessed;
|
|
455
550
|
};
|
|
456
551
|
/**
|
|
457
552
|
* The index of the accessor that contains the indices.
|
|
458
553
|
*/
|
|
459
|
-
indices?:
|
|
554
|
+
indices?: GLTFAccessorPostprocessed;
|
|
460
555
|
/**
|
|
461
556
|
* The index of the material to apply to this primitive when rendering.
|
|
462
557
|
*/
|
|
463
|
-
material?:
|
|
558
|
+
material?: GLTFMaterialPostprocessed;
|
|
464
559
|
/**
|
|
465
560
|
* The type of primitives to render.
|
|
466
561
|
*/
|
|
467
562
|
mode?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | number;
|
|
468
|
-
/**
|
|
469
|
-
* 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.
|
|
470
|
-
*/
|
|
563
|
+
/** 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. */
|
|
471
564
|
targets?: {
|
|
472
565
|
[k: string]: GlTfId;
|
|
473
566
|
}[];
|
|
474
567
|
extensions?: any;
|
|
475
568
|
extras?: any;
|
|
476
|
-
[k: string]: any;
|
|
477
|
-
}
|
|
569
|
+
// [k: string]: any;
|
|
570
|
+
};
|
|
571
|
+
|
|
478
572
|
/**
|
|
479
573
|
* A set of primitives to be rendered. A node can contain one mesh. A node's transform places the mesh in the scene.
|
|
480
574
|
*/
|
|
481
|
-
export
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
primitives
|
|
575
|
+
export type GLTFMeshPostprocessed = {
|
|
576
|
+
id: string;
|
|
577
|
+
|
|
578
|
+
// GLTF attributes (possibly overridden)
|
|
579
|
+
/** An array of primitives, each defining geometry to be rendered with a material. */
|
|
580
|
+
primitives: GLTFMeshPrimitivePostprocessed[];
|
|
486
581
|
/**
|
|
487
582
|
* Array of weights to be applied to the Morph Targets.
|
|
488
583
|
*/
|
|
@@ -490,24 +585,28 @@ export interface Mesh {
|
|
|
490
585
|
name?: any;
|
|
491
586
|
extensions?: any;
|
|
492
587
|
extras?: any;
|
|
493
|
-
[k: string]: any;
|
|
494
|
-
}
|
|
588
|
+
// [k: string]: any;
|
|
589
|
+
};
|
|
590
|
+
|
|
495
591
|
/**
|
|
496
592
|
* A node in the node hierarchy. When the node contains `skin`, all `mesh.primitives` must contain `JOINTS_0` and `WEIGHTS_0` attributes. A node can have either a `matrix` or any combination of `translation`/`rotation`/`scale` (TRS) properties. TRS properties are converted to matrices and postmultiplied in the `T * R * S` order to compose the transformation matrix; first the scale is applied to the vertices, then the rotation, and then the translation. If none are provided, the transform is the identity. When a node is targeted for animation (referenced by an animation.channel.target), only TRS properties may be present; `matrix` will not be present.
|
|
497
593
|
*/
|
|
498
|
-
export
|
|
594
|
+
export type GLTFNodePostprocessed = {
|
|
595
|
+
id: string;
|
|
596
|
+
|
|
597
|
+
// GLTF attributes (possibly overridden)
|
|
499
598
|
/**
|
|
500
599
|
* The index of the camera referenced by this node.
|
|
501
600
|
*/
|
|
502
|
-
camera?:
|
|
601
|
+
camera?: GLTFCameraPostprocessed;
|
|
503
602
|
/**
|
|
504
603
|
* The indices of this node's children.
|
|
505
604
|
*/
|
|
506
|
-
children?:
|
|
605
|
+
children?: GLTFNodePostprocessed[];
|
|
507
606
|
/**
|
|
508
607
|
* The index of the skin referenced by this node.
|
|
509
608
|
*/
|
|
510
|
-
skin?:
|
|
609
|
+
skin?: GLTFSkinPostprocessed;
|
|
511
610
|
/**
|
|
512
611
|
* A floating-point 4x4 transformation matrix stored in column-major order.
|
|
513
612
|
*/
|
|
@@ -515,7 +614,7 @@ export interface Node {
|
|
|
515
614
|
/**
|
|
516
615
|
* The index of the mesh in this node.
|
|
517
616
|
*/
|
|
518
|
-
mesh?:
|
|
617
|
+
mesh?: GLTFMeshPostprocessed;
|
|
519
618
|
/**
|
|
520
619
|
* The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.
|
|
521
620
|
*/
|
|
@@ -535,54 +634,58 @@ export interface Node {
|
|
|
535
634
|
name?: any;
|
|
536
635
|
extensions?: any;
|
|
537
636
|
extras?: any;
|
|
538
|
-
[k: string]: any;
|
|
539
|
-
}
|
|
637
|
+
// [k: string]: any;
|
|
638
|
+
};
|
|
639
|
+
|
|
540
640
|
/**
|
|
541
|
-
*
|
|
641
|
+
* GLTFTexturePostprocessed sampler properties for filtering and wrapping modes.
|
|
542
642
|
*/
|
|
543
|
-
export
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
643
|
+
export type GLTFSamplerPostprocessed = {
|
|
644
|
+
id: string;
|
|
645
|
+
/** WebGL parameters */
|
|
646
|
+
parameters: Record<string, number>;
|
|
647
|
+
|
|
648
|
+
// GLTF attributes (possibly overridden)
|
|
649
|
+
/** Magnification filter. */
|
|
547
650
|
magFilter?: 9728 | 9729 | number;
|
|
548
|
-
/**
|
|
549
|
-
* Minification filter.
|
|
550
|
-
*/
|
|
651
|
+
/** Minification filter. */
|
|
551
652
|
minFilter?: 9728 | 9729 | 9984 | 9985 | 9986 | 9987 | number;
|
|
552
|
-
/**
|
|
553
|
-
* s wrapping mode.
|
|
554
|
-
*/
|
|
653
|
+
/** s wrapping mode. */
|
|
555
654
|
wrapS?: 33071 | 33648 | 10497 | number;
|
|
556
|
-
/**
|
|
557
|
-
* t wrapping mode.
|
|
558
|
-
*/
|
|
655
|
+
/** t wrapping mode. */
|
|
559
656
|
wrapT?: 33071 | 33648 | 10497 | number;
|
|
560
657
|
name?: any;
|
|
561
658
|
extensions?: any;
|
|
562
659
|
extras?: any;
|
|
563
|
-
[k: string]: any;
|
|
564
|
-
}
|
|
660
|
+
// [k: string]: any;
|
|
661
|
+
};
|
|
662
|
+
|
|
565
663
|
/**
|
|
566
664
|
* The root nodes of a scene.
|
|
567
665
|
*/
|
|
568
|
-
export
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
666
|
+
export type GLTFScenePostprocessed = {
|
|
667
|
+
id: string;
|
|
668
|
+
|
|
669
|
+
// GLTF attributes (possibly overridden)
|
|
670
|
+
/** The indices of each root node. */
|
|
671
|
+
nodes?: GLTFNodePostprocessed[];
|
|
573
672
|
name?: any;
|
|
574
673
|
extensions?: any;
|
|
575
674
|
extras?: any;
|
|
576
|
-
[k: string]: any;
|
|
577
|
-
}
|
|
675
|
+
// [k: string]: any;
|
|
676
|
+
};
|
|
677
|
+
|
|
578
678
|
/**
|
|
579
679
|
* Joints and matrices defining a skin.
|
|
580
680
|
*/
|
|
581
|
-
export
|
|
681
|
+
export type GLTFSkinPostprocessed = {
|
|
682
|
+
id: string;
|
|
683
|
+
|
|
684
|
+
// GLTF attributes (possibly overridden)
|
|
582
685
|
/**
|
|
583
686
|
* 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.
|
|
584
687
|
*/
|
|
585
|
-
inverseBindMatrices?:
|
|
688
|
+
inverseBindMatrices?: GLTFAccessorPostprocessed;
|
|
586
689
|
/**
|
|
587
690
|
* The index of the node used as a skeleton root. When undefined, joints transforms resolve to scene root.
|
|
588
691
|
*/
|
|
@@ -594,98 +697,72 @@ export interface Skin {
|
|
|
594
697
|
name?: any;
|
|
595
698
|
extensions?: any;
|
|
596
699
|
extras?: any;
|
|
597
|
-
[k: string]: any;
|
|
598
|
-
}
|
|
700
|
+
// [k: string]: any;
|
|
701
|
+
};
|
|
702
|
+
|
|
599
703
|
/**
|
|
600
704
|
* A texture and its sampler.
|
|
601
705
|
*/
|
|
602
|
-
export
|
|
706
|
+
export type GLTFTexturePostprocessed = {
|
|
707
|
+
id: string;
|
|
708
|
+
|
|
709
|
+
// GLTF attributes (possibly overridden)
|
|
603
710
|
/**
|
|
604
711
|
* The index of the sampler used by this texture. When undefined, a sampler with repeat wrapping and auto filtering should be used.
|
|
605
712
|
*/
|
|
606
|
-
sampler?:
|
|
713
|
+
sampler?: GLTFSamplerPostprocessed;
|
|
607
714
|
/**
|
|
608
715
|
* The index of the image used by this texture.
|
|
609
716
|
*/
|
|
610
|
-
source?:
|
|
717
|
+
source?: GLTFImagePostprocessed;
|
|
611
718
|
name?: any;
|
|
612
719
|
extensions?: any;
|
|
613
720
|
extras?: any;
|
|
614
|
-
[k: string]: any;
|
|
615
|
-
}
|
|
721
|
+
// [k: string]: any;
|
|
722
|
+
};
|
|
723
|
+
|
|
616
724
|
/**
|
|
617
725
|
* The root object for a glTF asset.
|
|
618
726
|
*/
|
|
619
|
-
export
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
/**
|
|
633
|
-
* An array of keyframe animations.
|
|
634
|
-
*/
|
|
635
|
-
animations?: Animation[];
|
|
636
|
-
/**
|
|
637
|
-
* Metadata about the glTF asset.
|
|
638
|
-
*/
|
|
727
|
+
export type GLTFPostprocessed = {
|
|
728
|
+
id: string;
|
|
729
|
+
|
|
730
|
+
// GLTF attributes (possibly overridden)
|
|
731
|
+
/** Names of glTF extensions used somewhere in this asset. */
|
|
732
|
+
extensionsUsed: string[];
|
|
733
|
+
/** Names of glTF extensions required to properly load this asset. */
|
|
734
|
+
extensionsRequired: string[];
|
|
735
|
+
/** An array of accessors. */
|
|
736
|
+
accessors: GLTFAccessorPostprocessed[];
|
|
737
|
+
/** An array of keyframe animations. */
|
|
738
|
+
animations: GLTFAnimationPostprocessed[];
|
|
739
|
+
/** Metadata about the glTF asset. */
|
|
639
740
|
asset: Asset;
|
|
640
|
-
/**
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
/**
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
/**
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
* An array of nodes.
|
|
666
|
-
*/
|
|
667
|
-
nodes?: Node[];
|
|
668
|
-
/**
|
|
669
|
-
* An array of samplers.
|
|
670
|
-
*/
|
|
671
|
-
samplers?: Sampler[];
|
|
672
|
-
/**
|
|
673
|
-
* The index of the default scene.
|
|
674
|
-
*/
|
|
675
|
-
scene?: Scene;
|
|
676
|
-
/**
|
|
677
|
-
* An array of scenes.
|
|
678
|
-
*/
|
|
679
|
-
scenes?: Scene[];
|
|
680
|
-
/**
|
|
681
|
-
* An array of skins.
|
|
682
|
-
*/
|
|
683
|
-
skins?: Skin[];
|
|
684
|
-
/**
|
|
685
|
-
* An array of textures.
|
|
686
|
-
*/
|
|
687
|
-
textures?: Texture[];
|
|
688
|
-
extensions?: any;
|
|
741
|
+
/** An array of buffers. */
|
|
742
|
+
buffers: GLTFBufferPostprocessed[];
|
|
743
|
+
/** An array of bufferViews. */
|
|
744
|
+
bufferViews: GLTFBufferViewPostprocessed[];
|
|
745
|
+
/** An array of cameras. */
|
|
746
|
+
cameras: GLTFCameraPostprocessed[];
|
|
747
|
+
/** An array of images. */
|
|
748
|
+
images: GLTFImagePostprocessed[];
|
|
749
|
+
/** An array of materials. */
|
|
750
|
+
materials: GLTFMaterialPostprocessed[];
|
|
751
|
+
/** An array of meshes. */
|
|
752
|
+
meshes: GLTFMeshPostprocessed[];
|
|
753
|
+
/** An array of nodes. */
|
|
754
|
+
nodes: GLTFNodePostprocessed[];
|
|
755
|
+
/** An array of samplers. */
|
|
756
|
+
samplers: GLTFSamplerPostprocessed[];
|
|
757
|
+
/** The index of the default scene. */
|
|
758
|
+
scene?: GLTFScenePostprocessed;
|
|
759
|
+
/** An array of scenes. */
|
|
760
|
+
scenes: GLTFScenePostprocessed[];
|
|
761
|
+
/** An array of skins. */
|
|
762
|
+
skins: GLTFSkinPostprocessed[];
|
|
763
|
+
/** An array of textures. */
|
|
764
|
+
textures: GLTFTexturePostprocessed[];
|
|
765
|
+
extensions?: Record<string, Record<string, any>>;
|
|
689
766
|
extras?: any;
|
|
690
|
-
[k: string]: any;
|
|
691
|
-
}
|
|
767
|
+
// [k: string]: any;
|
|
768
|
+
};
|