Skip to content

Commit 07bcd14

Browse files
committed
Adding 3d objects
1 parent ab0d9b7 commit 07bcd14

22 files changed

+603
-161
lines changed

schema/v4/AmbientLight.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://iiif.io/api/presentation/4.0/schema/AmbientLight.json",
4+
"type": "object",
5+
"properties": {
6+
"id": { "$ref": "properties.json#/$defs/id" },
7+
"type": {
8+
"const": "AmbientLight"
9+
},
10+
"label": {
11+
"$ref": "properties.json#/$defs/lngString"
12+
},
13+
"color": {
14+
"$ref": "properties.json#/$defs/backgroundColor"
15+
},
16+
"intensity": { "$ref": "Intensity.json" }
17+
},
18+
"required": [
19+
"type"
20+
]
21+
}

schema/v4/Annotation.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"@context": {
88
"$ref": "Context.json"
99
},
10+
"id": { "$ref": "properties.json#/$defs/id" },
1011
"created": {
1112
"type": "string"
1213
},
@@ -124,10 +125,10 @@
124125
}
125126
},
126127
"body": {
127-
"$ref": "Resource.json"
128+
"$ref": "Body.json"
128129
},
129130
"target": {
130-
"$ref": "AnnoTarget.json"
131+
"$ref": "Target.json"
131132
}
132133
},
133134
"required": [

schema/v4/AnnotationBody.json

Lines changed: 0 additions & 72 deletions
This file was deleted.

schema/v4/Body.json

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://iiif.io/api/presentation/4.0/schema/Body.json",
4+
"title": "Body",
5+
"type": "object",
6+
"if": {
7+
"properties": {
8+
"type": {
9+
"const": "TextualBody"
10+
}
11+
},
12+
"required": [
13+
"type"
14+
]
15+
},
16+
"then": {
17+
"$ref": "TextualBody.json"
18+
},
19+
"else": {
20+
"if": {
21+
"properties": {
22+
"type": {
23+
"const": "SpecificResource"
24+
}
25+
},
26+
"required": [
27+
"type"
28+
]
29+
},
30+
"then": {
31+
"$ref": "SpecificResource.json"
32+
},
33+
"else": {
34+
"if": {
35+
"properties": {
36+
"type": {
37+
"const": "Choice"
38+
}
39+
},
40+
"required": [
41+
"type"
42+
]
43+
},
44+
"then": {
45+
"$ref": "Choice.json"
46+
},
47+
"else": {
48+
"if": {
49+
"properties": {
50+
"type": {
51+
"const": "Scene"
52+
}
53+
},
54+
"required": [
55+
"type"
56+
]
57+
},
58+
"then": {
59+
"$ref": "SceneRef.json"
60+
},
61+
"else": {
62+
"if": {
63+
"properties": {
64+
"type": {
65+
"const": "Canvas"
66+
}
67+
},
68+
"required": [
69+
"type"
70+
]
71+
},
72+
"then": {
73+
"$ref": "CanvasRef.json"
74+
},
75+
"else": {
76+
"if": {
77+
"properties": {
78+
"type": {
79+
"const": "Timeline"
80+
}
81+
},
82+
"required": [
83+
"type"
84+
]
85+
},
86+
"then": {
87+
"$ref": "TimelineRef.json"
88+
},
89+
"else": {
90+
"if": {
91+
"properties": {
92+
"type": {
93+
"type": "string",
94+
"pattern": "Camera"
95+
}
96+
},
97+
"required": [
98+
"type"
99+
]
100+
},
101+
"then": {
102+
"$ref": "Camera.json"
103+
},
104+
"else": {
105+
"if": {
106+
"properties": {
107+
"type": {
108+
"type": "string",
109+
"pattern": "Light"
110+
}
111+
},
112+
"required": [
113+
"type"
114+
]
115+
},
116+
"then": {
117+
"$ref": "Light.json"
118+
},
119+
"else": {
120+
"$ref": "Resource.json"
121+
}
122+
}
123+
}
124+
}
125+
}
126+
}
127+
}
128+
}
129+
}

schema/v4/Camera.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://iiif.io/api/presentation/4.0/schema/Camera.json",
4+
"type": "object",
5+
"if": {
6+
"properties": {
7+
"type": {
8+
"const": "PerspectiveCamera"
9+
}
10+
},
11+
"required": [
12+
"type"
13+
]
14+
},
15+
"then": {
16+
"$ref": "PerspectiveCamera.json"
17+
},
18+
"else": {
19+
"if": {
20+
"properties": {
21+
"type": {
22+
"const": "OrthographicCamera"
23+
}
24+
},
25+
"required": [
26+
"type"
27+
]
28+
},
29+
"then": {
30+
"$ref": "OrthographicCamera.json"
31+
}
32+
}
33+
}

schema/v4/Choice.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"items": {
1313
"type": "array",
1414
"items": {
15-
"$ref": "Resource.json"
15+
"$ref": "Body.json"
1616
}
1717
}
1818
},

schema/v4/DirectionalLight.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://iiif.io/api/presentation/4.0/schema/DirectionalLight.json",
4+
"type": "object",
5+
"properties": {
6+
"id": { "$ref": "properties.json#/$defs/id" },
7+
"type": {
8+
"const": "DirectionalLight"
9+
},
10+
"label": {
11+
"$ref": "properties.json#/$defs/lngString"
12+
},
13+
"color": {
14+
"$ref": "properties.json#/$defs/backgroundColor"
15+
},
16+
"intensity": { "$ref": "Intensity.json" }
17+
},
18+
"required": [
19+
"type"
20+
]
21+
}

schema/v4/ImageBasedLight.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://iiif.io/api/presentation/4.0/schema/ImageBasedLight.json",
4+
"type": "object",
5+
"properties": {
6+
"id": { "$ref": "properties.json#/$defs/id" },
7+
"type": {
8+
"const": "ImageBasedLight"
9+
},
10+
"label": {
11+
"$ref": "properties.json#/$defs/lngString"
12+
},
13+
"environmentMap": {
14+
"type": "object",
15+
"properties": {
16+
"id": { "$ref": "properties.json#/$defs/id" },
17+
"type": {
18+
"const": "Image"
19+
},
20+
"format": { "$ref": "properties.json#/$defs/format" },
21+
"profile": {
22+
"type": "string",
23+
"enum": [
24+
"equirectangular",
25+
"cubic"
26+
]
27+
}
28+
},
29+
"required": [
30+
"id",
31+
"type",
32+
"profile"
33+
]
34+
},
35+
"intensity": { "$ref": "Intensity.json" }
36+
},
37+
"required": [
38+
"type",
39+
"environmentMap"
40+
]
41+
}

schema/v4/Intensity.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://iiif.io/api/presentation/4.0/schema/Intensity.json",
4+
"type": "object",
5+
"properties": {
6+
"id": { "$ref": "properties.json#/$defs/id" },
7+
"type": {
8+
"const": "Quantity"
9+
},
10+
"quantityValue": {
11+
"type": "number",
12+
"minimum": 0.0,
13+
"maximum": 1.0
14+
},
15+
"unit": {
16+
"const": "relative"
17+
}
18+
},
19+
"required": [
20+
"type",
21+
"quantityValue",
22+
"unit"
23+
]
24+
}

0 commit comments

Comments
 (0)