Skip to content

Commit

Permalink
Merge branch '2.0' into emiliano/210
Browse files Browse the repository at this point in the history
  • Loading branch information
lexaknyazev authored Feb 27, 2017
2 parents 0f02989 + 8a6a54f commit b85e6e0
Show file tree
Hide file tree
Showing 21 changed files with 547 additions and 891 deletions.
1,067 changes: 334 additions & 733 deletions specification/2.0/README.md

Large diffs are not rendered by default.

Binary file modified specification/2.0/figures/dictionary-objects.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified specification/2.0/figures/files.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified specification/2.0/figures/pptx/figures.pptx
Binary file not shown.
4 changes: 2 additions & 2 deletions specification/2.0/schema/animation.channel.target.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description" : "The index of the node and TRS property that an animation channel targets.",
"allOf" : [ { "$ref" : "glTFProperty.schema.json" } ],
"properties" : {
"id" : {
"node" : {
"allOf" : [ { "$ref" : "glTFid.schema.json" } ],
"description" : "The index of the node to target."
},
Expand All @@ -18,5 +18,5 @@
"extras" : {}
},
"additionalProperties" : false,
"required": ["id", "path"]
"required": ["node", "path"]
}
4 changes: 1 addition & 3 deletions specification/2.0/schema/animation.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"extensions" : {},
"extras" : {}
},
"dependencies" : {
"channels" : ["samplers"]
},
"required" : ["channels", "samplers"],
"additionalProperties" : false
}
24 changes: 0 additions & 24 deletions specification/2.0/schema/asset.profile.schema.json

This file was deleted.

