@loaders.gl/gltf 4.0.0-alpha.9 → 4.0.0-beta.2
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 +3777 -3105
- package/dist/es5/glb-loader.js +1 -3
- package/dist/es5/glb-loader.js.map +1 -1
- package/dist/es5/index.js +33 -0
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/lib/api/gltf-extensions.js +3 -1
- package/dist/es5/lib/api/gltf-extensions.js.map +1 -1
- package/dist/es5/lib/extensions/EXT_mesh_features.js +99 -0
- package/dist/es5/lib/extensions/EXT_mesh_features.js.map +1 -0
- package/dist/es5/lib/extensions/EXT_meshopt_compression.js +2 -2
- package/dist/es5/lib/extensions/EXT_meshopt_compression.js.map +1 -1
- package/dist/es5/lib/extensions/EXT_structural_metadata.js +375 -0
- package/dist/es5/lib/extensions/EXT_structural_metadata.js.map +1 -0
- package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js +6 -7
- package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js.map +1 -1
- package/dist/es5/lib/extensions/KHR_texture_transform.js +2 -1
- package/dist/es5/lib/extensions/KHR_texture_transform.js.map +1 -1
- package/dist/es5/lib/extensions/deprecated/EXT_feature_metadata.js +162 -183
- package/dist/es5/lib/extensions/deprecated/EXT_feature_metadata.js.map +1 -1
- package/dist/es5/lib/extensions/utils/3d-tiles-utils.js +254 -0
- package/dist/es5/lib/extensions/utils/3d-tiles-utils.js.map +1 -0
- package/dist/es5/lib/gltf-utils/gltf-utils.js +29 -0
- package/dist/es5/lib/gltf-utils/gltf-utils.js.map +1 -1
- package/dist/es5/lib/parsers/parse-gltf.js +7 -4
- package/dist/es5/lib/parsers/parse-gltf.js.map +1 -1
- package/dist/es5/lib/types/gltf-ext-feature-metadata-schema.js +2 -0
- package/dist/es5/lib/types/gltf-ext-feature-metadata-schema.js.map +1 -0
- package/dist/es5/lib/types/gltf-ext-mesh-features-schema.js +2 -0
- package/dist/es5/lib/types/gltf-ext-mesh-features-schema.js.map +1 -0
- package/dist/es5/lib/types/gltf-ext-structural-metadata-schema.js +2 -0
- package/dist/es5/lib/types/gltf-ext-structural-metadata-schema.js.map +1 -0
- package/dist/es5/lib/types/gltf-json-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/es5/lib/utils/version.js.map +1 -1
- package/dist/esm/glb-loader.js +0 -1
- package/dist/esm/glb-loader.js.map +1 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/api/gltf-extensions.js +3 -1
- package/dist/esm/lib/api/gltf-extensions.js.map +1 -1
- package/dist/esm/lib/extensions/EXT_mesh_features.js +43 -0
- package/dist/esm/lib/extensions/EXT_mesh_features.js.map +1 -0
- package/dist/esm/lib/extensions/EXT_meshopt_compression.js +2 -2
- package/dist/esm/lib/extensions/EXT_meshopt_compression.js.map +1 -1
- package/dist/esm/lib/extensions/EXT_structural_metadata.js +302 -0
- package/dist/esm/lib/extensions/EXT_structural_metadata.js.map +1 -0
- package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js +2 -5
- package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js.map +1 -1
- package/dist/esm/lib/extensions/KHR_texture_transform.js +2 -1
- package/dist/esm/lib/extensions/KHR_texture_transform.js.map +1 -1
- package/dist/esm/lib/extensions/deprecated/EXT_feature_metadata.js +156 -167
- package/dist/esm/lib/extensions/deprecated/EXT_feature_metadata.js.map +1 -1
- package/dist/esm/lib/extensions/utils/3d-tiles-utils.js +215 -0
- package/dist/esm/lib/extensions/utils/3d-tiles-utils.js.map +1 -0
- package/dist/esm/lib/gltf-utils/gltf-utils.js +30 -0
- package/dist/esm/lib/gltf-utils/gltf-utils.js.map +1 -1
- package/dist/esm/lib/parsers/parse-gltf.js +6 -6
- package/dist/esm/lib/parsers/parse-gltf.js.map +1 -1
- package/dist/esm/lib/types/gltf-ext-feature-metadata-schema.js +2 -0
- package/dist/esm/lib/types/gltf-ext-feature-metadata-schema.js.map +1 -0
- package/dist/esm/lib/types/gltf-ext-mesh-features-schema.js +2 -0
- package/dist/esm/lib/types/gltf-ext-mesh-features-schema.js.map +1 -0
- package/dist/esm/lib/types/gltf-ext-structural-metadata-schema.js +2 -0
- package/dist/esm/lib/types/gltf-ext-structural-metadata-schema.js.map +1 -0
- package/dist/esm/lib/types/gltf-json-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/esm/lib/utils/version.js.map +1 -1
- package/dist/glb-loader.d.ts +3 -1
- package/dist/glb-loader.d.ts.map +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/lib/api/gltf-extensions.d.ts.map +1 -1
- package/dist/lib/extensions/EXT_mesh_features.d.ts +7 -0
- package/dist/lib/extensions/EXT_mesh_features.d.ts.map +1 -0
- package/dist/lib/extensions/EXT_structural_metadata.d.ts +16 -0
- package/dist/lib/extensions/EXT_structural_metadata.d.ts.map +1 -0
- 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/deprecated/EXT_feature_metadata.d.ts +9 -0
- package/dist/lib/extensions/deprecated/EXT_feature_metadata.d.ts.map +1 -1
- package/dist/lib/extensions/utils/3d-tiles-utils.d.ts +82 -0
- package/dist/lib/extensions/utils/3d-tiles-utils.d.ts.map +1 -0
- package/dist/lib/gltf-utils/gltf-utils.d.ts +2 -0
- package/dist/lib/gltf-utils/gltf-utils.d.ts.map +1 -1
- package/dist/lib/parsers/parse-gltf.d.ts.map +1 -1
- package/dist/lib/types/gltf-ext-feature-metadata-schema.d.ts +421 -0
- package/dist/lib/types/gltf-ext-feature-metadata-schema.d.ts.map +1 -0
- package/dist/lib/types/gltf-ext-mesh-features-schema.d.ts +43 -0
- package/dist/lib/types/gltf-ext-mesh-features-schema.d.ts.map +1 -0
- package/dist/lib/types/gltf-ext-structural-metadata-schema.d.ts +329 -0
- package/dist/lib/types/gltf-ext-structural-metadata-schema.d.ts.map +1 -0
- package/dist/lib/types/gltf-json-schema.d.ts +12 -404
- package/dist/lib/types/gltf-json-schema.d.ts.map +1 -1
- package/dist/lib/types/gltf-types.d.ts +4 -1
- 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/index.ts +37 -6
- package/src/lib/api/gltf-extensions.ts +6 -2
- package/src/lib/extensions/EXT_mesh_features.ts +91 -0
- package/src/lib/extensions/EXT_meshopt_compression.ts +1 -1
- package/src/lib/extensions/EXT_structural_metadata.ts +750 -0
- package/src/lib/extensions/KHR_draco_mesh_compression.ts +7 -7
- package/src/lib/extensions/KHR_texture_transform.ts +1 -1
- package/src/lib/extensions/deprecated/EXT_feature_metadata.ts +407 -281
- package/src/lib/extensions/utils/3d-tiles-utils.ts +430 -0
- package/src/lib/gltf-utils/gltf-utils.ts +38 -0
- package/src/lib/parsers/parse-gltf.ts +14 -6
- package/src/lib/types/gltf-ext-feature-metadata-schema.ts +470 -0
- package/src/lib/types/gltf-ext-mesh-features-schema.ts +46 -0
- package/src/lib/types/gltf-ext-structural-metadata-schema.ts +378 -0
- package/src/lib/types/gltf-json-schema.ts +26 -465
- package/src/lib/types/gltf-types.ts +5 -3
- package/dist/bundle.js +0 -5
- package/dist/glb-loader.js +0 -36
- package/dist/glb-writer.js +0 -35
- package/dist/gltf-loader.js +0 -50
- package/dist/gltf-writer.js +0 -32
- package/dist/index.js +0 -28
- package/dist/lib/api/gltf-extensions.js +0 -83
- package/dist/lib/api/gltf-scenegraph.js +0 -580
- package/dist/lib/api/normalize-gltf-v1.js +0 -299
- package/dist/lib/api/post-process-gltf.js +0 -433
- package/dist/lib/encoders/encode-glb.js +0 -72
- package/dist/lib/encoders/encode-gltf.js +0 -32
- package/dist/lib/extensions/EXT_meshopt_compression.js +0 -41
- package/dist/lib/extensions/EXT_texture_webp.js +0 -36
- package/dist/lib/extensions/KHR_binary_gltf.js +0 -39
- package/dist/lib/extensions/KHR_draco_mesh_compression.js +0 -138
- package/dist/lib/extensions/KHR_texture_basisu.js +0 -29
- package/dist/lib/extensions/KHR_texture_transform.js +0 -227
- package/dist/lib/extensions/deprecated/EXT_feature_metadata.js +0 -290
- package/dist/lib/extensions/deprecated/KHR_lights_punctual.js +0 -59
- package/dist/lib/extensions/deprecated/KHR_materials_unlit.js +0 -44
- package/dist/lib/extensions/deprecated/KHR_techniques_webgl.js +0 -79
- package/dist/lib/gltf-utils/get-typed-array.js +0 -41
- package/dist/lib/gltf-utils/gltf-attribute-utils.js +0 -73
- package/dist/lib/gltf-utils/gltf-constants.js +0 -43
- package/dist/lib/gltf-utils/gltf-utils.js +0 -90
- package/dist/lib/gltf-utils/resolve-url.js +0 -18
- package/dist/lib/parsers/parse-glb.js +0 -166
- package/dist/lib/parsers/parse-gltf.js +0 -179
- package/dist/lib/types/glb-types.js +0 -2
- package/dist/lib/types/gltf-json-schema.js +0 -4
- package/dist/lib/types/gltf-postprocessed-schema.js +0 -4
- package/dist/lib/types/gltf-types.js +0 -3
- package/dist/lib/utils/assert.js +0 -12
- package/dist/lib/utils/version.js +0 -7
- package/dist/meshopt/meshopt-decoder.js +0 -118
- package/dist/webp/webp.js +0 -38
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { GLTFTextureInfo } from './gltf-json-schema';
|
|
2
|
+
/**
|
|
3
|
+
* EXT_feature_metadata extension types
|
|
4
|
+
* This extension has glTF-level metadata and primitive-level feature indexing and segmentation metadata
|
|
5
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata
|
|
6
|
+
*
|
|
7
|
+
* glTF-level metadata
|
|
8
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#gltf-extension-1
|
|
9
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata/schema/glTF.EXT_feature_metadata.schema.json
|
|
10
|
+
*/
|
|
11
|
+
export type GLTF_EXT_feature_metadata_GLTF = {
|
|
12
|
+
/** An object defining classes and enums. */
|
|
13
|
+
schema?: GLTF_EXT_feature_metadata_Schema;
|
|
14
|
+
/** A uri to an external schema file. */
|
|
15
|
+
schemaUri?: string;
|
|
16
|
+
/** An object containing statistics about features. */
|
|
17
|
+
statistics?: GLTF_EXT_feature_metadata_Statistics;
|
|
18
|
+
/** A dictionary, where each key is a feature table ID and each value is an object defining the feature table. */
|
|
19
|
+
featureTables?: {
|
|
20
|
+
[key: string]: GLTF_EXT_feature_metadata_FeatureTable;
|
|
21
|
+
};
|
|
22
|
+
/** A dictionary, where each key is a feature texture ID and each value is an object defining the feature texture. */
|
|
23
|
+
featureTextures?: {
|
|
24
|
+
[key: string]: GLTF_EXT_feature_metadata_FeatureTexture;
|
|
25
|
+
};
|
|
26
|
+
extensions?: Record<string, unknown>;
|
|
27
|
+
extras?: unknown;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* An object defining classes and enums.
|
|
31
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#schema
|
|
32
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/schema.schema.json
|
|
33
|
+
*/
|
|
34
|
+
export type GLTF_EXT_feature_metadata_Schema = {
|
|
35
|
+
/** The name of the schema. */
|
|
36
|
+
name?: string;
|
|
37
|
+
/** The description of the schema. */
|
|
38
|
+
description?: string;
|
|
39
|
+
/** Application-specific version of the schema. */
|
|
40
|
+
version?: string;
|
|
41
|
+
/** A dictionary, where each key is a class ID and each value is an object defining the class. */
|
|
42
|
+
classes?: {
|
|
43
|
+
[key: string]: GLTF_EXT_feature_metadata_Class;
|
|
44
|
+
};
|
|
45
|
+
/** A dictionary, where each key is an enum ID and each value is an object defining the values for the enum. */
|
|
46
|
+
enums?: {
|
|
47
|
+
[key: string]: GLTF_EXT_feature_metadata_Enum;
|
|
48
|
+
};
|
|
49
|
+
extensions?: Record<string, unknown>;
|
|
50
|
+
extras?: unknown;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* A class containing a set of properties.
|
|
54
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class
|
|
55
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/class.schema.json
|
|
56
|
+
*/
|
|
57
|
+
export type GLTF_EXT_feature_metadata_Class = {
|
|
58
|
+
/** The name of the class, e.g. for display purposes. */
|
|
59
|
+
name?: string;
|
|
60
|
+
/** The description of the class. */
|
|
61
|
+
description?: string;
|
|
62
|
+
/** A dictionary, where each key is a property ID and each value is an object defining the property. */
|
|
63
|
+
properties: {
|
|
64
|
+
[key: string]: GLTF_EXT_feature_metadata_ClassProperty;
|
|
65
|
+
};
|
|
66
|
+
extensions?: Record<string, unknown>;
|
|
67
|
+
extras?: unknown;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* A class property.
|
|
71
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class-property
|
|
72
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/class.property.schema.json
|
|
73
|
+
*/
|
|
74
|
+
export type GLTF_EXT_feature_metadata_ClassProperty = {
|
|
75
|
+
/** The name of the property, e.g. for display purposes. */
|
|
76
|
+
name?: string;
|
|
77
|
+
/** The description of the property. */
|
|
78
|
+
description?: string;
|
|
79
|
+
/**
|
|
80
|
+
* The property type. If ENUM is used, then enumType must also be specified.
|
|
81
|
+
* If ARRAY is used, then componentType must also be specified.
|
|
82
|
+
* ARRAY is a fixed-length array when componentCount is defined, and variable-length otherwise.
|
|
83
|
+
*/
|
|
84
|
+
type: 'INT8' | 'UINT8' | 'INT16' | 'UINT16' | 'INT32' | 'UINT32' | 'INT64' | 'UINT64' | 'FLOAT32' | 'FLOAT64' | 'BOOLEAN' | 'STRING' | 'ENUM' | 'ARRAY' | string;
|
|
85
|
+
/**
|
|
86
|
+
* An enum ID as declared in the enums dictionary.
|
|
87
|
+
* This value must be specified when type or componentType is ENUM.
|
|
88
|
+
*/
|
|
89
|
+
enumType?: string;
|
|
90
|
+
/**
|
|
91
|
+
* When type is ARRAY this indicates the type of each component of the array.
|
|
92
|
+
* If ENUM is used, then enumType must also be specified.
|
|
93
|
+
*/
|
|
94
|
+
componentType?: 'INT8' | 'UINT8' | 'INT16' | 'UINT16' | 'INT32' | 'UINT32' | 'INT64' | 'UINT64' | 'FLOAT32' | 'FLOAT64' | 'BOOLEAN' | 'STRING' | 'ENUM' | string;
|
|
95
|
+
/** The number of components per element for ARRAY elements. */
|
|
96
|
+
componentCount?: number;
|
|
97
|
+
/**
|
|
98
|
+
* Specifies whether integer values are normalized.
|
|
99
|
+
* This applies both when type is an integer type, or when type is ARRAY with a componentType that is an integer type.
|
|
100
|
+
* For unsigned integer types, values are normalized between [0.0, 1.0].
|
|
101
|
+
* For signed integer types, values are normalized between [-1.0, 1.0].
|
|
102
|
+
* For all other types, this property is ignored.
|
|
103
|
+
*/
|
|
104
|
+
normalized: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Maximum allowed values for property values.
|
|
107
|
+
* Only applicable for numeric types and fixed-length arrays of numeric types.
|
|
108
|
+
* For numeric types this is a single number.
|
|
109
|
+
* For fixed-length arrays this is an array with componentCount number of elements.
|
|
110
|
+
* The normalized property has no effect on these values: they always correspond to the integer values.
|
|
111
|
+
*/
|
|
112
|
+
max?: number | number[];
|
|
113
|
+
/**
|
|
114
|
+
* Minimum allowed values for property values.
|
|
115
|
+
* Only applicable for numeric types and fixed-length arrays of numeric types.
|
|
116
|
+
* For numeric types this is a single number.
|
|
117
|
+
* For fixed-length arrays this is an array with componentCount number of elements.
|
|
118
|
+
* The normalized property has no effect on these values: they always correspond to the integer values.
|
|
119
|
+
*/
|
|
120
|
+
min?: number | number[];
|
|
121
|
+
/**
|
|
122
|
+
* A default value to use when the property value is not defined.
|
|
123
|
+
* If used, optional must be set to true.
|
|
124
|
+
* The type of the default value must match the property definition: For BOOLEAN use true or false.
|
|
125
|
+
* For STRING use a JSON string. For a numeric type use a JSON number.
|
|
126
|
+
* For ENUM use the enum name, not the integer value.
|
|
127
|
+
* For ARRAY use a JSON array containing values matching the componentType.
|
|
128
|
+
*/
|
|
129
|
+
default?: boolean | number | string | number[];
|
|
130
|
+
/** If true, this property is optional. */
|
|
131
|
+
optional?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* An identifier that describes how this property should be interpreted.
|
|
134
|
+
* The semantic cannot be used by other properties in the class.
|
|
135
|
+
*/
|
|
136
|
+
semantic?: string;
|
|
137
|
+
extensions?: Record<string, unknown>;
|
|
138
|
+
extras?: unknown;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* An object defining the values of an enum.
|
|
142
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#enum
|
|
143
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata/schema/enum.schema.json
|
|
144
|
+
*/
|
|
145
|
+
export type GLTF_EXT_feature_metadata_Enum = {
|
|
146
|
+
/** The name of the enum, e.g. for display purposes. */
|
|
147
|
+
name?: string;
|
|
148
|
+
/** The description of the enum. */
|
|
149
|
+
description?: string;
|
|
150
|
+
/** The type of the integer enum value. */
|
|
151
|
+
valueType?: 'INT8' | 'UINT8' | 'INT16' | 'UINT16' | 'INT32' | 'UINT32' | 'INT64' | 'UINT64';
|
|
152
|
+
/** An array of enum values. Duplicate names or duplicate integer values are not allowed. */
|
|
153
|
+
values: GLTF_EXT_feature_metadata_EnumValue[];
|
|
154
|
+
extensions?: Record<string, unknown>;
|
|
155
|
+
extras?: unknown;
|
|
156
|
+
[key: string]: unknown;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* An enum value.
|
|
160
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#enum-value
|
|
161
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata/schema/enum.value.schema.json
|
|
162
|
+
*/
|
|
163
|
+
export type GLTF_EXT_feature_metadata_EnumValue = {
|
|
164
|
+
/** The name of the enum value. */
|
|
165
|
+
name: string;
|
|
166
|
+
/** The description of the enum value. */
|
|
167
|
+
description?: string;
|
|
168
|
+
/** The integer enum value. */
|
|
169
|
+
value: number;
|
|
170
|
+
extensions?: Record<string, unknown>;
|
|
171
|
+
extras?: unknown;
|
|
172
|
+
[key: string]: unknown;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* A feature table defined by a class and property values stored in arrays.
|
|
176
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-table
|
|
177
|
+
* JSON Schenma - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/featureTable.schema.json
|
|
178
|
+
*/
|
|
179
|
+
export type GLTF_EXT_feature_metadata_FeatureTable = {
|
|
180
|
+
/** The class that property values conform to. The value must be a class ID declared in the classes dictionary. */
|
|
181
|
+
class?: string;
|
|
182
|
+
/** The number of features, as well as the number of elements in each property array. */
|
|
183
|
+
count: number;
|
|
184
|
+
/**
|
|
185
|
+
* A dictionary, where each key corresponds to a property ID in the class properties dictionary
|
|
186
|
+
* and each value is an object describing where property values are stored.
|
|
187
|
+
* Optional properties may be excluded from this dictionary.
|
|
188
|
+
*/
|
|
189
|
+
properties?: {
|
|
190
|
+
[key: string]: GLTF_EXT_feature_metadata_FeatureTableProperty;
|
|
191
|
+
};
|
|
192
|
+
extensions?: Record<string, unknown>;
|
|
193
|
+
extras?: unknown;
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* An array of binary property values.
|
|
197
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-table-property
|
|
198
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/featureTable.property.schema.json
|
|
199
|
+
*/
|
|
200
|
+
export type GLTF_EXT_feature_metadata_FeatureTableProperty = {
|
|
201
|
+
/**
|
|
202
|
+
* The index of the buffer view containing property values.
|
|
203
|
+
* The data type of property values is determined by the property definition:
|
|
204
|
+
* When type is BOOLEAN values are packed into a bitfield.
|
|
205
|
+
* When type is STRING values are stored as byte sequences and decoded as UTF-8 strings.
|
|
206
|
+
* When type is a numeric type values are stored as the provided type.
|
|
207
|
+
* When type is ENUM values are stored as the enum's valueType.
|
|
208
|
+
* Each enum value in the buffer must match one of the allowed values in the enum definition.
|
|
209
|
+
* When type is ARRAY elements are packed tightly together and the data type is based on the componentType following the same rules as above.
|
|
210
|
+
* arrayOffsetBufferView is required for variable-size arrays
|
|
211
|
+
* and stringOffsetBufferView is required for strings (for variable-length arrays of strings, both are required)
|
|
212
|
+
* The buffer view byteOffset must be aligned to a multiple of 8 bytes.
|
|
213
|
+
* If the buffer view's buffer is the GLB-stored BIN chunk the byte offset is measured relative to the beginning of the GLB.
|
|
214
|
+
* Otherwise it is measured relative to the beginning of the buffer.
|
|
215
|
+
*/
|
|
216
|
+
bufferView: number;
|
|
217
|
+
/** The type of values in arrayOffsetBufferView and stringOffsetBufferView. */
|
|
218
|
+
offsetType?: 'UINT8' | 'UINT16' | 'UINT32' | 'UINT64' | string;
|
|
219
|
+
/**
|
|
220
|
+
* The index of the buffer view containing offsets for variable-length arrays.
|
|
221
|
+
* The number of offsets is equal to the feature table count plus one.
|
|
222
|
+
* The offsets represent the start positions of each array, with the last offset representing the position after the last array.
|
|
223
|
+
* The array length is computed using the difference between the current offset and the subsequent offset.
|
|
224
|
+
* If componentType is STRING the offsets index into the string offsets array (stored in stringOffsetBufferView),
|
|
225
|
+
* otherwise they index into the property array (stored in bufferView).
|
|
226
|
+
* The data type of these offsets is determined by offsetType.
|
|
227
|
+
* The buffer view byteOffset must be aligned to a multiple of 8 bytes in the same manner as the main bufferView
|
|
228
|
+
*/
|
|
229
|
+
arrayOffsetBufferView?: number;
|
|
230
|
+
/**
|
|
231
|
+
* The index of the buffer view containing offsets for strings.
|
|
232
|
+
* The number of offsets is equal to the number of string components plus one.
|
|
233
|
+
* The offsets represent the byte offsets of each string in the main bufferView,
|
|
234
|
+
* with the last offset representing the byte offset after the last string.
|
|
235
|
+
* The string byte length is computed using the difference between the current offset and the subsequent offset.
|
|
236
|
+
* The data type of these offsets is determined by offsetType.
|
|
237
|
+
* The buffer view byteOffset must be aligned to a multiple of 8 bytes in the same manner as the main bufferView.
|
|
238
|
+
*/
|
|
239
|
+
stringOffsetBufferView?: number;
|
|
240
|
+
extensions?: Record<string, unknown>;
|
|
241
|
+
extras?: unknown;
|
|
242
|
+
/** This is not part of the spec. GLTFLoader loads feature tables data into this property */
|
|
243
|
+
data: unknown;
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* Features whose property values are stored directly in texture channels. This is not to be confused with feature ID textures which store feature IDs for use with a feature table.
|
|
247
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-texture
|
|
248
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/featureTexture.schema.json
|
|
249
|
+
*/
|
|
250
|
+
export type GLTF_EXT_feature_metadata_FeatureTexture = {
|
|
251
|
+
/** The class this feature texture conforms to. The value must be a class ID declared in the classes dictionary. */
|
|
252
|
+
class: string;
|
|
253
|
+
/**
|
|
254
|
+
* A dictionary, where each key corresponds to a property ID in the class properties dictionary
|
|
255
|
+
* and each value describes the texture channels containing property values.
|
|
256
|
+
*/
|
|
257
|
+
properties: {
|
|
258
|
+
[key: string]: GLTF_EXT_feature_metadata_TextureAccessor;
|
|
259
|
+
};
|
|
260
|
+
extensions?: Record<string, unknown>;
|
|
261
|
+
extras?: unknown;
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* A description of how to access property values from the color channels of a texture.
|
|
265
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#texture-accessor
|
|
266
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/textureAccessor.schema.json
|
|
267
|
+
*/
|
|
268
|
+
export type GLTF_EXT_feature_metadata_TextureAccessor = {
|
|
269
|
+
/** Texture channels containing property values. Channels are labeled by rgba and are swizzled with a string of 1-4 characters. */
|
|
270
|
+
channels: string;
|
|
271
|
+
/** The glTF texture and texture coordinates to use. */
|
|
272
|
+
texture: GLTFTextureInfo;
|
|
273
|
+
extensions?: Record<string, unknown>;
|
|
274
|
+
extras?: unknown;
|
|
275
|
+
/** This is not part of the spec. GLTFLoader loads feature tables data into this property */
|
|
276
|
+
data: unknown;
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* Statistics about features.
|
|
280
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#statistics-1
|
|
281
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/statistics.schema.json
|
|
282
|
+
*/
|
|
283
|
+
export type GLTF_EXT_feature_metadata_Statistics = {
|
|
284
|
+
/**
|
|
285
|
+
* A dictionary, where each key is a class ID declared in the classes dictionary
|
|
286
|
+
* and each value is an object containing statistics about features that conform to the class.
|
|
287
|
+
*/
|
|
288
|
+
classes?: {
|
|
289
|
+
[key: string]: GLTF_EXT_feature_metadata_StatisticsClass;
|
|
290
|
+
};
|
|
291
|
+
extensions?: Record<string, unknown>;
|
|
292
|
+
extras?: unknown;
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* Statistics about features that conform to the class.
|
|
296
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class-statistics
|
|
297
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/statistics.class.property.schema.json
|
|
298
|
+
*/
|
|
299
|
+
export type GLTF_EXT_feature_metadata_StatisticsClass = {
|
|
300
|
+
/** The number of features that conform to the class. */
|
|
301
|
+
count?: number;
|
|
302
|
+
/**
|
|
303
|
+
* A dictionary, where each key is a class ID declared in the classes dictionary
|
|
304
|
+
* and each value is an object containing statistics about property values.
|
|
305
|
+
*/
|
|
306
|
+
properties?: {
|
|
307
|
+
[key: string]: GLTF_EXT_feature_metadata_StatisticsClassProperty;
|
|
308
|
+
};
|
|
309
|
+
extensions?: Record<string, unknown>;
|
|
310
|
+
extras?: unknown;
|
|
311
|
+
};
|
|
312
|
+
/**
|
|
313
|
+
* min, max, mean, median, standardDeviation, variance, sum are
|
|
314
|
+
* only applicable for numeric types and fixed-length arrays of numeric types.
|
|
315
|
+
* For numeric types this is a single number.
|
|
316
|
+
* For fixed-length arrays this is an array with componentCount number of elements.
|
|
317
|
+
* The normalized property has no effect on these values.
|
|
318
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#property-statistics
|
|
319
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/statistics.class.property.schema.json
|
|
320
|
+
*/
|
|
321
|
+
export type GLTF_EXT_feature_metadata_StatisticsClassProperty = {
|
|
322
|
+
/** The minimum property value. */
|
|
323
|
+
min?: number | number[];
|
|
324
|
+
/** The maximum property value. */
|
|
325
|
+
max?: number | number[];
|
|
326
|
+
/** The arithmetic mean of the property values. */
|
|
327
|
+
mean?: number | number[];
|
|
328
|
+
/** The median of the property values. */
|
|
329
|
+
median?: number | number[];
|
|
330
|
+
/** The standard deviation of the property values. */
|
|
331
|
+
standardDeviation?: number | number[];
|
|
332
|
+
/** The variance of the property values. */
|
|
333
|
+
variance?: number | number[];
|
|
334
|
+
/** The sum of the property values. */
|
|
335
|
+
sum?: number | number[];
|
|
336
|
+
/**
|
|
337
|
+
* A dictionary, where each key corresponds to an enum name and each value is the number of occurrences of that enum.
|
|
338
|
+
* Only applicable when type or componentType is ENUM.
|
|
339
|
+
* For fixed-length arrays, this is an array with componentCount number of elements.
|
|
340
|
+
*/
|
|
341
|
+
occurrences: {
|
|
342
|
+
[key: string]: number | number[];
|
|
343
|
+
};
|
|
344
|
+
extensions?: Record<string, unknown>;
|
|
345
|
+
extras?: unknown;
|
|
346
|
+
};
|
|
347
|
+
/**
|
|
348
|
+
* EXT_feature_metadata extension types
|
|
349
|
+
* This extension has glTF-level metadata and primitive-level (feature indexing and segmentation) metadata
|
|
350
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata
|
|
351
|
+
*
|
|
352
|
+
* primitive-level metadata
|
|
353
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#primitive-extension
|
|
354
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/mesh.primitive.EXT_feature_metadata.schema.json
|
|
355
|
+
*/
|
|
356
|
+
export type GLTF_EXT_feature_metadata_Primitive = {
|
|
357
|
+
/** Feature ids definition in attributes */
|
|
358
|
+
featureIdAttributes?: GLTF_EXT_feature_metadata_FeatureIdAttribute[];
|
|
359
|
+
/** Feature ids definition in textures */
|
|
360
|
+
featureIdTextures?: GLTF_EXT_feature_metadata_FeatureIdTexture[];
|
|
361
|
+
/** An array of IDs of feature textures from the root EXT_feature_metadata object. */
|
|
362
|
+
featureTextures?: string[];
|
|
363
|
+
extensions?: Record<string, unknown>;
|
|
364
|
+
extras?: unknown;
|
|
365
|
+
};
|
|
366
|
+
/**
|
|
367
|
+
* Attribute which described featureIds definition.
|
|
368
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-id-attribute
|
|
369
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/featureIdAttribute.schema.json
|
|
370
|
+
*/
|
|
371
|
+
export type GLTF_EXT_feature_metadata_FeatureIdAttribute = {
|
|
372
|
+
/** Name of feature table */
|
|
373
|
+
featureTable: string;
|
|
374
|
+
/** Described how feature ids are defined */
|
|
375
|
+
featureIds: GLTF_EXT_feature_metadata_FeatureIdAttributeFeatureIds;
|
|
376
|
+
extensions?: Record<string, unknown>;
|
|
377
|
+
extras?: unknown;
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* Defining featureIds by attributes or implicitly.
|
|
381
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#primitive-extensionfeatureidattributes
|
|
382
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/featureIdAttribute.featureIds.schema.json
|
|
383
|
+
*/
|
|
384
|
+
export type GLTF_EXT_feature_metadata_FeatureIdAttributeFeatureIds = {
|
|
385
|
+
/** Name of attribute where featureIds are defined */
|
|
386
|
+
attribute?: string;
|
|
387
|
+
/** Sets a constant feature ID for each vertex. The default is 0. */
|
|
388
|
+
constant?: number;
|
|
389
|
+
/** Sets the rate at which feature IDs increment.
|
|
390
|
+
* If divisor is zero then constant is used.
|
|
391
|
+
* If divisor is greater than zero the feature ID increments once per divisor sets of vertices, starting at constant.
|
|
392
|
+
* The default is 0
|
|
393
|
+
*/
|
|
394
|
+
divisor?: number;
|
|
395
|
+
};
|
|
396
|
+
/**
|
|
397
|
+
* An object describing a texture used for storing per-texel feature IDs.
|
|
398
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-id-texture
|
|
399
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/featureIdTexture.schema.json
|
|
400
|
+
*/
|
|
401
|
+
export type GLTF_EXT_feature_metadata_FeatureIdTexture = {
|
|
402
|
+
/** The ID of the feature table in the model's root `EXT_feature_metadata.featureTables` dictionary. */
|
|
403
|
+
featureTable: string;
|
|
404
|
+
/** A description of the texture and channel to use for feature IDs. The `channels` property must have a single channel. Furthermore,
|
|
405
|
+
* feature IDs must be whole numbers in the range `[0, count - 1]` (inclusive), where `count` is the total number of features
|
|
406
|
+
* in the feature table. Texel values must be read as integers. Texture filtering should be disabled when fetching feature IDs.
|
|
407
|
+
*/
|
|
408
|
+
featureIds: GLTF_EXT_feature_metadata_FeatureIdTextureAccessor;
|
|
409
|
+
};
|
|
410
|
+
/**
|
|
411
|
+
* A description of how to access property values from the color channels of a texture.
|
|
412
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#featureidtexturefeatureids
|
|
413
|
+
* JSON Schema - https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_feature_metadata/schema/textureAccessor.schema.json
|
|
414
|
+
*/
|
|
415
|
+
export type GLTF_EXT_feature_metadata_FeatureIdTextureAccessor = {
|
|
416
|
+
/** gLTF textureInfo object - https://github.com/CesiumGS/glTF/blob/3d-tiles-next/specification/2.0/schema/textureInfo.schema.json */
|
|
417
|
+
texture: GLTFTextureInfo;
|
|
418
|
+
/** Must be a single channel ("r", "g", "b", or "a") */
|
|
419
|
+
channels: 'r' | 'g' | 'b' | 'a';
|
|
420
|
+
};
|
|
421
|
+
//# sourceMappingURL=gltf-ext-feature-metadata-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gltf-ext-feature-metadata-schema.d.ts","sourceRoot":"","sources":["../../../src/lib/types/gltf-ext-feature-metadata-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,oBAAoB,CAAC;AAInD;;;;;;;;GAQG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,4CAA4C;IAC5C,MAAM,CAAC,EAAE,gCAAgC,CAAC;IAC1C,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,UAAU,CAAC,EAAE,oCAAoC,CAAC;IAClD,iHAAiH;IACjH,aAAa,CAAC,EAAE;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,sCAAsC,CAAC;KACvD,CAAC;IACF,qHAAqH;IACrH,eAAe,CAAC,EAAE;QAChB,CAAC,GAAG,EAAE,MAAM,GAAG,wCAAwC,CAAC;KACzD,CAAC;IACF,U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,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,UAAU,EAAE,sDAAsD,CAAC;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,sDAAsD,GAAG;IACnE,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,0CAA0C,GAAG;IACvD,uGAAuG;IACvG,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,EAAE,kDAAkD,CAAC;CAChE,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kDAAkD,GAAG;IAC/D,qIAAqI;IACrI,OAAO,EAAE,eAAe,CAAC;IACzB,uDAAuD;IACvD,QAAQ,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CACjC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { GLTFTextureInfoMetadata } from './gltf-json-schema';
|
|
2
|
+
/**
|
|
3
|
+
* EXT_mesh_features extension types
|
|
4
|
+
* This is a primitive-level extension.
|
|
5
|
+
* An object describing feature IDs for a mesh primitive.
|
|
6
|
+
* @see https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_mesh_features
|
|
7
|
+
* or https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_mesh_features/schema/mesh.primitive.EXT_mesh_features.schema.json
|
|
8
|
+
*/
|
|
9
|
+
export type GLTF_EXT_mesh_features = {
|
|
10
|
+
/** An array of feature ID sets. */
|
|
11
|
+
featureIds: GLTF_EXT_mesh_features_featureId[];
|
|
12
|
+
extensions?: Record<string, unknown>;
|
|
13
|
+
extras?: unknown;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Feature IDs stored in an attribute or texture.
|
|
17
|
+
* @see https://github.com/CesiumGS/glTF/blob/c38f7f37e894004353c15cd0481bc5b7381ce841/extensions/2.0/Vendor/EXT_mesh_features/schema/featureId.schema.json
|
|
18
|
+
*/
|
|
19
|
+
export type GLTF_EXT_mesh_features_featureId = {
|
|
20
|
+
/** The number of unique features in the attribute or texture. */
|
|
21
|
+
featureCount: number;
|
|
22
|
+
/** A value that indicates that no feature is associated with this vertex or texel. */
|
|
23
|
+
nullFeatureId?: number;
|
|
24
|
+
/** A label assigned to this feature ID set. Labels must be alphanumeric identifiers matching the regular expression `^[a-zA-Z_][a-zA-Z0-9_]*$`. */
|
|
25
|
+
label?: string;
|
|
26
|
+
/**
|
|
27
|
+
* An attribute containing feature IDs.
|
|
28
|
+
* When `attribute` and `texture` are omitted the feature IDs are assigned to vertices by their index.
|
|
29
|
+
* @see https://github.com/CesiumGS/glTF/blob/3d-tiles-next/extensions/2.0/Vendor/EXT_mesh_features/schema/featureIdAttribute.schema.json
|
|
30
|
+
* An integer value used to construct a string in the format `_FEATURE_ID_<set index>` which is a reference to a key in `mesh.primitives.attributes`
|
|
31
|
+
* (e.g. a value of `0` corresponds to `_FEATURE_ID_0`).
|
|
32
|
+
*/
|
|
33
|
+
attribute?: number;
|
|
34
|
+
/** A texture containing feature IDs. */
|
|
35
|
+
texture?: GLTFTextureInfoMetadata;
|
|
36
|
+
/** The index of the property table containing per-feature property values. Only applicable when using the `EXT_structural_metadata` extension. */
|
|
37
|
+
propertyTable?: number;
|
|
38
|
+
extensions?: Record<string, unknown>;
|
|
39
|
+
extras?: unknown;
|
|
40
|
+
/** This is not part of the spec. GLTFLoader loads feature tables data into this property */
|
|
41
|
+
data?: unknown;
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=gltf-ext-mesh-features-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gltf-ext-mesh-features-schema.d.ts","sourceRoot":"","sources":["../../../src/lib/types/gltf-ext-mesh-features-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,oBAAoB,CAAC;AAG3D;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,mCAAmC;IACnC,UAAU,EAAE,gCAAgC,EAAE,CAAC;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C,iEAAiE;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mJAAmJ;IACnJ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,OAAO,CAAC,EAAE,uBAAuB,CAAC;IAClC,kJAAkJ;IAClJ,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,4FAA4F;IAC5F,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC"}
|