bimatter-viewer-react 0.11.5 → 0.11.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.
@@ -10,6 +10,7 @@ import type { ViewerCameraGetIntersection } from "../Camera/useCameraUtils";
10
10
  import type { BmtConversionResult, BmtConverterOptions, BmtConverterSource } from "../Loaders/BmtConverter";
11
11
  import { FilteredElementsCollector } from "../Selector/FilteredElementsCollector";
12
12
  import type { ViewerLoadedModels, ViewerLoadModelOptions, ViewerModelSource } from "./loader";
13
+ import type { GeometryIndex } from "../utils/GeometryUtils/useGeometryIndex";
13
14
  import type { WorkerProgressEvent } from "../workers";
14
15
  import { type ViewerPlansApi, type ViewerPlansContainerFactory, type ViewerPlansSceneApi } from "./ViewerPlansApi";
15
16
  export type { ViewerClippingApi, ViewerClippingVector3Input, } from "../utils/ClippingUtils";
@@ -21,6 +22,7 @@ export type { ViewerCameraProjection, ViewerFirstPersonControlSettings, } from "
21
22
  export type { ViewerPlanHandle, ViewerPlansApi, ViewerPlanVector3Input, } from "./ViewerPlansApi";
22
23
  export type ViewerSelection = Record<number, number[]>;
23
24
  export type ViewerGeometryUtilsApi = {
25
+ readonly indexesState: GeometryIndex | null;
24
26
  getAllIds: () => number[];
25
27
  getIfcSpacesVisibility: () => boolean;
26
28
  getModelGeometry: (modelID: number) => Group | null;
package/lib/index.js CHANGED
@@ -1631,6 +1631,9 @@ function Or(e, t, n, r) {
1631
1631
  }
1632
1632
  },
1633
1633
  geometryUtils: {
1634
+ get indexesState() {
1635
+ return t()?.geometryUtils.indexesState ?? null;
1636
+ },
1634
1637
  getAllIds: () => t()?.geometryUtils.getAllIds() ?? [],
1635
1638
  getIfcSpacesVisibility: () => t()?.geometryUtils.getIfcSpacesVisibility() ?? !1,
1636
1639
  getModelGeometry: (e) => t()?.geometryUtils.getModelGeometry(e) ?? null,
@@ -10051,6 +10054,9 @@ function Id(e) {
10051
10054
  }, [s, m]);
10052
10055
  return {
10053
10056
  buildIndex: a,
10057
+ get indexesState() {
10058
+ return a();
10059
+ },
10054
10060
  getAllIds: o,
10055
10061
  getIfcSpacesVisibility: s,
10056
10062
  hideByIds: c,
@@ -12364,6 +12370,9 @@ function Xm({ autoFitCamera: e, cameraRef: t, controlRef: n, fitToView: r, loadG
12364
12370
  toggleNoteMode: ge.toggleNoteMode
12365
12371
  },
12366
12372
  geometryUtils: {
12373
+ get indexesState() {
12374
+ return oe.indexesState;
12375
+ },
12367
12376
  getAllIds: oe.getAllIds,
12368
12377
  getIfcSpacesVisibility: oe.getIfcSpacesVisibility,
12369
12378
  getModelGeometry: (e) => Rm(s.current, e),
@@ -1,6 +1,7 @@
1
- import type { GeometryIndexApi } from "./useGeometryIndex";
1
+ import type { GeometryIndex, GeometryIndexApi } from "./useGeometryIndex";
2
2
  export type GeometryUtilsApi = {
3
3
  buildIndex: GeometryIndexApi["buildIndex"];
4
+ readonly indexesState: GeometryIndex;
4
5
  getAllIds: () => number[];
5
6
  getIfcSpacesVisibility: () => boolean;
6
7
  hideByIds: (ids: number[]) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bimatter-viewer-react",
3
- "version": "0.11.5",
3
+ "version": "0.11.6",
4
4
  "license": "PolyForm-Noncommercial-1.0.0",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",