13 changes: 2 additions & 11 deletions specification/2.0/schema/asset.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,10 @@
"type" : "string",
"description" : "Tool that generated this glTF model. Useful for debugging."
},
"premultipliedAlpha" : {
"type" : "boolean",
"description" : "Specifies if the shaders were generated with premultiplied alpha.",
"default" : false,
"gltf_webgl" : "`getContext()` with premultipliedAlpha"
},
"profile" : {
"allOf" : [ { "$ref" : "asset.profile.schema.json" } ],
"default" : {}
},
"version" : {
"type" : "string",
"description" : "The glTF version."
"description" : "The glTF version.",
"enum" : ["2.0"]
},
"extensions" : {},
"extras" : {}
Expand Down
2 changes: 1 addition & 1 deletion specification/2.0/schema/buffer.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"uri" : {
"type" : "string",
"description" : "The uri of the buffer.",
"format" : "uri",
"format" : "uriref",
"gltf_detailedDescription" : "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.",
"gltf_uriType" : "application"
},
Expand Down
42 changes: 21 additions & 21 deletions specification/2.0/schema/examples/materials.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"materials" : {
"material_id": {
"technique": "technique_id",
"values": {
"ambient": [
0,
0,
0,
1
],
"diffuse": "texture_image_0",
"shininess": [38.4]
"materials": [
{
"name": "Material0",
"pbrMetallicRoughness": {
"baseColorfactor": [ 0.5, 0.5, 0.5, 1.0 ],
"baseColorTexture": {
"index": 1,
"texCoord": 1
},
"metallicFactor": 1,
"roughnessFactor": 1,
"metallicRoughnessTexture": {
"index": 2,
"texCoord": 1
}
},
"name": "user-defined material name",
"extensions" : {
"extension_name" : {
"extension specific" : "value"
}
"normalTexture": {
"scale": 2,
"index": 3,
"texCoord": 1
},
"extras" : {
"Application specific" : "The extra object can contain any properties."
}
"emissiveFactor": [ 0.2, 0.1, 0.0 ]
}
}
]
}
42 changes: 15 additions & 27 deletions specification/2.0/schema/glTF.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type" : "string"
},
"uniqueItems" : true,
"default" : []
"minItems" : 1
},
"extensionsRequired" : {
"type" : "array",
Expand All @@ -21,15 +21,15 @@
"type" : "string"
},
"uniqueItems" : true,
"default" : []
"minItems" : 1
},
"accessors" : {
"type" : "array",
"description" : "An array of accessors.",
"items" : {
"$ref" : "accessor.schema.json"
},
"default" : [],
"minItems" : 1,
"gltf_detailedDescription" : "An array of accessors. An accessor is a typed view into a bufferView."
},
"animations" : {
Expand All @@ -38,7 +38,7 @@
"items" : {
"$ref" : "animation.schema.json"
},
"default" : []
"minItems" : 1
},
"asset" : {
"allOf" : [ { "$ref" : "asset.schema.json" } ],
Expand All @@ -50,7 +50,7 @@
"items" : {
"$ref" : "buffer.schema.json"
},
"default" : [],
"minItems" : 1,
"gltf_detailedDescription" : "An array of buffers. A buffer points to binary geometry, animation, or skins."
},
"bufferViews" : {
Expand All @@ -59,7 +59,7 @@
"items" : {
"$ref" : "bufferView.schema.json"
},
"default" : [],
"minItems" : 1,
"gltf_detailedDescription" : "An array of bufferViews. A bufferView is a view into a buffer generally representing a subset of the buffer."
},
"cameras" : {
Expand All @@ -68,7 +68,7 @@
"items" : {
"$ref" : "camera.schema.json"
},
"default" : [],
"minItems" : 1,
"gltf_detailedDescription" : "An array of cameras. A camera defines a projection matrix."
},
"images" : {
Expand All @@ -77,7 +77,7 @@
"items" : {
"$ref" : "image.schema.json"
},
"default" : [],
"minItems" : 1,
"gltf_detailedDescription" : "An array of images. An image defines data used to create a texture."
},
"materials" : {
Expand All @@ -86,7 +86,7 @@
"items" : {
"$ref" : "material.schema.json"
},
"default" : [],
"minItems" : 1,
"gltf_detailedDescription" : "An array of materials. A material defines the appearance of a primitive."
},
"meshes" : {
Expand All @@ -95,7 +95,7 @@
"items" : {
"$ref" : "mesh.schema.json"
},
"default" : [],
"minItems" : 1,
"gltf_detailedDescription" : "An array of meshes. A mesh is a set of primitives to be rendered."
},
"nodes" : {
Expand All @@ -104,15 +104,15 @@
"items" : {
"$ref" : "node.schema.json"
},
"default" : []
"minItems" : 1
},
"samplers" : {
"type" : "array",
"description" : "An array of samplers.",
"items" : {
"$ref" : "sampler.schema.json"
},
"default" : [],
"minItems" : 1,
"gltf_detailedDescription" : "An array of samplers. A sampler contains properties for texture filtering and wrapping modes."
},
"scene" : {
Expand All @@ -125,15 +125,15 @@
"items" : {
"$ref" : "scene.schema.json"
},
"default" : []
"minItems" : 1
},
"skins" : {
"type" : "array",
"description" : "An array of skins.",
"items" : {
"$ref" : "skin.schema.json"
},
"default" : [],
"minItems" : 1,
"gltf_detailedDescription" : "An array of skins. A skin is defined by joints and matrices."
},
"textures" : {
Expand All @@ -142,19 +142,7 @@
"items" : {
"$ref" : "texture.schema.json"
},
"default" : []
},
"glExtensionsUsed" : {
"type" : "array",
"description" : "Names of WebGL extensions required to render this asset.",
"items" : {
"type" : "string",
"enum" : ["OES_element_index_uint"]
},
"uniqueItems" : true,
"default" : [],
"gltf_detailedDescription" : "Names of WebGL extensions required to render this asset. WebGL extensions must be enabled by calling `getExtension()` for each extension.",
"gltf_webgl" : "`getSupportedExtensions()` and `getExtension()`"
"minItems" : 1
},
"extensions" : {},
"extras" : {}
Expand Down
2 changes: 1 addition & 1 deletion specification/2.0/schema/image.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"uri" : {
"type" : "string",
"description" : "The uri of the image.",
"format" : "uri",
"format" : "uriref",
"gltf_detailedDescription" : "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.",
"gltf_uriType" : "image"
},
Expand Down
17 changes: 17 additions & 0 deletions specification/2.0/schema/material.normalTextureInfo.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "normalTextureInfo",
"type": "object",
"allOf": [ { "$ref": "textureInfoBase.schema.json" } ],
"properties": {
"index": {},
"texCoord": {},
"scale": {
"type": "number",
"description": "The scalar multiplier applied to each normal vector of the normal texture.",
"default": 1.0,
"gltf_detailedDescription": "The scalar multiplier applied to each normal vector of the texture. This value is ignored if normalTexture is not specified. This value is linear."
}
},
"additionalProperties": false
}
19 changes: 19 additions & 0 deletions specification/2.0/schema/material.occlusionTextureInfo.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "occlusionTextureInfo",
"type": "object",
"allOf": [ { "$ref": "textureInfoBase.schema.json" } ],
"properties": {
"index": {},
"texCoord": {},
"strength": {
"type": "number",
"description": "A scalar multiplier controlling the amount of occlusion applied.",
"default": 1.0,
"minimum": 0.0,
"maximum": 1.0,
"gltf_detailedDescription": "A scalar multiplier controlling the amount of occlusion applied. A value of 0.0 means no occlusion. A value of 1.0 means full occlusion. This value is ignored if the corresponding texture is not specified. This value is linear."
}
},
"additionalProperties": false
}
48 changes: 48 additions & 0 deletions specification/2.0/schema/material.pbrMetallicRoughness.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "pbrMetallicRoughness",
"type": "object",
"description": "A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.",
"properties": {
"baseColorFactor": {
"type": "array",
"items": {
"type": "number",
"minimum": 0.0,
"maximum": 1.0
},
"description": "The material's base color factor.",
"default": [ 1.0, 1.0, 1.0, 1.0 ],
"minItems": 4,
"maxItems": 4,
"gltf_detailedDescription": "The RGBA components of the base color of the material. The fourth component (A) is the opacity of the material. These values are linear."
},
"baseColorTexture": {
"allOf": [ { "$ref": "textureInfo.schema.json" } ],
"description": "The base color texture.",
"gltf_detailedDescription": "The base color texture. This texture contains RGB(A) components in sRGB color space. The first three components (RGB) specify the base color of the material. If the fourth component (A) is present, it represents the opacity of the material. Otherwise, an opacity of 1.0 is assumed."
},
"metallicFactor": {
"type": "number",
"description": "The metalness of the material.",
"default": 1.0,
"minimum": 0.0,
"maximum": 1.0,
"gltf_detailedDescription": "The metalness of the material. A value of 1.0 means the material is a metal. A value of 0.0 means the material is a dielectric. Values in between are for blending between metals and dielectrics such as dirty metallic surfaces. This value is linear."
},
"roughnessFactor": {
"type": "number",
"description": "The roughness of the material.",
"default": 1.0,
"minimum": 0.0,
"maximum": 1.0,
"gltf_detailedDescription": "The roughness of the material. A value of 1.0 means the material is completely rough. A value of 0.0 means the material is completely smooth. This value is linear."
},
"metallicRoughnessTexture": {
"allOf": [ { "$ref": "textureInfo.schema.json" } ],
"description": "The metallic-roughness texture.",
"gltf_detailedDescription": "The metallic-roughness texture has two components. The first component (R) contains the metallic-ness of the material. The second component (G) contains the roughness of the material. These values are linear. If the third component (B) and/or the fourth component (A) are present, they are ignored."
}
},
"additionalProperties": false
}
Loading

0 comments on commit b85e6e0

Please sign in to comment.