From 7f97896adfc33af6d9af28eabb543e3e96b9a0fb Mon Sep 17 00:00:00 2001 From: Edward Silverton Date: Wed, 9 Sep 2020 15:17:43 +0100 Subject: [PATCH 1/5] added 3d rendering recipe --- recipe/0125-rendering-3d/index.md | 81 +++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 recipe/0125-rendering-3d/index.md diff --git a/recipe/0125-rendering-3d/index.md b/recipe/0125-rendering-3d/index.md new file mode 100644 index 000000000..95957159b --- /dev/null +++ b/recipe/0125-rendering-3d/index.md @@ -0,0 +1,81 @@ +--- +title: Including a 3D Rendering +id: 93 +layout: recipe +tags: [tbc] +summary: "You want to include a 3D model representation" +--- + + +## Use Case + +You want to view an object from any orbital point of view or zoom level. +You want to view an object in augmented reality/XR in order to gain a better understanding of its dimensions and physical properties. + +## Implementation notes + +Add a [`rendering`](https://iiif.io/api/presentation/3.0/#rendering) to your manifest either at the root level, or any applicable child resource. +The rendering MUST have a dereferenceable `id` linking to the supplied 3D model, a `type` of `Model`, and a `label`. + +## Restrictions + + +## Example + +```json +{ + "@context": [ + "http://www.w3.org/ns/anno.jsonld", + "http://iiif.io/api/presentation//context.json" + ], + "id": "https://example.org/iiif/book1/manifest", + "type": "Manifest", + "label": { "en": [ "Image 1" ] }, + "items": [ + { + "id": "https://example.org/iiif/book1/canvas/p1", + "type": "Canvas", + "height": 1800, + "width": 1200, + "items": [ + { + "id": "https://example.org/iiif/book1/page/p1/1", + "type": "AnnotationPage", + "items": [ + { + "id": "https://example.org/iiif/book1/annotation/p0001-image", + "type": "Annotation", + "motivation": "painting", + "body": { + "id": "http://iiif.io/api/presentation/2.1/example/fixtures/resources/page1-full.png", + "type": "Image", + "format": "image/png", + "height": 1800, + "width": 1200 + }, + "target": "https://example.org/iiif/book1/canvas/p1" + } + ] + } + ] + } + ], + "rendering": [ + { + "id": "https://example.org/iiif/book1.glb", + "type": "Model", + "label": { "en": [ "Download as GLB" ] }, + "format": "model/gltf-binary" + } + ] +} +``` + +# Related recipes + +Provide a bulleted list of related recipes and why they are relevant. + + +{% include acronyms.md %} +{% include links.md %} + From 119eaf87032d8c020e2ace23234d99d5a34adc98 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Wed, 4 May 2022 12:20:16 +0100 Subject: [PATCH 2/5] Updating style * Moved manifest to separate file * Changed ids to use Jekyll variables * Added topic and viewer support --- recipe/0125-rendering-3d/index.md | 58 ++++---------------------- recipe/0125-rendering-3d/manifest.json | 45 ++++++++++++++++++++ 2 files changed, 54 insertions(+), 49 deletions(-) create mode 100644 recipe/0125-rendering-3d/manifest.json diff --git a/recipe/0125-rendering-3d/index.md b/recipe/0125-rendering-3d/index.md index 95957159b..fcaba66ac 100644 --- a/recipe/0125-rendering-3d/index.md +++ b/recipe/0125-rendering-3d/index.md @@ -4,9 +4,13 @@ id: 93 layout: recipe tags: [tbc] summary: "You want to include a 3D model representation" +viewers: + - Mirador + - UV +topic: property +property: rendering --- - ## Use Case You want to view an object from any orbital point of view or zoom level. @@ -21,55 +25,11 @@ The rendering MUST have a dereferenceable `id` linking to the supplied 3D model, ## Example +{% include manifest_links.html viewers="UV, Mirador" manifest="manifest.json" %} + +{% include jsonviewer.html src="manifest.json" %} + -```json -{ - "@context": [ - "http://www.w3.org/ns/anno.jsonld", - "http://iiif.io/api/presentation//context.json" - ], - "id": "https://example.org/iiif/book1/manifest", - "type": "Manifest", - "label": { "en": [ "Image 1" ] }, - "items": [ - { - "id": "https://example.org/iiif/book1/canvas/p1", - "type": "Canvas", - "height": 1800, - "width": 1200, - "items": [ - { - "id": "https://example.org/iiif/book1/page/p1/1", - "type": "AnnotationPage", - "items": [ - { - "id": "https://example.org/iiif/book1/annotation/p0001-image", - "type": "Annotation", - "motivation": "painting", - "body": { - "id": "http://iiif.io/api/presentation/2.1/example/fixtures/resources/page1-full.png", - "type": "Image", - "format": "image/png", - "height": 1800, - "width": 1200 - }, - "target": "https://example.org/iiif/book1/canvas/p1" - } - ] - } - ] - } - ], - "rendering": [ - { - "id": "https://example.org/iiif/book1.glb", - "type": "Model", - "label": { "en": [ "Download as GLB" ] }, - "format": "model/gltf-binary" - } - ] -} -``` # Related recipes diff --git a/recipe/0125-rendering-3d/manifest.json b/recipe/0125-rendering-3d/manifest.json new file mode 100644 index 000000000..b424d91e7 --- /dev/null +++ b/recipe/0125-rendering-3d/manifest.json @@ -0,0 +1,45 @@ +{ + "@context": [ + "http://iiif.io/api/presentation//context.json" + ], + "id": "{{ id.url }}", + "type": "Manifest", + "label": { "en": [ "Image with 3d rendering" ] }, + "items": [ + { + "id": "{{ id.path }}/canvas/1", + "type": "Canvas", + "height": 1800, + "width": 1200, + "items": [ + { + "id": "{{ id.path }}/canvas/1/page/1", + "type": "AnnotationPage", + "items": [ + { + "id": "{{ id.path }}/canvas/1/annotation/1", + "type": "Annotation", + "motivation": "painting", + "body": { + "id": "http://iiif.io/api/presentation/2.1/example/fixtures/resources/page1-full.png", + "type": "Image", + "format": "image/png", + "height": 1800, + "width": 1200 + }, + "target": "{{ id.path }}/canvas/1" + } + ] + } + ] + } + ], + "rendering": [ + { + "id": "https://example.org/iiif/book1.glb", + "type": "Model", + "label": { "en": [ "Download as GLB" ] }, + "format": "model/gltf-binary" + } + ] +} From 06945df1d207787d377efd084dad56451a9b93a1 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Wed, 4 May 2022 12:28:10 +0100 Subject: [PATCH 3/5] Moving rendering higher up and adding highlighting --- recipe/0125-rendering-3d/index.md | 2 +- recipe/0125-rendering-3d/manifest.json | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/recipe/0125-rendering-3d/index.md b/recipe/0125-rendering-3d/index.md index fcaba66ac..10fd4aa03 100644 --- a/recipe/0125-rendering-3d/index.md +++ b/recipe/0125-rendering-3d/index.md @@ -27,7 +27,7 @@ The rendering MUST have a dereferenceable `id` linking to the supplied 3D model, ## Example {% include manifest_links.html viewers="UV, Mirador" manifest="manifest.json" %} -{% include jsonviewer.html src="manifest.json" %} +{% include jsonviewer.html src="manifest.json" config='data-line="8-15"' %} diff --git a/recipe/0125-rendering-3d/manifest.json b/recipe/0125-rendering-3d/manifest.json index b424d91e7..cd438afa5 100644 --- a/recipe/0125-rendering-3d/manifest.json +++ b/recipe/0125-rendering-3d/manifest.json @@ -5,6 +5,14 @@ "id": "{{ id.url }}", "type": "Manifest", "label": { "en": [ "Image with 3d rendering" ] }, + "rendering": [ + { + "id": "https://example.org/iiif/book1.glb", + "type": "Model", + "label": { "en": [ "Download as GLB" ] }, + "format": "model/gltf-binary" + } + ], "items": [ { "id": "{{ id.path }}/canvas/1", @@ -33,13 +41,5 @@ } ] } - ], - "rendering": [ - { - "id": "https://example.org/iiif/book1.glb", - "type": "Model", - "label": { "en": [ "Download as GLB" ] }, - "format": "model/gltf-binary" - } ] } From e46d778b1785d7dcf5538e6876a25d592bfb866f Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Wed, 4 May 2022 12:39:00 +0100 Subject: [PATCH 4/5] Fixing highlighting --- recipe/0125-rendering-3d/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/0125-rendering-3d/index.md b/recipe/0125-rendering-3d/index.md index 10fd4aa03..5a1f8f741 100644 --- a/recipe/0125-rendering-3d/index.md +++ b/recipe/0125-rendering-3d/index.md @@ -27,7 +27,7 @@ The rendering MUST have a dereferenceable `id` linking to the supplied 3D model, ## Example {% include manifest_links.html viewers="UV, Mirador" manifest="manifest.json" %} -{% include jsonviewer.html src="manifest.json" config='data-line="8-15"' %} +{% include jsonviewer.html src="manifest.json" config='data-line="12-22"' %} From 0368d6992dc12b2a596e71fa13b164d31b75d4ea Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Wed, 4 May 2022 12:39:33 +0100 Subject: [PATCH 5/5] One line short! --- recipe/0125-rendering-3d/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/0125-rendering-3d/index.md b/recipe/0125-rendering-3d/index.md index 5a1f8f741..9e8913ba6 100644 --- a/recipe/0125-rendering-3d/index.md +++ b/recipe/0125-rendering-3d/index.md @@ -27,7 +27,7 @@ The rendering MUST have a dereferenceable `id` linking to the supplied 3D model, ## Example {% include manifest_links.html viewers="UV, Mirador" manifest="manifest.json" %} -{% include jsonviewer.html src="manifest.json" config='data-line="12-22"' %} +{% include jsonviewer.html src="manifest.json" config='data-line="12-23"' %}