Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KHR_materials_common #633

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
800 changes: 394 additions & 406 deletions extensions/Khronos/KHR_materials_common/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
"type" : "object",
"properties" : {
"lights" : {
"type": "object",
"properties" : {
},
"additionalProperties" : {
"$ref" : "light.schema.json"
"$ref" : "light.KHR_materials_common.schema.json"
},
"default" : {}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
"allOf" : [ { "$ref" : "glTFChildOfRootProperty.schema.json" } ],
"properties" : {
"ambient" : {
"allOf" : [ { "$ref" : "light.ambient.schema.json" } ],
"allOf" : [ { "$ref" : "light.ambient.KHR_materials_common.schema.json" } ],
"description" : "Ambient light source."
},
"directional" : {
"allOf" : [ { "$ref" : "light.directional.schema.json" } ],
"allOf" : [ { "$ref" : "light.directional.KHR_materials_common.schema.json" } ],
"description" : "Directional light source."
},
"point" : {
"allOf" : [ { "$ref" : "light.point.schema.json" } ],
"allOf" : [ { "$ref" : "light.point.KHR_materials_common.schema.json" } ],
"description" : "Point light source."
},
"spot" : {
"allOf" : [ { "$ref" : "light.spot.schema.json" } ],
"allOf" : [ { "$ref" : "light.spot.KHR_materials_common.schema.json" } ],
"description" : "Spot light source."
},
"type" : {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "KHR_materials_common material extension",
"type" : "object",
"description" : "KHR_materials_common material extension.",
"properties" : {
"doubleSided" : {
"type": "boolean",
"default": false,
"description" : "Declares whether backface culling should be disabled for this visual. Corresponds to disabling the CULL_FACE render state."
},
"jointCount" : {
"type": "integer",
"default": 0,
"description" : "Declares maximum number of joints used by meshes which use this material. This allows to pre-generate vertex shader skinning code before mesh loading."
},
"technique" : {
"allOf" : [ { "$ref" : "glTFid.schema.json" } ],
"description" : "Specifies the material type.",
"enum" : ["CONSTANT", "LAMBERT", "BLINN", "PHONG"]
},
"transparent" : {
"type": "boolean",
"default": false,
"description" : "Declares whether the visual should be rendered using alpha blending. Corresponds to enabling the BLEND render state, setting the depthMask property to false, and defining blend equations and blend functions as described in the implementation note."
},
"values" : {
"allOf": [ { "$ref": "material.values.KHR_materials_common.schema.json" } ],
"description" : "A dictionary object of parameter values."
}
},
"additionalProperties" : false,
"required" : ["technique"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "material values for KHR_materials_common",
"type" : "object",
"properties" : {
"ambientFactor": {
"type" : "array",
"description" : "Per-component factors to apply to values of ambientTexture.",
"items" : {
"type": "number",
"minimum" : 0.0,
"maximum" : 1.0
},
"minItems" : 3,
"maxItems" : 3,
"default" : [0.0, 0.0, 0.0]
},
"ambientTexture": {
"type" : "string",
"description": "ID of RGB texture defining the amount of ambient light reflected from the surface of the object.",
"default": ""
},
"diffuseFactor": {
"type" : "array",
"description" : "Per-component factors to apply to values of diffuseTexture.",
"items" : {
"type": "number",
"minimum" : 0.0,
"maximum" : 1.0
},
"minItems" : 4,
"maxItems" : 4,
"default" : [0.0, 0.0, 0.0, 1.0]
},
"diffuseTexture": {
"type" : "string",
"description": "ID of RGBA texture defining the amount of light diffusely reflected from the surface of the object.",
"default": ""
},
"emissionFactor": {
"type" : "array",
"description" : "Per-component factors to apply to values of emissionTexture.",
"items" : {
"type": "number",
"minimum" : 0.0,
"maximum" : 1.0
},
"minItems" : 3,
"maxItems" : 3,
"default" : [0.0, 0.0, 0.0]
},
"emissionTexture": {
"type" : "string",
"description": "ID of RGB texture for defining the amount of light emitted by the surface of the object.",
"default": ""
},
"specularFactor": {
"type" : "array",
"description" : "Per-component factors to apply to values of specularTexture.",
"items" : {
"type": "number",
"minimum" : 0.0,
"maximum" : 1.0
},
"minItems" : 3,
"maxItems" : 3,
"default" : [0.0, 0.0, 0.0]
},
"specularTexture": {
"type" : "string",
"description": "ID of RGB texture defining the amount of light specularly reflected from the surface of the object.",
"default": ""
},
"shininess": {
"type" : "number",
"description": "Specularity or roughness of the specular reflection lobe of the object.",
"default": 0.0
},
"transparency": {
"type" : "number",
"description": "Amount of transparency as an opacity value between 0.0 and 1.0.",
"default": 1.0
}
},
"additionalProperties" : false
}