Skip to content

Merge code supporting 3D content in IIIF manifests into manifesto#159

Draft
vincentmarchetti wants to merge 332 commits intomainfrom
merge-3d-into-manifesto
Draft

Merge code supporting 3D content in IIIF manifests into manifesto#159
vincentmarchetti wants to merge 332 commits intomainfrom
merge-3d-into-manifesto

Conversation

@vincentmarchetti
Copy link
Member

This pull request will merge in the code developed to support the 3D extensions developed for Presentation 4 specification.

Discussed at the August 26 2025 call of the IIIF-Commons group, call minutes at Running Notes

Some notes on the state of this PR
-- All of the new code related to 3D content are included, as well as all of the tests.
-- As we discussed Aug 26, none of the additional workflow/actions developed in the 3D repository are included, in particular in this PR the documentation will continue to be generated manually.
-- The dependency on the module prettier-check has been removed, in response to "severe" security warnings now issued by npm upon install.
-- neither the docs nor the package-lock.json changes are included in the commit of this PR
-- the package naming, website, and GitHub repo are all set to the IIIF-Commons/manifesto values.
-- the version number is unchanged, is at 4.2.22, we agreed that if/when merge is is performed the version would be bumped to the next minor release

the raw representation of intensity is supported.
Merge base manifesto upstream changes into manifesto-3d
had to manually include docs/.nojekyll and docs/index.html from manifest (2d) code
from the mainfesto/main side of the merge
the 'test' script still runs all tests including the 3d tests
there is no analogous file in that repository and not sure of this file is relevant
anymore
At the Aug 26 2025 IIIF-Commons call it was agreed to retain the existing
manifesto workflows.
IIIF-Commons/manifesto version of the release workflow
were appropriate to manifesto

restored the manifesto scripts, retained the additional dependencies
necessary to build the 3d code.
by the
npm run prettify
script

Changes were generally replacing the "let" keyword with "const" keyword
in those places where code analyis said that would be ok
a variable:
from
let size:string
to
const size:string
declaration of the size variable down to the point at which it
can be declared and initialized in same statement
npm now gives "severe" security warnings about. All defined scripts
still run
@codesandbox
Copy link

codesandbox bot commented Aug 29, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

with strategy ort and option theirs
manifests which referred to a resource "PhysicalBody", which is
not part of the prezi-4 draft and which, by design, causes an Error to
be thrown from the current commit of AnnotationBodyParser.ts
src/Manifest.ts Outdated
if (this._annotationIdMap == null) {
this._annotationIdMap = {};
for (var seq of this.getSequences())
for (var scene of seq.getScenes())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this only works on scenes, should the name reflect that. Also should this be a getter function for consistency?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the more appropriate fix would be to extend this function to gather Annotation from Canvas resources as well, and any other Containers defined in the updates IIIF API spec (4)

I lean toward retaining this as a class member with a get keyword

Copy link
Member Author

@vincentmarchetti vincentmarchetti Jan 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have made the change, so the annotationIdMap includes Annotations in the Content of any Canvas of the manifest at commit fc22c16

Comment on lines +79 to +81
get Source(): object | AnnotationBody {
return this.getSource();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a getter and a method feels confusing, given the structure of the other APIs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I am responsible for those and others working on the 3D extensions have expressed that concern, so those doubled-up get X() and getX() cases will be simplified to just one method

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At 83ac881 have removed the cases where a getter just duplicated an existing method returning the same date.
I propose this conversation can be marked as resolved

Comment on lines +39 to +41
get Position(): SpecificResource | null {
return this.getPosition();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another instance of the getter/method combination.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, as before

Comment on lines +13 to +15
constructor(jsonld?: any, options?: IManifestoOptions) {
super(jsonld, options);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Textual bodies may have multiple languages, is that something that should be considered at this point? Should the getValue() return a multilingual string like label and summary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will check for consistency with other classes delivering multilingual options

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the web annotation model document, at #embedded-textual-body the TextualBody class can have a language property, but each resource only provided a value for a single language. I think this means manifest authors would use a Choice resource to provide several TextualBody resources to offer multilingual presentation

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note we have a recipe for multilingual annotations: https://iiif.io/api/cookbook/recipe/0346-multilingual-annotation-body/

get X()
,property based on the get keyword, just duplicated a getX() function
that was already defined
the getValue() function call, for alignment with other classes
having a Value property
annotation indexed in the manifest annotationIdMap property.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants