@loaders.gl/gltf 4.0.0-alpha.4 → 4.0.0-alpha.6
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/bundle.d.ts +2 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/bundle.js +2 -2
- package/dist/dist.min.js +5565 -0
- package/dist/es5/bundle.js +6 -0
- package/dist/es5/bundle.js.map +1 -0
- package/dist/es5/glb-loader.js +56 -0
- package/dist/es5/glb-loader.js.map +1 -0
- package/dist/es5/glb-writer.js +35 -0
- package/dist/es5/glb-writer.js.map +1 -0
- package/dist/es5/gltf-loader.js +81 -0
- package/dist/es5/gltf-loader.js.map +1 -0
- package/dist/es5/gltf-writer.js +35 -0
- package/dist/es5/gltf-writer.js.map +1 -0
- package/dist/es5/index.js +49 -0
- package/dist/es5/index.js.map +1 -0
- package/dist/es5/lib/api/gltf-extensions.js +109 -0
- package/dist/es5/lib/api/gltf-extensions.js.map +1 -0
- package/dist/es5/lib/api/gltf-scenegraph.js +578 -0
- package/dist/es5/lib/api/gltf-scenegraph.js.map +1 -0
- package/dist/es5/lib/api/normalize-gltf-v1.js +331 -0
- package/dist/es5/lib/api/normalize-gltf-v1.js.map +1 -0
- package/dist/es5/lib/api/post-process-gltf.js +422 -0
- package/dist/es5/lib/api/post-process-gltf.js.map +1 -0
- package/dist/es5/lib/encoders/encode-glb.js +61 -0
- package/dist/es5/lib/encoders/encode-glb.js.map +1 -0
- package/dist/es5/lib/encoders/encode-gltf.js +21 -0
- package/dist/es5/lib/encoders/encode-gltf.js.map +1 -0
- package/dist/es5/lib/extensions/EXT_meshopt_compression.js +96 -0
- package/dist/es5/lib/extensions/EXT_meshopt_compression.js.map +1 -0
- package/dist/es5/lib/extensions/EXT_texture_webp.js +44 -0
- package/dist/es5/lib/extensions/EXT_texture_webp.js.map +1 -0
- package/dist/es5/lib/extensions/KHR_binary_gltf.js +40 -0
- package/dist/es5/lib/extensions/KHR_binary_gltf.js.map +1 -0
- package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js +246 -0
- package/dist/es5/lib/extensions/KHR_draco_mesh_compression.js.map +1 -0
- package/dist/es5/lib/extensions/KHR_texture_basisu.js +37 -0
- package/dist/es5/lib/extensions/KHR_texture_basisu.js.map +1 -0
- package/dist/es5/lib/extensions/KHR_texture_transform.js +229 -0
- package/dist/es5/lib/extensions/KHR_texture_transform.js.map +1 -0
- package/dist/es5/lib/extensions/deprecated/EXT_feature_metadata.js +103 -0
- package/dist/es5/lib/extensions/deprecated/EXT_feature_metadata.js.map +1 -0
- package/dist/es5/lib/extensions/deprecated/KHR_lights_punctual.js +99 -0
- package/dist/es5/lib/extensions/deprecated/KHR_lights_punctual.js.map +1 -0
- package/dist/es5/lib/extensions/deprecated/KHR_materials_unlit.js +76 -0
- package/dist/es5/lib/extensions/deprecated/KHR_materials_unlit.js.map +1 -0
- package/dist/es5/lib/extensions/deprecated/KHR_techniques_webgl.js +113 -0
- package/dist/es5/lib/extensions/deprecated/KHR_techniques_webgl.js.map +1 -0
- package/dist/es5/lib/gltf-utils/get-typed-array.js +23 -0
- package/dist/es5/lib/gltf-utils/get-typed-array.js.map +1 -0
- package/dist/es5/lib/gltf-utils/gltf-attribute-utils.js +68 -0
- package/dist/es5/lib/gltf-utils/gltf-attribute-utils.js.map +1 -0
- package/dist/es5/lib/gltf-utils/gltf-constants.js +48 -0
- package/dist/es5/lib/gltf-utils/gltf-constants.js.map +1 -0
- package/dist/es5/lib/gltf-utils/gltf-utils.js +62 -0
- package/dist/es5/lib/gltf-utils/gltf-utils.js.map +1 -0
- package/dist/es5/lib/gltf-utils/resolve-url.js +18 -0
- package/dist/es5/lib/gltf-utils/resolve-url.js.map +1 -0
- package/dist/es5/lib/parsers/parse-glb.js +120 -0
- package/dist/es5/lib/parsers/parse-glb.js.map +1 -0
- package/dist/es5/lib/parsers/parse-gltf.js +287 -0
- package/dist/es5/lib/parsers/parse-gltf.js.map +1 -0
- package/dist/es5/lib/types/glb-types.js +2 -0
- package/dist/es5/lib/types/glb-types.js.map +1 -0
- package/dist/es5/lib/types/gltf-json-schema.js +2 -0
- package/dist/es5/lib/types/gltf-json-schema.js.map +1 -0
- package/dist/es5/lib/types/gltf-postprocessed-schema.js +2 -0
- package/dist/es5/lib/types/gltf-postprocessed-schema.js.map +1 -0
- package/dist/es5/lib/types/gltf-types.js +2 -0
- package/dist/es5/lib/types/gltf-types.js.map +1 -0
- package/dist/es5/lib/utils/assert.js +12 -0
- package/dist/es5/lib/utils/assert.js.map +1 -0
- package/dist/es5/lib/utils/version.js +9 -0
- package/dist/es5/lib/utils/version.js.map +1 -0
- package/dist/es5/meshopt/meshopt-decoder.js +215 -0
- package/dist/es5/meshopt/meshopt-decoder.js.map +1 -0
- package/dist/es5/webp/webp.js +83 -0
- package/dist/es5/webp/webp.js.map +1 -0
- package/dist/esm/bundle.js +4 -0
- package/dist/esm/bundle.js.map +1 -0
- package/dist/esm/glb-loader.js +31 -0
- package/dist/esm/glb-loader.js.map +1 -0
- package/dist/esm/glb-writer.js +27 -0
- package/dist/esm/glb-writer.js.map +1 -0
- package/dist/esm/gltf-loader.js +51 -0
- package/dist/esm/gltf-loader.js.map +1 -0
- package/dist/esm/gltf-writer.js +28 -0
- package/dist/esm/gltf-writer.js.map +1 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/api/gltf-extensions.js +35 -0
- package/dist/esm/lib/api/gltf-extensions.js.map +1 -0
- package/dist/esm/lib/api/gltf-scenegraph.js +441 -0
- package/dist/esm/lib/api/gltf-scenegraph.js.map +1 -0
- package/dist/esm/lib/api/normalize-gltf-v1.js +204 -0
- package/dist/esm/lib/api/normalize-gltf-v1.js.map +1 -0
- package/dist/esm/lib/api/post-process-gltf.js +341 -0
- package/dist/esm/lib/api/post-process-gltf.js.map +1 -0
- package/dist/esm/lib/encoders/encode-glb.js +54 -0
- package/dist/esm/lib/encoders/encode-glb.js.map +1 -0
- package/dist/esm/lib/encoders/encode-gltf.js +14 -0
- package/dist/esm/lib/encoders/encode-gltf.js.map +1 -0
- package/dist/esm/lib/extensions/EXT_meshopt_compression.js +42 -0
- package/dist/esm/lib/extensions/EXT_meshopt_compression.js.map +1 -0
- package/dist/esm/lib/extensions/EXT_texture_webp.js +25 -0
- package/dist/esm/lib/extensions/EXT_texture_webp.js.map +1 -0
- package/dist/esm/lib/extensions/KHR_binary_gltf.js +21 -0
- package/dist/esm/lib/extensions/KHR_binary_gltf.js.map +1 -0
- package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js +110 -0
- package/dist/esm/lib/extensions/KHR_draco_mesh_compression.js.map +1 -0
- package/dist/esm/lib/extensions/KHR_texture_basisu.js +18 -0
- package/dist/esm/lib/extensions/KHR_texture_basisu.js.map +1 -0
- package/dist/esm/lib/extensions/KHR_texture_transform.js +181 -0
- package/dist/esm/lib/extensions/KHR_texture_transform.js.map +1 -0
- package/dist/esm/lib/extensions/deprecated/EXT_feature_metadata.js +77 -0
- package/dist/esm/lib/extensions/deprecated/EXT_feature_metadata.js.map +1 -0
- package/dist/esm/lib/extensions/deprecated/KHR_lights_punctual.js +42 -0
- package/dist/esm/lib/extensions/deprecated/KHR_lights_punctual.js.map +1 -0
- package/dist/esm/lib/extensions/deprecated/KHR_materials_unlit.js +33 -0
- package/dist/esm/lib/extensions/deprecated/KHR_materials_unlit.js.map +1 -0
- package/dist/esm/lib/extensions/deprecated/KHR_techniques_webgl.js +61 -0
- package/dist/esm/lib/extensions/deprecated/KHR_techniques_webgl.js.map +1 -0
- package/dist/esm/lib/gltf-utils/get-typed-array.js +16 -0
- package/dist/esm/lib/gltf-utils/get-typed-array.js.map +1 -0
- package/dist/esm/lib/gltf-utils/gltf-attribute-utils.js +62 -0
- package/dist/esm/lib/gltf-utils/gltf-attribute-utils.js.map +1 -0
- package/dist/esm/lib/gltf-utils/gltf-constants.js +37 -0
- package/dist/esm/lib/gltf-utils/gltf-constants.js.map +1 -0
- package/dist/esm/lib/gltf-utils/gltf-utils.js +54 -0
- package/dist/esm/lib/gltf-utils/gltf-utils.js.map +1 -0
- package/dist/esm/lib/gltf-utils/resolve-url.js +12 -0
- package/dist/esm/lib/gltf-utils/resolve-url.js.map +1 -0
- package/dist/esm/lib/parsers/parse-glb.js +114 -0
- package/dist/esm/lib/parsers/parse-glb.js.map +1 -0
- package/dist/esm/lib/parsers/parse-gltf.js +156 -0
- package/dist/esm/lib/parsers/parse-gltf.js.map +1 -0
- package/dist/esm/lib/types/glb-types.js +2 -0
- package/dist/esm/lib/types/glb-types.js.map +1 -0
- package/dist/esm/lib/types/gltf-json-schema.js +2 -0
- package/dist/esm/lib/types/gltf-json-schema.js.map +1 -0
- package/dist/esm/lib/types/gltf-postprocessed-schema.js +2 -0
- package/dist/esm/lib/types/gltf-postprocessed-schema.js.map +1 -0
- package/dist/esm/lib/types/gltf-types.js +2 -0
- package/dist/esm/lib/types/gltf-types.js.map +1 -0
- package/dist/esm/lib/utils/assert.js +6 -0
- package/dist/esm/lib/utils/assert.js.map +1 -0
- package/dist/esm/lib/utils/version.js +2 -0
- package/dist/esm/lib/utils/version.js.map +1 -0
- package/dist/esm/meshopt/meshopt-decoder.js +91 -0
- package/dist/esm/meshopt/meshopt-decoder.js.map +1 -0
- package/dist/esm/meshopt/meshopt-encoder.ts.disabled +409 -0
- package/dist/esm/webp/webp.js +25 -0
- package/dist/esm/webp/webp.js.map +1 -0
- package/dist/glb-loader.d.ts +14 -0
- package/dist/glb-loader.d.ts.map +1 -0
- package/dist/glb-loader.js +33 -28
- package/dist/glb-writer.d.ts +13 -0
- package/dist/glb-writer.d.ts.map +1 -0
- package/dist/glb-writer.js +34 -26
- package/dist/gltf-loader.d.ts +19 -0
- package/dist/gltf-loader.d.ts.map +1 -0
- package/dist/gltf-loader.js +46 -43
- package/dist/gltf-writer.d.ts +25 -0
- package/dist/gltf-writer.d.ts.map +1 -0
- package/dist/gltf-writer.js +29 -26
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -7
- package/dist/lib/api/gltf-extensions.d.ts +31 -0
- package/dist/lib/api/gltf-extensions.d.ts.map +1 -0
- package/dist/lib/api/gltf-extensions.js +79 -31
- package/dist/lib/api/gltf-scenegraph.d.ts +177 -0
- package/dist/lib/api/gltf-scenegraph.d.ts.map +1 -0
- package/dist/lib/api/gltf-scenegraph.js +563 -512
- package/dist/lib/api/normalize-gltf-v1.d.ts +2 -0
- package/dist/lib/api/normalize-gltf-v1.d.ts.map +1 -0
- package/dist/lib/api/normalize-gltf-v1.js +278 -226
- package/dist/lib/api/post-process-gltf.d.ts +2 -0
- package/dist/lib/api/post-process-gltf.d.ts.map +1 -0
- package/dist/lib/api/post-process-gltf.js +324 -346
- package/dist/lib/encoders/encode-glb.d.ts +3 -0
- package/dist/lib/encoders/encode-glb.d.ts.map +1 -0
- package/dist/lib/encoders/encode-glb.js +56 -58
- package/dist/lib/encoders/encode-gltf.d.ts +20 -0
- package/dist/lib/encoders/encode-gltf.d.ts.map +1 -0
- package/dist/lib/encoders/encode-gltf.js +33 -12
- package/dist/lib/extensions/EXT_meshopt_compression.d.ts +7 -0
- package/dist/lib/extensions/EXT_meshopt_compression.d.ts.map +1 -0
- package/dist/lib/extensions/EXT_meshopt_compression.js +39 -50
- package/dist/lib/extensions/EXT_texture_webp.d.ts +12 -0
- package/dist/lib/extensions/EXT_texture_webp.d.ts.map +1 -0
- package/dist/lib/extensions/EXT_texture_webp.js +35 -28
- package/dist/lib/extensions/KHR_binary_gltf.d.ts +7 -0
- package/dist/lib/extensions/KHR_binary_gltf.d.ts.map +1 -0
- package/dist/lib/extensions/KHR_binary_gltf.js +39 -23
- package/dist/lib/extensions/KHR_draco_mesh_compression.d.ts +13 -0
- package/dist/lib/extensions/KHR_draco_mesh_compression.d.ts.map +1 -0
- package/dist/lib/extensions/KHR_draco_mesh_compression.js +126 -111
- package/dist/lib/extensions/KHR_texture_basisu.d.ts +12 -0
- package/dist/lib/extensions/KHR_texture_basisu.d.ts.map +1 -0
- package/dist/lib/extensions/KHR_texture_basisu.js +29 -19
- package/dist/lib/extensions/KHR_texture_transform.d.ts +13 -0
- package/dist/lib/extensions/KHR_texture_transform.d.ts.map +1 -0
- package/dist/lib/extensions/KHR_texture_transform.js +230 -0
- package/dist/lib/extensions/deprecated/EXT_feature_metadata.d.ts +6 -0
- package/dist/lib/extensions/deprecated/EXT_feature_metadata.d.ts.map +1 -0
- package/dist/lib/extensions/deprecated/EXT_feature_metadata.js +118 -0
- package/dist/lib/extensions/deprecated/KHR_lights_punctual.d.ts +7 -0
- package/dist/lib/extensions/deprecated/KHR_lights_punctual.d.ts.map +1 -0
- package/dist/lib/extensions/deprecated/KHR_lights_punctual.js +57 -44
- package/dist/lib/extensions/deprecated/KHR_materials_unlit.d.ts +7 -0
- package/dist/lib/extensions/deprecated/KHR_materials_unlit.d.ts.map +1 -0
- package/dist/lib/extensions/deprecated/KHR_materials_unlit.js +42 -32
- package/dist/lib/extensions/deprecated/KHR_techniques_webgl.d.ts +7 -0
- package/dist/lib/extensions/deprecated/KHR_techniques_webgl.d.ts.map +1 -0
- package/dist/lib/extensions/deprecated/KHR_techniques_webgl.js +76 -62
- package/dist/lib/gltf-utils/get-typed-array.d.ts +3 -0
- package/dist/lib/gltf-utils/get-typed-array.d.ts.map +1 -0
- package/dist/lib/gltf-utils/get-typed-array.js +39 -14
- package/dist/lib/gltf-utils/gltf-attribute-utils.d.ts +6 -0
- package/dist/lib/gltf-utils/gltf-attribute-utils.d.ts.map +1 -0
- package/dist/lib/gltf-utils/gltf-attribute-utils.js +65 -65
- package/dist/lib/gltf-utils/gltf-constants.d.ts +21 -0
- package/dist/lib/gltf-utils/gltf-constants.d.ts.map +1 -0
- package/dist/lib/gltf-utils/gltf-constants.js +38 -32
- package/dist/lib/gltf-utils/gltf-utils.d.ts +8 -0
- package/dist/lib/gltf-utils/gltf-utils.d.ts.map +1 -0
- package/dist/lib/gltf-utils/gltf-utils.js +52 -45
- package/dist/lib/gltf-utils/resolve-url.d.ts +2 -0
- package/dist/lib/gltf-utils/resolve-url.d.ts.map +1 -0
- package/dist/lib/gltf-utils/resolve-url.js +17 -15
- package/dist/lib/parsers/parse-glb.d.ts +8 -0
- package/dist/lib/parsers/parse-glb.d.ts.map +1 -0
- package/dist/lib/parsers/parse-glb.js +120 -107
- package/dist/lib/parsers/parse-gltf.d.ts +14 -0
- package/dist/lib/parsers/parse-gltf.d.ts.map +1 -0
- package/dist/lib/parsers/parse-gltf.js +187 -154
- package/dist/lib/types/glb-types.d.ts +17 -0
- package/dist/lib/types/glb-types.d.ts.map +1 -0
- package/dist/lib/types/glb-types.js +2 -2
- package/dist/lib/types/gltf-json-schema.d.ts +1105 -0
- package/dist/lib/types/gltf-json-schema.d.ts.map +1 -0
- package/dist/lib/types/gltf-json-schema.js +4 -2
- package/dist/lib/types/gltf-postprocessed-schema.d.ts +686 -0
- package/dist/lib/types/gltf-postprocessed-schema.d.ts.map +1 -0
- package/dist/lib/types/gltf-postprocessed-schema.js +4 -2
- package/dist/lib/types/gltf-types.d.ts +14 -0
- package/dist/lib/types/gltf-types.d.ts.map +1 -0
- package/dist/lib/types/gltf-types.js +3 -2
- package/dist/lib/utils/assert.d.ts +2 -0
- package/dist/lib/utils/assert.d.ts.map +1 -0
- package/dist/lib/utils/assert.js +11 -5
- package/dist/lib/utils/version.d.ts +2 -0
- package/dist/lib/utils/version.d.ts.map +1 -0
- package/dist/lib/utils/version.js +7 -2
- package/dist/meshopt/meshopt-decoder.d.ts +6 -0
- package/dist/meshopt/meshopt-decoder.d.ts.map +1 -0
- package/dist/meshopt/meshopt-decoder.js +97 -82
- package/dist/webp/webp.d.ts +7 -0
- package/dist/webp/webp.d.ts.map +1 -0
- package/dist/webp/webp.js +32 -23
- package/package.json +11 -13
- package/src/glb-loader.ts +1 -1
- package/src/glb-writer.ts +9 -3
- package/src/gltf-writer.ts +2 -2
- package/src/index.ts +11 -1
- package/src/lib/api/gltf-extensions.ts +13 -2
- package/src/lib/api/gltf-scenegraph.ts +23 -14
- package/src/lib/api/{normalize-gltf-v1.js → normalize-gltf-v1.ts} +20 -17
- package/src/lib/api/{post-process-gltf.js → post-process-gltf.ts} +52 -9
- package/src/lib/encoders/{encode-glb.js → encode-glb.ts} +8 -1
- package/src/lib/encoders/encode-gltf.ts +34 -0
- package/src/lib/extensions/EXT_meshopt_compression.ts +12 -19
- package/src/lib/extensions/EXT_texture_webp.ts +3 -2
- package/src/lib/extensions/KHR_binary_gltf.ts +1 -1
- package/src/lib/extensions/KHR_draco_mesh_compression.ts +1 -1
- package/src/lib/extensions/KHR_texture_basisu.ts +3 -2
- package/src/lib/extensions/KHR_texture_transform.ts +305 -0
- package/src/lib/extensions/deprecated/EXT_feature_metadata.ts +163 -0
- package/src/lib/extensions/deprecated/KHR_materials_unlit.ts +3 -3
- package/src/lib/extensions/deprecated/KHR_techniques_webgl.ts +1 -0
- package/src/lib/gltf-utils/gltf-constants.ts +2 -2
- package/src/lib/parsers/parse-gltf.ts +12 -3
- package/src/lib/types/glb-types.ts +1 -1
- package/src/lib/types/gltf-json-schema.ts +434 -5
- package/src/lib/types/gltf-postprocessed-schema.ts +12 -11
- package/src/lib/types/gltf-types.ts +26 -2
- package/src/lib/utils/{assert.js → assert.ts} +1 -1
- package/dist/bundle.js.map +0 -1
- package/dist/glb-loader.js.map +0 -1
- package/dist/glb-writer.js.map +0 -1
- package/dist/gltf-loader.js.map +0 -1
- package/dist/gltf-writer.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/api/gltf-extensions.js.map +0 -1
- package/dist/lib/api/gltf-scenegraph.js.map +0 -1
- package/dist/lib/api/normalize-gltf-v1.js.map +0 -1
- package/dist/lib/api/post-process-gltf.js.map +0 -1
- package/dist/lib/encoders/encode-glb.js.map +0 -1
- package/dist/lib/encoders/encode-gltf.js.map +0 -1
- package/dist/lib/extensions/EXT_meshopt_compression.js.map +0 -1
- package/dist/lib/extensions/EXT_texture_webp.js.map +0 -1
- package/dist/lib/extensions/KHR_binary_gltf.js.map +0 -1
- package/dist/lib/extensions/KHR_draco_mesh_compression.js.map +0 -1
- package/dist/lib/extensions/KHR_texture_basisu.js.map +0 -1
- package/dist/lib/extensions/deprecated/KHR_lights_punctual.js.map +0 -1
- package/dist/lib/extensions/deprecated/KHR_materials_unlit.js.map +0 -1
- package/dist/lib/extensions/deprecated/KHR_techniques_webgl.js.map +0 -1
- package/dist/lib/gltf-utils/get-typed-array.js.map +0 -1
- package/dist/lib/gltf-utils/gltf-attribute-utils.js.map +0 -1
- package/dist/lib/gltf-utils/gltf-constants.js.map +0 -1
- package/dist/lib/gltf-utils/gltf-utils.js.map +0 -1
- package/dist/lib/gltf-utils/resolve-url.js.map +0 -1
- package/dist/lib/parsers/parse-glb.js.map +0 -1
- package/dist/lib/parsers/parse-gltf.js.map +0 -1
- package/dist/lib/types/glb-types.js.map +0 -1
- package/dist/lib/types/gltf-json-schema.js.map +0 -1
- package/dist/lib/types/gltf-postprocessed-schema.js.map +0 -1
- package/dist/lib/types/gltf-types.js.map +0 -1
- package/dist/lib/utils/assert.js.map +0 -1
- package/dist/lib/utils/version.js.map +0 -1
- package/dist/meshopt/meshopt-decoder.js.map +0 -1
- package/dist/webp/webp.js.map +0 -1
- package/src/lib/encoders/encode-gltf.js +0 -25
- /package/dist/{meshopt → es5/meshopt}/meshopt-encoder.ts.disabled +0 -0
- /package/src/lib/utils/{version.js → version.ts} +0 -0
|
@@ -0,0 +1,1105 @@
|
|
|
1
|
+
export type GLTFId = number;
|
|
2
|
+
/**
|
|
3
|
+
* Indices of those attributes that deviate from their initialization value.
|
|
4
|
+
*/
|
|
5
|
+
export interface AccessorSparseIndices {
|
|
6
|
+
/**
|
|
7
|
+
* The index of the bufferView with sparse indices. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
|
|
8
|
+
*/
|
|
9
|
+
bufferView: GLTFId;
|
|
10
|
+
/**
|
|
11
|
+
* The offset relative to the start of the bufferView in bytes. Must be aligned.
|
|
12
|
+
*/
|
|
13
|
+
byteOffset?: number;
|
|
14
|
+
/**
|
|
15
|
+
* The indices data type.
|
|
16
|
+
*/
|
|
17
|
+
componentType: 5121 | 5123 | 5125 | number;
|
|
18
|
+
extensions?: any;
|
|
19
|
+
extras?: any;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Array of size `accessor.sparse.count` times number of components storing the displaced accessor attributes pointed by `accessor.sparse.indices`.
|
|
23
|
+
*/
|
|
24
|
+
export interface AccessorSparseValues {
|
|
25
|
+
/**
|
|
26
|
+
* The index of the bufferView with sparse values. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
|
|
27
|
+
*/
|
|
28
|
+
bufferView: GLTFId;
|
|
29
|
+
/**
|
|
30
|
+
* The offset relative to the start of the bufferView in bytes. Must be aligned.
|
|
31
|
+
*/
|
|
32
|
+
byteOffset?: number;
|
|
33
|
+
extensions?: any;
|
|
34
|
+
extras?: any;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Sparse storage of attributes that deviate from their initialization value.
|
|
38
|
+
*/
|
|
39
|
+
export interface AccessorSparse {
|
|
40
|
+
/**
|
|
41
|
+
* Number of entries stored in the sparse array.
|
|
42
|
+
*/
|
|
43
|
+
count: number;
|
|
44
|
+
/**
|
|
45
|
+
* Index array of size `count` that points to those accessor attributes that deviate from their initialization value. Indices must strictly increase.
|
|
46
|
+
*/
|
|
47
|
+
indices: AccessorSparseIndices;
|
|
48
|
+
/**
|
|
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
|
+
*/
|
|
51
|
+
values: AccessorSparseValues;
|
|
52
|
+
extensions?: any;
|
|
53
|
+
extras?: any;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
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
|
+
*/
|
|
58
|
+
export interface Accessor {
|
|
59
|
+
/**
|
|
60
|
+
* The index of the bufferView.
|
|
61
|
+
*/
|
|
62
|
+
bufferView?: GLTFId;
|
|
63
|
+
/**
|
|
64
|
+
* The offset relative to the start of the bufferView in bytes.
|
|
65
|
+
*/
|
|
66
|
+
byteOffset?: number;
|
|
67
|
+
/**
|
|
68
|
+
* The datatype of components in the attribute.
|
|
69
|
+
*/
|
|
70
|
+
componentType: 5120 | 5121 | 5122 | 5123 | 5125 | 5126 | number;
|
|
71
|
+
/**
|
|
72
|
+
* Specifies whether integer data values should be normalized.
|
|
73
|
+
*/
|
|
74
|
+
normalized?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* The number of attributes referenced by this accessor.
|
|
77
|
+
*/
|
|
78
|
+
count: number;
|
|
79
|
+
/**
|
|
80
|
+
* Specifies if the attribute is a scalar, vector, or matrix.
|
|
81
|
+
*/
|
|
82
|
+
type: 'SCALAR' | 'VEC2' | 'VEC3' | 'VEC4' | 'MAT2' | 'MAT3' | 'MAT4' | string;
|
|
83
|
+
/**
|
|
84
|
+
* Maximum value of each component in this attribute.
|
|
85
|
+
*/
|
|
86
|
+
max?: number[];
|
|
87
|
+
/**
|
|
88
|
+
* Minimum value of each component in this attribute.
|
|
89
|
+
*/
|
|
90
|
+
min?: number[];
|
|
91
|
+
/**
|
|
92
|
+
* Sparse storage of attributes that deviate from their initialization value.
|
|
93
|
+
*/
|
|
94
|
+
sparse?: AccessorSparse;
|
|
95
|
+
name?: any;
|
|
96
|
+
extensions?: any;
|
|
97
|
+
extras?: any;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The index of the node and TRS property that an animation channel targets.
|
|
101
|
+
*/
|
|
102
|
+
export interface AnimationChannelTarget {
|
|
103
|
+
/**
|
|
104
|
+
* The index of the node to target.
|
|
105
|
+
*/
|
|
106
|
+
node?: GLTFId;
|
|
107
|
+
/**
|
|
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
|
+
*/
|
|
110
|
+
path: 'translation' | 'rotation' | 'scale' | 'weights' | string;
|
|
111
|
+
extensions?: any;
|
|
112
|
+
extras?: any;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Targets an animation's sampler at a node's property.
|
|
116
|
+
*/
|
|
117
|
+
export interface AnimationChannel {
|
|
118
|
+
/**
|
|
119
|
+
* The index of a sampler in this animation used to compute the value for the target.
|
|
120
|
+
*/
|
|
121
|
+
sampler: GLTFId;
|
|
122
|
+
/**
|
|
123
|
+
* The index of the node and TRS property to target.
|
|
124
|
+
*/
|
|
125
|
+
target: AnimationChannelTarget;
|
|
126
|
+
extensions?: any;
|
|
127
|
+
extras?: any;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
|
|
131
|
+
*/
|
|
132
|
+
export interface AnimationSampler {
|
|
133
|
+
/**
|
|
134
|
+
* The index of an accessor containing keyframe input values, e.g., time.
|
|
135
|
+
*/
|
|
136
|
+
input: GLTFId;
|
|
137
|
+
/**
|
|
138
|
+
* Interpolation algorithm.
|
|
139
|
+
*/
|
|
140
|
+
interpolation?: 'LINEAR' | 'STEP' | 'CUBICSPLINE' | string;
|
|
141
|
+
/**
|
|
142
|
+
* The index of an accessor, containing keyframe output values.
|
|
143
|
+
*/
|
|
144
|
+
output: GLTFId;
|
|
145
|
+
extensions?: any;
|
|
146
|
+
extras?: any;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* A keyframe animation.
|
|
150
|
+
*/
|
|
151
|
+
export interface Animation {
|
|
152
|
+
/**
|
|
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
|
+
*/
|
|
155
|
+
channels: AnimationChannel[];
|
|
156
|
+
/**
|
|
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
|
+
*/
|
|
159
|
+
samplers: AnimationSampler[];
|
|
160
|
+
name?: any;
|
|
161
|
+
extensions?: any;
|
|
162
|
+
extras?: any;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Metadata about the glTF asset.
|
|
166
|
+
*/
|
|
167
|
+
export interface Asset {
|
|
168
|
+
/**
|
|
169
|
+
* A copyright message suitable for display to credit the content creator.
|
|
170
|
+
*/
|
|
171
|
+
copyright?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Tool that generated this glTF model. Useful for debugging.
|
|
174
|
+
*/
|
|
175
|
+
generator?: string;
|
|
176
|
+
/**
|
|
177
|
+
* The glTF version that this asset targets.
|
|
178
|
+
*/
|
|
179
|
+
version: string;
|
|
180
|
+
/**
|
|
181
|
+
* The minimum glTF version that this asset targets.
|
|
182
|
+
*/
|
|
183
|
+
minVersion?: string;
|
|
184
|
+
extensions?: any;
|
|
185
|
+
extras?: any;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* A buffer points to binary geometry, animation, or skins.
|
|
189
|
+
*/
|
|
190
|
+
export interface Buffer {
|
|
191
|
+
/**
|
|
192
|
+
* The uri of the buffer.
|
|
193
|
+
*/
|
|
194
|
+
uri?: string;
|
|
195
|
+
/**
|
|
196
|
+
* The length of the buffer in bytes.
|
|
197
|
+
*/
|
|
198
|
+
byteLength: number;
|
|
199
|
+
name?: any;
|
|
200
|
+
extensions?: any;
|
|
201
|
+
extras?: any;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* A view into a buffer generally representing a subset of the buffer.
|
|
205
|
+
*/
|
|
206
|
+
export interface BufferView {
|
|
207
|
+
/**
|
|
208
|
+
* The index of the buffer.
|
|
209
|
+
*/
|
|
210
|
+
buffer: GLTFId;
|
|
211
|
+
/**
|
|
212
|
+
* The offset into the buffer in bytes.
|
|
213
|
+
*/
|
|
214
|
+
byteOffset?: number;
|
|
215
|
+
/**
|
|
216
|
+
* The length of the bufferView in bytes.
|
|
217
|
+
*/
|
|
218
|
+
byteLength: number;
|
|
219
|
+
/**
|
|
220
|
+
* The stride, in bytes.
|
|
221
|
+
*/
|
|
222
|
+
byteStride?: number;
|
|
223
|
+
/**
|
|
224
|
+
* The target that the GPU buffer should be bound to.
|
|
225
|
+
*/
|
|
226
|
+
target?: 34962 | 34963 | number;
|
|
227
|
+
name?: any;
|
|
228
|
+
extensions?: any;
|
|
229
|
+
extras?: any;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* An orthographic camera containing properties to create an orthographic projection matrix.
|
|
233
|
+
*/
|
|
234
|
+
export interface CameraOrthographic {
|
|
235
|
+
/**
|
|
236
|
+
* The floating-point horizontal magnification of the view. Must not be zero.
|
|
237
|
+
*/
|
|
238
|
+
xmag: number;
|
|
239
|
+
/**
|
|
240
|
+
* The floating-point vertical magnification of the view. Must not be zero.
|
|
241
|
+
*/
|
|
242
|
+
ymag: number;
|
|
243
|
+
/**
|
|
244
|
+
* The floating-point distance to the far clipping plane. `zfar` must be greater than `znear`.
|
|
245
|
+
*/
|
|
246
|
+
zfar: number;
|
|
247
|
+
/**
|
|
248
|
+
* The floating-point distance to the near clipping plane.
|
|
249
|
+
*/
|
|
250
|
+
znear: number;
|
|
251
|
+
extensions?: any;
|
|
252
|
+
extras?: any;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* A perspective camera containing properties to create a perspective projection matrix.
|
|
256
|
+
*/
|
|
257
|
+
export interface CameraPerspective {
|
|
258
|
+
/**
|
|
259
|
+
* The floating-point aspect ratio of the field of view.
|
|
260
|
+
*/
|
|
261
|
+
aspectRatio?: number;
|
|
262
|
+
/**
|
|
263
|
+
* The floating-point vertical field of view in radians.
|
|
264
|
+
*/
|
|
265
|
+
yfov: number;
|
|
266
|
+
/**
|
|
267
|
+
* The floating-point distance to the far clipping plane.
|
|
268
|
+
*/
|
|
269
|
+
zfar?: number;
|
|
270
|
+
/**
|
|
271
|
+
* The floating-point distance to the near clipping plane.
|
|
272
|
+
*/
|
|
273
|
+
znear: number;
|
|
274
|
+
extensions?: any;
|
|
275
|
+
extras?: any;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* A camera's projection. A node can reference a camera to apply a transform to place the camera in the scene.
|
|
279
|
+
*/
|
|
280
|
+
export interface Camera {
|
|
281
|
+
/**
|
|
282
|
+
* An orthographic camera containing properties to create an orthographic projection matrix.
|
|
283
|
+
*/
|
|
284
|
+
orthographic?: CameraOrthographic;
|
|
285
|
+
/**
|
|
286
|
+
* A perspective camera containing properties to create a perspective projection matrix.
|
|
287
|
+
*/
|
|
288
|
+
perspective?: CameraPerspective;
|
|
289
|
+
/**
|
|
290
|
+
* Specifies if the camera uses a perspective or orthographic projection.
|
|
291
|
+
*/
|
|
292
|
+
type: 'perspective' | 'orthographic' | string;
|
|
293
|
+
name?: any;
|
|
294
|
+
extensions?: any;
|
|
295
|
+
extras?: any;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
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
|
+
*/
|
|
300
|
+
export interface Image {
|
|
301
|
+
/**
|
|
302
|
+
* The uri of the image.
|
|
303
|
+
*/
|
|
304
|
+
uri?: string;
|
|
305
|
+
/**
|
|
306
|
+
* The image's MIME type.
|
|
307
|
+
*/
|
|
308
|
+
mimeType?: 'image/jpeg' | 'image/png' | string;
|
|
309
|
+
/**
|
|
310
|
+
* The index of the bufferView that contains the image. Use this instead of the image's uri property.
|
|
311
|
+
*/
|
|
312
|
+
bufferView?: GLTFId;
|
|
313
|
+
name?: any;
|
|
314
|
+
extensions?: any;
|
|
315
|
+
extras?: any;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Reference to a texture.
|
|
319
|
+
*/
|
|
320
|
+
export interface TextureInfo {
|
|
321
|
+
/**
|
|
322
|
+
* The index of the texture.
|
|
323
|
+
*/
|
|
324
|
+
index: GLTFId;
|
|
325
|
+
/**
|
|
326
|
+
* The set index of texture's TEXCOORD attribute used for texture coordinate mapping.
|
|
327
|
+
*/
|
|
328
|
+
texCoord?: number;
|
|
329
|
+
extensions?: any;
|
|
330
|
+
extras?: any;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.
|
|
334
|
+
*/
|
|
335
|
+
export interface MaterialPbrMetallicRoughness {
|
|
336
|
+
/**
|
|
337
|
+
* The material's base color factor.
|
|
338
|
+
*/
|
|
339
|
+
baseColorFactor?: number[];
|
|
340
|
+
/**
|
|
341
|
+
* The base color texture.
|
|
342
|
+
*/
|
|
343
|
+
baseColorTexture?: TextureInfo;
|
|
344
|
+
/**
|
|
345
|
+
* The metalness of the material.
|
|
346
|
+
*/
|
|
347
|
+
metallicFactor?: number;
|
|
348
|
+
/**
|
|
349
|
+
* The roughness of the material.
|
|
350
|
+
*/
|
|
351
|
+
roughnessFactor?: number;
|
|
352
|
+
/**
|
|
353
|
+
* The metallic-roughness texture.
|
|
354
|
+
*/
|
|
355
|
+
metallicRoughnessTexture?: TextureInfo;
|
|
356
|
+
extensions?: any;
|
|
357
|
+
extras?: any;
|
|
358
|
+
}
|
|
359
|
+
export interface MaterialNormalTextureInfo {
|
|
360
|
+
index: any;
|
|
361
|
+
texCoord?: any;
|
|
362
|
+
/**
|
|
363
|
+
* The scalar multiplier applied to each normal vector of the normal texture.
|
|
364
|
+
*/
|
|
365
|
+
scale?: number;
|
|
366
|
+
extensions?: any;
|
|
367
|
+
extras?: any;
|
|
368
|
+
}
|
|
369
|
+
export interface MaterialOcclusionTextureInfo {
|
|
370
|
+
index: any;
|
|
371
|
+
texCoord?: any;
|
|
372
|
+
/**
|
|
373
|
+
* A scalar multiplier controlling the amount of occlusion applied.
|
|
374
|
+
*/
|
|
375
|
+
strength?: number;
|
|
376
|
+
extensions?: any;
|
|
377
|
+
extras?: any;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* The material appearance of a primitive.
|
|
381
|
+
*/
|
|
382
|
+
export interface Material {
|
|
383
|
+
name?: any;
|
|
384
|
+
extensions?: any;
|
|
385
|
+
extras?: any;
|
|
386
|
+
/**
|
|
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
|
+
*/
|
|
389
|
+
pbrMetallicRoughness?: MaterialPbrMetallicRoughness;
|
|
390
|
+
/**
|
|
391
|
+
* The normal map texture.
|
|
392
|
+
*/
|
|
393
|
+
normalTexture?: MaterialNormalTextureInfo;
|
|
394
|
+
/**
|
|
395
|
+
* The occlusion map texture.
|
|
396
|
+
*/
|
|
397
|
+
occlusionTexture?: MaterialOcclusionTextureInfo;
|
|
398
|
+
/**
|
|
399
|
+
* The emissive map texture.
|
|
400
|
+
*/
|
|
401
|
+
emissiveTexture?: TextureInfo;
|
|
402
|
+
/**
|
|
403
|
+
* The emissive color of the material.
|
|
404
|
+
*/
|
|
405
|
+
emissiveFactor?: number[];
|
|
406
|
+
/**
|
|
407
|
+
* The alpha rendering mode of the material.
|
|
408
|
+
*/
|
|
409
|
+
alphaMode?: 'OPAQUE' | 'MASK' | 'BLEND' | string;
|
|
410
|
+
/**
|
|
411
|
+
* The alpha cutoff value of the material.
|
|
412
|
+
*/
|
|
413
|
+
alphaCutoff?: number;
|
|
414
|
+
/**
|
|
415
|
+
* Specifies whether the material is double sided.
|
|
416
|
+
*/
|
|
417
|
+
doubleSided?: boolean;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Geometry to be rendered with the given material.
|
|
421
|
+
*/
|
|
422
|
+
export interface MeshPrimitive {
|
|
423
|
+
/**
|
|
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
|
+
*/
|
|
426
|
+
attributes: {
|
|
427
|
+
[k: string]: GLTFId;
|
|
428
|
+
};
|
|
429
|
+
/**
|
|
430
|
+
* The index of the accessor that contains the indices.
|
|
431
|
+
*/
|
|
432
|
+
indices?: GLTFId;
|
|
433
|
+
/**
|
|
434
|
+
* The index of the material to apply to this primitive when rendering.
|
|
435
|
+
*/
|
|
436
|
+
material?: GLTFId;
|
|
437
|
+
/**
|
|
438
|
+
* The type of primitives to render.
|
|
439
|
+
*/
|
|
440
|
+
mode?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | number;
|
|
441
|
+
/**
|
|
442
|
+
* 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.
|
|
443
|
+
*/
|
|
444
|
+
targets?: {
|
|
445
|
+
[k: string]: GLTFId;
|
|
446
|
+
}[];
|
|
447
|
+
extensions?: any;
|
|
448
|
+
extras?: any;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
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
|
+
*/
|
|
453
|
+
export interface Mesh {
|
|
454
|
+
id?: string;
|
|
455
|
+
/**
|
|
456
|
+
* An array of primitives, each defining geometry to be rendered with a material.
|
|
457
|
+
*/
|
|
458
|
+
primitives: MeshPrimitive[];
|
|
459
|
+
/**
|
|
460
|
+
* Array of weights to be applied to the Morph Targets.
|
|
461
|
+
*/
|
|
462
|
+
weights?: number[];
|
|
463
|
+
name?: any;
|
|
464
|
+
extensions?: any;
|
|
465
|
+
extras?: any;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
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
|
+
*/
|
|
470
|
+
export interface Node {
|
|
471
|
+
/**
|
|
472
|
+
* The index of the camera referenced by this node.
|
|
473
|
+
*/
|
|
474
|
+
camera?: GLTFId;
|
|
475
|
+
/**
|
|
476
|
+
* The indices of this node's children.
|
|
477
|
+
*/
|
|
478
|
+
children?: GLTFId[];
|
|
479
|
+
/**
|
|
480
|
+
* The index of the skin referenced by this node.
|
|
481
|
+
*/
|
|
482
|
+
skin?: GLTFId;
|
|
483
|
+
/**
|
|
484
|
+
* A floating-point 4x4 transformation matrix stored in column-major order.
|
|
485
|
+
*/
|
|
486
|
+
matrix?: number[];
|
|
487
|
+
/**
|
|
488
|
+
* The index of the mesh in this node.
|
|
489
|
+
*/
|
|
490
|
+
mesh?: GLTFId;
|
|
491
|
+
/**
|
|
492
|
+
* The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.
|
|
493
|
+
*/
|
|
494
|
+
rotation?: number[];
|
|
495
|
+
/**
|
|
496
|
+
* The node's non-uniform scale, given as the scaling factors along the x, y, and z axes.
|
|
497
|
+
*/
|
|
498
|
+
scale?: number[];
|
|
499
|
+
/**
|
|
500
|
+
* The node's translation along the x, y, and z axes.
|
|
501
|
+
*/
|
|
502
|
+
translation?: number[];
|
|
503
|
+
/**
|
|
504
|
+
* The weights of the instantiated Morph Target. Number of elements must match number of Morph Targets of used mesh.
|
|
505
|
+
*/
|
|
506
|
+
weights?: number[];
|
|
507
|
+
name?: any;
|
|
508
|
+
extensions?: any;
|
|
509
|
+
extras?: any;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Texture sampler properties for filtering and wrapping modes.
|
|
513
|
+
*/
|
|
514
|
+
export interface Sampler {
|
|
515
|
+
/**
|
|
516
|
+
* Magnification filter.
|
|
517
|
+
*/
|
|
518
|
+
magFilter?: 9728 | 9729 | number;
|
|
519
|
+
/**
|
|
520
|
+
* Minification filter.
|
|
521
|
+
*/
|
|
522
|
+
minFilter?: 9728 | 9729 | 9984 | 9985 | 9986 | 9987 | number;
|
|
523
|
+
/**
|
|
524
|
+
* s wrapping mode.
|
|
525
|
+
*/
|
|
526
|
+
wrapS?: 33071 | 33648 | 10497 | number;
|
|
527
|
+
/**
|
|
528
|
+
* t wrapping mode.
|
|
529
|
+
*/
|
|
530
|
+
wrapT?: 33071 | 33648 | 10497 | number;
|
|
531
|
+
name?: any;
|
|
532
|
+
extensions?: any;
|
|
533
|
+
extras?: any;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* The root nodes of a scene.
|
|
537
|
+
*/
|
|
538
|
+
export interface Scene {
|
|
539
|
+
/**
|
|
540
|
+
* The indices of each root node.
|
|
541
|
+
*/
|
|
542
|
+
nodes?: GLTFId[];
|
|
543
|
+
name?: any;
|
|
544
|
+
extensions?: any;
|
|
545
|
+
extras?: any;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Joints and matrices defining a skin.
|
|
549
|
+
*/
|
|
550
|
+
export interface Skin {
|
|
551
|
+
/**
|
|
552
|
+
* 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
|
+
inverseBindMatrices?: GLTFId;
|
|
555
|
+
/**
|
|
556
|
+
* The index of the node used as a skeleton root. When undefined, joints transforms resolve to scene root.
|
|
557
|
+
*/
|
|
558
|
+
skeleton?: GLTFId;
|
|
559
|
+
/**
|
|
560
|
+
* Indices of skeleton nodes, used as joints in this skin.
|
|
561
|
+
*/
|
|
562
|
+
joints: GLTFId[];
|
|
563
|
+
name?: any;
|
|
564
|
+
extensions?: any;
|
|
565
|
+
extras?: any;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* A texture and its sampler.
|
|
569
|
+
*/
|
|
570
|
+
export interface Texture {
|
|
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
|
+
*/
|
|
574
|
+
sampler?: GLTFId;
|
|
575
|
+
/**
|
|
576
|
+
* The index of the image used by this texture.
|
|
577
|
+
*/
|
|
578
|
+
source?: GLTFId;
|
|
579
|
+
name?: any;
|
|
580
|
+
extensions?: any;
|
|
581
|
+
extras?: any;
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* The root object for a glTF asset.
|
|
585
|
+
*/
|
|
586
|
+
export interface GLTF {
|
|
587
|
+
/**
|
|
588
|
+
* Names of glTF extensions used somewhere in this asset.
|
|
589
|
+
*/
|
|
590
|
+
extensionsUsed?: string[];
|
|
591
|
+
/**
|
|
592
|
+
* Names of glTF extensions required to properly load this asset.
|
|
593
|
+
*/
|
|
594
|
+
extensionsRequired?: string[];
|
|
595
|
+
/**
|
|
596
|
+
* An array of accessors.
|
|
597
|
+
*/
|
|
598
|
+
accessors?: Accessor[];
|
|
599
|
+
/**
|
|
600
|
+
* An array of keyframe animations.
|
|
601
|
+
*/
|
|
602
|
+
animations?: Animation[];
|
|
603
|
+
/**
|
|
604
|
+
* Metadata about the glTF asset.
|
|
605
|
+
*/
|
|
606
|
+
asset: Asset;
|
|
607
|
+
/**
|
|
608
|
+
* An array of buffers.
|
|
609
|
+
*/
|
|
610
|
+
buffers?: Buffer[];
|
|
611
|
+
/**
|
|
612
|
+
* An array of bufferViews.
|
|
613
|
+
*/
|
|
614
|
+
bufferViews?: BufferView[];
|
|
615
|
+
/**
|
|
616
|
+
* An array of cameras.
|
|
617
|
+
*/
|
|
618
|
+
cameras?: Camera[];
|
|
619
|
+
/**
|
|
620
|
+
* An array of images.
|
|
621
|
+
*/
|
|
622
|
+
images?: Image[];
|
|
623
|
+
/**
|
|
624
|
+
* An array of materials.
|
|
625
|
+
*/
|
|
626
|
+
materials?: Material[];
|
|
627
|
+
/**
|
|
628
|
+
* An array of meshes.
|
|
629
|
+
*/
|
|
630
|
+
meshes?: Mesh[];
|
|
631
|
+
/**
|
|
632
|
+
* An array of nodes.
|
|
633
|
+
*/
|
|
634
|
+
nodes?: Node[];
|
|
635
|
+
/**
|
|
636
|
+
* An array of samplers.
|
|
637
|
+
*/
|
|
638
|
+
samplers?: Sampler[];
|
|
639
|
+
/**
|
|
640
|
+
* The index of the default scene.
|
|
641
|
+
*/
|
|
642
|
+
scene?: GLTFId;
|
|
643
|
+
/**
|
|
644
|
+
* An array of scenes.
|
|
645
|
+
*/
|
|
646
|
+
scenes?: Scene[];
|
|
647
|
+
/**
|
|
648
|
+
* An array of skins.
|
|
649
|
+
*/
|
|
650
|
+
skins?: Skin[];
|
|
651
|
+
/**
|
|
652
|
+
* An array of textures.
|
|
653
|
+
*/
|
|
654
|
+
textures?: Texture[];
|
|
655
|
+
extensions?: unknown;
|
|
656
|
+
extras?: unknown;
|
|
657
|
+
[k: string]: unknown;
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* @see https://github.com/KhronosGroup/glTF/tree/master/extensions/1.0/Khronos/KHR_binary_glTF
|
|
661
|
+
* TODO - this can be used on both images and shaders
|
|
662
|
+
*/
|
|
663
|
+
export type GLTF_KHR_binary_glTF = {
|
|
664
|
+
bufferView: number;
|
|
665
|
+
mimeType?: string;
|
|
666
|
+
height?: number;
|
|
667
|
+
width?: number;
|
|
668
|
+
extras?: any;
|
|
669
|
+
};
|
|
670
|
+
/**
|
|
671
|
+
* @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression
|
|
672
|
+
*/
|
|
673
|
+
export type GLTF_KHR_draco_mesh_compression = {
|
|
674
|
+
bufferView: GLTFId;
|
|
675
|
+
attributes: {
|
|
676
|
+
[name: string]: number;
|
|
677
|
+
};
|
|
678
|
+
extras?: any;
|
|
679
|
+
};
|
|
680
|
+
/**
|
|
681
|
+
* @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_basisu
|
|
682
|
+
*/
|
|
683
|
+
export type GLTF_KHR_texture_basisu = {
|
|
684
|
+
source: GLTFId;
|
|
685
|
+
extras?: any;
|
|
686
|
+
};
|
|
687
|
+
/**
|
|
688
|
+
* @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_meshopt_compression
|
|
689
|
+
* buffer: number; // The index of the buffer with compressed data. ✅ Required
|
|
690
|
+
* byteOffset integer The offset into the buffer in bytes. Default: 0
|
|
691
|
+
* byteLength integer The length of the compressed data in bytes. ✅ Required
|
|
692
|
+
* byteStride integer The stride, in bytes. ✅ Required
|
|
693
|
+
* count integer The number of elements. ✅ Required
|
|
694
|
+
* mode string The compression mode. ✅ Required
|
|
695
|
+
* filter string The compression filter. Default: "NONE"
|
|
696
|
+
*/
|
|
697
|
+
export type GLTF_EXT_meshopt_compression = {
|
|
698
|
+
buffer: number;
|
|
699
|
+
byteOffset?: number;
|
|
700
|
+
byteLength: number;
|
|
701
|
+
byteStride: number;
|
|
702
|
+
count: number;
|
|
703
|
+
mode: 'ATTRIBUTES' | 'TRIANGLES' | 'INDICES';
|
|
704
|
+
filter?: 'NONE' | 'OCTAHEDRAL' | 'QUATERNION' | 'EXPONENTIAL';
|
|
705
|
+
extras?: any;
|
|
706
|
+
};
|
|
707
|
+
/**
|
|
708
|
+
* @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_webp
|
|
709
|
+
*/
|
|
710
|
+
export type GLTF_EXT_texture_webp = {
|
|
711
|
+
source: GLTFId;
|
|
712
|
+
extras?: any;
|
|
713
|
+
};
|
|
714
|
+
/**
|
|
715
|
+
* @see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_texture_dds
|
|
716
|
+
*/
|
|
717
|
+
export type GLTF_MSFT_texture_dds = {
|
|
718
|
+
source: GLTFId;
|
|
719
|
+
extras?: any;
|
|
720
|
+
};
|
|
721
|
+
/**
|
|
722
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#gltf-extension-1
|
|
723
|
+
*/
|
|
724
|
+
export type GLTF_EXT_feature_metadata = {
|
|
725
|
+
/** An object defining classes and enums. */
|
|
726
|
+
schema?: ExtFeatureMetadataSchema;
|
|
727
|
+
/** A uri to an external schema file. */
|
|
728
|
+
schemaUri?: string;
|
|
729
|
+
/** An object containing statistics about features. */
|
|
730
|
+
statistics?: Statistics;
|
|
731
|
+
/** A dictionary, where each key is a feature table ID and each value is an object defining the feature table. */
|
|
732
|
+
featureTables?: {
|
|
733
|
+
[key: string]: EXT_feature_metadata_feature_table;
|
|
734
|
+
};
|
|
735
|
+
/** A dictionary, where each key is a feature texture ID and each value is an object defining the feature texture. */
|
|
736
|
+
featureTextures?: {
|
|
737
|
+
[key: string]: FeatureTexture;
|
|
738
|
+
};
|
|
739
|
+
extensions?: any;
|
|
740
|
+
extras?: any;
|
|
741
|
+
[key: string]: any;
|
|
742
|
+
};
|
|
743
|
+
/**
|
|
744
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#schema
|
|
745
|
+
*/
|
|
746
|
+
type ExtFeatureMetadataSchema = {
|
|
747
|
+
/** The name of the schema. */
|
|
748
|
+
name?: string;
|
|
749
|
+
/** The description of the schema. */
|
|
750
|
+
description?: string;
|
|
751
|
+
/** Application-specific version of the schema. */
|
|
752
|
+
version?: string;
|
|
753
|
+
/** A dictionary, where each key is a class ID and each value is an object defining the class. */
|
|
754
|
+
classes?: {
|
|
755
|
+
[key: string]: EXT_feature_metadata_class_object;
|
|
756
|
+
};
|
|
757
|
+
/** A dictionary, where each key is an enum ID and each value is an object defining the values for the enum. */
|
|
758
|
+
enums?: {
|
|
759
|
+
[key: string]: ExtFeatureMetadataEnum;
|
|
760
|
+
};
|
|
761
|
+
extensions?: any;
|
|
762
|
+
extras?: any;
|
|
763
|
+
[key: string]: any;
|
|
764
|
+
};
|
|
765
|
+
/**
|
|
766
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class
|
|
767
|
+
*/
|
|
768
|
+
export type EXT_feature_metadata_class_object = {
|
|
769
|
+
/** The name of the class, e.g. for display purposes. */
|
|
770
|
+
name?: string;
|
|
771
|
+
/** The description of the class. */
|
|
772
|
+
description?: string;
|
|
773
|
+
/** A dictionary, where each key is a property ID and each value is an object defining the property. */
|
|
774
|
+
properties: {
|
|
775
|
+
[key: string]: ClassProperty;
|
|
776
|
+
};
|
|
777
|
+
extensions?: any;
|
|
778
|
+
extras?: any;
|
|
779
|
+
[key: string]: any;
|
|
780
|
+
};
|
|
781
|
+
/**
|
|
782
|
+
* https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class-property
|
|
783
|
+
*/
|
|
784
|
+
export type ClassProperty = {
|
|
785
|
+
/** The name of the property, e.g. for display purposes. */
|
|
786
|
+
name?: string;
|
|
787
|
+
/** The description of the property. */
|
|
788
|
+
description?: string;
|
|
789
|
+
/**
|
|
790
|
+
* The property type. If ENUM is used, then enumType must also be specified.
|
|
791
|
+
* If ARRAY is used, then componentType must also be specified.
|
|
792
|
+
* ARRAY is a fixed-length array when componentCount is defined, and variable-length otherwise.
|
|
793
|
+
*/
|
|
794
|
+
type: ClassPropertyType;
|
|
795
|
+
/**
|
|
796
|
+
* An enum ID as declared in the enums dictionary.
|
|
797
|
+
* This value must be specified when type or componentType is ENUM.
|
|
798
|
+
*/
|
|
799
|
+
enumType?: string;
|
|
800
|
+
/**
|
|
801
|
+
* When type is ARRAY this indicates the type of each component of the array.
|
|
802
|
+
* If ENUM is used, then enumType must also be specified.
|
|
803
|
+
*/
|
|
804
|
+
componentType?: 'INT8' | 'UINT8' | 'INT16' | 'UINT16' | 'INT32' | 'UINT32' | 'INT64' | 'UINT64' | 'FLOAT32' | 'FLOAT64' | 'BOOLEAN' | 'STRING' | 'ENUM';
|
|
805
|
+
/** The number of components per element for ARRAY elements. */
|
|
806
|
+
componentCount?: number;
|
|
807
|
+
/**
|
|
808
|
+
* Specifies whether integer values are normalized.
|
|
809
|
+
* This applies both when type is an integer type, or when type is ARRAY with a componentType that is an integer type.
|
|
810
|
+
* For unsigned integer types, values are normalized between [0.0, 1.0].
|
|
811
|
+
* For signed integer types, values are normalized between [-1.0, 1.0].
|
|
812
|
+
* For all other types, this property is ignored.
|
|
813
|
+
*/
|
|
814
|
+
normalized: boolean;
|
|
815
|
+
/**
|
|
816
|
+
* Maximum allowed values for property values.
|
|
817
|
+
* Only applicable for numeric types and fixed-length arrays of numeric types.
|
|
818
|
+
* For numeric types this is a single number.
|
|
819
|
+
* For fixed-length arrays this is an array with componentCount number of elements.
|
|
820
|
+
* The normalized property has no effect on these values: they always correspond to the integer values.
|
|
821
|
+
*/
|
|
822
|
+
max?: number | number[];
|
|
823
|
+
/**
|
|
824
|
+
* Minimum allowed values for property values.
|
|
825
|
+
* Only applicable for numeric types and fixed-length arrays of numeric types.
|
|
826
|
+
* For numeric types this is a single number.
|
|
827
|
+
* For fixed-length arrays this is an array with componentCount number of elements.
|
|
828
|
+
* The normalized property has no effect on these values: they always correspond to the integer values.
|
|
829
|
+
*/
|
|
830
|
+
min?: number | number[];
|
|
831
|
+
/**
|
|
832
|
+
* A default value to use when the property value is not defined.
|
|
833
|
+
* If used, optional must be set to true.
|
|
834
|
+
* The type of the default value must match the property definition: For BOOLEAN use true or false.
|
|
835
|
+
* For STRING use a JSON string. For a numeric type use a JSON number.
|
|
836
|
+
* For ENUM use the enum name, not the integer value.
|
|
837
|
+
* For ARRAY use a JSON array containing values matching the componentType.
|
|
838
|
+
*/
|
|
839
|
+
default?: boolean | number | string | number[];
|
|
840
|
+
/** If true, this property is optional. */
|
|
841
|
+
optional?: boolean;
|
|
842
|
+
/**
|
|
843
|
+
* An identifier that describes how this property should be interpreted.
|
|
844
|
+
* The semantic cannot be used by other properties in the class.
|
|
845
|
+
*/
|
|
846
|
+
semantic?: string;
|
|
847
|
+
extensions?: any;
|
|
848
|
+
extras?: any;
|
|
849
|
+
[key: string]: any;
|
|
850
|
+
};
|
|
851
|
+
/**
|
|
852
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#classpropertytype
|
|
853
|
+
*/
|
|
854
|
+
type ClassPropertyType = 'INT8' | 'UINT8' | 'INT16' | 'UINT16' | 'INT32' | 'UINT32' | 'INT64' | 'UINT64' | 'FLOAT32' | 'FLOAT64' | 'BOOLEAN' | 'STRING' | 'ENUM' | 'ARRAY';
|
|
855
|
+
/**
|
|
856
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#enum
|
|
857
|
+
*/
|
|
858
|
+
type ExtFeatureMetadataEnum = {
|
|
859
|
+
/** The name of the enum, e.g. for display purposes. */
|
|
860
|
+
name?: string;
|
|
861
|
+
/** The description of the enum. */
|
|
862
|
+
description?: string;
|
|
863
|
+
/** The type of the integer enum value. */
|
|
864
|
+
valueType?: 'INT8' | 'UINT8' | 'INT16' | 'UINT16' | 'INT32' | 'UINT32' | 'INT64' | 'UINT64';
|
|
865
|
+
/** An array of enum values. Duplicate names or duplicate integer values are not allowed. */
|
|
866
|
+
values: EnumValue[];
|
|
867
|
+
extensions?: any;
|
|
868
|
+
extras?: any;
|
|
869
|
+
[key: string]: any;
|
|
870
|
+
};
|
|
871
|
+
/**
|
|
872
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#enum-value
|
|
873
|
+
*/
|
|
874
|
+
type EnumValue = {
|
|
875
|
+
/** The name of the enum value. */
|
|
876
|
+
name: string;
|
|
877
|
+
/** The description of the enum value. */
|
|
878
|
+
description?: string;
|
|
879
|
+
/** The integer enum value. */
|
|
880
|
+
value: number;
|
|
881
|
+
extensions?: any;
|
|
882
|
+
extras?: any;
|
|
883
|
+
[key: string]: any;
|
|
884
|
+
};
|
|
885
|
+
/**
|
|
886
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-table
|
|
887
|
+
*/
|
|
888
|
+
export type EXT_feature_metadata_feature_table = {
|
|
889
|
+
featureTable: any;
|
|
890
|
+
/** The class that property values conform to. The value must be a class ID declared in the classes dictionary. */
|
|
891
|
+
class?: string;
|
|
892
|
+
/** The number of features, as well as the number of elements in each property array. */
|
|
893
|
+
count: number;
|
|
894
|
+
/**
|
|
895
|
+
* A dictionary, where each key corresponds to a property ID in the class properties dictionary
|
|
896
|
+
* and each value is an object describing where property values are stored.
|
|
897
|
+
* Optional properties may be excluded from this dictionary.
|
|
898
|
+
*/
|
|
899
|
+
properties?: {
|
|
900
|
+
[key: string]: FeatureTableProperty;
|
|
901
|
+
};
|
|
902
|
+
extensions?: any;
|
|
903
|
+
extras?: any;
|
|
904
|
+
[key: string]: any;
|
|
905
|
+
};
|
|
906
|
+
/**
|
|
907
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-table-property
|
|
908
|
+
*/
|
|
909
|
+
export type FeatureTableProperty = {
|
|
910
|
+
/**
|
|
911
|
+
* The index of the buffer view containing property values.
|
|
912
|
+
* The data type of property values is determined by the property definition:
|
|
913
|
+
* When type is BOOLEAN values are packed into a bitfield.
|
|
914
|
+
* When type is STRING values are stored as byte sequences and decoded as UTF-8 strings.
|
|
915
|
+
* When type is a numeric type values are stored as the provided type.
|
|
916
|
+
* When type is ENUM values are stored as the enum's valueType.
|
|
917
|
+
* Each enum value in the buffer must match one of the allowed values in the enum definition.
|
|
918
|
+
* When type is ARRAY elements are packed tightly together and the data type is based on the componentType following the same rules as above.
|
|
919
|
+
* arrayOffsetBufferView is required for variable-size arrays
|
|
920
|
+
* and stringOffsetBufferView is required for strings (for variable-length arrays of strings, both are required)
|
|
921
|
+
* The buffer view byteOffset must be aligned to a multiple of 8 bytes.
|
|
922
|
+
* If the buffer view's buffer is the GLB-stored BIN chunk the byte offset is measured relative to the beginning of the GLB.
|
|
923
|
+
* Otherwise it is measured relative to the beginning of the buffer.
|
|
924
|
+
*/
|
|
925
|
+
bufferView: number;
|
|
926
|
+
/** The type of values in arrayOffsetBufferView and stringOffsetBufferView. */
|
|
927
|
+
offsetType?: string;
|
|
928
|
+
/**
|
|
929
|
+
* The index of the buffer view containing offsets for variable-length arrays.
|
|
930
|
+
* The number of offsets is equal to the feature table count plus one.
|
|
931
|
+
* The offsets represent the start positions of each array, with the last offset representing the position after the last array.
|
|
932
|
+
* The array length is computed using the difference between the current offset and the subsequent offset.
|
|
933
|
+
* If componentType is STRING the offsets index into the string offsets array (stored in stringOffsetBufferView),
|
|
934
|
+
* otherwise they index into the property array (stored in bufferView).
|
|
935
|
+
* The data type of these offsets is determined by offsetType.
|
|
936
|
+
* The buffer view byteOffset must be aligned to a multiple of 8 bytes in the same manner as the main bufferView
|
|
937
|
+
*/
|
|
938
|
+
arrayOffsetBufferView?: number;
|
|
939
|
+
/**
|
|
940
|
+
* The index of the buffer view containing offsets for strings.
|
|
941
|
+
* The number of offsets is equal to the number of string components plus one.
|
|
942
|
+
* The offsets represent the byte offsets of each string in the main bufferView,
|
|
943
|
+
* with the last offset representing the byte offset after the last string.
|
|
944
|
+
* The string byte length is computed using the difference between the current offset and the subsequent offset.
|
|
945
|
+
* The data type of these offsets is determined by offsetType.
|
|
946
|
+
* The buffer view byteOffset must be aligned to a multiple of 8 bytes in the same manner as the main bufferView.
|
|
947
|
+
*/
|
|
948
|
+
stringOffsetBufferView?: number;
|
|
949
|
+
extensions?: any;
|
|
950
|
+
extras?: any;
|
|
951
|
+
[key: string]: any;
|
|
952
|
+
};
|
|
953
|
+
/**
|
|
954
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#feature-texture
|
|
955
|
+
*/
|
|
956
|
+
type FeatureTexture = {
|
|
957
|
+
/** The class this feature texture conforms to. The value must be a class ID declared in the classes dictionary. */
|
|
958
|
+
class: string;
|
|
959
|
+
/**
|
|
960
|
+
* A dictionary, where each key corresponds to a property ID in the class properties dictionary
|
|
961
|
+
* and each value describes the texture channels containing property values.
|
|
962
|
+
*/
|
|
963
|
+
properties: {
|
|
964
|
+
[key: string]: TextureAccessor;
|
|
965
|
+
};
|
|
966
|
+
extensions?: any;
|
|
967
|
+
extras?: any;
|
|
968
|
+
[key: string]: any;
|
|
969
|
+
};
|
|
970
|
+
/**
|
|
971
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#texture-accessor
|
|
972
|
+
*/
|
|
973
|
+
type TextureAccessor = {
|
|
974
|
+
/** Texture channels containing property values. Channels are labeled by rgba and are swizzled with a string of 1-4 characters. */
|
|
975
|
+
channels: string;
|
|
976
|
+
/** The glTF texture and texture coordinates to use. */
|
|
977
|
+
texture: TextureInfo;
|
|
978
|
+
extensions?: any;
|
|
979
|
+
extras?: any;
|
|
980
|
+
[key: string]: any;
|
|
981
|
+
};
|
|
982
|
+
/**
|
|
983
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#statistics-1
|
|
984
|
+
*/
|
|
985
|
+
type Statistics = {
|
|
986
|
+
/**
|
|
987
|
+
* A dictionary, where each key is a class ID declared in the classes dictionary
|
|
988
|
+
* and each value is an object containing statistics about features that conform to the class.
|
|
989
|
+
*/
|
|
990
|
+
classes?: {
|
|
991
|
+
[key: string]: ClassStatistics;
|
|
992
|
+
};
|
|
993
|
+
extensions?: any;
|
|
994
|
+
extras?: any;
|
|
995
|
+
[key: string]: any;
|
|
996
|
+
};
|
|
997
|
+
/**
|
|
998
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#class-statistics
|
|
999
|
+
*/
|
|
1000
|
+
type ClassStatistics = {
|
|
1001
|
+
/** The number of features that conform to the class. */
|
|
1002
|
+
count?: number;
|
|
1003
|
+
/**
|
|
1004
|
+
* A dictionary, where each key is a class ID declared in the classes dictionary
|
|
1005
|
+
* and each value is an object containing statistics about property values.
|
|
1006
|
+
*/
|
|
1007
|
+
properties?: {
|
|
1008
|
+
[key: string]: StatisticsClassProperty;
|
|
1009
|
+
};
|
|
1010
|
+
extensions?: any;
|
|
1011
|
+
extras?: any;
|
|
1012
|
+
[key: string]: any;
|
|
1013
|
+
};
|
|
1014
|
+
/**
|
|
1015
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#property-statistics
|
|
1016
|
+
* min, max, mean, median, standardDeviation, variance, sum are
|
|
1017
|
+
* only applicable for numeric types and fixed-length arrays of numeric types.
|
|
1018
|
+
* For numeric types this is a single number.
|
|
1019
|
+
* For fixed-length arrays this is an array with componentCount number of elements.
|
|
1020
|
+
* The normalized property has no effect on these values.
|
|
1021
|
+
*/
|
|
1022
|
+
type StatisticsClassProperty = {
|
|
1023
|
+
/** The minimum property value. */
|
|
1024
|
+
min?: number | number[];
|
|
1025
|
+
/** The maximum property value. */
|
|
1026
|
+
max?: number | number[];
|
|
1027
|
+
/** The arithmetic mean of the property values. */
|
|
1028
|
+
mean?: number | number[];
|
|
1029
|
+
/** The median of the property values. */
|
|
1030
|
+
median?: number | number[];
|
|
1031
|
+
/** The standard deviation of the property values. */
|
|
1032
|
+
standardDeviation?: number | number[];
|
|
1033
|
+
/** The variance of the property values. */
|
|
1034
|
+
variance?: number | number[];
|
|
1035
|
+
/** The sum of the property values. */
|
|
1036
|
+
sum?: number | number[];
|
|
1037
|
+
/**
|
|
1038
|
+
* A dictionary, where each key corresponds to an enum name and each value is the number of occurrences of that enum.
|
|
1039
|
+
* Only applicable when type or componentType is ENUM.
|
|
1040
|
+
* For fixed-length arrays, this is an array with componentCount number of elements.
|
|
1041
|
+
*/
|
|
1042
|
+
occurrences: {
|
|
1043
|
+
[key: string]: number | number[];
|
|
1044
|
+
};
|
|
1045
|
+
extensions?: any;
|
|
1046
|
+
extras?: any;
|
|
1047
|
+
[key: string]: any;
|
|
1048
|
+
};
|
|
1049
|
+
/**
|
|
1050
|
+
* 3DTilesNext EXT_feature_metadata primitive extension
|
|
1051
|
+
* Spec - https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata#primitive-extension
|
|
1052
|
+
*/
|
|
1053
|
+
export type GLTF_EXT_feature_metadata_primitive = {
|
|
1054
|
+
/** Feature ids definition in attributes */
|
|
1055
|
+
featureIdAttributes?: GLTF_EXT_feature_metadata_attribute[];
|
|
1056
|
+
/** Feature ids definition in textures */
|
|
1057
|
+
featureIdTextures?: GLTF_EXT_feature_metadata_attribute[];
|
|
1058
|
+
/** An array of IDs of feature textures from the root EXT_feature_metadata object. */
|
|
1059
|
+
featureTextures?: string[];
|
|
1060
|
+
extensions?: any;
|
|
1061
|
+
extras?: any;
|
|
1062
|
+
[key: string]: any;
|
|
1063
|
+
};
|
|
1064
|
+
/**
|
|
1065
|
+
* Attribute which described featureIds definition.
|
|
1066
|
+
*/
|
|
1067
|
+
export type GLTF_EXT_feature_metadata_attribute = {
|
|
1068
|
+
/** Name of feature table */
|
|
1069
|
+
featureTable: string;
|
|
1070
|
+
/** Described how feature ids are defined */
|
|
1071
|
+
featureIds: ExtFeatureMetadataFeatureIds;
|
|
1072
|
+
extensions?: any;
|
|
1073
|
+
extras?: any;
|
|
1074
|
+
[key: string]: any;
|
|
1075
|
+
};
|
|
1076
|
+
/**
|
|
1077
|
+
* Defining featureIds by attributes or implicitly.
|
|
1078
|
+
*/
|
|
1079
|
+
type ExtFeatureMetadataFeatureIds = {
|
|
1080
|
+
/** Name of attribute where featureIds are defined */
|
|
1081
|
+
attribute?: string;
|
|
1082
|
+
/** Sets a constant feature ID for each vertex. The default is 0. */
|
|
1083
|
+
constant?: number;
|
|
1084
|
+
/** Sets the rate at which feature IDs increment.
|
|
1085
|
+
* If divisor is zero then constant is used.
|
|
1086
|
+
* If divisor is greater than zero the feature ID increments once per divisor sets of vertices, starting at constant.
|
|
1087
|
+
* The default is 0
|
|
1088
|
+
*/
|
|
1089
|
+
divisor?: number;
|
|
1090
|
+
/** gLTF textureInfo object - https://github.com/CesiumGS/glTF/blob/3d-tiles-next/specification/2.0/schema/textureInfo.schema.json */
|
|
1091
|
+
texture?: ExtFeatureMetadataTexture;
|
|
1092
|
+
/** Must be a single channel ("r", "g", "b", or "a") */
|
|
1093
|
+
channels?: 'r' | 'g' | 'b' | 'a';
|
|
1094
|
+
};
|
|
1095
|
+
/**
|
|
1096
|
+
* Reference to a texture.
|
|
1097
|
+
*/
|
|
1098
|
+
type ExtFeatureMetadataTexture = {
|
|
1099
|
+
/** The set index of texture's TEXCOORD attribute used for texture coordinate mapping.*/
|
|
1100
|
+
texCoord: number;
|
|
1101
|
+
/** The index of the texture. */
|
|
1102
|
+
index: number;
|
|
1103
|
+
};
|
|
1104
|
+
export {};
|
|
1105
|
+
//# sourceMappingURL=gltf-json-schema.d.ts.map
|