bimatter-viewer-react 0.8.5 → 0.10.0

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.
@@ -112,6 +112,9 @@ export declare class IfcParser {
112
112
  private getTotalChunkCount;
113
113
  private emitCompletedGeometryChunk;
114
114
  private createGeometryDataFromBuilder;
115
+ private optimizeIfcGeometryData;
116
+ private mergeIfcGeometryData;
117
+ private toUint32Array;
115
118
  private getElementId;
116
119
  private getFiniteNumber;
117
120
  private getDisplayColor;
@@ -39,10 +39,24 @@ export type IfcPropertiesProgressCallback = (progress: IfcPropertiesProgressData
39
39
  export declare class PropertySerializer {
40
40
  private PropsNames;
41
41
  readonly parser: IfcAPI;
42
+ private itemPropertyCache;
43
+ private spatialLinesCache;
44
+ private spatialTreeChunksCache;
45
+ private typeNameCache;
42
46
  constructor(parser: IfcAPI);
43
47
  serializeAllProperties(modelID: number, ids: Set<number>, onProgress?: IfcPropertiesProgressCallback): Promise<BmtModelProps>;
48
+ resetCaches(): void;
44
49
  getPropertiesAsBlobs(modelID: number, ids: Set<number>, onProgress?: IfcPropertiesProgressCallback): Promise<BmtModelProps>;
45
50
  getItemProperty(modelID: number, id: number, flatten?: boolean): Promise<IfcLineData | null>;
51
+ private getItemPropertiesBatch;
52
+ private readItemProperty;
53
+ private readItemPropertiesBatch;
54
+ private prepareItemProperty;
55
+ private getItemPropertyCacheKey;
56
+ private getTypeName;
57
+ private clearPropertyCaches;
58
+ private getPropertySetData;
59
+ private readPropertySetItems;
46
60
  getElementsAssembly(modelID: number): Promise<IfcElementsAssembly>;
47
61
  private formatItemProperties;
48
62
  private getAllRelDefinesByProps;
@@ -54,10 +68,14 @@ export declare class PropertySerializer {
54
68
  private getStructureProperties;
55
69
  newIfcProject(data: IfcLineData): BmtModelStructureNode;
56
70
  newIfcItem(expressID: number): BmtModelStructureNode;
57
- getSpatialNode(modelID: number, node: BmtModelStructureNode, treeChunks: SpatialTreeChunks, includeProperties: boolean): Promise<void>;
58
- getChildren(modelID: number, node: BmtModelStructureNode, treeChunks: SpatialTreeChunks, propNames: PropertyRelationConfig, includeProperties: boolean): Promise<void>;
71
+ getSpatialNode(modelID: number, node: BmtModelStructureNode, treeChunks: SpatialTreeChunks, includeProperties: boolean, lineById: Map<number, IfcLineData | null>): Promise<void>;
72
+ getChildren(modelID: number, node: BmtModelStructureNode, treeChunks: SpatialTreeChunks, propNames: PropertyRelationConfig, includeProperties: boolean, lineById: Map<number, IfcLineData | null>): Promise<void>;
59
73
  newNode(id: number, data: IfcLineData): BmtModelStructureNode;
60
74
  getSpatialTreeChunks(modelID: number): Promise<SpatialTreeChunks>;
75
+ private readSpatialTreeChunks;
76
+ private getSpatialLineMap;
77
+ private readSpatialLineMap;
78
+ private getProjectID;
61
79
  saveChunk(chunks: SpatialTreeChunks, propNames: PropertyRelationConfig, rel: IfcLineData): void;
62
80
  private shouldEmitProgress;
63
81
  }
@@ -1,6 +1,6 @@
1
1
  import type { ColorRepresentation, Group } from "three";
2
2
  import type { SelectedStore, UserDevice, ViewerGridAxesVisibility, ViewerGridAxisSide, ViewerLightingSettings, ViewerLightingSettingsUpdate, ViewerPostproductionActivePassFilter, ViewerStoreApi } from "../store/ViewerStore";
3
- import type { ViewerCameraProjection, ViewerPostproductionPassType } from "../types";
3
+ import type { ViewerCameraProjection, ViewerFirstPersonControlSettings, ViewerPostproductionPassType } from "../types";
4
4
  import { type ViewerPropertiesApi } from "./ViewerPropertiesApi";
5
5
  import type { ViewerClippingApi } from "../utils/ClippingUtils";
6
6
  import type { ViewerColorConfigByModel, ViewerModelColorConfig } from "../utils/ColorsUtils/useElementColors";
@@ -15,7 +15,7 @@ export type { ViewerClippingApi, ViewerClippingVector3Input, } from "../utils/Cl
15
15
  export type { ViewerColorConfigByModel, ViewerModelColorConfig, } from "../utils/ColorsUtils/useElementColors";
16
16
  export type { ViewerDimensionsApi } from "../utils/DimentionsUtils";
17
17
  export type { ViewerCameraGetIntersection } from "../Camera/useCameraUtils";
18
- export type { ViewerCameraProjection } from "../types";
18
+ export type { ViewerCameraProjection, ViewerFirstPersonControlSettings, } from "../types";
19
19
  export type { ViewerPlanHandle, ViewerPlansApi, ViewerPlanVector3Input, } from "./ViewerPlansApi";
20
20
  export type ViewerSelection = Record<number, number[]>;
21
21
  export type ViewerGeometryUtilsApi = {
@@ -110,6 +110,8 @@ export type ViewerCameraApi = {
110
110
  fitCamera: () => void;
111
111
  getIntersection: ViewerCameraGetIntersection;
112
112
  getProjection: () => ViewerCameraProjection;
113
+ setFirstPersonControlActive: (active: boolean) => void;
114
+ setFirstPersonControlSettings: (settings: ViewerFirstPersonControlSettings) => void;
113
115
  setProjection: (projection: ViewerCameraProjection) => void;
114
116
  toggleProjection: () => ViewerCameraProjection;
115
117
  };
@@ -11,12 +11,19 @@ export type ViewerPlanHandle = {
11
11
  plane: Plane;
12
12
  viewer?: ViewerApi | null;
13
13
  };
14
+ export type ViewerPlanCreateOptions = {
15
+ createClippingPlane?: boolean;
16
+ };
14
17
  export type ViewerPlansSceneApi = {
15
- createPlan: (plane: Plane) => ViewerPlanHandle | null;
18
+ createPlan: (plane: Plane, viewNormal?: Vector3, options?: ViewerPlanCreateOptions) => ViewerPlanHandle | null;
19
+ };
20
+ export type ViewerPlanLocalPlaneSource = {
21
+ normal: Vector3;
22
+ pointOrZ: ViewerPlanVector3Input | number;
16
23
  };
17
- export type ViewerPlansContainerFactory = (plane: Plane, container: HTMLElement) => ViewerPlanHandle | null;
24
+ export type ViewerPlansContainerFactory = (plane: Plane, container: HTMLElement, viewNormal?: Vector3, localPlaneSource?: ViewerPlanLocalPlaneSource) => ViewerPlanHandle | null;
18
25
  export type ViewerPlansApi = {
19
- createPlan: ((plane: Plane, container?: HTMLElement) => ViewerPlanHandle | null) & ((point: ViewerPlanVector3Input, normal: ViewerPlanVector3Input, container?: HTMLElement) => ViewerPlanHandle | null) & ((zCord: number, normal: ViewerPlanVector3Input, container?: HTMLElement) => ViewerPlanHandle | null);
26
+ createPlan: ((plane: Plane, container?: HTMLElement) => ViewerPlanHandle | null) & ((plane: Plane, normal: ViewerPlanVector3Input, container?: HTMLElement) => ViewerPlanHandle | null) & ((point: ViewerPlanVector3Input, normal: ViewerPlanVector3Input, container?: HTMLElement) => ViewerPlanHandle | null) & ((point: ViewerPlanVector3Input, container?: HTMLElement) => ViewerPlanHandle | null) & ((zCord: number, normal: ViewerPlanVector3Input, container?: HTMLElement) => ViewerPlanHandle | null) & ((zCord: number, container?: HTMLElement) => ViewerPlanHandle | null);
20
27
  };
21
28
  export declare function createViewerPlanPlane(plane: Plane): Plane;
22
29
  export declare function createViewerPlanPlane(point: ViewerPlanVector3Input, normal: ViewerPlanVector3Input): Plane;