@thatopen/components 2.0.26 → 2.1.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.
@@ -1,46 +1,4 @@
1
1
  declare namespace OBC {
2
- import { Component, Disposable, World, Event } from "../Types";
3
- import { SimpleRaycaster } from "./src";
4
- import { Components } from "../Components";
5
- /**
6
- * A component that manages a raycaster for each world and automatically disposes it when its corresponding world is disposed. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/Raycasters). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/Raycasters).
7
- */
8
- export declare class Raycasters extends Component implements Disposable {
9
- /**
10
- * A unique identifier for the component.
11
- * This UUID is used to register the component within the Components system.
12
- */
13
- static readonly uuid: "d5d8bdf0-db25-4952-b951-b643af207ace";
14
- /** {@link Component.enabled} */
15
- enabled: boolean;
16
- /**
17
- * A Map that stores raycasters for each world.
18
- * The key is the world's UUID, and the value is the corresponding SimpleRaycaster instance.
19
- */
20
- list: Map<string, SimpleRaycaster>;
21
- /** {@link Disposable.onDisposed} */
22
- onDisposed: Event<unknown>;
23
- constructor(components: Components);
24
- /**
25
- * Retrieves a SimpleRaycaster instance for the given world.
26
- * If a SimpleRaycaster instance already exists for the world, it will be returned.
27
- * Otherwise, a new SimpleRaycaster instance will be created and added to the list.
28
- *
29
- * @param world - The world for which to retrieve or create a SimpleRaycaster instance.
30
- * @returns The SimpleRaycaster instance for the given world.
31
- */
32
- get(world: World): SimpleRaycaster;
33
- /**
34
- * Deletes the SimpleRaycaster instance associated with the given world.
35
- * If a SimpleRaycaster instance exists for the given world, it will be disposed and removed from the list.
36
- *
37
- * @param world - The world for which to delete the SimpleRaycaster instance.
38
- * @returns {void}
39
- */
40
- delete(world: World): void;
41
- /** {@link Disposable.dispose} */
42
- dispose(): void;
43
- }
44
2
  import { Component, Disposable, Event } from "../Types";
45
3
  /**
46
4
  * The entry point of the Components library. It can create, delete and access all the components of the library globally, update all the updatable components automatically and dispose all the components, preventing memory leaks.
@@ -49,7 +7,7 @@ export declare class Components implements Disposable {
49
7
  /**
50
8
  * The version of the @thatopen/components library.
51
9
  */
52
- static readonly release = "2.0.26";
10
+ static readonly release = "2.1.0";
53
11
  /** {@link Disposable.onDisposed} */
54
12
  readonly onDisposed: Event<void>;
55
13
  /**
@@ -162,6 +120,48 @@ export declare class Disposer extends Component {
162
120
  private disposeChildren;
163
121
  private static disposeMaterial;
164
122
  }
123
+ import { Component, Disposable, World, Event } from "../Types";
124
+ import { SimpleRaycaster } from "./src";
125
+ import { Components } from "../Components";
126
+ /**
127
+ * A component that manages a raycaster for each world and automatically disposes it when its corresponding world is disposed. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/Raycasters). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/Raycasters).
128
+ */
129
+ export declare class Raycasters extends Component implements Disposable {
130
+ /**
131
+ * A unique identifier for the component.
132
+ * This UUID is used to register the component within the Components system.
133
+ */
134
+ static readonly uuid: "d5d8bdf0-db25-4952-b951-b643af207ace";
135
+ /** {@link Component.enabled} */
136
+ enabled: boolean;
137
+ /**
138
+ * A Map that stores raycasters for each world.
139
+ * The key is the world's UUID, and the value is the corresponding SimpleRaycaster instance.
140
+ */
141
+ list: Map<string, SimpleRaycaster>;
142
+ /** {@link Disposable.onDisposed} */
143
+ onDisposed: Event<unknown>;
144
+ constructor(components: Components);
145
+ /**
146
+ * Retrieves a SimpleRaycaster instance for the given world.
147
+ * If a SimpleRaycaster instance already exists for the world, it will be returned.
148
+ * Otherwise, a new SimpleRaycaster instance will be created and added to the list.
149
+ *
150
+ * @param world - The world for which to retrieve or create a SimpleRaycaster instance.
151
+ * @returns The SimpleRaycaster instance for the given world.
152
+ */
153
+ get(world: World): SimpleRaycaster;
154
+ /**
155
+ * Deletes the SimpleRaycaster instance associated with the given world.
156
+ * If a SimpleRaycaster instance exists for the given world, it will be disposed and removed from the list.
157
+ *
158
+ * @param world - The world for which to delete the SimpleRaycaster instance.
159
+ * @returns {void}
160
+ */
161
+ delete(world: World): void;
162
+ /** {@link Disposable.dispose} */
163
+ dispose(): void;
164
+ }
165
165
  import { Component, Disposable, Updateable, World, Event, BaseScene, BaseCamera, BaseRenderer } from "../Types";
166
166
  import { Components } from "../Components";
167
167
  import { SimpleWorld } from "./src";
@@ -405,53 +405,6 @@ export declare class Clipper extends Component implements Createable, Disposable
405
405
  private _onStartDragging;
406
406
  private _onEndDragging;
407
407
  }
408
- import { MiniMap } from "./src";
409
- import { Component, Updateable, World, Event, Disposable } from "../Types";
410
- import { Components } from "../Components";
411
- /**
412
- * A component that manages multiple {@link MiniMap} instances, each associated with a unique world ID. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/MiniMap). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/MiniMaps).
413
- */
414
- export declare class MiniMaps extends Component implements Updateable, Disposable {
415
- /**
416
- * A unique identifier for the component.
417
- * This UUID is used to register the component within the Components system.
418
- */
419
- static readonly uuid: "39ad6aad-84c8-4adf-a1e0-7f25313a9e7f";
420
- /** {@link Updateable.onAfterUpdate} */
421
- readonly onAfterUpdate: Event<unknown>;
422
- /** {@link Updateable.onBeforeUpdate} */
423
- readonly onBeforeUpdate: Event<unknown>;
424
- /** {@link Disposable.onDisposed} */
425
- readonly onDisposed: Event<unknown>;
426
- /** {@link Component.enabled} */
427
- enabled: boolean;
428
- /**
429
- * A collection of {@link MiniMap} instances, each associated with a unique world ID.
430
- */
431
- list: Map<string, MiniMap>;
432
- constructor(components: Components);
433
- /**
434
- * Creates a new {@link MiniMap} instance associated with the given world.
435
- * If a {@link MiniMap} instance already exists for the given world, an error will be thrown.
436
- *
437
- * @param world - The {@link World} for which to create a {@link MiniMap} instance.
438
- * @returns The newly created {@link MiniMap} instance.
439
- * @throws Will throw an error if a {@link MiniMap} instance already exists for the given world.
440
- */
441
- create(world: World): MiniMap;
442
- /**
443
- * Deletes a {@link MiniMap} instance associated with the given world ID.
444
- * If a {@link MiniMap} instance does not exist for the given ID, nothing happens.
445
- *
446
- * @param id - The unique identifier of the world for which to delete the {@link MiniMap} instance.
447
- * @returns {void}
448
- */
449
- delete(id: string): void;
450
- /** {@link Disposable.dispose} */
451
- dispose(): void;
452
- /** {@link Updateable.update} */
453
- update(): void;
454
- }
455
408
  import { Components } from "../Components";
456
409
  import { MeshCullerRenderer, CullerRendererSettings } from "./src";
457
410
  import { Component, Event, Disposable, World } from "../Types";
@@ -500,6 +453,53 @@ export declare class Cullers extends Component implements Disposable {
500
453
  /** {@link Disposable.dispose} */
501
454
  dispose(): void;
502
455
  }
456
+ import { MiniMap } from "./src";
457
+ import { Component, Updateable, World, Event, Disposable } from "../Types";
458
+ import { Components } from "../Components";
459
+ /**
460
+ * A component that manages multiple {@link MiniMap} instances, each associated with a unique world ID. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/MiniMap). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/MiniMaps).
461
+ */
462
+ export declare class MiniMaps extends Component implements Updateable, Disposable {
463
+ /**
464
+ * A unique identifier for the component.
465
+ * This UUID is used to register the component within the Components system.
466
+ */
467
+ static readonly uuid: "39ad6aad-84c8-4adf-a1e0-7f25313a9e7f";
468
+ /** {@link Updateable.onAfterUpdate} */
469
+ readonly onAfterUpdate: Event<unknown>;
470
+ /** {@link Updateable.onBeforeUpdate} */
471
+ readonly onBeforeUpdate: Event<unknown>;
472
+ /** {@link Disposable.onDisposed} */
473
+ readonly onDisposed: Event<unknown>;
474
+ /** {@link Component.enabled} */
475
+ enabled: boolean;
476
+ /**
477
+ * A collection of {@link MiniMap} instances, each associated with a unique world ID.
478
+ */
479
+ list: Map<string, MiniMap>;
480
+ constructor(components: Components);
481
+ /**
482
+ * Creates a new {@link MiniMap} instance associated with the given world.
483
+ * If a {@link MiniMap} instance already exists for the given world, an error will be thrown.
484
+ *
485
+ * @param world - The {@link World} for which to create a {@link MiniMap} instance.
486
+ * @returns The newly created {@link MiniMap} instance.
487
+ * @throws Will throw an error if a {@link MiniMap} instance already exists for the given world.
488
+ */
489
+ create(world: World): MiniMap;
490
+ /**
491
+ * Deletes a {@link MiniMap} instance associated with the given world ID.
492
+ * If a {@link MiniMap} instance does not exist for the given ID, nothing happens.
493
+ *
494
+ * @param id - The unique identifier of the world for which to delete the {@link MiniMap} instance.
495
+ * @returns {void}
496
+ */
497
+ delete(id: string): void;
498
+ /** {@link Disposable.dispose} */
499
+ dispose(): void;
500
+ /** {@link Updateable.update} */
501
+ update(): void;
502
+ }
503
503
  import * as THREE from "three";
504
504
  import { Components } from "../Components";
505
505
  import { SimpleCamera } from "..";
@@ -772,56 +772,6 @@ export declare class BoundingBoxer extends Component implements Disposable {
772
772
  addFragmentIdMap(fragmentIdMap: FRAGS.FragmentIdMap): void;
773
773
  private static getFragmentBounds;
774
774
  }
775
- import { Component, Disposable, Event, Components } from "../../core";
776
- /**
777
- * The Exploder component is responsible for managing the explosion of 3D model fragments (generally by floor). 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/Exploder). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/Exploder).
778
- */
779
- export declare class Exploder extends Component implements Disposable {
780
- /**
781
- * A unique identifier for the component.
782
- * This UUID is used to register the component within the Components system.
783
- */
784
- static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
785
- /** {@link Disposable.onDisposed} */
786
- readonly onDisposed: Event<unknown>;
787
- /** {@link Component.enabled} */
788
- enabled: boolean;
789
- /**
790
- * The height of the explosion animation.
791
- * This property determines the vertical distance by which fragments are moved during the explosion.
792
- * Default value is 10.
793
- */
794
- height: number;
795
- /**
796
- * The group name used for the explosion animation.
797
- * This property specifies the group of fragments that will be affected by the explosion.
798
- * Default value is "storeys".
799
- */
800
- groupName: string;
801
- /**
802
- * A set of strings representing the exploded items.
803
- * This set is used to keep track of which items have been exploded.
804
- */
805
- list: Set<string>;
806
- constructor(components: Components);
807
- /** {@link Disposable.dispose} */
808
- dispose(): void;
809
- /**
810
- * Sets the explosion state of the fragments.
811
- *
812
- * @param active - A boolean indicating whether to activate or deactivate the explosion.
813
- *
814
- * @remarks
815
- * This method applies a vertical transformation to the fragments based on the 'active' parameter.
816
- * If 'active' is true, the fragments are moved upwards by a distance determined by the 'height' property.
817
- * If 'active' is false, the fragments are moved back to their original position.
818
- *
819
- * The method also keeps track of the exploded items using the 'list' set.
820
- *
821
- * @throws Will throw an error if the 'Classifier' or 'FragmentsManager' components are not found in the 'components' system.
822
- */
823
- set(active: boolean): void;
824
- }
825
775
  import * as THREE from "three";
826
776
  import * as FRAGS from "@thatopen/fragments";
827
777
  import { Disposable, Component, Event, Components } from "../../core";
