forked from KhronosGroup/glTF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
image.schema.json
44 lines (44 loc) · 1.57 KB
/
image.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Image",
"type": "object",
"description": "Image data used to create a texture. Image can be referenced by URI or `bufferView` index. `mimeType` is required in the latter case.",
"allOf": [ { "$ref": "glTFChildOfRootProperty.schema.json" } ],
"properties": {
"uri": {
"type": "string",
"description": "The uri of the image.",
"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 or png.",
"gltf_uriType": "image"
},
"mimeType": {
"anyOf": [
{
"enum": [ "image/jpeg" ]
},
{
"enum": [ "image/png" ]
},
{
"type": "string"
}
],
"description": "The image's MIME type. Required if `bufferView` is defined."
},
"bufferView": {
"allOf": [ { "$ref": "glTFid.schema.json" } ],
"description": "The index of the bufferView that contains the image. Use this instead of the image's uri property."
},
"name": { },
"extensions": { },
"extras": { }
},
"dependencies": {
"bufferView": [ "mimeType" ]
},
"oneOf": [
{ "required": [ "uri" ] },
{ "required": [ "bufferView" ] }
]
}