@thatopen/components 2.3.14 → 2.3.16

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.
@@ -7,7 +7,7 @@ export declare class Components implements Disposable {
7
7
  /**
8
8
  * The version of the @thatopen/components library.
9
9
  */
10
- static readonly release = "2.3.14";
10
+ static readonly release = "2.3.16";
11
11
  /** {@link Disposable.onDisposed} */
12
12
  readonly onDisposed: Event<void>;
13
13
  /**
@@ -137,48 +137,6 @@ export declare class Disposer extends Component {
137
137
  private disposeChildren;
138
138
  private static disposeMaterial;
139
139
  }
140
- import { Component, Disposable, World, Event } from "../Types";
141
- import { SimpleRaycaster } from "./src";
142
- import { Components } from "../Components";
143
- /**
144
- * 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).
145
- */
146
- export declare class Raycasters extends Component implements Disposable {
147
- /**
148
- * A unique identifier for the component.
149
- * This UUID is used to register the component within the Components system.
150
- */
151
- static readonly uuid: "d5d8bdf0-db25-4952-b951-b643af207ace";
152
- /** {@link Component.enabled} */
153
- enabled: boolean;
154
- /**
155
- * A Map that stores raycasters for each world.
156
- * The key is the world's UUID, and the value is the corresponding SimpleRaycaster instance.
157
- */
158
- list: Map<string, SimpleRaycaster>;
159
- /** {@link Disposable.onDisposed} */
160
- onDisposed: Event<unknown>;
161
- constructor(components: Components);
162
- /**
163
- * Retrieves a SimpleRaycaster instance for the given world.
164
- * If a SimpleRaycaster instance already exists for the world, it will be returned.
165
- * Otherwise, a new SimpleRaycaster instance will be created and added to the list.
166
- *
167
- * @param world - The world for which to retrieve or create a SimpleRaycaster instance.
168
- * @returns The SimpleRaycaster instance for the given world.
169
- */
170
- get(world: World): SimpleRaycaster;
171
- /**
172
- * Deletes the SimpleRaycaster instance associated with the given world.
173
- * If a SimpleRaycaster instance exists for the given world, it will be disposed and removed from the list.
174
- *
175
- * @param world - The world for which to delete the SimpleRaycaster instance.
176
- * @returns {void}
177
- */
178
- delete(world: World): void;
179
- /** {@link Disposable.dispose} */
180
- dispose(): void;
181
- }
182
140
  import { SimpleScene, SimpleSceneConfig, SimpleSceneConfigManager } from "../Worlds";
183
141
  import { DistanceRenderer } from "./src";
184
142
  import { Configurable, Disposable } from "../Types";
@@ -238,6 +196,48 @@ export declare class ShadowedScene extends SimpleScene implements Disposable, Co
238
196
  private recomputeShadows;
239
197
  }
240
198
  import { Component, Disposable, World, Event } from "../Types";
199
+ import { SimpleRaycaster } from "./src";
200
+ import { Components } from "../Components";
201
+ /**
202
+ * 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).
203
+ */
204
+ export declare class Raycasters extends Component implements Disposable {
205
+ /**
206
+ * A unique identifier for the component.
207
+ * This UUID is used to register the component within the Components system.
208
+ */
209
+ static readonly uuid: "d5d8bdf0-db25-4952-b951-b643af207ace";
210
+ /** {@link Component.enabled} */
211
+ enabled: boolean;
212
+ /**
213
+ * A Map that stores raycasters for each world.
214
+ * The key is the world's UUID, and the value is the corresponding SimpleRaycaster instance.
215
+ */
216
+ list: Map<string, SimpleRaycaster>;
217
+ /** {@link Disposable.onDisposed} */
218
+ onDisposed: Event<unknown>;
219
+ constructor(components: Components);
220
+ /**
221
+ * Retrieves a SimpleRaycaster instance for the given world.
222
+ * If a SimpleRaycaster instance already exists for the world, it will be returned.
223
+ * Otherwise, a new SimpleRaycaster instance will be created and added to the list.
224
+ *
225
+ * @param world - The world for which to retrieve or create a SimpleRaycaster instance.
226
+ * @returns The SimpleRaycaster instance for the given world.
227
+ */
228
+ get(world: World): SimpleRaycaster;
229
+ /**
230
+ * Deletes the SimpleRaycaster instance associated with the given world.
231
+ * If a SimpleRaycaster instance exists for the given world, it will be disposed and removed from the list.
232
+ *
233
+ * @param world - The world for which to delete the SimpleRaycaster instance.
234
+ * @returns {void}
235
+ */
236
+ delete(world: World): void;
237
+ /** {@link Disposable.dispose} */
238
+ dispose(): void;
239
+ }
240
+ import { Component, Disposable, World, Event } from "../Types";
241
241
  import { SimpleGrid } from "./src";
242
242
  import { Components } from "../Components";
243
243
  /**
@@ -282,6 +282,59 @@ export declare class Grids extends Component implements Disposable {
282
282
  /** {@link Disposable.dispose} */
283
283
  dispose(): void;
284
284
  }
285
+ import { Component, Disposable, Updateable, World, Event, BaseScene, BaseCamera, BaseRenderer, DataMap } from "../Types";
286
+ import { Components } from "../Components";
287
+ import { SimpleWorld } from "./src";
288
+ /**
289
+ * A class representing a collection of worlds within a game engine. It manages the creation, deletion, and update of worlds. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/Worlds). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/Worlds).
290
+ */
291
+ export declare class Worlds extends Component implements Updateable, Disposable {
292
+ /**
293
+ * A unique identifier for the component.
294
+ * This UUID is used to register the component within the Components system.
295
+ */
296
+ static readonly uuid: "fdb61dc4-2ec1-4966-b83d-54ea795fad4a";
297
+ /** {@link Updateable.onAfterUpdate} */
298
+ readonly onAfterUpdate: Event<unknown>;
299
+ /** {@link Updateable.onBeforeUpdate} */
300
+ readonly onBeforeUpdate: Event<unknown>;
301
+ /** {@link Disposable.onDisposed} */
302
+ readonly onDisposed: Event<unknown>;
303
+ /**
304
+ * A collection of worlds managed by this component.
305
+ * The key is the unique identifier (UUID) of the world, and the value is the World instance.
306
+ */
307
+ list: DataMap<string, World>;
308
+ /** {@link Component.enabled} */
309
+ enabled: boolean;
310
+ constructor(components: Components);
311
+ /**
312
+ * Creates a new instance of a SimpleWorld and adds it to the list of worlds.
313
+ *
314
+ * @template T - The type of the scene, extending from BaseScene. Defaults to BaseScene.
315
+ * @template U - The type of the camera, extending from BaseCamera. Defaults to BaseCamera.
316
+ * @template S - The type of the renderer, extending from BaseRenderer. Defaults to BaseRenderer.
317
+ *
318
+ * @throws {Error} - Throws an error if a world with the same UUID already exists in the list.
319
+ */
320
+ create<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer>(): SimpleWorld<T, U, S>;
321
+ /**
322
+ * Deletes a world from the list of worlds.
323
+ *
324
+ * @param {World} world - The world to be deleted.
325
+ *
326
+ * @throws {Error} - Throws an error if the provided world is not found in the list.
327
+ */
328
+ delete(world: World): void;
329
+ /**
330
+ * Disposes of the Worlds component and all its managed worlds.
331
+ * This method sets the enabled flag to false, disposes of all worlds, clears the list,
332
+ * and triggers the onDisposed event.
333
+ */
334
+ dispose(): void;
335
+ /** {@link Updateable.update} */
336
+ update(delta?: number): void | Promise<void>;
337
+ }
285
338
  import * as THREE from "three";
286
339
  import { Component, Configurable, Createable, Disposable, Event, Hideable, World } from "../Types";
287
340
  import { SimplePlane } from "./src";
@@ -423,59 +476,6 @@ export declare class Clipper extends Component implements Createable, Disposable
423
476
  private _onStartDragging;
424
477
  private _onEndDragging;
425
478
  }
426
- import { Component, Disposable, Updateable, World, Event, BaseScene, BaseCamera, BaseRenderer, DataMap } from "../Types";
427
- import { Components } from "../Components";
428
- import { SimpleWorld } from "./src";
429
- /**
430
- * A class representing a collection of worlds within a game engine. It manages the creation, deletion, and update of worlds. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/Worlds). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/Worlds).
431
- */
432
- export declare class Worlds extends Component implements Updateable, Disposable {
433
- /**
434
- * A unique identifier for the component.
435
- * This UUID is used to register the component within the Components system.
436
- */
437
- static readonly uuid: "fdb61dc4-2ec1-4966-b83d-54ea795fad4a";
438
- /** {@link Updateable.onAfterUpdate} */
439
- readonly onAfterUpdate: Event<unknown>;
440
- /** {@link Updateable.onBeforeUpdate} */
441
- readonly onBeforeUpdate: Event<unknown>;
442
- /** {@link Disposable.onDisposed} */
443
- readonly onDisposed: Event<unknown>;
444
- /**
445
- * A collection of worlds managed by this component.
446
- * The key is the unique identifier (UUID) of the world, and the value is the World instance.
447
- */
448
- list: DataMap<string, World>;
449
- /** {@link Component.enabled} */
450
- enabled: boolean;
451
- constructor(components: Components);
452
- /**
453
- * Creates a new instance of a SimpleWorld and adds it to the list of worlds.
454
- *
455
- * @template T - The type of the scene, extending from BaseScene. Defaults to BaseScene.
456
- * @template U - The type of the camera, extending from BaseCamera. Defaults to BaseCamera.
457
- * @template S - The type of the renderer, extending from BaseRenderer. Defaults to BaseRenderer.
458
- *
459
- * @throws {Error} - Throws an error if a world with the same UUID already exists in the list.
460
- */
461
- create<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer>(): SimpleWorld<T, U, S>;
462
- /**
463
- * Deletes a world from the list of worlds.
464
- *
465
- * @param {World} world - The world to be deleted.
466
- *
467
- * @throws {Error} - Throws an error if the provided world is not found in the list.
468
- */
469
- delete(world: World): void;
470
- /**
471
- * Disposes of the Worlds component and all its managed worlds.
472
- * This method sets the enabled flag to false, disposes of all worlds, clears the list,
473
- * and triggers the onDisposed event.
474
- */
475
- dispose(): void;
476
- /** {@link Updateable.update} */
477
- update(delta?: number): void | Promise<void>;
478
- }
479
479
  import * as THREE from "three";
480
480
  import { Components } from "../Components";
481
481
  import { MeshCullerRenderer } from "./src";
@@ -638,70 +638,6 @@ export declare class ConfigManager extends Component {
638
638
  constructor(components: Components);
639
639
  }
640
640
  import * as THREE from "three";
641
- import { Components } from "../Components";
642
- import { SimpleCamera } from "..";
643
- import { NavigationMode, NavModeID, ProjectionManager } from "./src";
644
- /**
645
- * A flexible camera that uses [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to control the camera in 2D and 3D. It supports multiple navigation modes, such as 2D floor plan navigation, first person and 3D orbit. This class extends the SimpleCamera class and adds additional functionality for managing different camera projections and navigation modes. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/OrthoPerspectiveCamera). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/OrthoPerspectiveCamera).
646
- */
647
- export declare class OrthoPerspectiveCamera extends SimpleCamera {
648
- /**
649
- * A ProjectionManager instance that manages the projection modes of the camera.
650
- */
651
- readonly projection: ProjectionManager;
652
- /**
653
- * A THREE.OrthographicCamera instance that represents the orthographic camera.
654
- * This camera is used when the projection mode is set to orthographic.
655
- */
656
- readonly threeOrtho: THREE.OrthographicCamera;
657
- /**
658
- * A THREE.PerspectiveCamera instance that represents the perspective camera.
659
- * This camera is used when the projection mode is set to perspective.
660
- */
661
- readonly threePersp: THREE.PerspectiveCamera;
662
- protected readonly _userInputButtons: any;
663
- protected readonly _frustumSize = 50;
664
- protected readonly _navigationModes: Map<NavModeID, NavigationMode>;
665
- protected _mode: NavigationMode | null;
666
- private previousSize;
667
- /**
668
- * Getter for the current navigation mode.
669
- * Throws an error if the mode is not found or the camera is not initialized.
670
- *
671
- * @returns {NavigationMode} The current navigation mode.
672
- *
673
- * @throws {Error} Throws an error if the mode is not found or the camera is not initialized.
674
- */
675
- get mode(): NavigationMode;
676
- constructor(components: Components);
677
- /** {@link Disposable.dispose} */
678
- dispose(): void;
679
- /**
680
- * Sets a new {@link NavigationMode} and disables the previous one.
681
- *
682
- * @param mode - The {@link NavigationMode} to set.
683
- */
684
- set(mode: NavModeID): void;
685
- /**
686
- * Make the camera view fit all the specified meshes.
687
- *
688
- * @param meshes the meshes to fit. If it is not defined, it will
689
- * evaluate {@link Components.meshes}.
690
- * @param offset the distance to the fit object
691
- */
692
- fit(meshes: Iterable<THREE.Mesh>, offset?: number): Promise<void>;
693
- /**
694
- * Allows or prevents all user input.
695
- *
696
- * @param active - whether to enable or disable user inputs.
697
- */
698
- setUserInput(active: boolean): void;
699
- private disableUserInput;
700
- private enableUserInput;
701
- private newOrthoCamera;
702
- private setOrthoPerspCameraAspect;
703
- }
704
- import * as THREE from "three";
705
641
  import * as FRAGS from "@thatopen/fragments";
706
642
  import { Component, Components } from "../../core";
707
643
  /**
@@ -1014,56 +950,6 @@ export declare class BoundingBoxer extends Component implements Disposable {
1014
950
  addFragmentIdMap(fragmentIdMap: FRAGS.FragmentIdMap): void;
1015
951
  private static getFragmentBounds;
1016
952
  }
1017
- import { Component, Disposable, Event, Components } from "../../core";
1018
- /**
1019
- * 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).
1020
- */
1021
- export declare class Exploder extends Component implements Disposable {
1022
- /**
1023
- * A unique identifier for the component.
1024
- * This UUID is used to register the component within the Components system.
1025
- */
1026
- static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
1027
- /** {@link Disposable.onDisposed} */
1028
- readonly onDisposed: Event<unknown>;
1029
- /** {@link Component.enabled} */
1030
- enabled: boolean;
1031
- /**
1032
- * The height of the explosion animation.
1033
- * This property determines the vertical distance by which fragments are moved during the explosion.
1034
- * Default value is 10.
1035
- */
1036
- height: number;
1037
- /**
1038
- * The group name used for the explosion animation.
1039
- * This property specifies the group of fragments that will be affected by the explosion.
1040
- * Default value is "storeys".
1041
- */
1042
- groupName: string;
1043
- /**
1044
- * A set of strings representing the exploded items.
1045
- * This set is used to keep track of which items have been exploded.
1046
- */
1047
- list: Set<string>;
1048
- constructor(components: Components);
1049
- /** {@link Disposable.dispose} */
1050
- dispose(): void;
1051
- /**
1052
- * Sets the explosion state of the fragments.
1053
- *
1054
- * @param active - A boolean indicating whether to activate or deactivate the explosion.
1055
- *
1056
- * @remarks
1057
- * This method applies a vertical transformation to the fragments based on the 'active' parameter.
1058
- * If 'active' is true, the fragments are moved upwards by a distance determined by the 'height' property.
1059
- * If 'active' is false, the fragments are moved back to their original position.
1060
- *
1061
- * The method also keeps track of the exploded items using the 'list' set.
1062
- *
1063
- * @throws Will throw an error if the 'Classifier' or 'FragmentsManager' components are not found in the 'components' system.
1064
- */
1065
- set(active: boolean): void;
1066
- }
1067
953
  import * as THREE from "three";
1068
954
  import * as FRAGS from "@thatopen/fragments";
1069
955
  import { Disposable, Component, Event, Components } from "../../core";
