Skip to content

Commit 26635ad

Browse files
committed
Adding uc08_3d_comments_with_cameras.json
1 parent b33eb65 commit 26635ad

2 files changed

Lines changed: 238 additions & 134 deletions

File tree

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
{
2+
"@context": "http://iiif.io/api/presentation/4/context.json",
3+
"id": "https://iiif.io/api/presentation/4.0/example/uc08_3d_comments_with_cameras.json",
4+
"type": "Manifest",
5+
"label": {
6+
"en": [
7+
"Whale Cranium and Mandible with Dynamic Commenting Annotations and Custom Per-Anno Views"
8+
]
9+
},
10+
"items": [
11+
{
12+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1",
13+
"type": "Scene",
14+
"label": {
15+
"en": [
16+
"A Scene Containing a Whale Cranium and Mandible"
17+
]
18+
},
19+
"items": [
20+
{
21+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1/page/1",
22+
"type": "AnnotationPage",
23+
"items": [
24+
{
25+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno/1",
26+
"type": "Annotation",
27+
"motivation": [
28+
"painting"
29+
],
30+
"body": {
31+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno/1/body",
32+
"type": "SpecificResource",
33+
"source": {
34+
"id": "https://fixtures.iiif.io/3d/smithsonian/whale/whale_mandible.glb",
35+
"type": "Model",
36+
"label": {
37+
"en": [
38+
"mandible"
39+
]
40+
},
41+
"format": "model/gltf-binary"
42+
},
43+
"transform": [
44+
{
45+
"type": "ScaleTransform",
46+
"x": 10,
47+
"y": 10,
48+
"z": 10
49+
},
50+
{
51+
"type": "RotateTransform",
52+
"x": 12.5,
53+
"y": 0,
54+
"z": 0
55+
},
56+
{
57+
"type": "TranslateTransform",
58+
"x": 0,
59+
"y": 0,
60+
"z": 0.5
61+
}
62+
]
63+
},
64+
"target": {
65+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1",
66+
"type": "Scene"
67+
}
68+
},
69+
{
70+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno-that-paints-desired-camera-to-view-tooth",
71+
"type": "Annotation",
72+
"motivation": [
73+
"painting"
74+
],
75+
"behavior": [
76+
"hidden"
77+
],
78+
"body": {
79+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/cameras/1",
80+
"type": "PerspectiveCamera",
81+
"label": {
82+
"en": [
83+
"Perspective Camera Pointed At Front of Cranium and Mandible"
84+
]
85+
},
86+
"fieldOfView": 50.0,
87+
"near": 0.10,
88+
"far": 2000.0
89+
},
90+
"target": {
91+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno/2/target",
92+
"type": "SpecificResource",
93+
"source": {
94+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1",
95+
"type": "Scene"
96+
},
97+
"selector": [
98+
{
99+
"type": "PointSelector",
100+
"x": 0.0,
101+
"y": 0.15,
102+
"z": 0.75
103+
}
104+
]
105+
}
106+
},
107+
{
108+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno2",
109+
"type": "Annotation",
110+
"motivation": [
111+
"painting"
112+
],
113+
"body": {
114+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno/3/body",
115+
"type": "SpecificResource",
116+
"source": {
117+
"id": "https://fixtures.iiif.io/3d/smithsonian/whale/whale_cranium.glb",
118+
"type": "Model",
119+
"label": {
120+
"en": [
121+
"cranium"
122+
]
123+
},
124+
"format": "model/gltf-binary"
125+
},
126+
"transform": [
127+
{
128+
"type": "ScaleTransform",
129+
"x": 10,
130+
"y": 10,
131+
"z": 10
132+
},
133+
{
134+
"type": "TranslateTransform",
135+
"x": 0,
136+
"y": 1.5,
137+
"z": 0
138+
}
139+
]
140+
},
141+
"target": {
142+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1",
143+
"type": "Scene"
144+
}
145+
}
146+
]
147+
}
148+
]
149+
}
150+
],
151+
"annotations": [
152+
{
153+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1/annotations/page/1",
154+
"type": "AnnotationPage",
155+
"items": [
156+
{
157+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/commenting-anno-for-mandibular-tooth",
158+
"type": "Annotation",
159+
"motivation": [
160+
"commenting"
161+
],
162+
"body": {
163+
"type": "TextualBody",
164+
"value": "Mandibular tooth"
165+
},
166+
"target": {
167+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/comment/1/target",
168+
"type": "SpecificResource",
169+
"source": {
170+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1",
171+
"type": "Scene"
172+
},
173+
"selector": [
174+
{
175+
"type": "PointSelector",
176+
"x": -0.447287,
177+
"y": 0.546212,
178+
"z": 1.795195
179+
}
180+
]
181+
}
182+
},
183+
{
184+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/commenting-anno-for-right-pterygoid-hamulus",
185+
"type": "Annotation",
186+
"motivation": [
187+
"commenting"
188+
],
189+
"body": {
190+
"type": "TextualBody",
191+
"value": "Right pterygoid hamulus"
192+
},
193+
"target": {
194+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/comment/2/target",
195+
"type": "SpecificResource",
196+
"source": {
197+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1",
198+
"type": "Scene"
199+
},
200+
"selector": [
201+
{
202+
"type": "PointSelector",
203+
"x": -0.442066,
204+
"y": 0.671795,
205+
"z": 1.288055
206+
}
207+
]
208+
}
209+
},
210+
{
211+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno9",
212+
"type": "Annotation",
213+
"motivation": [
214+
"activating"
215+
],
216+
"target": {
217+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/commenting-anno-for-mandibular-tooth",
218+
"type": "Annotation"
219+
},
220+
"body": {
221+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/comment/3/body",
222+
"type": "SpecificResource",
223+
"source": {
224+
"id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno-that-paints-desired-camera-to-view-tooth",
225+
"type": "Annotation"
226+
},
227+
"action": [
228+
"show",
229+
"enable",
230+
"select"
231+
]
232+
}
233+
}
234+
]
235+
}
236+
]
237+
}

