├── .eslintignore
├── .eslintrc.json
├── .gitattributes
├── .gitignore
├── .vscode
├── extensions.json
├── launch.json
├── settings.json
└── tasks.json
├── .vscodeignore
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CONTRIBUTORS.md
├── LICENSE.md
├── README.md
├── engines
├── Babylon
│ ├── README.md
│ ├── babylon.ktx2Decoder.js
│ ├── logo.svg
│ ├── meshopt_decoder.js
│ └── zstddec.wasm
├── Basis
│ ├── README.md
│ ├── msc_basis_transcoder.js
│ ├── msc_basis_transcoder.wasm
│ ├── uastc_astc.wasm
│ ├── uastc_bc7.wasm
│ ├── uastc_rgba32_srgb.wasm
│ └── uastc_rgba32_unorm.wasm
├── Draco
│ ├── README.md
│ ├── draco_decoder.js
│ ├── draco_decoder.wasm
│ └── draco_wasm_wrapper.js
└── Three
│ ├── README.md
│ └── logo.png
├── environments
├── babylon
│ ├── README.md
│ └── symmetrical_garden.env
├── hdr
│ ├── README.md
│ └── symmetrical_garden_1k.hdr
└── ktx
│ ├── README.md
│ ├── symmetrical_garden_ibl.ktx
│ └── symmetrical_garden_skybox.ktx
├── images
├── BabylonInspector.png
├── Conversion.png
├── DamagedHelmet.png
├── EmissionHover.png
├── GlbConversion.png
├── HowToInstall.png
├── ImportGlbPart1.png
├── ImportGlbPart2.png
├── InspectData.png
├── InspectMeshPrimitive.png
├── PropertyAutocomplete.png
├── QuickFixAddExtension.png
├── QuickFixAddTarget.png
├── SampleValidationErrors.png
├── SampleValidationIcons.png
├── SelectTriangles.png
├── SelectVertex.png
├── StatesEnable.png
└── gltf.png
├── package-lock.json
├── package.json
├── pages
├── babylonDebug.js
├── babylonView.css
├── babylonView.html
├── babylonView.js
├── cesiumView.css
├── cesiumView.html
├── cesiumView.js
├── filamentView.css
├── filamentView.html
├── filamentView.js
├── imagePreview.css
├── previewModel.css
├── previewModel.html
├── previewModel.js
├── threeView.css
├── threeView.html
└── threeView.js
├── resources
├── dark
│ ├── animation.svg
│ ├── debug-disabled.svg
│ ├── debug-enabled.svg
│ ├── inspect.svg
│ ├── material.svg
│ ├── mesh.svg
│ ├── scene.svg
│ ├── skeleton.svg
│ ├── skin.svg
│ ├── texture.svg
│ └── tf-logo.svg
└── light
│ ├── animation.svg
│ ├── debug-disabled.svg
│ ├── debug-enabled.svg
│ ├── inspect.svg
│ ├── material.svg
│ ├── mesh.svg
│ ├── scene.svg
│ ├── skeleton.svg
│ ├── skin.svg
│ └── texture.svg
├── schemas
├── glTF.chooser.schema.json
├── gltf-1.0
│ ├── accessor.schema.json
│ ├── animation.channel.schema.json
│ ├── animation.channel.target.schema.json
│ ├── animation.parameter.schema.json
│ ├── animation.sampler.schema.json
│ ├── animation.schema.json
│ ├── arrayValues.schema.json
│ ├── asset.profile.schema.json
│ ├── asset.schema.json
│ ├── buffer.schema.json
│ ├── bufferView.schema.json
│ ├── camera.orthographic.schema.json
│ ├── camera.perspective.schema.json
│ ├── camera.schema.json
│ ├── extension.schema.json
│ ├── extras.schema.json
│ ├── glTF.schema.json
│ ├── glTFChildOfRootProperty.schema.json
│ ├── glTFProperty.schema.json
│ ├── glTFid.schema.json
│ ├── image.schema.json
│ ├── material.schema.json
│ ├── material.values.schema.json
│ ├── mesh.primitive.attribute.schema.json
│ ├── mesh.primitive.schema.json
│ ├── mesh.schema.json
│ ├── node.schema.json
│ ├── program.schema.json
│ ├── sampler.schema.json
│ ├── scene.schema.json
│ ├── shader.schema.json
│ ├── skin.schema.json
│ ├── technique.attribute.schema.json
│ ├── technique.parameters.schema.json
│ ├── technique.schema.json
│ ├── technique.states.functions.schema.json
│ ├── technique.states.schema.json
│ ├── technique.uniform.schema.json
│ └── texture.schema.json
└── gltf-2.0
│ ├── accessor.schema.json
│ ├── accessor.sparse.indices.schema.json
│ ├── accessor.sparse.schema.json
│ ├── accessor.sparse.values.schema.json
│ ├── animation.channel.schema.json
│ ├── animation.channel.target.schema.json
│ ├── animation.sampler.schema.json
│ ├── animation.schema.json
│ ├── asset.schema.json
│ ├── buffer.schema.json
│ ├── bufferView.schema.json
│ ├── camera.orthographic.schema.json
│ ├── camera.perspective.schema.json
│ ├── camera.schema.json
│ ├── extension.schema.json
│ ├── extensions
│ ├── AGI_articulations
│ │ ├── articulation.schema.json
│ │ ├── articulation.stage.schema.json
│ │ ├── gltf.AGI_articulations.schema.json
│ │ └── node.AGI_articulations.schema.json
│ ├── AGI_stk_metadata
│ │ ├── gltf.AGI_stk_metadata.schema.json
│ │ ├── node.AGI_stk_metadata.schema.json
│ │ └── solarPanelGroup.schema.json
│ ├── EXT_lights_image_based
│ │ ├── glTF.EXT_lights_image_based.schema.json
│ │ ├── light.schema.json
│ │ └── scene.EXT_lights_image_based.schema.json
│ ├── EXT_mesh_gpu_instancing
│ │ └── glTF.EXT_mesh_gpu_instancing.schema.json
│ ├── EXT_mesh_manifold
│ │ └── mesh.EXT_mesh_manifold.schema.json
│ ├── EXT_meshopt_compression
│ │ ├── buffer.EXT_meshopt_compression.schema.json
│ │ └── bufferView.EXT_meshopt_compression.schema.json
│ ├── EXT_texture_webp
│ │ └── glTF.EXT_texture_webp.schema.json
│ ├── KHR_animation_pointer
│ │ └── animation.channel.target.KHR_animation_pointer.schema.json
│ ├── KHR_draco_mesh_compression
│ │ └── mesh.primitive.KHR_draco_mesh_compression.schema.json
│ ├── KHR_lights_punctual
│ │ ├── glTF.KHR_lights_punctual.schema.json
│ │ ├── light.schema.json
│ │ ├── light.spot.schema.json
│ │ └── node.KHR_lights_punctual.schema.json
│ ├── KHR_materials_anisotropy
│ │ └── material.KHR_materials_anisotropy.schema.json
│ ├── KHR_materials_clearcoat
│ │ └── material.KHR_materials_clearcoat.schema.json
│ ├── KHR_materials_diffuse_transmission
│ │ └── glTF.KHR_materials_diffuse_transmission.schema.json
│ ├── KHR_materials_dispersion
│ │ └── material.KHR_materials_dispersion.schema.json
│ ├── KHR_materials_emissive_strength
│ │ └── material.KHR_materials_emissive_strength.schema.json
│ ├── KHR_materials_ior
│ │ └── material.KHR_materials_ior.schema.json
│ ├── KHR_materials_iridescence
│ │ └── material.KHR_materials_iridescence.schema.json
│ ├── KHR_materials_pbrSpecularGlossiness
│ │ └── glTF.KHR_materials_pbrSpecularGlossiness.schema.json
│ ├── KHR_materials_sheen
│ │ └── material.KHR_materials_sheen.schema.json
│ ├── KHR_materials_specular
│ │ └── material.KHR_materials_specular.schema.json
│ ├── KHR_materials_transmission
│ │ └── material.KHR_materials_transmission.schema.json
│ ├── KHR_materials_unlit
│ │ └── material.KHR_materials_unlit.schema.json
│ ├── KHR_materials_variants
│ │ ├── glTF.KHR_materials_variants.schema.json
│ │ └── mesh.primitive.KHR_materials_variants.schema.json
│ ├── KHR_materials_volume
│ │ └── material.KHR_materials_volume.schema.json
│ ├── KHR_techniques_webgl
│ │ ├── glTF.KHR_techniques_webgl.schema.json
│ │ ├── material.KHR_techniques_webgl.schema.json
│ │ ├── program.schema.json
│ │ ├── shader.schema.json
│ │ ├── technique.attribute.schema.json
│ │ ├── technique.schema.json
│ │ ├── technique.uniform.schema.json
│ │ └── uniform.value.schema.json
│ ├── KHR_texture_basisu
│ │ └── texture.KHR_texture_basisu.schema.json
│ ├── KHR_texture_transform
│ │ └── textureInfo.KHR_texture_transform.schema.json
│ ├── KHR_xmp
│ │ ├── glTF.KHR_xmp.schema.json
│ │ └── node.KHR_xmp.schema.json
│ └── KHR_xmp_json_ld
│ │ ├── KHR_xmp_json_ld.schema.json
│ │ └── glTF.KHR_xmp_json_ld.schema.json
│ ├── extras.schema.json
│ ├── glTF.schema.json
│ ├── glTFChildOfRootProperty.schema.json
│ ├── glTFProperty.schema.json
│ ├── glTFid.schema.json
│ ├── image.schema.json
│ ├── material.normalTextureInfo.schema.json
│ ├── material.occlusionTextureInfo.schema.json
│ ├── material.pbrMetallicRoughness.schema.json
│ ├── material.schema.json
│ ├── mesh.primitive.schema.json
│ ├── mesh.schema.json
│ ├── node.schema.json
│ ├── sampler.schema.json
│ ├── scene.schema.json
│ ├── skin.schema.json
│ ├── texture.schema.json
│ └── textureInfo.schema.json
├── server
├── package-lock.json
├── package.json
├── src
│ └── server.ts
└── tsconfig.json
├── src
├── GLTF2.d.ts
├── contextBase.ts
├── dataUriTextDocumentContentProvider.ts
├── editorUtilities.ts
├── extension.ts
├── gltfActionProvider.ts
├── gltfInspectData.ts
├── gltfOutline.ts
├── gltfPreview.ts
├── gltfWindow.ts
├── utilities.ts
└── validationProvider.ts
├── test
├── extension.test.ts
└── index.ts
├── tsconfig.json
└── util
├── PUBLISH.md
├── README.md
├── extensionMap2.0.json
├── fixThree.js
├── importAll.sh
├── importSchema.js
└── validateSchema.js
/.eslintignore:
--------------------------------------------------------------------------------
1 | engines/
2 |
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "parser": "@typescript-eslint/parser",
3 | "extends": [
4 | "eslint:recommended"
5 | ],
6 | "plugins": [
7 | "html"
8 | ],
9 | "env": {
10 | "browser": true
11 | },
12 | "parserOptions": {
13 | "ecmaVersion": 2020,
14 | "sourceType": "module"
15 | },
16 | "globals": {
17 | "process": false,
18 | "setImmediate": false,
19 | "Set": false,
20 | "Map": false,
21 | "Buffer": false,
22 | "Promise": false,
23 | "Float32Array": false,
24 | "Float64Array": false,
25 | "Int16Array": false,
26 | "Int32Array": false,
27 | "Int8Array": false,
28 | "Uint16Array": false,
29 | "Uint32Array": false,
30 | "Uint8Array": false,
31 | "Uint8ClampedArray": false
32 | },
33 | "rules": {
34 | "curly": "error",
35 | "block-scoped-var": "error",
36 | "eqeqeq": "error",
37 | "eol-last": ["error", "always"],
38 | "no-alert": "error",
39 | "no-caller": "error",
40 | "no-console": "off",
41 | "no-else-return": "error",
42 | "no-empty": "error",
43 | "no-extend-native": "error",
44 | "no-extra-boolean-cast": "off",
45 | "no-floating-decimal": "error",
46 | "no-irregular-whitespace": "error",
47 | "no-lonely-if": "error",
48 | "no-loop-func": "error",
49 | "no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1 }],
50 | "no-new": "error",
51 | "no-prototype-builtins": "off",
52 | "no-sequences": "error",
53 | "no-tabs": "error",
54 | "no-trailing-spaces": "error",
55 | "no-undef": "error",
56 | "no-undef-init": "error",
57 | "no-restricted-globals": ["error", "fdescribe", "fit"],
58 | "no-unused-expressions": "error",
59 | "no-useless-escape": "off",
60 | "no-use-before-define": ["error", "nofunc"],
61 | "require-atomic-updates": "off",
62 | "wrap-iife": ["error", "any"],
63 |
64 | "strict": "off",
65 | "semi": "error",
66 | "prefer-const": "off"
67 | },
68 | "overrides": [
69 | {
70 | "files": ["*.ts"],
71 | "plugins": [
72 | "@typescript-eslint"
73 | ],
74 | "extends": [
75 | "plugin:@typescript-eslint/eslint-recommended",
76 | "plugin:@typescript-eslint/recommended"
77 | ],
78 | "rules": {
79 | "prefer-const": "off",
80 | "@typescript-eslint/no-empty-function": "off",
81 | "@typescript-eslint/no-explicit-any": "off",
82 | "@typescript-eslint/no-unused-vars": "off",
83 | "@typescript-eslint/ban-types": "off",
84 | "@typescript-eslint/triple-slash-reference": "off"
85 | }
86 | }
87 | ]
88 | }
89 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Workaround for https://github.com/npm/npm/issues/17161
2 | package*.json text eol=lf
3 |
4 | # Because these are generated as such
5 | schemas/*/*.json text eol=lf
6 | schemas/*/*/*.json text eol=lf
7 | schemas/*/*/*/*.json text eol=lf
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | Thumbs.db
3 | desktop.ini
4 | out
5 | node_modules
6 | npm-debug.log
7 | debug.log
8 | gltf-vscode-*.vsix
9 |
10 | # For debugging
11 | engines/CesiumUnminified
12 |
13 | # Currently, VSCode insists on compiling the server to an output folder
14 | # named "server" at the root of the client, which is our workspace root.
15 | server/server.js*
16 | server/installServerIntoExtension*
17 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // See http://go.microsoft.com/fwlink/?LinkId=827846
3 | // for the documentation about the extensions.json format
4 | "recommendations": [
5 | "dbaeumer.vscode-eslint",
6 | "slevesque.shader"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | // A launch configuration that compiles the extension and then opens it inside a new window
2 | {
3 | "version": "0.2.0",
4 | "configurations": [
5 | {
6 | "name": "Launch Extension",
7 | "type": "extensionHost",
8 | "request": "launch",
9 | "runtimeExecutable": "${execPath}",
10 | "args": [
11 | "--extensionDevelopmentPath=${workspaceRoot}"
12 | ],
13 | "stopOnEntry": false,
14 | "sourceMaps": true,
15 | "outFiles": [
16 | "${workspaceRoot}/out/src/**/*.js"
17 | ],
18 | "preLaunchTask": "watch:client"
19 | },
20 | {
21 | "name": "Attach to Server",
22 | "type": "node",
23 | "request": "attach",
24 | "port": 6009,
25 | "sourceMaps": true,
26 | "outFiles": [
27 | "${workspaceRoot}/server/**/*.js"
28 | ],
29 | "protocol": "inspector",
30 | "preLaunchTask": "watch:server"
31 | }
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | // Place your settings in this file to overwrite default and user settings.
2 | {
3 | "files.exclude": {
4 | "**/.git": true,
5 | "**/.DS_Store": true,
6 | "**/Thumbs.db": true,
7 | "out": true,
8 | "server/etc": true,
9 | "server/server.js*" : true
10 | },
11 | "search.exclude": {
12 | "node_modules": true,
13 | "out": true,
14 | "server/server.js*": true
15 | },
16 | "typescript.tsdk": "./node_modules/typescript/lib",
17 | "typescript.tsc.autoDetect": "off",
18 | "files.trimTrailingWhitespace": true,
19 | "files.insertFinalNewline": true,
20 | "editor.insertSpaces": true,
21 | "editor.tabSize": 4,
22 | "editor.detectIndentation": false,
23 | "jshint.enable": false,
24 | "eslint.enable": true,
25 | "javascript.format.insertSpaceAfterCommaDelimiter": true,
26 | "javascript.format.insertSpaceAfterSemicolonInForStatements": true,
27 | "javascript.format.insertSpaceBeforeAndAfterBinaryOperators": true,
28 | "javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": true,
29 | "javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
30 | "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
31 | "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
32 | "javascript.format.placeOpenBraceOnNewLineForFunctions": false,
33 | "javascript.format.placeOpenBraceOnNewLineForControlBlocks": false
34 | }
35 |
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "compile",
6 | "dependsOn": [
7 | "compile:client",
8 | "compile:server"
9 | ],
10 | "problemMatcher": []
11 | },
12 | {
13 | "label": "compile:client",
14 | "type": "npm",
15 | "script": "compile:client",
16 | "group": "build",
17 | "presentation": {
18 | "panel": "dedicated",
19 | "reveal": "never"
20 | },
21 | "problemMatcher": [
22 | "$tsc"
23 | ]
24 | },
25 | {
26 | "label": "compile:server",
27 | "type": "npm",
28 | "script": "compile:server",
29 | "group": "build",
30 | "presentation": {
31 | "panel": "dedicated",
32 | "reveal": "never"
33 | },
34 | "problemMatcher": [
35 | "$tsc"
36 | ]
37 | },
38 | {
39 | "label": "watch",
40 | "dependsOn": [
41 | "watch:client",
42 | "watch:server"
43 | ],
44 | "group": {
45 | "kind": "build",
46 | "isDefault": true
47 | },
48 | "problemMatcher": []
49 | },
50 | {
51 | "label": "watch:client",
52 | "type": "npm",
53 | "script": "watch:client",
54 | "isBackground": true,
55 | "group": "build",
56 | "presentation": {
57 | "panel": "dedicated",
58 | "reveal": "never"
59 | },
60 | "problemMatcher": [
61 | "$tsc-watch"
62 | ]
63 | },
64 | {
65 | "label": "watch:server",
66 | "type": "npm",
67 | "script": "watch:server",
68 | "isBackground": true,
69 | "group": "build",
70 | "presentation": {
71 | "panel": "dedicated",
72 | "reveal": "never"
73 | },
74 | "problemMatcher": [
75 | "$tsc-watch"
76 | ]
77 | }
78 | ]
79 | }
80 |
--------------------------------------------------------------------------------
/.vscodeignore:
--------------------------------------------------------------------------------
1 | .git/**
2 | .vscode/**
3 | .vscode-test/**
4 | out/test/**
5 | test/**
6 | util/**
7 | src/**
8 | server/src/**
9 | engines/Cesium/**
10 | engines/CesiumUnminified/**
11 | engines/*/README.md
12 | node_modules/@cesium/**
13 | node_modules/@zip.js/**
14 | node_modules/autolinker/**
15 | node_modules/babylonjs-loaders/babylonjs.loaders.js
16 | node_modules/babylonjs-materials/**
17 | node_modules/cesium/.husky/**
18 | node_modules/cesium/Build/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_?.json
19 | node_modules/cesium/Build/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_1[0-5].json
20 | node_modules/cesium/Build/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_1[7-9].json
21 | node_modules/cesium/Build/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_2*.json
22 | node_modules/cesium/Build/Cesium/Assets/Textures/**
23 | node_modules/cesium/Build/Cesium/Assets/approx*
24 | node_modules/cesium/Build/Cesium/ThirdParty/*oog*
25 | node_modules/cesium/Build/Cesium/Widgets/**
26 | node_modules/cesium/Build/Cesium/Workers/*eometry*
27 | node_modules/cesium/Build/Cesium/Workers/Transforms*
28 | node_modules/cesium/Build/Cesium/Workers/*oog*
29 | node_modules/cesium/Build/Cesium/index.*
30 | node_modules/cesium/Build/CesiumUnminified/**
31 | node_modules/cesium/Source/**
32 | node_modules/cesium/*.md
33 | node_modules/draco3dgltf/draco_encoder.wasm
34 | node_modules/gltf-import-export/node_modules/**
35 | node_modules/gltumble/node_modules/**
36 | node_modules/pako/**
37 | node_modules/three/build/three.cjs
38 | node_modules/three/build/three.module.min.js
39 | node_modules/three/build/three.webgpu*
40 | node_modules/three/examples/fonts/**
41 | node_modules/three/examples/jsm/exporters/**
42 | node_modules/three/examples/jsm/libs/**
43 | !node_modules/three/examples/jsm/libs/ktx-parse.module.js
44 | !node_modules/three/examples/jsm/libs/zstddec.module.js
45 | !node_modules/three/examples/jsm/libs/basis/**
46 | !node_modules/three/examples/jsm/libs/meshopt*
47 | node_modules/three/examples/jsm/lights/**
48 | node_modules/three/examples/jsm/loaders/lwo/**
49 | node_modules/three/examples/jsm/loaders/FBXLoader.js
50 | node_modules/three/examples/jsm/loaders/ColladaLoader.js
51 | node_modules/three/examples/jsm/loaders/VRMLLoader.js
52 | node_modules/three/src/**
53 | node_modules/**/*.d.ts
54 | node_modules/**/*.max.js
55 | **/*.map
56 | **/*.map.js
57 | .gitignore
58 | tsconfig.json
59 | .eslint*
60 | gltf-vscode-*.vsix
61 | vsc-extension-quickstart.md
62 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 | We follow the [Contributor Covenant](http://contributor-covenant.org/)'s [Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/) to ensure a harassment-free experience in our community. Any unacceptable behavior can be confidentially sent to the team at info@agi.com.
4 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to gltf-vscode
2 |
3 | Thanks for contributing to gltf-vscode! By opening a Pull Request with your contribution to this
4 | code repository, you grant to the maintainers and to recipients of this software a perpetual, worldwide,
5 | non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare
6 | derivative works of, publicly display, publicly perform, sublicense, and distribute your
7 | contributions and such derivative works.
8 |
9 | ## Code of Conduct
10 |
11 | To ensure an inclusive community, contributors and users should follow the [code of conduct](./CODE_OF_CONDUCT.md).
12 |
13 | ## Developer Environment
14 |
15 | [VSCode](https://code.visualstudio.com/) itself is used for developing and debugging its own extensions.
16 |
17 | Please install the [ESLint extension by Dirk Baeumer](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) into VSCode.
18 |
19 | You will also need [NodeJS](https://nodejs.org/en/) installed, for npm package management.
20 |
21 | 1. Use `git` to clone this repository to a local disk.
22 | 2. Open a shell and run `npm install` in the root folder of the cloned repository, to install npm packages.
23 | 3. Launch VSCode and click "Open Folder" on the root of the cloned repository.
24 | 4. Press CTRL - P to open the task bar, and type `task watch` to launch the watch task.
25 |
26 | NOTE: It is important to launch the watch task every time you close and re-open VSCode. The extension has two parts now,
27 | a main part called the "client" and a separate process called the "glTF Language Server." If you don't
28 | manually start the build watcher, the client might be built without the server, and you will see an error. When the `watch`
29 | task is running, you will see a tiny icon in the bottom status bar with the number `2` next to a wrench-and-screwdriver
30 | icon. There are 2 watchers, one for the client and one for the server. If you only see `1` here, one of the watchers
31 | is not running.
32 |
33 | To launch the debugger, press F5. This will open a second copy of VSCode, with a built-from-source version of
34 | the extension installed. If you already have the glTF extension from the marketplace installed, there will be an info message
35 | letting you know that the built version has overwritten it for just the debugger session.
36 |
37 | ## CHANGELOG.md
38 |
39 | Please add bullet point(s) for changes or new features to the top of `CHANGELOG.md`. The publish date can be left as `UNRELEASED` since
40 | the release is not on any set schedule, and likely will not happen on the same day that the pull request is created.
41 |
42 | ## Debugging the Webview (glTF preview window) in VSCode
43 |
44 | This is tricky, because HTML is previewed inside a sandboxed iframe which is itself inside an embedded webview inside
45 | VSCode's Electron-based user interface. Here are the steps:
46 |
47 | 1. Open the glTF preview window.
48 |
49 | 2. Press F1 to open the command bar at the top of VSCode.
50 |
51 | 3. Type in and run the following command: `Developer: Open Webview Developer Tools`
52 |
53 | 4. In the top of the Console tab of DevTools, click the pull-down and change `top` to `active-frame (index.html)`.
54 |
55 | Now you can debug the HTML preview in the sandboxed iframe.
56 |
57 |
--------------------------------------------------------------------------------
/CONTRIBUTORS.md:
--------------------------------------------------------------------------------
1 | See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to gltf-vscode.
2 |
3 | Special thanks to all our contributors, without whom this project would not be possible. See the [list of contributors on GitHub](https://github.com/AnalyticalGraphicsInc/gltf-vscode/graphs/contributors), or by using Git tools.
4 |
--------------------------------------------------------------------------------
/engines/Babylon/README.md:
--------------------------------------------------------------------------------
1 | # Babylon.js 3D Engine
2 |
3 | Babylon is updated as a package dependency of this VS Code extension.
4 |
5 | Certain files are from the BabylonJS preview site:
6 |
7 | https://preview.babylonjs.com/babylon.ktx2Decoder.js
8 | https://preview.babylonjs.com/meshopt_decoder.js
9 | https://preview.babylonjs.com/zstddec.wasm
10 |
--------------------------------------------------------------------------------
/engines/Babylon/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/engines/Babylon/zstddec.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/engines/Babylon/zstddec.wasm
--------------------------------------------------------------------------------
/engines/Basis/README.md:
--------------------------------------------------------------------------------
1 | # Basis Transcoder
2 |
3 | Downloaded from the BabylonJS preview site:
4 |
5 | https://preview.babylonjs.com/ktx2Transcoders/msc_basis_transcoder.js
6 | https://preview.babylonjs.com/ktx2Transcoders/msc_basis_transcoder.wasm
7 | https://preview.babylonjs.com/ktx2Transcoders/uastc_astc.wasm
8 | https://preview.babylonjs.com/ktx2Transcoders/uastc_bc7.wasm
9 | https://preview.babylonjs.com/ktx2Transcoders/uastc_rgba32_unorm.wasm
10 | https://preview.babylonjs.com/ktx2Transcoders/uastc_rgba32_srgb.wasm
11 |
--------------------------------------------------------------------------------
/engines/Basis/msc_basis_transcoder.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/engines/Basis/msc_basis_transcoder.wasm
--------------------------------------------------------------------------------
/engines/Basis/uastc_astc.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/engines/Basis/uastc_astc.wasm
--------------------------------------------------------------------------------
/engines/Basis/uastc_bc7.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/engines/Basis/uastc_bc7.wasm
--------------------------------------------------------------------------------
/engines/Basis/uastc_rgba32_srgb.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/engines/Basis/uastc_rgba32_srgb.wasm
--------------------------------------------------------------------------------
/engines/Basis/uastc_rgba32_unorm.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/engines/Basis/uastc_rgba32_unorm.wasm
--------------------------------------------------------------------------------
/engines/Draco/README.md:
--------------------------------------------------------------------------------
1 | Files downloaded from:
2 |
3 | https://github.com/google/draco/tree/main/javascript
4 |
--------------------------------------------------------------------------------
/engines/Draco/draco_decoder.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/engines/Draco/draco_decoder.wasm
--------------------------------------------------------------------------------
/engines/Three/README.md:
--------------------------------------------------------------------------------
1 | # Three.js 3D Engine
2 |
3 | This is now a dependency in package.json.
4 |
--------------------------------------------------------------------------------
/engines/Three/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/engines/Three/logo.png
--------------------------------------------------------------------------------
/environments/babylon/README.md:
--------------------------------------------------------------------------------
1 | Symmertrical Garden
2 | CC0 (Public Domain) by Greg Zaal, HDRI Haven
3 | https://hdrihaven.com/hdri/?c=nature&h=symmetrical_garden
4 |
5 | Processed into a pre-filtered *.env file using BabylonJS Sandbox.
6 | https://doc.babylonjs.com/how_to/use_hdr_environment
7 |
--------------------------------------------------------------------------------
/environments/babylon/symmetrical_garden.env:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/environments/babylon/symmetrical_garden.env
--------------------------------------------------------------------------------
/environments/hdr/README.md:
--------------------------------------------------------------------------------
1 | Symmertrical Garden
2 | CC0 (Public Domain) by Greg Zaal, HDRI Haven
3 | https://hdrihaven.com/hdri/?c=nature&h=symmetrical_garden
4 |
--------------------------------------------------------------------------------
/environments/hdr/symmetrical_garden_1k.hdr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/environments/hdr/symmetrical_garden_1k.hdr
--------------------------------------------------------------------------------
/environments/ktx/README.md:
--------------------------------------------------------------------------------
1 | Symmertrical Garden
2 | CC0 (Public Domain) by Greg Zaal, HDRI Haven
3 | https://hdrihaven.com/hdri/?c=nature&h=symmetrical_garden
4 |
5 | Processed into RGBM KTX format by cmgen from an older release of Filament on 2018-10-17.
6 |
--------------------------------------------------------------------------------
/environments/ktx/symmetrical_garden_ibl.ktx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/environments/ktx/symmetrical_garden_ibl.ktx
--------------------------------------------------------------------------------
/environments/ktx/symmetrical_garden_skybox.ktx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/environments/ktx/symmetrical_garden_skybox.ktx
--------------------------------------------------------------------------------
/images/BabylonInspector.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/BabylonInspector.png
--------------------------------------------------------------------------------
/images/Conversion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/Conversion.png
--------------------------------------------------------------------------------
/images/DamagedHelmet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/DamagedHelmet.png
--------------------------------------------------------------------------------
/images/EmissionHover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/EmissionHover.png
--------------------------------------------------------------------------------
/images/GlbConversion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/GlbConversion.png
--------------------------------------------------------------------------------
/images/HowToInstall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/HowToInstall.png
--------------------------------------------------------------------------------
/images/ImportGlbPart1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/ImportGlbPart1.png
--------------------------------------------------------------------------------
/images/ImportGlbPart2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/ImportGlbPart2.png
--------------------------------------------------------------------------------
/images/InspectData.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/InspectData.png
--------------------------------------------------------------------------------
/images/InspectMeshPrimitive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/InspectMeshPrimitive.png
--------------------------------------------------------------------------------
/images/PropertyAutocomplete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/PropertyAutocomplete.png
--------------------------------------------------------------------------------
/images/QuickFixAddExtension.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/QuickFixAddExtension.png
--------------------------------------------------------------------------------
/images/QuickFixAddTarget.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/QuickFixAddTarget.png
--------------------------------------------------------------------------------
/images/SampleValidationErrors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/SampleValidationErrors.png
--------------------------------------------------------------------------------
/images/SampleValidationIcons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/SampleValidationIcons.png
--------------------------------------------------------------------------------
/images/SelectTriangles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/SelectTriangles.png
--------------------------------------------------------------------------------
/images/SelectVertex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/SelectVertex.png
--------------------------------------------------------------------------------
/images/StatesEnable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/StatesEnable.png
--------------------------------------------------------------------------------
/images/gltf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnalyticalGraphicsInc/gltf-vscode/38008fa267b9ccf14afcf2ec6ad41caba96a40ba/images/gltf.png
--------------------------------------------------------------------------------
/pages/babylonView.css:
--------------------------------------------------------------------------------
1 | #babylonRenderCanvas {
2 | width: 100%;
3 | height: 100%;
4 | margin: 0;
5 | padding: 0;
6 | overflow: hidden;
7 | touch-action: none;
8 | }
9 |
10 | #babylonLogo {
11 | position: absolute;
12 | width: 70px;
13 | bottom: 15px;
14 | left: 0;
15 | }
16 |
17 | #babylonVersion {
18 | position: absolute;
19 | bottom: 5px;
20 | left: 20px;
21 | font-size: 12px;
22 | color: white;
23 | opacity: 0.8;
24 | }
25 |
--------------------------------------------------------------------------------
/pages/babylonView.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/pages/cesiumView.css:
--------------------------------------------------------------------------------
1 | #cesiumContainer,
2 | #cesiumCanvas {
3 | width: 100%;
4 | height: 100%;
5 | margin: 0;
6 | padding: 0;
7 | overflow: hidden;
8 | font-family: sans-serif;
9 | }
10 |
11 | #cesiumCreditContainer {
12 | position: absolute;
13 | bottom: 0;
14 | left: 0;
15 | }
16 |
17 | .cesium-credit-textContainer {
18 | font-size: 12px;
19 | position: relative;
20 | top: -7px;
21 | }
22 |
--------------------------------------------------------------------------------
/pages/cesiumView.html:
--------------------------------------------------------------------------------
1 |
5 |
25 |
--------------------------------------------------------------------------------
/pages/filamentView.css:
--------------------------------------------------------------------------------
1 | #filamentContainer,
2 | #filamentCanvas {
3 | width: 100%;
4 | height: 100%;
5 | margin: 0;
6 | padding: 0;
7 | overflow: hidden;
8 | font-family: sans-serif;
9 | }
10 |
11 | #filamentLogoContainer {
12 | position: absolute;
13 | bottom: 0;
14 | left: 0;
15 | background: white;
16 | opacity: 0.8;
17 | padding: 5px 5px 1px 5px;
18 | text-decoration: none;
19 | }
20 |
21 | #filamentVersion {
22 | padding-top: 1px;
23 | font-size: 12px;
24 | color: black;
25 | text-align: center;
26 | }
27 |
--------------------------------------------------------------------------------
/pages/imagePreview.css:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Licensed under the MIT License. See License.txt in the project root for license information.
4 | *--------------------------------------------------------------------------------------------*/
5 |
6 | .monaco-resource-viewer:focus {
7 | outline: none !important;
8 | }
9 |
10 | .monaco-resource-viewer {
11 | padding: 5px 0 0 10px;
12 | box-sizing: border-box;
13 | height: 100vh;
14 | }
15 |
16 | .monaco-resource-viewer.image {
17 | padding: 10px 10px 0 10px;
18 | background-position: 0 0, 8px 8px;
19 | background-size: 16px 16px;
20 | }
21 |
22 | .monaco-resource-viewer.image.full-size {
23 | padding: 0;
24 | }
25 |
26 | .vscode-light .monaco-resource-viewer.image {
27 | background-image:
28 | linear-gradient(45deg, rgb(230, 230, 230) 25%, transparent 25%, transparent 75%, rgb(230, 230, 230) 75%, rgb(230, 230, 230)),
29 | linear-gradient(45deg, rgb(230, 230, 230) 25%, transparent 25%, transparent 75%, rgb(230, 230, 230) 75%, rgb(230, 230, 230));
30 | }
31 |
32 | .vscode-dark .monaco-resource-viewer.image {
33 | background-image:
34 | linear-gradient(45deg, rgb(20, 20, 20) 25%, transparent 25%, transparent 75%, rgb(20, 20, 20) 75%, rgb(20, 20, 20)),
35 | linear-gradient(45deg, rgb(20, 20, 20) 25%, transparent 25%, transparent 75%, rgb(20, 20, 20) 75%, rgb(20, 20, 20));
36 | }
37 |
38 | .monaco-resource-viewer img {
39 | max-width: 100%;
40 | max-height: calc(100% - 10px); /* somehow this prevents scrollbars from showing up */
41 | }
42 |
43 | .monaco-resource-viewer.oversized img {
44 | cursor: zoom-in;
45 | }
46 |
47 | .monaco-resource-viewer.full-size img {
48 | max-width: initial;
49 | max-height: initial;
50 | cursor: zoom-out;
51 | }
52 |
53 | .monaco-resource-viewer .open-external,
54 | .monaco-resource-viewer .open-external:hover {
55 | cursor: pointer;
56 | text-decoration: underline;
57 | }
58 |
--------------------------------------------------------------------------------
/pages/previewModel.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | glTF Preview
8 |
9 | {assets}
10 |
11 |
12 |
14 |
15 |
16 |
17 |
18 |
engine:
19 |
20 |
22 |
23 |
24 |
29 |
30 |
31 |
animations:
32 |
33 |
38 |
39 |
40 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/pages/threeView.css:
--------------------------------------------------------------------------------
1 | #threeContainer {
2 | position: absolute;
3 | top: 0px;
4 | width:100%;
5 | height:100%;
6 | }
7 |
8 | #threeLogoContainer {
9 | position: absolute;
10 | width: 100px;
11 | bottom: 0px;
12 | left: 0px;
13 | padding: 4px;
14 | background-color: white;
15 | opacity: 0.8;
16 | }
17 |
18 | #threeLogo {
19 | width: 100%;
20 | }
21 |
22 | #threeRevision {
23 | position: absolute;
24 | top: 7px;
25 | right: 7px;
26 | padding: 0;
27 | color: black;
28 | font-size: 12px;
29 | }
30 |
--------------------------------------------------------------------------------
/resources/dark/tf-logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
86 |
--------------------------------------------------------------------------------
/resources/light/skin.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
94 |
--------------------------------------------------------------------------------
/schemas/glTF.chooser.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "glTF",
4 | "type" : "object",
5 | "description" : "The root object for a glTF asset.",
6 | "oneOf" : [
7 | {
8 | "$ref" : "gltf-2.0/glTF.schema.json"
9 | },
10 | {
11 | "$ref" : "gltf-1.0/glTF.schema.json"
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/animation.channel.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "channel",
4 | "type" : "object",
5 | "description" : "Targets an animation's sampler at a node's property.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "extensions" : {},
13 | "extras" : {},
14 | "sampler" : {
15 | "allOf" : [
16 | {
17 | "$ref" : "glTFid.schema.json"
18 | }
19 | ],
20 | "description" : "The ID of a sampler in this animation used to compute the value for the target, e.g., a node's translation, rotation, or scale (TRS).",
21 | "short_description" : "The ID of a sampler in this animation used to compute the value for the target."
22 | },
23 | "target" : {
24 | "allOf" : [
25 | {
26 | "$ref" : "animation.channel.target.schema.json"
27 | }
28 | ],
29 | "description" : "The ID of the node and TRS property to target."
30 | }
31 | },
32 | "additionalProperties" : false,
33 | "required" : [
34 | "sampler",
35 | "target"
36 | ]
37 | }
38 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/animation.channel.target.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "target",
4 | "type" : "object",
5 | "description" : "The ID of the node and TRS property that an animation channel targets.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "extensions" : {},
13 | "extras" : {},
14 | "id" : {
15 | "allOf" : [
16 | {
17 | "$ref" : "glTFid.schema.json"
18 | }
19 | ],
20 | "description" : "The ID of the node to target."
21 | },
22 | "path" : {
23 | "type" : "string",
24 | "description" : "The name of the node's TRS property to modify.",
25 | "enum" : [
26 | "translation",
27 | "rotation",
28 | "scale"
29 | ]
30 | }
31 | },
32 | "additionalProperties" : false,
33 | "required" : [
34 | "id",
35 | "path"
36 | ]
37 | }
38 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/animation.parameter.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "parameter",
4 | "allOf" : [
5 | {
6 | "$ref" : "glTFid.schema.json"
7 | }
8 | ],
9 | "description" : "The ID of the accessor containing keyframes for this parameter.",
10 | "additionalProperties" : false
11 | }
12 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/animation.sampler.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "animation sampler",
4 | "type" : "object",
5 | "description" : "Combines input and output parameters with an interpolation algorithm to define a keyframe graph (but not its target).",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "extensions" : {},
13 | "extras" : {},
14 | "input" : {
15 | "allOf" : [
16 | {
17 | "$ref" : "glTFid.schema.json"
18 | }
19 | ],
20 | "description" : "The ID of a parameter in this animation to use as keyframe input. This parameter must have type `FLOAT`. The values represent time in seconds with `time[0] >= 0.0`, and monotonically increasing values, i.e., `time[n + 1] >= time[n]`.",
21 | "short_description" : "The ID of a parameter in this animation to use as keyframe input, e.g., time."
22 | },
23 | "interpolation" : {
24 | "type" : "string",
25 | "description" : "Interpolation algorithm. When an animation targets a node's rotation, and the animation's interpolation is `\"LINEAR\"`, spherical linear interpolation (slerp) should be used to interpolate quaternions.",
26 | "enum" : [
27 | "LINEAR"
28 | ],
29 | "default" : "LINEAR",
30 | "short_description" : "Interpolation algorithm."
31 | },
32 | "output" : {
33 | "allOf" : [
34 | {
35 | "$ref" : "glTFid.schema.json"
36 | }
37 | ],
38 | "description" : "The ID of a parameter in this animation to use as keyframe output."
39 | }
40 | },
41 | "additionalProperties" : false,
42 | "required" : [
43 | "input",
44 | "output"
45 | ]
46 | }
47 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/animation.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "animation",
4 | "type" : "object",
5 | "description" : "A keyframe animation.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFChildOfRootProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "name" : {},
13 | "extensions" : {},
14 | "extras" : {},
15 | "channels" : {
16 | "type" : "array",
17 | "description" : "An array of channels, each of which targets an animation's sampler at a node's property.",
18 | "items" : {
19 | "$ref" : "animation.channel.schema.json"
20 | },
21 | "default" : []
22 | },
23 | "parameters" : {
24 | "type" : "object",
25 | "description" : "A dictionary object of strings whose values are IDs of accessors with keyframe data, e.g., time, translation, rotation, etc.",
26 | "properties" : {},
27 | "additionalProperties" : {
28 | "$ref" : "animation.parameter.schema.json"
29 | },
30 | "default" : {}
31 | },
32 | "samplers" : {
33 | "type" : "object",
34 | "description" : "A dictionary object of samplers that combines input and output parameters with an interpolation algorithm to define a keyframe graph (but not its target).",
35 | "properties" : {},
36 | "additionalProperties" : {
37 | "$ref" : "animation.sampler.schema.json"
38 | },
39 | "default" : {}
40 | }
41 | },
42 | "dependencies" : {
43 | "channels" : [
44 | "samplers"
45 | ],
46 | "samplers" : [
47 | "parameters"
48 | ]
49 | },
50 | "additionalProperties" : false
51 | }
52 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/arrayValues.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "type" : "array",
4 | "items" : {
5 | "type" : [
6 | "number",
7 | "boolean",
8 | "string"
9 | ]
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/asset.profile.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "profile",
4 | "type" : "object",
5 | "description" : "Specifies the target rendering API and version, e.g., WebGL 1.0.3.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "extensions" : {},
13 | "extras" : {},
14 | "api" : {
15 | "type" : "string",
16 | "description" : "Specifies the target rendering API.",
17 | "default" : "WebGL"
18 | },
19 | "version" : {
20 | "type" : "string",
21 | "description" : "The API version.",
22 | "default" : "1.0.3"
23 | }
24 | },
25 | "additionalProperties" : false
26 | }
27 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/asset.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "asset",
4 | "type" : "object",
5 | "description" : "Metadata about the glTF asset.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "extensions" : {},
13 | "extras" : {},
14 | "copyright" : {
15 | "type" : "string",
16 | "description" : "A copyright message suitable for display to credit the content creator."
17 | },
18 | "generator" : {
19 | "type" : "string",
20 | "description" : "Tool that generated this glTF model. Useful for debugging."
21 | },
22 | "premultipliedAlpha" : {
23 | "type" : "boolean",
24 | "description" : "Specifies if the shaders were generated with premultiplied alpha.",
25 | "default" : false,
26 | "gltf_webgl" : "`getContext()` with premultipliedAlpha"
27 | },
28 | "profile" : {
29 | "allOf" : [
30 | {
31 | "$ref" : "asset.profile.schema.json"
32 | }
33 | ],
34 | "default" : {}
35 | },
36 | "version" : {
37 | "type" : "string",
38 | "pattern" : "^1\\.",
39 | "description" : "The glTF version."
40 | }
41 | },
42 | "additionalProperties" : false,
43 | "required" : [
44 | "version"
45 | ]
46 | }
47 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/buffer.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "buffer",
4 | "type" : "object",
5 | "description" : "A buffer points to binary geometry, animation, or skins.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFChildOfRootProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "name" : {},
13 | "extensions" : {},
14 | "extras" : {},
15 | "uri" : {
16 | "type" : "string",
17 | "description" : "The uri of the buffer. Relative paths are relative to the .gltf file. Instead of referencing an external file, the uri can also be a data-uri.",
18 | "format" : "uriref",
19 | "gltf_uriType" : "application",
20 | "short_description" : "The uri of the buffer."
21 | },
22 | "byteLength" : {
23 | "type" : "integer",
24 | "description" : "The length of the buffer in bytes.",
25 | "minimum" : 0,
26 | "default" : 0
27 | },
28 | "type" : {
29 | "type" : "string",
30 | "description" : "XMLHttpRequest `responseType`.",
31 | "enum" : [
32 | "arraybuffer",
33 | "text"
34 | ],
35 | "default" : "arraybuffer"
36 | }
37 | },
38 | "additionalProperties" : false,
39 | "required" : [
40 | "uri"
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/bufferView.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "bufferView",
4 | "type" : "object",
5 | "description" : "A view into a buffer generally representing a subset of the buffer.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFChildOfRootProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "name" : {},
13 | "extensions" : {},
14 | "extras" : {},
15 | "buffer" : {
16 | "allOf" : [
17 | {
18 | "$ref" : "glTFid.schema.json"
19 | }
20 | ],
21 | "description" : "The ID of the buffer."
22 | },
23 | "byteOffset" : {
24 | "type" : "integer",
25 | "description" : "The offset into the buffer in bytes.",
26 | "minimum" : 0
27 | },
28 | "byteLength" : {
29 | "type" : "integer",
30 | "description" : "The length of the bufferView in bytes.",
31 | "minimum" : 0,
32 | "default" : 0
33 | },
34 | "target" : {
35 | "description" : "The target that the WebGL buffer should be bound to. All valid values correspond to WebGL enums. When this is not provided, the bufferView contains animation or skin data.",
36 | "gltf_webgl" : "`bindBuffer()`",
37 | "oneOf" : [
38 | {
39 | "enum" : [
40 | 34962
41 | ],
42 | "description" : "ARRAY_BUFFER - The target that the WebGL buffer should be bound to."
43 | },
44 | {
45 | "enum" : [
46 | 34963
47 | ],
48 | "description" : "ELEMENT_ARRAY_BUFFER - The target that the WebGL buffer should be bound to."
49 | }
50 | ],
51 | "short_description" : "The target that the WebGL buffer should be bound to."
52 | }
53 | },
54 | "additionalProperties" : false,
55 | "required" : [
56 | "buffer",
57 | "byteOffset"
58 | ]
59 | }
60 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/camera.orthographic.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "orthographic",
4 | "type" : "object",
5 | "description" : "An orthographic camera containing properties to create an orthographic projection matrix.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "extensions" : {},
13 | "extras" : {},
14 | "xmag" : {
15 | "type" : "number",
16 | "description" : "The floating-point horizontal magnification of the view."
17 | },
18 | "ymag" : {
19 | "type" : "number",
20 | "description" : "The floating-point vertical magnification of the view."
21 | },
22 | "zfar" : {
23 | "type" : "number",
24 | "description" : "The floating-point distance to the far clipping plane.",
25 | "minimum" : 0
26 | },
27 | "znear" : {
28 | "type" : "number",
29 | "description" : "The floating-point distance to the near clipping plane.",
30 | "minimum" : 0
31 | }
32 | },
33 | "additionalProperties" : false,
34 | "required" : [
35 | "xmag",
36 | "ymag",
37 | "zfar",
38 | "znear"
39 | ]
40 | }
41 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/camera.perspective.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "perspective",
4 | "type" : "object",
5 | "description" : "A perspective camera containing properties to create a perspective projection matrix.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "extensions" : {},
13 | "extras" : {},
14 | "aspectRatio" : {
15 | "type" : "number",
16 | "description" : "The floating-point aspect ratio of the field of view. When this is undefined, the aspect ratio of the canvas is used.",
17 | "minimum" : 0,
18 | "short_description" : "The floating-point aspect ratio of the field of view."
19 | },
20 | "yfov" : {
21 | "type" : "number",
22 | "description" : "The floating-point vertical field of view in radians.",
23 | "minimum" : 0
24 | },
25 | "zfar" : {
26 | "type" : "number",
27 | "description" : "The floating-point distance to the far clipping plane. zfar must be greater than znear.",
28 | "minimum" : 0,
29 | "exclusiveMinimum" : true,
30 | "short_description" : "The floating-point distance to the far clipping plane."
31 | },
32 | "znear" : {
33 | "type" : "number",
34 | "description" : "The floating-point distance to the near clipping plane. zfar must be greater than znear.",
35 | "minimum" : 0,
36 | "exclusiveMinimum" : true,
37 | "short_description" : "The floating-point distance to the near clipping plane."
38 | }
39 | },
40 | "additionalProperties" : false,
41 | "required" : [
42 | "yfov",
43 | "zfar",
44 | "znear"
45 | ]
46 | }
47 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/camera.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "camera",
4 | "type" : "object",
5 | "description" : "A camera's projection. A node can reference a camera ID to apply a transform to place the camera in the scene.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFChildOfRootProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "name" : {},
13 | "extensions" : {},
14 | "extras" : {},
15 | "orthographic" : {
16 | "allOf" : [
17 | {
18 | "$ref" : "camera.orthographic.schema.json"
19 | }
20 | ],
21 | "description" : "An orthographic camera containing properties to create an orthographic projection matrix."
22 | },
23 | "perspective" : {
24 | "allOf" : [
25 | {
26 | "$ref" : "camera.perspective.schema.json"
27 | }
28 | ],
29 | "description" : "A perspective camera containing properties to create a perspective projection matrix."
30 | },
31 | "type" : {
32 | "type" : "string",
33 | "description" : "Specifies if the camera uses a perspective or orthographic projection. Based on this, either the camera's `perspective` or `orthographic` property will be defined.",
34 | "enum" : [
35 | "perspective",
36 | "orthographic"
37 | ],
38 | "short_description" : "Specifies if the camera uses a perspective or orthographic projection."
39 | }
40 | },
41 | "additionalProperties" : false,
42 | "required" : [
43 | "type"
44 | ]
45 | }
46 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/extension.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "extension",
4 | "type" : "object",
5 | "description" : "Dictionary object with extension-specific objects.",
6 | "properties" : {},
7 | "additionalProperties" : {
8 | "type" : "object"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/extras.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "extras",
4 | "description" : "Application-specific data."
5 | }
6 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/glTFChildOfRootProperty.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "Child of a glTF root property",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "name" : {
12 | "type" : "string",
13 | "description" : "The user-defined name of this object. This is not necessarily unique, e.g., an accessor and a buffer could have the same name, or two accessors could even have the same name.",
14 | "short_description" : "The user-defined name of this object."
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/glTFProperty.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "glTF property",
4 | "type" : "object",
5 | "properties" : {
6 | "extensions" : {
7 | "$ref" : "extension.schema.json"
8 | },
9 | "extras" : {
10 | "$ref" : "extras.schema.json"
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/glTFid.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "glTF id",
4 | "type" : "string",
5 | "minLength" : 1
6 | }
7 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/image.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "image",
4 | "type" : "object",
5 | "description" : "Image data used to create a texture.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFChildOfRootProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "name" : {},
13 | "extensions" : {},
14 | "extras" : {},
15 | "uri" : {
16 | "type" : "string",
17 | "description" : "The uri of the image. Relative paths are relative to the .gltf file. Instead of referencing an external file, the uri can also be a data-uri. The image format must be jpg, png, bmp, or gif.",
18 | "format" : "uriref",
19 | "gltf_uriType" : "image",
20 | "short_description" : "The uri of the image."
21 | }
22 | },
23 | "additionalProperties" : false,
24 | "required" : [
25 | "uri"
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/material.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "material",
4 | "type" : "object",
5 | "description" : "The material appearance of a primitive.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFChildOfRootProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "name" : {},
13 | "extensions" : {},
14 | "extras" : {},
15 | "technique" : {
16 | "allOf" : [
17 | {
18 | "$ref" : "glTFid.schema.json"
19 | }
20 | ],
21 | "description" : "The ID of the technique. If this is not supplied, and no extension is present that defines material properties, then the primitive should be rendered using a default material with 50% gray emissive color.",
22 | "short_description" : "The ID of the technique."
23 | },
24 | "values" : {
25 | "type" : "object",
26 | "description" : "A dictionary object of parameter values. Parameters with the same name as the technique's parameter override the technique's parameter value.",
27 | "properties" : {},
28 | "additionalProperties" : {
29 | "$ref" : "material.values.schema.json"
30 | },
31 | "default" : {},
32 | "short_description" : "A dictionary object of parameter values."
33 | }
34 | },
35 | "additionalProperties" : false
36 | }
37 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/material.values.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "values",
4 | "anyOf" : [
5 | {
6 | "type" : [
7 | "number",
8 | "boolean",
9 | "string"
10 | ]
11 | },
12 | {
13 | "$ref" : "arrayValues.schema.json"
14 | }
15 | ],
16 | "description" : "A dictionary object of parameter values. Parameters with the same name as the technique's parameter override the technique's parameter value."
17 | }
18 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/mesh.primitive.attribute.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "attribute",
4 | "allOf" : [
5 | {
6 | "$ref" : "glTFid.schema.json"
7 | }
8 | ],
9 | "description" : "A dictionary object of strings, where each string is the ID of the accessor containing an attribute."
10 | }
11 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/mesh.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "mesh",
4 | "type" : "object",
5 | "description" : "A set of primitives to be rendered. A node can contain one or more meshes. A node's transform places the mesh in the scene.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFChildOfRootProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "name" : {},
13 | "extensions" : {},
14 | "extras" : {},
15 | "primitives" : {
16 | "type" : "array",
17 | "description" : "An array of primitives, each defining geometry to be rendered with a material.",
18 | "items" : {
19 | "$ref" : "mesh.primitive.schema.json"
20 | },
21 | "default" : []
22 | }
23 | },
24 | "additionalProperties" : false
25 | }
26 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/program.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "program",
4 | "type" : "object",
5 | "description" : "A shader program, including its vertex and fragment shader, and names of vertex shader attributes.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFChildOfRootProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "name" : {},
13 | "extensions" : {},
14 | "extras" : {},
15 | "attributes" : {
16 | "type" : "array",
17 | "description" : "Names of GLSL vertex shader attributes.",
18 | "items" : {
19 | "type" : "string",
20 | "minLength" : 1,
21 | "maxLength" : 256
22 | },
23 | "default" : [],
24 | "gltf_webgl" : "`bindAttribLocation()`"
25 | },
26 | "fragmentShader" : {
27 | "allOf" : [
28 | {
29 | "$ref" : "glTFid.schema.json"
30 | }
31 | ],
32 | "description" : "The ID of the fragment shader."
33 | },
34 | "vertexShader" : {
35 | "allOf" : [
36 | {
37 | "$ref" : "glTFid.schema.json"
38 | }
39 | ],
40 | "description" : "The ID of the vertex shader."
41 | }
42 | },
43 | "additionalProperties" : false,
44 | "required" : [
45 | "fragmentShader",
46 | "vertexShader"
47 | ],
48 | "gltf_webgl" : "`attachShader()`, `bindAttribLocation()`, `createProgram()`, `deleteProgram()`, `getProgramParameter()`, `getProgramInfoLog()`, `linkProgram()`, `useProgram()`, and `validateProgram()`"
49 | }
50 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/scene.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "scene",
4 | "type" : "object",
5 | "description" : "The root nodes of a scene.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFChildOfRootProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "name" : {},
13 | "extensions" : {},
14 | "extras" : {},
15 | "nodes" : {
16 | "type" : "array",
17 | "description" : "The IDs of each root node.",
18 | "items" : {
19 | "$ref" : "glTFid.schema.json"
20 | },
21 | "uniqueItems" : true,
22 | "default" : []
23 | }
24 | },
25 | "additionalProperties" : false
26 | }
27 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/shader.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "shader",
4 | "type" : "object",
5 | "description" : "A vertex or fragment shader.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFChildOfRootProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "name" : {},
13 | "extensions" : {},
14 | "extras" : {},
15 | "uri" : {
16 | "type" : "string",
17 | "description" : "The uri of the GLSL source. Relative paths are relative to the .gltf file. Instead of referencing an external file, the uri can also be a data-uri.",
18 | "format" : "uriref",
19 | "gltf_uriType" : "text",
20 | "short_description" : "The uri of the GLSL source."
21 | },
22 | "type" : {
23 | "description" : "The shader stage. All valid values correspond to WebGL enums.",
24 | "oneOf" : [
25 | {
26 | "enum" : [
27 | 35632
28 | ],
29 | "description" : "FRAGMENT_SHADER - The shader stage."
30 | },
31 | {
32 | "enum" : [
33 | 35633
34 | ],
35 | "description" : "VERTEX_SHADER - The shader stage."
36 | }
37 | ],
38 | "short_description" : "The shader stage."
39 | }
40 | },
41 | "additionalProperties" : false,
42 | "required" : [
43 | "uri",
44 | "type"
45 | ],
46 | "gltf_webgl" : "`createShader()`, `deleteShader()`, `shaderSource()`, `compileShader()`, `getShaderParameter()`, and `getShaderInfoLog()`"
47 | }
48 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/skin.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "skin",
4 | "type" : "object",
5 | "description" : "Joints and matrices defining a skin.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFChildOfRootProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "name" : {},
13 | "extensions" : {},
14 | "extras" : {},
15 | "bindShapeMatrix" : {
16 | "type" : "array",
17 | "description" : "Floating-point 4x4 transformation matrix stored in column-major order.",
18 | "items" : {
19 | "type" : "number"
20 | },
21 | "minItems" : 16,
22 | "maxItems" : 16,
23 | "default" : [
24 | 1,
25 | 0,
26 | 0,
27 | 0,
28 | 0,
29 | 1,
30 | 0,
31 | 0,
32 | 0,
33 | 0,
34 | 1,
35 | 0,
36 | 0,
37 | 0,
38 | 0,
39 | 1
40 | ]
41 | },
42 | "inverseBindMatrices" : {
43 | "allOf" : [
44 | {
45 | "$ref" : "glTFid.schema.json"
46 | }
47 | ],
48 | "description" : "The ID of the accessor containing the floating-point 4x4 inverse-bind matrices."
49 | },
50 | "jointNames" : {
51 | "type" : "array",
52 | "description" : "Joint names of the joints (nodes with a `jointName` property) in this skin. The array length is the same as the `count` property of the `inverseBindMatrices` accessor, and the same as the total quantity of all skeleton nodes from node-trees referenced by the skinned mesh instance node's `skeletons` array.",
53 | "items" : {
54 | "$ref" : "glTFid.schema.json"
55 | },
56 | "uniqueItems" : true,
57 | "short_description" : "Joint names of the joints (nodes with a `jointName` property) in this skin."
58 | }
59 | },
60 | "additionalProperties" : false,
61 | "required" : [
62 | "inverseBindMatrices",
63 | "jointNames"
64 | ]
65 | }
66 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/technique.attribute.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "attribute",
4 | "allOf" : [
5 | {
6 | "$ref" : "glTFid.schema.json"
7 | }
8 | ],
9 | "description" : "A dictionary object of strings that maps GLSL attribute names to technique parameter IDs."
10 | }
11 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/technique.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "technique",
4 | "type" : "object",
5 | "description" : "A template for material appearances.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFChildOfRootProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "name" : {},
13 | "extensions" : {},
14 | "extras" : {},
15 | "parameters" : {
16 | "type" : "object",
17 | "description" : "A dictionary object of technique.parameters objects. Each parameter defines an attribute or uniform input, and an optional semantic and value.",
18 | "properties" : {},
19 | "additionalProperties" : {
20 | "$ref" : "technique.parameters.schema.json"
21 | },
22 | "default" : {},
23 | "short_description" : "A dictionary object of technique.parameters objects."
24 | },
25 | "attributes" : {
26 | "type" : "object",
27 | "description" : "A dictionary object of strings that maps GLSL attribute names to technique parameter IDs.",
28 | "properties" : {},
29 | "additionalProperties" : {
30 | "$ref" : "technique.attribute.schema.json"
31 | },
32 | "default" : {}
33 | },
34 | "program" : {
35 | "allOf" : [
36 | {
37 | "$ref" : "glTFid.schema.json"
38 | }
39 | ],
40 | "description" : "The ID of the program."
41 | },
42 | "uniforms" : {
43 | "type" : "object",
44 | "description" : "A dictionary object of strings that maps GLSL uniform names to technique parameter IDs.",
45 | "properties" : {},
46 | "additionalProperties" : {
47 | "$ref" : "technique.uniform.schema.json"
48 | },
49 | "default" : {}
50 | },
51 | "states" : {
52 | "allOf" : [
53 | {
54 | "$ref" : "technique.states.schema.json"
55 | }
56 | ],
57 | "description" : "Fixed-function rendering states.",
58 | "default" : {}
59 | }
60 | },
61 | "additionalProperties" : false,
62 | "required" : [
63 | "program"
64 | ]
65 | }
66 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/technique.states.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "states",
4 | "type" : "object",
5 | "description" : "Fixed-function rendering states.",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "extensions" : {},
13 | "extras" : {},
14 | "enable" : {
15 | "type" : "array",
16 | "description" : "WebGL states to enable. States not in the array are disabled. All valid values correspond to WebGL enums.",
17 | "items" : {
18 | "oneOf" : [
19 | {
20 | "enum" : [
21 | 3042
22 | ],
23 | "description" : "BLEND"
24 | },
25 | {
26 | "enum" : [
27 | 2884
28 | ],
29 | "description" : "CULL_FACE"
30 | },
31 | {
32 | "enum" : [
33 | 2929
34 | ],
35 | "description" : "DEPTH_TEST"
36 | },
37 | {
38 | "enum" : [
39 | 32823
40 | ],
41 | "description" : "POLYGON_OFFSET_FILL"
42 | },
43 | {
44 | "enum" : [
45 | 32926
46 | ],
47 | "description" : "SAMPLE_ALPHA_TO_COVERAGE"
48 | },
49 | {
50 | "enum" : [
51 | 3089
52 | ],
53 | "description" : "SCISSOR_TEST"
54 | }
55 | ]
56 | },
57 | "uniqueItems" : true,
58 | "default" : [],
59 | "gltf_webgl" : "`enable()` and `disable()`",
60 | "short_description" : "WebGL states to enable."
61 | },
62 | "functions" : {
63 | "$ref" : "technique.states.functions.schema.json"
64 | }
65 | },
66 | "additionalProperties" : false
67 | }
68 |
--------------------------------------------------------------------------------
/schemas/gltf-1.0/technique.uniform.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "uniform",
4 | "allOf" : [
5 | {
6 | "$ref" : "glTFid.schema.json"
7 | }
8 | ],
9 | "description" : "A dictionary object of strings that maps GLSL uniform names to technique parameter IDs."
10 | }
11 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/accessor.sparse.indices.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "accessor.sparse.indices.schema.json",
4 | "title" : "Accessor Sparse Indices",
5 | "type" : "object",
6 | "description" : "An object pointing to a buffer view containing the indices of deviating accessor values. The number of indices is equal to `accessor.sparse.count`. Indices **MUST** strictly increase.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "bufferView" : {
14 | "allOf" : [
15 | {
16 | "$ref" : "glTFid.schema.json"
17 | }
18 | ],
19 | "description" : "The index of the buffer view with sparse indices. The referenced buffer view **MUST NOT** have its `target` or `byteStride` properties defined. The buffer view and the optional `byteOffset` **MUST** be aligned to the `componentType` byte length."
20 | },
21 | "byteOffset" : {
22 | "type" : "integer",
23 | "description" : "The offset relative to the start of the buffer view in bytes.",
24 | "minimum" : 0,
25 | "default" : 0
26 | },
27 | "componentType" : {
28 | "description" : "The indices data type.",
29 | "anyOf" : [
30 | {
31 | "const" : 5121,
32 | "description" : "UNSIGNED_BYTE - The indices data type.",
33 | "type" : "integer"
34 | },
35 | {
36 | "const" : 5123,
37 | "description" : "UNSIGNED_SHORT - The indices data type.",
38 | "type" : "integer"
39 | },
40 | {
41 | "const" : 5125,
42 | "description" : "UNSIGNED_INT - The indices data type.",
43 | "type" : "integer"
44 | },
45 | {
46 | "type" : "integer"
47 | }
48 | ]
49 | },
50 | "extensions" : {},
51 | "extras" : {}
52 | },
53 | "required" : [
54 | "bufferView",
55 | "componentType"
56 | ]
57 | }
58 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/accessor.sparse.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "accessor.sparse.schema.json",
4 | "title" : "Accessor Sparse",
5 | "type" : "object",
6 | "description" : "Sparse storage of accessor values that deviate from their initialization value.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "count" : {
14 | "type" : "integer",
15 | "description" : "Number of deviating accessor values stored in the sparse array.",
16 | "minimum" : 1
17 | },
18 | "indices" : {
19 | "allOf" : [
20 | {
21 | "$ref" : "accessor.sparse.indices.schema.json"
22 | }
23 | ],
24 | "description" : "An object pointing to a buffer view containing the indices of deviating accessor values. The number of indices is equal to `count`. Indices **MUST** strictly increase."
25 | },
26 | "values" : {
27 | "allOf" : [
28 | {
29 | "$ref" : "accessor.sparse.values.schema.json"
30 | }
31 | ],
32 | "description" : "An object pointing to a buffer view containing the deviating accessor values."
33 | },
34 | "extensions" : {},
35 | "extras" : {}
36 | },
37 | "required" : [
38 | "count",
39 | "indices",
40 | "values"
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/accessor.sparse.values.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "accessor.sparse.values.schema.json",
4 | "title" : "Accessor Sparse Values",
5 | "type" : "object",
6 | "description" : "An object pointing to a buffer view containing the deviating accessor values. The number of elements is equal to `accessor.sparse.count` times number of components. The elements have the same component type as the base accessor. The elements are tightly packed. Data **MUST** be aligned following the same rules as the base accessor.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "bufferView" : {
14 | "allOf" : [
15 | {
16 | "$ref" : "glTFid.schema.json"
17 | }
18 | ],
19 | "description" : "The index of the bufferView with sparse values. The referenced buffer view **MUST NOT** have its `target` or `byteStride` properties defined."
20 | },
21 | "byteOffset" : {
22 | "type" : "integer",
23 | "description" : "The offset relative to the start of the bufferView in bytes.",
24 | "minimum" : 0,
25 | "default" : 0
26 | },
27 | "extensions" : {},
28 | "extras" : {}
29 | },
30 | "required" : [
31 | "bufferView"
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/animation.channel.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "animation.channel.schema.json",
4 | "title" : "Animation Channel",
5 | "type" : "object",
6 | "description" : "An animation channel combines an animation sampler with a target property being animated.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "sampler" : {
14 | "allOf" : [
15 | {
16 | "$ref" : "glTFid.schema.json"
17 | }
18 | ],
19 | "description" : "The index of a sampler in this animation used to compute the value for the target, e.g., a node's translation, rotation, or scale (TRS).",
20 | "short_description" : "The index of a sampler in this animation used to compute the value for the target."
21 | },
22 | "target" : {
23 | "allOf" : [
24 | {
25 | "$ref" : "animation.channel.target.schema.json"
26 | }
27 | ],
28 | "description" : "The descriptor of the animated property."
29 | },
30 | "extensions" : {},
31 | "extras" : {}
32 | },
33 | "required" : [
34 | "sampler",
35 | "target"
36 | ]
37 | }
38 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/animation.channel.target.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "animation.channel.target.schema.json",
4 | "title" : "Animation Channel Target",
5 | "type" : "object",
6 | "description" : "The descriptor of the animated property.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "node" : {
14 | "allOf" : [
15 | {
16 | "$ref" : "glTFid.schema.json"
17 | }
18 | ],
19 | "description" : "The index of the node to animate. When undefined, the animated object **MAY** be defined by an extension."
20 | },
21 | "path" : {
22 | "description" : "The name of the node's TRS property to animate, 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.",
23 | "anyOf" : [
24 | {
25 | "const" : "translation"
26 | },
27 | {
28 | "const" : "rotation"
29 | },
30 | {
31 | "const" : "scale"
32 | },
33 | {
34 | "const" : "weights"
35 | },
36 | {
37 | "type" : "string"
38 | }
39 | ]
40 | },
41 | "extensions" : {
42 | "properties" : {
43 | "KHR_animation_pointer" : {
44 | "allOf" : [
45 | {
46 | "$ref" : "extensions/KHR_animation_pointer/animation.channel.target.KHR_animation_pointer.schema.json"
47 | }
48 | ]
49 | }
50 | }
51 | },
52 | "extras" : {}
53 | },
54 | "required" : [
55 | "path"
56 | ]
57 | }
58 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/animation.sampler.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "animation.sampler.schema.json",
4 | "title" : "Animation Sampler",
5 | "type" : "object",
6 | "description" : "An animation sampler combines timestamps with a sequence of output values and defines an interpolation algorithm.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "input" : {
14 | "allOf" : [
15 | {
16 | "$ref" : "glTFid.schema.json"
17 | }
18 | ],
19 | "description" : "The index of an accessor containing keyframe timestamps. The accessor **MUST** be of scalar type with floating-point components. The values represent time in seconds with `time[0] >= 0.0`, and strictly increasing values, i.e., `time[n + 1] > time[n]`.",
20 | "short_description" : "The index of an accessor containing keyframe timestamps."
21 | },
22 | "interpolation" : {
23 | "description" : "Interpolation algorithm.",
24 | "default" : "LINEAR",
25 | "anyOf" : [
26 | {
27 | "const" : "LINEAR",
28 | "description" : "The animated values are linearly interpolated between keyframes. When targeting a rotation, spherical linear interpolation (slerp) **SHOULD** be used to interpolate quaternions. The number of output elements **MUST** equal the number of input elements. - Interpolation algorithm."
29 | },
30 | {
31 | "const" : "STEP",
32 | "description" : "The animated values remain constant to the output of the first keyframe, until the next keyframe. The number of output elements **MUST** equal the number of input elements. - Interpolation algorithm."
33 | },
34 | {
35 | "const" : "CUBICSPLINE",
36 | "description" : "The animation's interpolation is computed using a cubic spline with specified tangents. The number of output elements **MUST** equal three times the number of input elements. For each input element, the output stores three elements, an in-tangent, a spline vertex, and an out-tangent. There **MUST** be at least two keyframes when using this interpolation. - Interpolation algorithm."
37 | },
38 | {
39 | "type" : "string"
40 | }
41 | ],
42 | "short_description" : "Interpolation algorithm."
43 | },
44 | "output" : {
45 | "allOf" : [
46 | {
47 | "$ref" : "glTFid.schema.json"
48 | }
49 | ],
50 | "description" : "The index of an accessor, containing keyframe output values."
51 | },
52 | "extensions" : {},
53 | "extras" : {}
54 | },
55 | "required" : [
56 | "input",
57 | "output"
58 | ]
59 | }
60 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/animation.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "animation.schema.json",
4 | "title" : "Animation",
5 | "type" : "object",
6 | "description" : "A keyframe animation.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFChildOfRootProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "channels" : {
14 | "type" : "array",
15 | "description" : "An array of animation channels. An animation channel combines an animation sampler with a target property being animated. Different channels of the same animation **MUST NOT** have the same targets.",
16 | "items" : {
17 | "$ref" : "animation.channel.schema.json"
18 | },
19 | "minItems" : 1
20 | },
21 | "samplers" : {
22 | "type" : "array",
23 | "description" : "An array of animation samplers. An animation sampler combines timestamps with a sequence of output values and defines an interpolation algorithm.",
24 | "items" : {
25 | "$ref" : "animation.sampler.schema.json"
26 | },
27 | "minItems" : 1
28 | },
29 | "name" : {},
30 | "extensions" : {
31 | "properties" : {
32 | "KHR_xmp" : {
33 | "allOf" : [
34 | {
35 | "$ref" : "extensions/KHR_xmp/node.KHR_xmp.schema.json"
36 | }
37 | ]
38 | },
39 | "KHR_xmp_json_ld" : {
40 | "allOf" : [
41 | {
42 | "$ref" : "extensions/KHR_xmp_json_ld/KHR_xmp_json_ld.schema.json"
43 | }
44 | ]
45 | }
46 | }
47 | },
48 | "extras" : {}
49 | },
50 | "required" : [
51 | "channels",
52 | "samplers"
53 | ]
54 | }
55 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/asset.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "asset.schema.json",
4 | "title" : "Asset",
5 | "type" : "object",
6 | "description" : "Metadata about the glTF asset.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "copyright" : {
14 | "type" : "string",
15 | "description" : "A copyright message suitable for display to credit the content creator."
16 | },
17 | "generator" : {
18 | "type" : "string",
19 | "description" : "Tool that generated this glTF model. Useful for debugging."
20 | },
21 | "version" : {
22 | "type" : "string",
23 | "description" : "The glTF version in the form of `.` that this asset targets.",
24 | "pattern" : "^[0-9]+\\.[0-9]+$"
25 | },
26 | "minVersion" : {
27 | "type" : "string",
28 | "description" : "The minimum glTF version in the form of `.` that this asset targets. This property **MUST NOT** be greater than the asset version.",
29 | "pattern" : "^[0-9]+\\.[0-9]+$"
30 | },
31 | "extensions" : {
32 | "properties" : {
33 | "KHR_xmp" : {
34 | "allOf" : [
35 | {
36 | "$ref" : "extensions/KHR_xmp/node.KHR_xmp.schema.json"
37 | }
38 | ]
39 | },
40 | "KHR_xmp_json_ld" : {
41 | "allOf" : [
42 | {
43 | "$ref" : "extensions/KHR_xmp_json_ld/KHR_xmp_json_ld.schema.json"
44 | }
45 | ]
46 | }
47 | }
48 | },
49 | "extras" : {}
50 | },
51 | "required" : [
52 | "version"
53 | ]
54 | }
55 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/buffer.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "buffer.schema.json",
4 | "title" : "Buffer",
5 | "type" : "object",
6 | "description" : "A buffer points to binary geometry, animation, or skins.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFChildOfRootProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "uri" : {
14 | "type" : "string",
15 | "description" : "The URI (or IRI) of the buffer. Relative paths are relative to the current glTF asset. Instead of referencing an external file, this field **MAY** contain a `data:`-URI.",
16 | "format" : "iri-reference",
17 | "gltf_uriType" : "application",
18 | "short_description" : "The URI (or IRI) of the buffer."
19 | },
20 | "byteLength" : {
21 | "type" : "integer",
22 | "description" : "The length of the buffer in bytes.",
23 | "minimum" : 1
24 | },
25 | "name" : {},
26 | "extensions" : {
27 | "properties" : {
28 | "EXT_meshopt_compression" : {
29 | "allOf" : [
30 | {
31 | "$ref" : "extensions/EXT_meshopt_compression/buffer.EXT_meshopt_compression.schema.json"
32 | }
33 | ]
34 | }
35 | }
36 | },
37 | "extras" : {}
38 | },
39 | "required" : [
40 | "byteLength"
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/bufferView.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "bufferView.schema.json",
4 | "title" : "Buffer View",
5 | "type" : "object",
6 | "description" : "A view into a buffer generally representing a subset of the buffer.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFChildOfRootProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "buffer" : {
14 | "allOf" : [
15 | {
16 | "$ref" : "glTFid.schema.json"
17 | }
18 | ],
19 | "description" : "The index of the buffer."
20 | },
21 | "byteOffset" : {
22 | "type" : "integer",
23 | "description" : "The offset into the buffer in bytes.",
24 | "minimum" : 0,
25 | "default" : 0
26 | },
27 | "byteLength" : {
28 | "type" : "integer",
29 | "description" : "The length of the bufferView in bytes.",
30 | "minimum" : 1
31 | },
32 | "byteStride" : {
33 | "type" : "integer",
34 | "description" : "The stride, in bytes, between vertex attributes. When this is not defined, data is tightly packed. When two or more accessors use the same buffer view, this field **MUST** be defined.",
35 | "minimum" : 4,
36 | "maximum" : 252,
37 | "multipleOf" : 4,
38 | "gltf_webgl" : "`vertexAttribPointer()` stride parameter",
39 | "short_description" : "The stride, in bytes."
40 | },
41 | "target" : {
42 | "description" : "The hint representing the intended GPU buffer type to use with this buffer view.",
43 | "gltf_webgl" : "`bindBuffer()`",
44 | "anyOf" : [
45 | {
46 | "const" : 34962,
47 | "description" : "ARRAY_BUFFER - The hint representing the intended GPU buffer type to use with this buffer view.",
48 | "type" : "integer"
49 | },
50 | {
51 | "const" : 34963,
52 | "description" : "ELEMENT_ARRAY_BUFFER - The hint representing the intended GPU buffer type to use with this buffer view.",
53 | "type" : "integer"
54 | },
55 | {
56 | "type" : "integer"
57 | }
58 | ]
59 | },
60 | "name" : {},
61 | "extensions" : {
62 | "properties" : {
63 | "EXT_meshopt_compression" : {
64 | "allOf" : [
65 | {
66 | "$ref" : "extensions/EXT_meshopt_compression/bufferView.EXT_meshopt_compression.schema.json"
67 | }
68 | ]
69 | }
70 | }
71 | },
72 | "extras" : {}
73 | },
74 | "required" : [
75 | "buffer",
76 | "byteLength"
77 | ]
78 | }
79 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/camera.orthographic.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "camera.orthographic.schema.json",
4 | "title" : "Camera Orthographic",
5 | "type" : "object",
6 | "description" : "An orthographic camera containing properties to create an orthographic projection matrix.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "xmag" : {
14 | "type" : "number",
15 | "description" : "The floating-point horizontal magnification of the view. This value **MUST NOT** be equal to zero. This value **SHOULD NOT** be negative."
16 | },
17 | "ymag" : {
18 | "type" : "number",
19 | "description" : "The floating-point vertical magnification of the view. This value **MUST NOT** be equal to zero. This value **SHOULD NOT** be negative."
20 | },
21 | "zfar" : {
22 | "type" : "number",
23 | "description" : "The floating-point distance to the far clipping plane. This value **MUST NOT** be equal to zero. `zfar` **MUST** be greater than `znear`.",
24 | "exclusiveMinimum" : 0
25 | },
26 | "znear" : {
27 | "type" : "number",
28 | "description" : "The floating-point distance to the near clipping plane.",
29 | "minimum" : 0
30 | },
31 | "extensions" : {},
32 | "extras" : {}
33 | },
34 | "required" : [
35 | "xmag",
36 | "ymag",
37 | "zfar",
38 | "znear"
39 | ]
40 | }
41 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/camera.perspective.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "camera.perspective.schema.json",
4 | "title" : "Camera Perspective",
5 | "type" : "object",
6 | "description" : "A perspective camera containing properties to create a perspective projection matrix.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "aspectRatio" : {
14 | "type" : "number",
15 | "description" : "The floating-point aspect ratio of the field of view. When undefined, the aspect ratio of the rendering viewport **MUST** be used.",
16 | "exclusiveMinimum" : 0,
17 | "short_description" : "The floating-point aspect ratio of the field of view."
18 | },
19 | "yfov" : {
20 | "type" : "number",
21 | "description" : "The floating-point vertical field of view in radians. This value **SHOULD** be less than π.",
22 | "exclusiveMinimum" : 0
23 | },
24 | "zfar" : {
25 | "type" : "number",
26 | "description" : "The floating-point distance to the far clipping plane. When defined, `zfar` **MUST** be greater than `znear`. If `zfar` is undefined, client implementations **SHOULD** use infinite projection matrix.",
27 | "exclusiveMinimum" : 0,
28 | "short_description" : "The floating-point distance to the far clipping plane."
29 | },
30 | "znear" : {
31 | "type" : "number",
32 | "description" : "The floating-point distance to the near clipping plane.",
33 | "exclusiveMinimum" : 0,
34 | "short_description" : "The floating-point distance to the near clipping plane."
35 | },
36 | "extensions" : {},
37 | "extras" : {}
38 | },
39 | "required" : [
40 | "yfov",
41 | "znear"
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/camera.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "camera.schema.json",
4 | "title" : "Camera",
5 | "type" : "object",
6 | "description" : "A camera's projection. A node **MAY** reference a camera to apply a transform to place the camera in the scene.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFChildOfRootProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "orthographic" : {
14 | "allOf" : [
15 | {
16 | "$ref" : "camera.orthographic.schema.json"
17 | }
18 | ],
19 | "description" : "An orthographic camera containing properties to create an orthographic projection matrix. This property **MUST NOT** be defined when `perspective` is defined."
20 | },
21 | "perspective" : {
22 | "allOf" : [
23 | {
24 | "$ref" : "camera.perspective.schema.json"
25 | }
26 | ],
27 | "description" : "A perspective camera containing properties to create a perspective projection matrix. This property **MUST NOT** be defined when `orthographic` is defined."
28 | },
29 | "type" : {
30 | "description" : "Specifies if the camera uses a perspective or orthographic projection. Based on this, either the camera's `perspective` or `orthographic` property **MUST** be defined.",
31 | "anyOf" : [
32 | {
33 | "const" : "perspective"
34 | },
35 | {
36 | "const" : "orthographic"
37 | },
38 | {
39 | "type" : "string"
40 | }
41 | ],
42 | "short_description" : "Specifies if the camera uses a perspective or orthographic projection."
43 | },
44 | "name" : {},
45 | "extensions" : {},
46 | "extras" : {}
47 | },
48 | "required" : [
49 | "type"
50 | ],
51 | "not" : {
52 | "required" : [
53 | "perspective",
54 | "orthographic"
55 | ]
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extension.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "extension.schema.json",
4 | "title" : "Extension",
5 | "type" : "object",
6 | "description" : "JSON object with extension-specific objects.",
7 | "properties" : {},
8 | "additionalProperties" : {
9 | "type" : "object"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/AGI_articulations/articulation.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "Articulation",
4 | "type" : "object",
5 | "description" : "A model articulation definition.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "name" : {
13 | "type" : "string",
14 | "pattern" : "^[^\\s]+$",
15 | "description" : "The name of this articulation. The articulation name must be unique within this model. Articulation names may not contain spaces.",
16 | "minLength" : 1
17 | },
18 | "stages" : {
19 | "type" : "array",
20 | "description" : "An array of stages, each of which defines a degree of freedom of movement.",
21 | "items" : {
22 | "$ref" : "articulation.stage.schema.json"
23 | },
24 | "minItems" : 1
25 | },
26 | "pointingVector" : {
27 | "type" : "array",
28 | "description" : "The local forward vector for the associated node, for the purpose of pointing at a target or other object.",
29 | "items" : {
30 | "type" : "number"
31 | },
32 | "minItems" : 3,
33 | "maxItems" : 3
34 | },
35 | "extensions" : {},
36 | "extras" : {}
37 | },
38 | "required" : [
39 | "name",
40 | "stages"
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/AGI_articulations/gltf.AGI_articulations.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "AGI_articulations glTF extension",
4 | "type" : "object",
5 | "description" : "glTF Extension that defines metadata for applying external analysis or effects to a model.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "articulations" : {
13 | "type" : "array",
14 | "description" : "An array of articulations. An articulation indicates a named range of motion available to one or more nodes within the model.",
15 | "items" : {
16 | "$ref" : "articulation.schema.json"
17 | },
18 | "minItems" : 1,
19 | "short_description" : "An array of articulations."
20 | },
21 | "extensions" : {},
22 | "extras" : {}
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/AGI_articulations/node.AGI_articulations.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "AGI_articulations glTF Node extension",
4 | "type" : "object",
5 | "description" : "glTF Extension for an individual node in a glTF model, to associate it with the model's root AGI_articulations object.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "isAttachPoint" : {
13 | "type" : "boolean",
14 | "description" : "Set to true to indicate that this node's origin and orientation act as an attach point for external objects, analysis, or effects."
15 | },
16 | "articulationName" : {
17 | "type" : "string",
18 | "pattern" : "^[^\\s]+$",
19 | "description" : "The name of an Articulation that applies to this node. Articulations are defined in the glTF root extension. A single articulation may apply to more than one node, and its stage values set the transform for all assigned nodes simultaneously.",
20 | "short_description" : "The name of an Articulation that applies to this node."
21 | },
22 | "extensions" : {},
23 | "extras" : {}
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/AGI_stk_metadata/gltf.AGI_stk_metadata.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "AGI_stk_metadata glTF extension",
4 | "type" : "object",
5 | "description" : "glTF Extension that defines metadata for use with STK (Systems Tool Kit).",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "solarPanelGroups" : {
13 | "type" : "array",
14 | "description" : "An array of solar panel groups.",
15 | "items" : {
16 | "$ref" : "solarPanelGroup.schema.json"
17 | },
18 | "minItems" : 1
19 | },
20 | "extensions" : {},
21 | "extras" : {}
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/AGI_stk_metadata/node.AGI_stk_metadata.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "AGI_stk_metadata glTF Node extension",
4 | "type" : "object",
5 | "description" : "glTF Extension for an individual node in a glTF model, to associate it with the model's root AGI_stk_metadata object.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "solarPanelGroupName" : {
13 | "type" : "string",
14 | "pattern" : "^[^\\s]+$",
15 | "description" : "The name of a Solar Panel Group that includes this node. Solar Panel Groups are defined in the glTF root extension.",
16 | "short_description" : "The name of a Solar Panel Group that includes this node."
17 | },
18 | "noObscuration" : {
19 | "type" : "boolean",
20 | "description" : "Set to true to indicate that this node's geometry does not obscure any sensors' view in the STK Sensor Obscuration tool."
21 | },
22 | "extensions" : {},
23 | "extras" : {}
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/AGI_stk_metadata/solarPanelGroup.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "Solar Panel Group",
4 | "type" : "object",
5 | "description" : "A solar panel group definition.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "name" : {
13 | "type" : "string",
14 | "pattern" : "^[^\\s]+$",
15 | "description" : "The name of this solar panel group. The group name must be unique within this model, and may not contain spaces.",
16 | "minLength" : 1
17 | },
18 | "efficiency" : {
19 | "type" : "number",
20 | "description" : "The percentage, from 0.0 to 100.0, of how efficiently the solar cells convert solar to electrical energy.",
21 | "minimum" : 0,
22 | "maximum" : 100
23 | },
24 | "extensions" : {},
25 | "extras" : {}
26 | },
27 | "required" : [
28 | "name",
29 | "efficiency"
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/EXT_lights_image_based/glTF.EXT_lights_image_based.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "EXT_lights_image_based glTF extension",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "lights" : {
12 | "type" : "array",
13 | "items" : {
14 | "type" : "object",
15 | "$ref" : "light.schema.json"
16 | },
17 | "minItems" : 1
18 | },
19 | "extensions" : {},
20 | "extras" : {}
21 | },
22 | "required" : [
23 | "lights"
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/EXT_lights_image_based/light.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "light",
4 | "type" : "object",
5 | "description" : "An image-based lighting environment.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFChildOfRootProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "rotation" : {
13 | "type" : "array",
14 | "items" : {
15 | "type" : "number",
16 | "minimum" : -1,
17 | "maximum" : 1
18 | },
19 | "minItems" : 4,
20 | "maxItems" : 4,
21 | "description" : "Quaternion that represents the rotation of the IBL environment.",
22 | "default" : [
23 | 0,
24 | 0,
25 | 0,
26 | 1
27 | ]
28 | },
29 | "intensity" : {
30 | "type" : "number",
31 | "description" : "Brightness multiplier for environment.",
32 | "default" : 1,
33 | "minimum" : 0
34 | },
35 | "irradianceCoefficients" : {
36 | "description" : "Declares spherical harmonic coefficients for irradiance up to l=2. This is a 9x3 array.",
37 | "type" : "array",
38 | "items" : {
39 | "type" : "array",
40 | "items" : {
41 | "type" : "number"
42 | },
43 | "minItems" : 3,
44 | "maxItems" : 3
45 | },
46 | "minItems" : 9,
47 | "maxItems" : 9
48 | },
49 | "specularImages" : {
50 | "description" : "Declares an array of the first N mips of the prefiltered cubemap. Each mip is, in turn, defined with an array of 6 images, one for each cube face. i.e. this is an Nx6 array.",
51 | "type" : "array",
52 | "items" : {
53 | "type" : "array",
54 | "items" : {
55 | "type" : "integer",
56 | "minimum" : 0
57 | },
58 | "minItems" : 6,
59 | "maxItems" : 6
60 | },
61 | "minItems" : 1
62 | },
63 | "specularImageSize" : {
64 | "type" : "integer",
65 | "description" : "The dimension (in pixels) of the first specular mip. This is needed to determine, pre-load, the total number of mips needed.",
66 | "minimum" : 1
67 | },
68 | "name" : {},
69 | "extensions" : {},
70 | "extras" : {}
71 | },
72 | "required" : [
73 | "irradianceCoefficients",
74 | "specularImages",
75 | "specularImageSize"
76 | ]
77 | }
78 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/EXT_lights_image_based/scene.EXT_lights_image_based.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "EXT_lights_imageBased scene extension",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "light" : {
12 | "allOf" : [
13 | {
14 | "$ref" : "../../glTFid.schema.json"
15 | }
16 | ],
17 | "description" : "The id of the light referenced by this scene."
18 | },
19 | "extensions" : {},
20 | "extras" : {}
21 | },
22 | "required" : [
23 | "light"
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/EXT_mesh_gpu_instancing/glTF.EXT_mesh_gpu_instancing.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "EXT_mesh_gpu_instancing glTF extension",
4 | "type" : "object",
5 | "description" : "glTF extension defines instance attributes for a node with a mesh.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "attributes" : {
13 | "type" : "object",
14 | "description" : "A dictionary object, where each key corresponds to instance attribute and each value is the index of the accessor containing attribute's data. Attributes TRANSLATION, ROTATION, SCALE define instance transformation. For \"TRANSLATION\" the values are FLOAT_VEC3's specifying translation along the x, y, and z axes. For \"ROTATION\" the values are VEC4's specifying rotation as a quaternion in the order (x, y, z, w), where w is the scalar, with component type `FLOAT` or normalized integer. For \"SCALE\" the values are FLOAT_VEC3's specifying scaling factors along the x, y, and z axes.",
15 | "minProperties" : 1,
16 | "additionalProperties" : {
17 | "$ref" : "../../glTFid.schema.json"
18 | }
19 | },
20 | "extensions" : {},
21 | "extras" : {}
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/EXT_mesh_manifold/mesh.EXT_mesh_manifold.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "EXT_mesh_manifold extension",
4 | "type" : "object",
5 | "description" : "glTF extension defines manifoldness for a mesh.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "manifoldPrimitive" : {
13 | "allOf" : [
14 | {
15 | "$ref" : "../../mesh.primitive.schema.json"
16 | }
17 | ]
18 | },
19 | "mergeIndices" : {
20 | "allOf" : [
21 | {
22 | "$ref" : "../../glTFid.schema.json"
23 | }
24 | ],
25 | "description" : "The index of the accessor that contains the vertex sparse indices for merging into a manifold."
26 | },
27 | "mergeValues" : {
28 | "allOf" : [
29 | {
30 | "$ref" : "../../glTFid.schema.json"
31 | }
32 | ],
33 | "description" : "The index of the accessor that contains the vertex sparse values for merging into a manifold."
34 | },
35 | "extensions" : {},
36 | "extras" : {}
37 | },
38 | "required" : [
39 | "manifoldPrimitive"
40 | ]
41 | }
42 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/EXT_meshopt_compression/buffer.EXT_meshopt_compression.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "EXT_meshopt_compression buffer extension",
4 | "type" : "object",
5 | "description" : "Compressed data for bufferView.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "fallback" : {
13 | "type" : "boolean",
14 | "description" : "Set to true to indicate that the buffer is only referenced by bufferViews that have EXT_meshopt_compression extension and as such doesn't need to be loaded.",
15 | "default" : false
16 | },
17 | "extensions" : {},
18 | "extras" : {}
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/EXT_meshopt_compression/bufferView.EXT_meshopt_compression.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "EXT_meshopt_compression bufferView extension",
4 | "type" : "object",
5 | "description" : "Compressed data for bufferView.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "buffer" : {
13 | "allOf" : [
14 | {
15 | "$ref" : "../../glTFid.schema.json"
16 | }
17 | ],
18 | "description" : "The index of the buffer with compressed data."
19 | },
20 | "byteOffset" : {
21 | "type" : "integer",
22 | "description" : "The offset into the buffer in bytes.",
23 | "minimum" : 0,
24 | "default" : 0
25 | },
26 | "byteLength" : {
27 | "type" : "integer",
28 | "description" : "The length of the compressed data in bytes.",
29 | "minimum" : 1
30 | },
31 | "byteStride" : {
32 | "type" : "integer",
33 | "description" : "The stride, in bytes.",
34 | "minimum" : 2,
35 | "maximum" : 256
36 | },
37 | "count" : {
38 | "type" : "integer",
39 | "description" : "The number of elements.",
40 | "minimum" : 1
41 | },
42 | "mode" : {
43 | "type" : "string",
44 | "description" : "The compression mode.",
45 | "enum" : [
46 | "ATTRIBUTES",
47 | "TRIANGLES",
48 | "INDICES"
49 | ]
50 | },
51 | "filter" : {
52 | "type" : "string",
53 | "description" : "The compression filter.",
54 | "enum" : [
55 | "NONE",
56 | "OCTAHEDRAL",
57 | "QUATERNION",
58 | "EXPONENTIAL"
59 | ],
60 | "default" : "NONE"
61 | },
62 | "extensions" : {},
63 | "extras" : {}
64 | },
65 | "required" : [
66 | "buffer",
67 | "byteLength",
68 | "byteStride",
69 | "count",
70 | "mode"
71 | ]
72 | }
73 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/EXT_texture_webp/glTF.EXT_texture_webp.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "EXT_texture_webp glTF extension",
4 | "type" : "object",
5 | "description" : "glTF extension to specify textures using the WebP image format.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "source" : {
13 | "allOf" : [
14 | {
15 | "$ref" : "../../glTFid.schema.json"
16 | }
17 | ],
18 | "description" : "The index of the images node which points to a WebP image."
19 | },
20 | "extensions" : {},
21 | "extras" : {}
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_animation_pointer/animation.channel.target.KHR_animation_pointer.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "title" : "KHR_animation_pointer glTF Animation Channel Target Extension",
4 | "type" : "object",
5 | "description" : "Extension object providing the JSON Pointer to the animated property.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "pointer" : {
13 | "type" : "string",
14 | "format" : "json-pointer",
15 | "description" : "JSON pointer to the animated property. The animation channel path value **MUST** be `pointer`."
16 | },
17 | "extensions" : {},
18 | "extras" : {}
19 | },
20 | "required" : [
21 | "pointer"
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_draco_mesh_compression/mesh.primitive.KHR_draco_mesh_compression.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_draco_mesh_compression glTF Mesh Primitive Extension",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "bufferView" : {
12 | "allOf" : [
13 | {
14 | "$ref" : "../../glTFid.schema.json"
15 | }
16 | ],
17 | "description" : "The index of the bufferView."
18 | },
19 | "attributes" : {
20 | "type" : "object",
21 | "minProperties" : 1,
22 | "additionalProperties" : {
23 | "$ref" : "../../glTFid.schema.json"
24 | },
25 | "description" : "A dictionary object, where each key corresponds to an attribute and its unique attribute id stored in the compressed geometry."
26 | },
27 | "extensions" : {},
28 | "extras" : {}
29 | },
30 | "required" : [
31 | "bufferView",
32 | "attributes"
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_lights_punctual/glTF.KHR_lights_punctual.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_lights_punctual glTF Document Extension",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "lights" : {
12 | "type" : "array",
13 | "items" : {
14 | "type" : "object",
15 | "$ref" : "light.schema.json"
16 | },
17 | "minItems" : 1
18 | },
19 | "extensions" : {},
20 | "extras" : {}
21 | },
22 | "required" : [
23 | "lights"
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_lights_punctual/light.spot.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_lights_punctual Light Spot Properties",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "innerConeAngle" : {
12 | "type" : "number",
13 | "description" : "Angle in radians from centre of spotlight where falloff begins.",
14 | "default" : 0,
15 | "minimum" : 0,
16 | "maximum" : 1.5707963267948966,
17 | "exclusiveMaximum" : true
18 | },
19 | "outerConeAngle" : {
20 | "type" : "number",
21 | "description" : "Angle in radians from centre of spotlight where falloff ends.",
22 | "default" : 0.7853981633974483,
23 | "minimum" : 0,
24 | "maximum" : 1.5707963267948966,
25 | "exclusiveMinimum" : true
26 | },
27 | "extensions" : {},
28 | "extras" : {}
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_lights_punctual/node.KHR_lights_punctual.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_lights_punctual glTF Node Extension",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "light" : {
12 | "allOf" : [
13 | {
14 | "$ref" : "../../glTFid.schema.json"
15 | }
16 | ],
17 | "description" : "The id of the light referenced by this node."
18 | },
19 | "extensions" : {},
20 | "extras" : {}
21 | },
22 | "required" : [
23 | "light"
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_anisotropy/material.KHR_materials_anisotropy.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_anisotropy glTF Material Extension",
4 | "type" : "object",
5 | "description" : "glTF extension that defines anisotropy.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "anisotropyStrength" : {
13 | "type" : "number",
14 | "description" : "The anisotropy strength. When the anisotropy texture is present, this value is multiplied by the texture's blue channel.",
15 | "default" : 0,
16 | "minimum" : 0,
17 | "maximum" : 1,
18 | "short_description" : "The anisotropy strength."
19 | },
20 | "anisotropyRotation" : {
21 | "type" : "number",
22 | "description" : "The rotation of the anisotropy in tangent, bitangent space, measured in radians counter-clockwise from the tangent. When the anisotropy texture is present, this value provides additional rotation to the vectors in the texture.",
23 | "default" : 0,
24 | "short_description" : "The rotation of the anisotropy."
25 | },
26 | "anisotropyTexture" : {
27 | "allOf" : [
28 | {
29 | "$ref" : "../../textureInfo.schema.json"
30 | }
31 | ],
32 | "description" : "The anisotropy texture. Red and green channels represent the anisotropy direction in $[-1, 1]$ tangent, bitangent space, to be rotated by the anisotropy rotation. The blue channel contains strength as $[0, 1]$ to be multiplied by the anisotropy strength.",
33 | "short_description" : "The anisotropy texture."
34 | },
35 | "extensions" : {},
36 | "extras" : {}
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_clearcoat/material.KHR_materials_clearcoat.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_clearcoat glTF Material Extension",
4 | "type" : "object",
5 | "description" : "glTF extension that defines the clearcoat material layer.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "clearcoatFactor" : {
13 | "type" : "number",
14 | "description" : "The clearcoat layer intensity (aka opacity) of the material. A value of 0.0 means the material has no clearcoat layer enabled.",
15 | "default" : 0,
16 | "minimum" : 0,
17 | "maximum" : 1,
18 | "short_description" : "The clearcoat layer intensity."
19 | },
20 | "clearcoatTexture" : {
21 | "allOf" : [
22 | {
23 | "$ref" : "../../textureInfo.schema.json"
24 | }
25 | ],
26 | "description" : "The clearcoat layer intensity texture. These values are sampled from the R channel. The values are linear. Use value 1.0 if no texture is supplied.",
27 | "short_description" : "The clearcoat layer intensity texture."
28 | },
29 | "clearcoatRoughnessFactor" : {
30 | "type" : "number",
31 | "description" : "The clearcoat layer roughness of the material.",
32 | "default" : 0,
33 | "minimum" : 0,
34 | "maximum" : 1,
35 | "short_description" : "The clearcoat layer roughness."
36 | },
37 | "clearcoatRoughnessTexture" : {
38 | "allOf" : [
39 | {
40 | "$ref" : "../../textureInfo.schema.json"
41 | }
42 | ],
43 | "description" : "The clearcoat layer roughness texture. These values are sampled from the G channel. The values are linear. Use value 1.0 if no texture is supplied.",
44 | "short_description" : "The clearcoat layer roughness texture."
45 | },
46 | "clearcoatNormalTexture" : {
47 | "allOf" : [
48 | {
49 | "$ref" : "../../material.normalTextureInfo.schema.json"
50 | }
51 | ],
52 | "description" : "A tangent space normal map for the clearcoat layer. If desired, this may be a reference to the same normal map used by the base material. If not supplied, no normal mapping is applied to the clear coat layer.",
53 | "short_description" : "The clearcoat normal map texture."
54 | },
55 | "extensions" : {},
56 | "extras" : {}
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_diffuse_transmission/glTF.KHR_materials_diffuse_transmission.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_diffuse_transmission glTF extension",
4 | "type" : "object",
5 | "description" : "glTF extension that defines the diffuse transmission of the material.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "diffuseTransmissionFactor" : {
13 | "type" : "number",
14 | "description" : "The percentage of non-specularly reflected light that is transmitted through the surface via a Lambertian diffuse transmission.",
15 | "default" : 0,
16 | "minimum" : 0,
17 | "maximum" : 1,
18 | "short_description" : "The percentage of light that is diffusely transmitted through the surface."
19 | },
20 | "diffuseTransmissionTexture" : {
21 | "allOf" : [
22 | {
23 | "$ref" : "../../textureInfo.schema.json"
24 | }
25 | ],
26 | "description" : "A texture that defines the strength of the diffuse transmission effect, stored in the alpha (A) channel. Will be multiplied by the diffuseTransmissionFactor.",
27 | "short_description" : "A texture that defines the percentage of light transmitted through the surface."
28 | },
29 | "diffuseTransmissionColorFactor" : {
30 | "type" : "array",
31 | "items" : {
32 | "type" : "number",
33 | "minimum" : 0
34 | },
35 | "description" : "The color of the transmitted light.",
36 | "default" : [
37 | 1,
38 | 1,
39 | 1
40 | ],
41 | "minItems" : 3,
42 | "maxItems" : 3,
43 | "short_description" : "The color of the transmitted light."
44 | },
45 | "diffuseTransmissionColorTexture" : {
46 | "allOf" : [
47 | {
48 | "$ref" : "../../textureInfo.schema.json"
49 | }
50 | ],
51 | "description" : "A texture that defines the color of the transmitted light, stored in the RGB channels and encoded in sRGB. This texture will be multiplied by diffuseTransmissionColorFactor.",
52 | "short_description" : "A texture that defines the color of the transmitted light"
53 | },
54 | "extensions" : {},
55 | "extras" : {}
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_dispersion/material.KHR_materials_dispersion.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_dispersion glTF Material Extension",
4 | "type" : "object",
5 | "description" : "glTF extension that defines the strength of dispersion.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "dispersion" : {
13 | "type" : "number",
14 | "description" : "This parameter defines dispersion in terms of the 20/Abbe number formulation.",
15 | "default" : 0,
16 | "minimum" : 0,
17 | "short_description" : "This parameter defines dispersion in terms of the 20/Abbe number formulation."
18 | },
19 | "extensions" : {},
20 | "extras" : {}
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_emissive_strength/material.KHR_materials_emissive_strength.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_emissive_strength glTF Material Extension",
4 | "type" : "object",
5 | "description" : "glTF extension that adjusts the strength of emissive material properties.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "emissiveStrength" : {
13 | "type" : "number",
14 | "description" : "The strength adjustment to be multiplied with the material's emissive value.",
15 | "default" : 1,
16 | "minimum" : 0
17 | },
18 | "extensions" : {},
19 | "extras" : {}
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_ior/material.KHR_materials_ior.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_ior glTF Material Extension",
4 | "type" : "object",
5 | "description" : "glTF extension that defines the index of refraction of a material.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "ior" : {
13 | "type" : "number",
14 | "description" : "The index of refraction (IOR) is a measured physical number usually in the range between 1 and 2 that determines how much the path of light is bent, or refracted, when entering a material. It also influences the ratio between reflected and transmitted light, calculated from the Fresnel equations.",
15 | "default" : 1.5,
16 | "oneOf" : [
17 | {
18 | "minimum" : 0,
19 | "maximum" : 0
20 | },
21 | {
22 | "minimum" : 1
23 | }
24 | ],
25 | "short_description" : "The index of refraction."
26 | },
27 | "extensions" : {},
28 | "extras" : {}
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_iridescence/material.KHR_materials_iridescence.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_iridescence glTF Material Extension",
4 | "type" : "object",
5 | "description" : "glTF extension that defines an iridescence effect.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "iridescenceFactor" : {
13 | "type" : "number",
14 | "description" : "The iridescence intensity factor.",
15 | "default" : 0,
16 | "minimum" : 0,
17 | "maximum" : 1
18 | },
19 | "iridescenceTexture" : {
20 | "allOf" : [
21 | {
22 | "$ref" : "../../textureInfo.schema.json"
23 | }
24 | ],
25 | "description" : "The iridescence intensity texture. The values are sampled from the R channel. These values are linear. If a texture is not given, a value of `1.0` **MUST** be assumed. If other channels are present (GBA), they are ignored for iridescence intensity calculations.",
26 | "short_description" : "The iridescence intensity texture."
27 | },
28 | "iridescenceIor" : {
29 | "type" : "number",
30 | "description" : "The index of refraction of the dielectric thin-film layer.",
31 | "default" : 1.3,
32 | "minimum" : 1
33 | },
34 | "iridescenceThicknessMinimum" : {
35 | "type" : "number",
36 | "description" : "The minimum thickness of the thin-film layer given in nanometers.",
37 | "default" : 100,
38 | "minimum" : 0,
39 | "short_description" : "The minimum thickness of the thin-film layer given in nanometers."
40 | },
41 | "iridescenceThicknessMaximum" : {
42 | "type" : "number",
43 | "description" : "The maximum thickness of the thin-film layer given in nanometers.",
44 | "default" : 400,
45 | "minimum" : 0,
46 | "short_description" : "The maximum thickness of the thin-film layer given in nanometers."
47 | },
48 | "iridescenceThicknessTexture" : {
49 | "allOf" : [
50 | {
51 | "$ref" : "../../textureInfo.schema.json"
52 | }
53 | ],
54 | "description" : "The thickness texture of the thin-film layer to linearly interpolate between the minimum and maximum thickness given by the corresponding properties, where a sampled value of `0.0` represents the minimum thickness and a sampled value of `1.0` represents the maximum thickness. The values are sampled from the G channel. These values are linear. If a texture is not given, the maximum thickness **MUST** be assumed. If other channels are present (RBA), they are ignored for thickness calculations.",
55 | "short_description" : "The thickness texture of the thin-film layer."
56 | },
57 | "extensions" : {},
58 | "extras" : {}
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_pbrSpecularGlossiness/glTF.KHR_materials_pbrSpecularGlossiness.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_pbrSpecularGlossiness glTF extension -- DO NOT USE. Archived extension, superseded by KHR_materials_specular.",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "diffuseFactor" : {
12 | "type" : "array",
13 | "items" : {
14 | "type" : "number",
15 | "minimum" : 0,
16 | "maximum" : 1
17 | },
18 | "description" : "The RGBA components of the reflected diffuse color of the material. Metals have a diffuse value of `[0.0, 0.0, 0.0]`. The fourth component (A) is the alpha coverage of the material. The `alphaMode` property specifies how alpha is interpreted. The values are linear.",
19 | "default" : [
20 | 1,
21 | 1,
22 | 1,
23 | 1
24 | ],
25 | "minItems" : 4,
26 | "maxItems" : 4,
27 | "short_description" : "The reflected diffuse factor of the material."
28 | },
29 | "diffuseTexture" : {
30 | "allOf" : [
31 | {
32 | "$ref" : "../../textureInfo.schema.json"
33 | }
34 | ],
35 | "description" : "The diffuse texture. This texture contains RGB components of the reflected diffuse color of the material encoded with the sRGB transfer function. If the fourth component (A) is present, it represents the linear alpha coverage of the material. Otherwise, an alpha of 1.0 is assumed. The `alphaMode` property specifies how alpha is interpreted. The stored texels must not be premultiplied.",
36 | "short_description" : "The diffuse texture."
37 | },
38 | "specularFactor" : {
39 | "type" : "array",
40 | "items" : {
41 | "type" : "number",
42 | "minimum" : 0,
43 | "maximum" : 1
44 | },
45 | "description" : "The specular RGB color of the material. This value is linear.",
46 | "default" : [
47 | 1,
48 | 1,
49 | 1
50 | ],
51 | "minItems" : 3,
52 | "maxItems" : 3,
53 | "short_description" : "The specular RGB color of the material."
54 | },
55 | "glossinessFactor" : {
56 | "type" : "number",
57 | "description" : "The glossiness or smoothness of the material. A value of 1.0 means the material has full glossiness or is perfectly smooth. A value of 0.0 means the material has no glossiness or is completely rough. This value is linear.",
58 | "default" : 1,
59 | "minimum" : 0,
60 | "maximum" : 1,
61 | "short_description" : "The glossiness or smoothness of the material."
62 | },
63 | "specularGlossinessTexture" : {
64 | "allOf" : [
65 | {
66 | "$ref" : "../../textureInfo.schema.json"
67 | }
68 | ],
69 | "description" : "The specular-glossiness texture is an RGBA texture, containing the specular color (RGB) encoded with the sRGB transfer function and the linear glossiness value (A).",
70 | "short_description" : "The specular-glossiness texture."
71 | },
72 | "extensions" : {},
73 | "extras" : {}
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_sheen/material.KHR_materials_sheen.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_sheen glTF Material Extension",
4 | "type" : "object",
5 | "description" : "glTF extension that defines the sheen material model.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "sheenColorFactor" : {
13 | "type" : "array",
14 | "items" : {
15 | "type" : "number",
16 | "minimum" : 0,
17 | "maximum" : 1
18 | },
19 | "minItems" : 3,
20 | "maxItems" : 3,
21 | "description" : "Color of the sheen layer (in linear space).",
22 | "default" : [
23 | 0,
24 | 0,
25 | 0
26 | ]
27 | },
28 | "sheenColorTexture" : {
29 | "allOf" : [
30 | {
31 | "$ref" : "../../textureInfo.schema.json"
32 | }
33 | ],
34 | "description" : "The sheen color (RGB) texture. Stored in channel RGB, the sheen color is in sRGB transfer function.",
35 | "short_description" : "The sheen color (RGB) texture."
36 | },
37 | "sheenRoughnessFactor" : {
38 | "type" : "number",
39 | "description" : "The sheen layer roughness of the material.",
40 | "default" : 0,
41 | "minimum" : 0,
42 | "maximum" : 1,
43 | "short_description" : "The sheen layer roughness."
44 | },
45 | "sheenRoughnessTexture" : {
46 | "allOf" : [
47 | {
48 | "$ref" : "../../textureInfo.schema.json"
49 | }
50 | ],
51 | "description" : "The sheen roughness (Alpha) texture. Stored in alpha channel, the roughness value is in linear space.",
52 | "short_description" : "The sheen roughness (Alpha) texture."
53 | },
54 | "extensions" : {},
55 | "extras" : {}
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_specular/material.KHR_materials_specular.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_specular glTF Material Extension",
4 | "type" : "object",
5 | "description" : "glTF extension that defines the strength of the specular reflection.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "specularFactor" : {
13 | "type" : "number",
14 | "description" : "This parameter scales the amount of specular reflection on non-metallic surfaces. It has no effect on metals.",
15 | "default" : 1,
16 | "minimum" : 0,
17 | "maximum" : 1,
18 | "short_description" : "The strength of the specular reflection."
19 | },
20 | "specularTexture" : {
21 | "allOf" : [
22 | {
23 | "$ref" : "../../textureInfo.schema.json"
24 | }
25 | ],
26 | "description" : "A texture that defines the specular factor in the alpha channel. This will be multiplied by specularFactor.",
27 | "short_description" : "A texture that defines the specular factor in the alpha channel."
28 | },
29 | "specularColorFactor" : {
30 | "type" : "array",
31 | "items" : {
32 | "type" : "number",
33 | "minimum" : 0
34 | },
35 | "description" : "This is an additional RGB color parameter that tints the specular reflection of non-metallic surfaces. At grazing angles, the reflection still blends to white, and the parameter has not effect on metals. The value is linear.",
36 | "default" : [
37 | 1,
38 | 1,
39 | 1
40 | ],
41 | "minItems" : 3,
42 | "maxItems" : 3,
43 | "short_description" : "The F0 RGB color of the specular reflection."
44 | },
45 | "specularColorTexture" : {
46 | "allOf" : [
47 | {
48 | "$ref" : "../../textureInfo.schema.json"
49 | }
50 | ],
51 | "description" : "A texture that defines the specular color in the RGB channels (encoded in sRGB). This will be multiplied by specularColorFactor.",
52 | "short_description" : "A texture that defines the F0 color of the specular reflection."
53 | },
54 | "extensions" : {},
55 | "extras" : {}
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_transmission/material.KHR_materials_transmission.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_transmission glTF Material Extension",
4 | "type" : "object",
5 | "description" : "glTF extension that defines the optical transmission of a material.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "transmissionFactor" : {
13 | "type" : "number",
14 | "description" : "The base percentage of non-specularly reflected light that is transmitted through the surface. i.e. of the light that penetrates a surface (isn't specularly reflected), this is the percentage that is transmitted and not diffusely re-emitted.",
15 | "default" : 0,
16 | "minimum" : 0,
17 | "maximum" : 1,
18 | "short_description" : "The base percentage of light transmitted through the surface."
19 | },
20 | "transmissionTexture" : {
21 | "allOf" : [
22 | {
23 | "$ref" : "../../textureInfo.schema.json"
24 | }
25 | ],
26 | "description" : "A texture that defines the transmission percentage of the surface, sampled from the R channel. These values are linear, and will be multiplied by transmissionFactor. This indicates the percentage of non-specularly reflected light that is transmitted through the surface. i.e. of the light that penetrates a surface (isn't specularly reflected), this is the percentage is transmitted and not diffusely re-emitted.",
27 | "short_description" : "A texture that defines the transmission percentage of the surface, sampled from the R channel. These values are linear, and will be multiplied by transmissionFactor."
28 | },
29 | "extensions" : {},
30 | "extras" : {}
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_unlit/material.KHR_materials_unlit.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_unlit glTF Material Extension",
4 | "type" : "object",
5 | "description" : "glTF extension that defines the unlit material model.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "extensions" : {},
13 | "extras" : {}
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_variants/glTF.KHR_materials_variants.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_variants glTF Document Extension",
4 | "type" : "object",
5 | "description" : "glTF extension that defines a material variations for mesh primitives",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "variants" : {
13 | "type" : "array",
14 | "items" : {
15 | "type" : "object",
16 | "allOf" : [
17 | {
18 | "$ref" : "../../glTFChildOfRootProperty.schema.json"
19 | }
20 | ],
21 | "description" : "An object defining a valid material variant",
22 | "properties" : {
23 | "name" : {
24 | "type" : "string",
25 | "description" : "The name of the material variant.",
26 | "short_description" : "The name of the material variant"
27 | },
28 | "extras" : {},
29 | "extensions" : {}
30 | },
31 | "required" : [
32 | "name"
33 | ],
34 | "short_description" : "An object defining a valid material variant"
35 | },
36 | "minItems" : 1
37 | },
38 | "extensions" : {},
39 | "extras" : {}
40 | },
41 | "required" : [
42 | "variants"
43 | ]
44 | }
45 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_variants/mesh.primitive.KHR_materials_variants.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_variants glTF Mesh Primitive Extension",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "mappings" : {
12 | "type" : "array",
13 | "description" : "An array of object values that associate an indexed material to a set of variants.",
14 | "items" : {
15 | "type" : "object",
16 | "allOf" : [
17 | {
18 | "$ref" : "../../glTFProperty.schema.json"
19 | }
20 | ],
21 | "properties" : {
22 | "variants" : {
23 | "uniqueItems" : true,
24 | "type" : "array",
25 | "description" : "An array of index values that reference variants defined in the glTF root's extension object.",
26 | "items" : {
27 | "allOf" : [
28 | {
29 | "$ref" : "../../glTFid.schema.json"
30 | }
31 | ]
32 | },
33 | "minItems" : 1,
34 | "short_description" : "An array of variant index values."
35 | },
36 | "material" : {
37 | "allOf" : [
38 | {
39 | "$ref" : "../../glTFid.schema.json"
40 | }
41 | ],
42 | "description" : "A reference to the material associated with the given array of variants.",
43 | "short_description" : "The material associated with the set of variants."
44 | },
45 | "name" : {
46 | "type" : "string",
47 | "description" : "The optional user-defined name of this variant material mapping. This is not necessarily unique.",
48 | "short_description" : "The user-defined name of this variant material mapping."
49 | },
50 | "extras" : {},
51 | "extensions" : {}
52 | },
53 | "required" : [
54 | "variants",
55 | "material"
56 | ]
57 | },
58 | "minItems" : 1,
59 | "short_description" : "A list of material to variant mappings"
60 | },
61 | "extensions" : {},
62 | "extras" : {}
63 | },
64 | "required" : [
65 | "mappings"
66 | ]
67 | }
68 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_materials_volume/material.KHR_materials_volume.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_materials_volume glTF Material Extension",
4 | "type" : "object",
5 | "description" : "glTF extension that defines the parameters for the volume of a material.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "thicknessFactor" : {
13 | "type" : "number",
14 | "minimum" : 0,
15 | "default" : 0,
16 | "description" : "The thickness of the volume beneath the surface. The value is given in the coordinate space of the mesh. A value greater than 0 turns the mesh into a volume with a homogeneous medium, enabling refraction, absorption and subsurface scattering. The actual value may be ignored by renderers that are able to derive the thickness from the mesh (ray tracer).",
17 | "short_description" : "Thickness of the volume."
18 | },
19 | "thicknessTexture" : {
20 | "allOf" : [
21 | {
22 | "$ref" : "../../textureInfo.schema.json"
23 | }
24 | ],
25 | "description" : "A texture that defines the thickness of the volume, stored in the G channel. Will be multiplied by thicknessFactor.",
26 | "short_description" : "Texture that defines the thickness of the volume, stored in the G channel."
27 | },
28 | "attenuationDistance" : {
29 | "type" : "number",
30 | "minimum" : 0,
31 | "exclusiveMinimum" : true,
32 | "description" : "Density of the medium given as the average distance that light travels in the medium before interacting with a particle. The value is given in world space. When undefined, the value is assumed to be infinite.",
33 | "short_description" : "Average distance that light travels in the medium before interacting with a particle."
34 | },
35 | "attenuationColor" : {
36 | "type" : "array",
37 | "items" : {
38 | "type" : "number",
39 | "minimum" : 0,
40 | "maximum" : 1
41 | },
42 | "description" : "Color that white light turns into due to absorption when reaching the attenuation distance.",
43 | "default" : [
44 | 1,
45 | 1,
46 | 1
47 | ],
48 | "minItems" : 3,
49 | "maxItems" : 3
50 | },
51 | "extensions" : {},
52 | "extras" : {}
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_techniques_webgl/glTF.KHR_techniques_webgl.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_techniques_webgl glTF extension -- DO NOT USE. Archived extension, superseded by glTF PBR materials.",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "programs" : {
12 | "type" : "array",
13 | "description" : "An array of `Program` objects.",
14 | "items" : {
15 | "$ref" : "program.schema.json"
16 | },
17 | "minItems" : 1
18 | },
19 | "shaders" : {
20 | "type" : "array",
21 | "description" : "An array of `Shader` objects.",
22 | "items" : {
23 | "$ref" : "shader.schema.json"
24 | },
25 | "minItems" : 1
26 | },
27 | "techniques" : {
28 | "type" : "array",
29 | "description" : "An array of `Technique` objects. A technique is a template for a material appearance.",
30 | "items" : {
31 | "$ref" : "technique.schema.json"
32 | },
33 | "minItems" : 1,
34 | "short_description" : "An array of `Technique` objects."
35 | },
36 | "extensions" : {},
37 | "extras" : {}
38 | },
39 | "required" : [
40 | "programs",
41 | "shaders",
42 | "techniques"
43 | ]
44 | }
45 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_techniques_webgl/material.KHR_techniques_webgl.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_techniques_webgl material extension -- DO NOT USE. Archived extension, superseded by glTF PBR materials.",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "technique" : {
12 | "allOf" : [
13 | {
14 | "$ref" : "../../glTFid.schema.json"
15 | }
16 | ],
17 | "description" : "The index of the technique."
18 | },
19 | "values" : {
20 | "type" : "object",
21 | "description" : "Dictionary object of uniform values. Uniforms with the same name as the technique's uniform must conform to the referenced `type` and `count` (if present) properties, and override the technique's uniform value. A uniform value must be supplied here if not present in the technique uniforms.",
22 | "properties" : {},
23 | "additionalProperties" : {
24 | "$ref" : "uniform.value.schema.json"
25 | },
26 | "default" : {},
27 | "short_description" : "Dictionary object of uniform values."
28 | },
29 | "extensions" : {},
30 | "extras" : {}
31 | },
32 | "required" : [
33 | "technique"
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_techniques_webgl/program.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "Program -- DO NOT USE. Archived extension, superseded by glTF PBR materials.",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFChildOfRootProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "fragmentShader" : {
12 | "allOf" : [
13 | {
14 | "$ref" : "../../glTFid.schema.json"
15 | }
16 | ],
17 | "description" : "The index of the fragment shader."
18 | },
19 | "vertexShader" : {
20 | "allOf" : [
21 | {
22 | "$ref" : "../../glTFid.schema.json"
23 | }
24 | ],
25 | "description" : "The index of the vertex shader."
26 | },
27 | "glExtensions" : {
28 | "type" : "array",
29 | "description" : "The names of required WebGL 1.0 extensions.",
30 | "items" : {
31 | "type" : "string",
32 | "minLength" : 1,
33 | "maxLength" : 256
34 | },
35 | "minItems" : 1,
36 | "gltf_webgl" : "`getExtension()`"
37 | },
38 | "name" : {},
39 | "extensions" : {},
40 | "extras" : {}
41 | },
42 | "required" : [
43 | "fragmentShader",
44 | "vertexShader"
45 | ],
46 | "gltf_webgl" : "`attachShader()`, `bindAttribLocation()`, `createProgram()`, `deleteProgram()`, `getProgramParameter()`, `getProgramInfoLog()`, `linkProgram()`, `useProgram()`, and `validateProgram()`"
47 | }
48 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_techniques_webgl/shader.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "Shader -- DO NOT USE. Archived extension, superseded by glTF PBR materials.",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFChildOfRootProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "uri" : {
12 | "type" : "string",
13 | "description" : "The uri of the GLSL source. Relative paths are relative to the `.gltf` file. Instead of referencing an external file, the uri can also be a data-uri.",
14 | "format" : "uriref",
15 | "gltf_uriType" : "text",
16 | "short_description" : "The uri of the GLSL source."
17 | },
18 | "type" : {
19 | "description" : "The shader stage. All valid values correspond to WebGL enums.",
20 | "oneOf" : [
21 | {
22 | "enum" : [
23 | 35632
24 | ],
25 | "description" : "FRAGMENT_SHADER - The shader stage."
26 | },
27 | {
28 | "enum" : [
29 | 35633
30 | ],
31 | "description" : "VERTEX_SHADER - The shader stage."
32 | }
33 | ],
34 | "short_description" : "The shader stage."
35 | },
36 | "bufferView" : {
37 | "allOf" : [
38 | {
39 | "$ref" : "../../glTFid.schema.json"
40 | }
41 | ],
42 | "description" : "The index of the bufferView that contains the GLSL shader source. Use this instead of the shader's uri property."
43 | },
44 | "name" : {},
45 | "extensions" : {},
46 | "extras" : {}
47 | },
48 | "required" : [
49 | "type"
50 | ],
51 | "oneOf" : [
52 | {
53 | "required" : [
54 | "uri"
55 | ]
56 | },
57 | {
58 | "required" : [
59 | "bufferView"
60 | ]
61 | }
62 | ],
63 | "gltf_webgl" : "`createShader()`, `deleteShader()`, `shaderSource()`, `compileShader()`, `getShaderParameter()`, and `getShaderInfoLog()`"
64 | }
65 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_techniques_webgl/technique.attribute.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "Attribute -- DO NOT USE. Archived extension, superseded by glTF PBR materials.",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "semantic" : {
12 | "type" : "string",
13 | "description" : "Identifies a mesh attribute semantic. Attribute semantics include `\"POSITION\"`, `\"NORMAL\"`, `\"TEXCOORD\"`, `\"COLOR\"`, `\"JOINT\"`, and `\"WEIGHT\"`. `\"TEXCOORD\"` and `\"COLOR\"` attribute semantic property names must be of the form `[semantic]_[set_index]`, e.g., `\"TEXCOORD_0\"`, `\"TEXCOORD_1\"`, `\"COLOR_1\"`, etc. For forward-compatibility, application-specific semantics must start with an underscore, e.g., `\"_SIMULATION_TIME\"`.",
14 | "short_description" : "Identifies a mesh attribute semantic."
15 | },
16 | "extensions" : {},
17 | "extras" : {}
18 | },
19 | "required" : [
20 | "semantic"
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_techniques_webgl/technique.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "Technique -- DO NOT USE. Archived extension, superseded by glTF PBR materials.",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFChildOfRootProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "program" : {
12 | "allOf" : [
13 | {
14 | "$ref" : "../../glTFid.schema.json"
15 | }
16 | ],
17 | "description" : "The index of the program."
18 | },
19 | "attributes" : {
20 | "type" : "object",
21 | "description" : "A dictionary object of `Attribute` objects. Each object defines an attribute input with a type and a semantic.",
22 | "properties" : {},
23 | "additionalProperties" : {
24 | "$ref" : "technique.attribute.schema.json"
25 | },
26 | "short_description" : "A dictionary object of `Attribute` objects."
27 | },
28 | "uniforms" : {
29 | "type" : "object",
30 | "description" : "A dictionary object of `Uniform` objects. Each object defines a uniform input with a type and an optional semantic and value.",
31 | "properties" : {},
32 | "additionalProperties" : {
33 | "$ref" : "technique.uniform.schema.json"
34 | },
35 | "short_description" : "A dictionary object of `Uniform` objects."
36 | },
37 | "name" : {},
38 | "extensions" : {},
39 | "extras" : {}
40 | },
41 | "required" : [
42 | "program"
43 | ]
44 | }
45 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_techniques_webgl/uniform.value.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "Uniform Value -- DO NOT USE. Archived extension, superseded by glTF PBR materials.",
4 | "oneOf" : [
5 | {
6 | "type" : [
7 | "number",
8 | "boolean"
9 | ]
10 | },
11 | {
12 | "type" : "array",
13 | "items" : {
14 | "type" : [
15 | "number"
16 | ]
17 | },
18 | "minItems" : 1
19 | },
20 | {
21 | "type" : "array",
22 | "items" : {
23 | "type" : [
24 | "boolean"
25 | ]
26 | },
27 | "minItems" : 1
28 | },
29 | {
30 | "$ref" : "../../textureInfo.schema.json"
31 | }
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_texture_basisu/texture.KHR_texture_basisu.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_texture_basisu glTF Texture Extension",
4 | "type" : "object",
5 | "description" : "glTF extension to specify textures using the KTX v2 images with Basis Universal supercompression.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "source" : {
13 | "allOf" : [
14 | {
15 | "$ref" : "../../glTFid.schema.json"
16 | }
17 | ],
18 | "description" : "The index of the image which points to a KTX v2 resource with Basis Universal supercompression."
19 | },
20 | "extensions" : {},
21 | "extras" : {}
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_texture_transform/textureInfo.KHR_texture_transform.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_texture_transform glTF TextureInfo Extension",
4 | "type" : "object",
5 | "description" : "glTF extension that enables shifting and scaling UV coordinates on a per-texture basis",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "offset" : {
13 | "type" : "array",
14 | "description" : "The offset of the UV coordinate origin as a factor of the texture dimensions.",
15 | "items" : {
16 | "type" : "number"
17 | },
18 | "minItems" : 2,
19 | "maxItems" : 2,
20 | "default" : [
21 | 0,
22 | 0
23 | ]
24 | },
25 | "rotation" : {
26 | "type" : "number",
27 | "description" : "Rotate the UVs by this many radians counter-clockwise around the origin.",
28 | "default" : 0
29 | },
30 | "scale" : {
31 | "type" : "array",
32 | "description" : "The scale factor applied to the components of the UV coordinates.",
33 | "items" : {
34 | "type" : "number"
35 | },
36 | "minItems" : 2,
37 | "maxItems" : 2,
38 | "default" : [
39 | 1,
40 | 1
41 | ]
42 | },
43 | "texCoord" : {
44 | "type" : "integer",
45 | "description" : "Overrides the textureInfo texCoord value if supplied, and if this extension is supported.",
46 | "minimum" : 0
47 | },
48 | "extensions" : {},
49 | "extras" : {}
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_xmp/glTF.KHR_xmp.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_xmp glTF extension -- DO NOT USE. Archived extension, superseded by KHR_xmp_json_ld.",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "@context" : {
12 | "type" : "object",
13 | "additionalProperties" : true,
14 | "description" : "Dictionary mapping XMP namespace names to the URI where they are defined"
15 | },
16 | "packets" : {
17 | "type" : "array",
18 | "items" : {
19 | "type" : "object",
20 | "additionalProperties" : true,
21 | "description" : "Dictionary of XMP metadata properties. Property names take the form `xmp_namespace_name:property_name`"
22 | },
23 | "minItems" : 1
24 | },
25 | "extensions" : {},
26 | "extras" : {}
27 | },
28 | "required" : [
29 | "packets",
30 | "@context"
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_xmp/node.KHR_xmp.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_xmp node extension -- DO NOT USE. Archived extension, superseded by KHR_xmp_json_ld.",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "../../glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "packet" : {
12 | "allOf" : [
13 | {
14 | "$ref" : "../../glTFid.schema.json"
15 | }
16 | ],
17 | "description" : "The id of the XMP packet referenced by this node."
18 | },
19 | "extensions" : {},
20 | "extras" : {}
21 | },
22 | "required" : [
23 | "packet"
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_xmp_json_ld/KHR_xmp_json_ld.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_xmp_json_ld glTF Extension",
4 | "type" : "object",
5 | "description" : "References an XMP packet listed in `KHR_xmp_json_ld glTF extension`",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "packet" : {
13 | "allOf" : [
14 | {
15 | "$ref" : "../../glTFid.schema.json"
16 | }
17 | ],
18 | "description" : "The id of the XMP packet referenced."
19 | },
20 | "extensions" : {},
21 | "extras" : {}
22 | },
23 | "required" : [
24 | "packet"
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extensions/KHR_xmp_json_ld/glTF.KHR_xmp_json_ld.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "http://json-schema.org/draft-04/schema",
3 | "title" : "KHR_xmp_json_ld glTF Document Extension",
4 | "type" : "object",
5 | "description" : "Metadata about the glTF asset.",
6 | "allOf" : [
7 | {
8 | "$ref" : "../../glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "packets" : {
13 | "type" : "array",
14 | "items" : {
15 | "$ref" : "#/definitions/packet"
16 | },
17 | "minItems" : 1
18 | },
19 | "extensions" : {},
20 | "extras" : {}
21 | },
22 | "required" : [
23 | "packets"
24 | ],
25 | "definitions" : {
26 | "packet" : {
27 | "type" : "object",
28 | "properties" : {
29 | "@context" : {
30 | "type" : "object",
31 | "additionalProperties" : {
32 | "type" : "string"
33 | },
34 | "description" : "Dictionary mapping XMP namespace names to the URI where they are defined"
35 | }
36 | },
37 | "additionalProperties" : true,
38 | "description" : "Dictionary of XMP metadata properties. Property names take the form `xmp_namespace_name:property_name`",
39 | "required" : [
40 | "@context"
41 | ]
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/extras.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "extras.schema.json",
4 | "title" : "Extras",
5 | "description" : "Application-specific data.",
6 | "gltf_sectionDescription" : "Although `extras` **MAY** have any type, it is common for applications to store and access custom data as key/value pairs. Therefore, `extras` **SHOULD** be a JSON object rather than a primitive value for best portability."
7 | }
8 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/glTFChildOfRootProperty.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "glTFChildOfRootProperty.schema.json",
4 | "type" : "object",
5 | "allOf" : [
6 | {
7 | "$ref" : "glTFProperty.schema.json"
8 | }
9 | ],
10 | "properties" : {
11 | "name" : {
12 | "type" : "string",
13 | "description" : "The user-defined name of this object. This is not necessarily unique, e.g., an accessor and a buffer could have the same name, or two accessors could even have the same name.",
14 | "short_description" : "The user-defined name of this object."
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/glTFProperty.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "glTFProperty.schema.json",
4 | "type" : "object",
5 | "properties" : {
6 | "extensions" : {
7 | "$ref" : "extension.schema.json"
8 | },
9 | "extras" : {
10 | "$ref" : "extras.schema.json"
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/glTFid.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "glTFid.schema.json",
4 | "title" : "glTF Id",
5 | "type" : "integer",
6 | "minimum" : 0
7 | }
8 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/image.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "image.schema.json",
4 | "title" : "Image",
5 | "type" : "object",
6 | "description" : "Image data used to create a texture. Image **MAY** be referenced by an URI (or IRI) or a buffer view index.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFChildOfRootProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "uri" : {
14 | "type" : "string",
15 | "description" : "The URI (or IRI) of the image. Relative paths are relative to the current glTF asset. Instead of referencing an external file, this field **MAY** contain a `data:`-URI. This field **MUST NOT** be defined when `bufferView` is defined.",
16 | "format" : "iri-reference",
17 | "gltf_uriType" : "image",
18 | "short_description" : "The URI (or IRI) of the image."
19 | },
20 | "mimeType" : {
21 | "anyOf" : [
22 | {
23 | "const" : "image/jpeg"
24 | },
25 | {
26 | "const" : "image/png"
27 | },
28 | {
29 | "type" : "string"
30 | }
31 | ],
32 | "description" : "The image's media type. This field **MUST** be defined when `bufferView` is defined."
33 | },
34 | "bufferView" : {
35 | "allOf" : [
36 | {
37 | "$ref" : "glTFid.schema.json"
38 | }
39 | ],
40 | "description" : "The index of the bufferView that contains the image. This field **MUST NOT** be defined when `uri` is defined."
41 | },
42 | "name" : {},
43 | "extensions" : {
44 | "properties" : {
45 | "KHR_xmp" : {
46 | "allOf" : [
47 | {
48 | "$ref" : "extensions/KHR_xmp/node.KHR_xmp.schema.json"
49 | }
50 | ]
51 | },
52 | "KHR_xmp_json_ld" : {
53 | "allOf" : [
54 | {
55 | "$ref" : "extensions/KHR_xmp_json_ld/KHR_xmp_json_ld.schema.json"
56 | }
57 | ]
58 | }
59 | }
60 | },
61 | "extras" : {}
62 | },
63 | "dependencies" : {
64 | "bufferView" : [
65 | "mimeType"
66 | ]
67 | },
68 | "oneOf" : [
69 | {
70 | "required" : [
71 | "uri"
72 | ]
73 | },
74 | {
75 | "required" : [
76 | "bufferView"
77 | ]
78 | }
79 | ]
80 | }
81 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/material.normalTextureInfo.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "material.normalTextureInfo.schema.json",
4 | "title" : "Material Normal Texture Info",
5 | "type" : "object",
6 | "allOf" : [
7 | {
8 | "$ref" : "textureInfo.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "index" : {},
13 | "texCoord" : {},
14 | "scale" : {
15 | "type" : "number",
16 | "description" : "The scalar parameter applied to each normal vector of the texture. This value scales the normal vector in X and Y directions using the formula: `scaledNormal = normalize(( * 2.0 - 1.0) * vec3(, , 1.0))`.",
17 | "default" : 1,
18 | "short_description" : "The scalar parameter applied to each normal vector of the normal texture."
19 | },
20 | "extensions" : {},
21 | "extras" : {}
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/material.occlusionTextureInfo.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "material.occlusionTextureInfo.schema.json",
4 | "title" : "Material Occlusion Texture Info",
5 | "type" : "object",
6 | "allOf" : [
7 | {
8 | "$ref" : "textureInfo.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "index" : {},
13 | "texCoord" : {},
14 | "strength" : {
15 | "type" : "number",
16 | "description" : "A scalar parameter controlling the amount of occlusion applied. A value of `0.0` means no occlusion. A value of `1.0` means full occlusion. This value affects the final occlusion value as: `1.0 + strength * ( - 1.0)`.",
17 | "default" : 1,
18 | "minimum" : 0,
19 | "maximum" : 1,
20 | "short_description" : "A scalar multiplier controlling the amount of occlusion applied."
21 | },
22 | "extensions" : {},
23 | "extras" : {}
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/material.pbrMetallicRoughness.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "material.pbrMetallicRoughness.schema.json",
4 | "title" : "Material PBR Metallic Roughness",
5 | "type" : "object",
6 | "description" : "A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "baseColorFactor" : {
14 | "type" : "array",
15 | "items" : {
16 | "type" : "number",
17 | "minimum" : 0,
18 | "maximum" : 1
19 | },
20 | "description" : "The factors for the base color of the material. This value defines linear multipliers for the sampled texels of the base color texture.",
21 | "default" : [
22 | 1,
23 | 1,
24 | 1,
25 | 1
26 | ],
27 | "minItems" : 4,
28 | "maxItems" : 4,
29 | "short_description" : "The factors for the base color of the material."
30 | },
31 | "baseColorTexture" : {
32 | "allOf" : [
33 | {
34 | "$ref" : "textureInfo.schema.json"
35 | }
36 | ],
37 | "description" : "The base color texture. The first three components (RGB) **MUST** be encoded with the sRGB transfer function. They specify the base color of the material. If the fourth component (A) is present, it represents the linear alpha coverage of the material. Otherwise, the alpha coverage is equal to `1.0`. The `material.alphaMode` property specifies how alpha is interpreted. The stored texels **MUST NOT** be premultiplied. When undefined, the texture **MUST** be sampled as having `1.0` in all components.",
38 | "short_description" : "The base color texture."
39 | },
40 | "metallicFactor" : {
41 | "type" : "number",
42 | "description" : "The factor for the metalness of the material. This value defines a linear multiplier for the sampled metalness values of the metallic-roughness texture.",
43 | "default" : 1,
44 | "minimum" : 0,
45 | "maximum" : 1,
46 | "short_description" : "The factor for the metalness of the material."
47 | },
48 | "roughnessFactor" : {
49 | "type" : "number",
50 | "description" : "The factor for the roughness of the material. This value defines a linear multiplier for the sampled roughness values of the metallic-roughness texture.",
51 | "default" : 1,
52 | "minimum" : 0,
53 | "maximum" : 1,
54 | "short_description" : "The factor for the roughness of the material."
55 | },
56 | "metallicRoughnessTexture" : {
57 | "allOf" : [
58 | {
59 | "$ref" : "textureInfo.schema.json"
60 | }
61 | ],
62 | "description" : "The metallic-roughness texture. The metalness values are sampled from the B channel. The roughness values are sampled from the G channel. These values **MUST** be encoded with a linear transfer function. If other channels are present (R or A), they **MUST** be ignored for metallic-roughness calculations. When undefined, the texture **MUST** be sampled as having `1.0` in G and B components.",
63 | "short_description" : "The metallic-roughness texture."
64 | },
65 | "extensions" : {},
66 | "extras" : {}
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/mesh.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "mesh.schema.json",
4 | "title" : "Mesh",
5 | "type" : "object",
6 | "description" : "A set of primitives to be rendered. Its global transform is defined by a node that references it.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFChildOfRootProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "primitives" : {
14 | "type" : "array",
15 | "description" : "An array of primitives, each defining geometry to be rendered.",
16 | "items" : {
17 | "$ref" : "mesh.primitive.schema.json"
18 | },
19 | "minItems" : 1
20 | },
21 | "weights" : {
22 | "type" : "array",
23 | "description" : "Array of weights to be applied to the morph targets. The number of array elements **MUST** match the number of morph targets.",
24 | "items" : {
25 | "type" : "number"
26 | },
27 | "minItems" : 1
28 | },
29 | "name" : {},
30 | "extensions" : {
31 | "properties" : {
32 | "KHR_xmp" : {
33 | "allOf" : [
34 | {
35 | "$ref" : "extensions/KHR_xmp/node.KHR_xmp.schema.json"
36 | }
37 | ]
38 | },
39 | "KHR_xmp_json_ld" : {
40 | "allOf" : [
41 | {
42 | "$ref" : "extensions/KHR_xmp_json_ld/KHR_xmp_json_ld.schema.json"
43 | }
44 | ]
45 | },
46 | "EXT_mesh_manifold" : {
47 | "allOf" : [
48 | {
49 | "$ref" : "extensions/EXT_mesh_manifold/mesh.EXT_mesh_manifold.schema.json"
50 | }
51 | ]
52 | }
53 | }
54 | },
55 | "extras" : {}
56 | },
57 | "required" : [
58 | "primitives"
59 | ]
60 | }
61 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/scene.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "scene.schema.json",
4 | "title" : "Scene",
5 | "type" : "object",
6 | "description" : "The root nodes of a scene.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFChildOfRootProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "nodes" : {
14 | "type" : "array",
15 | "description" : "The indices of each root node.",
16 | "items" : {
17 | "$ref" : "glTFid.schema.json"
18 | },
19 | "uniqueItems" : true,
20 | "minItems" : 1
21 | },
22 | "name" : {},
23 | "extensions" : {
24 | "properties" : {
25 | "EXT_lights_image_based" : {
26 | "allOf" : [
27 | {
28 | "$ref" : "extensions/EXT_lights_image_based/scene.EXT_lights_image_based.schema.json"
29 | }
30 | ]
31 | },
32 | "KHR_xmp" : {
33 | "allOf" : [
34 | {
35 | "$ref" : "extensions/KHR_xmp/node.KHR_xmp.schema.json"
36 | }
37 | ]
38 | },
39 | "KHR_xmp_json_ld" : {
40 | "allOf" : [
41 | {
42 | "$ref" : "extensions/KHR_xmp_json_ld/KHR_xmp_json_ld.schema.json"
43 | }
44 | ]
45 | }
46 | }
47 | },
48 | "extras" : {}
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/skin.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "skin.schema.json",
4 | "title" : "Skin",
5 | "type" : "object",
6 | "description" : "Joints and matrices defining a skin.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFChildOfRootProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "inverseBindMatrices" : {
14 | "allOf" : [
15 | {
16 | "$ref" : "glTFid.schema.json"
17 | }
18 | ],
19 | "description" : "The index of the accessor containing the floating-point 4x4 inverse-bind matrices. Its `accessor.count` property **MUST** be greater than or equal to the number of elements of the `joints` array. When undefined, each matrix is a 4x4 identity matrix.",
20 | "short_description" : "The index of the accessor containing the floating-point 4x4 inverse-bind matrices."
21 | },
22 | "skeleton" : {
23 | "allOf" : [
24 | {
25 | "$ref" : "glTFid.schema.json"
26 | }
27 | ],
28 | "description" : "The index of the node used as a skeleton root. The node **MUST** be the closest common root of the joints hierarchy or a direct or indirect parent node of the closest common root.",
29 | "short_description" : "The index of the node used as a skeleton root."
30 | },
31 | "joints" : {
32 | "type" : "array",
33 | "description" : "Indices of skeleton nodes, used as joints in this skin.",
34 | "items" : {
35 | "$ref" : "glTFid.schema.json"
36 | },
37 | "uniqueItems" : true,
38 | "minItems" : 1,
39 | "short_description" : "Indices of skeleton nodes, used as joints in this skin."
40 | },
41 | "name" : {},
42 | "extensions" : {},
43 | "extras" : {}
44 | },
45 | "required" : [
46 | "joints"
47 | ]
48 | }
49 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/texture.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "texture.schema.json",
4 | "title" : "Texture",
5 | "type" : "object",
6 | "description" : "A texture and its sampler.",
7 | "allOf" : [
8 | {
9 | "$ref" : "glTFChildOfRootProperty.schema.json"
10 | }
11 | ],
12 | "properties" : {
13 | "sampler" : {
14 | "allOf" : [
15 | {
16 | "$ref" : "glTFid.schema.json"
17 | }
18 | ],
19 | "description" : "The index of the sampler used by this texture. When undefined, a sampler with repeat wrapping and auto filtering **SHOULD** be used."
20 | },
21 | "source" : {
22 | "allOf" : [
23 | {
24 | "$ref" : "glTFid.schema.json"
25 | }
26 | ],
27 | "description" : "The index of the image used by this texture. When undefined, an extension or other mechanism **SHOULD** supply an alternate texture source, otherwise behavior is undefined."
28 | },
29 | "name" : {},
30 | "extensions" : {
31 | "properties" : {
32 | "KHR_texture_basisu" : {
33 | "allOf" : [
34 | {
35 | "$ref" : "extensions/KHR_texture_basisu/texture.KHR_texture_basisu.schema.json"
36 | }
37 | ]
38 | },
39 | "EXT_texture_webp" : {
40 | "allOf" : [
41 | {
42 | "$ref" : "extensions/EXT_texture_webp/glTF.EXT_texture_webp.schema.json"
43 | }
44 | ]
45 | }
46 | }
47 | },
48 | "extras" : {}
49 | },
50 | "gltf_webgl" : "`createTexture()`, `deleteTexture()`, `bindTexture()`, `texImage2D()`, and `texParameterf()`"
51 | }
52 |
--------------------------------------------------------------------------------
/schemas/gltf-2.0/textureInfo.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema" : "https://json-schema.org/draft/2020-12/schema",
3 | "$id" : "textureInfo.schema.json",
4 | "title" : "Texture Info",
5 | "type" : "object",
6 | "allOf" : [
7 | {
8 | "$ref" : "glTFProperty.schema.json"
9 | }
10 | ],
11 | "properties" : {
12 | "index" : {
13 | "allOf" : [
14 | {
15 | "$ref" : "glTFid.schema.json"
16 | }
17 | ],
18 | "description" : "The index of the texture."
19 | },
20 | "texCoord" : {
21 | "type" : "integer",
22 | "description" : "This integer value is used to construct a string in the format `TEXCOORD_` which is a reference to a key in `mesh.primitives.attributes` (e.g. a value of `0` corresponds to `TEXCOORD_0`). A mesh primitive **MUST** have the corresponding texture coordinate attributes for the material to be applicable to it.",
23 | "default" : 0,
24 | "minimum" : 0,
25 | "short_description" : "The set index of texture's TEXCOORD attribute used for texture coordinate mapping."
26 | },
27 | "extensions" : {
28 | "properties" : {
29 | "KHR_texture_transform" : {
30 | "allOf" : [
31 | {
32 | "$ref" : "extensions/KHR_texture_transform/textureInfo.KHR_texture_transform.schema.json"
33 | }
34 | ]
35 | }
36 | }
37 | },
38 | "extras" : {}
39 | },
40 | "required" : [
41 | "index"
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gltf-language-server",
3 | "description": "glTF Language Server",
4 | "version": "2.5.1",
5 | "author": "Analytical Graphics, Inc. and outside contributors",
6 | "license": "Apache-2.0",
7 | "engines": {
8 | "node": "*"
9 | },
10 | "repository": {
11 | "type": "git",
12 | "url": "https://github.com/AnalyticalGraphicsInc/gltf-vscode"
13 | },
14 | "dependencies": {
15 | "gltf-validator": "2.0.0-dev.3.10",
16 | "json-source-map": "0.6.1",
17 | "vscode-languageserver": "^5.2.1",
18 | "vscode-uri": "^3.0.8"
19 | },
20 | "scripts": {
21 | "preinstall": "touch installServerIntoExtension && rm installServerIntoExtension*",
22 | "installServer": "installServerIntoExtension .. ./package.json ./tsconfig.json",
23 | "compile": "installServerIntoExtension .. ./package.json ./tsconfig.json && tsc -p .",
24 | "watch": "installServerIntoExtension .. ./package.json ./tsconfig.json && tsc -w -p ."
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/server/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "alwaysStrict": true,
4 | "noUnusedLocals": true,
5 | "noUnusedParameters": true,
6 | "noImplicitAny": false,
7 | "noImplicitReturns": true,
8 | "target": "es2017",
9 | "module": "commonjs",
10 | "moduleResolution": "node",
11 | "sourceMap": true,
12 | "lib" : [ "es2017" ],
13 | "outDir": "."
14 | },
15 | "exclude": [
16 | "node_modules"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/src/contextBase.ts:
--------------------------------------------------------------------------------
1 | import * as vscode from "vscode";
2 | import * as path from 'path';
3 |
4 | export abstract class ContextBase {
5 | protected readonly _context: vscode.ExtensionContext;
6 | private readonly _extensionRootPath: string;
7 |
8 | constructor(context: vscode.ExtensionContext) {
9 | this._context = context;
10 | this._extensionRootPath = this._context.extensionPath;
11 | }
12 |
13 | protected get extensionRootPath(): string {
14 | return this._extensionRootPath;
15 | }
16 |
17 | protected getConfigResourceUrl(section: string, name: string, localResourceRoots: Array): string {
18 | let value = vscode.workspace.getConfiguration(section).get(name);
19 |
20 | if (value.startsWith('{extensionRootPath}')) {
21 | value = path.join(this._extensionRootPath, value.replace(/^{extensionRootPath}\/?\\?/, ''));
22 | }
23 |
24 | localResourceRoots.push(vscode.Uri.file(path.dirname(value)));
25 | return value;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/gltfWindow.ts:
--------------------------------------------------------------------------------
1 | import * as vscode from 'vscode';
2 | import { GltfPreview } from './gltfPreview';
3 | import { GltfInspectData } from './gltfInspectData';
4 | import { GltfOutline } from './gltfOutline';
5 |
6 | function isGltfFile(editor: vscode.TextEditor | undefined): boolean {
7 | return editor && editor.document.fileName.toLowerCase().endsWith('.gltf');
8 | }
9 |
10 | export class GltfWindow {
11 | private _gltfPreview: GltfPreview;
12 | private _gltfInspectData: GltfInspectData;
13 | private _gltfOutline: GltfOutline;
14 | private _activeTextEditor: vscode.TextEditor;
15 | private _onDidChangeActiveTextEditor: vscode.EventEmitter = new vscode.EventEmitter();
16 |
17 | constructor(context: vscode.ExtensionContext) {
18 | this._gltfPreview = new GltfPreview(context);
19 |
20 | this._gltfOutline = new GltfOutline(context, this);
21 | vscode.window.registerTreeDataProvider('gltfOutline', this._gltfOutline);
22 |
23 | this._gltfInspectData = new GltfInspectData(context, this);
24 | this._gltfInspectData.setTreeView(vscode.window.createTreeView('gltfInspectData', { treeDataProvider: this._gltfInspectData, canSelectMany: true }));
25 |
26 | vscode.window.onDidChangeActiveTextEditor(() => {
27 | // Wait a frame before updating to ensure all window states are updated.
28 | setImmediate(() => this.update());
29 | });
30 |
31 | this._gltfPreview.onDidChangeActivePanel(() => {
32 | // Wait a frame before updating to ensure all window states are updated.
33 | setImmediate(() => this.update());
34 | });
35 |
36 | this.update();
37 | }
38 |
39 | /**
40 | * The active text editor of the vscode window editing a glTF or the text editor of the active glTF preview panel.
41 | */
42 | public get activeTextEditor(): vscode.TextEditor | undefined {
43 | return this._activeTextEditor;
44 | }
45 |
46 | public get preview(): GltfPreview {
47 | return this._gltfPreview;
48 | }
49 |
50 | public get inspectData(): GltfInspectData {
51 | return this._gltfInspectData;
52 | }
53 |
54 | public get outline(): GltfOutline {
55 | return this._gltfOutline;
56 | }
57 |
58 | /**
59 | * Event that is fired when the active glTF editor has changed.
60 | */
61 | public readonly onDidChangeActiveTextEditor = this._onDidChangeActiveTextEditor.event;
62 |
63 | private update() {
64 | let gltfPreviewActive = false;
65 | let gltfFileActive = false;
66 |
67 | let activeTextEditor = this._gltfPreview.activePanel && this._gltfPreview.activePanel.textEditor;
68 | if (activeTextEditor) {
69 | gltfPreviewActive = true;
70 | }
71 | else if (isGltfFile(vscode.window.activeTextEditor)) {
72 | activeTextEditor = vscode.window.activeTextEditor;
73 | gltfFileActive = true;
74 | }
75 |
76 | vscode.commands.executeCommand('setContext', 'gltfPreviewActive', gltfPreviewActive);
77 | vscode.commands.executeCommand('setContext', 'gltfFileActive', gltfFileActive);
78 | vscode.commands.executeCommand('setContext', 'gltfActive', gltfPreviewActive || gltfFileActive);
79 |
80 | if (this._activeTextEditor !== activeTextEditor) {
81 | this._activeTextEditor = activeTextEditor;
82 | this._onDidChangeActiveTextEditor.fire(activeTextEditor);
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/test/extension.test.ts:
--------------------------------------------------------------------------------
1 | //
2 | // Note: This example test is leveraging the Mocha test framework.
3 | // Please refer to their documentation on https://mochajs.org/ for help.
4 | //
5 |
6 | // The module 'assert' provides assertion methods from node
7 | import * as assert from 'assert';
8 |
9 | // You can import and use all API from the 'vscode' module
10 | // as well as import your extension to test it
11 | import * as vscode from 'vscode';
12 | import * as myExtension from '../src/extension';
13 |
14 | // Defines a Mocha test suite to group tests of similar kind together
15 | suite("Extension Tests", () => {
16 |
17 | // Defines a Mocha unit test
18 | test("Something 1", () => {
19 | assert.equal(-1, [1, 2, 3].indexOf(5));
20 | assert.equal(-1, [1, 2, 3].indexOf(0));
21 | });
22 | });
--------------------------------------------------------------------------------
/test/index.ts:
--------------------------------------------------------------------------------
1 | //
2 | // PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
3 | //
4 | // This file is providing the test runner to use when running extension tests.
5 | // By default the test runner in use is Mocha based.
6 | //
7 | // You can provide your own test runner if you want to override it by exporting
8 | // a function run(testRoot: string, clb: (error:Error) => void) that the extension
9 | // host can call to run the tests. The test runner is expected to use console.log
10 | // to report the results back to the caller. When the tests are finished, return
11 | // a possible error to the callback or null if none.
12 |
13 | var testRunner = require('vscode/lib/testrunner');
14 |
15 | // You can directly control Mocha options by uncommenting the following lines
16 | // See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
17 | testRunner.configure({
18 | ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.)
19 | useColors: true // colored output from test results
20 | });
21 |
22 | module.exports = testRunner;
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "alwaysStrict": true,
4 | "noImplicitAny": false,
5 | "noImplicitReturns": true,
6 | "module": "commonjs",
7 | "target": "es2017",
8 | "outDir": "out",
9 | "lib": [ "es2017" ],
10 | "sourceMap": true,
11 | "rootDir": "."
12 | },
13 | "exclude": [
14 | "node_modules",
15 | "server",
16 | ".vscode-test"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/util/PUBLISH.md:
--------------------------------------------------------------------------------
1 | # Publish Steps
2 |
3 | * Update `CHANGELOG.md` with new version number, publish date, and all changes.
4 | * Update `package.json`, specifically the `version` field.
5 | * Copy the new `version` number to `server/package.json`.
6 | * Run `npm install`, `npm update` to get the latest versions of dependencies.
7 | * Git commit the results of these edits and package-lock changes.
8 | * Open the project and run `task watch` to recompile if needed.
9 | * In PowerShell, run `vsce package`.
10 | * Compare the new package size to previous, to see if any new large files got added via npm.
11 | * Test the release package by installing it manually in `{user}/.vscode/extensions`.
12 | * In PowerShell, run `vsce publish` to actually publish to the marketplace.
13 | * Add a git tag for the release. For example: `git tag -a 2.5.0 -m "Release version 2.5.0"`
14 | * Push the branch & tag. `git push --tags`
15 |
16 | **NOTE:** It is best to run `vsce` in PowerShell, not Git Bash, due to TTY differences.
17 |
18 | ## Credentials
19 |
20 | 1. Login to [username].visualstudio.com
21 | 2. From user account pull-down menu, select "Security" -> Personal Access Tokens
22 | 3. Click button to add a new token.
23 | 4. Modify the "accounts" drop-down of the proposed new token to change your username to "All accessible accounts." NOTE that this setting cannot be viewed or edited after a token is created, it is only available during creation.
24 | 5. In PowerShell, if you haven't already installed `vsce`, install it with `npm install -g @vscode/vsce`.
25 | 6. Run `vsce login cesium`
26 | 7. Paste the key created in step 4.
27 | 8. Now you are ready to run the publish steps above.
28 |
--------------------------------------------------------------------------------
/util/fixThree.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | /*eslint-env node*/
3 | 'use strict';
4 | var fs = require('fs');
5 | var path = require('path');
6 |
7 | const fileNames = [
8 | 'examples/jsm/loaders/GLTFLoader.js',
9 | 'examples/jsm/loaders/RGBELoader.js',
10 | 'examples/jsm/loaders/KTX2Loader.js',
11 | 'examples/jsm/loaders/DRACOLoader.js',
12 | 'examples/jsm/controls/OrbitControls.js',
13 | 'examples/jsm/utils/BufferGeometryUtils.js'
14 | ];
15 |
16 | function main() {
17 | var args = process.argv;
18 | if (args.length !== 3) {
19 | console.log('Please enter the path as the only argument.');
20 | } else {
21 | var basePath = args[2];
22 | fileNames.forEach(name => {
23 | var fileName = path.join(basePath, name);
24 | var contents = fs.readFileSync(fileName).toString();
25 | var updated = contents.replace(
26 | '} from \'three\';',
27 | '} from \'../../../build/three.module.js\';');
28 | if (updated !== contents) {
29 | fs.writeFileSync(fileName, updated);
30 | console.log('Patched ' + fileName);
31 | }
32 | });
33 | }
34 | }
35 |
36 | main();
37 |
--------------------------------------------------------------------------------
/util/validateSchema.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | /*eslint-env node*/
3 | 'use strict';
4 | let fs = require('fs');
5 | let path = require('path');
6 | let yargs = require('yargs');
7 |
8 | // This NodeJS script checks all references to external schema files.
9 |
10 | let checkedFiles = [];
11 |
12 | function parseArguments(args) {
13 | let argv = yargs
14 | .usage('Usage: node $0 -p path')
15 | .example('node $0 -p ../schemas/gltf-2.0')
16 | .help('h')
17 | .alias('h', 'help')
18 | .options({
19 | 'schema': {
20 | alias: 's',
21 | describe: 'schema=PATH, The root file of the schema to validate.',
22 | normalize: true,
23 | type: 'string'
24 | }
25 | }).parse(args);
26 |
27 | let schemaPath = argv.s;
28 |
29 | if (!schemaPath) {
30 | yargs.showHelp();
31 | return;
32 | }
33 |
34 | return {
35 | schemaPath: schemaPath
36 | };
37 | }
38 |
39 | function ensureFileExists(parentFile, folder, name, options) {
40 | let fullPath = path.normalize(path.join(folder, name));
41 | if (!fs.existsSync(fullPath)) {
42 | console.error('*** Broken file reference in: ' + parentFile);
43 | console.error('****** File not found: ' + name);
44 |
45 | // Set the NodeJS process exit code, to tell the outer shell script we failed.
46 | process.exitCode = 1;
47 | } else if (!checkedFiles.includes(fullPath)) {
48 | validateFile(fullPath, options);
49 | }
50 | }
51 |
52 | function validateArray(parentFile, folder, arr, options) {
53 | let len = arr.length;
54 | for (let i = 0; i < len && !process.exitCode; ++i) {
55 | let val = arr[i];
56 | if (typeof (val) === 'object') {
57 | validateObject(parentFile, folder, val, options);
58 | }
59 | }
60 | }
61 |
62 | function validateObject(parentFile, folder, data, options) {
63 | for (let key in data) {
64 | if (data.hasOwnProperty(key)) {
65 | let val = data[key];
66 | if (key === '$ref') {
67 | if (val && val[0] !== '#') {
68 | ensureFileExists(parentFile, folder, val, options);
69 | }
70 | } else if (Array.isArray(val)) {
71 | validateArray(parentFile, folder, val, options);
72 | } else if (typeof (val) === 'object') {
73 | validateObject(parentFile, folder, val, options);
74 | }
75 | }
76 | if (process.exitCode) {
77 | break;
78 | }
79 | }
80 | }
81 |
82 | function validateFile(fullPath, options) {
83 | checkedFiles.push(fullPath);
84 | console.log(fullPath);
85 |
86 | let file = path.basename(fullPath);
87 | let folder = path.dirname(fullPath);
88 | let schema = JSON.parse(fs.readFileSync(fullPath));
89 |
90 | validateObject(file, folder, schema, options);
91 | }
92 |
93 | function main() {
94 | let args = process.argv;
95 | args = args.slice(2, args.length);
96 | let options = parseArguments(args);
97 |
98 | if (!options) {
99 | return;
100 | }
101 |
102 | validateFile(options.schemaPath, options);
103 |
104 | if (!process.exitCode) {
105 | console.log('Done!');
106 | }
107 | }
108 |
109 | main();
110 |
--------------------------------------------------------------------------------