bimatter-viewer-react 0.7.3 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/types.d.ts CHANGED
@@ -8,6 +8,7 @@ export type ViewerModelRef = RefObject<ViewerModelGroup | null>;
8
8
  export type ViewerCameraRef = RefObject<Camera | null>;
9
9
  export type ViewerControlsRef = RefObject<CameraControlsImpl | null>;
10
10
  export type ViewerLightRef = RefObject<DirectionalLight | null>;
11
+ export type ViewerCameraProjection = "perspective" | "orthographic";
11
12
  export type ViewerMaterialMode = "quality" | "performance";
12
13
  export type ViewerPostproductionPassType = "N8AO" | "SSAO" | null;
13
14
  export type ViewerUploadMode = "smooth" | "balanced" | "fast";
@@ -22,8 +22,17 @@ type ClippingPreselection = {
22
22
  elementID: number;
23
23
  modelID: number;
24
24
  } | null;
25
+ export type ViewerClippingVector3Input = Vector3 | readonly [number, number, number] | {
26
+ x: number;
27
+ y: number;
28
+ z: number;
29
+ };
25
30
  export type ViewerClippingApi = {
26
31
  createClippingRectangle: (selected?: boolean) => Plane[];
32
+ createPlaneFromPointAndNormal: {
33
+ (point: ViewerClippingVector3Input, normal: ViewerClippingVector3Input): Plane | null;
34
+ (z: number, normal?: ViewerClippingVector3Input): Plane | null;
35
+ };
27
36
  createPlane: (event?: MouseEvent | PointerEvent) => Plane | null;
28
37
  deleteAllPlanes: () => void;
29
38
  getCapsActive: () => boolean;
@@ -103,7 +112,9 @@ export declare class ClippingUtils {
103
112
  setActive(active: boolean): void;
104
113
  toggle(): void;
105
114
  createPlane(event?: MouseEvent | PointerEvent): Plane | null;
115
+ createPlaneFromPointAndNormal(pointOrZ: ViewerClippingVector3Input | number, normalInput?: ViewerClippingVector3Input): Plane | null;
106
116
  createClippingRectangle(selected?: boolean): Plane[];
117
+ private getPointFromZ;
107
118
  addPlane(plane: Plane, location: Vector3, normal: Vector3): void;
108
119
  deleteAllPlanes(): void;
109
120
  setHelpersActive(active: boolean): void;
@@ -1,2 +1,2 @@
1
1
  export { useClippingUtils } from "./ClippingUtils";
2
- export type { ViewerClippingApi } from "./ClippingUtils";
2
+ export type { ViewerClippingApi, ViewerClippingVector3Input, } from "./ClippingUtils";
@@ -1,4 +1,4 @@
1
- export type WorkerProgressPhase = "queued" | "reading" | "fetching" | "initializing" | "opening" | "parsing" | "properties" | "exporting" | "complete" | "error";
1
+ export type WorkerProgressPhase = "queued" | "reading" | "fetching" | "initializing" | "opening" | "parsing" | "properties" | "exporting" | "uploading" | "complete" | "error";
2
2
  export type WorkerProgressEvent = {
3
3
  loaded?: number;
4
4
  message?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bimatter-viewer-react",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "license": "PolyForm-Noncommercial-1.0.0",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",