@@ -1024,117 +974,55 @@ export declare class Hider extends Component {
1024
974
  isolate(items: FRAGS.FragmentIdMap): void;
1025
975
  private updateCulledVisibility;
1026
976
  }
1027
- import { Fragment, FragmentsGroup } from "@thatopen/fragments";
1028
- import * as THREE from "three";
1029
- import * as FRAGS from "@thatopen/fragments";
1030
- import { Component, Components, Event, Disposable } from "../../core";
1031
- import { RelationsMap } from "../../ifc/IfcRelationsIndexer/src/types";
977
+ import { Component, Disposable, Event, Components } from "../../core";
1032
978
  /**
1033
- * Component to load, delete and manage [fragments](https://github.com/ThatOpen/engine_fragment) efficiently. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/FragmentsManager). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/FragmentsManager).
979
+ * The Exploder component is responsible for managing the explosion of 3D model fragments (generally by floor). 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/Exploder). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/Exploder).
1034
980
  */
1035
- export declare class FragmentsManager extends Component implements Disposable {
981
+ export declare class Exploder extends Component implements Disposable {
1036
982
  /**
1037
983
  * A unique identifier for the component.
1038
984
  * This UUID is used to register the component within the Components system.
1039
985
  */
1040
- static readonly uuid: "fef46874-46a3-461b-8c44-2922ab77c806";
986
+ static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
1041
987
  /** {@link Disposable.onDisposed} */
1042
988
  readonly onDisposed: Event<unknown>;
989
+ /** {@link Component.enabled} */
990
+ enabled: boolean;
1043
991
  /**
1044
- * Event triggered when fragments are loaded.
992
+ * The height of the explosion animation.
993
+ * This property determines the vertical distance by which fragments are moved during the explosion.
994
+ * Default value is 10.
1045
995
  */
1046
- readonly onFragmentsLoaded: Event<FragmentsGroup>;
996
+ height: number;
1047
997
  /**
1048
- * Event triggered when fragments are disposed.
998
+ * The group name used for the explosion animation.
999
+ * This property specifies the group of fragments that will be affected by the explosion.
1000
+ * Default value is "storeys".
1049
1001
  */
1050
- readonly onFragmentsDisposed: Event<{
1051
- groupID: string;
1052
- fragmentIDs: string[];
1053
- }>;
1054
- /**
1055
- * Map containing all loaded fragments.
1056
- * The key is the fragment's unique identifier, and the value is the fragment itself.
1057
- */
1058
- readonly list: Map<string, Fragment>;
1059
- /**
1060
- * Map containing all loaded fragment groups.
1061
- * The key is the group's unique identifier, and the value is the group itself.
1062
- */
1063
- readonly groups: Map<string, FragmentsGroup>;
1064
- baseCoordinationModel: string;
1065
- /** {@link Component.enabled} */
1066
- enabled: boolean;
1067
- private _loader;
1002
+ groupName: string;
1068
1003
  /**
1069
- * Getter for the meshes of all fragments in the FragmentsManager.
1070
- * It iterates over the fragments in the list and pushes their meshes into an array.
1071
- * @returns {THREE.Mesh[]} An array of THREE.Mesh objects representing the fragments.
1004
+ * A set of strings representing the exploded items.
1005
+ * This set is used to keep track of which items have been exploded.
1072
1006
  */
1073
- get meshes(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>[];
1007
+ list: Set<string>;
1074
1008
  constructor(components: Components);
1075
1009
  /** {@link Disposable.dispose} */
1076
1010
  dispose(): void;
1077
1011
  /**
1078
- * Dispose of a specific fragment group.
1079
- * This method removes the group from the groups map, deletes all fragments within the group from the list,
1080
- * disposes of the group, and triggers the onFragmentsDisposed event.
1012
+ * Sets the explosion state of the fragments.
1013
+ *
1014
+ * @param active - A boolean indicating whether to activate or deactivate the explosion.
1081
1015
  *
1082
- * @param group - The fragment group to be disposed.
1083
- */
1084
- disposeGroup(group: FragmentsGroup): void;
1085
- /**
1086
- * Loads a binary file that contain fragment geometry.
1087
- * @param data - The binary data to load.
1088
- * @param config - Optional configuration for loading.
1089
- * @param config.coordinate - Whether to apply coordinate transformation. Default is true.
1090
- * @param config.properties - Ifc properties to set on the loaded fragments. Not to be used when streaming.
1091
- * @returns The loaded FragmentsGroup.
1092
- */
1093
- load(data: Uint8Array, config?: Partial<{
1094
- coordinate: boolean;
1095
- name: string;
1096
- properties: FRAGS.IfcProperties;
1097
- relationsMap: RelationsMap;
1098
- }>): FragmentsGroup;
1099
- /**
1100
- * Export the specified fragmentsgroup to binary data.
1101
- * @param group - the fragments group to be exported.
1102
- * @returns the exported data as binary buffer.
1103
- */
1104
- export(group: FragmentsGroup): Uint8Array;
1105
- /**
1106
- * Gets a map of model IDs to sets of express IDs for the given fragment ID map.
1107
- * @param fragmentIdMap - A map of fragment IDs to their corresponding express IDs.
1108
- * @returns A map of model IDs to sets of express IDs.
1109
- */
1110
- getModelIdMap(fragmentIdMap: FRAGS.FragmentIdMap): {
1111
- [modelID: string]: Set<number>;
1112
- };
1113
- /**
1114
- * Converts a map of model IDs to sets of express IDs to a fragment ID map.
1115
- * @param modelIdMap - A map of model IDs to their corresponding express IDs.
1116
- * @returns A fragment ID map.
1117
1016
  * @remarks
1118
- * This method iterates through the provided model ID map, retrieves the corresponding model from the 'groups' map,
1119
- * and then calls the 'getFragmentMap' method of the model to obtain a fragment ID map for the given express IDs.
1120
- * The fragment ID maps are then merged into a single map and returned.
1121
- * If a model with a given ID is not found in the 'groups' map, the method skips that model and continues with the next one.
1122
- */
1123
- modelIdToFragmentIdMap(modelIdMap: {
1124
- [modelID: string]: Set<number>;
1125
- }): FRAGS.FragmentIdMap;
1126
- /**
1127
- * Applies coordinate transformation to the provided models.
1128
- * If no models are provided, all groups are used.
1129
- * The first model in the list becomes the base model for coordinate transformation.
1130
- * All other models are then transformed to match the base model's coordinate system.
1017
+ * This method applies a vertical transformation to the fragments based on the 'active' parameter.
1018
+ * If 'active' is true, the fragments are moved upwards by a distance determined by the 'height' property.
1019
+ * If 'active' is false, the fragments are moved back to their original position.
1131
1020
  *
1132
- * @param models - The models to apply coordinate transformation to.
1133
- * If not provided, all groups are used.
1021
+ * The method also keeps track of the exploded items using the 'list' set.
1134
1022
  *
1135
- * @returns {void}
1023
+ * @throws Will throw an error if the 'Classifier' or 'FragmentsManager' components are not found in the 'components' system.
1136
1024
  */
1137
- coordinate(models?: FragmentsGroup[]): void;
1025
+ set(active: boolean): void;
1138
1026
  }
1139
1027
  import * as WEBIFC from "web-ifc";
1140
1028
  import * as FRAGS from "@thatopen/fragments";
@@ -1251,6 +1139,118 @@ export declare class IfcLoader extends Component implements Disposable {
1251
1139
  private getGeometry;
1252
1140
  private autoSetWasm;
1253
1141
  }
1142
+ import { Fragment, FragmentsGroup } from "@thatopen/fragments";
1143
+ import * as THREE from "three";
1144
+ import * as FRAGS from "@thatopen/fragments";
1145
+ import { Component, Components, Event, Disposable } from "../../core";
1146
+ import { RelationsMap } from "../../ifc/IfcRelationsIndexer/src/types";
1147
+ /**
1148
+ * Component to load, delete and manage [fragments](https://github.com/ThatOpen/engine_fragment) efficiently. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/FragmentsManager). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/FragmentsManager).
1149
+ */
1150
+ export declare class FragmentsManager extends Component implements Disposable {
1151
+ /**
1152
+ * A unique identifier for the component.
1153
+ * This UUID is used to register the component within the Components system.
1154
+ */
1155
+ static readonly uuid: "fef46874-46a3-461b-8c44-2922ab77c806";
1156
+ /** {@link Disposable.onDisposed} */
1157
+ readonly onDisposed: Event<unknown>;
1158
+ /**
1159
+ * Event triggered when fragments are loaded.
1160
+ */
1161
+ readonly onFragmentsLoaded: Event<FragmentsGroup>;
1162
+ /**
1163
+ * Event triggered when fragments are disposed.
1164
+ */
1165
+ readonly onFragmentsDisposed: Event<{
1166
+ groupID: string;
1167
+ fragmentIDs: string[];
1168
+ }>;
1169
+ /**
1170
+ * Map containing all loaded fragments.
1171
+ * The key is the fragment's unique identifier, and the value is the fragment itself.
1172
+ */
1173
+ readonly list: Map<string, Fragment>;
1174
+ /**
1175
+ * Map containing all loaded fragment groups.
1176
+ * The key is the group's unique identifier, and the value is the group itself.
1177
+ */
1178
+ readonly groups: Map<string, FragmentsGroup>;
1179
+ baseCoordinationModel: string;
1180
+ /** {@link Component.enabled} */
1181
+ enabled: boolean;
1182
+ private _loader;
1183
+ /**
1184
+ * Getter for the meshes of all fragments in the FragmentsManager.
1185
+ * It iterates over the fragments in the list and pushes their meshes into an array.
1186
+ * @returns {THREE.Mesh[]} An array of THREE.Mesh objects representing the fragments.
1187
+ */
1188
+ get meshes(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>[];
1189
+ constructor(components: Components);
1190
+ /** {@link Disposable.dispose} */
1191
+ dispose(): void;
1192
+ /**
1193
+ * Dispose of a specific fragment group.
1194
+ * This method removes the group from the groups map, deletes all fragments within the group from the list,
1195
+ * disposes of the group, and triggers the onFragmentsDisposed event.
1196
+ *
1197
+ * @param group - The fragment group to be disposed.
1198
+ */
1199
+ disposeGroup(group: FragmentsGroup): void;
1200
+ /**
1201
+ * Loads a binary file that contain fragment geometry.
1202
+ * @param data - The binary data to load.
1203
+ * @param config - Optional configuration for loading.
1204
+ * @param config.coordinate - Whether to apply coordinate transformation. Default is true.
1205
+ * @param config.properties - Ifc properties to set on the loaded fragments. Not to be used when streaming.
1206
+ * @returns The loaded FragmentsGroup.
1207
+ */
1208
+ load(data: Uint8Array, config?: Partial<{
1209
+ coordinate: boolean;
1210
+ name: string;
1211
+ properties: FRAGS.IfcProperties;
1212
+ relationsMap: RelationsMap;
1213
+ }>): FragmentsGroup;
1214
+ /**
1215
+ * Export the specified fragmentsgroup to binary data.
1216
+ * @param group - the fragments group to be exported.
1217
+ * @returns the exported data as binary buffer.
1218
+ */
1219
+ export(group: FragmentsGroup): Uint8Array;
1220
+ /**
1221
+ * Gets a map of model IDs to sets of express IDs for the given fragment ID map.
1222
+ * @param fragmentIdMap - A map of fragment IDs to their corresponding express IDs.
1223
+ * @returns A map of model IDs to sets of express IDs.
1224
+ */
1225
+ getModelIdMap(fragmentIdMap: FRAGS.FragmentIdMap): {
1226
+ [modelID: string]: Set<number>;
1227
+ };
1228
+ /**
1229
+ * Converts a map of model IDs to sets of express IDs to a fragment ID map.
1230
+ * @param modelIdMap - A map of model IDs to their corresponding express IDs.
1231
+ * @returns A fragment ID map.
1232
+ * @remarks
1233
+ * This method iterates through the provided model ID map, retrieves the corresponding model from the 'groups' map,
1234
+ * and then calls the 'getFragmentMap' method of the model to obtain a fragment ID map for the given express IDs.
1235
+ * The fragment ID maps are then merged into a single map and returned.
1236
+ * If a model with a given ID is not found in the 'groups' map, the method skips that model and continues with the next one.
1237
+ */
1238
+ modelIdToFragmentIdMap(modelIdMap: {
1239
+ [modelID: string]: Set<number>;
1240
+ }): FRAGS.FragmentIdMap;
1241
+ /**
1242
+ * Applies coordinate transformation to the provided models.
1243
+ * If no models are provided, all groups are used.
1244
+ * The first model in the list becomes the base model for coordinate transformation.
1245
+ * All other models are then transformed to match the base model's coordinate system.
1246
+ *
1247
+ * @param models - The models to apply coordinate transformation to.
1248
+ * If not provided, all groups are used.
1249
+ *
1250
+ * @returns {void}
1251
+ */
1252
+ coordinate(models?: FragmentsGroup[]): void;
1253
+ }
1254
1254
  import * as WEBIFC from "web-ifc";
1255
1255
  import { Components, Disposable, Event, Component } from "../../core";
1256
1256
  import { IfcStreamingSettings, StreamedGeometries, StreamedAsset } from "./src";
@@ -1414,14 +1414,6 @@ export declare class IfcPropertiesTiler extends Component implements Disposable
1414
1414
  private streamAllProperties;
1415
1415
  private cleanUp;
1416
1416
  }
1417
- import * as THREE from "three";
1418
- export declare function obbFromPoints(vertices: ArrayLike<number>): {
1419
- center: THREE.Vector3;
1420
- halfSizes: THREE.Vector3;
1421
- rotation: THREE.Matrix3;
1422
- transformation: THREE.Matrix4;
1423
- };
1424
- export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
1425
1417
  import * as WEBIFC from "web-ifc";
1426
1418
  import * as FRAG from "@thatopen/fragments";
1427
1419
  import { Component, Components } from "../../core";
@@ -1447,163 +1439,41 @@ export declare class IfcJsonExporter extends Component {
1447
1439
  */
1448
1440
  export(webIfc: WEBIFC.IfcAPI, modelID: number, indirect?: boolean, recursiveSpatial?: boolean): Promise<FRAG.IfcProperties>;
1449
1441
  }
1450
- import * as THREE from "three";
1451
- export declare class MaterialsUtils {
1452
- static isTransparent(material: THREE.Material): boolean;
1453
- }
1454
- export declare class UUID {
1455
- private static _pattern;
1456
- private static _lut;
1457
- static create(): string;
1458
- static validate(uuid: string): void;
1459
- }
1460
- import * as THREE from "three";
1461
- import { Component, Components, Disposable, Event, World } from "../core";
1442
+ import * as WEBIFC from "web-ifc";
1443
+ import { FragmentsGroup } from "@thatopen/fragments";
1444
+ import { Disposable, Event, Component, Components } from "../../core";
1445
+ import { RelationsMap, ModelsRelationMap, InverseAttribute } from "./src/types";
1446
+ export type { InverseAttribute, RelationsMap } from "./src/types";
1462
1447
  /**
1463
- * Configuration interface for the VertexPicker component.
1448
+ * Indexer component for IFC entities, facilitating the indexing and retrieval of IFC entity relationships. It is designed to process models properties by indexing their IFC entities' relations based on predefined inverse attributes, and provides methods to query these relations. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/IfcRelationsIndexer). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/IfcRelationsIndexer).
1464
1449
  */
1465
- export interface VertexPickerConfig {
1450
+ export declare class IfcRelationsIndexer extends Component implements Disposable {
1466
1451
  /**
1467
- * If true, only vertices will be picked, not the closest point on the face.
1452
+ * A unique identifier for the component.
1453
+ * This UUID is used to register the component within the Components system.
1468
1454
  */
1469
- showOnlyVertex: boolean;
1455
+ static readonly uuid: "23a889ab-83b3-44a4-8bee-ead83438370b";
1456
+ /** {@link Disposable.onDisposed} */
1457
+ readonly onDisposed: Event<string>;
1470
1458
  /**
1471
- * The maximum distance for snapping to a vertex.
1459
+ * Event triggered when relations for a model have been indexed.
1460
+ * This event provides the model's UUID and the relations map generated for that model.
1461
+ *
1462
+ * @property {string} modelID - The UUID of the model for which relations have been indexed.
1463
+ * @property {RelationsMap} relationsMap - The relations map generated for the specified model.
1464
+ * The map keys are expressIDs of entities, and the values are maps where each key is a relation type ID and its value is an array of expressIDs of entities related through that relation type.
1472
1465
  */
1473
- snapDistance: number;
1466
+ readonly onRelationsIndexed: Event<{
1467
+ modelID: string;
1468
+ relationsMap: RelationsMap;
1469
+ }>;
1474
1470
  /**
1475
- * The HTML element to use for previewing the picked vertex.
1476
- */
1477
- previewElement: HTMLElement;
1478
- }
1479
- /**
1480
- * A class that provides functionality for picking vertices in a 3D scene.
1481
- */
1482
- export declare class VertexPicker extends Component implements Disposable {
1483
- /** {@link Disposable.onDisposed} */
1484
- readonly onDisposed: Event<unknown>;
1485
- /**
1486
- * An event that is triggered when a vertex is found.
1487
- * The event passes a THREE.Vector3 representing the position of the found vertex.
1488
- */
1489
- readonly onVertexFound: Event<THREE.Vector3>;
1490
- /**
1491
- * An event that is triggered when a vertex is lost.
1492
- * The event passes a THREE.Vector3 representing the position of the lost vertex.
1493
- */
1494
- readonly onVertexLost: Event<THREE.Vector3>;
1495
- /**
1496
- * A reference to the Components instance associated with this VertexPicker.
1497
- */
1498
- components: Components;
1499
- /**
1500
- * A reference to the working plane used for vertex picking.
1501
- * This plane is used to determine which vertices are considered valid for picking.
1502
- * If this value is null, all vertices are considered valid.
1503
- */
1504
- workingPlane: THREE.Plane | null;
1505
- private _pickedPoint;
1506
- private _config;
1507
- private _enabled;
1508
- /**
1509
- * Sets the enabled state of the VertexPicker.
1510
- * When enabled, the VertexPicker will actively search for vertices in the 3D scene.
1511
- * When disabled, the VertexPicker will stop searching for vertices and reset the picked point.
1512
- *
1513
- * @param value - The new enabled state.
1514
- */
1515
- set enabled(value: boolean);
1516
- /**
1517
- * Gets the current enabled state of the VertexPicker.
1518
- *
1519
- * @returns The current enabled state.
1520
- */
1521
- get enabled(): boolean;
1522
- /**
1523
- * Sets the configuration for the VertexPicker component.
1524
- *
1525
- * @param value - A Partial object containing the configuration properties to update.
1526
- * The properties not provided in the value object will retain their current values.
1527
- *
1528
- * @example
1529
- * '''typescript
1530
- * vertexPicker.config = {
1531
- * snapDistance: 0.5,
1532
- * showOnlyVertex: true,
1533
- * };
1534
- * '''
1535
- */
1536
- set config(value: Partial<VertexPickerConfig>);
1537
- /**
1538
- * Gets the current configuration for the VertexPicker component.
1539
- *
1540
- * @returns A copy of the current VertexPickerConfig object.
1541
- *
1542
- * @example
1543
- * '''typescript
1544
- * const currentConfig = vertexPicker.config;
1545
- * console.log(currentConfig.snapDistance); // Output: 0.25
1546
- * '''
1547
- */
1548
- get config(): Partial<VertexPickerConfig>;
1549
- constructor(components: Components, config?: Partial<VertexPickerConfig>);
1550
- /** {@link Disposable.dispose} */
1551
- dispose(): void;
1552
- /**
1553
- * Performs the vertex picking operation based on the current state of the VertexPicker.
1554
- *
1555
- * @param world - The World instance to use for raycasting.
1556
- *
1557
- * @returns The current picked point, or null if no point is picked.
1558
- *
1559
- * @remarks
1560
- * This method checks if the VertexPicker is enabled. If not, it returns the current picked point.
1561
- * If enabled, it performs raycasting to find the closest intersecting object.
1562
- * It then determines the closest vertex or point on the face, based on the configuration settings.
1563
- * If the picked point is on the working plane (if defined), it triggers the 'onVertexFound' event and updates the 'pickedPoint'.
1564
- * If the picked point is not on the working plane, it resets the 'pickedPoint'.
1565
- * If no intersecting object is found, it triggers the 'onVertexLost' event and resets the 'pickedPoint'.
1566
- */
1567
- get(world: World): THREE.Vector3 | null;
1568
- private getClosestVertex;
1569
- private getVertices;
1570
- private getVertex;
1571
- }
1572
- import * as WEBIFC from "web-ifc";
1573
- import { FragmentsGroup } from "@thatopen/fragments";
1574
- import { Disposable, Event, Component, Components } from "../../core";
1575
- import { RelationsMap, ModelsRelationMap, InverseAttribute } from "./src/types";
1576
- export type { InverseAttribute, RelationsMap } from "./src/types";
1577
- /**
1578
- * Indexer component for IFC entities, facilitating the indexing and retrieval of IFC entity relationships. It is designed to process models properties by indexing their IFC entities' relations based on predefined inverse attributes, and provides methods to query these relations. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/IfcRelationsIndexer). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/IfcRelationsIndexer).
1579
- */
1580
- export declare class IfcRelationsIndexer extends Component implements Disposable {
1581
- /**
1582
- * A unique identifier for the component.
1583
- * This UUID is used to register the component within the Components system.
1584
- */
1585
- static readonly uuid: "23a889ab-83b3-44a4-8bee-ead83438370b";
1586
- /** {@link Disposable.onDisposed} */
1587
- readonly onDisposed: Event<string>;
1588
- /**
1589
- * Event triggered when relations for a model have been indexed.
1590
- * This event provides the model's UUID and the relations map generated for that model.
1591
- *
1592
- * @property {string} modelID - The UUID of the model for which relations have been indexed.
1593
- * @property {RelationsMap} relationsMap - The relations map generated for the specified model.
1594
- * The map keys are expressIDs of entities, and the values are maps where each key is a relation type ID and its value is an array of expressIDs of entities related through that relation type.
1595
- */
1596
- readonly onRelationsIndexed: Event<{
1597
- modelID: string;
1598
- relationsMap: RelationsMap;
1599
- }>;
1600
- /**
1601
- * Holds the relationship mappings for each model processed by the indexer.
1602
- * The structure is a map where each key is a model's UUID, and the value is another map.
1603
- * This inner map's keys are entity expressIDs, and its values are maps where each key is an index
1604
- * representing a specific relation type, and the value is an array of expressIDs of entities
1605
- * that are related through that relation type. This structure allows for efficient querying
1606
- * of entity relationships within a model.
1471
+ * Holds the relationship mappings for each model processed by the indexer.
1472
+ * The structure is a map where each key is a model's UUID, and the value is another map.
1473
+ * This inner map's keys are entity expressIDs, and its values are maps where each key is an index
1474
+ * representing a specific relation type, and the value is an array of expressIDs of entities
1475
+ * that are related through that relation type. This structure allows for efficient querying
1476
+ * of entity relationships within a model.
1607
1477
  */
1608
1478
  readonly relationMaps: ModelsRelationMap;
1609
1479
  /** {@link Component.enabled} */
@@ -2071,86 +1941,212 @@ export declare class MeasurementUtils extends Component {
2071
1941
  private getVolumeOfMesh;
2072
1942
  private getSignedVolumeOfTriangle;
2073
1943
  }
2074
- /**
2075
- * A Set of unique numbers representing different types of IFC geometries.
2076
- */
2077
- export declare const GeometryTypes: Set<number>;
2078
1944
  import * as THREE from "three";
2079
- import { Resizeable, Updateable, World, Event, Disposable } from "../../Types";
1945
+ export declare function obbFromPoints(vertices: ArrayLike<number>): {
1946
+ center: THREE.Vector3;
1947
+ halfSizes: THREE.Vector3;
1948
+ rotation: THREE.Matrix3;
1949
+ transformation: THREE.Matrix4;
1950
+ };
1951
+ export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
1952
+ import * as THREE from "three";
1953
+ export declare class MaterialsUtils {
1954
+ static isTransparent(material: THREE.Material): boolean;
1955
+ }
1956
+ export declare class UUID {
1957
+ private static _pattern;
1958
+ private static _lut;
1959
+ static create(): string;
1960
+ static validate(uuid: string): void;
1961
+ }
1962
+ import * as THREE from "three";
1963
+ import { Component, Components, Disposable, Event, World } from "../core";
2080
1964
  /**
2081
- * A class representing a 2D minimap of a 3D world.
1965
+ * Configuration interface for the VertexPicker component.
2082
1966
  */
2083
- export declare class MiniMap implements Resizeable, Updateable, Disposable {
2084
- /** {@link Disposable.onDisposed} */
2085
- readonly onDisposed: Event<unknown>;
2086
- /** {@link Updateable.onAfterUpdate} */
2087
- readonly onAfterUpdate: Event<unknown>;
2088
- /** {@link Updateable.onBeforeUpdate} */
2089
- readonly onBeforeUpdate: Event<unknown>;
2090
- /** {@link Resizeable.onResize} */
2091
- readonly onResize: Event<THREE.Vector2>;
1967
+ export interface VertexPickerConfig {
2092
1968
  /**
2093
- * The front offset of the minimap.
2094
- * It determines how much the minimap's view is offset from the camera's view.
2095
- * By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
1969
+ * If true, only vertices will be picked, not the closest point on the face.
2096
1970
  */
2097
- frontOffset: number;
1971
+ showOnlyVertex: boolean;
2098
1972
  /**
2099
- * The override material for the minimap.
2100
- * It is used to render the depth information of the world onto the minimap.
1973
+ * The maximum distance for snapping to a vertex.
2101
1974
  */
2102
- overrideMaterial: THREE.MeshDepthMaterial;
1975
+ snapDistance: number;
2103
1976
  /**
2104
- * The background color of the minimap.
2105
- * It is used to set the background color of the minimap's renderer.
1977
+ * The HTML element to use for previewing the picked vertex.
2106
1978
  */
2107
- backgroundColor: THREE.Color;
1979
+ previewElement: HTMLElement;
1980
+ }
1981
+ /**
1982
+ * A class that provides functionality for picking vertices in a 3D scene.
1983
+ */
1984
+ export declare class VertexPicker extends Component implements Disposable {
1985
+ /** {@link Disposable.onDisposed} */
1986
+ readonly onDisposed: Event<unknown>;
2108
1987
  /**
2109
- * The WebGL renderer for the minimap.
2110
- * It is used to render the minimap onto the screen.
1988
+ * An event that is triggered when a vertex is found.
1989
+ * The event passes a THREE.Vector3 representing the position of the found vertex.
2111
1990
  */
2112
- renderer: THREE.WebGLRenderer;
1991
+ readonly onVertexFound: Event<THREE.Vector3>;
2113
1992
  /**
2114
- * A flag indicating whether the minimap is enabled.
2115
- * If disabled, the minimap will not update or render.
1993
+ * An event that is triggered when a vertex is lost.
1994
+ * The event passes a THREE.Vector3 representing the position of the lost vertex.
2116
1995
  */
2117
- enabled: boolean;
1996
+ readonly onVertexLost: Event<THREE.Vector3>;
2118
1997
  /**
2119
- * The world in which the minimap is displayed.
2120
- * It provides access to the 3D scene, camera, and other relevant world elements.
1998
+ * A reference to the Components instance associated with this VertexPicker.
2121
1999
  */
2122
- world: World;
2123
- private _lockRotation;
2124
- private _camera;
2125
- private _plane;
2126
- private _size;
2127
- private _tempVector1;
2128
- private _tempVector2;
2129
- private _tempTarget;
2130
- private readonly down;
2000
+ components: Components;
2131
2001
  /**
2132
- * Gets or sets whether the minimap rotation is locked.
2133
- * When rotation is locked, the minimap will always face the same direction as the camera.
2002
+ * A reference to the working plane used for vertex picking.
2003
+ * This plane is used to determine which vertices are considered valid for picking.
2004
+ * If this value is null, all vertices are considered valid.
2134
2005
  */
2135
- get lockRotation(): boolean;
2006
+ workingPlane: THREE.Plane | null;
2007
+ private _pickedPoint;
2008
+ private _config;
2009
+ private _enabled;
2136
2010
  /**
2137
- * Sets whether the minimap rotation is locked.
2138
- * When rotation is locked, the minimap will always face the same direction as the camera.
2139
- * @param active - If 'true', rotation is locked. If 'false', rotation is not locked.
2011
+ * Sets the enabled state of the VertexPicker.
2012
+ * When enabled, the VertexPicker will actively search for vertices in the 3D scene.
2013
+ * When disabled, the VertexPicker will stop searching for vertices and reset the picked point.
2014
+ *
2015
+ * @param value - The new enabled state.
2140
2016
  */
2141
- set lockRotation(active: boolean);
2017
+ set enabled(value: boolean);
2142
2018
  /**
2143
- * Gets the current zoom level of the minimap.
2144
- * The zoom level determines how much of the world is visible on the minimap.
2145
- * @returns The current zoom level of the minimap.
2019
+ * Gets the current enabled state of the VertexPicker.
2020
+ *
2021
+ * @returns The current enabled state.
2146
2022
  */
2147
- get zoom(): number;
2023
+ get enabled(): boolean;
2148
2024
  /**
2149
- * Sets the zoom level of the minimap.
2150
- * The zoom level determines how much of the world is visible on the minimap.
2151
- * @param value - The new zoom level of the minimap.
2025
+ * Sets the configuration for the VertexPicker component.
2026
+ *
2027
+ * @param value - A Partial object containing the configuration properties to update.
2028
+ * The properties not provided in the value object will retain their current values.
2029
+ *
2030
+ * @example
2031
+ * '''typescript
2032
+ * vertexPicker.config = {
2033
+ * snapDistance: 0.5,
2034
+ * showOnlyVertex: true,
2035
+ * };
2036
+ * '''
2152
2037
  */
2153
- set zoom(value: number);
2038
+ set config(value: Partial<VertexPickerConfig>);
2039
+ /**
2040
+ * Gets the current configuration for the VertexPicker component.
2041
+ *
2042
+ * @returns A copy of the current VertexPickerConfig object.
2043
+ *
2044
+ * @example
2045
+ * '''typescript
2046
+ * const currentConfig = vertexPicker.config;
2047
+ * console.log(currentConfig.snapDistance); // Output: 0.25
2048
+ * '''
2049
+ */
2050
+ get config(): Partial<VertexPickerConfig>;
2051
+ constructor(components: Components, config?: Partial<VertexPickerConfig>);
2052
+ /** {@link Disposable.dispose} */
2053
+ dispose(): void;
2054
+ /**
2055
+ * Performs the vertex picking operation based on the current state of the VertexPicker.
2056
+ *
2057
+ * @param world - The World instance to use for raycasting.
2058
+ *
2059
+ * @returns The current picked point, or null if no point is picked.
2060
+ *
2061
+ * @remarks
2062
+ * This method checks if the VertexPicker is enabled. If not, it returns the current picked point.
2063
+ * If enabled, it performs raycasting to find the closest intersecting object.
2064
+ * It then determines the closest vertex or point on the face, based on the configuration settings.
2065
+ * If the picked point is on the working plane (if defined), it triggers the 'onVertexFound' event and updates the 'pickedPoint'.
2066
+ * If the picked point is not on the working plane, it resets the 'pickedPoint'.
2067
+ * If no intersecting object is found, it triggers the 'onVertexLost' event and resets the 'pickedPoint'.
2068
+ */
2069
+ get(world: World): THREE.Vector3 | null;
2070
+ private getClosestVertex;
2071
+ private getVertices;
2072
+ private getVertex;
2073
+ }
2074
+ import * as THREE from "three";
2075
+ import { Resizeable, Updateable, World, Event, Disposable } from "../../Types";
2076
+ /**
2077
+ * A class representing a 2D minimap of a 3D world.
2078
+ */
2079
+ export declare class MiniMap implements Resizeable, Updateable, Disposable {
2080
+ /** {@link Disposable.onDisposed} */
2081
+ readonly onDisposed: Event<unknown>;
2082
+ /** {@link Updateable.onAfterUpdate} */
2083
+ readonly onAfterUpdate: Event<unknown>;
2084
+ /** {@link Updateable.onBeforeUpdate} */
2085
+ readonly onBeforeUpdate: Event<unknown>;
2086
+ /** {@link Resizeable.onResize} */
2087
+ readonly onResize: Event<THREE.Vector2>;
2088
+ /**
2089
+ * The front offset of the minimap.
2090
+ * It determines how much the minimap's view is offset from the camera's view.
2091
+ * By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
2092
+ */
2093
+ frontOffset: number;
2094
+ /**
2095
+ * The override material for the minimap.
2096
+ * It is used to render the depth information of the world onto the minimap.
2097
+ */
2098
+ overrideMaterial: THREE.MeshDepthMaterial;
2099
+ /**
2100
+ * The background color of the minimap.
2101
+ * It is used to set the background color of the minimap's renderer.
2102
+ */
2103
+ backgroundColor: THREE.Color;
2104
+ /**
2105
+ * The WebGL renderer for the minimap.
2106
+ * It is used to render the minimap onto the screen.
2107
+ */
2108
+ renderer: THREE.WebGLRenderer;
2109
+ /**
2110
+ * A flag indicating whether the minimap is enabled.
2111
+ * If disabled, the minimap will not update or render.
2112
+ */
2113
+ enabled: boolean;
2114
+ /**
2115
+ * The world in which the minimap is displayed.
2116
+ * It provides access to the 3D scene, camera, and other relevant world elements.
2117
+ */
2118
+ world: World;
2119
+ private _lockRotation;
2120
+ private _camera;
2121
+ private _plane;
2122
+ private _size;
2123
+ private _tempVector1;
2124
+ private _tempVector2;
2125
+ private _tempTarget;
2126
+ private readonly down;
2127
+ /**
2128
+ * Gets or sets whether the minimap rotation is locked.
2129
+ * When rotation is locked, the minimap will always face the same direction as the camera.
2130
+ */
2131
+ get lockRotation(): boolean;
2132
+ /**
2133
+ * Sets whether the minimap rotation is locked.
2134
+ * When rotation is locked, the minimap will always face the same direction as the camera.
2135
+ * @param active - If 'true', rotation is locked. If 'false', rotation is not locked.
2136
+ */
2137
+ set lockRotation(active: boolean);
2138
+ /**
2139
+ * Gets the current zoom level of the minimap.
2140
+ * The zoom level determines how much of the world is visible on the minimap.
2141
+ * @returns The current zoom level of the minimap.
2142
+ */
2143
+ get zoom(): number;
2144
+ /**
2145
+ * Sets the zoom level of the minimap.
2146
+ * The zoom level determines how much of the world is visible on the minimap.
2147
+ * @param value - The new zoom level of the minimap.
2148
+ */
2149
+ set zoom(value: number);
2154
2150
  constructor(world: World);
2155
2151
  /** {@link Disposable.dispose} */
2156
2152
  dispose(): void;
@@ -2164,6 +2160,23 @@ export declare class MiniMap implements Resizeable, Updateable, Disposable {
2164
2160
  resize(size?: THREE.Vector2): void;
2165
2161
  private updatePlanes;
2166
2162
  }
2163
+ /**
2164
+ * A Set of unique numbers representing different types of IFC geometries.
2165
+ */
2166
+ export declare const GeometryTypes: Set<number>;
2167
+ import { InverseAttribute } from "./types";
2168
+ export declare const relToAttributesMap: Map<number, {
2169
+ forRelating: InverseAttribute;
2170
+ forRelated: InverseAttribute;
2171
+ }>;
2172
+ import * as WEBIFC from "web-ifc";
2173
+ import { IfcItemsCategories } from "../../../ifc";
2174
+ export declare class SpatialStructure {
2175
+ itemsByFloor: IfcItemsCategories;
2176
+ private _units;
2177
+ setUp(webIfc: WEBIFC.IfcAPI): void;
2178
+ cleanUp(): void;
2179
+ }
2167
2180
  import * as WEBIFC from "web-ifc";
2168
2181
  /** Configuration of the IFC-fragment conversion. */
2169
2182
  export declare class IfcFragmentSettings {
@@ -2205,19 +2218,6 @@ export declare class IfcFragmentSettings {
2205
2218
  */
2206
2219
  customLocateFileHandler: WEBIFC.LocateFileHandlerFn | null;
2207
2220
  }
2208
- import { InverseAttribute } from "./types";
2209
- export declare const relToAttributesMap: Map<number, {
2210
- forRelating: InverseAttribute;
2211
- forRelated: InverseAttribute;
2212
- }>;
2213
- import * as WEBIFC from "web-ifc";
2214
- import { IfcItemsCategories } from "../../../ifc";
2215
- export declare class SpatialStructure {
2216
- itemsByFloor: IfcItemsCategories;
2217
- private _units;
2218
- setUp(webIfc: WEBIFC.IfcAPI): void;
2219
- cleanUp(): void;
2220
- }
2221
2221
  import * as WEBIFC from "web-ifc";
2222
2222
  export interface IfcItemsCategories {
2223
2223
  [itemID: number]: number;
@@ -2242,6 +2242,106 @@ export declare const IfcElements: {
2242
2242
  export declare const IfcCategoryMap: {
2243
2243
  [key: number]: string;
2244
2244
  };
2245
+ import * as FRAGS from "@thatopen/fragments";
2246
+ export declare class IfcPropertiesUtils {
2247
+ static getUnits(group: FRAGS.FragmentsGroup): Promise<number>;
2248
+ static findItemByGuid(model: FRAGS.FragmentsGroup, guid: string): Promise<{
2249
+ [attribute: string]: any;
2250
+ } | null>;
2251
+ static getRelationMap(model: FRAGS.FragmentsGroup, relationType: number, onElementsFound?: (relatingID: number, relatedIDs: number[]) => Promise<void>): Promise<{
2252
+ [relatingID: number]: number[];
2253
+ }>;
2254
+ static getQsetQuantities(model: FRAGS.FragmentsGroup, expressID: number, onQuantityFound?: (expressID: number) => void): Promise<number[] | null>;
2255
+ static getPsetProps(model: FRAGS.FragmentsGroup, expressID: number, onPropFound?: (expressID: number) => void): Promise<number[] | null>;
2256
+ static getPsetRel(model: FRAGS.FragmentsGroup, psetID: number): Promise<number | null>;
2257
+ static getQsetRel(model: FRAGS.FragmentsGroup, qsetID: number): Promise<number | null>;
2258
+ static getEntityName(model: FRAGS.FragmentsGroup, entityID: number): Promise<{
2259
+ key: string | null;
2260
+ name: string | null;
2261
+ }>;
2262
+ static getQuantityValue(model: FRAGS.FragmentsGroup, quantityID: number): Promise<{
2263
+ key: string | null;
2264
+ value: number | null;
2265
+ }>;
2266
+ static isRel(expressID: number): boolean;
2267
+ static attributeExists(model: FRAGS.FragmentsGroup, expressID: number, attribute: string): Promise<boolean>;
2268
+ static groupEntitiesByType(model: FRAGS.FragmentsGroup, expressIDs: Set<number> | number[]): Promise<Map<number, Set<number>>>;
2269
+ }
2270
+ import * as THREE from "three";
2271
+ import { Disposable, Event } from "../../Types";
2272
+ /**
2273
+ * A helper to easily get the real position of the mouse in the Three.js canvas to work with tools like the [raycaster](https://threejs.org/docs/#api/en/core/Raycaster), even if it has been transformed through CSS or doesn't occupy the whole screen.
2274
+ */
2275
+ export declare class Mouse implements Disposable {
2276
+ dom: HTMLCanvasElement;
2277
+ private _event?;
2278
+ private _position;
2279
+ /** {@link Disposable.onDisposed} */
2280
+ readonly onDisposed: Event<unknown>;
2281
+ constructor(dom: HTMLCanvasElement);
2282
+ /**
2283
+ * The real position of the mouse of the Three.js canvas.
2284
+ */
2285
+ get position(): THREE.Vector2;
2286
+ /** {@link Disposable.dispose} */
2287
+ dispose(): void;
2288
+ private getPositionY;
2289
+ private getPositionX;
2290
+ private updateMouseInfo;
2291
+ private setupEvents;
2292
+ }
2293
+ import * as THREE from "three";
2294
+ import { Components } from "../../Components";
2295
+ import { Event, World, Disposable } from "../../Types";
2296
+ import { Mouse } from "./mouse";
2297
+ /**
2298
+ * A simple [raycaster](https://threejs.org/docs/#api/en/core/Raycaster) that allows to easily get items from the scene using the mouse and touch events.
2299
+ */
2300
+ export declare class SimpleRaycaster implements Disposable {
2301
+ /** {@link Component.enabled} */
2302
+ enabled: boolean;
2303
+ /** The components instance to which this Raycaster belongs. */
2304
+ components: Components;
2305
+ /** {@link Disposable.onDisposed} */
2306
+ readonly onDisposed: Event<unknown>;
2307
+ /** The position of the mouse in the screen. */
2308
+ readonly mouse: Mouse;
2309
+ /**
2310
+ * A reference to the Three.js Raycaster instance.
2311
+ * This is used for raycasting operations.
2312
+ */
2313
+ readonly three: THREE.Raycaster;
2314
+ /**
2315
+ * A reference to the world instance to which this Raycaster belongs.
2316
+ * This is used to access the camera and meshes.
2317
+ */
2318
+ world: World;
2319
+ constructor(components: Components, world: World);
2320
+ /** {@link Disposable.dispose} */
2321
+ dispose(): void;
2322
+ /**
2323
+ * Throws a ray from the camera to the mouse or touch event point and returns
2324
+ * the first item found. This also takes into account the clipping planes
2325
+ * used by the renderer.
2326
+ *
2327
+ * @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
2328
+ * to query. If not provided, it will query all the meshes stored in
2329
+ * {@link Components.meshes}.
2330
+ */
2331
+ castRay(items?: THREE.Object3D[]): THREE.Intersection | null;
2332
+ /**
2333
+ * Casts a ray from a given origin in a given direction and returns the first item found.
2334
+ * This method also takes into account the clipping planes used by the renderer.
2335
+ *
2336
+ * @param origin - The origin of the ray.
2337
+ * @param direction - The direction of the ray.
2338
+ * @param items - The meshes to query. If not provided, it will query all the meshes stored in {@link World.meshes}.
2339
+ * @returns The first intersection found or 'null' if no intersection was found.
2340
+ */
2341
+ castRayFromVector(origin: THREE.Vector3, direction: THREE.Vector3, items?: THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>[]): THREE.Intersection<THREE.Object3D<THREE.Object3DEventMap>> | null;
2342
+ private intersect;
2343
+ private filterClippingPlanes;
2344
+ }
2245
2345
  /**
2246
2346
  * Simple event handler by [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540). Keep in mind that if you want to remove it later, you might want to declare the callback as an object. If you want to maintain the reference to 'this', you will need to declare the callback as an arrow function.
2247
2347
  */
@@ -2270,30 +2370,33 @@ export declare class Event<T> {
2270
2370
  reset(): void;
2271
2371
  private handlers;
2272
2372
  }
2273
- import * as FRAGS from "@thatopen/fragments";
2274
- export declare class IfcPropertiesUtils {
2275
- static getUnits(group: FRAGS.FragmentsGroup): Promise<number>;
2276
- static findItemByGuid(model: FRAGS.FragmentsGroup, guid: string): Promise<{
2277
- [attribute: string]: any;
2278
- } | null>;
2279
- static getRelationMap(model: FRAGS.FragmentsGroup, relationType: number, onElementsFound?: (relatingID: number, relatedIDs: number[]) => Promise<void>): Promise<{
2280
- [relatingID: number]: number[];
2281
- }>;
2282
- static getQsetQuantities(model: FRAGS.FragmentsGroup, expressID: number, onQuantityFound?: (expressID: number) => void): Promise<number[] | null>;
2283
- static getPsetProps(model: FRAGS.FragmentsGroup, expressID: number, onPropFound?: (expressID: number) => void): Promise<number[] | null>;
2284
- static getPsetRel(model: FRAGS.FragmentsGroup, psetID: number): Promise<number | null>;
2285
- static getQsetRel(model: FRAGS.FragmentsGroup, qsetID: number): Promise<number | null>;
2286
- static getEntityName(model: FRAGS.FragmentsGroup, entityID: number): Promise<{
2287
- key: string | null;
2288
- name: string | null;
2289
- }>;
2290
- static getQuantityValue(model: FRAGS.FragmentsGroup, quantityID: number): Promise<{
2291
- key: string | null;
2292
- value: number | null;
2293
- }>;
2294
- static isRel(expressID: number): boolean;
2295
- static attributeExists(model: FRAGS.FragmentsGroup, expressID: number, attribute: string): Promise<boolean>;
2296
- static groupEntitiesByType(model: FRAGS.FragmentsGroup, expressIDs: Set<number> | number[]): Promise<Map<number, Set<number>>>;
2373
+ /**
2374
+ * Simple event handler by [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540). Keep in mind that if you want to remove it later, you might want to declare the callback as an object. If you want to maintain the reference to 'this', you will need to declare the callback as an arrow function.
2375
+ */
2376
+ export declare class AsyncEvent<T> {
2377
+ /**
2378
+ * Add a callback to this event instance.
2379
+ * @param handler - the callback to be added to this event.
2380
+ */
2381
+ add(handler: T extends void ? {
2382
+ (): Promise<void>;
2383
+ } : {
2384
+ (data: T): Promise<void>;
2385
+ }): void;
2386
+ /**
2387
+ * Removes a callback from this event instance.
2388
+ * @param handler - the callback to be removed from this event.
2389
+ */
2390
+ remove(handler: T extends void ? {
2391
+ (): Promise<void>;
2392
+ } : {
2393
+ (data: T): Promise<void>;
2394
+ }): void;
2395
+ /** Triggers all the callbacks assigned to this event. */
2396
+ trigger: (data?: T) => Promise<void>;
2397
+ /** Gets rid of all the suscribed events. */
2398
+ reset(): void;
2399
+ private handlers;
2297
2400
  }
2298
2401
  import * as THREE from "three";
2299
2402
  import CameraControls from "camera-controls";
@@ -2403,34 +2506,6 @@ export interface CameraControllable {
2403
2506
  */
2404
2507
  controls: CameraControls;
2405
2508
  }
2406
- /**
2407
- * Simple event handler by [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540). Keep in mind that if you want to remove it later, you might want to declare the callback as an object. If you want to maintain the reference to 'this', you will need to declare the callback as an arrow function.
2408
- */
2409
- export declare class AsyncEvent<T> {
2410
- /**
2411
- * Add a callback to this event instance.
2412
- * @param handler - the callback to be added to this event.
2413
- */
2414
- add(handler: T extends void ? {
2415
- (): Promise<void>;
2416
- } : {
2417
- (data: T): Promise<void>;
2418
- }): void;
2419
- /**
2420
- * Removes a callback from this event instance.
2421
- * @param handler - the callback to be removed from this event.
2422
- */
2423
- remove(handler: T extends void ? {
2424
- (): Promise<void>;
2425
- } : {
2426
- (data: T): Promise<void>;
2427
- }): void;
2428
- /** Triggers all the callbacks assigned to this event. */
2429
- trigger: (data?: T) => Promise<void>;
2430
- /** Gets rid of all the suscribed events. */
2431
- reset(): void;
2432
- private handlers;
2433
- }
2434
2509
  import { Base } from "./base";
2435
2510
  /**
2436
2511
  * Components are the building blocks of this library. Components are singleton elements that contain specific functionality. For instance, the Clipper Component can create, delete and handle 3D clipping planes. Components must be unique (they can't be instanced more than once per Components instance), and have a static UUID that identifies them uniquely. The can be accessed globally using the {@link Components} instance.
@@ -2458,33 +2533,10 @@ export declare abstract class Base {
2458
2533
  isResizeable: () => this is Resizeable;
2459
2534
  /** Whether is component is {@link Updateable}. */
2460
2535
  isUpdateable: () => this is Updateable;
2461
- /** Whether is component is {@link Hideable}. */
2462
- isHideable: () => this is Hideable;
2463
- /** Whether is component is {@link Configurable}. */
2464
- isConfigurable: () => this is Configurable<any>;
2465
- }
2466
- import { Base } from "./base";
2467
- import { World } from "./world";
2468
- import { Event } from "./event";
2469
- import { Components } from "../../Components";
2470
- /**
2471
- * One of the elements that make a world. It can be either a scene, a camera or a renderer.
2472
- */
2473
- export declare abstract class BaseWorldItem extends Base {
2474
- readonly worlds: Map<string, World>;
2475
- /**
2476
- * Event that is triggered when a world is added or removed from the 'worlds' map.
2477
- * The event payload contains the world instance and the action ("added" or "removed").
2478
- */
2479
- readonly onWorldChanged: Event<{
2480
- world: World;
2481
- action: "added" | "removed";
2482
- }>;
2483
- /**
2484
- * The current world this item is associated with. It can be null if no world is currently active.
2485
- */
2486
- currentWorld: World | null;
2487
- protected constructor(components: Components);
2536
+ /** Whether is component is {@link Hideable}. */
2537
+ isHideable: () => this is Hideable;
2538
+ /** Whether is component is {@link Configurable}. */
2539
+ isConfigurable: () => this is Configurable<any>;
2488
2540
  }
2489
2541
  import * as THREE from "three";
2490
2542
  import CameraControls from "camera-controls";
@@ -2514,6 +2566,29 @@ export declare abstract class BaseCamera extends BaseWorldItem {
2514
2566
  */
2515
2567
  hasCameraControls: () => this is CameraControllable;
2516
2568
  }
2569
+ import { Base } from "./base";
2570
+ import { World } from "./world";
2571
+ import { Event } from "./event";
2572
+ import { Components } from "../../Components";
2573
+ /**
2574
+ * One of the elements that make a world. It can be either a scene, a camera or a renderer.
2575
+ */
2576
+ export declare abstract class BaseWorldItem extends Base {
2577
+ readonly worlds: Map<string, World>;
2578
+ /**
2579
+ * Event that is triggered when a world is added or removed from the 'worlds' map.
2580
+ * The event payload contains the world instance and the action ("added" or "removed").
2581
+ */
2582
+ readonly onWorldChanged: Event<{
2583
+ world: World;
2584
+ action: "added" | "removed";
2585
+ }>;
2586
+ /**
2587
+ * The current world this item is associated with. It can be null if no world is currently active.
2588
+ */
2589
+ currentWorld: World | null;
2590
+ protected constructor(components: Components);
2591
+ }
2517
2592
  import * as THREE from "three";
2518
2593
  import { Vector2 } from "three";
2519
2594
  import { Event } from "./event";
@@ -2603,244 +2678,35 @@ import * as THREE from "three";
2603
2678
  import { BaseScene } from "./base-scene";
2604
2679
  import { BaseCamera } from "./base-camera";
2605
2680
  import { BaseRenderer } from "./base-renderer";
2606
- import { Updateable, Disposable } from "./interfaces";
2607
- /**
2608
- * Represents a 3D world with meshes, scene, camera, renderer, and other properties.
2609
- */
2610
- export interface World extends Disposable, Updateable {
2611
- /**
2612
- * A set of meshes present in the world. This is taken into account for operations like raycasting.
2613
- */
2614
- meshes: Set<THREE.Mesh>;
2615
- /**
2616
- * The base scene of the world.
2617
- */
2618
- scene: BaseScene;
2619
- /**
2620
- * The base camera of the world.
2621
- */
2622
- camera: BaseCamera;
2623
- /**
2624
- * The base renderer of the world. Can be null if this world doesn't use a renderer (e.g. in a backend environment).
2625
- */
2626
- renderer: BaseRenderer | null;
2627
- /**
2628
- * A unique identifier for the world.
2629
- */
2630
- uuid: string;
2631
- /**
2632
- * Indicates whether the world is currently disposing. This is useful for cancelling logic that access the elements of a world (which are also disposed).
2633
- */
2634
- isDisposing: boolean;
2635
- }
2636
- import * as THREE from "three";
2637
- import { Disposable, Event } from "../../Types";
2638
- /**
2639
- * A helper to easily get the real position of the mouse in the Three.js canvas to work with tools like the [raycaster](https://threejs.org/docs/#api/en/core/Raycaster), even if it has been transformed through CSS or doesn't occupy the whole screen.
2640
- */
2641
- export declare class Mouse implements Disposable {
2642
- dom: HTMLCanvasElement;
2643
- private _event?;
2644
- private _position;
2645
- /** {@link Disposable.onDisposed} */
2646
- readonly onDisposed: Event<unknown>;
2647
- constructor(dom: HTMLCanvasElement);
2648
- /**
2649
- * The real position of the mouse of the Three.js canvas.
2650
- */
2651
- get position(): THREE.Vector2;
2652
- /** {@link Disposable.dispose} */
2653
- dispose(): void;
2654
- private getPositionY;
2655
- private getPositionX;
2656
- private updateMouseInfo;
2657
- private setupEvents;
2658
- }
2659
- import * as THREE from "three";
2660
- import { Components } from "../../Components";
2661
- import { Event, World, Disposable } from "../../Types";
2662
- import { Mouse } from "./mouse";
2663
- /**
2664
- * A simple [raycaster](https://threejs.org/docs/#api/en/core/Raycaster) that allows to easily get items from the scene using the mouse and touch events.
2665
- */
2666
- export declare class SimpleRaycaster implements Disposable {
2667
- /** {@link Component.enabled} */
2668
- enabled: boolean;
2669
- /** The components instance to which this Raycaster belongs. */
2670
- components: Components;
2671
- /** {@link Disposable.onDisposed} */
2672
- readonly onDisposed: Event<unknown>;
2673
- /** The position of the mouse in the screen. */
2674
- readonly mouse: Mouse;
2675
- /**
2676
- * A reference to the Three.js Raycaster instance.
2677
- * This is used for raycasting operations.
2678
- */
2679
- readonly three: THREE.Raycaster;
2680
- /**
2681
- * A reference to the world instance to which this Raycaster belongs.
2682
- * This is used to access the camera and meshes.
2683
- */
2684
- world: World;
2685
- constructor(components: Components, world: World);
2686
- /** {@link Disposable.dispose} */
2687
- dispose(): void;
2688
- /**
2689
- * Throws a ray from the camera to the mouse or touch event point and returns
2690
- * the first item found. This also takes into account the clipping planes
2691
- * used by the renderer.
2692
- *
2693
- * @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
2694
- * to query. If not provided, it will query all the meshes stored in
2695
- * {@link Components.meshes}.
2696
- */
2697
- castRay(items?: THREE.Object3D[]): THREE.Intersection | null;
2698
- /**
2699
- * Casts a ray from a given origin in a given direction and returns the first item found.
2700
- * This method also takes into account the clipping planes used by the renderer.
2701
- *
2702
- * @param origin - The origin of the ray.
2703
- * @param direction - The direction of the ray.
2704
- * @param items - The meshes to query. If not provided, it will query all the meshes stored in {@link World.meshes}.
2705
- * @returns The first intersection found or 'null' if no intersection was found.
2706
- */
2707
- castRayFromVector(origin: THREE.Vector3, direction: THREE.Vector3, items?: THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>[]): THREE.Intersection<THREE.Object3D<THREE.Object3DEventMap>> | null;
2708
- private intersect;
2709
- private filterClippingPlanes;
2710
- }
2711
- import { NavigationMode } from "./types";
2712
- import { OrthoPerspectiveCamera } from "../index";
2713
- /**
2714
- * A {@link NavigationMode} that allows first person navigation, simulating FPS video games.
2715
- */
2716
- export declare class FirstPersonMode implements NavigationMode {
2717
- private camera;
2718
- /** {@link NavigationMode.enabled} */
2719
- enabled: boolean;
2720
- /** {@link NavigationMode.id} */
2721
- readonly id = "FirstPerson";
2722
- constructor(camera: OrthoPerspectiveCamera);
2723
- /** {@link NavigationMode.set} */
2724
- set(active: boolean): void;
2725
- private setupFirstPersonCamera;
2726
- }
2727
- import { NavigationMode } from "./types";
2728
- import { OrthoPerspectiveCamera } from "../index";
2729
- /**
2730
- * A {@link NavigationMode} that allows 3D navigation and panning like in many 3D and CAD softwares.
2731
- */
2732
- export declare class OrbitMode implements NavigationMode {
2733
- camera: OrthoPerspectiveCamera;
2734
- /** {@link NavigationMode.enabled} */
2735
- enabled: boolean;
2736
- /** {@link NavigationMode.id} */
2737
- readonly id = "Orbit";
2738
- constructor(camera: OrthoPerspectiveCamera);
2739
- /** {@link NavigationMode.set} */
2740
- set(active: boolean): void;
2741
- private activateOrbitControls;
2742
- }
2743
- import { NavigationMode } from "./types";
2744
- import { OrthoPerspectiveCamera } from "../index";
2745
- /**
2746
- * A {@link NavigationMode} that allows to navigate floorplans in 2D, like many BIM tools.
2747
- */
2748
- export declare class PlanMode implements NavigationMode {
2749
- private camera;
2750
- /** {@link NavigationMode.enabled} */
2751
- enabled: boolean;
2752
- /** {@link NavigationMode.id} */
2753
- readonly id = "Plan";
2754
- private mouseAction1?;
2755
- private mouseAction2?;
2756
- private mouseInitialized;
2757
- private readonly defaultAzimuthSpeed;
2758
- private readonly defaultPolarSpeed;
2759
- constructor(camera: OrthoPerspectiveCamera);
2760
- /** {@link NavigationMode.set} */
2761
- set(active: boolean): void;
2762
- }
2763
- import * as THREE from "three";
2764
- import { CameraProjection } from "./types";
2765
- import { Event } from "../../Types";
2766
- import { OrthoPerspectiveCamera } from "../index";
2767
- /**
2768
- * Object to control the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
2769
- */
2770
- export declare class ProjectionManager {
2771
- /**
2772
- * Event that fires when the {@link CameraProjection} changes.
2773
- */
2774
- readonly onChanged: Event<THREE.PerspectiveCamera | THREE.OrthographicCamera>;
2775
- /**
2776
- * Current projection mode of the camera.
2777
- * Default is "Perspective".
2778
- */
2779
- current: CameraProjection;
2780
- /**
2781
- * The camera controlled by this ProjectionManager.
2782
- * It can be either a PerspectiveCamera or an OrthographicCamera.
2783
- */
2784
- camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
2785
- /** Match Ortho zoom with Perspective distance when changing projection mode */
2786
- matchOrthoDistanceEnabled: boolean;
2787
- private _component;
2788
- private _previousDistance;
2789
- constructor(camera: OrthoPerspectiveCamera);
2790
- /**
2791
- * Sets the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
2792
- *
2793
- * @param projection - the new projection to set. If it is the current projection,
2794
- * it will have no effect.
2795
- */
2796
- set(projection: CameraProjection): Promise<void>;
2797
- /**
2798
- * Changes the current {@link CameraProjection} from Ortographic to Perspective
2799
- * and vice versa.
2800
- */
2801
- toggle(): Promise<void>;
2802
- private setOrthoCamera;
2803
- private getPerspectiveDims;
2804
- private setupOrthoCamera;
2805
- private getDistance;
2806
- private setPerspectiveCamera;
2807
- }
2808
- /**
2809
- * The projection system of the camera.
2810
- */
2811
- export type CameraProjection = "Perspective" | "Orthographic";
2812
- /**
2813
- * The extensible list of supported navigation modes.
2814
- */
2815
- export type NavModeID = "Orbit" | "FirstPerson" | "Plan";
2816
- /**
2817
- * An object that determines the behavior of the camera controls and the user input (e.g. 2D floor plan mode, first person mode, etc).
2818
- */
2819
- export interface NavigationMode {
2820
- /** The unique ID of this navigation mode. */
2821
- id: NavModeID;
2822
- /**
2823
- * Enable or disable this navigation mode.
2824
- * When a new navigation mode is enabled, the previous navigation mode
2825
- * must be disabled.
2826
- *
2827
- * @param active - whether to enable or disable this mode.
2828
- * @param options - any additional data required to enable or disable it.
2829
- * */
2830
- set: (active: boolean, options?: any) => void;
2831
- /** Whether this navigation mode is active or not. */
2832
- enabled: boolean;
2833
- }
2834
- import { IfcFragmentSettings } from "../../IfcLoader/src";
2681
+ import { Updateable, Disposable } from "./interfaces";
2835
2682
  /**
2836
- * Settings for streaming properties. Extends {@link IfcFragmentSettings} to inherit common settings.
2683
+ * Represents a 3D world with meshes, scene, camera, renderer, and other properties.
2837
2684
  */
2838
- export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
2685
+ export interface World extends Disposable, Updateable {
2839
2686
  /**
2840
- * Amount of properties to be streamed.
2841
- * Defaults to 100 properties.
2687
+ * A set of meshes present in the world. This is taken into account for operations like raycasting.
2842
2688
  */
2843
- propertiesSize: number;
2689
+ meshes: Set<THREE.Mesh>;
2690
+ /**
2691
+ * The base scene of the world.
2692
+ */
2693
+ scene: BaseScene;
2694
+ /**
2695
+ * The base camera of the world.
2696
+ */
2697
+ camera: BaseCamera;
2698
+ /**
2699
+ * The base renderer of the world. Can be null if this world doesn't use a renderer (e.g. in a backend environment).
2700
+ */
2701
+ renderer: BaseRenderer | null;
2702
+ /**
2703
+ * A unique identifier for the world.
2704
+ */
2705
+ uuid: string;
2706
+ /**
2707
+ * Indicates whether the world is currently disposing. This is useful for cancelling logic that access the elements of a world (which are also disposed).
2708
+ */
2709
+ isDisposing: boolean;
2844
2710
  }
2845
2711
  import * as THREE from "three";
2846
2712
  import { Components } from "../../Components";
@@ -2933,7 +2799,65 @@ export declare class CullerRenderer {
2933
2799
  protected decreaseColor(): void;
2934
2800
  private applySettings;
2935
2801
  }
2936
- export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
2802
+ import * as THREE from "three";
2803
+ import { Hideable, Event, World, Disposable } from "../../Types";
2804
+ import { Components } from "../../Components";
2805
+ /**
2806
+ * Configuration interface for the {@link SimpleGrid} class.
2807
+ */
2808
+ export interface GridConfig {
2809
+ /**
2810
+ * The color of the grid lines.
2811
+ */
2812
+ color: THREE.Color;
2813
+ /**
2814
+ * The size of the primary grid lines.
2815
+ */
2816
+ size1: number;
2817
+ /**
2818
+ * The size of the secondary grid lines.
2819
+ */
2820
+ size2: number;
2821
+ /**
2822
+ * The distance at which the grid lines start to fade away.
2823
+ */
2824
+ distance: number;
2825
+ }
2826
+ /**
2827
+ * An infinite grid. Created by [fyrestar](https://github.com/Fyrestar/THREE.InfiniteGridHelper) and translated to typescript by [dkaraush](https://github.com/dkaraush/THREE.InfiniteGridHelper/blob/master/InfiniteGridHelper.ts).
2828
+ */
2829
+ export declare class SimpleGrid implements Hideable, Disposable {
2830
+ /** {@link Disposable.onDisposed} */
2831
+ readonly onDisposed: Event<unknown>;
2832
+ /** The world instance to which this Raycaster belongs. */
2833
+ world: World;
2834
+ /** The components instance to which this grid belongs. */
2835
+ components: Components;
2836
+ /** {@link Hideable.visible} */
2837
+ get visible(): boolean;
2838
+ /** {@link Hideable.visible} */
2839
+ set visible(visible: boolean);
2840
+ /** The material of the grid. */
2841
+ get material(): THREE.ShaderMaterial;
2842
+ /**
2843
+ * Whether the grid should fade away with distance. Recommended to be true for
2844
+ * perspective cameras and false for orthographic cameras.
2845
+ */
2846
+ get fade(): boolean;
2847
+ /**
2848
+ * Whether the grid should fade away with distance. Recommended to be true for
2849
+ * perspective cameras and false for orthographic cameras.
2850
+ */
2851
+ set fade(active: boolean);
2852
+ /** The Three.js mesh that contains the infinite grid. */
2853
+ readonly three: THREE.Mesh;
2854
+ private _fade;
2855
+ constructor(components: Components, world: World, config: GridConfig);
2856
+ /** {@link Disposable.dispose} */
2857
+ dispose(): void;
2858
+ private setupEvents;
2859
+ private updateZoom;
2860
+ }
2937
2861
  import * as THREE from "three";
2938
2862
  import { CullerRenderer, CullerRendererSettings } from "./culler-renderer";
2939
2863
  import { Components } from "../../Components";
@@ -2990,6 +2914,18 @@ export declare class MeshCullerRenderer extends CullerRenderer implements Dispos
2990
2914
  private handleWorkerMessage;
2991
2915
  private getAvailableMaterial;
2992
2916
  }
2917
+ export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
2918
+ import { IfcFragmentSettings } from "../../IfcLoader/src";
2919
+ /**
2920
+ * Settings for streaming properties. Extends {@link IfcFragmentSettings} to inherit common settings.
2921
+ */
2922
+ export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
2923
+ /**
2924
+ * Amount of properties to be streamed.
2925
+ * Defaults to 100 properties.
2926
+ */
2927
+ propertiesSize: number;
2928
+ }
2993
2929
  import * as THREE from "three";
2994
2930
  import { Event, Base, World, BaseScene, BaseCamera, BaseRenderer, Disposable, Updateable } from "../../Types";
2995
2931
  /**
@@ -3163,125 +3099,254 @@ export declare class SimpleRenderer extends BaseRenderer {
3163
3099
  private onContextBack;
3164
3100
  }
3165
3101
  import * as THREE from "three";
3166
- import CameraControls from "camera-controls";
3167
- import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
3168
- import { Components } from "../../Components";
3102
+ import CameraControls from "camera-controls";
3103
+ import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
3104
+ import { Components } from "../../Components";
3105
+ /**
3106
+ * A basic camera that uses [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to control the camera in 2D and 3D. Check out it's API to find out what features it offers.
3107
+ */
3108
+ export declare class SimpleCamera extends BaseCamera implements Updateable, Disposable {
3109
+ /** {@link Updateable.onBeforeUpdate} */
3110
+ readonly onBeforeUpdate: Event<SimpleCamera>;
3111
+ /** {@link Updateable.onAfterUpdate} */
3112
+ readonly onAfterUpdate: Event<SimpleCamera>;
3113
+ /**
3114
+ * Event that is triggered when the aspect of the camera has been updated.
3115
+ * This event is useful when you need to perform actions after the aspect of the camera has been changed.
3116
+ */
3117
+ readonly onAspectUpdated: Event<unknown>;
3118
+ /** {@link Disposable.onDisposed} */
3119
+ readonly onDisposed: Event<string>;
3120
+ /**
3121
+ * A three.js PerspectiveCamera or OrthographicCamera instance.
3122
+ * This camera is used for rendering the scene.
3123
+ */
3124
+ three: THREE.PerspectiveCamera | THREE.OrthographicCamera;
3125
+ private _allControls;
3126
+ /**
3127
+ * The object that controls the camera. An instance of
3128
+ * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls).
3129
+ * Transforming the camera directly will have no effect: you need to use this
3130
+ * object to move, rotate, look at objects, etc.
3131
+ */
3132
+ get controls(): CameraControls;
3133
+ /**
3134
+ * Getter for the enabled state of the camera controls.
3135
+ * If the current world is null, it returns false.
3136
+ * Otherwise, it returns the enabled state of the camera controls.
3137
+ *
3138
+ * @returns {boolean} The enabled state of the camera controls.
3139
+ */
3140
+ get enabled(): boolean;
3141
+ /**
3142
+ * Setter for the enabled state of the camera controls.
3143
+ * If the current world is not null, it sets the enabled state of the camera controls to the provided value.
3144
+ *
3145
+ * @param {boolean} enabled - The new enabled state of the camera controls.
3146
+ */
3147
+ set enabled(enabled: boolean);
3148
+ constructor(components: Components);
3149
+ /** {@link Disposable.dispose} */
3150
+ dispose(): void;
3151
+ /** {@link Updateable.update} */
3152
+ update(_delta: number): void;
3153
+ /**
3154
+ * Updates the aspect of the camera to match the size of the
3155
+ * {@link Components.renderer}.
3156
+ */
3157
+ updateAspect: () => void;
3158
+ private setupCamera;
3159
+ private newCameraControls;
3160
+ private setupEvents;
3161
+ private static getSubsetOfThree;
3162
+ }
3163
+ import { IfcFragmentSettings } from "../../IfcLoader/src";
3164
+ /**
3165
+ * Settings for streaming IFC geometry and assets. Extends {@link IfcFragmentSettings} to inherit common settings.
3166
+ */
3167
+ export declare class IfcStreamingSettings extends IfcFragmentSettings {
3168
+ /**
3169
+ * Minimum number of geometries to be streamed.
3170
+ * Defaults to 10 geometries.
3171
+ */
3172
+ minGeometrySize: number;
3173
+ /**
3174
+ * Minimum amount of assets to be streamed.
3175
+ * Defaults to 1000 assets.
3176
+ */
3177
+ minAssetsSize: number;
3178
+ }
3179
+ /**
3180
+ * A dictionary of geometries streamed from a server. Each geometry is identified by a unique number (id), and contains information about its bounding box, whether it has holes, and an optional file path for the geometry data.
3181
+ */
3182
+ export interface StreamedGeometries {
3183
+ [id: number]: {
3184
+ /** The bounding box of the geometry as a Float32Array. */
3185
+ boundingBox: Float32Array;
3186
+ /** A boolean indicating whether the geometry has holes. */
3187
+ hasHoles: boolean;
3188
+ /** An optional file path for the geometry data. */
3189
+ geometryFile?: string;
3190
+ };
3191
+ }
3192
+ /**
3193
+ * A streamed asset, which consists of multiple geometries. Each geometry in the asset is identified by a unique number (geometryID), and contains information about its transformation and color.
3194
+ */
3195
+ export interface StreamedAsset {
3196
+ /** The unique identifier of the asset. */
3197
+ id: number;
3198
+ /** An array of geometries associated with the asset. */
3199
+ geometries: {
3200
+ /** The unique identifier of the geometry. */
3201
+ geometryID: number;
3202
+ /** The transformation matrix of the geometry as a number array. */
3203
+ transformation: number[];
3204
+ /** The color of the geometry as a number array. */
3205
+ color: number[];
3206
+ }[];
3207
+ }
3208
+ import { NavigationMode } from "./types";
3209
+ import { OrthoPerspectiveCamera } from "../index";
3210
+ /**
3211
+ * A {@link NavigationMode} that allows first person navigation, simulating FPS video games.
3212
+ */
3213
+ export declare class FirstPersonMode implements NavigationMode {
3214
+ private camera;
3215
+ /** {@link NavigationMode.enabled} */
3216
+ enabled: boolean;
3217
+ /** {@link NavigationMode.id} */
3218
+ readonly id = "FirstPerson";
3219
+ constructor(camera: OrthoPerspectiveCamera);
3220
+ /** {@link NavigationMode.set} */
3221
+ set(active: boolean): void;
3222
+ private setupFirstPersonCamera;
3223
+ }
3224
+ import { NavigationMode } from "./types";
3225
+ import { OrthoPerspectiveCamera } from "../index";
3226
+ /**
3227
+ * A {@link NavigationMode} that allows 3D navigation and panning like in many 3D and CAD softwares.
3228
+ */
3229
+ export declare class OrbitMode implements NavigationMode {
3230
+ camera: OrthoPerspectiveCamera;
3231
+ /** {@link NavigationMode.enabled} */
3232
+ enabled: boolean;
3233
+ /** {@link NavigationMode.id} */
3234
+ readonly id = "Orbit";
3235
+ constructor(camera: OrthoPerspectiveCamera);
3236
+ /** {@link NavigationMode.set} */
3237
+ set(active: boolean): void;
3238
+ private activateOrbitControls;
3239
+ }
3240
+ import { NavigationMode } from "./types";
3241
+ import { OrthoPerspectiveCamera } from "../index";
3242
+ /**
3243
+ * A {@link NavigationMode} that allows to navigate floorplans in 2D, like many BIM tools.
3244
+ */
3245
+ export declare class PlanMode implements NavigationMode {
3246
+ private camera;
3247
+ /** {@link NavigationMode.enabled} */
3248
+ enabled: boolean;
3249
+ /** {@link NavigationMode.id} */
3250
+ readonly id = "Plan";
3251
+ private mouseAction1?;
3252
+ private mouseAction2?;
3253
+ private mouseInitialized;
3254
+ private readonly defaultAzimuthSpeed;
3255
+ private readonly defaultPolarSpeed;
3256
+ constructor(camera: OrthoPerspectiveCamera);
3257
+ /** {@link NavigationMode.set} */
3258
+ set(active: boolean): void;
3259
+ }
3260
+ import * as THREE from "three";
3261
+ import { CameraProjection } from "./types";
3262
+ import { Event } from "../../Types";
3263
+ import { OrthoPerspectiveCamera } from "../index";
3169
3264
  /**
3170
- * A basic camera that uses [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to control the camera in 2D and 3D. Check out it's API to find out what features it offers.
3265
+ * Object to control the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
3171
3266
  */
3172
- export declare class SimpleCamera extends BaseCamera implements Updateable, Disposable {
3173
- /** {@link Updateable.onBeforeUpdate} */
3174
- readonly onBeforeUpdate: Event<SimpleCamera>;
3175
- /** {@link Updateable.onAfterUpdate} */
3176
- readonly onAfterUpdate: Event<SimpleCamera>;
3177
- /**
3178
- * Event that is triggered when the aspect of the camera has been updated.
3179
- * This event is useful when you need to perform actions after the aspect of the camera has been changed.
3180
- */
3181
- readonly onAspectUpdated: Event<unknown>;
3182
- /** {@link Disposable.onDisposed} */
3183
- readonly onDisposed: Event<string>;
3267
+ export declare class ProjectionManager {
3184
3268
  /**
3185
- * A three.js PerspectiveCamera or OrthographicCamera instance.
3186
- * This camera is used for rendering the scene.
3269
+ * Event that fires when the {@link CameraProjection} changes.
3187
3270
  */
3188
- three: THREE.PerspectiveCamera | THREE.OrthographicCamera;
3189
- private _allControls;
3271
+ readonly onChanged: Event<THREE.PerspectiveCamera | THREE.OrthographicCamera>;
3190
3272
  /**
3191
- * The object that controls the camera. An instance of
3192
- * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls).
3193
- * Transforming the camera directly will have no effect: you need to use this
3194
- * object to move, rotate, look at objects, etc.
3273
+ * Current projection mode of the camera.
3274
+ * Default is "Perspective".
3195
3275
  */
3196
- get controls(): CameraControls;
3276
+ current: CameraProjection;
3197
3277
  /**
3198
- * Getter for the enabled state of the camera controls.
3199
- * If the current world is null, it returns false.
3200
- * Otherwise, it returns the enabled state of the camera controls.
3201
- *
3202
- * @returns {boolean} The enabled state of the camera controls.
3278
+ * The camera controlled by this ProjectionManager.
3279
+ * It can be either a PerspectiveCamera or an OrthographicCamera.
3203
3280
  */
3204
- get enabled(): boolean;
3281
+ camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
3282
+ /** Match Ortho zoom with Perspective distance when changing projection mode */
3283
+ matchOrthoDistanceEnabled: boolean;
3284
+ private _component;
3285
+ private _previousDistance;
3286
+ constructor(camera: OrthoPerspectiveCamera);
3205
3287
  /**
3206
- * Setter for the enabled state of the camera controls.
3207
- * If the current world is not null, it sets the enabled state of the camera controls to the provided value.
3288
+ * Sets the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
3208
3289
  *
3209
- * @param {boolean} enabled - The new enabled state of the camera controls.
3290
+ * @param projection - the new projection to set. If it is the current projection,
3291
+ * it will have no effect.
3210
3292
  */
3211
- set enabled(enabled: boolean);
3212
- constructor(components: Components);
3213
- /** {@link Disposable.dispose} */
3214
- dispose(): void;
3215
- /** {@link Updateable.update} */
3216
- update(_delta: number): void;
3293
+ set(projection: CameraProjection): Promise<void>;
3217
3294
  /**
3218
- * Updates the aspect of the camera to match the size of the
3219
- * {@link Components.renderer}.
3295
+ * Changes the current {@link CameraProjection} from Ortographic to Perspective
3296
+ * and vice versa.
3220
3297
  */
3221
- updateAspect: () => void;
3222
- private setupCamera;
3223
- private newCameraControls;
3224
- private setupEvents;
3225
- private static getSubsetOfThree;
3298
+ toggle(): Promise<void>;
3299
+ private setOrthoCamera;
3300
+ private getPerspectiveDims;
3301
+ private setupOrthoCamera;
3302
+ private getDistance;
3303
+ private setPerspectiveCamera;
3226
3304
  }
3227
- import * as THREE from "three";
3228
- import { Hideable, Event, World, Disposable } from "../../Types";
3229
- import { Components } from "../../Components";
3230
3305
  /**
3231
- * Configuration interface for the {@link SimpleGrid} class.
3306
+ * The projection system of the camera.
3232
3307
  */
3233
- export interface GridConfig {
3234
- /**
3235
- * The color of the grid lines.
3236
- */
3237
- color: THREE.Color;
3238
- /**
3239
- * The size of the primary grid lines.
3240
- */
3241
- size1: number;
3242
- /**
3243
- * The size of the secondary grid lines.
3244
- */
3245
- size2: number;
3246
- /**
3247
- * The distance at which the grid lines start to fade away.
3248
- */
3249
- distance: number;
3250
- }
3308
+ export type CameraProjection = "Perspective" | "Orthographic";
3251
3309
  /**
3252
- * An infinite grid. Created by [fyrestar](https://github.com/Fyrestar/THREE.InfiniteGridHelper) and translated to typescript by [dkaraush](https://github.com/dkaraush/THREE.InfiniteGridHelper/blob/master/InfiniteGridHelper.ts).
3310
+ * The extensible list of supported navigation modes.
3253
3311
  */
3254
- export declare class SimpleGrid implements Hideable, Disposable {
3255
- /** {@link Disposable.onDisposed} */
3256
- readonly onDisposed: Event<unknown>;
3257
- /** The world instance to which this Raycaster belongs. */
3258
- world: World;
3259
- /** The components instance to which this grid belongs. */
3260
- components: Components;
3261
- /** {@link Hideable.visible} */
3262
- get visible(): boolean;
3263
- /** {@link Hideable.visible} */
3264
- set visible(visible: boolean);
3265
- /** The material of the grid. */
3266
- get material(): THREE.ShaderMaterial;
3267
- /**
3268
- * Whether the grid should fade away with distance. Recommended to be true for
3269
- * perspective cameras and false for orthographic cameras.
3270
- */
3271
- get fade(): boolean;
3312
+ export type NavModeID = "Orbit" | "FirstPerson" | "Plan";
3313
+ /**
3314
+ * An object that determines the behavior of the camera controls and the user input (e.g. 2D floor plan mode, first person mode, etc).
3315
+ */
3316
+ export interface NavigationMode {
3317
+ /** The unique ID of this navigation mode. */
3318
+ id: NavModeID;
3272
3319
  /**
3273
- * Whether the grid should fade away with distance. Recommended to be true for
3274
- * perspective cameras and false for orthographic cameras.
3275
- */
3276
- set fade(active: boolean);
3277
- /** The Three.js mesh that contains the infinite grid. */
3278
- readonly three: THREE.Mesh;
3279
- private _fade;
3280
- constructor(components: Components, world: World, config: GridConfig);
3281
- /** {@link Disposable.dispose} */
3282
- dispose(): void;
3283
- private setupEvents;
3284
- private updateZoom;
3320
+ * Enable or disable this navigation mode.
3321
+ * When a new navigation mode is enabled, the previous navigation mode
3322
+ * must be disabled.
3323
+ *
3324
+ * @param active - whether to enable or disable this mode.
3325
+ * @param options - any additional data required to enable or disable it.
3326
+ * */
3327
+ set: (active: boolean, options?: any) => void;
3328
+ /** Whether this navigation mode is active or not. */
3329
+ enabled: boolean;
3330
+ }
3331
+ import * as THREE from "three";
3332
+ import * as WEBIFC from "web-ifc";
3333
+ import * as FRAGS from "@thatopen/fragments";
3334
+ export declare class CivilReader {
3335
+ defLineMat: THREE.LineBasicMaterial;
3336
+ read(webIfc: WEBIFC.IfcAPI): {
3337
+ alignments: Map<number, FRAGS.Alignment>;
3338
+ coordinationMatrix: THREE.Matrix4;
3339
+ } | undefined;
3340
+ get(civilItems: any): {
3341
+ alignments: Map<number, FRAGS.Alignment>;
3342
+ coordinationMatrix: THREE.Matrix4;
3343
+ } | undefined;
3344
+ private getCurves;
3345
+ }
3346
+ import * as WEBIFC from "web-ifc";
3347
+ export declare class IfcMetadataReader {
3348
+ getNameInfo(webIfc: WEBIFC.IfcAPI): Record<string, any>;
3349
+ getDescriptionInfo(webIfc: WEBIFC.IfcAPI): Record<string, any>;
3285
3350
  }
3286
3351
  import * as THREE from "three";
3287
3352
  import { Hideable, Disposable, Event, World } from "../../Types";
@@ -3380,70 +3445,15 @@ export declare class SimplePlane implements Disposable, Hideable {
3380
3445
  private newHelper;
3381
3446
  private static newPlaneMesh;
3382
3447
  }
3383
- import * as THREE from "three";
3384
- import * as WEBIFC from "web-ifc";
3385
- import * as FRAGS from "@thatopen/fragments";
3386
- export declare class CivilReader {
3387
- defLineMat: THREE.LineBasicMaterial;
3388
- read(webIfc: WEBIFC.IfcAPI): {
3389
- alignments: Map<number, FRAGS.Alignment>;
3390
- coordinationMatrix: THREE.Matrix4;
3391
- } | undefined;
3392
- get(civilItems: any): {
3393
- alignments: Map<number, FRAGS.Alignment>;
3394
- coordinationMatrix: THREE.Matrix4;
3395
- } | undefined;
3396
- private getCurves;
3397
- }
3398
3448
  import * as WEBIFC from "web-ifc";
3399
- export declare class IfcMetadataReader {
3400
- getNameInfo(webIfc: WEBIFC.IfcAPI): Record<string, any>;
3401
- getDescriptionInfo(webIfc: WEBIFC.IfcAPI): Record<string, any>;
3402
- }
3403
- import { IfcFragmentSettings } from "../../IfcLoader/src";
3404
- /**
3405
- * Settings for streaming IFC geometry and assets. Extends {@link IfcFragmentSettings} to inherit common settings.
3406
- */
3407
- export declare class IfcStreamingSettings extends IfcFragmentSettings {
3408
- /**
3409
- * Minimum number of geometries to be streamed.
3410
- * Defaults to 10 geometries.
3411
- */
3412
- minGeometrySize: number;
3413
- /**
3414
- * Minimum amount of assets to be streamed.
3415
- * Defaults to 1000 assets.
3416
- */
3417
- minAssetsSize: number;
3418
- }
3419
- /**
3420
- * A dictionary of geometries streamed from a server. Each geometry is identified by a unique number (id), and contains information about its bounding box, whether it has holes, and an optional file path for the geometry data.
3421
- */
3422
- export interface StreamedGeometries {
3423
- [id: number]: {
3424
- /** The bounding box of the geometry as a Float32Array. */
3425
- boundingBox: Float32Array;
3426
- /** A boolean indicating whether the geometry has holes. */
3427
- hasHoles: boolean;
3428
- /** An optional file path for the geometry data. */
3429
- geometryFile?: string;
3430
- };
3431
- }
3432
- /**
3433
- * A streamed asset, which consists of multiple geometries. Each geometry in the asset is identified by a unique number (geometryID), and contains information about its transformation and color.
3434
- */
3435
- export interface StreamedAsset {
3436
- /** The unique identifier of the asset. */
3437
- id: number;
3438
- /** An array of geometries associated with the asset. */
3439
- geometries: {
3440
- /** The unique identifier of the geometry. */
3441
- geometryID: number;
3442
- /** The transformation matrix of the geometry as a number array. */
3443
- transformation: number[];
3444
- /** The color of the geometry as a number array. */
3445
- color: number[];
3446
- }[];
3449
+ import * as THREE from "three";
3450
+ export declare class Units {
3451
+ factor: number;
3452
+ complement: number;
3453
+ apply(matrix: THREE.Matrix4): void;
3454
+ setUp(webIfc: WEBIFC.IfcAPI): void;
3455
+ private getLengthUnits;
3456
+ private getScaleMatrix;
3447
3457
  }
3448
3458
  export type RelationsMap = Map<number, Map<number, number[]>>;
3449
3459
  export interface ModelsRelationMap {
@@ -3469,16 +3479,6 @@ export type InverseAttributes = [
3469
3479
  "ContainsElements"
3470
3480
  ];
3471
3481
  export type InverseAttribute = InverseAttributes[number];
3472
- import * as WEBIFC from "web-ifc";
3473
- import * as THREE from "three";
3474
- export declare class Units {
3475
- factor: number;
3476
- complement: number;
3477
- apply(matrix: THREE.Matrix4): void;
3478
- setUp(webIfc: WEBIFC.IfcAPI): void;
3479
- private getLengthUnits;
3480
- private getScaleMatrix;
3481
- }
3482
3482
  import { BufferGeometry } from "three";
3483
3483
  import * as THREE from "three";
3484
3484
  export declare class TransformHelper {