@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
|
@@ -2,7 +2,7 @@ export type GLTFId = number;
|
|
|
2
2
|
/**
|
|
3
3
|
* Indices of those attributes that deviate from their initialization value.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type GLTFAccessorSparseIndices = {
|
|
6
6
|
/**
|
|
7
7
|
* The index of the bufferView with sparse indices. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
|
|
8
8
|
*/
|
|
@@ -15,13 +15,13 @@ export interface AccessorSparseIndices {
|
|
|
15
15
|
* The indices data type.
|
|
16
16
|
*/
|
|
17
17
|
componentType: 5121 | 5123 | 5125 | number;
|
|
18
|
-
extensions?: any
|
|
18
|
+
extensions?: Record<string, any>;
|
|
19
19
|
extras?: any;
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
21
|
/**
|
|
22
22
|
* Array of size `accessor.sparse.count` times number of components storing the displaced accessor attributes pointed by `accessor.sparse.indices`.
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
24
|
+
export type GLTFAccessorSparseValues = {
|
|
25
25
|
/**
|
|
26
26
|
* The index of the bufferView with sparse values. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
|
|
27
27
|
*/
|
|
@@ -30,13 +30,13 @@ export interface AccessorSparseValues {
|
|
|
30
30
|
* The offset relative to the start of the bufferView in bytes. Must be aligned.
|
|
31
31
|
*/
|
|
32
32
|
byteOffset?: number;
|
|
33
|
-
extensions?: any
|
|
33
|
+
extensions?: Record<string, any>;
|
|
34
34
|
extras?: any;
|
|
35
|
-
}
|
|
35
|
+
};
|
|
36
36
|
/**
|
|
37
37
|
* Sparse storage of attributes that deviate from their initialization value.
|
|
38
38
|
*/
|
|
39
|
-
export
|
|
39
|
+
export type GLTFAccessorSparse = {
|
|
40
40
|
/**
|
|
41
41
|
* Number of entries stored in the sparse array.
|
|
42
42
|
*/
|
|
@@ -44,18 +44,18 @@ export interface AccessorSparse {
|
|
|
44
44
|
/**
|
|
45
45
|
* Index array of size `count` that points to those accessor attributes that deviate from their initialization value. Indices must strictly increase.
|
|
46
46
|
*/
|
|
47
|
-
indices:
|
|
47
|
+
indices: GLTFAccessorSparseIndices;
|
|
48
48
|
/**
|
|
49
49
|
* 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.
|
|
50
50
|
*/
|
|
51
|
-
values:
|
|
52
|
-
extensions?: any
|
|
51
|
+
values: GLTFAccessorSparseValues;
|
|
52
|
+
extensions?: Record<string, any>;
|
|
53
53
|
extras?: any;
|
|
54
|
-
}
|
|
54
|
+
};
|
|
55
55
|
/**
|
|
56
56
|
* 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.
|
|
57
57
|
*/
|
|
58
|
-
export
|
|
58
|
+
export type GLTFAccessor = {
|
|
59
59
|
/**
|
|
60
60
|
* The index of the bufferView.
|
|
61
61
|
*/
|
|
@@ -91,15 +91,15 @@ export interface Accessor {
|
|
|
91
91
|
/**
|
|
92
92
|
* Sparse storage of attributes that deviate from their initialization value.
|
|
93
93
|
*/
|
|
94
|
-
sparse?:
|
|
94
|
+
sparse?: GLTFAccessorSparse;
|
|
95
95
|
name?: any;
|
|
96
|
-
extensions?: any
|
|
96
|
+
extensions?: Record<string, any>;
|
|
97
97
|
extras?: any;
|
|
98
|
-
}
|
|
98
|
+
};
|
|
99
99
|
/**
|
|
100
100
|
* The index of the node and TRS property that an animation channel targets.
|
|
101
101
|
*/
|
|
102
|
-
export
|
|
102
|
+
export type GLTFAnimationChannelTarget = {
|
|
103
103
|
/**
|
|
104
104
|
* The index of the node to target.
|
|
105
105
|
*/
|
|
@@ -108,13 +108,13 @@ export interface AnimationChannelTarget {
|
|
|
108
108
|
* The name of the node's TRS property to modify, or the "weights" of the Morph Targets it instantiates. For the "translation" property, the values that are provided by the sampler are the translation along the x, y, and z axes. For the "rotation" property, the values are a quaternion in the order (x, y, z, w), where w is the scalar. For the "scale" property, the values are the scaling factors along the x, y, and z axes.
|
|
109
109
|
*/
|
|
110
110
|
path: 'translation' | 'rotation' | 'scale' | 'weights' | string;
|
|
111
|
-
extensions?: any
|
|
111
|
+
extensions?: Record<string, any>;
|
|
112
112
|
extras?: any;
|
|
113
|
-
}
|
|
113
|
+
};
|
|
114
114
|
/**
|
|
115
115
|
* Targets an animation's sampler at a node's property.
|
|
116
116
|
*/
|
|
117
|
-
export
|
|
117
|
+
export type GLTFAnimationChannel = {
|
|
118
118
|
/**
|
|
119
119
|
* The index of a sampler in this animation used to compute the value for the target.
|
|
120
120
|
*/
|
|
@@ -122,14 +122,14 @@ export interface AnimationChannel {
|
|
|
122
122
|
/**
|
|
123
123
|
* The index of the node and TRS property to target.
|
|
124
124
|
*/
|
|
125
|
-
target:
|
|
126
|
-
extensions?: any
|
|
125
|
+
target: GLTFAnimationChannelTarget;
|
|
126
|
+
extensions?: Record<string, any>;
|
|
127
127
|
extras?: any;
|
|
128
|
-
}
|
|
128
|
+
};
|
|
129
129
|
/**
|
|
130
130
|
* Combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
|
|
131
131
|
*/
|
|
132
|
-
export
|
|
132
|
+
export type GLTFAnimationSampler = {
|
|
133
133
|
/**
|
|
134
134
|
* The index of an accessor containing keyframe input values, e.g., time.
|
|
135
135
|
*/
|
|
@@ -142,29 +142,29 @@ export interface AnimationSampler {
|
|
|
142
142
|
* The index of an accessor, containing keyframe output values.
|
|
143
143
|
*/
|
|
144
144
|
output: GLTFId;
|
|
145
|
-
extensions?: any
|
|
145
|
+
extensions?: Record<string, any>;
|
|
146
146
|
extras?: any;
|
|
147
|
-
}
|
|
147
|
+
};
|
|
148
148
|
/**
|
|
149
149
|
* A keyframe animation.
|
|
150
150
|
*/
|
|
151
|
-
export
|
|
151
|
+
export type GLTFAnimation = {
|
|
152
152
|
/**
|
|
153
153
|
* 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.
|
|
154
154
|
*/
|
|
155
|
-
channels:
|
|
155
|
+
channels: GLTFAnimationChannel[];
|
|
156
156
|
/**
|
|
157
157
|
* An array of samplers that combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
|
|
158
158
|
*/
|
|
159
|
-
samplers:
|
|
159
|
+
samplers: GLTFAnimationSampler[];
|
|
160
160
|
name?: any;
|
|
161
|
-
extensions?: any
|
|
161
|
+
extensions?: Record<string, any>;
|
|
162
162
|
extras?: any;
|
|
163
|
-
}
|
|
163
|
+
};
|
|
164
164
|
/**
|
|
165
165
|
* Metadata about the glTF asset.
|
|
166
166
|
*/
|
|
167
|
-
export
|
|
167
|
+
export type GLTFAsset = {
|
|
168
168
|
/**
|
|
169
169
|
* A copyright message suitable for display to credit the content creator.
|
|
170
170
|
*/
|
|
@@ -181,13 +181,13 @@ export interface Asset {
|
|
|
181
181
|
* The minimum glTF version that this asset targets.
|
|
182
182
|
*/
|
|
183
183
|
minVersion?: string;
|
|
184
|
-
extensions?: any
|
|
184
|
+
extensions?: Record<string, any>;
|
|
185
185
|
extras?: any;
|
|
186
|
-
}
|
|
186
|
+
};
|
|
187
187
|
/**
|
|
188
188
|
* A buffer points to binary geometry, animation, or skins.
|
|
189
189
|
*/
|
|
190
|
-
export
|
|
190
|
+
export type GLTFBuffer = {
|
|
191
191
|
/**
|
|
192
192
|
* The uri of the buffer.
|
|
193
193
|
*/
|
|
@@ -197,13 +197,13 @@ export interface Buffer {
|
|
|
197
197
|
*/
|
|
198
198
|
byteLength: number;
|
|
199
199
|
name?: any;
|
|
200
|
-
extensions?: any
|
|
200
|
+
extensions?: Record<string, any>;
|
|
201
201
|
extras?: any;
|
|
202
|
-
}
|
|
202
|
+
};
|
|
203
203
|
/**
|
|
204
204
|
* A view into a buffer generally representing a subset of the buffer.
|
|
205
205
|
*/
|
|
206
|
-
export
|
|
206
|
+
export type GLTFBufferView = {
|
|
207
207
|
/**
|
|
208
208
|
* The index of the buffer.
|
|
209
209
|
*/
|
|
@@ -225,13 +225,13 @@ export interface BufferView {
|
|
|
225
225
|
*/
|
|
226
226
|
target?: 34962 | 34963 | number;
|
|
227
227
|
name?: any;
|
|
228
|
-
extensions?: any
|
|
228
|
+
extensions?: Record<string, any>;
|
|
229
229
|
extras?: any;
|
|
230
|
-
}
|
|
230
|
+
};
|
|
231
231
|
/**
|
|
232
232
|
* An orthographic camera containing properties to create an orthographic projection matrix.
|
|
233
233
|
*/
|
|
234
|
-
export
|
|
234
|
+
export type GLTFCameraOrthographic = {
|
|
235
235
|
/**
|
|
236
236
|
* The floating-point horizontal magnification of the view. Must not be zero.
|
|
237
237
|
*/
|
|
@@ -248,13 +248,13 @@ export interface CameraOrthographic {
|
|
|
248
248
|
* The floating-point distance to the near clipping plane.
|
|
249
249
|
*/
|
|
250
250
|
znear: number;
|
|
251
|
-
extensions?: any
|
|
251
|
+
extensions?: Record<string, any>;
|
|
252
252
|
extras?: any;
|
|
253
|
-
}
|
|
253
|
+
};
|
|
254
254
|
/**
|
|
255
255
|
* A perspective camera containing properties to create a perspective projection matrix.
|
|
256
256
|
*/
|
|
257
|
-
export
|
|
257
|
+
export type GLTFCameraPerspective = {
|
|
258
258
|
/**
|
|
259
259
|
* The floating-point aspect ratio of the field of view.
|
|
260
260
|
*/
|
|
@@ -271,33 +271,33 @@ export interface CameraPerspective {
|
|
|
271
271
|
* The floating-point distance to the near clipping plane.
|
|
272
272
|
*/
|
|
273
273
|
znear: number;
|
|
274
|
-
extensions?: any
|
|
274
|
+
extensions?: Record<string, any>;
|
|
275
275
|
extras?: any;
|
|
276
|
-
}
|
|
276
|
+
};
|
|
277
277
|
/**
|
|
278
278
|
* A camera's projection. A node can reference a camera to apply a transform to place the camera in the scene.
|
|
279
279
|
*/
|
|
280
|
-
export
|
|
280
|
+
export type GLTFCamera = {
|
|
281
281
|
/**
|
|
282
282
|
* An orthographic camera containing properties to create an orthographic projection matrix.
|
|
283
283
|
*/
|
|
284
|
-
orthographic?:
|
|
284
|
+
orthographic?: GLTFCameraOrthographic;
|
|
285
285
|
/**
|
|
286
286
|
* A perspective camera containing properties to create a perspective projection matrix.
|
|
287
287
|
*/
|
|
288
|
-
perspective?:
|
|
288
|
+
perspective?: GLTFCameraPerspective;
|
|
289
289
|
/**
|
|
290
290
|
* Specifies if the camera uses a perspective or orthographic projection.
|
|
291
291
|
*/
|
|
292
292
|
type: 'perspective' | 'orthographic' | string;
|
|
293
293
|
name?: any;
|
|
294
|
-
extensions?: any
|
|
294
|
+
extensions?: Record<string, any>;
|
|
295
295
|
extras?: any;
|
|
296
|
-
}
|
|
296
|
+
};
|
|
297
297
|
/**
|
|
298
298
|
* Image data used to create a texture. Image can be referenced by URI or `bufferView` index. `mimeType` is required in the latter case.
|
|
299
299
|
*/
|
|
300
|
-
export
|
|
300
|
+
export type GLTFImage = {
|
|
301
301
|
/**
|
|
302
302
|
* The uri of the image.
|
|
303
303
|
*/
|
|
@@ -311,13 +311,13 @@ export interface Image {
|
|
|
311
311
|
*/
|
|
312
312
|
bufferView?: GLTFId;
|
|
313
313
|
name?: any;
|
|
314
|
-
extensions?: any
|
|
314
|
+
extensions?: Record<string, any>;
|
|
315
315
|
extras?: any;
|
|
316
|
-
}
|
|
316
|
+
};
|
|
317
317
|
/**
|
|
318
318
|
* Reference to a texture.
|
|
319
319
|
*/
|
|
320
|
-
export
|
|
320
|
+
export type GLTFTextureInfo = {
|
|
321
321
|
/**
|
|
322
322
|
* The index of the texture.
|
|
323
323
|
*/
|
|
@@ -326,13 +326,13 @@ export interface TextureInfo {
|
|
|
326
326
|
* The set index of texture's TEXCOORD attribute used for texture coordinate mapping.
|
|
327
327
|
*/
|
|
328
328
|
texCoord?: number;
|
|
329
|
-
extensions?: any
|
|
329
|
+
extensions?: Record<string, any>;
|
|
330
330
|
extras?: any;
|
|
331
|
-
}
|
|
331
|
+
};
|
|
332
332
|
/**
|
|
333
333
|
* A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.
|
|
334
334
|
*/
|
|
335
|
-
export
|
|
335
|
+
export type GLTFMaterialPbrMetallicRoughness = {
|
|
336
336
|
/**
|
|
337
337
|
* The material's base color factor.
|
|
338
338
|
*/
|
|
@@ -340,7 +340,7 @@ export interface MaterialPbrMetallicRoughness {
|
|
|
340
340
|
/**
|
|
341
341
|
* The base color texture.
|
|
342
342
|
*/
|
|
343
|
-
baseColorTexture?:
|
|
343
|
+
baseColorTexture?: GLTFTextureInfo;
|
|
344
344
|
/**
|
|
345
345
|
* The metalness of the material.
|
|
346
346
|
*/
|
|
@@ -352,53 +352,53 @@ export interface MaterialPbrMetallicRoughness {
|
|
|
352
352
|
/**
|
|
353
353
|
* The metallic-roughness texture.
|
|
354
354
|
*/
|
|
355
|
-
metallicRoughnessTexture?:
|
|
356
|
-
extensions?: any
|
|
355
|
+
metallicRoughnessTexture?: GLTFTextureInfo;
|
|
356
|
+
extensions?: Record<string, any>;
|
|
357
357
|
extras?: any;
|
|
358
|
-
}
|
|
359
|
-
export
|
|
358
|
+
};
|
|
359
|
+
export type GLTFMaterialNormalTextureInfo = {
|
|
360
360
|
index: any;
|
|
361
361
|
texCoord?: any;
|
|
362
362
|
/**
|
|
363
363
|
* The scalar multiplier applied to each normal vector of the normal texture.
|
|
364
364
|
*/
|
|
365
365
|
scale?: number;
|
|
366
|
-
extensions?: any
|
|
366
|
+
extensions?: Record<string, any>;
|
|
367
367
|
extras?: any;
|
|
368
|
-
}
|
|
369
|
-
export
|
|
368
|
+
};
|
|
369
|
+
export type GLTFMaterialOcclusionTextureInfo = {
|
|
370
370
|
index: any;
|
|
371
371
|
texCoord?: any;
|
|
372
372
|
/**
|
|
373
373
|
* A scalar multiplier controlling the amount of occlusion applied.
|
|
374
374
|
*/
|
|
375
375
|
strength?: number;
|
|
376
|
-
extensions?: any
|
|
376
|
+
extensions?: Record<string, any>;
|
|
377
377
|
extras?: any;
|
|
378
|
-
}
|
|
378
|
+
};
|
|
379
379
|
/**
|
|
380
380
|
* The material appearance of a primitive.
|
|
381
381
|
*/
|
|
382
|
-
export
|
|
382
|
+
export type GLTFMaterial = {
|
|
383
383
|
name?: any;
|
|
384
|
-
extensions?: any
|
|
384
|
+
extensions?: Record<string, any>;
|
|
385
385
|
extras?: any;
|
|
386
386
|
/**
|
|
387
387
|
* 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.
|
|
388
388
|
*/
|
|
389
|
-
pbrMetallicRoughness?:
|
|
389
|
+
pbrMetallicRoughness?: GLTFMaterialPbrMetallicRoughness;
|
|
390
390
|
/**
|
|
391
391
|
* The normal map texture.
|
|
392
392
|
*/
|
|
393
|
-
normalTexture?:
|
|
393
|
+
normalTexture?: GLTFMaterialNormalTextureInfo;
|
|
394
394
|
/**
|
|
395
395
|
* The occlusion map texture.
|
|
396
396
|
*/
|
|
397
|
-
occlusionTexture?:
|
|
397
|
+
occlusionTexture?: GLTFMaterialOcclusionTextureInfo;
|
|
398
398
|
/**
|
|
399
399
|
* The emissive map texture.
|
|
400
400
|
*/
|
|
401
|
-
emissiveTexture?:
|
|
401
|
+
emissiveTexture?: GLTFTextureInfo;
|
|
402
402
|
/**
|
|
403
403
|
* The emissive color of the material.
|
|
404
404
|
*/
|
|
@@ -415,11 +415,11 @@ export interface Material {
|
|
|
415
415
|
* Specifies whether the material is double sided.
|
|
416
416
|
*/
|
|
417
417
|
doubleSided?: boolean;
|
|
418
|
-
}
|
|
418
|
+
};
|
|
419
419
|
/**
|
|
420
420
|
* Geometry to be rendered with the given material.
|
|
421
421
|
*/
|
|
422
|
-
export
|
|
422
|
+
export type GLTFMeshPrimitive = {
|
|
423
423
|
/**
|
|
424
424
|
* A dictionary object, where each key corresponds to mesh attribute semantic and each value is the index of the accessor containing attribute's data.
|
|
425
425
|
*/
|
|
@@ -444,30 +444,30 @@ export interface MeshPrimitive {
|
|
|
444
444
|
targets?: {
|
|
445
445
|
[k: string]: GLTFId;
|
|
446
446
|
}[];
|
|
447
|
-
extensions?: any
|
|
447
|
+
extensions?: Record<string, any>;
|
|
448
448
|
extras?: any;
|
|
449
|
-
}
|
|
449
|
+
};
|
|
450
450
|
/**
|
|
451
451
|
* A set of primitives to be rendered. A node can contain one mesh. A node's transform places the mesh in the scene.
|
|
452
452
|
*/
|
|
453
|
-
export
|
|
453
|
+
export type GLTFMesh = {
|
|
454
454
|
id?: string;
|
|
455
455
|
/**
|
|
456
456
|
* An array of primitives, each defining geometry to be rendered with a material.
|
|
457
457
|
*/
|
|
458
|
-
primitives:
|
|
458
|
+
primitives: GLTFMeshPrimitive[];
|
|
459
459
|
/**
|
|
460
460
|
* Array of weights to be applied to the Morph Targets.
|
|
461
461
|
*/
|
|
462
462
|
weights?: number[];
|
|
463
463
|
name?: any;
|
|
464
|
-
extensions?: any
|
|
464
|
+
extensions?: Record<string, any>;
|
|
465
465
|
extras?: any;
|
|
466
|
-
}
|
|
466
|
+
};
|
|
467
467
|
/**
|
|
468
468
|
* 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.
|
|
469
469
|
*/
|
|
470
|
-
export
|
|
470
|
+
export type GLTFNode = {
|
|
471
471
|
/**
|
|
472
472
|
* The index of the camera referenced by this node.
|
|
473
473
|
*/
|
|
@@ -505,13 +505,13 @@ export interface Node {
|
|
|
505
505
|
*/
|
|
506
506
|
weights?: number[];
|
|
507
507
|
name?: any;
|
|
508
|
-
extensions?: any
|
|
508
|
+
extensions?: Record<string, any>;
|
|
509
509
|
extras?: any;
|
|
510
|
-
}
|
|
510
|
+
};
|
|
511
511
|
/**
|
|
512
512
|
* Texture sampler properties for filtering and wrapping modes.
|
|
513
513
|
*/
|
|
514
|
-
export
|
|
514
|
+
export type GLTFSampler = {
|
|
515
515
|
/**
|
|
516
516
|
* Magnification filter.
|
|
517
517
|
*/
|
|
@@ -529,25 +529,26 @@ export interface Sampler {
|
|
|
529
529
|
*/
|
|
530
530
|
wrapT?: 33071 | 33648 | 10497 | number;
|
|
531
531
|
name?: any;
|
|
532
|
-
extensions?: any
|
|
532
|
+
extensions?: Record<string, any>;
|
|
533
533
|
extras?: any;
|
|
534
|
-
}
|
|
534
|
+
};
|
|
535
535
|
/**
|
|
536
536
|
* The root nodes of a scene.
|
|
537
537
|
*/
|
|
538
|
-
export
|
|
538
|
+
export type GLTFScene = {
|
|
539
539
|
/**
|
|
540
540
|
* The indices of each root node.
|
|
541
541
|
*/
|
|
542
542
|
nodes?: GLTFId[];
|
|
543
543
|
name?: any;
|
|
544
|
-
extensions?: any
|
|
544
|
+
extensions?: Record<string, any>;
|
|
545
545
|
extras?: any;
|
|
546
|
-
}
|
|
546
|
+
};
|
|
547
547
|
/**
|
|
548
548
|
* Joints and matrices defining a skin.
|
|
549
549
|
*/
|
|
550
|
-
export
|
|
550
|
+
export type GLTFSkin = {
|
|
551
|
+
id?: string;
|
|
551
552
|
/**
|
|
552
553
|
* 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.
|
|
553
554
|
*/
|
|
@@ -556,34 +557,28 @@ export interface Skin {
|
|
|
556
557
|
* The index of the node used as a skeleton root. When undefined, joints transforms resolve to scene root.
|
|
557
558
|
*/
|
|
558
559
|
skeleton?: GLTFId;
|
|
559
|
-
/**
|
|
560
|
-
* Indices of skeleton nodes, used as joints in this skin.
|
|
561
|
-
*/
|
|
560
|
+
/** Indices of skeleton nodes, used as joints in this skin. */
|
|
562
561
|
joints: GLTFId[];
|
|
563
562
|
name?: any;
|
|
564
|
-
extensions?: any
|
|
563
|
+
extensions?: Record<string, any>;
|
|
565
564
|
extras?: any;
|
|
566
|
-
}
|
|
565
|
+
};
|
|
567
566
|
/**
|
|
568
567
|
* A texture and its sampler.
|
|
569
568
|
*/
|
|
570
|
-
export
|
|
571
|
-
/**
|
|
572
|
-
* The index of the sampler used by this texture. When undefined, a sampler with repeat wrapping and auto filtering should be used.
|
|
573
|
-
*/
|
|
569
|
+
export type GLTFTexture = {
|
|
570
|
+
/** The index of the sampler used by this texture. When undefined, a sampler with repeat wrapping and auto filtering should be used. */
|
|
574
571
|
sampler?: GLTFId;
|
|
575
|
-
/**
|
|
576
|
-
* The index of the image used by this texture.
|
|
577
|
-
*/
|
|
572
|
+
/** The index of the image used by this texture. */
|
|
578
573
|
source?: GLTFId;
|
|
579
574
|
name?: any;
|
|
580
|
-
extensions?: any
|
|
575
|
+
extensions?: Record<string, any>;
|
|
581
576
|
extras?: any;
|
|
582
|
-
}
|
|
577
|
+
};
|
|
583
578
|
/**
|
|
584
579
|
* The root object for a glTF asset.
|
|
585
580
|
*/
|
|
586
|
-
export
|
|
581
|
+
export type GLTF = {
|
|
587
582
|
/**
|
|
588
583
|
* Names of glTF extensions used somewhere in this asset.
|
|
589
584
|
*/
|
|
@@ -595,47 +590,47 @@ export interface GLTF {
|
|
|
595
590
|
/**
|
|
596
591
|
* An array of accessors.
|
|
597
592
|
*/
|
|
598
|
-
accessors?:
|
|
593
|
+
accessors?: GLTFAccessor[];
|
|
599
594
|
/**
|
|
600
595
|
* An array of keyframe animations.
|
|
601
596
|
*/
|
|
602
|
-
animations?:
|
|
597
|
+
animations?: GLTFAnimation[];
|
|
603
598
|
/**
|
|
604
599
|
* Metadata about the glTF asset.
|
|
605
600
|
*/
|
|
606
|
-
asset:
|
|
601
|
+
asset: GLTFAsset;
|
|
607
602
|
/**
|
|
608
603
|
* An array of buffers.
|
|
609
604
|
*/
|
|
610
|
-
buffers?:
|
|
605
|
+
buffers?: GLTFBuffer[];
|
|
611
606
|
/**
|
|
612
607
|
* An array of bufferViews.
|
|
613
608
|
*/
|
|
614
|
-
bufferViews?:
|
|
609
|
+
bufferViews?: GLTFBufferView[];
|
|
615
610
|
/**
|
|
616
611
|
* An array of cameras.
|
|
617
612
|
*/
|
|
618
|
-
cameras?:
|
|
613
|
+
cameras?: GLTFCamera[];
|
|
619
614
|
/**
|
|
620
615
|
* An array of images.
|
|
621
616
|
*/
|
|
622
|
-
images?:
|
|
617
|
+
images?: GLTFImage[];
|
|
623
618
|
/**
|
|
624
619
|
* An array of materials.
|
|
625
620
|
*/
|
|
626
|
-
materials?:
|
|
621
|
+
materials?: GLTFMaterial[];
|
|
627
622
|
/**
|
|
628
623
|
* An array of meshes.
|
|
629
624
|
*/
|
|
630
|
-
meshes?:
|
|
625
|
+
meshes?: GLTFMesh[];
|
|
631
626
|
/**
|
|
632
627
|
* An array of nodes.
|
|
633
628
|
*/
|
|
634
|
-
nodes?:
|
|
629
|
+
nodes?: GLTFNode[];
|
|
635
630
|
/**
|
|
636
631
|
* An array of samplers.
|
|
637
632
|
*/
|
|
638
|
-
samplers?:
|
|
633
|
+
samplers?: GLTFSampler[];
|
|
639
634
|
/**
|
|
640
635
|
* The index of the default scene.
|
|
641
636
|
*/
|
|
@@ -643,19 +638,19 @@ export interface GLTF {
|
|
|
643
638
|
/**
|
|
644
639
|
* An array of scenes.
|
|
645
640
|
*/
|
|
646
|
-
scenes?:
|
|
641
|
+
scenes?: GLTFScene[];
|
|
647
642
|
/**
|
|
648
643
|
* An array of skins.
|
|
649
644
|
*/
|
|
650
|
-
skins?:
|
|
645
|
+
skins?: GLTFSkin[];
|
|
651
646
|
/**
|
|
652
647
|
* An array of textures.
|
|
653
648
|
*/
|
|
654
|
-
textures?:
|
|
655
|
-
extensions?: unknown
|
|
649
|
+
textures?: GLTFTexture[];
|
|
650
|
+
extensions?: Record<string, unknown>;
|
|
656
651
|
extras?: unknown;
|
|
657
652
|
[k: string]: unknown;
|
|
658
|
-
}
|
|
653
|
+
};
|
|
659
654
|
/**
|
|
660
655
|
* @see https://github.com/KhronosGroup/glTF/tree/master/extensions/1.0/Khronos/KHR_binary_glTF
|
|
661
656
|
* TODO - this can be used on both images and shaders
|
|
@@ -718,6 +713,23 @@ export type GLTF_MSFT_texture_dds = {
|
|
|
718
713
|
source: GLTFId;
|
|
719
714
|
extras?: any;
|
|
720
715
|
};
|
|
716
|
+
/**
|
|
717
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#gltf-extension-1
|
|
718
|
+
* @todo belom88 complete typings
|
|
719
|
+
*/
|
|
720
|
+
export type GLTF_EXT_mesh_features = {
|
|
721
|
+
featureIds: {
|
|
722
|
+
featureCount: number;
|
|
723
|
+
nullFeatureId: number;
|
|
724
|
+
label: string;
|
|
725
|
+
attribute: any;
|
|
726
|
+
texture: any;
|
|
727
|
+
propertyTable: number;
|
|
728
|
+
}[];
|
|
729
|
+
extensions?: any;
|
|
730
|
+
extras?: any;
|
|
731
|
+
[key: string]: any;
|
|
732
|
+
};
|
|
721
733
|
/**
|
|
722
734
|
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#gltf-extension-1
|
|
723
735
|
*/
|
|
@@ -736,7 +748,7 @@ export type GLTF_EXT_feature_metadata = {
|
|
|
736
748
|
featureTextures?: {
|
|
737
749
|
[key: string]: FeatureTexture;
|
|
738
750
|
};
|
|
739
|
-
extensions?: any
|
|
751
|
+
extensions?: Record<string, any>;
|
|
740
752
|
extras?: any;
|
|
741
753
|
[key: string]: any;
|
|
742
754
|
};
|
|
@@ -758,7 +770,7 @@ type ExtFeatureMetadataSchema = {
|
|
|
758
770
|
enums?: {
|
|
759
771
|
[key: string]: ExtFeatureMetadataEnum;
|
|
760
772
|
};
|
|
761
|
-
extensions?: any
|
|
773
|
+
extensions?: Record<string, any>;
|
|
762
774
|
extras?: any;
|
|
763
775
|
[key: string]: any;
|
|
764
776
|
};
|
|
@@ -774,7 +786,7 @@ export type EXT_feature_metadata_class_object = {
|
|
|
774
786
|
properties: {
|
|
775
787
|
[key: string]: ClassProperty;
|
|
776
788
|
};
|
|
777
|
-
extensions?: any
|
|
789
|
+
extensions?: Record<string, any>;
|
|
778
790
|
extras?: any;
|
|
779
791
|
[key: string]: any;
|
|
780
792
|
};
|
|
@@ -844,7 +856,7 @@ export type ClassProperty = {
|
|
|
844
856
|
* The semantic cannot be used by other properties in the class.
|
|
845
857
|
*/
|
|
846
858
|
semantic?: string;
|
|
847
|
-
extensions?: any
|
|
859
|
+
extensions?: Record<string, any>;
|
|
848
860
|
extras?: any;
|
|
849
861
|
[key: string]: any;
|
|
850
862
|
};
|
|
@@ -864,7 +876,7 @@ type ExtFeatureMetadataEnum = {
|
|
|
864
876
|
valueType?: 'INT8' | 'UINT8' | 'INT16' | 'UINT16' | 'INT32' | 'UINT32' | 'INT64' | 'UINT64';
|
|
865
877
|
/** An array of enum values. Duplicate names or duplicate integer values are not allowed. */
|
|
866
878
|
values: EnumValue[];
|
|
867
|
-
extensions?: any
|
|
879
|
+
extensions?: Record<string, any>;
|
|
868
880
|
extras?: any;
|
|
869
881
|
[key: string]: any;
|
|
870
882
|
};
|
|
@@ -878,7 +890,7 @@ type EnumValue = {
|
|
|
878
890
|
description?: string;
|
|
879
891
|
/** The integer enum value. */
|
|
880
892
|
value: number;
|
|
881
|
-
extensions?: any
|
|
893
|
+
extensions?: Record<string, any>;
|
|
882
894
|
extras?: any;
|
|
883
895
|
[key: string]: any;
|
|
884
896
|
};
|
|
@@ -899,7 +911,7 @@ export type EXT_feature_metadata_feature_table = {
|
|
|
899
911
|
properties?: {
|
|
900
912
|
[key: string]: FeatureTableProperty;
|
|
901
913
|
};
|
|
902
|
-
extensions?: any
|
|
914
|
+
extensions?: Record<string, any>;
|
|
903
915
|
extras?: any;
|
|
904
916
|
[key: string]: any;
|
|
905
917
|
};
|
|
@@ -946,7 +958,7 @@ export type FeatureTableProperty = {
|
|
|
946
958
|
* The buffer view byteOffset must be aligned to a multiple of 8 bytes in the same manner as the main bufferView.
|
|
947
959
|
*/
|
|
948
960
|
stringOffsetBufferView?: number;
|
|
949
|
-
extensions?: any
|
|
961
|
+
extensions?: Record<string, any>;
|
|
950
962
|
extras?: any;
|
|
951
963
|
[key: string]: any;
|
|
952
964
|
};
|
|
@@ -963,10 +975,12 @@ type FeatureTexture = {
|
|
|
963
975
|
properties: {
|
|
964
976
|
[key: string]: TextureAccessor;
|
|
965
977
|
};
|
|
966
|
-
extensions?: any
|
|
978
|
+
extensions?: Record<string, any>;
|
|
967
979
|
extras?: any;
|
|
968
980
|
[key: string]: any;
|
|
969
981
|
};
|
|
982
|
+
export type { FeatureTexture as EXT_feature_metadata_feature_texture };
|
|
983
|
+
export type { TextureAccessor as FeatureTextureProperty };
|
|
970
984
|
/**
|
|
971
985
|
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#texture-accessor
|
|
972
986
|
*/
|
|
@@ -974,8 +988,8 @@ type TextureAccessor = {
|
|
|
974
988
|
/** Texture channels containing property values. Channels are labeled by rgba and are swizzled with a string of 1-4 characters. */
|
|
975
989
|
channels: string;
|
|
976
990
|
/** The glTF texture and texture coordinates to use. */
|
|
977
|
-
texture:
|
|
978
|
-
extensions?: any
|
|
991
|
+
texture: GLTFTextureInfo;
|
|
992
|
+
extensions?: Record<string, any>;
|
|
979
993
|
extras?: any;
|
|
980
994
|
[key: string]: any;
|
|
981
995
|
};
|
|
@@ -990,7 +1004,7 @@ type Statistics = {
|
|
|
990
1004
|
classes?: {
|
|
991
1005
|
[key: string]: ClassStatistics;
|
|
992
1006
|
};
|
|
993
|
-
extensions?: any
|
|
1007
|
+
extensions?: Record<string, any>;
|
|
994
1008
|
extras?: any;
|
|
995
1009
|
[key: string]: any;
|
|
996
1010
|
};
|
|
@@ -1007,7 +1021,7 @@ type ClassStatistics = {
|
|
|
1007
1021
|
properties?: {
|
|
1008
1022
|
[key: string]: StatisticsClassProperty;
|
|
1009
1023
|
};
|
|
1010
|
-
extensions?: any
|
|
1024
|
+
extensions?: Record<string, any>;
|
|
1011
1025
|
extras?: any;
|
|
1012
1026
|
[key: string]: any;
|
|
1013
1027
|
};
|
|
@@ -1042,7 +1056,7 @@ type StatisticsClassProperty = {
|
|
|
1042
1056
|
occurrences: {
|
|
1043
1057
|
[key: string]: number | number[];
|
|
1044
1058
|
};
|
|
1045
|
-
extensions?: any
|
|
1059
|
+
extensions?: Record<string, any>;
|
|
1046
1060
|
extras?: any;
|
|
1047
1061
|
[key: string]: any;
|
|
1048
1062
|
};
|
|
@@ -1057,7 +1071,7 @@ export type GLTF_EXT_feature_metadata_primitive = {
|
|
|
1057
1071
|
featureIdTextures?: GLTF_EXT_feature_metadata_attribute[];
|
|
1058
1072
|
/** An array of IDs of feature textures from the root EXT_feature_metadata object. */
|
|
1059
1073
|
featureTextures?: string[];
|
|
1060
|
-
extensions?: any
|
|
1074
|
+
extensions?: Record<string, any>;
|
|
1061
1075
|
extras?: any;
|
|
1062
1076
|
[key: string]: any;
|
|
1063
1077
|
};
|
|
@@ -1069,7 +1083,7 @@ export type GLTF_EXT_feature_metadata_attribute = {
|
|
|
1069
1083
|
featureTable: string;
|
|
1070
1084
|
/** Described how feature ids are defined */
|
|
1071
1085
|
featureIds: ExtFeatureMetadataFeatureIds;
|
|
1072
|
-
extensions?: any
|
|
1086
|
+
extensions?: Record<string, any>;
|
|
1073
1087
|
extras?: any;
|
|
1074
1088
|
[key: string]: any;
|
|
1075
1089
|
};
|
|
@@ -1101,5 +1115,5 @@ type ExtFeatureMetadataTexture = {
|
|
|
1101
1115
|
/** The index of the texture. */
|
|
1102
1116
|
index: number;
|
|
1103
1117
|
};
|
|
1104
|
-
export
|
|
1118
|
+
export type GLTFObject = GLTFAccessor | GLTFBuffer | GLTFBufferView | GLTFMeshPrimitive | GLTFMesh | GLTFNode | GLTFMaterial | GLTFSampler | GLTFScene | GLTFSkin | GLTFTexture | GLTFImage;
|
|
1105
1119
|
//# sourceMappingURL=gltf-json-schema.d.ts.map
|