diff --git a/source/presentation/4.0/example/uc08_3d_comments_with_cameras.json b/source/presentation/4.0/example/uc08_3d_comments_with_cameras.json new file mode 100644 index 000000000..9b6fe5333 --- /dev/null +++ b/source/presentation/4.0/example/uc08_3d_comments_with_cameras.json @@ -0,0 +1,237 @@ +{ + "@context": "http://iiif.io/api/presentation/4/context.json", + "id": "https://iiif.io/api/presentation/4.0/example/uc08_3d_comments_with_cameras.json", + "type": "Manifest", + "label": { + "en": [ + "Whale Cranium and Mandible with Dynamic Commenting Annotations and Custom Per-Anno Views" + ] + }, + "items": [ + { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1", + "type": "Scene", + "label": { + "en": [ + "A Scene Containing a Whale Cranium and Mandible" + ] + }, + "items": [ + { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1/page/1", + "type": "AnnotationPage", + "items": [ + { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno/1", + "type": "Annotation", + "motivation": [ + "painting" + ], + "body": { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno/1/body", + "type": "SpecificResource", + "source": { + "id": "https://fixtures.iiif.io/3d/smithsonian/whale/whale_mandible.glb", + "type": "Model", + "label": { + "en": [ + "mandible" + ] + }, + "format": "model/gltf-binary" + }, + "transform": [ + { + "type": "ScaleTransform", + "x": 10, + "y": 10, + "z": 10 + }, + { + "type": "RotateTransform", + "x": 12.5, + "y": 0, + "z": 0 + }, + { + "type": "TranslateTransform", + "x": 0, + "y": 0, + "z": 0.5 + } + ] + }, + "target": { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1", + "type": "Scene" + } + }, + { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno-that-paints-desired-camera-to-view-tooth", + "type": "Annotation", + "motivation": [ + "painting" + ], + "behavior": [ + "hidden" + ], + "body": { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/cameras/1", + "type": "PerspectiveCamera", + "label": { + "en": [ + "Perspective Camera Pointed At Front of Cranium and Mandible" + ] + }, + "fieldOfView": 50.0, + "near": 0.10, + "far": 2000.0 + }, + "target": { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno/2/target", + "type": "SpecificResource", + "source": { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1", + "type": "Scene" + }, + "selector": [ + { + "type": "PointSelector", + "x": 0.0, + "y": 0.15, + "z": 0.75 + } + ] + } + }, + { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno2", + "type": "Annotation", + "motivation": [ + "painting" + ], + "body": { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno/3/body", + "type": "SpecificResource", + "source": { + "id": "https://fixtures.iiif.io/3d/smithsonian/whale/whale_cranium.glb", + "type": "Model", + "label": { + "en": [ + "cranium" + ] + }, + "format": "model/gltf-binary" + }, + "transform": [ + { + "type": "ScaleTransform", + "x": 10, + "y": 10, + "z": 10 + }, + { + "type": "TranslateTransform", + "x": 0, + "y": 1.5, + "z": 0 + } + ] + }, + "target": { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1", + "type": "Scene" + } + } + ] + } + ] + } + ], + "annotations": [ + { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1/annotations/page/1", + "type": "AnnotationPage", + "items": [ + { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/commenting-anno-for-mandibular-tooth", + "type": "Annotation", + "motivation": [ + "commenting" + ], + "body": { + "type": "TextualBody", + "value": "Mandibular tooth" + }, + "target": { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/comment/1/target", + "type": "SpecificResource", + "source": { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1", + "type": "Scene" + }, + "selector": [ + { + "type": "PointSelector", + "x": -0.447287, + "y": 0.546212, + "z": 1.795195 + } + ] + } + }, + { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/commenting-anno-for-right-pterygoid-hamulus", + "type": "Annotation", + "motivation": [ + "commenting" + ], + "body": { + "type": "TextualBody", + "value": "Right pterygoid hamulus" + }, + "target": { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/comment/2/target", + "type": "SpecificResource", + "source": { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/scene/1", + "type": "Scene" + }, + "selector": [ + { + "type": "PointSelector", + "x": -0.442066, + "y": 0.671795, + "z": 1.288055 + } + ] + } + }, + { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno9", + "type": "Annotation", + "motivation": [ + "activating" + ], + "target": { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/commenting-anno-for-mandibular-tooth", + "type": "Annotation" + }, + "body": { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/comment/3/body", + "type": "SpecificResource", + "source": { + "id": "https://iiif.io/api/presentation/4.0/example/uc08/3d/anno-that-paints-desired-camera-to-view-tooth", + "type": "Annotation" + }, + "action": [ + "show", + "enable", + "select" + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/source/presentation/4.0/index.md b/source/presentation/4.0/index.md index f48720f3f..75f2c05e1 100644 --- a/source/presentation/4.0/index.md +++ b/source/presentation/4.0/index.md @@ -839,141 +839,8 @@ It is important to be able to position the textual body of an annotation within 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. +{% include code_example.html src="uc08_3d_comments_with_cameras.json" %} -```jsonc -{ - "id": "https://example.org/iiif/3d/whale_comment_scope_content_state.json", - "type": "Manifest", - "label": { "en": ["Whale Cranium and Mandible with Dynamic Commenting Annotations and Custom Per-Anno Views"] }, - "items": [ - { - "id": "https://example.org/iiif/scene1/page/p1/1", - "type": "Scene", - "label": { "en": ["A Scene Containing a Whale Cranium and Mandible"] }, - "items": [ - { - "id": "https://example.org/iiif/scene1/page/p1/1", - "type": "AnnotationPage", - "items": [ - { - "id": "https://example.org/iiif/3d/anno1", - "type": "Annotation", - "motivation": ["painting"], - "body": - { - "id": "https://raw.githubusercontent.com/IIIF/3d/main/assets/whale/whale_mandible.glb", - "type": "Model" - }, - "target": - { - // SpecificResource with PointSelector - } - }, - { - "id": "https://example.org/iiif/3d/anno-that-paints-desired-camera-to-view-tooth", - "type": "Annotation", - "motivation": ["painting"], - "behavior": ["hidden"], - "body": - { - "id": "https://example.org/iiif/3d/cameras/1", - "type": "PerspectiveCamera", - "label": {"en": ["Perspective Camera Pointed At Front of Cranium and Mandible"]}, - "fieldOfView": 50.0, - "near": 0.10, - "far": 2000.0 - }, - "target": - { - "type": "SpecificResource", - "source": { - "id": "https://example.org/iiif/scene1", - "type": "Scene" - }, - "selector": [ - { - "type": "PointSelector", - "x": 0.0, "y": 0.15, "z": 0.75 - } - ] - } - }, - { - "id": "https://example.org/iiif/3d/anno2", - "type": "Annotation", - "motivation": ["painting"], - "body": - { - "id": "https://raw.githubusercontent.com/IIIF/3d/main/assets/whale/whale_cranium.glb", - "type": "Model" - }, - "target": - { - // SpecificResource with PointSelector - } - } - ] - } - ] - } - ], - "annotations": [ - { - "id": "https://example.org/iiif/scene1/page/p1/annotations/1", - "type": "AnnotationPage", - "items": [ - { - "id": "https://example.org/iiif/3d/commenting-anno-for-mandibular-tooth", - "type": "Annotation", - "motivation": ["commenting"], - "body": - { - "type": "TextualBody", - "value": "Mandibular tooth" - }, - "target": - { - // SpecificResource with PointSelector - } - }, - { - "id": "https://example.org/iiif/3d/commenting-anno-for-right-pterygoid-hamulus", - "type": "Annotation", - "motivation": ["commenting"], - "body": - { - "type": "TextualBody", - "value": "Right pterygoid hamulus" - }, - "target": - { - // SpecificResource with PointSelector - } - }, - { - "id": "https://example.org/iiif/3d/anno9", - "type": "Annotation", - "motivation": ["activating"], - "target": - { - "id": "https://example.org/iiif/3d/commenting-anno-for-mandibular-tooth", - "type": "Annotation" - }, - "body": - { - "type": "SpecificResource", - "source": { - "id": "https://example.org/iiif/3d/anno-that-paints-desired-camera-to-view-tooth", - "type": "Annotation" - }, - "action": ["show", "enable", "select"] - } - } - ] - } - ] -} -``` **Key Points** * 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.