bimatter-viewer-react 0.6.4 → 0.6.6

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.
@@ -19,6 +19,9 @@ export declare class ClippingCaps {
19
19
  private readonly tempLine;
20
20
  private readonly tempVector;
21
21
  private readonly tempVector1;
22
+ private readonly tempAxisX;
23
+ private readonly tempAxisY;
24
+ private readonly tempAxisZ;
22
25
  private readonly worldPoint;
23
26
  private capClippingPlanesKey;
24
27
  private capShader;
@@ -39,6 +42,7 @@ export declare class ClippingCaps {
39
42
  private updatePreselectionUniforms;
40
43
  private updateCapMaterial;
41
44
  private createCapGeometry;
45
+ private getCapSegmentsFromEdgeSegments;
42
46
  private getCapSegments;
43
47
  private getTriangleElementID;
44
48
  private getTriangleIntersections;
@@ -51,6 +55,7 @@ export declare class ClippingCaps {
51
55
  private triangulateContours;
52
56
  private pushContourVertex;
53
57
  private getHatchSpacing;
58
+ private getModelHatchReferenceDirection;
54
59
  private getModelWorldBox;
55
60
  }
56
61
  export {};
@@ -1,5 +1,15 @@
1
1
  import { BufferGeometry, LineBasicMaterial, LineSegments, Plane } from "three";
2
2
  import type { ClippingUtils } from "./ClippingUtils";
3
+ export type ClippingIntersectionSegment = {
4
+ ax: number;
5
+ ay: number;
6
+ az: number;
7
+ bx: number;
8
+ by: number;
9
+ bz: number;
10
+ elementID: number;
11
+ modelID: number;
12
+ };
3
13
  export declare class ClippingEdges {
4
14
  active: boolean;
5
15
  readonly material: LineBasicMaterial;
@@ -13,11 +23,14 @@ export declare class ClippingEdges {
13
23
  private readonly tempVector1;
14
24
  private readonly tempVector2;
15
25
  private readonly tempVector3;
26
+ private readonly intersectionSegments;
16
27
  constructor(context: ClippingUtils, plane: Plane);
17
28
  create(): LineSegments<BufferGeometry<import("three").NormalBufferAttributes, import("three").BufferGeometryEventMap>, import("three").Material<import("three").MaterialEventMap> | import("three").Material<import("three").MaterialEventMap>[], import("three").Object3DEventMap>[];
18
29
  syncMeshes(): void;
19
30
  dispose(): void;
20
31
  setVisible(visible: boolean): void;
21
32
  toggle(): void;
33
+ getIntersectionSegments(): ClippingIntersectionSegment[];
22
34
  update(): void;
35
+ private getTriangleElementID;
23
36
  }
@@ -4,6 +4,7 @@ import type { ViewerStoreApi } from "../../store/ViewerStore";
4
4
  import type { ViewerControlsRef, ViewerModelRef } from "../../types";
5
5
  import { ClippingCaps } from "./ClippingCaps";
6
6
  import { ClippingEdges } from "./ClippingEdges";
7
+ import type { ClippingIntersectionSegment } from "./ClippingEdges";
7
8
  import { PlaneHelper } from "./PlaneHelper";
8
9
  type ClippingContext = {
9
10
  camera: Camera;
@@ -65,8 +66,11 @@ export declare class ClippingUtils {
65
66
  getCameraUtils(): CameraUtilsApi;
66
67
  getDomElement(): HTMLCanvasElement;
67
68
  getRaycaster(): Raycaster;
69
+ getMaxTextureAnisotropy(): number;
68
70
  getControlRef(): ViewerControlsRef;
69
71
  getMeshes(): Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes, import("three").BufferGeometryEventMap>, Material<import("three").MaterialEventMap> | Material<import("three").MaterialEventMap>[], import("three").Object3DEventMap>[];
72
+ getObjectModelID(object: Object3D): number;
73
+ getEdgeSegmentsForPlane(plane: Plane): readonly ClippingIntersectionSegment[] | null;
70
74
  getSelectableObjects(): Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes, import("three").BufferGeometryEventMap>, Material<import("three").MaterialEventMap> | Material<import("three").MaterialEventMap>[], import("three").Object3DEventMap>[];
71
75
  getSelected(): import("../..").SelectedStore;
72
76
  getPreselectionColor(): import("three").ColorRepresentation;
@@ -99,7 +103,7 @@ export declare class ClippingUtils {
99
103
  setEdgesActive(active: boolean): void;
100
104
  updateEdges(): void;
101
105
  flushEdgesUpdate(): void;
102
- updateCaps(): void;
106
+ updateCaps(except?: ClippingCaps): void;
103
107
  updateHelpers(): void;
104
108
  requestEdgesUpdate(): void;
105
109
  requestHelpersUpdate(): void;
@@ -34,7 +34,7 @@ export declare class PlaneHelper extends Object3D {
34
34
  private stopHelperPriorityEvent;
35
35
  private getPointerIntersection;
36
36
  private getNearestHelperIntersection;
37
- private hasCloserModelIntersection;
37
+ private hasModelIntersection;
38
38
  private isPointerHitNearEdge;
39
39
  private getEdgeInteractionWidth;
40
40
  private getDragDistanceEpsilon;
@@ -1,5 +1,5 @@
1
1
  import { Color, ConeGeometry, Object3D, SphereGeometry, type Camera, type Scene } from "three";
2
- import type { CameraUtilsApi } from "../../Camera/useCameraUtils";
2
+ import { type CameraUtilsApi } from "../../Camera/useCameraUtils";
3
3
  import type { ViewerStoreApi } from "../../store/ViewerStore";
4
4
  import type { ViewerControlsRef, ViewerModelRef } from "../../types";
5
5
  import { DimensionLine, type DimensionUnit } from "./DimentionLine";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bimatter-viewer-react",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "license": "PolyForm-Noncommercial-1.0.0",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",