Skip to content

Commit

Permalink
Merge pull request IIIF-Commons#130 from vincentmarchetti/3dtsg-main
Browse files Browse the repository at this point in the history
update to version 4.3.0-draft3dapi.0.5.0
  • Loading branch information
vincentmarchetti authored May 15, 2024
2 parents f5642b7 + 0d15510 commit a9a01e6
Show file tree
Hide file tree
Showing 96 changed files with 795 additions and 214 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ This included in package.json

will install manifesto modules into node_modules.

### Demonstration Projects
[Example manifests](https://github.com/IIIF/3d/tree/main/manifests) conforming to the [Draft API](https://github.com/IIIF/3d/blob/main/temp-draft-4.md) .

[Prototype Viewers](https://github.com/IIIF/3d/issues/28) rendering the example manifests.
- [Three-JS based viewer](https://codesandbox.io/p/github/JulieWinchester/iiif-threejs-demo)
- [X3D/X3DOM based viewer](https://codesandbox.io/p/github/vincentmarchetti/iiif-x3dom-demo/main)
- [Smithsonian Voyager](https://codesandbox.io/p/sandbox/voyager-annotations-demo-forked-l83l6w)

### ChangeLog

From start point of the version distributed from [JulieWinchester/manifesto](https://github.com/JulieWinchester/manifesto/tree/3dtsg-dev-dist)
Expand Down Expand Up @@ -60,4 +68,8 @@ distributed from [vincentmarchetti/manifesto#3dtsg-main]() there were these chan

#### To package.json version 4.3.0-draft3dapi.0.4.0

1. Implemented Perspective Camera properties in the Camera class.
1. Implemented Perspective Camera properties in the Camera class.

#### To package.json version 4.3.0-draft3dapi.0.5.0

1. Implement lookAt property of Camera class and of Light class.
2 changes: 1 addition & 1 deletion dist-commonjs/AnnotationBodyParser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist-commonjs/AnnotationBodyParser.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions dist-commonjs/Camera.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IManifestoOptions, AnnotationBody } from "./internal";
import { IManifestoOptions, AnnotationBody, PointSelector } from "./internal";
export declare class Camera extends AnnotationBody {
constructor(jsonld?: any, options?: IManifestoOptions);
get isPerspectiveCamera(): boolean;
Expand All @@ -12,6 +12,10 @@ export declare class Camera extends AnnotationBody {
Angular unit is degrees
**/
get FieldOfView(): number | undefined;
getLookAt(): object | null;
/**
* @return : if not null, is either a PointSelector, or an object
* with an id matching the id of an Annotation instance.
**/
getLookAt(): object | PointSelector | null;
get LookAt(): object | null;
}
14 changes: 13 additions & 1 deletion dist-commonjs/Camera.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist-commonjs/Camera.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 28 additions & 1 deletion dist-commonjs/Light.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { IManifestoOptions, AnnotationBody, Color } from "./internal";
import { IManifestoOptions, AnnotationBody, Color, PointSelector } from "./internal";
export declare class Light extends AnnotationBody {
constructor(jsonld?: any, options?: IManifestoOptions);
get isAmbientLight(): boolean;
get isDirectionalLight(): boolean;
get isSpotLight(): boolean;
getColor(): Color;
get Color(): Color;
/**
* The implementation of the intensity is based on
* {@link https://github.com/IIIF/3d/blob/main/temp-draft-4.md | temp-draft-4.md }
Expand All @@ -18,4 +20,29 @@ export declare class Light extends AnnotationBody {
* This code will implement a default intensity of 1.0
**/
getIntensity(): number;
get Intensity(): number;
/**
* As defined in the temp-draft-4.md (
* https://github.com/IIIF/3d/blob/main/temp-draft-4.md#lights ; 12 May 2024)
* this quantity is the half-angle of the cone of the spotlight.
*
* The inconsistency between this definition of the angle and the definition of
* fieldOfView for PerspectiveCamera (where the property value defines the full angle) has
* already been noted: https://github.com/IIIF/api/issues/2284
*
* provisional decision is to return undefined in case that this property
* is accessed in a light that is not a spotlight
*
*
* @returns number
**/
getAngle(): number | undefined;
get Angle(): number | undefined;
/**
* @return : if not null, is either a PointSelector, or an object
* with an id matching the id of an Annotation instance.
**/
getLookAt(): object | PointSelector | null;
get LookAt(): object | null;
}
66 changes: 66 additions & 0 deletions dist-commonjs/Light.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist-commonjs/Light.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions dist-commonjs/PointSelector.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@ import { Vector3 } from "threejs-math";
export declare class PointSelector extends JSONLDResource {
isPointSelector: boolean;
constructor(jsonld: any);
/**
@returns the 3D coordinates of the point as a Vector3 instance.
**/
getLocation(): Vector3;
/**
@returns the 3D coordinates of the point as a Vector3 instance.
**/
get Location(): Vector3;
}
17 changes: 11 additions & 6 deletions dist-commonjs/PointSelector.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist-commonjs/PointSelector.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist-commonjs/SpecificResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export declare class SpecificResource extends ManifestResource {
isSpecificResource: boolean;
constructor(jsonld: any, options?: IManifestoOptions);
getSource(): object | AnnotationBody;
get Source(): object | AnnotationBody;
getSelector(): PointSelector | null;
get Selector(): PointSelector | null;
getTransform(): Transform[];
Expand Down
5 changes: 5 additions & 0 deletions dist-commonjs/SpecificResource.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a9a01e6

Please sign in to comment.