Skip to content

Commit

Permalink
Merge pull request #129 from vincentmarchetti/3dtsg-main
Browse files Browse the repository at this point in the history
Added properties to SpecificResource and AnnotationBody code
  • Loading branch information
vincentmarchetti committed May 1, 2024
2 parents d1364fe + 8118f51 commit f5642b7
Show file tree
Hide file tree
Showing 104 changed files with 2,049 additions and 1,702 deletions.
7 changes: 7 additions & 0 deletions README.md
Expand Up @@ -54,3 +54,10 @@ distributed from [vincentmarchetti/manifesto#3dtsg-main]() there were these chan

1. Fixed a bug that occurred in determining the 'source' property of a SpecificResource resource that is the "target" 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.

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

1. Added isSpecificResource and isAnnotationBody properties to the SpecificResource and AnnotationBody classes, in response to developer suggestion. (Slack, Apr 24 2024)

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

1. Implemented Perspective Camera properties in the Camera class.
2 changes: 1 addition & 1 deletion dist-commonjs/Annotation.d.ts
Expand Up @@ -52,5 +52,5 @@ export declare class Annotation extends ManifestResource {
* Otherwise, for example when the annotation target is an entire Scene, the
* location for lookAt is the origin (0,0,0)
**/
get lookAtLocation(): Vector3;
get LookAtLocation(): Vector3;
}
7 changes: 4 additions & 3 deletions dist-commonjs/Annotation.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/Annotation.js.map

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

2 changes: 2 additions & 0 deletions dist-commonjs/AnnotationBody.d.ts
Expand Up @@ -11,6 +11,8 @@ or model.
**/
export declare class AnnotationBody extends ManifestResource {
constructor(jsonld?: any, options?: IManifestoOptions);
isAnnotationBody: boolean;
isSpecificResource: boolean;
getFormat(): MediaType | null;
getType(): ExternalResourceType | null;
getWidth(): number;
Expand Down
12 changes: 12 additions & 0 deletions dist-commonjs/AnnotationBody.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/AnnotationBody.js.map

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

11 changes: 11 additions & 0 deletions dist-commonjs/Camera.d.ts
Expand Up @@ -2,5 +2,16 @@ import { IManifestoOptions, AnnotationBody } from "./internal";
export declare class Camera extends AnnotationBody {
constructor(jsonld?: any, options?: IManifestoOptions);
get isPerspectiveCamera(): boolean;
/**
@returns full angular size of perspective viewport in vertical direction.
Angular unit is degrees
**/
getFieldOfView(): number | undefined;
/**
Full angular size of perspective viewport in vertical direction.
Angular unit is degrees
**/
get FieldOfView(): number | undefined;
getLookAt(): object | null;
get LookAt(): object | null;
}
29 changes: 27 additions & 2 deletions 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.

20 changes: 12 additions & 8 deletions dist-commonjs/Geometry3d.d.ts
Expand Up @@ -4,16 +4,20 @@ import { Vector3, Euler } from "threejs-math";
* property of a camera resource. Determines the
* required angles of two rotations, the first about
* the x axis and the second about the y axis, which will
* rotate the default camerat direction (0,0,-1) into the
* rotate the default camera direction (0,0,-1) into the
* direction of the input arguments
* required angles, in degrees, are returned in a array of
* length 2. element 0 is the (first) rotation about the x
* axis, element 1 is (second) rotation about the y axis
*
* @param direction A vector interpreted as a direction, in the
* edge case of a zero-length vector a rotation of [0.0,0.0] will
* be returned
* @returns two angle values, in degrees
* Result of calculation is returned as a instance of EulerAngle from the
* threejs-math library. The "axes order" of the EulerAngle is "YXZ": The
* three-js library uses body-fixed axes to represent EulerAngles, which reverse
* the ordering of the "relative rotation" algorithm described in the
* draft 3d api.
* @param direction A vector interpreted as a direction. Client code
* responsible for not passing a 0-length vector, else a
*
* @returns threejs-math.EulerAngle instance
**/
export declare function cameraRelativeRotation(direction: Vector3): Euler;
export declare function lightRelativeRotation(direction: Vector3): Euler;
20 changes: 12 additions & 8 deletions dist-commonjs/Geometry3d.js

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

0 comments on commit f5642b7

Please sign in to comment.