In spite of its name, this method returns an array of objects, each of which represents a potential body annotations
Developer Note: 8 April 2024 getBody3D function was developed in the early stages of the 3D API Feb-March 2024 as alternative to the existing Annotation getBody function, but the signature for getBody3D was chosen to be a single object instance, not an array.
At this stage, the merging of the 2D API anf the draft 3D API has been completed, so 3D applications can use the getBody() function to retrieve the body of an Annotation intended to target a scene. For compatibily the return value of the function is still an array.
3D clients using getBody are responsible for choosing the appropriate instance from the returned array. In most cases this will be the sole 0th element. *
returns the PropertyValue which in turn allows a language-specific string encoded in the json as the "label" property
var label = manifest.getLabel().getValue(); // returns the string for default locale
var label = manifest.getLabel().getValue(locale); // locale a string , examples
// would be "fr", "en-US",
A function that wraps the getProperty function, which client code can use if it is needed to identify when the json value of a property is an IRI -- Internationalized Resource Identifier
If the value of the json value is a bare string, then it will be wrapped in a json object with the string in the property 'id', additionally that property will have a property 'isIRI' which will be true for the literal string case, otherwise false meaning the returned getProperty should be parsed as before.
Private
parseauxiliary function to getBody; intended to hande an object that has an element items which is a array of annotation- body-like objects. This : https://iiif.io/api/cookbook/recipe/0033-choice/ seems to be the use case for this *
Private
parseauxiliary function to parseBodiesFromItemsList and getBody, this is the last step on recursively going through collections of bodies. *
A 3D point coordinate object for the location of an Annotation to satisfy the requirements of the lookAt property of camera and spotlight resources, according to the draft v4 API as of April 1 2024
Is the position of the point for a target which is a SpecificResource with a PointSelector Otherwise, for example when the annotation target is an entire Scene, the location for lookAt is the origin (0,0,0)