bimatter-viewer-react 0.6.5 → 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.
@@ -42,6 +42,7 @@ export declare class ClippingCaps {
42
42
  private updatePreselectionUniforms;
43
43
  private updateCapMaterial;
44
44
  private createCapGeometry;
45
+ private getCapSegmentsFromEdgeSegments;
45
46
  private getCapSegments;
46
47
  private getTriangleElementID;
47
48
  private getTriangleIntersections;
@@ -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;
@@ -68,6 +69,8 @@ export declare class ClippingUtils {
68
69
  getMaxTextureAnisotropy(): number;
69
70
  getControlRef(): ViewerControlsRef;
70
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;
71
74
  getSelectableObjects(): Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes, import("three").BufferGeometryEventMap>, Material<import("three").MaterialEventMap> | Material<import("three").MaterialEventMap>[], import("three").Object3DEventMap>[];
72
75
  getSelected(): import("../..").SelectedStore;
73
76
  getPreselectionColor(): import("three").ColorRepresentation;
@@ -100,7 +103,7 @@ export declare class ClippingUtils {
100
103
  setEdgesActive(active: boolean): void;
101
104
  updateEdges(): void;
102
105
  flushEdgesUpdate(): void;
103
- updateCaps(): void;
106
+ updateCaps(except?: ClippingCaps): void;
104
107
  updateHelpers(): void;
105
108
  requestEdgesUpdate(): void;
106
109
  requestHelpersUpdate(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bimatter-viewer-react",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "license": "PolyForm-Noncommercial-1.0.0",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",