bimatter-viewer-react 0.6.0 → 0.6.2

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/README.md CHANGED
@@ -111,13 +111,13 @@ You can also load mixed model lists:
111
111
  />
112
112
  ```
113
113
 
114
- IFC spaces are disabled by default. Enable them per load when room volumes should be loaded as an almost-transparent gray mesh:
114
+ IFC spaces are loaded by default when the IFC contains room geometry, but they are hidden in the viewer by default. Disable loading them when room volumes are not needed:
115
115
 
116
116
  ```ts
117
117
  import { loader } from "bimatter-viewer-react";
118
118
 
119
119
  await loader.loadModel(["/models/architecture.ifc"], {
120
- useIfcSpace: true,
120
+ useIfcSpace: false,
121
121
  });
122
122
  ```
123
123
 
@@ -149,7 +149,7 @@ function App() {
149
149
  ```ts
150
150
  await loader.loadModel(["/models/model.bmt"]);
151
151
  await loader.loadModel(["/models/model.ifc"]);
152
- await loader.loadModel(["/models/model.ifc"], { useIfcSpace: true });
152
+ await loader.loadModel(["/models/model.ifc"], { useIfcSpace: false });
153
153
  await loader.loadModel(["/models/model.bmt"], { materialMode: "performance" });
154
154
  await loader.loadModel(["/models/model.bmt"], { useDoubleSideMaterial: true });
155
155
  await loader.loadModel(["/models/model.bmt", "/models/model.ifc"]);
@@ -165,7 +165,6 @@ Use `useWorker` to parse BMT and IFC models outside the main thread:
165
165
  ```ts
166
166
  const models = await loader.loadModel(["/models/model.ifc"], {
167
167
  chunk: 200,
168
- useIfcSpace: true,
169
168
  useWorker: true,
170
169
  onProgress: (event) => {
171
170
  console.log(event.phase, Math.round(event.progress * 100));
@@ -418,12 +417,11 @@ await viewerRef.current?.converter.convertIfcFileToBmt(files, {
418
417
  fileName: "converted_ifc",
419
418
  useIfcColors: true,
420
419
  useIfcElementAssembly: true,
421
- useIfcSpace: true,
422
420
  useMinVersion: true,
423
421
  });
424
422
  ```
425
423
 
426
- `useIfcColors`, `useIfcElementAssembly`, and `useIfcSpace` are used when converting IFC files directly. They do not change already loaded model data in `convertToBmt`. `useIfcSpace` loads IFCSPACE geometry as a separate almost-transparent gray mesh when the IFC contains room geometry.
424
+ `useIfcColors`, `useIfcElementAssembly`, and `useIfcSpace` are used when converting IFC files directly. They do not change already loaded model data in `convertToBmt`. `useIfcSpace` is enabled by default and loads IFCSPACE geometry as a separate almost-transparent gray mesh when the IFC contains room geometry.
427
425
 
428
426
  ## Controlled Selection
429
427
 
@@ -191720,7 +191720,7 @@ var __ = class {
191720
191720
  }, y_ = class {
191721
191721
  useIfcElemetAssembly = !1;
191722
191722
  useIfcColors = !1;
191723
- useIfcSpace = !1;
191723
+ useIfcSpace = !0;
191724
191724
  coordinationMatrix = null;
191725
191725
  parser;
191726
191726
  propertySerializer;
@@ -1,4 +1,4 @@
1
- import type { ColorRepresentation } from "three";
1
+ import type { ColorRepresentation, Group } from "three";
2
2
  import type { SelectedStore, UserDevice, ViewerGridAxesVisibility, ViewerGridAxisSide, ViewerStoreApi } from "../store/ViewerStore";
3
3
  import { type ViewerPropertiesApi } from "./ViewerPropertiesApi";
4
4
  import type { ViewerClippingApi } from "../utils/ClippingUtils";
@@ -15,6 +15,8 @@ export type ViewerSelection = Record<number, number[]>;
15
15
  export type ViewerGeometryUtilsApi = {
16
16
  getAllIds: () => number[];
17
17
  getIfcSpacesVisibility: () => boolean;
18
+ getModelGeometry: (modelID: number) => Group | null;
19
+ getModelsGeometry: () => Group[];
18
20
  hideByIds: (ids: number[]) => void;
19
21
  hideSelected: () => void;
20
22
  isolateByIds: (ids: number[]) => void;