diff --git a/MPEG_lighting/README.md b/MPEG_lighting/README.md index 838cf17..b8a7b14 100644 --- a/MPEG_lighting/README.md +++ b/MPEG_lighting/README.md @@ -61,7 +61,12 @@ Table 3: Definitions of objects at the scene level of MPEG_lights_texture_based When present, the MPEG_lights_punctual extension shall be included as a glTF file level extension. The definition of all objects within MPEG_lights_punctual extension is provided in Table 4. -Table 4 – Definition of glTF file objects of MPEG_lights_punctual extension +Table 4: Definitions of glTF file level objects of MPEG_lights_punctual extension +| Name | Type | Usage | Default | Description | +|--|--|--|--|--| +| lights | array | M | | An array of items that describe the punctual light sources, referenced in this scene description document. | + +Table 5: Definitions of item in the lights array of MPEG_lights_punctual extension | Name | Type | Usage | Default | Description | |--|--|--|--|--| | light | integer | M | | Index of the item in the array of the lights parameter of the KHR_lights_punctual extension | diff --git a/MPEG_lighting/schema/MPEG_lights_punctual.light.schema.json b/MPEG_lighting/schema/MPEG_lights_punctual.light.schema.json new file mode 100644 index 0000000..59de8fb --- /dev/null +++ b/MPEG_lighting/schema/MPEG_lights_punctual.light.schema.json @@ -0,0 +1,34 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": ["light", "nature"], + "properties": { + "light": { + "type": "integer", + "description": "Index of the item in the array of the lights parameter of the KHR_lights_punctual extension" + }, + "nature": { + "type": "string", + "enum": ["PHYSICAL", "VIRTUAL", "PHYSICAL_VIRTUAL", "UNSPECIFIED"], + "description": "Indicates whether the lighting information corresponds to physical, virtual, both, or unspecified light", + "enumDescriptions": { + "PHYSICAL": "A physical light", + "VIRTUAL": "A virtual light", + "PHYSICAL_VIRTUAL": "Both physical and virtual", + "UNSPECIFIED": "Unknown" + } + }, + "color_accessor": { + "type": "integer", + "description": "Reference to the accessor giving a sequence of color value. If absent, the value in the referenced light is considered constant." + }, + "intensity_accessor": { + "type": "integer", + "description": "Reference to the accessor giving a sequence of intensity value. If absent, the value in the referenced light is considered constant." + }, + "range_accessor": { + "type": "integer", + "description": "Reference to the accessor giving a sequence of range value. If absent, the value in the referenced light is considered constant." + } + } + } \ No newline at end of file diff --git a/MPEG_lighting/schema/MPEG_lights_punctual.schema.json b/MPEG_lighting/schema/MPEG_lights_punctual.schema.json index 372f0a5..6ae1fe4 100644 --- a/MPEG_lighting/schema/MPEG_lights_punctual.schema.json +++ b/MPEG_lighting/schema/MPEG_lights_punctual.schema.json @@ -1,34 +1,18 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema" : "http://json-schema.org/draft-07/schema", + "title": "glTF_MPEG_lights_punctual_extension", "type": "object", - "required": ["light", "nature"], + "description": "Provides a list of punctual light objects.", "properties": { - "light": { - "type": "integer", - "description": "Index of the item in the array of the lights parameter of the KHR_lights_punctual extension" - }, - "nature": { - "type": "string", - "enum": ["PHYSICAL", "VIRTUAL", "PHYSICAL_VIRTUAL", "UNSPECIFIED"], - "description": "Indicates whether the lighting information corresponds to physical, virtual, both, or unspecified light", - "enumDescriptions": { - "PHYSICAL": "A physical light", - "VIRTUAL": "A virtual light", - "PHYSICAL_VIRTUAL": "Both physical and virtual", - "UNSPECIFIED": "Unknown" + "lights": { + "type": "array", + "description": "An array of items that describe the punctual light sources, referenced in this scene description document.", + "items": { + "type": "object", + "$ref": "MPEG_lights_punctual.light.schema.json" + }, + "minItems": 1 } - }, - "color_accessor": { - "type": "integer", - "description": "Reference to the accessor giving a sequence of color value. If absent, the value in the referenced light is considered constant." - }, - "intensity_accessor": { - "type": "integer", - "description": "Reference to the accessor giving a sequence of intensity value. If absent, the value in the referenced light is considered constant." - }, - "range_accessor": { - "type": "integer", - "description": "Reference to the accessor giving a sequence of range value. If absent, the value in the referenced light is considered constant." - } - } - } \ No newline at end of file + }, + "required": ["lights"] +} \ No newline at end of file diff --git a/MPEG_lighting/schema/MPEG_lights_texture_based.schema.json b/MPEG_lighting/schema/MPEG_lights_texture_based.schema.json index e69de29..d9e7982 100644 --- a/MPEG_lighting/schema/MPEG_lights_texture_based.schema.json +++ b/MPEG_lighting/schema/MPEG_lights_texture_based.schema.json @@ -0,0 +1,18 @@ +{ + "$schema" : "http://json-schema.org/draft-07/schema", + "title": "glTF_MPEG_lights_texture_based_extension", + "type": "object", + "description": "Provides a list of texture based light objects.", + "properties": { + "lights": { + "type": "array", + "description": "Provides a list of texture based light objects.", + "items": { + "type": "object", + "$ref": "MPEG_lights_texture_based.light.schema.json" + }, + "minItems": 1 + } + }, + "required": ["lights"] +} \ No newline at end of file