bimatter-viewer-react 0.7.2 → 0.7.4

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.
@@ -36,6 +36,7 @@ export declare const DEFAULT_AMBIENT_LIGHT_COLOR = "#ffffff";
36
36
  export declare const DEFAULT_AMBIENT_LIGHT_INTENSITY = 1.5;
37
37
  export declare const DEFAULT_DIRECTIONAL_LIGHT_COLOR = "#ffffff";
38
38
  export declare const DEFAULT_DIRECTIONAL_LIGHT_INTENSITY = 1.5;
39
+ export declare const DEFAULT_POSTPRODUCTION_SATURATION = 0;
39
40
  export type ViewerStore = {
40
41
  api: ViewerApi | null;
41
42
  defaultHotkeysEnabled: boolean;
@@ -47,6 +48,7 @@ export type ViewerStore = {
47
48
  preselectionColor: ColorRepresentation;
48
49
  postproductionActivePassFilter: ViewerPostproductionActivePassFilter | null;
49
50
  postproductionPassType: ViewerPostproductionPassType;
51
+ postproductionSaturation: number;
50
52
  selected: SelectedStore;
51
53
  selectionColor: ColorRepresentation;
52
54
  selectionInteractionDisabled: boolean;
@@ -69,6 +71,7 @@ export type ViewerStore = {
69
71
  setPreselectionColor: (color: ColorRepresentation) => void;
70
72
  setPostproductionActivePassFilter: (filter: ViewerPostproductionActivePassFilter | null) => void;
71
73
  setPostproductionPassType: (type: ViewerPostproductionPassType) => void;
74
+ setPostproductionSaturation: (saturation: number) => void;
72
75
  setSelectionColor: (color: ColorRepresentation) => void;
73
76
  setSelectionInteractionDisabled: (disabled: boolean) => void;
74
77
  setShowNavCube: (showNavCube: boolean) => void;
@@ -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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bimatter-viewer-react",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "license": "PolyForm-Noncommercial-1.0.0",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",