UNPKG

@iiif/3d-manifesto-dev

Version:

IIIF Presentation API utility library for client and server with 3D extension

57 lines (56 loc) 14 kB
<!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>manifesto</title><meta name="description" content="Documentation for manifesto"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script><script async src="assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">manifesto</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>manifesto</h1></div><div class="tsd-panel tsd-typography"><p><a href="http://README.md">README.md</a> is a mess, need to start from manifesto's and re-do!</p> <h1 id="manifesto" class="tsd-anchor-link">manifesto<a href="#manifesto" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1><p><a href="https://github.com/IIIF-Commons/manifesto/actions/workflows/build-test.yml"><img src="https://github.com/IIIF-Commons/manifesto/actions/workflows/build-test.yml/badge.svg?branch=main" alt="Build Status"></a></p> <p>Forked from <a href="https://github.com/IIIF-Commons/manifesto">IIIF-Commons/manifesto</a>.</p> <p>Goal of implementing the <a href="https://github.com/IIIF/3d/blob/main/temp-draft-4.md">Draft API</a> under development by the <a href="https://github.com/IIIF/3d/">IIIF 3D Technical Study Group</a>.</p> <div class="tsd-alert tsd-alert-note"><div class="tsd-alert-title"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><use href="assets/icons.svg#icon-alertNote"></use></svg><span>Note</span></div><p> 3D extensions to the manifesto.js library are under development in a fork <a href="https://github.com/IIIF-Commons/manifesto-3d">IIIF-Commons/manifesto-3d</a>. This development is being performed in parallel with development of 3D extensions to the IIIF APIs documented in <a href="https://github.com/IIIF/3d">IIIF/3d</a>.</p> </div> <h2 id="getting-started" class="tsd-anchor-link">Getting Started<a href="#getting-started" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><h3 id="documentation" class="tsd-anchor-link">Documentation<a href="#documentation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p><a href="https://iiif-commons.github.io/manifesto-3d/">Manifesto-3D.js</a></p> <h3 id="loading-through-package-manager" class="tsd-anchor-link">Loading through package manager<a href="#loading-through-package-manager" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code>npm install manifesto-3d.js --save </code></pre> <h3 id="demonstration-projects" class="tsd-anchor-link">Demonstration Projects<a href="#demonstration-projects" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p><a href="https://github.com/IIIF/3d/tree/main/manifests">Example manifests</a> conforming to the <a href="https://github.com/IIIF/3d/blob/main/temp-draft-4.md">Draft API</a> .</p> <p><a href="https://github.com/IIIF/3d/issues/28">Prototype Viewers</a> rendering the example manifests.</p> <ul> <li><a href="https://codesandbox.io/p/github/JulieWinchester/iiif-threejs-demo">Three-JS based viewer</a></li> <li><a href="https://codesandbox.io/p/github/vincentmarchetti/iiif-x3dom-demo/main">X3D/X3DOM based viewer</a></li> <li><a href="https://codesandbox.io/p/sandbox/voyager-annotations-demo-forked-l83l6w">Smithsonian Voyager</a></li> </ul> <h3 id="changelog" class="tsd-anchor-link">ChangeLog<a href="#changelog" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p>From start point of the version distributed from <a href="https://github.com/JulieWinchester/manifesto/tree/3dtsg-dev-dist">JulieWinchester/manifesto</a></p> <h4 id="to-packagejson-version-430-draft3dapi010" class="tsd-anchor-link">To package.json version 4.3.0-draft3dapi.0.1.0<a href="#to-packagejson-version-430-draft3dapi010" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><p>distributed from <a href="">vincentmarchetti/manifesto#3dtsg-main</a> there were these changes:</p> <ol> <li> <p>This test is no longer useful for the Target of an Annotation:</p> <pre><code> if ( typeof(target) === &quot;string&quot; ){ // handle case where target is a Scene } </code></pre> <p>Draft manifest <a href="https://github.com/IIIF/3d/blob/main/manifests/3_lights/direction_light_transform_rotate.json"> 3_lights/direction_light_transform </a> uses two ways of encoding the value of a target property for an Annotation: with a json string value of the IRI, or with an object with <code>id</code> property of the IRI for the Scene. To avoid exponential expansion of if-else code when combined with target property which can also be <code>SpecificResource</code> resources, the parsing code was changed so tha the value returned from <code>getTarget()</code> is always an object.</p> <p>Since the Target property will always be an object referencing a <code>Scene</code>, or a <code>SpecificResource</code> whose <code>source</code> property is a <code>Scene</code>, the code for handling either would be</p> <pre><code> if (target.isSpecificResource){ // handle a SpecificResource, with selector property // and whose source property is the Scene } else{ // handle a Scene directly } </code></pre> </li> <li> <p>Annotation.getBody3D() is deprecated.</p> <p>The <code>Annotation.getBody()</code> from the Presentation 3 code has been extended to support the resources that can be included in a 3d Annotation body property. An important difference is that the <code>getBody()</code> function returns an array of objects, while the <code>getBody3D()</code> returns a single object. The deprecated function <code>getBody3D()</code> should be replaced with <code>getBody()[0]</code></p> </li> </ol> <h4 id="to-packagejson-version-430-draft3dapi020" class="tsd-anchor-link">To package.json version 4.3.0-draft3dapi.0.2.0<a href="#to-packagejson-version-430-draft3dapi020" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><ol> <li>Fixed a bug that occurred in determining the 'source' property of a SpecificResource resource that is the &quot;target&quot; property of an Annotation. This bug escaped detection previously because in the 3D case this 'source' property has always been a Scene resource, and the value is not needed for visualization.</li> </ol> <h4 id="to-packagejson-version-430-draft3dapi030" class="tsd-anchor-link">To package.json version 4.3.0-draft3dapi.0.3.0<a href="#to-packagejson-version-430-draft3dapi030" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><ol> <li>Added isSpecificResource and isAnnotationBody properties to the SpecificResource and AnnotationBody classes, in response to developer suggestion. (Slack, Apr 24 2024)</li> </ol> <h4 id="to-packagejson-version-430-draft3dapi040" class="tsd-anchor-link">To package.json version 4.3.0-draft3dapi.0.4.0<a href="#to-packagejson-version-430-draft3dapi040" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><ol> <li>Implemented Perspective Camera properties in the Camera class.</li> </ol> <h4 id="to-packagejson-version-430-draft3dapi050" class="tsd-anchor-link">To package.json version 4.3.0-draft3dapi.0.5.0<a href="#to-packagejson-version-430-draft3dapi050" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><ol> <li>Implement lookAt property of Camera class and of Light class.</li> </ol> </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#manifesto"><span>manifesto</span></a><ul><li><a href="#getting-started"><span>Getting <wbr/>Started</span></a></li><li><ul><li><a href="#documentation"><span>Documentation</span></a></li><li><a href="#loading-through-package-manager"><span>Loading through package manager</span></a></li><li><a href="#demonstration-projects"><span>Demonstration <wbr/>Projects</span></a></li><li><a href="#changelog"><span>Change<wbr/>Log</span></a></li><li><ul><li><a href="#to-packagejson-version-430-draft3dapi010"><span>To package.json version 4.3.0-<wbr/>draft3dapi.0.1.0</span></a></li><li><a href="#to-packagejson-version-430-draft3dapi020"><span>To package.json version 4.3.0-<wbr/>draft3dapi.0.2.0</span></a></li><li><a href="#to-packagejson-version-430-draft3dapi030"><span>To package.json version 4.3.0-<wbr/>draft3dapi.0.3.0</span></a></li><li><a href="#to-packagejson-version-430-draft3dapi040"><span>To package.json version 4.3.0-<wbr/>draft3dapi.0.4.0</span></a></li><li><a href="#to-packagejson-version-430-draft3dapi050"><span>To package.json version 4.3.0-<wbr/>draft3dapi.0.5.0</span></a></li></ul></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html">manifesto</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>