source/presentation/4.0/index.md

Lines changed: 1 addition & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -839,141 +839,8 @@ It is important to be able to position the textual body of an annotation within
839839

840840
It is possible to associate a particular camera with a particular commenting annotation via activating annotations. In many complex 3D Scenes, it may not be clear from where to look at a particular point of interest. The view may be occluded by parts of the model, or other models in the Scene. In the following example, the user can explore the Scene freely, but when they select a particular comment, a specific Camera that was previously hidden (unavailable to the user) is shown, enabled, and selected. The selected Camera is now the active Camera, and the viewport into the Scene is moved to a chosen position suitable for looking at the point of interest.
841841

842+
{% include code_example.html src="uc08_3d_comments_with_cameras.json" %}
842843

843-
```jsonc
844-
{
845-
"id": "https://example.org/iiif/3d/whale_comment_scope_content_state.json",
846-
"type": "Manifest",
847-
"label": { "en": ["Whale Cranium and Mandible with Dynamic Commenting Annotations and Custom Per-Anno Views"] },
848-
"items": [
849-
{
850-
"id": "https://example.org/iiif/scene1/page/p1/1",
851-
"type": "Scene",
852-
"label": { "en": ["A Scene Containing a Whale Cranium and Mandible"] },
853-
"items": [
854-
{
855-
"id": "https://example.org/iiif/scene1/page/p1/1",
856-
"type": "AnnotationPage",
857-
"items": [
858-
{
859-
"id": "https://example.org/iiif/3d/anno1",
860-
"type": "Annotation",
861-
"motivation": ["painting"],
862-
"body":
863-
{
864-
"id": "https://raw.githubusercontent.com/IIIF/3d/main/assets/whale/whale_mandible.glb",
865-
"type": "Model"
866-
},
867-
"target":
868-
{
869-
// SpecificResource with PointSelector
870-
}
871-
},
872-
{
873-
"id": "https://example.org/iiif/3d/anno-that-paints-desired-camera-to-view-tooth",
874-
"type": "Annotation",
875-
"motivation": ["painting"],
876-
"behavior": ["hidden"],
877-
"body":
878-
{
879-
"id": "https://example.org/iiif/3d/cameras/1",
880-
"type": "PerspectiveCamera",
881-
"label": {"en": ["Perspective Camera Pointed At Front of Cranium and Mandible"]},
882-
"fieldOfView": 50.0,
883-
"near": 0.10,
884-
"far": 2000.0
885-
},
886-
"target":
887-
{
888-
"type": "SpecificResource",
889-
"source": {
890-
"id": "https://example.org/iiif/scene1",
891-
"type": "Scene"
892-
},
893-
"selector": [
894-
{
895-
"type": "PointSelector",
896-
"x": 0.0, "y": 0.15, "z": 0.75
897-
}
898-
]
899-
}
900-
},
901-
{
902-
"id": "https://example.org/iiif/3d/anno2",
903-
"type": "Annotation",
904-
"motivation": ["painting"],
905-
"body":
906-
{
907-
"id": "https://raw.githubusercontent.com/IIIF/3d/main/assets/whale/whale_cranium.glb",
908-
"type": "Model"
909-
},
910-
"target":
911-
{
912-
// SpecificResource with PointSelector
913-
}
914-
}
915-
]
916-
}
917-
]
918-
}
919-
],
920-
"annotations": [
921-
{
922-
"id": "https://example.org/iiif/scene1/page/p1/annotations/1",
923-
"type": "AnnotationPage",
924-
"items": [
925-
{
926-
"id": "https://example.org/iiif/3d/commenting-anno-for-mandibular-tooth",
927-
"type": "Annotation",
928-
"motivation": ["commenting"],
929-
"body":
930-
{
931-
"type": "TextualBody",
932-
"value": "Mandibular tooth"
933-
},
934-
"target":
935-
{
936-
// SpecificResource with PointSelector
937-
}
938-
},
939-
{
940-
"id": "https://example.org/iiif/3d/commenting-anno-for-right-pterygoid-hamulus",
941-
"type": "Annotation",
942-
"motivation": ["commenting"],
943-
"body":
944-
{
945-
"type": "TextualBody",
946-
"value": "Right pterygoid hamulus"
947-
},
948-
"target":
949-
{
950-
// SpecificResource with PointSelector
951-
}
952-
},
953-
{
954-
"id": "https://example.org/iiif/3d/anno9",
955-
"type": "Annotation",
956-
"motivation": ["activating"],
957-
"target":
958-
{
959-
"id": "https://example.org/iiif/3d/commenting-anno-for-mandibular-tooth",
960-
"type": "Annotation"
961-
},
962-
"body":
963-
{
964-
"type": "SpecificResource",
965-
"source": {
966-
"id": "https://example.org/iiif/3d/anno-that-paints-desired-camera-to-view-tooth",
967-
"type": "Annotation"
968-
},
969-
"action": ["show", "enable", "select"]
970-
}
971-
}
972-
]
973-
}
974-
]
975-
}
976-
```
977844

978845
**Key Points**
979846
* The client will render a UI that presents the two commenting annotations in some form and allows the user to navigate between them. An active Camera is not provided. While there is a Camera in the Scene, it has [`behavior`][prezi-40-model-behavior] "hidden", and is inactive and not usable.

0 commit comments

Comments
 (0)