@@ -1209,6 +1095,7 @@ export declare class Classifier extends Component implements Disposable {
1209
1095
  bySpatialStructure(model: FRAGS.FragmentsGroup, config?: {
1210
1096
  useProperties?: boolean;
1211
1097
  isolate?: Set<number>;
1098
+ systemName?: string;
1212
1099
  }): Promise<void>;
1213
1100
  /**
1214
1101
  * Sets the color of the specified fragments.
@@ -1238,6 +1125,120 @@ export declare class Classifier extends Component implements Disposable {
1238
1125
  resetColor(items: FRAGS.FragmentIdMap): void;
1239
1126
  protected saveItem(group: FRAGS.FragmentsGroup, systemName: string, className: string, expressID: number, parentID?: number | null): void;
1240
1127
  }
1128
+ import { Component, Disposable, Event, Components } from "../../core";
1129
+ /**
1130
+ * 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).
1131
+ */
1132
+ export declare class Exploder extends Component implements Disposable {
1133
+ /**
1134
+ * A unique identifier for the component.
1135
+ * This UUID is used to register the component within the Components system.
1136
+ */
1137
+ static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
1138
+ /** {@link Disposable.onDisposed} */
1139
+ readonly onDisposed: Event<unknown>;
1140
+ /** {@link Component.enabled} */
1141
+ enabled: boolean;
1142
+ /**
1143
+ * The height of the explosion animation.
1144
+ * This property determines the vertical distance by which fragments are moved during the explosion.
1145
+ * Default value is 10.
1146
+ */
1147
+ height: number;
1148
+ /**
1149
+ * The group name used for the explosion animation.
1150
+ * This property specifies the group of fragments that will be affected by the explosion.
1151
+ * Default value is "storeys".
1152
+ */
1153
+ groupName: string;
1154
+ /**
1155
+ * A set of strings representing the exploded items.
1156
+ * This set is used to keep track of which items have been exploded.
1157
+ */
1158
+ list: Set<string>;
1159
+ constructor(components: Components);
1160
+ /** {@link Disposable.dispose} */
1161
+ dispose(): void;
1162
+ /**
1163
+ * Sets the explosion state of the fragments.
1164
+ *
1165
+ * @param active - A boolean indicating whether to activate or deactivate the explosion.
1166
+ *
1167
+ * @remarks
1168
+ * This method applies a vertical transformation to the fragments based on the 'active' parameter.
1169
+ * If 'active' is true, the fragments are moved upwards by a distance determined by the 'height' property.
1170
+ * If 'active' is false, the fragments are moved back to their original position.
1171
+ *
1172
+ * The method also keeps track of the exploded items using the 'list' set.
1173
+ *
1174
+ * @throws Will throw an error if the 'Classifier' or 'FragmentsManager' components are not found in the 'components' system.
1175
+ */
1176
+ set(active: boolean): void;
1177
+ }
1178
+ import * as THREE from "three";
1179
+ import { Components } from "../Components";
1180
+ import { SimpleCamera } from "..";
1181
+ import { NavigationMode, NavModeID, ProjectionManager } from "./src";
1182
+ /**
1183
+ * A flexible camera that uses [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to control the camera in 2D and 3D. It supports multiple navigation modes, such as 2D floor plan navigation, first person and 3D orbit. This class extends the SimpleCamera class and adds additional functionality for managing different camera projections and navigation modes. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/OrthoPerspectiveCamera). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/OrthoPerspectiveCamera).
1184
+ */
1185
+ export declare class OrthoPerspectiveCamera extends SimpleCamera {
1186
+ /**
1187
+ * A ProjectionManager instance that manages the projection modes of the camera.
1188
+ */
1189
+ readonly projection: ProjectionManager;
1190
+ /**
1191
+ * A THREE.OrthographicCamera instance that represents the orthographic camera.
1192
+ * This camera is used when the projection mode is set to orthographic.
1193
+ */
1194
+ readonly threeOrtho: THREE.OrthographicCamera;
1195
+ /**
1196
+ * A THREE.PerspectiveCamera instance that represents the perspective camera.
1197
+ * This camera is used when the projection mode is set to perspective.
1198
+ */
1199
+ readonly threePersp: THREE.PerspectiveCamera;
1200
+ protected readonly _userInputButtons: any;
1201
+ protected readonly _frustumSize = 50;
1202
+ protected readonly _navigationModes: Map<NavModeID, NavigationMode>;
1203
+ protected _mode: NavigationMode | null;
1204
+ private previousSize;
1205
+ /**
1206
+ * Getter for the current navigation mode.
1207
+ * Throws an error if the mode is not found or the camera is not initialized.
1208
+ *
1209
+ * @returns {NavigationMode} The current navigation mode.
1210
+ *
1211
+ * @throws {Error} Throws an error if the mode is not found or the camera is not initialized.
1212
+ */
1213
+ get mode(): NavigationMode;
1214
+ constructor(components: Components);
1215
+ /** {@link Disposable.dispose} */
1216
+ dispose(): void;
1217
+ /**
1218
+ * Sets a new {@link NavigationMode} and disables the previous one.
1219
+ *
1220
+ * @param mode - The {@link NavigationMode} to set.
1221
+ */
1222
+ set(mode: NavModeID): void;
1223
+ /**
1224
+ * Make the camera view fit all the specified meshes.
1225
+ *
1226
+ * @param meshes the meshes to fit. If it is not defined, it will
1227
+ * evaluate {@link Components.meshes}.
1228
+ * @param offset the distance to the fit object
1229
+ */
1230
+ fit(meshes: Iterable<THREE.Mesh>, offset?: number): Promise<void>;
1231
+ /**
1232
+ * Allows or prevents all user input.
1233
+ *
1234
+ * @param active - whether to enable or disable user inputs.
1235
+ */
1236
+ setUserInput(active: boolean): void;
1237
+ private disableUserInput;
1238
+ private enableUserInput;
1239
+ private newOrthoCamera;
1240
+ private setOrthoPerspCameraAspect;
1241
+ }
1241
1242
  import * as FRAGS from "@thatopen/fragments";
1242
1243
  import { Components, Component } from "../../core";
1243
1244
  /**
@@ -1709,6 +1710,66 @@ export declare class IfcGeometryTiler extends Component implements Disposable {
1709
1710
  private streamGeometries;
1710
1711
  private registerGeometryData;
1711
1712
  }
1713
+ import * as FRAGS from "@thatopen/fragments";
1714
+ import { XMLParser } from "fast-xml-parser";
1715
+ import { Component, DataMap } from "../../core/Types";
1716
+ import { IDSCheckResult, IDSInfo, IDSSpecification, IfcVersion } from "./src";
1717
+ import { Components } from "../../core";
1718
+ /**
1719
+ * Component that manages Information Delivery Specification (IDS) data.
1720
+ * It provides functionality for importing, exporting, and manipulating IDS data.
1721
+ */
1722
+ export declare class IDSSpecifications extends Component {
1723
+ static uuid: "9f0b9f78-9b2e-481a-b766-2fbfd01f342c";
1724
+ enabled: boolean;
1725
+ static xmlParser: XMLParser;
1726
+ constructor(components: Components);
1727
+ readonly list: DataMap<string, IDSSpecification>;
1728
+ /**
1729
+ * Retrieves a FragmentIdMap based on the given IDSCheckResult array.
1730
+ * The map separates the IDs into two categories: pass and fail.
1731
+ *
1732
+ * @param model - The FragmentsGroup model from which to retrieve the fragment map.
1733
+ * @param result - An array of IDSCheckResult objects, each representing a check result.
1734
+ *
1735
+ * @returns An object containing two properties:
1736
+ * - 'pass': A FragmentIdMap that passed the checks.
1737
+ * - 'fail': A FragmentIdMap that failed the checks.
1738
+ */
1739
+ getFragmentIdMap(model: FRAGS.FragmentsGroup, result: IDSCheckResult[]): {
1740
+ pass: FRAGS.FragmentIdMap;
1741
+ fail: FRAGS.FragmentIdMap;
1742
+ };
1743
+ /**
1744
+ * Creates a new IDSSpecification instance and adds it to the list.
1745
+ *
1746
+ * @param name - The name of the IDSSpecification.
1747
+ * @param ifcVersion - An array of IfcVersion values that the specification supports.
1748
+ *
1749
+ * @returns The newly created IDSSpecification instance.
1750
+ */
1751
+ create(name: string, ifcVersion: IfcVersion[], identifier?: string): IDSSpecification;
1752
+ /**
1753
+ * Parses and processes an XML string containing Information Delivery Specification (IDS) data.
1754
+ * It creates IDSSpecification instances based on the parsed data and returns them in an array.
1755
+ * Also, the instances are added to the list array.
1756
+ *
1757
+ * @param data - The XML string to parse.
1758
+ *
1759
+ * @returns An array of IDSSpecification instances created from the parsed data.
1760
+ */
1761
+ load(data: string): IDSSpecification[];
1762
+ /**
1763
+ * Exports the IDSSpecifications data into an XML string.
1764
+ *
1765
+ * @param info - The metadata information for the exported XML.
1766
+ * @param specifications - An optional iterable of IDSSpecification instances to export.
1767
+ * If not provided, all specifications in the list will be exported.
1768
+ *
1769
+ * @returns A string containing the exported IDSSpecifications data in XML format.
1770
+ */
1771
+ export(info: IDSInfo, specifications?: Iterable<IDSSpecification>): string;
1772
+ }
1712
1773
  import * as WEBIFC from "web-ifc";
1713
1774
  import * as FRAG from "@thatopen/fragments";
1714
1775
  import { Component, Components } from "../../core";
@@ -1734,21 +1795,135 @@ export declare class IfcJsonExporter extends Component {
1734
1795
  */
1735
1796
  export(webIfc: WEBIFC.IfcAPI, modelID: number, indirect?: boolean, recursiveSpatial?: boolean): Promise<FRAG.IfcProperties>;
1736
1797
  }
1737
- import * as WEBIFC from "web-ifc";
1738
- import { FragmentsGroup } from "@thatopen/fragments";
1739
- import { Disposable, Event, Component, Components } from "../../core";
1740
- import { RelationsMap, ModelsRelationMap, InverseAttribute, IfcRelation } from "./src";
1798
+ import { XMLParser } from "fast-xml-parser";
1799
+ import { Component, Configurable, Disposable, Event, World, DataMap } from "../../core";
1800
+ import { BCFTopic, Topic, BCFTopicsConfigManager, BCFTopicsConfig } from "./src";
1801
+ import { Viewpoint } from "../../core/Viewpoints";
1741
1802
  /**
1742
- * 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).
1803
+ * BCFTopics manages Building Collaboration Format (BCF) data the engine.
1804
+ * It provides functionality for importing, exporting, and manipulating BCF data.
1743
1805
  */
1744
- export declare class IfcRelationsIndexer extends Component implements Disposable {
1806
+ export declare class BCFTopics extends Component implements Disposable, Configurable<BCFTopicsConfigManager, BCFTopicsConfig> {
1807
+ static uuid: "de977976-e4f6-4e4f-a01a-204727839802";
1808
+ enabled: boolean;
1809
+ static xmlParser: XMLParser;
1810
+ protected _defaultConfig: Required<BCFTopicsConfig>;
1811
+ config: BCFTopicsConfigManager;
1812
+ readonly list: DataMap<string, Topic>;
1813
+ readonly onSetup: Event<unknown>;
1814
+ isSetup: boolean;
1815
+ setup(config?: Partial<BCFTopicsConfig>): void;
1816
+ readonly onBCFImported: Event<Topic[]>;
1745
1817
  /**
1746
- * A unique identifier for the component.
1747
- * This UUID is used to register the component within the Components system.
1818
+ * Creates a new BCFTopic instance and adds it to the list.
1819
+ *
1820
+ * @param data - Optional partial BCFTopic object to initialize the new topic with.
1821
+ * If not provided, default values will be used.
1822
+ * @returns The newly created BCFTopic instance.
1748
1823
  */
1749
- static readonly uuid: "23a889ab-83b3-44a4-8bee-ead83438370b";
1750
- /** {@link Disposable.onDisposed} */
1751
- readonly onDisposed: Event<string>;
1824
+ create(data?: Partial<BCFTopic>): Topic;
1825
+ readonly onDisposed: Event<unknown>;
1826
+ /**
1827
+ * Disposes of the BCFTopics component and triggers the onDisposed event.
1828
+ *
1829
+ * @remarks
1830
+ * This method clears the list of topics and triggers the onDisposed event.
1831
+ * It also resets the onDisposed event listener.
1832
+ */
1833
+ dispose(): void;
1834
+ /**
1835
+ * Retrieves the unique set of topic types used across all topics.
1836
+ *
1837
+ * @returns A Set containing the unique topic types.
1838
+ */
1839
+ get usedTypes(): Set<string>;
1840
+ /**
1841
+ * Retrieves the unique set of topic statuses used across all topics.
1842
+ *
1843
+ * @returns A Set containing the unique topic statuses.
1844
+ */
1845
+ get usedStatuses(): Set<string>;
1846
+ /**
1847
+ * Retrieves the unique set of topic priorities used across all topics.
1848
+ *
1849
+ * @returns A Set containing the unique topic priorities.
1850
+ * Note: This method filters out any null or undefined priorities.
1851
+ */
1852
+ get usedPriorities(): Set<string | undefined>;
1853
+ /**
1854
+ * Retrieves the unique set of topic stages used across all topics.
1855
+ *
1856
+ * @returns A Set containing the unique topic stages.
1857
+ * Note: This method filters out any null or undefined stages.
1858
+ */
1859
+ get usedStages(): Set<string | undefined>;
1860
+ /**
1861
+ * Retrieves the unique set of users associated with topics.
1862
+ *
1863
+ * @returns A Set containing the unique users.
1864
+ * Note: This method collects users from the creation author, assigned to, modified author, and comment authors.
1865
+ */
1866
+ get usedUsers(): Set<string>;
1867
+ /**
1868
+ * Retrieves the unique set of labels used across all topics.
1869
+ *
1870
+ * @returns A Set containing the unique labels.
1871
+ */
1872
+ get usedLabels(): Set<string>;
1873
+ /**
1874
+ * Updates the set of extensions (types, statuses, priorities, labels, stages, users) based on the current topics.
1875
+ * This method iterates through each topic in the list and adds its properties to the corresponding sets in the config.
1876
+ */
1877
+ updateExtensions(): void;
1878
+ /**
1879
+ * Updates the references to viewpoints in the topics.
1880
+ * This function iterates through each topic and checks if the viewpoints exist in the viewpoints list.
1881
+ * If a viewpoint does not exist, it is removed from the topic's viewpoints.
1882
+ */
1883
+ updateViewpointReferences(): void;
1884
+ /**
1885
+ * Exports the given topics to a BCF (Building Collaboration Format) zip file.
1886
+ *
1887
+ * @param topics - The topics to export. Defaults to all topics in the list.
1888
+ * @returns A promise that resolves to a Blob containing the exported BCF zip file.
1889
+ */
1890
+ export(topics?: Iterable<Topic>): Promise<Blob>;
1891
+ private serializeExtensions;
1892
+ private processMarkupComment;
1893
+ private getMarkupComments;
1894
+ private getMarkupLabels;
1895
+ private getMarkupViewpoints;
1896
+ private getMarkupRelatedTopics;
1897
+ /**
1898
+ * Loads BCF (Building Collaboration Format) data into the engine.
1899
+ *
1900
+ * @param world - The default world where the viewpoints are going to be created.
1901
+ * @param data - The BCF data to load.
1902
+ *
1903
+ * @returns A promise that resolves to an object containing the created viewpoints and topics.
1904
+ *
1905
+ * @throws An error if the BCF version is not supported.
1906
+ */
1907
+ load(data: Uint8Array, world: World): Promise<{
1908
+ viewpoints: Viewpoint[];
1909
+ topics: Topic[];
1910
+ }>;
1911
+ }
1912
+ import * as WEBIFC from "web-ifc";
1913
+ import { FragmentsGroup } from "@thatopen/fragments";
1914
+ import { Disposable, Event, Component, Components } from "../../core";
1915
+ import { RelationsMap, ModelsRelationMap, InverseAttribute, IfcRelation, RelationsProcessingConfig, EntitiesRelatedEvent } from "./src";
1916
+ /**
1917
+ * 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).
1918
+ */
1919
+ export declare class IfcRelationsIndexer extends Component implements Disposable {
1920
+ /**
1921
+ * A unique identifier for the component.
1922
+ * This UUID is used to register the component within the Components system.
1923
+ */
1924
+ static readonly uuid: "23a889ab-83b3-44a4-8bee-ead83438370b";
1925
+ /** {@link Disposable.onDisposed} */
1926
+ readonly onDisposed: Event<string>;
1752
1927
  /**
1753
1928
  * Event triggered when relations for a model have been indexed.
1754
1929
  * This event provides the model's UUID and the relations map generated for that model.
@@ -1778,7 +1953,7 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
1778
1953
  constructor(components: Components);
1779
1954
  private onFragmentsDisposed;
1780
1955
  private indexRelations;
1781
- getAttributeIndex(inverseAttribute: InverseAttribute): number | null;
1956
+ getAttributeIndex(inverseAttribute: InverseAttribute): number;
1782
1957
  /**
1783
1958
  * Adds a relation map to the model's relations map.
1784
1959
  *
@@ -1804,7 +1979,7 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
1804
1979
  * representation of the relations indexed by entity expressIDs and relation types.
1805
1980
  * @throws An error if the model does not have properties loaded.
1806
1981
  */
1807
- process(model: FragmentsGroup): Promise<RelationsMap>;
1982
+ process(model: FragmentsGroup, config?: Partial<RelationsProcessingConfig>): Promise<RelationsMap>;
1808
1983
  /**
1809
1984
  * Processes a given model from a WebIfc API to index its IFC entities relations.
1810
1985
  *
@@ -1821,11 +1996,10 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
1821
1996
  *
1822
1997
  * @param model The 'FragmentsGroup' model containing the entity, or its UUID.
1823
1998
  * @param expressID The unique identifier of the entity within the model.
1824
- * @param relationName The IFC schema inverse attribute of the relation to search for (e.g., "IsDefinedBy", "ContainsElements").
1825
- * @returns An array of express IDs representing the related entities, or 'null' if no relations are found
1826
- * or the specified relation name is not indexed.
1999
+ * @param attribute The IFC schema inverse attribute of the relation to search for (e.g., "IsDefinedBy", "ContainsElements").
2000
+ * @returns An array of express IDs representing the related entities. If the array is empty, no relations were found.
1827
2001
  */
1828
- getEntityRelations(model: FragmentsGroup | string, expressID: number, relationName: InverseAttribute): number[] | null;
2002
+ getEntityRelations(model: FragmentsGroup | string | RelationsMap, expressID: number, attribute: InverseAttribute): number[];
1829
2003
  /**
1830
2004
  * Serializes the relations of a given relation map into a JSON string.
1831
2005
  * This method iterates through the relations in the given map, organizing them into a structured object where each key is an expressID of an entity,
@@ -1902,7 +2076,7 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
1902
2076
  * Converts the relations made into actual IFC data.
1903
2077
  *
1904
2078
  * @remarks This function iterates through the changes made to the relations and applies them to the corresponding BIM model.
1905
- * It only make sense to use if the relations need to be write in the IFC file.
2079
+ * It only make sense to use it if the relations need to be write in the IFC file.
1906
2080
  *
1907
2081
  * @returns A promise that resolves when all the relation changes have been applied.
1908
2082
  */
@@ -1913,16 +2087,7 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
1913
2087
  * The event provides information about the type of relation, the inverse attribute,
1914
2088
  * the IDs of the entities related, and the IDs of the entities that are being related.
1915
2089
  */
1916
- readonly onEntitiesRelated: Event<{
1917
- /** The type of the IFC relation. */
1918
- relType: IfcRelation;
1919
- /** The inverse attribute of the relation. */
1920
- invAttribute: InverseAttribute;
1921
- /** The IDs of the entities that are relating. */
1922
- relatingIDs: number[];
1923
- /** The IDs of the entities that are being related. */
1924
- relatedIDs: number[];
1925
- }>;
2090
+ readonly onEntitiesRelated: Event<EntitiesRelatedEvent>;
1926
2091
  addEntitiesRelation(model: FragmentsGroup, relatingID: number, rel: {
1927
2092
  type: IfcRelation;
1928
2093
  inv: InverseAttribute;
@@ -2221,120 +2386,6 @@ export declare class IfcPropertiesManager extends Component implements Disposabl
2221
2386
  private registerChange;
2222
2387
  private newSingleProperty;
2223
2388
  }
2224
- import { XMLParser } from "fast-xml-parser";
2225
- import { Component, Configurable, Disposable, Event, World, DataMap } from "../../core";
2226
- import { BCFTopic, Topic, BCFTopicsConfigManager, BCFTopicsConfig } from "./src";
2227
- import { Viewpoint } from "../../core/Viewpoints";
2228
- /**
2229
- * BCFTopics manages Building Collaboration Format (BCF) data the engine.
2230
- * It provides functionality for importing, exporting, and manipulating BCF data.
2231
- */
2232
- export declare class BCFTopics extends Component implements Disposable, Configurable<BCFTopicsConfigManager, BCFTopicsConfig> {
2233
- static uuid: "de977976-e4f6-4e4f-a01a-204727839802";
2234
- enabled: boolean;
2235
- static xmlParser: XMLParser;
2236
- protected _defaultConfig: Required<BCFTopicsConfig>;
2237
- config: BCFTopicsConfigManager;
2238
- readonly list: DataMap<string, Topic>;
2239
- readonly onSetup: Event<unknown>;
2240
- isSetup: boolean;
2241
- setup(config?: Partial<BCFTopicsConfig>): void;
2242
- readonly onBCFImported: Event<Topic[]>;
2243
- /**
2244
- * Creates a new BCFTopic instance and adds it to the list.
2245
- *
2246
- * @param data - Optional partial BCFTopic object to initialize the new topic with.
2247
- * If not provided, default values will be used.
2248
- * @returns The newly created BCFTopic instance.
2249
- */
2250
- create(data?: Partial<BCFTopic>): Topic;
2251
- readonly onDisposed: Event<unknown>;
2252
- /**
2253
- * Disposes of the BCFTopics component and triggers the onDisposed event.
2254
- *
2255
- * @remarks
2256
- * This method clears the list of topics and triggers the onDisposed event.
2257
- * It also resets the onDisposed event listener.
2258
- */
2259
- dispose(): void;
2260
- /**
2261
- * Retrieves the unique set of topic types used across all topics.
2262
- *
2263
- * @returns A Set containing the unique topic types.
2264
- */
2265
- get usedTypes(): Set<string>;
2266
- /**
2267
- * Retrieves the unique set of topic statuses used across all topics.
2268
- *
2269
- * @returns A Set containing the unique topic statuses.
2270
- */
2271
- get usedStatuses(): Set<string>;
2272
- /**
2273
- * Retrieves the unique set of topic priorities used across all topics.
2274
- *
2275
- * @returns A Set containing the unique topic priorities.
2276
- * Note: This method filters out any null or undefined priorities.
2277
- */
2278
- get usedPriorities(): Set<string | undefined>;
2279
- /**
2280
- * Retrieves the unique set of topic stages used across all topics.
2281
- *
2282
- * @returns A Set containing the unique topic stages.
2283
- * Note: This method filters out any null or undefined stages.
2284
- */
2285
- get usedStages(): Set<string | undefined>;
2286
- /**
2287
- * Retrieves the unique set of users associated with topics.
2288
- *
2289
- * @returns A Set containing the unique users.
2290
- * Note: This method collects users from the creation author, assigned to, modified author, and comment authors.
2291
- */
2292
- get usedUsers(): Set<string>;
2293
- /**
2294
- * Retrieves the unique set of labels used across all topics.
2295
- *
2296
- * @returns A Set containing the unique labels.
2297
- */
2298
- get usedLabels(): Set<string>;
2299
- /**
2300
- * Updates the set of extensions (types, statuses, priorities, labels, stages, users) based on the current topics.
2301
- * This method iterates through each topic in the list and adds its properties to the corresponding sets in the config.
2302
- */
2303
- updateExtensions(): void;
2304
- /**
2305
- * Updates the references to viewpoints in the topics.
2306
- * This function iterates through each topic and checks if the viewpoints exist in the viewpoints list.
2307
- * If a viewpoint does not exist, it is removed from the topic's viewpoints.
2308
- */
2309
- updateViewpointReferences(): void;
2310
- /**
2311
- * Exports the given topics to a BCF (Building Collaboration Format) zip file.
2312
- *
2313
- * @param topics - The topics to export. Defaults to all topics in the list.
2314
- * @returns A promise that resolves to a Blob containing the exported BCF zip file.
2315
- */
2316
- export(topics?: Iterable<Topic>): Promise<Blob>;
2317
- private serializeExtensions;
2318
- private processMarkupComment;
2319
- private getMarkupComments;
2320
- private getMarkupLabels;
2321
- private getMarkupViewpoints;
2322
- private getMarkupRelatedTopics;
2323
- /**
2324
- * Loads BCF (Building Collaboration Format) data into the engine.
2325
- *
2326
- * @param world - The default world where the viewpoints are going to be created.
2327
- * @param data - The BCF data to load.
2328
- *
2329
- * @returns A promise that resolves to an object containing the created viewpoints and topics.
2330
- *
2331
- * @throws An error if the BCF version is not supported.
2332
- */
2333
- load(data: Uint8Array, world: World): Promise<{
2334
- viewpoints: Viewpoint[];
2335
- topics: Topic[];
2336
- }>;
2337
- }
2338
2389
  import { Component, Components } from "../../core";
2339
2390
  import { IfcQueryGroup } from "./src/ifc-query-group";
2340
2391
  import { IfcFinderQuery } from "./src";
@@ -2384,90 +2435,30 @@ export declare class IfcFinder extends Component {
2384
2435
  */
2385
2436
  clear(): void;
2386
2437
  }
2387
- import * as FRAGS from "@thatopen/fragments";
2388
- import { XMLParser } from "fast-xml-parser";
2389
- import { Component, DataMap } from "../../core/Types";
2390
- import { IDSCheckResult, IDSInfo, IDSSpecification, IfcVersion } from "./src";
2391
- import { Components } from "../../core";
2438
+ import * as THREE from "three";
2439
+ export declare function obbFromPoints(vertices: ArrayLike<number>): {
2440
+ center: THREE.Vector3;
2441
+ halfSizes: THREE.Vector3;
2442
+ rotation: THREE.Matrix3;
2443
+ transformation: THREE.Matrix4;
2444
+ };
2445
+ import * as THREE from "three";
2446
+ export declare class MaterialsUtils {
2447
+ static isTransparent(material: THREE.Material): boolean;
2448
+ }
2449
+ export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
2450
+ export declare class UUID {
2451
+ private static _pattern;
2452
+ private static _lut;
2453
+ static create(): string;
2454
+ static validate(uuid: string): void;
2455
+ }
2456
+ import * as THREE from "three";
2457
+ import { Component, Components, Disposable, Event, World } from "../core";
2392
2458
  /**
2393
- * Component that manages Information Delivery Specification (IDS) data.
2394
- * It provides functionality for importing, exporting, and manipulating IDS data.
2459
+ * Configuration interface for the VertexPicker component.
2395
2460
  */
2396
- export declare class IDSSpecifications extends Component {
2397
- static uuid: "9f0b9f78-9b2e-481a-b766-2fbfd01f342c";
2398
- enabled: boolean;
2399
- static xmlParser: XMLParser;
2400
- constructor(components: Components);
2401
- readonly list: DataMap<string, IDSSpecification>;
2402
- /**
2403
- * Retrieves a FragmentIdMap based on the given IDSCheckResult array.
2404
- * The map separates the IDs into two categories: pass and fail.
2405
- *
2406
- * @param model - The FragmentsGroup model from which to retrieve the fragment map.
2407
- * @param result - An array of IDSCheckResult objects, each representing a check result.
2408
- *
2409
- * @returns An object containing two properties:
2410
- * - 'pass': A FragmentIdMap that passed the checks.
2411
- * - 'fail': A FragmentIdMap that failed the checks.
2412
- */
2413
- getFragmentIdMap(model: FRAGS.FragmentsGroup, result: IDSCheckResult[]): {
2414
- pass: FRAGS.FragmentIdMap;
2415
- fail: FRAGS.FragmentIdMap;
2416
- };
2417
- /**
2418
- * Creates a new IDSSpecification instance and adds it to the list.
2419
- *
2420
- * @param name - The name of the IDSSpecification.
2421
- * @param ifcVersion - An array of IfcVersion values that the specification supports.
2422
- *
2423
- * @returns The newly created IDSSpecification instance.
2424
- */
2425
- create(name: string, ifcVersion: IfcVersion[], identifier?: string): IDSSpecification;
2426
- /**
2427
- * Parses and processes an XML string containing Information Delivery Specification (IDS) data.
2428
- * It creates IDSSpecification instances based on the parsed data and returns them in an array.
2429
- * Also, the instances are added to the list array.
2430
- *
2431
- * @param data - The XML string to parse.
2432
- *
2433
- * @returns An array of IDSSpecification instances created from the parsed data.
2434
- */
2435
- load(data: string): IDSSpecification[];
2436
- /**
2437
- * Exports the IDSSpecifications data into an XML string.
2438
- *
2439
- * @param info - The metadata information for the exported XML.
2440
- * @param specifications - An optional iterable of IDSSpecification instances to export.
2441
- * If not provided, all specifications in the list will be exported.
2442
- *
2443
- * @returns A string containing the exported IDSSpecifications data in XML format.
2444
- */
2445
- export(info: IDSInfo, specifications?: Iterable<IDSSpecification>): string;
2446
- }
2447
- import * as THREE from "three";
2448
- export declare function obbFromPoints(vertices: ArrayLike<number>): {
2449
- center: THREE.Vector3;
2450
- halfSizes: THREE.Vector3;
2451
- rotation: THREE.Matrix3;
2452
- transformation: THREE.Matrix4;
2453
- };
2454
- export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
2455
- import * as THREE from "three";
2456
- export declare class MaterialsUtils {
2457
- static isTransparent(material: THREE.Material): boolean;
2458
- }
2459
- export declare class UUID {
2460
- private static _pattern;
2461
- private static _lut;
2462
- static create(): string;
2463
- static validate(uuid: string): void;
2464
- }
2465
- import * as THREE from "three";
2466
- import { Component, Components, Disposable, Event, World } from "../core";
2467
- /**
2468
- * Configuration interface for the VertexPicker component.
2469
- */
2470
- export interface VertexPickerConfig {
2461
+ export interface VertexPickerConfig {
2471
2462
  /**
2472
2463
  * If true, only vertices will be picked, not the closest point on the face.
2473
2464
  */
@@ -2635,66 +2626,12 @@ export declare class ClipperConfigManager extends Configurator<Clipper, ClipperC
2635
2626
  }
2636
2627
  export {};
2637
2628
  import * as WEBIFC from "web-ifc";
2638
- /** Configuration of the IFC-fragment conversion. */
2639
- export declare class IfcFragmentSettings {
2640
- /** Whether to extract the IFC properties into a JSON. */
2641
- includeProperties: boolean;
2642
- /**
2643
- * Generate the geometry for categories that are not included by default,
2644
- * like IFCSPACE.
2645
- */
2646
- optionalCategories: number[];
2647
- /** Path of the WASM for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
2648
- wasm: {
2649
- path: string;
2650
- absolute: boolean;
2651
- logLevel?: WEBIFC.LogLevel;
2652
- };
2653
- /** List of categories that won't be converted to fragments. */
2654
- excludedCategories: Set<number>;
2655
- /** Exclusive list of categories that will be converted to fragments. If this contains any category, any other categories will be ignored. */
2656
- includedCategories: Set<number>;
2657
- /** Whether to save the absolute location of all IFC items. */
2658
- saveLocations: boolean;
2659
- /** Loader settings for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
2660
- webIfc: WEBIFC.LoaderSettings;
2661
- /**
2662
- * Whether to automatically set the path to the WASM file for [web-ifc](https://github.com/ThatOpen/engine_web-ifc).
2663
- * If set to true, the path will be set to the default path of the WASM file.
2664
- * If set to false, the path must be provided manually in the 'wasm.path' property.
2665
- * Default value is true.
2666
- */
2667
- autoSetWasm: boolean;
2668
- /**
2669
- * Custom function to handle the file location for [web-ifc](https://github.com/ThatOpen/engine_web-ifc).
2670
- * This function will be called when [web-ifc](https://github.com/ThatOpen/engine_web-ifc) needs to locate a file.
2671
- * If set to null, the default file location handler will be used.
2672
- *
2673
- * @param url - The URL of the file to locate.
2674
- * @returns The absolute path of the file.
2675
- */
2676
- customLocateFileHandler: WEBIFC.LocateFileHandlerFn | null;
2677
- }
2678
- import * as FRAGS from "@thatopen/fragments";
2679
- import * as WEBIFC from "web-ifc";
2680
- export declare class SpatialIdsFinder {
2681
- static get(model: FRAGS.FragmentsGroup, webIfc: WEBIFC.IfcAPI): void;
2682
- }
2683
- import * as WEBIFC from "web-ifc";
2684
2629
  export interface IfcItemsCategories {
2685
2630
  [itemID: number]: number;
2686
2631
  }
2687
2632
  export declare class IfcCategories {
2688
2633
  getAll(webIfc: WEBIFC.IfcAPI, modelID: number): IfcItemsCategories;
2689
2634
  }
2690
- import * as WEBIFC from "web-ifc";
2691
- import { IfcItemsCategories } from "../../../ifc";
2692
- export declare class SpatialStructure {
2693
- itemsByFloor: IfcItemsCategories;
2694
- private _units;
2695
- setUp(webIfc: WEBIFC.IfcAPI): void;
2696
- cleanUp(): void;
2697
- }
2698
2635
  /**
2699
2636
  * A map of IFC element types to their corresponding names. The keys are the IFC entity type numbers, and the values are the names of the IFC entities.
2700
2637
  *
@@ -2740,13 +2677,6 @@ export declare class IfcPropertiesUtils {
2740
2677
  export declare const ifcCategoryCase: {
2741
2678
  [upperCase: string]: string;
2742
2679
  };
2743
- import { Components } from "../../../../core/Components";
2744
- import { IDSFacet } from "../facets";
2745
- export declare const createPropertyFacets: (components: Components, elements: any) => IDSFacet[];
2746
- /**
2747
- * A Set of unique numbers representing different types of IFC geometries.
2748
- */
2749
- export declare const GeometryTypes: Set<number>;
2750
2680
  import * as FRAGS from "@thatopen/fragments";
2751
2681
  import { IfcFinderQuery } from "./ifc-finder-query";
2752
2682
  import { Components } from "../../../core";
@@ -2816,6 +2746,72 @@ export declare class IfcQueryGroup {
2816
2746
  */
2817
2747
  update(modelID: string, file: File): Promise<void>;
2818
2748
  }
2749
+ import * as WEBIFC from "web-ifc";
2750
+ import { IfcItemsCategories } from "../../../ifc";
2751
+ export declare class SpatialStructure {
2752
+ itemsByFloor: IfcItemsCategories;
2753
+ private _units;
2754
+ setUp(webIfc: WEBIFC.IfcAPI): void;
2755
+ cleanUp(): void;
2756
+ }
2757
+ import * as WEBIFC from "web-ifc";
2758
+ /** Configuration of the IFC-fragment conversion. */
2759
+ export declare class IfcFragmentSettings {
2760
+ /** Whether to extract the IFC properties into a JSON. */
2761
+ includeProperties: boolean;
2762
+ /**
2763
+ * Generate the geometry for categories that are not included by default,
2764
+ * like IFCSPACE.
2765
+ */
2766
+ optionalCategories: number[];
2767
+ /** Path of the WASM for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
2768
+ wasm: {
2769
+ path: string;
2770
+ absolute: boolean;
2771
+ logLevel?: WEBIFC.LogLevel;
2772
+ };
2773
+ /** List of categories that won't be converted to fragments. */
2774
+ excludedCategories: Set<number>;
2775
+ /** Exclusive list of categories that will be converted to fragments. If this contains any category, any other categories will be ignored. */
2776
+ includedCategories: Set<number>;
2777
+ /** Whether to save the absolute location of all IFC items. */
2778
+ saveLocations: boolean;
2779
+ /** Loader settings for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
2780
+ webIfc: WEBIFC.LoaderSettings;
2781
+ /**
2782
+ * Whether to automatically set the path to the WASM file for [web-ifc](https://github.com/ThatOpen/engine_web-ifc).
2783
+ * If set to true, the path will be set to the default path of the WASM file.
2784
+ * If set to false, the path must be provided manually in the 'wasm.path' property.
2785
+ * Default value is true.
2786
+ */
2787
+ autoSetWasm: boolean;
2788
+ /**
2789
+ * Custom function to handle the file location for [web-ifc](https://github.com/ThatOpen/engine_web-ifc).
2790
+ * This function will be called when [web-ifc](https://github.com/ThatOpen/engine_web-ifc) needs to locate a file.
2791
+ * If set to null, the default file location handler will be used.
2792
+ *
2793
+ * @param url - The URL of the file to locate.
2794
+ * @returns The absolute path of the file.
2795
+ */
2796
+ customLocateFileHandler: WEBIFC.LocateFileHandlerFn | null;
2797
+ }
2798
+ import * as FRAGS from "@thatopen/fragments";
2799
+ import * as WEBIFC from "web-ifc";
2800
+ export declare class SpatialIdsFinder {
2801
+ static get(model: FRAGS.FragmentsGroup, webIfc: WEBIFC.IfcAPI): void;
2802
+ }
2803
+ /**
2804
+ * A Set of unique numbers representing different types of IFC geometries.
2805
+ */
2806
+ export declare const GeometryTypes: Set<number>;
2807
+ import { InverseAttribute } from "./types";
2808
+ export declare const relToAttributesMap: Map<160246688 | 2655215786 | 919958153 | 1307041759 | 4186316022 | 781010003 | 307848117 | 3242617779 | 279856033 | 1204542856 | 2857406711 | 2565941209 | 2495723537 | 3268803585 | 982818633, {
2809
+ forRelating: InverseAttribute;
2810
+ forRelated: InverseAttribute;
2811
+ }>;
2812
+ import { Components } from "../../../../core/Components";
2813
+ import { IDSFacet } from "../facets";
2814
+ export declare const createPropertyFacets: (components: Components, elements: any) => IDSFacet[];
2819
2815
  /**
2820
2816
  * 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.
2821
2817
  */
@@ -2844,11 +2840,6 @@ export declare class Event<T> {
2844
2840
  reset(): void;
2845
2841
  private handlers;
2846
2842
  }
2847
- import { InverseAttribute } from "./types";
2848
- export declare const relToAttributesMap: Map<160246688 | 2655215786 | 919958153 | 1307041759 | 4186316022 | 781010003 | 307848117 | 3242617779 | 279856033 | 1204542856 | 2857406711 | 2565941209 | 2495723537 | 3268803585 | 982818633, {
2849
- forRelating: InverseAttribute;
2850
- forRelated: InverseAttribute;
2851
- }>;
2852
2843
  /**
2853
2844
  * 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.
2854
2845
  */
@@ -3016,29 +3007,6 @@ export declare abstract class Base {
3016
3007
  /** Whether is component is {@link Configurable}. */
3017
3008
  isConfigurable: () => this is Configurable<any, any>;
3018
3009
  }
3019
- import { Base } from "./base";
3020
- import { World } from "./world";
3021
- import { Event } from "./event";
3022
- import { Components } from "../../Components";
3023
- /**
3024
- * One of the elements that make a world. It can be either a scene, a camera or a renderer.
3025
- */
3026
- export declare abstract class BaseWorldItem extends Base {
3027
- readonly worlds: Map<string, World>;
3028
- /**
3029
- * Event that is triggered when a world is added or removed from the 'worlds' map.
3030
- * The event payload contains the world instance and the action ("added" or "removed").
3031
- */
3032
- readonly onWorldChanged: Event<{
3033
- world: World;
3034
- action: "added" | "removed";
3035
- }>;
3036
- /**
3037
- * The current world this item is associated with. It can be null if no world is currently active.
3038
- */
3039
- currentWorld: World | null;
3040
- protected constructor(components: Components);
3041
- }
3042
3010
  import * as THREE from "three";
3043
3011
  import CameraControls from "camera-controls";
3044
3012
  import { BaseWorldItem } from "./base-world-item";
@@ -3067,6 +3035,29 @@ export declare abstract class BaseCamera extends BaseWorldItem {
3067
3035
  */
3068
3036
  hasCameraControls: () => this is CameraControllable;
3069
3037
  }
3038
+ import { Base } from "./base";
3039
+ import { World } from "./world";
3040
+ import { Event } from "./event";
3041
+ import { Components } from "../../Components";
3042
+ /**
3043
+ * One of the elements that make a world. It can be either a scene, a camera or a renderer.
3044
+ */
3045
+ export declare abstract class BaseWorldItem extends Base {
3046
+ readonly worlds: Map<string, World>;
3047
+ /**
3048
+ * Event that is triggered when a world is added or removed from the 'worlds' map.
3049
+ * The event payload contains the world instance and the action ("added" or "removed").
3050
+ */
3051
+ readonly onWorldChanged: Event<{
3052
+ world: World;
3053
+ action: "added" | "removed";
3054
+ }>;
3055
+ /**
3056
+ * The current world this item is associated with. It can be null if no world is currently active.
3057
+ */
3058
+ currentWorld: World | null;
3059
+ protected constructor(components: Components);
3060
+ }
3070
3061
  import * as THREE from "three";
3071
3062
  import { Vector2 } from "three";
3072
3063
  import { Event } from "./event";
@@ -3157,50 +3148,16 @@ export declare abstract class BaseScene extends BaseWorldItem implements Disposa
3157
3148
  dispose(): void;
3158
3149
  deleteAllLights(): void;
3159
3150
  }
3160
- import * as THREE from "three";
3161
- import { BaseScene } from "./base-scene";
3162
- import { BaseCamera } from "./base-camera";
3163
- import { BaseRenderer } from "./base-renderer";
3164
- import { Updateable, Disposable } from "./interfaces";
3151
+ import { Event } from "./event";
3165
3152
  /**
3166
- * Represents a 3D world with meshes, scene, camera, renderer, and other properties.
3153
+ * A class that extends the built-in Set class and provides additional functionality.
3154
+ * It triggers events when items are added, deleted, or the set is cleared.
3155
+ *
3156
+ * @template T - The type of elements in the set.
3167
3157
  */
3168
- export interface World extends Disposable, Updateable {
3158
+ export declare class DataSet<T> extends Set<T> {
3169
3159
  /**
3170
- * A set of meshes present in the world. This is taken into account for operations like raycasting.
3171
- */
3172
- meshes: Set<THREE.Mesh>;
3173
- /**
3174
- * The base scene of the world.
3175
- */
3176
- scene: BaseScene;
3177
- /**
3178
- * The base camera of the world.
3179
- */
3180
- camera: BaseCamera;
3181
- /**
3182
- * The base renderer of the world. Can be null if this world doesn't use a renderer (e.g. in a backend environment).
3183
- */
3184
- renderer: BaseRenderer | null;
3185
- /**
3186
- * A unique identifier for the world.
3187
- */
3188
- uuid: string;
3189
- /**
3190
- * Indicates whether the world is currently disposing. This is useful for cancelling logic that access the elements of a world (which are also disposed).
3191
- */
3192
- isDisposing: boolean;
3193
- }
3194
- import { Event } from "./event";
3195
- /**
3196
- * A class that extends the built-in Set class and provides additional functionality.
3197
- * It triggers events when items are added, deleted, or the set is cleared.
3198
- *
3199
- * @template T - The type of elements in the set.
3200
- */
3201
- export declare class DataSet<T> extends Set<T> {
3202
- /**
3203
- * An event that is triggered when a new item is added to the set.
3160
+ * An event that is triggered when a new item is added to the set.
3204
3161
  */
3205
3162
  readonly onItemAdded: Event<T>;
3206
3163
  /**
@@ -3250,6 +3207,40 @@ export declare class DataSet<T> extends Set<T> {
3250
3207
  */
3251
3208
  dispose(): void;
3252
3209
  }
3210
+ import * as THREE from "three";
3211
+ import { BaseScene } from "./base-scene";
3212
+ import { BaseCamera } from "./base-camera";
3213
+ import { BaseRenderer } from "./base-renderer";
3214
+ import { Updateable, Disposable } from "./interfaces";
3215
+ /**
3216
+ * Represents a 3D world with meshes, scene, camera, renderer, and other properties.
3217
+ */
3218
+ export interface World extends Disposable, Updateable {
3219
+ /**
3220
+ * A set of meshes present in the world. This is taken into account for operations like raycasting.
3221
+ */
3222
+ meshes: Set<THREE.Mesh>;
3223
+ /**
3224
+ * The base scene of the world.
3225
+ */
3226
+ scene: BaseScene;
3227
+ /**
3228
+ * The base camera of the world.
3229
+ */
3230
+ camera: BaseCamera;
3231
+ /**
3232
+ * The base renderer of the world. Can be null if this world doesn't use a renderer (e.g. in a backend environment).
3233
+ */
3234
+ renderer: BaseRenderer | null;
3235
+ /**
3236
+ * A unique identifier for the world.
3237
+ */
3238
+ uuid: string;
3239
+ /**
3240
+ * Indicates whether the world is currently disposing. This is useful for cancelling logic that access the elements of a world (which are also disposed).
3241
+ */
3242
+ isDisposing: boolean;
3243
+ }
3253
3244
  import { Event } from "./event";
3254
3245
  /**
3255
3246
  * A class that extends the built-in Map class and provides additional events for item set, update, delete, and clear operations.
@@ -3377,364 +3368,217 @@ export interface ControlsSchema {
3377
3368
  [name: string]: ControlEntry | ControlsSchema;
3378
3369
  }
3379
3370
  import * as THREE from "three";
3380
- import { Hideable, Event, World, Disposable, Configurable } from "../../Types";
3371
+ import { Resizeable, Updateable, World, Event, Disposable, Configurable } from "../../Types";
3372
+ import { MiniMapConfig, MiniMapConfigManager } from "./mini-map-config";
3381
3373
  import { Components } from "../../Components";
3382
- import { SimpleGridConfig, SimpleGridConfigManager } from "./simple-grid-config";
3383
3374
  /**
3384
- * 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).
3375
+ * A class representing a 2D minimap of a 3D world.
3385
3376
  */
3386
- export declare class SimpleGrid implements Hideable, Disposable, Configurable<SimpleGridConfigManager, SimpleGridConfig> {
3377
+ export declare class MiniMap implements Resizeable, Updateable, Disposable, Configurable<MiniMapConfigManager, MiniMapConfig> {
3387
3378
  /** {@link Disposable.onDisposed} */
3388
3379
  readonly onDisposed: Event<unknown>;
3380
+ /** {@link Updateable.onAfterUpdate} */
3381
+ readonly onAfterUpdate: Event<unknown>;
3382
+ /** {@link Updateable.onBeforeUpdate} */
3383
+ readonly onBeforeUpdate: Event<unknown>;
3384
+ /** {@link Resizeable.onResize} */
3385
+ readonly onResize: Event<THREE.Vector2>;
3389
3386
  /** {@link Configurable.onSetup} */
3390
3387
  readonly onSetup: Event<unknown>;
3391
- /** {@link Configurable.isSetup} */
3392
- isSetup: boolean;
3393
- /** The world instance to which this Raycaster belongs. */
3388
+ /**
3389
+ * The front offset of the minimap.
3390
+ * It determines how much the minimap's view is offset from the camera's view.
3391
+ * By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
3392
+ */
3393
+ frontOffset: number;
3394
+ /**
3395
+ * The override material for the minimap.
3396
+ * It is used to render the depth information of the world onto the minimap.
3397
+ */
3398
+ overrideMaterial: THREE.MeshDepthMaterial;
3399
+ /**
3400
+ * The background color of the minimap.
3401
+ * It is used to set the background color of the minimap's renderer.
3402
+ */
3403
+ backgroundColor: THREE.Color;
3404
+ /**
3405
+ * The WebGL renderer for the minimap.
3406
+ * It is used to render the minimap onto the screen.
3407
+ */
3408
+ renderer: THREE.WebGLRenderer;
3409
+ /**
3410
+ * A flag indicating whether the minimap is enabled.
3411
+ * If disabled, the minimap will not update or render.
3412
+ */
3413
+ enabled: boolean;
3414
+ /**
3415
+ * The world in which the minimap is displayed.
3416
+ * It provides access to the 3D scene, camera, and other relevant world elements.
3417
+ */
3394
3418
  world: World;
3395
- /** The components instance to which this grid belongs. */
3396
- components: Components;
3397
3419
  /** {@link Configurable.config} */
3398
- config: SimpleGridConfigManager;
3399
- protected _defaultConfig: SimpleGridConfig;
3400
- /** {@link Hideable.visible} */
3401
- get visible(): boolean;
3402
- /** {@link Hideable.visible} */
3403
- set visible(visible: boolean);
3404
- /** The material of the grid. */
3405
- get material(): THREE.ShaderMaterial;
3420
+ config: MiniMapConfigManager;
3421
+ /** {@link Configurable.isSetup} */
3422
+ isSetup: boolean;
3423
+ protected _defaultConfig: MiniMapConfig;
3424
+ private _lockRotation;
3425
+ private _size;
3426
+ private _camera;
3427
+ private _plane;
3428
+ private _tempVector1;
3429
+ private _tempVector2;
3430
+ private _tempTarget;
3431
+ private readonly down;
3406
3432
  /**
3407
- * Whether the grid should fade away with distance. Recommended to be true for
3408
- * perspective cameras and false for orthographic cameras.
3433
+ * Gets or sets whether the minimap rotation is locked.
3434
+ * When rotation is locked, the minimap will always face the same direction as the camera.
3409
3435
  */
3410
- get fade(): boolean;
3436
+ get lockRotation(): boolean;
3411
3437
  /**
3412
- * Whether the grid should fade away with distance. Recommended to be true for
3413
- * perspective cameras and false for orthographic cameras.
3438
+ * Sets whether the minimap rotation is locked.
3439
+ * When rotation is locked, the minimap will always face the same direction as the camera.
3440
+ * @param active - If 'true', rotation is locked. If 'false', rotation is not locked.
3414
3441
  */
3415
- set fade(active: boolean);
3416
- /** The Three.js mesh that contains the infinite grid. */
3417
- readonly three: THREE.Mesh;
3418
- private _fade;
3419
- constructor(components: Components, world: World);
3420
- /** {@link Configurable.setup} */
3421
- setup(config?: Partial<SimpleGridConfig>): void;
3442
+ set lockRotation(active: boolean);
3443
+ /**
3444
+ * Gets the current zoom level of the minimap.
3445
+ * The zoom level determines how much of the world is visible on the minimap.
3446
+ * @returns The current zoom level of the minimap.
3447
+ */
3448
+ get zoom(): number;
3449
+ /**
3450
+ * Sets the zoom level of the minimap.
3451
+ * The zoom level determines how much of the world is visible on the minimap.
3452
+ * @param value - The new zoom level of the minimap.
3453
+ */
3454
+ set zoom(value: number);
3455
+ constructor(world: World, components: Components);
3422
3456
  /** {@link Disposable.dispose} */
3423
3457
  dispose(): void;
3424
- private setupEvents;
3425
- private updateZoom;
3458
+ /** Returns the camera used by the MiniMap */
3459
+ get(): THREE.OrthographicCamera;
3460
+ /** {@link Updateable.update} */
3461
+ update(): void;
3462
+ /** {@link Resizeable.getSize} */
3463
+ getSize(): THREE.Vector2;
3464
+ /** {@link Resizeable.resize} */
3465
+ resize(size?: THREE.Vector2): void;
3466
+ /** {@link Configurable.setup} */
3467
+ setup(config?: Partial<MiniMapConfig>): void;
3468
+ private updatePlanes;
3426
3469
  }
3427
3470
  import * as THREE from "three";
3428
3471
  import { BooleanSettingsControl, ColorSettingsControl, NumberSettingControl } from "../../Types";
3429
3472
  import { Configurator } from "../../ConfigManager";
3430
- import { SimpleGrid } from "./simple-grid";
3431
- type SimpleGridConfigType = {
3473
+ import { MiniMap } from "./index";
3474
+ type MiniMapConfigType = {
3432
3475
  visible: BooleanSettingsControl;
3433
- color: ColorSettingsControl;
3434
- primarySize: NumberSettingControl;
3435
- secondarySize: NumberSettingControl;
3436
- distance: NumberSettingControl;
3476
+ lockRotation: BooleanSettingsControl;
3477
+ zoom: NumberSettingControl;
3478
+ frontOffset: NumberSettingControl;
3479
+ sizeX: NumberSettingControl;
3480
+ sizeY: NumberSettingControl;
3481
+ backgroundColor: ColorSettingsControl;
3437
3482
  };
3438
3483
  /**
3439
- * Configuration interface for the {@link SimpleGrid}.
3484
+ * Configuration interface for the {@link MiniMap}.
3440
3485
  */
3441
- export interface SimpleGridConfig {
3486
+ export interface MiniMapConfig {
3442
3487
  /**
3443
- * Whether the grid is visible or not.
3488
+ * Whether the minimap is visible or not.
3444
3489
  */
3445
3490
  visible: boolean;
3446
3491
  /**
3447
- * The color of the grid lines.
3492
+ * Whether to lock the rotation of the top camera in the minimap.
3448
3493
  */
3449
- color: THREE.Color;
3494
+ lockRotation: boolean;
3450
3495
  /**
3451
- * The size of the primary grid lines.
3496
+ * The zoom of the camera in the minimap.
3452
3497
  */
3453
- primarySize: number;
3498
+ zoom: number;
3454
3499
  /**
3455
- * The size of the secondary grid lines.
3500
+ * The front offset of the minimap.
3501
+ * It determines how much the minimap's view is offset from the camera's view.
3502
+ * By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
3456
3503
  */
3457
- secondarySize: number;
3504
+ frontOffset: number;
3458
3505
  /**
3459
- * The distance at which the grid lines start to fade away.
3506
+ * The horizontal dimension of the minimap.
3460
3507
  */
3461
- distance: number;
3508
+ sizeX: number;
3509
+ /**
3510
+ * The vertical dimension of the minimap.
3511
+ */
3512
+ sizeY: number;
3513
+ /**
3514
+ * The color of the background of the minimap.
3515
+ */
3516
+ backgroundColor: THREE.Color;
3462
3517
  }
3463
- export declare class SimpleGridConfigManager extends Configurator<SimpleGrid, SimpleGridConfigType> {
3464
- protected _config: SimpleGridConfigType;
3518
+ export declare class MiniMapConfigManager extends Configurator<MiniMap, MiniMapConfigType> {
3519
+ protected _config: MiniMapConfigType;
3465
3520
  /**
3466
- * Whether the grid is visible or not.
3521
+ * Whether the minimap is visible or not.
3467
3522
  */
3468
3523
  get visible(): boolean;
3469
3524
  /**
3470
- * Whether the grid is visible or not.
3525
+ * Whether the minimap is visible or not.
3471
3526
  */
3472
3527
  set visible(value: boolean);
3473
3528
  /**
3474
- * The color of the grid lines.
3529
+ * Whether to lock the rotation of the top camera in the minimap.
3475
3530
  */
3476
- get color(): THREE.Color;
3531
+ get lockRotation(): boolean;
3477
3532
  /**
3478
- * The color of the grid lines.
3533
+ * Whether to lock the rotation of the top camera in the minimap.
3479
3534
  */
3480
- set color(value: THREE.Color);
3535
+ set lockRotation(value: boolean);
3481
3536
  /**
3482
- * The size of the primary grid lines.
3537
+ * The zoom of the camera in the minimap.
3483
3538
  */
3484
- get primarySize(): number;
3539
+ get zoom(): number;
3485
3540
  /**
3486
- * The size of the primary grid lines.
3541
+ * The zoom of the camera in the minimap.
3487
3542
  */
3488
- set primarySize(value: number);
3543
+ set zoom(value: number);
3489
3544
  /**
3490
- * The size of the secondary grid lines.
3545
+ * The front offset of the minimap.
3546
+ * It determines how much the minimap's view is offset from the camera's view.
3547
+ * By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
3491
3548
  */
3492
- get secondarySize(): number;
3493
- /**
3494
- * The size of the secondary grid lines.
3495
- */
3496
- set secondarySize(value: number);
3497
- /**
3498
- * The distance at which the grid lines start to fade away.
3499
- */
3500
- get distance(): number;
3501
- /**
3502
- * The distance at which the grid lines start to fade away.
3503
- */
3504
- set distance(value: number);
3505
- }
3506
- export {};
3507
- import { ControlsSchema, ControlEntry } from "../../Types";
3508
- import { Components } from "../../Components";
3509
- export declare abstract class Configurator<T, U extends ControlsSchema> {
3510
- protected abstract _config: U;
3511
- protected _component: T;
3512
- name: string;
3513
- uuid: string;
3514
- get controls(): U;
3515
- constructor(component: T, components: Components, name: string, uuid?: string);
3516
- copyEntry(controlEntry: ControlEntry): ControlEntry;
3517
- }
3518
- import * as THREE from "three";
3519
- import { Event, Base, World, BaseScene, BaseCamera, BaseRenderer, Disposable, Updateable } from "../../Types";
3520
- /**
3521
- * A class representing a simple world in a 3D environment. It extends the Base class and implements the World interface.
3522
- *
3523
- * @template T - The type of the scene. Default is BaseScene.
3524
- * @template U - The type of the camera. Default is BaseCamera.
3525
- * @template S - The type of the renderer. Default is BaseRenderer.
3526
- */
3527
- export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer> extends Base implements World, Disposable, Updateable {
3528
- /**
3529
- * All the loaded [meshes](https://threejs.org/docs/#api/en/objects/Mesh). These meshes will be taken into account in operations like raycasting.
3530
- */
3531
- readonly meshes: Set<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
3532
- /** {@link Updateable.onAfterUpdate} */
3533
- readonly onAfterUpdate: Event<unknown>;
3534
- /** {@link Updateable.onBeforeUpdate} */
3535
- readonly onBeforeUpdate: Event<unknown>;
3536
- /** {@link Disposable.onDisposed} */
3537
- readonly onDisposed: Event<unknown>;
3538
- /**
3539
- * Indicates whether the world is currently being disposed. This is useful to prevent trying to access world's elements when it's being disposed, which could cause errors when you dispose a world.
3540
- */
3541
- isDisposing: boolean;
3542
- /**
3543
- * Indicates whether the world is currently enabled.
3544
- * When disabled, the world will not be updated.
3545
- */
3546
- enabled: boolean;
3547
- /**
3548
- * A unique identifier for the world. Is not meant to be changed at any moment.
3549
- */
3550
- readonly uuid: string;
3551
- /**
3552
- * An optional name for the world.
3553
- */
3554
- name?: string;
3555
- private _scene?;
3556
- private _camera?;
3557
- private _renderer;
3558
- /**
3559
- * Getter for the scene. If no scene is initialized, it throws an error.
3560
- * @returns The current scene.
3561
- */
3562
- get scene(): T;
3563
- /**
3564
- * Setter for the scene. It sets the current scene, adds the world to the scene's worlds set,
3565
- * sets the current world in the scene, and triggers the scene's onWorldChanged event with the added action.
3566
- * @param scene - The new scene to be set.
3567
- */
3568
- set scene(scene: T);
3569
- /**
3570
- * Getter for the camera. If no camera is initialized, it throws an error.
3571
- * @returns The current camera.
3572
- */
3573
- get camera(): U;
3574
- /**
3575
- * Setter for the camera. It sets the current camera, adds the world to the camera's worlds set,
3576
- * sets the current world in the camera, and triggers the camera's onWorldChanged event with the added action.
3577
- * @param camera - The new camera to be set.
3578
- */
3579
- set camera(camera: U);
3580
- /**
3581
- * Getter for the renderer.
3582
- * @returns The current renderer or null if no renderer is set. Some worlds don't need a renderer to work (when your mail goal is not to display a 3D viewport to the user).
3583
- */
3584
- get renderer(): S | null;
3585
- /**
3586
- * Setter for the renderer. It sets the current renderer, adds the world to the renderer's worlds set,
3587
- * sets the current world in the renderer, and triggers the renderer's onWorldChanged event with the added action.
3588
- * If a new renderer is set, it also triggers the onWorldChanged event with the removed action for the old renderer.
3589
- * @param renderer - The new renderer to be set or null to remove the current renderer.
3590
- */
3591
- set renderer(renderer: S | null);
3592
- /** {@link Updateable.update} */
3593
- update(delta?: number): void;
3594
- /** {@link Disposable.dispose} */
3595
- dispose(disposeResources?: boolean): void;
3596
- }
3597
- import * as THREE from "three";
3598
- import { BaseScene, Configurable, Event } from "../../Types";
3599
- import { Components } from "../../Components";
3600
- import { SimpleSceneConfig, SimpleSceneConfigManager } from "./simple-scene-config";
3601
- /**
3602
- * A basic 3D [scene](https://threejs.org/docs/#api/en/scenes/Scene) to add objects hierarchically, and easily dispose them when you are finished with it.
3603
- */
3604
- export declare class SimpleScene extends BaseScene implements Configurable<SimpleSceneConfigManager, SimpleSceneConfig> {
3605
- /** {@link Configurable.onSetup} */
3606
- readonly onSetup: Event<unknown>;
3607
- /** {@link Configurable.isSetup} */
3608
- isSetup: boolean;
3609
- /**
3610
- * The underlying Three.js scene object.
3611
- * It is used to define the 3D space containing objects, lights, and cameras.
3612
- */
3613
- three: THREE.Scene;
3614
- /** {@link Configurable.config} */
3615
- config: SimpleSceneConfigManager;
3616
- protected _defaultConfig: SimpleSceneConfig;
3617
- constructor(components: Components);
3618
- /** {@link Configurable.setup} */
3619
- setup(config?: Partial<SimpleSceneConfig>): void;
3620
- dispose(): void;
3621
- }
3622
- import * as THREE from "three";
3623
- import { BaseRenderer, Event } from "../../Types";
3624
- import { Components } from "../../Components";
3625
- /**
3626
- * A basic renderer capable of rendering [Objec3Ds](https://threejs.org/docs/#api/en/core/Object3D).
3627
- */
3628
- export declare class SimpleRenderer extends BaseRenderer {
3629
- /**
3630
- * Indicates whether the renderer is enabled. If it's not, it won't be updated.
3631
- * Default is 'true'.
3632
- */
3633
- enabled: boolean;
3634
- /**
3635
- * The HTML container of the THREE.js canvas where the scene is rendered.
3636
- */
3637
- container: HTMLElement;
3638
- /**
3639
- * The THREE.js WebGLRenderer instance.
3640
- */
3641
- three: THREE.WebGLRenderer;
3642
- protected _canvas: HTMLCanvasElement;
3643
- protected _parameters?: Partial<THREE.WebGLRendererParameters>;
3644
- protected _resizeObserver: ResizeObserver | null;
3645
- protected onContainerUpdated: Event<unknown>;
3646
- private _resizing;
3647
- /**
3648
- * Constructor for the SimpleRenderer class.
3649
- *
3650
- * @param components - The components instance.
3651
- * @param container - The HTML container where the THREE.js canvas will be rendered.
3652
- * @param parameters - Optional parameters for the THREE.js WebGLRenderer.
3653
- */
3654
- constructor(components: Components, container: HTMLElement, parameters?: Partial<THREE.WebGLRendererParameters>);
3655
- /** {@link Updateable.update} */
3656
- update(): void;
3657
- /** {@link Disposable.dispose} */
3658
- dispose(): void;
3659
- /** {@link Resizeable.getSize}. */
3660
- getSize(): THREE.Vector2;
3661
- /** {@link Resizeable.resize} */
3662
- resize: (size?: THREE.Vector2) => void;
3549
+ get frontOffset(): number;
3663
3550
  /**
3664
- * Sets up and manages the event listeners for the renderer.
3665
- *
3666
- * @param active - A boolean indicating whether to activate or deactivate the event listeners.
3667
- *
3668
- * @throws Will throw an error if the renderer does not have an HTML container.
3551
+ * The front offset of the minimap.
3552
+ * It determines how much the minimap's view is offset from the camera's view.
3553
+ * By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
3669
3554
  */
3670
- setupEvents(active: boolean): void;
3671
- private resizeEvent;
3672
- private setupRenderer;
3673
- private onContextLost;
3674
- private onContextBack;
3675
- }
3676
- import * as THREE from "three";
3677
- import CameraControls from "camera-controls";
3678
- import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
3679
- import { Components } from "../../Components";
3680
- /**
3681
- * 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.
3682
- */
3683
- export declare class SimpleCamera extends BaseCamera implements Updateable, Disposable {
3684
- /** {@link Updateable.onBeforeUpdate} */
3685
- readonly onBeforeUpdate: Event<SimpleCamera>;
3686
- /** {@link Updateable.onAfterUpdate} */
3687
- readonly onAfterUpdate: Event<SimpleCamera>;
3555
+ set frontOffset(value: number);
3688
3556
  /**
3689
- * Event that is triggered when the aspect of the camera has been updated.
3690
- * This event is useful when you need to perform actions after the aspect of the camera has been changed.
3557
+ * The horizontal dimension of the minimap.
3691
3558
  */
3692
- readonly onAspectUpdated: Event<unknown>;
3693
- /** {@link Disposable.onDisposed} */
3694
- readonly onDisposed: Event<string>;
3559
+ get sizeX(): number;
3695
3560
  /**
3696
- * A three.js PerspectiveCamera or OrthographicCamera instance.
3697
- * This camera is used for rendering the scene.
3561
+ * The horizontal dimension of the minimap.
3698
3562
  */
3699
- three: THREE.PerspectiveCamera | THREE.OrthographicCamera;
3700
- private _allControls;
3563
+ set sizeX(value: number);
3701
3564
  /**
3702
- * The object that controls the camera. An instance of
3703
- * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls).
3704
- * Transforming the camera directly will have no effect: you need to use this
3705
- * object to move, rotate, look at objects, etc.
3565
+ * The vertical dimension of the minimap.
3706
3566
  */
3707
- get controls(): CameraControls;
3567
+ get sizeY(): number;
3708
3568
  /**
3709
- * Getter for the enabled state of the camera controls.
3710
- * If the current world is null, it returns false.
3711
- * Otherwise, it returns the enabled state of the camera controls.
3712
- *
3713
- * @returns {boolean} The enabled state of the camera controls.
3569
+ * The vertical dimension of the minimap.
3714
3570
  */
3715
- get enabled(): boolean;
3571
+ set sizeY(value: number);
3716
3572
  /**
3717
- * Setter for the enabled state of the camera controls.
3718
- * If the current world is not null, it sets the enabled state of the camera controls to the provided value.
3719
- *
3720
- * @param {boolean} enabled - The new enabled state of the camera controls.
3573
+ * The color of the background of the minimap.
3721
3574
  */
3722
- set enabled(enabled: boolean);
3723
- constructor(components: Components);
3724
- /** {@link Disposable.dispose} */
3725
- dispose(): void;
3726
- /** {@link Updateable.update} */
3727
- update(_delta: number): void;
3575
+ get backgroundColor(): THREE.Color;
3728
3576
  /**
3729
- * Updates the aspect of the camera to match the size of the
3730
- * {@link Components.renderer}.
3577
+ * The color of the background of the minimap.
3731
3578
  */
3732
- updateAspect: () => void;
3733
- private setupCamera;
3734
- private newCameraControls;
3735
- private setupEvents;
3736
- private static getSubsetOfThree;
3579
+ set backgroundColor(value: THREE.Color);
3737
3580
  }
3581
+ export {};
3738
3582
  import * as THREE from "three";
3739
3583
  import { Components } from "../../Components";
3740
3584
  import { AsyncEvent, Configurable, Event, World } from "../../Types";
@@ -3811,6 +3655,7 @@ export declare class CullerRenderer implements Configurable<CullerRendererConfig
3811
3655
  protected increaseColor(): void;
3812
3656
  protected decreaseColor(): void;
3813
3657
  }
3658
+ export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
3814
3659
  import * as THREE from "three";
3815
3660
  import { CullerRenderer } from "./culler-renderer";
3816
3661
  import { Components } from "../../Components";
@@ -3871,542 +3716,370 @@ export declare class MeshCullerRenderer extends CullerRenderer implements Dispos
3871
3716
  private getAvailableMaterial;
3872
3717
  }
3873
3718
  import * as THREE from "three";
3874
- import { SimpleScene } from "./simple-scene";
3875
- import { ColorSettingsControl, NumberSettingControl, Vector3SettingControl } from "../../Types";
3876
- import { Configurator } from "../../ConfigManager";
3877
- type SimpleSceneConfigType = {
3878
- backgroundColor: ColorSettingsControl;
3879
- ambientLight: {
3880
- color: ColorSettingsControl;
3881
- intensity: NumberSettingControl;
3882
- };
3883
- directionalLight: {
3884
- color: ColorSettingsControl;
3885
- intensity: NumberSettingControl;
3886
- position: Vector3SettingControl;
3887
- };
3888
- };
3889
- declare class DirectionalLightConfig {
3890
- private _list;
3891
- private _scene;
3892
- constructor(list: SimpleSceneConfigType, scene: SimpleScene);
3893
- get color(): THREE.Color;
3894
- set color(value: THREE.Color);
3895
- get intensity(): number;
3896
- set intensity(value: number);
3897
- get position(): THREE.Vector3;
3898
- set position(value: THREE.Vector3);
3899
- }
3900
- declare class AmbientLightConfig {
3901
- private _list;
3902
- private _scene;
3903
- constructor(list: SimpleSceneConfigType, scene: SimpleScene);
3904
- get color(): THREE.Color;
3905
- set color(value: THREE.Color);
3906
- get intensity(): number;
3907
- set intensity(value: number);
3908
- }
3719
+ import { Disposable, Event } from "../../Types";
3909
3720
  /**
3910
- * Configuration interface for the {@link SimpleScene}.
3721
+ * 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.
3911
3722
  */
3912
- export interface SimpleSceneConfig {
3913
- backgroundColor: THREE.Color;
3914
- directionalLight: {
3915
- color: THREE.Color;
3916
- intensity: number;
3917
- position: THREE.Vector3;
3918
- };
3919
- ambientLight: {
3920
- color: THREE.Color;
3921
- intensity: number;
3922
- };
3923
- }
3924
- export declare class SimpleSceneConfigManager extends Configurator<SimpleScene, SimpleSceneConfigType> {
3925
- protected _config: SimpleSceneConfigType;
3926
- ambientLight: AmbientLightConfig;
3927
- directionalLight: DirectionalLightConfig;
3928
- get backgroundColor(): THREE.Color;
3929
- set backgroundColor(value: THREE.Color);
3723
+ export declare class Mouse implements Disposable {
3724
+ dom: HTMLCanvasElement;
3725
+ private _event?;
3726
+ private _position;
3727
+ /** {@link Disposable.onDisposed} */
3728
+ readonly onDisposed: Event<unknown>;
3729
+ constructor(dom: HTMLCanvasElement);
3730
+ /**
3731
+ * The real position of the mouse of the Three.js canvas.
3732
+ */
3733
+ get position(): THREE.Vector2;
3734
+ /** {@link Disposable.dispose} */
3735
+ dispose(): void;
3736
+ private getPositionY;
3737
+ private getPositionX;
3738
+ private updateMouseInfo;
3739
+ private getDataObject;
3740
+ private setupEvents;
3930
3741
  }
3931
- export {};
3932
- export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
3933
3742
  import * as THREE from "three";
3934
- import { Resizeable, Updateable, World, Event, Disposable, Configurable } from "../../Types";
3935
- import { MiniMapConfig, MiniMapConfigManager } from "./mini-map-config";
3936
3743
  import { Components } from "../../Components";
3744
+ import { Event, World, Disposable } from "../../Types";
3745
+ import { Mouse } from "./mouse";
3937
3746
  /**
3938
- * A class representing a 2D minimap of a 3D world.
3747
+ * 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.
3939
3748
  */
3940
- export declare class MiniMap implements Resizeable, Updateable, Disposable, Configurable<MiniMapConfigManager, MiniMapConfig> {
3749
+ export declare class SimpleRaycaster implements Disposable {
3750
+ /** {@link Component.enabled} */
3751
+ enabled: boolean;
3752
+ /** The components instance to which this Raycaster belongs. */
3753
+ components: Components;
3941
3754
  /** {@link Disposable.onDisposed} */
3942
3755
  readonly onDisposed: Event<unknown>;
3943
- /** {@link Updateable.onAfterUpdate} */
3944
- readonly onAfterUpdate: Event<unknown>;
3945
- /** {@link Updateable.onBeforeUpdate} */
3946
- readonly onBeforeUpdate: Event<unknown>;
3947
- /** {@link Resizeable.onResize} */
3948
- readonly onResize: Event<THREE.Vector2>;
3949
- /** {@link Configurable.onSetup} */
3950
- readonly onSetup: Event<unknown>;
3756
+ /** The position of the mouse in the screen. */
3757
+ readonly mouse: Mouse;
3951
3758
  /**
3952
- * The front offset of the minimap.
3953
- * It determines how much the minimap's view is offset from the camera's view.
3954
- * By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
3759
+ * A reference to the Three.js Raycaster instance.
3760
+ * This is used for raycasting operations.
3955
3761
  */
3956
- frontOffset: number;
3762
+ readonly three: THREE.Raycaster;
3957
3763
  /**
3958
- * The override material for the minimap.
3959
- * It is used to render the depth information of the world onto the minimap.
3764
+ * A reference to the world instance to which this Raycaster belongs.
3765
+ * This is used to access the camera and meshes.
3960
3766
  */
3961
- overrideMaterial: THREE.MeshDepthMaterial;
3767
+ world: World;
3768
+ constructor(components: Components, world: World);
3769
+ /** {@link Disposable.dispose} */
3770
+ dispose(): void;
3962
3771
  /**
3963
- * The background color of the minimap.
3964
- * It is used to set the background color of the minimap's renderer.
3772
+ * Throws a ray from the camera to the mouse or touch event point and returns
3773
+ * the first item found. This also takes into account the clipping planes
3774
+ * used by the renderer.
3775
+ *
3776
+ * @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
3777
+ * to query. If not provided, it will query all the meshes stored in
3778
+ * {@link Components.meshes}.
3965
3779
  */
3966
- backgroundColor: THREE.Color;
3780
+ castRay(items?: THREE.Object3D[]): THREE.Intersection | null;
3967
3781
  /**
3968
- * The WebGL renderer for the minimap.
3969
- * It is used to render the minimap onto the screen.
3782
+ * Casts a ray from a given origin in a given direction and returns the first item found.
3783
+ * This method also takes into account the clipping planes used by the renderer.
3784
+ *
3785
+ * @param origin - The origin of the ray.
3786
+ * @param direction - The direction of the ray.
3787
+ * @param items - The meshes to query. If not provided, it will query all the meshes stored in {@link World.meshes}.
3788
+ * @returns The first intersection found or 'null' if no intersection was found.
3970
3789
  */
3971
- renderer: THREE.WebGLRenderer;
3790
+ 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;
3791
+ private intersect;
3792
+ private filterClippingPlanes;
3793
+ }
3794
+ import * as THREE from "three";
3795
+ import { Event, Base, World, BaseScene, BaseCamera, BaseRenderer, Disposable, Updateable } from "../../Types";
3796
+ /**
3797
+ * A class representing a simple world in a 3D environment. It extends the Base class and implements the World interface.
3798
+ *
3799
+ * @template T - The type of the scene. Default is BaseScene.
3800
+ * @template U - The type of the camera. Default is BaseCamera.
3801
+ * @template S - The type of the renderer. Default is BaseRenderer.
3802
+ */
3803
+ export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer> extends Base implements World, Disposable, Updateable {
3972
3804
  /**
3973
- * A flag indicating whether the minimap is enabled.
3974
- * If disabled, the minimap will not update or render.
3805
+ * All the loaded [meshes](https://threejs.org/docs/#api/en/objects/Mesh). These meshes will be taken into account in operations like raycasting.
3975
3806
  */
3976
- enabled: boolean;
3807
+ readonly meshes: Set<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
3808
+ /** {@link Updateable.onAfterUpdate} */
3809
+ readonly onAfterUpdate: Event<unknown>;
3810
+ /** {@link Updateable.onBeforeUpdate} */
3811
+ readonly onBeforeUpdate: Event<unknown>;
3812
+ /** {@link Disposable.onDisposed} */
3813
+ readonly onDisposed: Event<unknown>;
3977
3814
  /**
3978
- * The world in which the minimap is displayed.
3979
- * It provides access to the 3D scene, camera, and other relevant world elements.
3815
+ * Indicates whether the world is currently being disposed. This is useful to prevent trying to access world's elements when it's being disposed, which could cause errors when you dispose a world.
3980
3816
  */
3981
- world: World;
3982
- /** {@link Configurable.config} */
3983
- config: MiniMapConfigManager;
3984
- /** {@link Configurable.isSetup} */
3985
- isSetup: boolean;
3986
- protected _defaultConfig: MiniMapConfig;
3987
- private _lockRotation;
3988
- private _size;
3989
- private _camera;
3990
- private _plane;
3991
- private _tempVector1;
3992
- private _tempVector2;
3993
- private _tempTarget;
3994
- private readonly down;
3817
+ isDisposing: boolean;
3995
3818
  /**
3996
- * Gets or sets whether the minimap rotation is locked.
3997
- * When rotation is locked, the minimap will always face the same direction as the camera.
3819
+ * Indicates whether the world is currently enabled.
3820
+ * When disabled, the world will not be updated.
3998
3821
  */
3999
- get lockRotation(): boolean;
3822
+ enabled: boolean;
4000
3823
  /**
4001
- * Sets whether the minimap rotation is locked.
4002
- * When rotation is locked, the minimap will always face the same direction as the camera.
4003
- * @param active - If 'true', rotation is locked. If 'false', rotation is not locked.
3824
+ * A unique identifier for the world. Is not meant to be changed at any moment.
4004
3825
  */
4005
- set lockRotation(active: boolean);
3826
+ readonly uuid: string;
4006
3827
  /**
4007
- * Gets the current zoom level of the minimap.
4008
- * The zoom level determines how much of the world is visible on the minimap.
4009
- * @returns The current zoom level of the minimap.
3828
+ * An optional name for the world.
4010
3829
  */
4011
- get zoom(): number;
3830
+ name?: string;
3831
+ private _scene?;
3832
+ private _camera?;
3833
+ private _renderer;
4012
3834
  /**
4013
- * Sets the zoom level of the minimap.
4014
- * The zoom level determines how much of the world is visible on the minimap.
4015
- * @param value - The new zoom level of the minimap.
3835
+ * Getter for the scene. If no scene is initialized, it throws an error.
3836
+ * @returns The current scene.
4016
3837
  */
4017
- set zoom(value: number);
4018
- constructor(world: World, components: Components);
4019
- /** {@link Disposable.dispose} */
4020
- dispose(): void;
4021
- /** Returns the camera used by the MiniMap */
4022
- get(): THREE.OrthographicCamera;
4023
- /** {@link Updateable.update} */
4024
- update(): void;
4025
- /** {@link Resizeable.getSize} */
4026
- getSize(): THREE.Vector2;
4027
- /** {@link Resizeable.resize} */
4028
- resize(size?: THREE.Vector2): void;
4029
- /** {@link Configurable.setup} */
4030
- setup(config?: Partial<MiniMapConfig>): void;
4031
- private updatePlanes;
4032
- }
4033
- import * as THREE from "three";
4034
- import { BooleanSettingsControl, ColorSettingsControl, NumberSettingControl } from "../../Types";
4035
- import { Configurator } from "../../ConfigManager";
4036
- import { MiniMap } from "./index";
4037
- type MiniMapConfigType = {
4038
- visible: BooleanSettingsControl;
4039
- lockRotation: BooleanSettingsControl;
4040
- zoom: NumberSettingControl;
4041
- frontOffset: NumberSettingControl;
4042
- sizeX: NumberSettingControl;
4043
- sizeY: NumberSettingControl;
4044
- backgroundColor: ColorSettingsControl;
4045
- };
4046
- /**
4047
- * Configuration interface for the {@link MiniMap}.
4048
- */
4049
- export interface MiniMapConfig {
3838
+ get scene(): T;
4050
3839
  /**
4051
- * Whether the minimap is visible or not.
3840
+ * Setter for the scene. It sets the current scene, adds the world to the scene's worlds set,
3841
+ * sets the current world in the scene, and triggers the scene's onWorldChanged event with the added action.
3842
+ * @param scene - The new scene to be set.
4052
3843
  */
4053
- visible: boolean;
3844
+ set scene(scene: T);
4054
3845
  /**
4055
- * Whether to lock the rotation of the top camera in the minimap.
3846
+ * Getter for the camera. If no camera is initialized, it throws an error.
3847
+ * @returns The current camera.
4056
3848
  */
4057
- lockRotation: boolean;
3849
+ get camera(): U;
4058
3850
  /**
4059
- * The zoom of the camera in the minimap.
3851
+ * Setter for the camera. It sets the current camera, adds the world to the camera's worlds set,
3852
+ * sets the current world in the camera, and triggers the camera's onWorldChanged event with the added action.
3853
+ * @param camera - The new camera to be set.
4060
3854
  */
4061
- zoom: number;
3855
+ set camera(camera: U);
4062
3856
  /**
4063
- * The front offset of the minimap.
4064
- * It determines how much the minimap's view is offset from the camera's view.
4065
- * By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
3857
+ * Getter for the renderer.
3858
+ * @returns The current renderer or null if no renderer is set. Some worlds don't need a renderer to work (when your mail goal is not to display a 3D viewport to the user).
4066
3859
  */
4067
- frontOffset: number;
3860
+ get renderer(): S | null;
4068
3861
  /**
4069
- * The horizontal dimension of the minimap.
4070
- */
4071
- sizeX: number;
4072
- /**
4073
- * The vertical dimension of the minimap.
4074
- */
4075
- sizeY: number;
4076
- /**
4077
- * The color of the background of the minimap.
3862
+ * Setter for the renderer. It sets the current renderer, adds the world to the renderer's worlds set,
3863
+ * sets the current world in the renderer, and triggers the renderer's onWorldChanged event with the added action.
3864
+ * If a new renderer is set, it also triggers the onWorldChanged event with the removed action for the old renderer.
3865
+ * @param renderer - The new renderer to be set or null to remove the current renderer.
4078
3866
  */
4079
- backgroundColor: THREE.Color;
3867
+ set renderer(renderer: S | null);
3868
+ /** {@link Updateable.update} */
3869
+ update(delta?: number): void;
3870
+ /** {@link Disposable.dispose} */
3871
+ dispose(disposeResources?: boolean): void;
4080
3872
  }
4081
- export declare class MiniMapConfigManager extends Configurator<MiniMap, MiniMapConfigType> {
4082
- protected _config: MiniMapConfigType;
4083
- /**
4084
- * Whether the minimap is visible or not.
4085
- */
4086
- get visible(): boolean;
4087
- /**
4088
- * Whether the minimap is visible or not.
4089
- */
4090
- set visible(value: boolean);
4091
- /**
4092
- * Whether to lock the rotation of the top camera in the minimap.
4093
- */
4094
- get lockRotation(): boolean;
4095
- /**
4096
- * Whether to lock the rotation of the top camera in the minimap.
4097
- */
4098
- set lockRotation(value: boolean);
4099
- /**
4100
- * The zoom of the camera in the minimap.
4101
- */
4102
- get zoom(): number;
4103
- /**
4104
- * The zoom of the camera in the minimap.
4105
- */
4106
- set zoom(value: number);
4107
- /**
4108
- * The front offset of the minimap.
4109
- * It determines how much the minimap's view is offset from the camera's view.
4110
- * By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
4111
- */
4112
- get frontOffset(): number;
4113
- /**
4114
- * The front offset of the minimap.
4115
- * It determines how much the minimap's view is offset from the camera's view.
4116
- * By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
4117
- */
4118
- set frontOffset(value: number);
4119
- /**
4120
- * The horizontal dimension of the minimap.
4121
- */
4122
- get sizeX(): number;
4123
- /**
4124
- * The horizontal dimension of the minimap.
4125
- */
4126
- set sizeX(value: number);
4127
- /**
4128
- * The vertical dimension of the minimap.
4129
- */
4130
- get sizeY(): number;
4131
- /**
4132
- * The vertical dimension of the minimap.
4133
- */
4134
- set sizeY(value: number);
4135
- /**
4136
- * The color of the background of the minimap.
4137
- */
4138
- get backgroundColor(): THREE.Color;
3873
+ import * as THREE from "three";
3874
+ import { BaseScene, Configurable, Event } from "../../Types";
3875
+ import { Components } from "../../Components";
3876
+ import { SimpleSceneConfig, SimpleSceneConfigManager } from "./simple-scene-config";
3877
+ /**
3878
+ * A basic 3D [scene](https://threejs.org/docs/#api/en/scenes/Scene) to add objects hierarchically, and easily dispose them when you are finished with it.
3879
+ */
3880
+ export declare class SimpleScene extends BaseScene implements Configurable<SimpleSceneConfigManager, SimpleSceneConfig> {
3881
+ /** {@link Configurable.onSetup} */
3882
+ readonly onSetup: Event<unknown>;
3883
+ /** {@link Configurable.isSetup} */
3884
+ isSetup: boolean;
4139
3885
  /**
4140
- * The color of the background of the minimap.
3886
+ * The underlying Three.js scene object.
3887
+ * It is used to define the 3D space containing objects, lights, and cameras.
4141
3888
  */
4142
- set backgroundColor(value: THREE.Color);
3889
+ three: THREE.Scene;
3890
+ /** {@link Configurable.config} */
3891
+ config: SimpleSceneConfigManager;
3892
+ protected _defaultConfig: SimpleSceneConfig;
3893
+ constructor(components: Components);
3894
+ /** {@link Configurable.setup} */
3895
+ setup(config?: Partial<SimpleSceneConfig>): void;
3896
+ dispose(): void;
4143
3897
  }
4144
- export {};
4145
3898
  import * as THREE from "three";
4146
- import { Event, World } from "../../Types";
3899
+ import CameraControls from "camera-controls";
3900
+ import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
4147
3901
  import { Components } from "../../Components";
4148
3902
  /**
4149
- * A base renderer to determine visibility on screen.
3903
+ * 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.
4150
3904
  */
4151
- export declare class DistanceRenderer {
4152
- /** {@link Disposable.onDisposed} */
4153
- readonly onDisposed: Event<string>;
4154
- /**
4155
- * Fires after making the visibility check to the meshes. It lists the
4156
- * meshes that are currently visible, and the ones that were visible
4157
- * just before but not anymore.
4158
- */
4159
- readonly onDistanceComputed: Event<number>;
4160
- /**
4161
- * Objects that won't be taken into account in the distance check.
4162
- */
4163
- excludedObjects: Set<THREE.Object3D<THREE.Object3DEventMap>>;
3905
+ export declare class SimpleCamera extends BaseCamera implements Updateable, Disposable {
3906
+ /** {@link Updateable.onBeforeUpdate} */
3907
+ readonly onBeforeUpdate: Event<SimpleCamera>;
3908
+ /** {@link Updateable.onAfterUpdate} */
3909
+ readonly onAfterUpdate: Event<SimpleCamera>;
4164
3910
  /**
4165
- * Whether this renderer is active or not. If not, it won't render anything.
3911
+ * Event that is triggered when the aspect of the camera has been updated.
3912
+ * This event is useful when you need to perform actions after the aspect of the camera has been changed.
4166
3913
  */
4167
- enabled: boolean;
3914
+ readonly onAspectUpdated: Event<unknown>;
3915
+ /** {@link Disposable.onDisposed} */
3916
+ readonly onDisposed: Event<string>;
4168
3917
  /**
4169
- * Render the internal scene used to determine the object visibility. Used
4170
- * for debugging purposes.
3918
+ * A three.js PerspectiveCamera or OrthographicCamera instance.
3919
+ * This camera is used for rendering the scene.
4171
3920
  */
4172
- renderDebugFrame: boolean;
4173
- /** The components instance to which this renderer belongs. */
4174
- components: Components;
3921
+ three: THREE.PerspectiveCamera | THREE.OrthographicCamera;
3922
+ private _allControls;
4175
3923
  /**
4176
- * The scene where the distance is computed.
3924
+ * The object that controls the camera. An instance of
3925
+ * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls).
3926
+ * Transforming the camera directly will have no effect: you need to use this
3927
+ * object to move, rotate, look at objects, etc.
4177
3928
  */
4178
- scene: THREE.Scene;
3929
+ get controls(): CameraControls;
4179
3930
  /**
4180
- * The camera used to compute the distance.
3931
+ * Getter for the enabled state of the camera controls.
3932
+ * If the current world is null, it returns false.
3933
+ * Otherwise, it returns the enabled state of the camera controls.
3934
+ *
3935
+ * @returns {boolean} The enabled state of the camera controls.
4181
3936
  */
4182
- camera: THREE.OrthographicCamera;
3937
+ get enabled(): boolean;
4183
3938
  /**
4184
- * The material used to compute the distance.
3939
+ * Setter for the enabled state of the camera controls.
3940
+ * If the current world is not null, it sets the enabled state of the camera controls to the provided value.
3941
+ *
3942
+ * @param {boolean} enabled - The new enabled state of the camera controls.
4185
3943
  */
4186
- depthMaterial: THREE.ShaderMaterial;
4187
- /** The world instance to which this renderer belongs. */
4188
- readonly world: World;
4189
- /** The THREE.js renderer used to make the visibility test. */
4190
- readonly renderer: THREE.WebGLRenderer;
4191
- protected readonly worker: Worker;
4192
- private _width;
4193
- private _height;
4194
- private readonly _postQuad;
4195
- private readonly tempRT;
4196
- private readonly resultRT;
4197
- private readonly bufferSize;
4198
- private readonly _buffer;
4199
- protected _isWorkerBusy: boolean;
4200
- constructor(components: Components, world: World);
3944
+ set enabled(enabled: boolean);
3945
+ constructor(components: Components);
4201
3946
  /** {@link Disposable.dispose} */
4202
3947
  dispose(): void;
3948
+ /** {@link Updateable.update} */
3949
+ update(_delta: number): void;
4203
3950
  /**
4204
- * The function that the culler uses to reprocess the scene. Generally it's
4205
- * better to call needsUpdate, but you can also call this to force it.
4206
- * @param force if true, it will refresh the scene even if needsUpdate is
4207
- * not true.
3951
+ * Updates the aspect of the camera to match the size of the
3952
+ * {@link Components.renderer}.
4208
3953
  */
4209
- compute: () => Promise<void>;
4210
- private handleWorkerMessage;
4211
- }
4212
- import { NavigationMode } from "./types";
4213
- import { OrthoPerspectiveCamera } from "../index";
4214
- /**
4215
- * A {@link NavigationMode} that allows 3D navigation and panning like in many 3D and CAD softwares.
4216
- */
4217
- export declare class OrbitMode implements NavigationMode {
4218
- camera: OrthoPerspectiveCamera;
4219
- /** {@link NavigationMode.enabled} */
4220
- enabled: boolean;
4221
- /** {@link NavigationMode.id} */
4222
- readonly id = "Orbit";
4223
- constructor(camera: OrthoPerspectiveCamera);
4224
- /** {@link NavigationMode.set} */
4225
- set(active: boolean): void;
4226
- private activateOrbitControls;
4227
- }
4228
- import { NavigationMode } from "./types";
4229
- import { OrthoPerspectiveCamera } from "../index";
4230
- /**
4231
- * A {@link NavigationMode} that allows first person navigation, simulating FPS video games.
4232
- */
4233
- export declare class FirstPersonMode implements NavigationMode {
4234
- private camera;
4235
- /** {@link NavigationMode.enabled} */
4236
- enabled: boolean;
4237
- /** {@link NavigationMode.id} */
4238
- readonly id = "FirstPerson";
4239
- constructor(camera: OrthoPerspectiveCamera);
4240
- /** {@link NavigationMode.set} */
4241
- set(active: boolean): void;
4242
- private setupFirstPersonCamera;
3954
+ updateAspect: () => void;
3955
+ private setupCamera;
3956
+ private newCameraControls;
3957
+ private setupEvents;
3958
+ private static getSubsetOfThree;
4243
3959
  }
4244
- import { NavigationMode } from "./types";
4245
- import { OrthoPerspectiveCamera } from "../index";
4246
- /**
4247
- * A {@link NavigationMode} that allows to navigate floorplans in 2D, like many BIM tools.
4248
- */
4249
- export declare class PlanMode implements NavigationMode {
4250
- private camera;
4251
- /** {@link NavigationMode.enabled} */
4252
- enabled: boolean;
4253
- /** {@link NavigationMode.id} */
4254
- readonly id = "Plan";
4255
- private mouseAction1?;
4256
- private mouseAction2?;
4257
- private mouseInitialized;
4258
- private readonly defaultAzimuthSpeed;
4259
- private readonly defaultPolarSpeed;
4260
- constructor(camera: OrthoPerspectiveCamera);
4261
- /** {@link NavigationMode.set} */
4262
- set(active: boolean): void;
3960
+ import { ControlsSchema, ControlEntry } from "../../Types";
3961
+ import { Components } from "../../Components";
3962
+ export declare abstract class Configurator<T, U extends ControlsSchema> {
3963
+ protected abstract _config: U;
3964
+ protected _component: T;
3965
+ name: string;
3966
+ uuid: string;
3967
+ get controls(): U;
3968
+ constructor(component: T, components: Components, name: string, uuid?: string);
3969
+ copyEntry(controlEntry: ControlEntry): ControlEntry;
4263
3970
  }
4264
3971
  import * as THREE from "three";
4265
- import { CameraProjection } from "./types";
4266
- import { Event } from "../../Types";
4267
- import { OrthoPerspectiveCamera } from "../index";
4268
- /**
4269
- * Object to control the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
4270
- */
4271
- export declare class ProjectionManager {
4272
- /**
4273
- * Event that fires when the {@link CameraProjection} changes.
4274
- */
4275
- readonly onChanged: Event<THREE.PerspectiveCamera | THREE.OrthographicCamera>;
4276
- /**
4277
- * Current projection mode of the camera.
4278
- * Default is "Perspective".
4279
- */
4280
- current: CameraProjection;
4281
- /**
4282
- * The camera controlled by this ProjectionManager.
4283
- * It can be either a PerspectiveCamera or an OrthographicCamera.
4284
- */
4285
- camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
4286
- /** Match Ortho zoom with Perspective distance when changing projection mode */
4287
- matchOrthoDistanceEnabled: boolean;
4288
- private _component;
4289
- private _previousDistance;
4290
- constructor(camera: OrthoPerspectiveCamera);
4291
- /**
4292
- * Sets the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
4293
- *
4294
- * @param projection - the new projection to set. If it is the current projection,
4295
- * it will have no effect.
4296
- */
4297
- set(projection: CameraProjection): Promise<void>;
4298
- /**
4299
- * Changes the current {@link CameraProjection} from Ortographic to Perspective
4300
- * and vice versa.
4301
- */
4302
- toggle(): Promise<void>;
4303
- private setOrthoCamera;
4304
- private getPerspectiveDims;
4305
- private setupOrthoCamera;
4306
- private getDistance;
4307
- private setPerspectiveCamera;
4308
- }
4309
- /**
4310
- * The projection system of the camera.
4311
- */
4312
- export type CameraProjection = "Perspective" | "Orthographic";
4313
- /**
4314
- * The extensible list of supported navigation modes.
4315
- */
4316
- export type NavModeID = "Orbit" | "FirstPerson" | "Plan";
4317
- /**
4318
- * An object that determines the behavior of the camera controls and the user input (e.g. 2D floor plan mode, first person mode, etc).
4319
- */
4320
- export interface NavigationMode {
4321
- /** The unique ID of this navigation mode. */
4322
- id: NavModeID;
4323
- /**
4324
- * Enable or disable this navigation mode.
4325
- * When a new navigation mode is enabled, the previous navigation mode
4326
- * must be disabled.
4327
- *
4328
- * @param active - whether to enable or disable this mode.
4329
- * @param options - any additional data required to enable or disable it.
4330
- * */
4331
- set: (active: boolean, options?: any) => void;
4332
- /** Whether this navigation mode is active or not. */
4333
- enabled: boolean;
3972
+ import { SimpleScene } from "./simple-scene";
3973
+ import { ColorSettingsControl, NumberSettingControl, Vector3SettingControl } from "../../Types";
3974
+ import { Configurator } from "../../ConfigManager";
3975
+ type SimpleSceneConfigType = {
3976
+ backgroundColor: ColorSettingsControl;
3977
+ ambientLight: {
3978
+ color: ColorSettingsControl;
3979
+ intensity: NumberSettingControl;
3980
+ };
3981
+ directionalLight: {
3982
+ color: ColorSettingsControl;
3983
+ intensity: NumberSettingControl;
3984
+ position: Vector3SettingControl;
3985
+ };
3986
+ };
3987
+ declare class DirectionalLightConfig {
3988
+ private _list;
3989
+ private _scene;
3990
+ constructor(list: SimpleSceneConfigType, scene: SimpleScene);
3991
+ get color(): THREE.Color;
3992
+ set color(value: THREE.Color);
3993
+ get intensity(): number;
3994
+ set intensity(value: number);
3995
+ get position(): THREE.Vector3;
3996
+ set position(value: THREE.Vector3);
3997
+ }
3998
+ declare class AmbientLightConfig {
3999
+ private _list;
4000
+ private _scene;
4001
+ constructor(list: SimpleSceneConfigType, scene: SimpleScene);
4002
+ get color(): THREE.Color;
4003
+ set color(value: THREE.Color);
4004
+ get intensity(): number;
4005
+ set intensity(value: number);
4334
4006
  }
4335
- import * as THREE from "three";
4336
- import { Disposable, Event } from "../../Types";
4337
4007
  /**
4338
- * 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.
4008
+ * Configuration interface for the {@link SimpleScene}.
4339
4009
  */
4340
- export declare class Mouse implements Disposable {
4341
- dom: HTMLCanvasElement;
4342
- private _event?;
4343
- private _position;
4344
- /** {@link Disposable.onDisposed} */
4345
- readonly onDisposed: Event<unknown>;
4346
- constructor(dom: HTMLCanvasElement);
4347
- /**
4348
- * The real position of the mouse of the Three.js canvas.
4349
- */
4350
- get position(): THREE.Vector2;
4351
- /** {@link Disposable.dispose} */
4352
- dispose(): void;
4353
- private getPositionY;
4354
- private getPositionX;
4355
- private updateMouseInfo;
4356
- private getDataObject;
4357
- private setupEvents;
4010
+ export interface SimpleSceneConfig {
4011
+ backgroundColor: THREE.Color;
4012
+ directionalLight: {
4013
+ color: THREE.Color;
4014
+ intensity: number;
4015
+ position: THREE.Vector3;
4016
+ };
4017
+ ambientLight: {
4018
+ color: THREE.Color;
4019
+ intensity: number;
4020
+ };
4021
+ }
4022
+ export declare class SimpleSceneConfigManager extends Configurator<SimpleScene, SimpleSceneConfigType> {
4023
+ protected _config: SimpleSceneConfigType;
4024
+ ambientLight: AmbientLightConfig;
4025
+ directionalLight: DirectionalLightConfig;
4026
+ get backgroundColor(): THREE.Color;
4027
+ set backgroundColor(value: THREE.Color);
4358
4028
  }
4029
+ export {};
4359
4030
  import * as THREE from "three";
4031
+ import { BaseRenderer, Event } from "../../Types";
4360
4032
  import { Components } from "../../Components";
4361
- import { Event, World, Disposable } from "../../Types";
4362
- import { Mouse } from "./mouse";
4363
4033
  /**
4364
- * 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.
4034
+ * A basic renderer capable of rendering [Objec3Ds](https://threejs.org/docs/#api/en/core/Object3D).
4365
4035
  */
4366
- export declare class SimpleRaycaster implements Disposable {
4367
- /** {@link Component.enabled} */
4036
+ export declare class SimpleRenderer extends BaseRenderer {
4037
+ /**
4038
+ * Indicates whether the renderer is enabled. If it's not, it won't be updated.
4039
+ * Default is 'true'.
4040
+ */
4368
4041
  enabled: boolean;
4369
- /** The components instance to which this Raycaster belongs. */
4370
- components: Components;
4371
- /** {@link Disposable.onDisposed} */
4372
- readonly onDisposed: Event<unknown>;
4373
- /** The position of the mouse in the screen. */
4374
- readonly mouse: Mouse;
4375
4042
  /**
4376
- * A reference to the Three.js Raycaster instance.
4377
- * This is used for raycasting operations.
4043
+ * The HTML container of the THREE.js canvas where the scene is rendered.
4378
4044
  */
4379
- readonly three: THREE.Raycaster;
4045
+ container: HTMLElement;
4380
4046
  /**
4381
- * A reference to the world instance to which this Raycaster belongs.
4382
- * This is used to access the camera and meshes.
4047
+ * The THREE.js WebGLRenderer instance.
4383
4048
  */
4384
- world: World;
4385
- constructor(components: Components, world: World);
4386
- /** {@link Disposable.dispose} */
4387
- dispose(): void;
4049
+ three: THREE.WebGLRenderer;
4050
+ protected _canvas: HTMLCanvasElement;
4051
+ protected _parameters?: Partial<THREE.WebGLRendererParameters>;
4052
+ protected _resizeObserver: ResizeObserver | null;
4053
+ protected onContainerUpdated: Event<unknown>;
4054
+ private _resizing;
4388
4055
  /**
4389
- * Throws a ray from the camera to the mouse or touch event point and returns
4390
- * the first item found. This also takes into account the clipping planes
4391
- * used by the renderer.
4056
+ * Constructor for the SimpleRenderer class.
4392
4057
  *
4393
- * @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
4394
- * to query. If not provided, it will query all the meshes stored in
4395
- * {@link Components.meshes}.
4058
+ * @param components - The components instance.
4059
+ * @param container - The HTML container where the THREE.js canvas will be rendered.
4060
+ * @param parameters - Optional parameters for the THREE.js WebGLRenderer.
4396
4061
  */
4397
- castRay(items?: THREE.Object3D[]): THREE.Intersection | null;
4062
+ constructor(components: Components, container: HTMLElement, parameters?: Partial<THREE.WebGLRendererParameters>);
4063
+ /** {@link Updateable.update} */
4064
+ update(): void;
4065
+ /** {@link Disposable.dispose} */
4066
+ dispose(): void;
4067
+ /** {@link Resizeable.getSize}. */
4068
+ getSize(): THREE.Vector2;
4069
+ /** {@link Resizeable.resize} */
4070
+ resize: (size?: THREE.Vector2) => void;
4398
4071
  /**
4399
- * Casts a ray from a given origin in a given direction and returns the first item found.
4400
- * This method also takes into account the clipping planes used by the renderer.
4072
+ * Sets up and manages the event listeners for the renderer.
4401
4073
  *
4402
- * @param origin - The origin of the ray.
4403
- * @param direction - The direction of the ray.
4404
- * @param items - The meshes to query. If not provided, it will query all the meshes stored in {@link World.meshes}.
4405
- * @returns The first intersection found or 'null' if no intersection was found.
4074
+ * @param active - A boolean indicating whether to activate or deactivate the event listeners.
4075
+ *
4076
+ * @throws Will throw an error if the renderer does not have an HTML container.
4406
4077
  */
4407
- 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;
4408
- private intersect;
4409
- private filterClippingPlanes;
4078
+ setupEvents(active: boolean): void;
4079
+ private resizeEvent;
4080
+ private setupRenderer;
4081
+ private onContextLost;
4082
+ private onContextBack;
4410
4083
  }
4411
4084
  import { SimplePlane } from "../../Clipper";
4412
4085
  import { DataSet } from "../../Types";
@@ -4581,65 +4254,193 @@ export declare class Viewpoint implements BCFViewpoint {
4581
4254
  *
4582
4255
  * @returns The viewpoint instance with the updated properties.
4583
4256
  */
4584
- set(data: Partial<BCFViewpoint>): this;
4257
+ set(data: Partial<BCFViewpoint>): this;
4258
+ /**
4259
+ * Sets the viewpoint of the camera in the world.
4260
+ *
4261
+ * @remarks
4262
+ * This function calculates the target position based on the viewpoint information.
4263
+ * It sets the visibility of the viewpoint components and then applies the viewpoint using the camera's controls.
4264
+ *
4265
+ * @param transition - Indicates whether the camera movement should have a transition effect.
4266
+ * Default value is 'true'.
4267
+ *
4268
+ * @throws An error if the world's camera does not have camera controls.
4269
+ *
4270
+ * @returns A Promise that resolves when the camera has been set.
4271
+ */
4272
+ go(transition?: boolean): Promise<void>;
4273
+ /**
4274
+ * Updates the camera settings of the viewpoint based on the current world's camera and renderer.
4275
+ *
4276
+ * @remarks
4277
+ * This function retrieves the camera's position, direction, and aspect ratio from the world's camera and renderer.
4278
+ * It then calculates the camera's perspective or orthographic settings based on the camera type.
4279
+ * Finally, it updates the viewpoint's camera settings and updates the viewpoint to the Viewpoints manager.
4280
+ *
4281
+ * @throws An error if the world's camera does not have camera controls.
4282
+ * @throws An error if the world's renderer is not available.
4283
+ */
4284
+ updateCamera(): void;
4285
+ applyVisibility(): void;
4286
+ /**
4287
+ * Applies color to the components in the viewpoint based on their GUIDs.
4288
+ *
4289
+ * This function iterates through the 'componentColors' map, retrieves the fragment IDs
4290
+ * corresponding to each color, and then uses the 'Classifier' to apply the color to those fragments.
4291
+ *
4292
+ * @remarks
4293
+ * The color is applied using the 'Classifier.setColor' method, which sets the color of the specified fragments.
4294
+ * The color is provided as a hexadecimal string, prefixed with a '#'.
4295
+ */
4296
+ applyColors(): void;
4297
+ /**
4298
+ * Resets the colors of all components in the viewpoint to their original color.
4299
+ */
4300
+ resetColors(): void;
4301
+ private createComponentTags;
4302
+ private createColorTags;
4303
+ /**
4304
+ * Serializes the viewpoint into a buildingSMART compliant XML string for export.
4305
+ *
4306
+ * @param version - The version of the BCF Manager to use for serialization.
4307
+ * If not provided, the current version of the manager will be used.
4308
+ *
4309
+ * @returns A Promise that resolves to an XML string representing the viewpoint.
4310
+ * The XML string follows the BCF VisualizationInfo schema.
4311
+ *
4312
+ * @throws An error if the world's camera does not have camera controls.
4313
+ * @throws An error if the world's renderer is not available.
4314
+ */
4315
+ serialize(version?: string): Promise<string>;
4316
+ }
4317
+ import * as THREE from "three";
4318
+ import { BooleanSettingsControl, ColorSettingsControl, NumberSettingControl } from "../../Types";
4319
+ import { Configurator } from "../../ConfigManager";
4320
+ import { SimpleGrid } from "./simple-grid";
4321
+ type SimpleGridConfigType = {
4322
+ visible: BooleanSettingsControl;
4323
+ color: ColorSettingsControl;
4324
+ primarySize: NumberSettingControl;
4325
+ secondarySize: NumberSettingControl;
4326
+ distance: NumberSettingControl;
4327
+ };
4328
+ /**
4329
+ * Configuration interface for the {@link SimpleGrid}.
4330
+ */
4331
+ export interface SimpleGridConfig {
4332
+ /**
4333
+ * Whether the grid is visible or not.
4334
+ */
4335
+ visible: boolean;
4336
+ /**
4337
+ * The color of the grid lines.
4338
+ */
4339
+ color: THREE.Color;
4340
+ /**
4341
+ * The size of the primary grid lines.
4342
+ */
4343
+ primarySize: number;
4344
+ /**
4345
+ * The size of the secondary grid lines.
4346
+ */
4347
+ secondarySize: number;
4348
+ /**
4349
+ * The distance at which the grid lines start to fade away.
4350
+ */
4351
+ distance: number;
4352
+ }
4353
+ export declare class SimpleGridConfigManager extends Configurator<SimpleGrid, SimpleGridConfigType> {
4354
+ protected _config: SimpleGridConfigType;
4355
+ /**
4356
+ * Whether the grid is visible or not.
4357
+ */
4358
+ get visible(): boolean;
4359
+ /**
4360
+ * Whether the grid is visible or not.
4361
+ */
4362
+ set visible(value: boolean);
4363
+ /**
4364
+ * The color of the grid lines.
4365
+ */
4366
+ get color(): THREE.Color;
4367
+ /**
4368
+ * The color of the grid lines.
4369
+ */
4370
+ set color(value: THREE.Color);
4371
+ /**
4372
+ * The size of the primary grid lines.
4373
+ */
4374
+ get primarySize(): number;
4375
+ /**
4376
+ * The size of the primary grid lines.
4377
+ */
4378
+ set primarySize(value: number);
4585
4379
  /**
4586
- * Sets the viewpoint of the camera in the world.
4587
- *
4588
- * @remarks
4589
- * This function calculates the target position based on the viewpoint information.
4590
- * It sets the visibility of the viewpoint components and then applies the viewpoint using the camera's controls.
4591
- *
4592
- * @param transition - Indicates whether the camera movement should have a transition effect.
4593
- * Default value is 'true'.
4594
- *
4595
- * @throws An error if the world's camera does not have camera controls.
4596
- *
4597
- * @returns A Promise that resolves when the camera has been set.
4380
+ * The size of the secondary grid lines.
4598
4381
  */
4599
- go(transition?: boolean): Promise<void>;
4382
+ get secondarySize(): number;
4600
4383
  /**
4601
- * Updates the camera settings of the viewpoint based on the current world's camera and renderer.
4602
- *
4603
- * @remarks
4604
- * This function retrieves the camera's position, direction, and aspect ratio from the world's camera and renderer.
4605
- * It then calculates the camera's perspective or orthographic settings based on the camera type.
4606
- * Finally, it updates the viewpoint's camera settings and updates the viewpoint to the Viewpoints manager.
4607
- *
4608
- * @throws An error if the world's camera does not have camera controls.
4609
- * @throws An error if the world's renderer is not available.
4384
+ * The size of the secondary grid lines.
4610
4385
  */
4611
- updateCamera(): void;
4612
- applyVisibility(): void;
4386
+ set secondarySize(value: number);
4613
4387
  /**
4614
- * Applies color to the components in the viewpoint based on their GUIDs.
4615
- *
4616
- * This function iterates through the 'componentColors' map, retrieves the fragment IDs
4617
- * corresponding to each color, and then uses the 'Classifier' to apply the color to those fragments.
4618
- *
4619
- * @remarks
4620
- * The color is applied using the 'Classifier.setColor' method, which sets the color of the specified fragments.
4621
- * The color is provided as a hexadecimal string, prefixed with a '#'.
4388
+ * The distance at which the grid lines start to fade away.
4622
4389
  */
4623
- applyColors(): void;
4390
+ get distance(): number;
4624
4391
  /**
4625
- * Resets the colors of all components in the viewpoint to their original color.
4392
+ * The distance at which the grid lines start to fade away.
4626
4393
  */
4627
- resetColors(): void;
4628
- private createComponentTags;
4629
- private createColorTags;
4394
+ set distance(value: number);
4395
+ }
4396
+ export {};
4397
+ import * as THREE from "three";
4398
+ import { Hideable, Event, World, Disposable, Configurable } from "../../Types";
4399
+ import { Components } from "../../Components";
4400
+ import { SimpleGridConfig, SimpleGridConfigManager } from "./simple-grid-config";
4401
+ /**
4402
+ * 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).
4403
+ */
4404
+ export declare class SimpleGrid implements Hideable, Disposable, Configurable<SimpleGridConfigManager, SimpleGridConfig> {
4405
+ /** {@link Disposable.onDisposed} */
4406
+ readonly onDisposed: Event<unknown>;
4407
+ /** {@link Configurable.onSetup} */
4408
+ readonly onSetup: Event<unknown>;
4409
+ /** {@link Configurable.isSetup} */
4410
+ isSetup: boolean;
4411
+ /** The world instance to which this Raycaster belongs. */
4412
+ world: World;
4413
+ /** The components instance to which this grid belongs. */
4414
+ components: Components;
4415
+ /** {@link Configurable.config} */
4416
+ config: SimpleGridConfigManager;
4417
+ protected _defaultConfig: SimpleGridConfig;
4418
+ /** {@link Hideable.visible} */
4419
+ get visible(): boolean;
4420
+ /** {@link Hideable.visible} */
4421
+ set visible(visible: boolean);
4422
+ /** The material of the grid. */
4423
+ get material(): THREE.ShaderMaterial;
4630
4424
  /**
4631
- * Serializes the viewpoint into a buildingSMART compliant XML string for export.
4632
- *
4633
- * @param version - The version of the BCF Manager to use for serialization.
4634
- * If not provided, the current version of the manager will be used.
4635
- *
4636
- * @returns A Promise that resolves to an XML string representing the viewpoint.
4637
- * The XML string follows the BCF VisualizationInfo schema.
4638
- *
4639
- * @throws An error if the world's camera does not have camera controls.
4640
- * @throws An error if the world's renderer is not available.
4425
+ * Whether the grid should fade away with distance. Recommended to be true for
4426
+ * perspective cameras and false for orthographic cameras.
4641
4427
  */
4642
- serialize(version?: string): Promise<string>;
4428
+ get fade(): boolean;
4429
+ /**
4430
+ * Whether the grid should fade away with distance. Recommended to be true for
4431
+ * perspective cameras and false for orthographic cameras.
4432
+ */
4433
+ set fade(active: boolean);
4434
+ /** The Three.js mesh that contains the infinite grid. */
4435
+ readonly three: THREE.Mesh;
4436
+ private _fade;
4437
+ constructor(components: Components, world: World);
4438
+ /** {@link Configurable.setup} */
4439
+ setup(config?: Partial<SimpleGridConfig>): void;
4440
+ /** {@link Disposable.dispose} */
4441
+ dispose(): void;
4442
+ private setupEvents;
4443
+ private updateZoom;
4643
4444
  }
4644
4445
  import * as THREE from "three";
4645
4446
  import { Hideable, Disposable, Event, World } from "../../Types";
@@ -4740,135 +4541,195 @@ export declare class SimplePlane implements Disposable, Hideable {
4740
4541
  private newHelper;
4741
4542
  private static newPlaneMesh;
4742
4543
  }
4743
- import { IfcFragmentSettings } from "../../IfcLoader/src";
4544
+ import { NavigationMode } from "./types";
4545
+ import { OrthoPerspectiveCamera } from "../index";
4744
4546
  /**
4745
- * Settings for streaming properties. Extends {@link IfcFragmentSettings} to inherit common settings.
4547
+ * A {@link NavigationMode} that allows first person navigation, simulating FPS video games.
4746
4548
  */
4747
- export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
4748
- /**
4749
- * Amount of properties to be streamed.
4750
- * Defaults to 100 properties.
4751
- */
4752
- propertiesSize: number;
4753
- }
4754
- import * as THREE from "three";
4755
- import * as WEBIFC from "web-ifc";
4756
- import * as FRAGS from "@thatopen/fragments";
4757
- export declare class CivilReader {
4758
- defLineMat: THREE.LineBasicMaterial;
4759
- read(webIfc: WEBIFC.IfcAPI): {
4760
- alignments: Map<number, FRAGS.Alignment>;
4761
- coordinationMatrix: THREE.Matrix4;
4762
- } | undefined;
4763
- get(civilItems: any): {
4764
- alignments: Map<number, FRAGS.Alignment>;
4765
- coordinationMatrix: THREE.Matrix4;
4766
- } | undefined;
4767
- private getCurves;
4768
- }
4769
- import * as WEBIFC from "web-ifc";
4770
- export declare class IfcMetadataReader {
4771
- getNameInfo(webIfc: WEBIFC.IfcAPI): Record<string, any>;
4772
- getDescriptionInfo(webIfc: WEBIFC.IfcAPI): Record<string, any>;
4549
+ export declare class FirstPersonMode implements NavigationMode {
4550
+ private camera;
4551
+ /** {@link NavigationMode.enabled} */
4552
+ enabled: boolean;
4553
+ /** {@link NavigationMode.id} */
4554
+ readonly id = "FirstPerson";
4555
+ constructor(camera: OrthoPerspectiveCamera);
4556
+ /** {@link NavigationMode.set} */
4557
+ set(active: boolean): void;
4558
+ private setupFirstPersonCamera;
4773
4559
  }
4774
- import { Components } from "../../../../core/Components";
4775
- import { IDSFacet } from "../facets";
4776
- export declare const createEntityFacets: (components: Components, elements: any) => IDSFacet[];
4777
- import { Components } from "../../../../core/Components";
4778
- import { IDSFacet } from "../facets";
4779
- export declare const createAttributeFacets: (components: Components, elements: any) => IDSFacet[];
4780
- import { Components } from "../../../../core/Components";
4781
- import { IDSFacet } from "../facets";
4782
- export declare const createClassificationFacets: (components: Components, elements: any) => IDSFacet[];
4783
- export type IfcVersion = "IFC2X3" | "IFC4" | "IFC4X3_ADD2";
4784
- export type IDSFacetParameterName = "Name" | "PredefinedType" | "Value" | "System" | "URI" | "PropertySet" | "BaseName" | "DataType" | "Value" | "Entity" | "Relation";
4785
- export type IDSSimpleCardinality = "required" | "prohibited";
4786
- export type IDSConditionalCardinaltiy = IDSSimpleCardinality | "optional";
4787
- export type IDSSimpleParameter = string | number | boolean;
4788
- export type IDSEnumerationParameter = string[] | number[] | boolean[];
4789
- export type IDSPatternParameter = string;
4790
- export type IDSBoundsParameter = {
4791
- min?: number;
4792
- minInclusive?: boolean;
4793
- max?: number;
4794
- maxInclusive?: boolean;
4795
- };
4796
- export type IDSLengthParameter = {
4797
- min?: number;
4798
- length?: number;
4799
- max?: number;
4800
- };
4801
- export interface IDSRestrictionParameter {
4560
+ import { NavigationMode } from "./types";
4561
+ import { OrthoPerspectiveCamera } from "../index";
4562
+ /**
4563
+ * A {@link NavigationMode} that allows 3D navigation and panning like in many 3D and CAD softwares.
4564
+ */
4565
+ export declare class OrbitMode implements NavigationMode {
4566
+ camera: OrthoPerspectiveCamera;
4567
+ /** {@link NavigationMode.enabled} */
4568
+ enabled: boolean;
4569
+ /** {@link NavigationMode.id} */
4570
+ readonly id = "Orbit";
4571
+ constructor(camera: OrthoPerspectiveCamera);
4572
+ /** {@link NavigationMode.set} */
4573
+ set(active: boolean): void;
4574
+ private activateOrbitControls;
4802
4575
  }
4803
- export type IDSFacetParameterType = "simple" | "enumeration" | "pattern" | "bounds" | "length";
4804
- export interface IDSFacetParameter {
4805
- type: IDSFacetParameterType;
4806
- parameter: IDSSimpleParameter | IDSEnumerationParameter | IDSPatternParameter | IDSBoundsParameter | IDSLengthParameter;
4576
+ import * as THREE from "three";
4577
+ import { CameraProjection } from "./types";
4578
+ import { Event } from "../../Types";
4579
+ import { OrthoPerspectiveCamera } from "../index";
4580
+ /**
4581
+ * Object to control the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
4582
+ */
4583
+ export declare class ProjectionManager {
4584
+ /**
4585
+ * Event that fires when the {@link CameraProjection} changes.
4586
+ */
4587
+ readonly onChanged: Event<THREE.PerspectiveCamera | THREE.OrthographicCamera>;
4588
+ /**
4589
+ * Current projection mode of the camera.
4590
+ * Default is "Perspective".
4591
+ */
4592
+ current: CameraProjection;
4593
+ /**
4594
+ * The camera controlled by this ProjectionManager.
4595
+ * It can be either a PerspectiveCamera or an OrthographicCamera.
4596
+ */
4597
+ camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
4598
+ /** Match Ortho zoom with Perspective distance when changing projection mode */
4599
+ matchOrthoDistanceEnabled: boolean;
4600
+ private _component;
4601
+ private _previousDistance;
4602
+ constructor(camera: OrthoPerspectiveCamera);
4603
+ /**
4604
+ * Sets the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
4605
+ *
4606
+ * @param projection - the new projection to set. If it is the current projection,
4607
+ * it will have no effect.
4608
+ */
4609
+ set(projection: CameraProjection): Promise<void>;
4610
+ /**
4611
+ * Changes the current {@link CameraProjection} from Ortographic to Perspective
4612
+ * and vice versa.
4613
+ */
4614
+ toggle(): Promise<void>;
4615
+ private setOrthoCamera;
4616
+ private getPerspectiveDims;
4617
+ private setupOrthoCamera;
4618
+ private getDistance;
4619
+ private setPerspectiveCamera;
4807
4620
  }
4808
- export interface IDSCheck {
4809
- parameter: IDSFacetParameterName;
4810
- currentValue: string | number | boolean | null;
4811
- requiredValue: any;
4812
- pass: boolean;
4621
+ import { NavigationMode } from "./types";
4622
+ import { OrthoPerspectiveCamera } from "../index";
4623
+ /**
4624
+ * A {@link NavigationMode} that allows to navigate floorplans in 2D, like many BIM tools.
4625
+ */
4626
+ export declare class PlanMode implements NavigationMode {
4627
+ private camera;
4628
+ /** {@link NavigationMode.enabled} */
4629
+ enabled: boolean;
4630
+ /** {@link NavigationMode.id} */
4631
+ readonly id = "Plan";
4632
+ private mouseAction1?;
4633
+ private mouseAction2?;
4634
+ private mouseInitialized;
4635
+ private readonly defaultAzimuthSpeed;
4636
+ private readonly defaultPolarSpeed;
4637
+ constructor(camera: OrthoPerspectiveCamera);
4638
+ /** {@link NavigationMode.set} */
4639
+ set(active: boolean): void;
4813
4640
  }
4814
4641
  /**
4815
- * Represents the result of a check performed by an IDSFacet test.
4642
+ * The projection system of the camera.
4816
4643
  */
4817
- export interface IDSCheckResult {
4818
- guid?: string;
4819
- expressID: number;
4820
- pass: boolean;
4821
- checks: IDSCheck[];
4822
- cardinality: IDSConditionalCardinaltiy;
4823
- }
4824
- export interface IDSInfo {
4825
- title: string;
4826
- description?: string;
4827
- copyright?: string;
4828
- version?: string;
4829
- author?: string;
4830
- date?: Date;
4831
- purpose?: string;
4832
- milestone?: string;
4833
- }
4834
- import * as FRAGS from "@thatopen/fragments";
4835
- import { Components } from "../../../core/Components";
4836
- import { DataSet } from "../../../core/Types";
4837
- import { IDSCheckResult, IfcVersion } from "./types";
4838
- import { IDSFacet } from "./facets";
4644
+ export type CameraProjection = "Perspective" | "Orthographic";
4839
4645
  /**
4840
- * Represents a single specification from the Information Delivery Specification (IDS) standard.
4841
- *
4842
- * @remarks This class provides methods for testing a model against the specification,
4843
- * as well as serializing the specification into XML format.
4646
+ * The extensible list of supported navigation modes.
4844
4647
  */
4845
- export declare class IDSSpecification {
4846
- name: string;
4847
- ifcVersion: Set<IfcVersion>;
4848
- identifier: string;
4849
- description?: string;
4850
- instructions?: string;
4851
- requirementsDescription?: string;
4852
- applicability: DataSet<IDSFacet>;
4853
- requirements: DataSet<IDSFacet>;
4854
- protected components: Components;
4855
- constructor(components: Components, name: string, ifcVersion: IfcVersion[]);
4648
+ export type NavModeID = "Orbit" | "FirstPerson" | "Plan";
4649
+ /**
4650
+ * An object that determines the behavior of the camera controls and the user input (e.g. 2D floor plan mode, first person mode, etc).
4651
+ */
4652
+ export interface NavigationMode {
4653
+ /** The unique ID of this navigation mode. */
4654
+ id: NavModeID;
4856
4655
  /**
4857
- * Tests the model to test against the specification's requirements.
4656
+ * Enable or disable this navigation mode.
4657
+ * When a new navigation mode is enabled, the previous navigation mode
4658
+ * must be disabled.
4858
4659
  *
4859
- * @param model - The model to be tested.
4860
- * @returns An array representing the test results.
4861
- * If no requirements are defined for the specification, an empty array is returned.
4660
+ * @param active - whether to enable or disable this mode.
4661
+ * @param options - any additional data required to enable or disable it.
4662
+ * */
4663
+ set: (active: boolean, options?: any) => void;
4664
+ /** Whether this navigation mode is active or not. */
4665
+ enabled: boolean;
4666
+ }
4667
+ import * as THREE from "three";
4668
+ import { Event, World } from "../../Types";
4669
+ import { Components } from "../../Components";
4670
+ /**
4671
+ * A base renderer to determine visibility on screen.
4672
+ */
4673
+ export declare class DistanceRenderer {
4674
+ /** {@link Disposable.onDisposed} */
4675
+ readonly onDisposed: Event<string>;
4676
+ /**
4677
+ * Fires after making the visibility check to the meshes. It lists the
4678
+ * meshes that are currently visible, and the ones that were visible
4679
+ * just before but not anymore.
4862
4680
  */
4863
- test(model: FRAGS.FragmentsGroup): Promise<IDSCheckResult[]>;
4681
+ readonly onDistanceComputed: Event<number>;
4864
4682
  /**
4865
- * Serializes the IDSSpecification instance into XML format.
4866
- *
4867
- * @remarks This method is not meant to be used directly. It is used by the IDSSpecifications component.
4868
- *
4869
- * @returns The XML representation of the IDSSpecification.
4683
+ * Objects that won't be taken into account in the distance check.
4870
4684
  */
4871
- serialize(): string;
4685
+ excludedObjects: Set<THREE.Object3D<THREE.Object3DEventMap>>;
4686
+ /**
4687
+ * Whether this renderer is active or not. If not, it won't render anything.
4688
+ */
4689
+ enabled: boolean;
4690
+ /**
4691
+ * Render the internal scene used to determine the object visibility. Used
4692
+ * for debugging purposes.
4693
+ */
4694
+ renderDebugFrame: boolean;
4695
+ /** The components instance to which this renderer belongs. */
4696
+ components: Components;
4697
+ /**
4698
+ * The scene where the distance is computed.
4699
+ */
4700
+ scene: THREE.Scene;
4701
+ /**
4702
+ * The camera used to compute the distance.
4703
+ */
4704
+ camera: THREE.OrthographicCamera;
4705
+ /**
4706
+ * The material used to compute the distance.
4707
+ */
4708
+ depthMaterial: THREE.ShaderMaterial;
4709
+ /** The world instance to which this renderer belongs. */
4710
+ readonly world: World;
4711
+ /** The THREE.js renderer used to make the visibility test. */
4712
+ readonly renderer: THREE.WebGLRenderer;
4713
+ protected readonly worker: Worker;
4714
+ private _width;
4715
+ private _height;
4716
+ private readonly _postQuad;
4717
+ private readonly tempRT;
4718
+ private readonly resultRT;
4719
+ private readonly bufferSize;
4720
+ private readonly _buffer;
4721
+ protected _isWorkerBusy: boolean;
4722
+ constructor(components: Components, world: World);
4723
+ /** {@link Disposable.dispose} */
4724
+ dispose(): void;
4725
+ /**
4726
+ * The function that the culler uses to reprocess the scene. Generally it's
4727
+ * better to call needsUpdate, but you can also call this to force it.
4728
+ * @param force if true, it will refresh the scene even if needsUpdate is
4729
+ * not true.
4730
+ */
4731
+ compute: () => Promise<void>;
4732
+ private handleWorkerMessage;
4872
4733
  }
4873
4734
  /**
4874
4735
  * A rule for the {@link IfcFinder} to search items based on their category.
@@ -5131,6 +4992,21 @@ export declare class IfcPropertyQuery extends IfcFinderQuery {
5131
4992
  import { IfcRelName } from "./types";
5132
4993
  import { IfcRelation } from "../../IfcRelationsIndexer";
5133
4994
  export declare const ifcRelClassNames: Record<IfcRelation, IfcRelName>;
4995
+ import * as THREE from "three";
4996
+ import * as WEBIFC from "web-ifc";
4997
+ import * as FRAGS from "@thatopen/fragments";
4998
+ export declare class CivilReader {
4999
+ defLineMat: THREE.LineBasicMaterial;
5000
+ read(webIfc: WEBIFC.IfcAPI): {
5001
+ alignments: Map<number, FRAGS.Alignment>;
5002
+ coordinationMatrix: THREE.Matrix4;
5003
+ } | undefined;
5004
+ get(civilItems: any): {
5005
+ alignments: Map<number, FRAGS.Alignment>;
5006
+ coordinationMatrix: THREE.Matrix4;
5007
+ } | undefined;
5008
+ private getCurves;
5009
+ }
5134
5010
  export type IfcRelationNames = [
5135
5011
  "IfcRelAssignsToControl",
5136
5012
  "IfcRelAssignsToGroup",
@@ -5150,6 +5026,25 @@ export type IfcRelationNames = [
5150
5026
  ];
5151
5027
  export type IfcRelName = IfcRelationNames[number];
5152
5028
  import * as WEBIFC from "web-ifc";
5029
+ export declare class IfcMetadataReader {
5030
+ getNameInfo(webIfc: WEBIFC.IfcAPI): Record<string, any>;
5031
+ getDescriptionInfo(webIfc: WEBIFC.IfcAPI): Record<string, any>;
5032
+ }
5033
+ import { IfcFragmentSettings } from "../../IfcLoader/src";
5034
+ /**
5035
+ * Settings for streaming properties. Extends {@link IfcFragmentSettings} to inherit common settings.
5036
+ */
5037
+ export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
5038
+ /**
5039
+ * Amount of properties to be streamed.
5040
+ * Defaults to 100 properties.
5041
+ */
5042
+ propertiesSize: number;
5043
+ }
5044
+ import { Components } from "../../../../core/Components";
5045
+ import { IDSFacet } from "../facets";
5046
+ export declare const createEntityFacets: (components: Components, elements: any) => IDSFacet[];
5047
+ import * as WEBIFC from "web-ifc";
5153
5048
  import * as THREE from "three";
5154
5049
  export declare class Units {
5155
5050
  factor: number;
@@ -5159,114 +5054,102 @@ export declare class Units {
5159
5054
  private getLengthUnits;
5160
5055
  private getScaleMatrix;
5161
5056
  }
5162
- import { IDSFacetParameter } from "../types";
5163
- export declare const getParameterValue: (property: any) => IDSFacetParameter | undefined;
5164
- import { IfcFragmentSettings } from "../../IfcLoader/src";
5165
- /**
5166
- * Settings for streaming IFC geometry and assets. Extends {@link IfcFragmentSettings} to inherit common settings.
5167
- */
5168
- export declare class IfcStreamingSettings extends IfcFragmentSettings {
5169
- /**
5170
- * Minimum number of geometries to be streamed.
5171
- * Defaults to 10 geometries.
5172
- */
5173
- minGeometrySize: number;
5174
- /**
5175
- * Minimum amount of assets to be streamed.
5176
- * Defaults to 1000 assets.
5177
- */
5178
- minAssetsSize: number;
5179
- /**
5180
- * Maximum amount of triangles per fragment. Useful for controlling the maximum size of fragment files.
5181
- */
5182
- maxTriangles: number | null;
5183
- }
5184
- /**
5185
- * 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.
5186
- */
5187
- export interface StreamedGeometries {
5188
- [id: number]: {
5189
- /** The bounding box of the geometry as a Float32Array. */
5190
- boundingBox: Float32Array;
5191
- /** A boolean indicating whether the geometry has holes. */
5192
- hasHoles: boolean;
5193
- /** An optional file path for the geometry data. */
5194
- geometryFile?: string;
5195
- };
5057
+ import { Components } from "../../../../core/Components";
5058
+ import { IDSFacet } from "../facets";
5059
+ export declare const createAttributeFacets: (components: Components, elements: any) => IDSFacet[];
5060
+ import { Components } from "../../../../core/Components";
5061
+ import { IDSFacet } from "../facets";
5062
+ export declare const createClassificationFacets: (components: Components, elements: any) => IDSFacet[];
5063
+ export type IfcVersion = "IFC2X3" | "IFC4" | "IFC4X3_ADD2";
5064
+ export type IDSFacetParameterName = "Name" | "PredefinedType" | "Value" | "System" | "URI" | "PropertySet" | "BaseName" | "DataType" | "Value" | "Entity" | "Relation";
5065
+ export type IDSSimpleCardinality = "required" | "prohibited";
5066
+ export type IDSConditionalCardinaltiy = IDSSimpleCardinality | "optional";
5067
+ export type IDSSimpleParameter = string | number | boolean;
5068
+ export type IDSEnumerationParameter = string[] | number[] | boolean[];
5069
+ export type IDSPatternParameter = string;
5070
+ export type IDSBoundsParameter = {
5071
+ min?: number;
5072
+ minInclusive?: boolean;
5073
+ max?: number;
5074
+ maxInclusive?: boolean;
5075
+ };
5076
+ export type IDSLengthParameter = {
5077
+ min?: number;
5078
+ length?: number;
5079
+ max?: number;
5080
+ };
5081
+ export interface IDSRestrictionParameter {
5196
5082
  }
5197
- /**
5198
- * 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.
5199
- */
5200
- export interface StreamedAsset {
5201
- /** The unique identifier of the asset. */
5202
- id: number;
5203
- /** An array of geometries associated with the asset. */
5204
- geometries: {
5205
- /** The unique identifier of the geometry. */
5206
- geometryID: number;
5207
- /** The transformation matrix of the geometry as a number array. */
5208
- transformation: number[];
5209
- /** The color of the geometry as a number array. */
5210
- color: number[];
5211
- }[];
5083
+ export type IDSFacetParameterType = "simple" | "enumeration" | "pattern" | "bounds" | "length";
5084
+ export interface IDSFacetParameter {
5085
+ type: IDSFacetParameterType;
5086
+ parameter: IDSSimpleParameter | IDSEnumerationParameter | IDSPatternParameter | IDSBoundsParameter | IDSLengthParameter;
5212
5087
  }
5213
- import * as WEBIFC from "web-ifc";
5214
- export type RelationsMap = Map<number, Map<number, number[]>>;
5215
- export interface ModelsRelationMap {
5216
- [modelID: string]: RelationsMap;
5088
+ export interface IDSCheck {
5089
+ parameter: IDSFacetParameterName;
5090
+ currentValue: string | number | boolean | null;
5091
+ requiredValue: any;
5092
+ pass: boolean;
5217
5093
  }
5218
5094
  /**
5219
- * Type alias for an array of inverse attribute names.
5095
+ * Represents the result of a check performed by an IDSFacet test.
5220
5096
  */
5221
- export type InverseAttributes = [
5222
- "IsDecomposedBy",
5223
- "Decomposes",
5224
- "AssociatedTo",
5225
- "HasAssociations",
5226
- "ClassificationForObjects",
5227
- "IsGroupedBy",
5228
- "HasAssignments",
5229
- "IsDefinedBy",
5230
- "DefinesOcurrence",
5231
- "IsTypedBy",
5232
- "Types",
5233
- "Defines",
5234
- "ContainedInStructure",
5235
- "ContainsElements",
5236
- "HasControlElements",
5237
- "AssignedToFlowElement",
5238
- "ConnectedTo",
5239
- "ConnectedFrom",
5240
- "ReferencedBy",
5241
- "Declares",
5242
- "HasContext",
5243
- "Controls",
5244
- "IsNestedBy",
5245
- "Nests",
5246
- "DocumentRefForObjects"
5247
- ];
5248
- export type InverseAttribute = InverseAttributes[number];
5097
+ export interface IDSCheckResult {
5098
+ guid?: string;
5099
+ expressID: number;
5100
+ pass: boolean;
5101
+ checks: IDSCheck[];
5102
+ cardinality: IDSConditionalCardinaltiy;
5103
+ }
5104
+ export interface IDSInfo {
5105
+ title: string;
5106
+ description?: string;
5107
+ copyright?: string;
5108
+ version?: string;
5109
+ author?: string;
5110
+ date?: Date;
5111
+ purpose?: string;
5112
+ milestone?: string;
5113
+ }
5114
+ import * as FRAGS from "@thatopen/fragments";
5115
+ import { Components } from "../../../core/Components";
5116
+ import { DataSet } from "../../../core/Types";
5117
+ import { IDSCheckResult, IfcVersion } from "./types";
5118
+ import { IDSFacet } from "./facets";
5249
5119
  /**
5250
- * Type alias for an array of IfcRelation types from WebIfc.
5120
+ * Represents a single specification from the Information Delivery Specification (IDS) standard.
5121
+ *
5122
+ * @remarks This class provides methods for testing a model against the specification,
5123
+ * as well as serializing the specification into XML format.
5251
5124
  */
5252
- export type IfcRelations = [
5253
- typeof WEBIFC.IFCRELAGGREGATES,
5254
- typeof WEBIFC.IFCRELASSOCIATESMATERIAL,
5255
- typeof WEBIFC.IFCRELASSOCIATESCLASSIFICATION,
5256
- typeof WEBIFC.IFCRELASSIGNSTOGROUP,
5257
- typeof WEBIFC.IFCRELDEFINESBYPROPERTIES,
5258
- typeof WEBIFC.IFCRELDEFINESBYTYPE,
5259
- typeof WEBIFC.IFCRELDEFINESBYTEMPLATE,
5260
- typeof WEBIFC.IFCRELCONTAINEDINSPATIALSTRUCTURE,
5261
- typeof WEBIFC.IFCRELFLOWCONTROLELEMENTS,
5262
- typeof WEBIFC.IFCRELCONNECTSELEMENTS,
5263
- typeof WEBIFC.IFCRELASSIGNSTOPRODUCT,
5264
- typeof WEBIFC.IFCRELDECLARES,
5265
- typeof WEBIFC.IFCRELASSIGNSTOCONTROL,
5266
- typeof WEBIFC.IFCRELNESTS,
5267
- typeof WEBIFC.IFCRELASSOCIATESDOCUMENT
5268
- ];
5269
- export type IfcRelation = IfcRelations[number];
5125
+ export declare class IDSSpecification {
5126
+ name: string;
5127
+ ifcVersion: Set<IfcVersion>;
5128
+ identifier: string;
5129
+ description?: string;
5130
+ instructions?: string;
5131
+ requirementsDescription?: string;
5132
+ applicability: DataSet<IDSFacet>;
5133
+ requirements: DataSet<IDSFacet>;
5134
+ protected components: Components;
5135
+ constructor(components: Components, name: string, ifcVersion: IfcVersion[]);
5136
+ /**
5137
+ * Tests the model to test against the specification's requirements.
5138
+ *
5139
+ * @param model - The model to be tested.
5140
+ * @returns An array representing the test results.
5141
+ * If no requirements are defined for the specification, an empty array is returned.
5142
+ */
5143
+ test(model: FRAGS.FragmentsGroup): Promise<IDSCheckResult[]>;
5144
+ /**
5145
+ * Serializes the IDSSpecification instance into XML format.
5146
+ *
5147
+ * @remarks This method is not meant to be used directly. It is used by the IDSSpecifications component.
5148
+ *
5149
+ * @returns The XML representation of the IDSSpecification.
5150
+ */
5151
+ serialize(): string;
5152
+ }
5270
5153
  import { Components } from "../../../core/Components";
5271
5154
  import { Viewpoint } from "../../../core/Viewpoints";
5272
5155
  import { Comment } from "./Comment";
@@ -5571,17 +5454,81 @@ export declare class BCFTopicsConfigManager extends Configurator<BCFTopics, BCFT
5571
5454
  set ignoreIncompleteTopicsOnImport(value: boolean);
5572
5455
  }
5573
5456
  export {};
5574
- import * as FRAGS from "@thatopen/fragments";
5575
- import { IDSCheckResult, IDSFacetParameter } from "../types";
5576
- import { Components } from "../../../../core/Components";
5577
- import { IDSFacet } from "./Facet";
5578
- export declare class IDSAttribute extends IDSFacet {
5579
- name: IDSFacetParameter;
5580
- value?: IDSFacetParameter;
5581
- constructor(components: Components, name: IDSFacetParameter);
5582
- serialize(type: "applicability" | "requirement"): string;
5583
- getEntities(): Promise<never[]>;
5584
- test(entities: FRAGS.IfcProperties): Promise<IDSCheckResult[]>;
5457
+ import { IDSFacetParameter } from "../types";
5458
+ export declare const getParameterValue: (property: any) => IDSFacetParameter | undefined;
5459
+ import * as WEBIFC from "web-ifc";
5460
+ export type RelationsMap = Map<number, Map<number, number[]>>;
5461
+ export interface ModelsRelationMap {
5462
+ [modelID: string]: RelationsMap;
5463
+ }
5464
+ /**
5465
+ * Type alias for an array of inverse attribute names.
5466
+ */
5467
+ export type InverseAttributes = [
5468
+ "IsDecomposedBy",
5469
+ "Decomposes",
5470
+ "AssociatedTo",
5471
+ "HasAssociations",
5472
+ "ClassificationForObjects",
5473
+ "IsGroupedBy",
5474
+ "HasAssignments",
5475
+ "IsDefinedBy",
5476
+ "DefinesOcurrence",
5477
+ "IsTypedBy",
5478
+ "Types",
5479
+ "Defines",
5480
+ "ContainedInStructure",
5481
+ "ContainsElements",
5482
+ "HasControlElements",
5483
+ "AssignedToFlowElement",
5484
+ "ConnectedTo",
5485
+ "ConnectedFrom",
5486
+ "ReferencedBy",
5487
+ "Declares",
5488
+ "HasContext",
5489
+ "Controls",
5490
+ "IsNestedBy",
5491
+ "Nests",
5492
+ "DocumentRefForObjects"
5493
+ ];
5494
+ export type InverseAttribute = InverseAttributes[number];
5495
+ /**
5496
+ * Type alias for an array of IfcRelation types from WebIfc.
5497
+ */
5498
+ export type IfcRelations = [
5499
+ typeof WEBIFC.IFCRELAGGREGATES,
5500
+ typeof WEBIFC.IFCRELASSOCIATESMATERIAL,
5501
+ typeof WEBIFC.IFCRELASSOCIATESCLASSIFICATION,
5502
+ typeof WEBIFC.IFCRELASSIGNSTOGROUP,
5503
+ typeof WEBIFC.IFCRELDEFINESBYPROPERTIES,
5504
+ typeof WEBIFC.IFCRELDEFINESBYTYPE,
5505
+ typeof WEBIFC.IFCRELDEFINESBYTEMPLATE,
5506
+ typeof WEBIFC.IFCRELCONTAINEDINSPATIALSTRUCTURE,
5507
+ typeof WEBIFC.IFCRELFLOWCONTROLELEMENTS,
5508
+ typeof WEBIFC.IFCRELCONNECTSELEMENTS,
5509
+ typeof WEBIFC.IFCRELASSIGNSTOPRODUCT,
5510
+ typeof WEBIFC.IFCRELDECLARES,
5511
+ typeof WEBIFC.IFCRELASSIGNSTOCONTROL,
5512
+ typeof WEBIFC.IFCRELNESTS,
5513
+ typeof WEBIFC.IFCRELASSOCIATESDOCUMENT
5514
+ ];
5515
+ export type IfcRelation = IfcRelations[number];
5516
+ export interface RelationsProcessingConfig {
5517
+ relationsToProcess: IfcRelation[];
5518
+ }
5519
+ /**
5520
+ * Interface definition of an Entities Related Event from the IfcRelationsIndexer.
5521
+ * This event gets triggered when two or more entities has been related with each other.
5522
+ */
5523
+ export interface EntitiesRelatedEvent {
5524
+ /** The type of the IFC relation. */
5525
+ relType: IfcRelation;
5526
+ /** The inverse attribute of the relation. */
5527
+ invAttribute: InverseAttribute;
5528
+ /** The IDs of the entities that are relating. */
5529
+ relatingIDs: number[];
5530
+ /** The IDs of the entities that are being related. */
5531
+ relatedIDs: number[];
5585
5532
  }
5586
5533
  import { BooleanSettingsControl, NumberSettingControl } from "../../Types";
5587
5534
  import { Configurator } from "../../ConfigManager";
@@ -5657,6 +5604,67 @@ export declare class CullerRendererConfigManager extends Configurator<CullerRend
5657
5604
  private resetInterval;
5658
5605
  }
5659
5606
  export {};
5607
+ import { IfcFragmentSettings } from "../../IfcLoader/src";
5608
+ /**
5609
+ * Settings for streaming IFC geometry and assets. Extends {@link IfcFragmentSettings} to inherit common settings.
5610
+ */
5611
+ export declare class IfcStreamingSettings extends IfcFragmentSettings {
5612
+ /**
5613
+ * Minimum number of geometries to be streamed.
5614
+ * Defaults to 10 geometries.
5615
+ */
5616
+ minGeometrySize: number;
5617
+ /**
5618
+ * Minimum amount of assets to be streamed.
5619
+ * Defaults to 1000 assets.
5620
+ */
5621
+ minAssetsSize: number;
5622
+ /**
5623
+ * Maximum amount of triangles per fragment. Useful for controlling the maximum size of fragment files.
5624
+ */
5625
+ maxTriangles: number | null;
5626
+ }
5627
+ /**
5628
+ * 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.
5629
+ */
5630
+ export interface StreamedGeometries {
5631
+ [id: number]: {
5632
+ /** The bounding box of the geometry as a Float32Array. */
5633
+ boundingBox: Float32Array;
5634
+ /** A boolean indicating whether the geometry has holes. */
5635
+ hasHoles: boolean;
5636
+ /** An optional file path for the geometry data. */
5637
+ geometryFile?: string;
5638
+ };
5639
+ }
5640
+ /**
5641
+ * 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.
5642
+ */
5643
+ export interface StreamedAsset {
5644
+ /** The unique identifier of the asset. */
5645
+ id: number;
5646
+ /** An array of geometries associated with the asset. */
5647
+ geometries: {
5648
+ /** The unique identifier of the geometry. */
5649
+ geometryID: number;
5650
+ /** The transformation matrix of the geometry as a number array. */
5651
+ transformation: number[];
5652
+ /** The color of the geometry as a number array. */
5653
+ color: number[];
5654
+ }[];
5655
+ }
5656
+ import * as FRAGS from "@thatopen/fragments";
5657
+ import { IDSCheckResult, IDSFacetParameter } from "../types";
5658
+ import { Components } from "../../../../core/Components";
5659
+ import { IDSFacet } from "./Facet";
5660
+ export declare class IDSAttribute extends IDSFacet {
5661
+ name: IDSFacetParameter;
5662
+ value?: IDSFacetParameter;
5663
+ constructor(components: Components, name: IDSFacetParameter);
5664
+ serialize(type: "applicability" | "requirement"): string;
5665
+ getEntities(): Promise<never[]>;
5666
+ test(entities: FRAGS.IfcProperties): Promise<IDSCheckResult[]>;
5667
+ }
5660
5668
  import * as FRAGS from "@thatopen/fragments";
5661
5669
  import { Components } from "../../../../core/Components";
5662
5670
  import { IDSCheckResult, IDSFacetParameter } from "../types";
@@ -5747,6 +5755,59 @@ import * as THREE from "three";
5747
5755
  export declare class TransformHelper {
5748
5756
  getHelper(geometries: BufferGeometry[]): THREE.Object3D<THREE.Object3DEventMap>;
5749
5757
  }
5758
+ declare const actual: {
5759
+ 186: {
5760
+ 7: number[];
5761
+ };
5762
+ 250: {
5763
+ 8: number[];
5764
+ };
5765
+ 253: {
5766
+ 8: number[];
5767
+ };
5768
+ 257: {
5769
+ 8: number[];
5770
+ };
5771
+ };
5772
+ declare const newVersion: {
5773
+ 186: {
5774
+ 7: ({
5775
+ 259: number[];
5776
+ 263?: undefined;
5777
+ 266?: undefined;
5778
+ } | {
5779
+ 263: number[];
5780
+ 259?: undefined;
5781
+ 266?: undefined;
5782
+ } | {
5783
+ 266: number[];
5784
+ 259?: undefined;
5785
+ 263?: undefined;
5786
+ })[];
5787
+ };
5788
+ 190: {
5789
+ 7: {
5790
+ 259: number[];
5791
+ }[];
5792
+ };
5793
+ 250: {
5794
+ 8: {
5795
+ 259: number[];
5796
+ }[];
5797
+ };
5798
+ };
5799
+ interface V2Schema {
5800
+ [expressID: number]: {
5801
+ [invAttrIndex: number]: {
5802
+ [IfcRelationship: number]: number[];
5803
+ };
5804
+ };
5805
+ }
5806
+ type RelationsMap = Map<number, Map<number, {
5807
+ [ifcRel: number]: number[];
5808
+ }>>;
5809
+ import { IDSFacetParameterName, IDSFacetParameter } from "../types";
5810
+ export declare const getParameterXML: (name: IDSFacetParameterName, parameter?: IDSFacetParameter) => string;
5750
5811
  import { IDSFacetParameter } from "../types";
5751
5812
  import { IDSFacet } from "./Facet";
5752
5813
  export declare class IdsMaterialFacet extends IDSFacet {
@@ -5756,8 +5817,6 @@ export declare class IdsMaterialFacet extends IDSFacet {
5756
5817
  getEntities(): Promise<number[]>;
5757
5818
  test(): Promise<import("../types").IDSCheckResult[]>;
5758
5819
  }
5759
- import { IDSFacetParameterName, IDSFacetParameter } from "../types";
5760
- export declare const getParameterXML: (name: IDSFacetParameterName, parameter?: IDSFacetParameter) => string;
5761
5820
  import * as FRAGS from "@thatopen/fragments";
5762
5821
  import { Components } from "../../../../core/Components";
5763
5822
  import { IDSFacet } from "./Facet";