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