@thatopen/components 2.0.0-alpha.11 → 2.0.0-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,47 @@
1
1
  declare namespace OBC {
2
+ import * as THREE from "three";
3
+ import { Components } from "../Components";
4
+ import { Component } from "../Types";
5
+ /**
6
+ * A tool to safely remove meshes and geometries from memory to
7
+ * [prevent memory leaks](https://threejs.org/docs/#manual/en/introduction/How-to-dispose-of-objects).
8
+ */
9
+ export declare class Disposer extends Component {
10
+ private _disposedComponents;
11
+ /** {@link Component.enabled} */
12
+ enabled: boolean;
13
+ static readonly uuid: "76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe";
14
+ constructor(components: Components);
15
+ /**
16
+ * {@link Component.uuid}.
17
+ * @return the list of UUIDs of deleted components.
18
+ */
19
+ get(): Set<string>;
20
+ /**
21
+ * Removes a mesh, its geometry and its materials from memory. If you are
22
+ * using any of these in other parts of the application, make sure that you
23
+ * remove them from the mesh before disposing it.
24
+ *
25
+ * @param object - the [object](https://threejs.org/docs/#api/en/core/Object3D)
26
+ * to remove.
27
+ *
28
+ * @param materials - whether to dispose the materials of the mesh.
29
+ *
30
+ * @param recursive - whether to recursively dispose the children of the mesh.
31
+ */
32
+ destroy(object: THREE.Object3D, materials?: boolean, recursive?: boolean): void;
33
+ /**
34
+ * Disposes a geometry from memory.
35
+ *
36
+ * @param geometry - the
37
+ * [geometry](https://threejs.org/docs/#api/en/core/BufferGeometry)
38
+ * to remove.
39
+ */
40
+ disposeGeometry(geometry: THREE.BufferGeometry): void;
41
+ private disposeGeometryAndMaterials;
42
+ private disposeChildren;
43
+ private static disposeMaterial;
44
+ }
2
45
  import { Component, Disposable, World, Event } from "../Types";
3
46
  import { SimpleRaycaster } from "./src";
4
47
  import { Components } from "../Components";
@@ -64,49 +107,6 @@ export declare class Components implements Disposable {
64
107
  private update;
65
108
  private static setupBVH;
66
109
  }
67
- import * as THREE from "three";
68
- import { Components } from "../Components";
69
- import { Component } from "../Types";
70
- /**
71
- * A tool to safely remove meshes and geometries from memory to
72
- * [prevent memory leaks](https://threejs.org/docs/#manual/en/introduction/How-to-dispose-of-objects).
73
- */
74
- export declare class Disposer extends Component {
75
- private _disposedComponents;
76
- /** {@link Component.enabled} */
77
- enabled: boolean;
78
- static readonly uuid: "76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe";
79
- constructor(components: Components);
80
- /**
81
- * {@link Component.uuid}.
82
- * @return the list of UUIDs of deleted components.
83
- */
84
- get(): Set<string>;
85
- /**
86
- * Removes a mesh, its geometry and its materials from memory. If you are
87
- * using any of these in other parts of the application, make sure that you
88
- * remove them from the mesh before disposing it.
89
- *
90
- * @param object - the [object](https://threejs.org/docs/#api/en/core/Object3D)
91
- * to remove.
92
- *
93
- * @param materials - whether to dispose the materials of the mesh.
94
- *
95
- * @param recursive - whether to recursively dispose the children of the mesh.
96
- */
97
- destroy(object: THREE.Object3D, materials?: boolean, recursive?: boolean): void;
98
- /**
99
- * Disposes a geometry from memory.
100
- *
101
- * @param geometry - the
102
- * [geometry](https://threejs.org/docs/#api/en/core/BufferGeometry)
103
- * to remove.
104
- */
105
- disposeGeometry(geometry: THREE.BufferGeometry): void;
106
- private disposeGeometryAndMaterials;
107
- private disposeChildren;
108
- private static disposeMaterial;
109
- }
110
110
  import { Component, Disposable, World, Event } from "../Types";
111
111
  import { GridConfig, SimpleGrid } from "./src";
112
112
  export declare class Grids extends Component implements Disposable {
@@ -136,21 +136,6 @@ export declare class Worlds extends Component implements Updateable, Disposable
136
136
  dispose(): void;
137
137
  update(delta?: number): void | Promise<void>;
138
138
  }
139
- import { Component, Components, Disposable, Updateable, World, Event } from "../../core";
140
- import { MiniMap } from "./src";
141
- export declare class MiniMaps extends Component implements Updateable, Disposable {
142
- static readonly uuid: "39ad6aad-84c8-4adf-a1e0-7f25313a9e7f";
143
- readonly onAfterUpdate: Event<unknown>;
144
- readonly onBeforeUpdate: Event<unknown>;
145
- readonly onDisposed: Event<unknown>;
146
- enabled: boolean;
147
- list: Map<string, MiniMap>;
148
- constructor(components: Components);
149
- create(world: World): MiniMap;
150
- delete(id: string): void;
151
- dispose(): void | Promise<void>;
152
- update(): void;
153
- }
154
139
  import * as THREE from "three";
155
140
  import { Component, Createable, Disposable, Event, Hideable, World } from "../Types";
156
141
  import { SimplePlane } from "./src";
@@ -255,55 +240,6 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
255
240
  private _onEndDragging;
256
241
  }
257
242
  import * as THREE from "three";
258
- import { Components } from "../../core/Components";
259
- import { SimpleCamera } from "../../core";
260
- import { NavigationMode, NavModeID, ProjectionManager } from "./src";
261
- /**
262
- * A flexible camera that uses
263
- * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
264
- * easily control the camera in 2D and 3D. It supports multiple navigation
265
- * modes, such as 2D floor plan navigation, first person and 3D orbit.
266
- */
267
- export declare class OrthoPerspectiveCamera extends SimpleCamera {
268
- /**
269
- * The current {@link NavigationMode}.
270
- */
271
- mode: NavigationMode;
272
- readonly projection: ProjectionManager;
273
- readonly threeOrtho: THREE.OrthographicCamera;
274
- protected readonly _userInputButtons: any;
275
- protected readonly _frustumSize = 50;
276
- protected readonly _navigationModes: Map<NavModeID, NavigationMode>;
277
- get current(): THREE.PerspectiveCamera | THREE.OrthographicCamera;
278
- constructor(components: Components);
279
- /** {@link Disposable.dispose} */
280
- dispose(): void;
281
- /**
282
- * Sets a new {@link NavigationMode} and disables the previous one.
283
- *
284
- * @param mode - The {@link NavigationMode} to set.
285
- */
286
- set(mode: NavModeID): void;
287
- /**
288
- * Make the camera view fit all the specified meshes.
289
- *
290
- * @param meshes the meshes to fit. If it is not defined, it will
291
- * evaluate {@link Components.meshes}.
292
- * @param offset the distance to the fit object
293
- */
294
- fit(meshes: Iterable<THREE.Mesh>, offset?: number): Promise<void>;
295
- /**
296
- * Allows or prevents all user input.
297
- *
298
- * @param active - whether to enable or disable user inputs.
299
- */
300
- setUserInput(active: boolean): void;
301
- private disableUserInput;
302
- private enableUserInput;
303
- private newOrthoCamera;
304
- private setOrthoCameraAspect;
305
- }
306
- import * as THREE from "three";
307
243
  import { Component, Disposable, Event } from "../Types";
308
244
  import { Components } from "../Components";
309
245
  /**
@@ -374,6 +310,70 @@ export declare class Cullers extends Component implements Disposable {
374
310
  /** {@link Disposable.dispose} */
375
311
  dispose(): void;
376
312
  }
313
+ import { Component, Components, Disposable, Updateable, World, Event } from "../../core";
314
+ import { MiniMap } from "./src";
315
+ export declare class MiniMaps extends Component implements Updateable, Disposable {
316
+ static readonly uuid: "39ad6aad-84c8-4adf-a1e0-7f25313a9e7f";
317
+ readonly onAfterUpdate: Event<unknown>;
318
+ readonly onBeforeUpdate: Event<unknown>;
319
+ readonly onDisposed: Event<unknown>;
320
+ enabled: boolean;
321
+ list: Map<string, MiniMap>;
322
+ constructor(components: Components);
323
+ create(world: World): MiniMap;
324
+ delete(id: string): void;
325
+ dispose(): void | Promise<void>;
326
+ update(): void;
327
+ }
328
+ import * as THREE from "three";
329
+ import { Components } from "../../core/Components";
330
+ import { SimpleCamera } from "../../core";
331
+ import { NavigationMode, NavModeID, ProjectionManager } from "./src";
332
+ /**
333
+ * A flexible camera that uses
334
+ * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
335
+ * easily control the camera in 2D and 3D. It supports multiple navigation
336
+ * modes, such as 2D floor plan navigation, first person and 3D orbit.
337
+ */
338
+ export declare class OrthoPerspectiveCamera extends SimpleCamera {
339
+ /**
340
+ * The current {@link NavigationMode}.
341
+ */
342
+ mode: NavigationMode;
343
+ readonly projection: ProjectionManager;
344
+ readonly threeOrtho: THREE.OrthographicCamera;
345
+ protected readonly _userInputButtons: any;
346
+ protected readonly _frustumSize = 50;
347
+ protected readonly _navigationModes: Map<NavModeID, NavigationMode>;
348
+ get current(): THREE.PerspectiveCamera | THREE.OrthographicCamera;
349
+ constructor(components: Components);
350
+ /** {@link Disposable.dispose} */
351
+ dispose(): void;
352
+ /**
353
+ * Sets a new {@link NavigationMode} and disables the previous one.
354
+ *
355
+ * @param mode - The {@link NavigationMode} to set.
356
+ */
357
+ set(mode: NavModeID): void;
358
+ /**
359
+ * Make the camera view fit all the specified meshes.
360
+ *
361
+ * @param meshes the meshes to fit. If it is not defined, it will
362
+ * evaluate {@link Components.meshes}.
363
+ * @param offset the distance to the fit object
364
+ */
365
+ fit(meshes: Iterable<THREE.Mesh>, offset?: number): Promise<void>;
366
+ /**
367
+ * Allows or prevents all user input.
368
+ *
369
+ * @param active - whether to enable or disable user inputs.
370
+ */
371
+ setUserInput(active: boolean): void;
372
+ private disableUserInput;
373
+ private enableUserInput;
374
+ private newOrthoCamera;
375
+ private setOrthoCameraAspect;
376
+ }
377
377
  import * as WEBIFC from "web-ifc";
378
378
  import * as FRAG from "@thatopen/fragments";
379
379
  /**
@@ -427,46 +427,10 @@ export declare class IfcPropertiesFinder extends Component implements Disposable
427
427
  private arrayUnion;
428
428
  private getConditionFunctions;
429
429
  }
430
- import * as THREE from "three";
431
- import * as FRAGS from "@thatopen/fragments";
432
- import { FragmentsGroup } from "@thatopen/fragments";
433
- import { Component, Components, Disposable, Event } from "../../core";
434
- /**
435
- * A simple implementation of bounding box that works for fragments. The resulting bbox is not 100% precise, but
436
- * it's fast, and should suffice for general use cases such as camera zooming or general boundary determination.
437
- */
438
- export declare class BoundingBoxes extends Component implements Disposable {
439
- static readonly uuid: "d1444724-dba6-4cdd-a0c7-68ee1450d166";
440
- /** {@link Component.enabled} */
441
- enabled: boolean;
442
- /** {@link Disposable.onDisposed} */
443
- readonly onDisposed: Event<unknown>;
444
- private _absoluteMin;
445
- private _absoluteMax;
446
- private _meshes;
447
- constructor(components: Components);
448
- static getDimensions(bbox: THREE.Box3): {
449
- width: number;
450
- height: number;
451
- depth: number;
452
- center: THREE.Vector3;
453
- };
454
- static newBound(positive: boolean): THREE.Vector3;
455
- static getBounds(points: THREE.Vector3[], min?: THREE.Vector3, max?: THREE.Vector3): THREE.Box3;
456
- /** {@link Disposable.dispose} */
457
- dispose(): void;
458
- get(): THREE.Box3;
459
- getSphere(): THREE.Sphere;
460
- getMesh(): THREE.Mesh<THREE.BoxGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
461
- reset(): void;
462
- add(group: FragmentsGroup): void;
463
- addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh, itemIDs?: Iterable<number>): void;
464
- private static getFragmentBounds;
465
- }
466
430
  import * as WEBIFC from "web-ifc";
467
431
  import { FragmentsGroup } from "@thatopen/fragments";
468
432
  import { Disposable, Event, Component, Components } from "../../core";
469
- import { RelationsMap, ModelsRelationMap, InverseAttributes, InverseAttribute } from "./src/types";
433
+ import { RelationsMap, ModelsRelationMap, InverseAttribute } from "./src/types";
470
434
  /**
471
435
  * Indexer for IFC entities, facilitating the indexing and retrieval of IFC entity relationships.
472
436
  * 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.
@@ -481,11 +445,8 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
481
445
  relationsMap: RelationsMap;
482
446
  }>;
483
447
  private _relToAttributesMap;
484
- /**
485
- * Array of inverse attribute names.
486
- * This array is used to define the inverse attributes that the indexer will process and index.
487
- */
488
- readonly inverseAttributes: InverseAttributes;
448
+ private _inverseAttributes;
449
+ private _ifcRels;
489
450
  /**
490
451
  * Holds the relationship mappings for each model processed by the indexer.
491
452
  * The structure is a map where each key is a model's UUID, and the value is another map.
@@ -497,7 +458,6 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
497
458
  readonly relationMaps: ModelsRelationMap;
498
459
  constructor(components: Components);
499
460
  private onFragmentsDisposed;
500
- private getAttributeRels;
501
461
  /**
502
462
  * Adds a relation map to the model's relations map.
503
463
  *
@@ -525,7 +485,7 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
525
485
  */
526
486
  process(model: FragmentsGroup): Promise<RelationsMap>;
527
487
  /**
528
- * Processes a given model from a WebIfc API to index its IFC entities relations based on predefined inverse attributes.
488
+ * Processes a given model from a WebIfc API to index its IFC entities relations.
529
489
  *
530
490
  * @param ifcApi - The WebIfc API instance from which to retrieve the model's properties.
531
491
  * @param modelID - The unique identifier of the model within the WebIfc API.
@@ -598,13 +558,7 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
598
558
  */
599
559
  dispose(): void;
600
560
  }
601
- import * as THREE from "three";
602
- export declare function obbFromPoints(vertices: ArrayLike<number>): {
603
- center: THREE.Vector3;
604
- halfSizes: THREE.Vector3;
605
- rotation: THREE.Matrix3;
606
- transformation: THREE.Matrix4;
607
- };
561
+ export type { InverseAttribute } from "./src/types";
608
562
  import * as WEBIFC from "web-ifc";
609
563
  import { FragmentsGroup } from "@thatopen/fragments";
610
564
  import { Component, Disposable, Event, Components } from "../../core";
@@ -678,15 +632,61 @@ export declare class IfcPropertiesManager extends Component implements Disposabl
678
632
  setAttributeListener(model: FragmentsGroup, expressID: number, attributeName: string): Promise<Event<String | Number | Boolean>>;
679
633
  }
680
634
  export {};
635
+ import * as THREE from "three";
636
+ export interface MeasureEdge {
637
+ distance: number;
638
+ points: THREE.Vector3[];
639
+ }
640
+ export declare class MeasurementUtils {
641
+ static getFace(mesh: THREE.InstancedMesh | THREE.Mesh, triangleIndex: number, instance?: number): {
642
+ edges: MeasureEdge[];
643
+ indices: Set<number>;
644
+ } | null;
645
+ static distanceFromPointToLine(point: THREE.Vector3, lineStart: THREE.Vector3, lineEnd: THREE.Vector3, clamp?: boolean): number;
646
+ private static getFaceData;
647
+ static getVerticesAndNormal(mesh: THREE.Mesh | THREE.InstancedMesh, faceIndex: number, instance: number | undefined): {
648
+ p1: THREE.Vector3;
649
+ p2: THREE.Vector3;
650
+ p3: THREE.Vector3;
651
+ faceNormal: THREE.Vector3;
652
+ };
653
+ private static round;
654
+ }
655
+ import * as THREE from "three";
681
656
  import * as FRAGS from "@thatopen/fragments";
682
- import { Components, Component } from "../../core";
683
- export declare class FragmentHider extends Component {
684
- static readonly uuid: "dd9ccf2d-8a21-4821-b7f6-2949add16a29";
657
+ import { FragmentsGroup } from "@thatopen/fragments";
658
+ import { Component, Components, Disposable, Event } from "../../core";
659
+ /**
660
+ * A simple implementation of bounding box that works for fragments. The resulting bbox is not 100% precise, but
661
+ * it's fast, and should suffice for general use cases such as camera zooming or general boundary determination.
662
+ */
663
+ export declare class BoundingBoxes extends Component implements Disposable {
664
+ static readonly uuid: "d1444724-dba6-4cdd-a0c7-68ee1450d166";
665
+ /** {@link Component.enabled} */
685
666
  enabled: boolean;
667
+ /** {@link Disposable.onDisposed} */
668
+ readonly onDisposed: Event<unknown>;
669
+ private _absoluteMin;
670
+ private _absoluteMax;
671
+ private _meshes;
686
672
  constructor(components: Components);
687
- set(visible: boolean, items?: FRAGS.FragmentIdMap): void;
688
- isolate(items: FRAGS.FragmentIdMap): void;
689
- private updateCulledVisibility;
673
+ static getDimensions(bbox: THREE.Box3): {
674
+ width: number;
675
+ height: number;
676
+ depth: number;
677
+ center: THREE.Vector3;
678
+ };
679
+ static newBound(positive: boolean): THREE.Vector3;
680
+ static getBounds(points: THREE.Vector3[], min?: THREE.Vector3, max?: THREE.Vector3): THREE.Box3;
681
+ /** {@link Disposable.dispose} */
682
+ dispose(): void;
683
+ get(): THREE.Box3;
684
+ getSphere(): THREE.Sphere;
685
+ getMesh(): THREE.Mesh<THREE.BoxGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
686
+ reset(): void;
687
+ add(group: FragmentsGroup): void;
688
+ addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh, itemIDs?: Iterable<number>): void;
689
+ private static getFragmentBounds;
690
690
  }
691
691
  import { Component, Disposable, Event, Components } from "../../core";
692
692
  export declare class FragmentExploder extends Component implements Disposable {
@@ -703,37 +703,54 @@ export declare class FragmentExploder extends Component implements Disposable {
703
703
  reset(): void;
704
704
  update(): void;
705
705
  }
706
- import * as WEBIFC from "web-ifc";
707
- import * as FRAGS from "@thatopen/fragments";
708
- import { IfcFragmentSettings } from "./src";
709
- import { Component, Components, Event, Disposable } from "../../core";
710
- export declare class FragmentIfcLoader extends Component implements Disposable {
711
- static readonly uuid: "a659add7-1418-4771-a0d6-7d4d438e4624";
712
- readonly onIfcStartedLoading: Event<void>;
713
- readonly onSetup: Event<void>;
706
+ export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
707
+ import * as THREE from "three";
708
+ export declare function obbFromPoints(vertices: ArrayLike<number>): {
709
+ center: THREE.Vector3;
710
+ halfSizes: THREE.Vector3;
711
+ rotation: THREE.Matrix3;
712
+ transformation: THREE.Matrix4;
713
+ };
714
+ import * as THREE from "three";
715
+ export declare class MaterialsUtils {
716
+ static isTransparent(material: THREE.Material): boolean;
717
+ }
718
+ import * as THREE from "three";
719
+ import { Component, Components, Event, World, Disposable } from "../core";
720
+ export interface VertexPickerConfig {
721
+ showOnlyVertex: boolean;
722
+ snapDistance: number;
723
+ previewElement: HTMLElement;
724
+ }
725
+ export declare class VertexPicker extends Component implements Disposable {
726
+ onVertexFound: Event<THREE.Vector3>;
727
+ onVertexLost: Event<THREE.Vector3>;
728
+ components: Components;
729
+ private _pickedPoint;
730
+ private _config;
731
+ private _enabled;
732
+ private _workingPlane;
714
733
  /** {@link Disposable.onDisposed} */
715
- readonly onDisposed: Event<string>;
716
- settings: IfcFragmentSettings;
717
- enabled: boolean;
718
- webIfc: WEBIFC.IfcAPI;
719
- private _material;
720
- private _spatialTree;
721
- private _metaData;
722
- private _fragmentInstances;
723
- private _civil;
724
- private _propertyExporter;
725
- private _visitedFragments;
726
- private _materialT;
727
- constructor(components: Components);
734
+ readonly onDisposed: Event<unknown>;
735
+ set enabled(value: boolean);
736
+ get enabled(): boolean;
737
+ constructor(components: Components, config?: Partial<VertexPickerConfig>);
738
+ [Symbol.dispose](): void;
739
+ set workingPlane(plane: THREE.Plane | null);
740
+ get workingPlane(): THREE.Plane | null;
741
+ set config(value: Partial<VertexPickerConfig>);
742
+ get config(): Partial<VertexPickerConfig>;
728
743
  dispose(): void;
729
- setup(config?: Partial<IfcFragmentSettings>): Promise<void>;
730
- load(data: Uint8Array, coordinate?: boolean): Promise<FRAGS.FragmentsGroup>;
731
- readIfcFile(data: Uint8Array): Promise<number>;
732
- private getAllGeometries;
733
- cleanUp(): void;
734
- private getMesh;
735
- private getGeometry;
736
- private autoSetWasm;
744
+ get(world: World): THREE.Vector3 | null;
745
+ private getClosestVertex;
746
+ private getVertices;
747
+ private getVertex;
748
+ }
749
+ export declare class UUID {
750
+ private static _pattern;
751
+ private static _lut;
752
+ static create(): string;
753
+ static validate(uuid: string): void;
737
754
  }
738
755
  import * as THREE from "three";
739
756
  import * as FRAGS from "@thatopen/fragments";
@@ -766,9 +783,53 @@ export declare class FragmentClassifier extends Component implements Disposable
766
783
  resetColor(items: FRAGS.FragmentIdMap): void;
767
784
  private saveItem;
768
785
  }
786
+ import * as FRAGS from "@thatopen/fragments";
787
+ import { Components, Component } from "../../core";
788
+ export declare class FragmentHider extends Component {
789
+ static readonly uuid: "dd9ccf2d-8a21-4821-b7f6-2949add16a29";
790
+ enabled: boolean;
791
+ constructor(components: Components);
792
+ set(visible: boolean, items?: FRAGS.FragmentIdMap): void;
793
+ isolate(items: FRAGS.FragmentIdMap): void;
794
+ private updateCulledVisibility;
795
+ }
796
+ import * as WEBIFC from "web-ifc";
797
+ import * as FRAGS from "@thatopen/fragments";
798
+ import { IfcFragmentSettings } from "./src";
799
+ import { Component, Components, Event, Disposable } from "../../core";
800
+ export declare class FragmentIfcLoader extends Component implements Disposable {
801
+ static readonly uuid: "a659add7-1418-4771-a0d6-7d4d438e4624";
802
+ readonly onIfcStartedLoading: Event<void>;
803
+ readonly onSetup: Event<void>;
804
+ /** {@link Disposable.onDisposed} */
805
+ readonly onDisposed: Event<string>;
806
+ settings: IfcFragmentSettings;
807
+ enabled: boolean;
808
+ webIfc: WEBIFC.IfcAPI;
809
+ private _material;
810
+ private _spatialTree;
811
+ private _metaData;
812
+ private _fragmentInstances;
813
+ private _civil;
814
+ private _propertyExporter;
815
+ private _visitedFragments;
816
+ private _materialT;
817
+ constructor(components: Components);
818
+ dispose(): void;
819
+ setup(config?: Partial<IfcFragmentSettings>): Promise<void>;
820
+ load(data: Uint8Array, coordinate?: boolean): Promise<FRAGS.FragmentsGroup>;
821
+ readIfcFile(data: Uint8Array): Promise<number>;
822
+ private getAllGeometries;
823
+ cleanUp(): void;
824
+ private getMesh;
825
+ private getGeometry;
826
+ private autoSetWasm;
827
+ }
769
828
  import { Fragment, FragmentsGroup } from "@thatopen/fragments";
770
829
  import * as THREE from "three";
830
+ import * as FRAGS from "@thatopen/fragments";
771
831
  import { Component, Components, Event, Disposable } from "../../core";
832
+ import { RelationsMap } from "../../ifc/IfcRelationsIndexer/src/types";
772
833
  /**
773
834
  * Object that can efficiently load binary files that contain
774
835
  * [fragment geometry](https://github.com/ThatOpen/engine_fragment).
@@ -796,12 +857,18 @@ export declare class FragmentManager extends Component implements Disposable {
796
857
  dispose(): void;
797
858
  disposeGroup(group: FragmentsGroup): void;
798
859
  /**
799
- * Loads one or many fragments into the scene.
800
- * @param data - the bytes containing the data for the fragments to load.
801
- * @param coordinate - whether this fragmentsgroup should be federated with the others.
802
- * @returns the list of IDs of the loaded fragments.
860
+ * Loads a binar file that contain fragment geometry.
861
+ * @param data - The binary data to load.
862
+ * @param config - Optional configuration for loading.
863
+ * @param config.coordinate - Whether to apply coordinate transformation. Default is true.
864
+ * @param config.properties - Ifc properties to set on the loaded fragments. Not to be used when streaming.
865
+ * @returns The loaded FragmentsGroup.
803
866
  */
804
- load(data: Uint8Array, coordinate?: boolean): FragmentsGroup;
867
+ load(data: Uint8Array, config?: Partial<{
868
+ coordinate: boolean;
869
+ properties: FRAGS.IfcProperties;
870
+ relationsMap: RelationsMap;
871
+ }>): FragmentsGroup;
805
872
  /**
806
873
  * Export the specified fragments.
807
874
  * @param group - the fragments group to be exported.
@@ -811,52 +878,6 @@ export declare class FragmentManager extends Component implements Disposable {
811
878
  coordinate(models?: FragmentsGroup[]): void;
812
879
  }
813
880
  import * as WEBIFC from "web-ifc";
814
- import { AsyncEvent, Component, Disposable, Event } from "../../core";
815
- import { PropertiesStreamingSettings } from "../IfcGeometryTiler";
816
- export declare class IfcPropertiesTiler extends Component implements Disposable {
817
- static readonly uuid: "88d2c89c-ce32-47d7-8cb6-d51e4b311a0b";
818
- onPropertiesStreamed: AsyncEvent<{
819
- type: number;
820
- data: {
821
- [id: number]: any;
822
- };
823
- }>;
824
- onProgress: AsyncEvent<number>;
825
- onIndicesStreamed: AsyncEvent<Map<number, Map<number, number[]>>>;
826
- /** {@link Disposable.onDisposed} */
827
- readonly onDisposed: Event<string>;
828
- enabled: boolean;
829
- settings: PropertiesStreamingSettings;
830
- webIfc: WEBIFC.IfcAPI;
831
- dispose(): Promise<void>;
832
- streamFromBuffer(data: Uint8Array): Promise<void>;
833
- streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
834
- private readIfcFile;
835
- private streamIfcFile;
836
- private streamAllProperties;
837
- private cleanUp;
838
- }
839
- import * as THREE from "three";
840
- export interface MeasureEdge {
841
- distance: number;
842
- points: THREE.Vector3[];
843
- }
844
- export declare class MeasurementUtils {
845
- static getFace(mesh: THREE.InstancedMesh | THREE.Mesh, triangleIndex: number, instance?: number): {
846
- edges: MeasureEdge[];
847
- indices: Set<number>;
848
- } | null;
849
- static distanceFromPointToLine(point: THREE.Vector3, lineStart: THREE.Vector3, lineEnd: THREE.Vector3, clamp?: boolean): number;
850
- private static getFaceData;
851
- static getVerticesAndNormal(mesh: THREE.Mesh | THREE.InstancedMesh, faceIndex: number, instance: number | undefined): {
852
- p1: THREE.Vector3;
853
- p2: THREE.Vector3;
854
- p3: THREE.Vector3;
855
- faceNormal: THREE.Vector3;
856
- };
857
- private static round;
858
- }
859
- import * as WEBIFC from "web-ifc";
860
881
  import { Components, Disposable, Event, Component } from "../../core";
861
882
  import { IfcStreamingSettings, StreamedGeometries, StreamedAsset } from "./src";
862
883
  export declare class IfcGeometryTiler extends Component implements Disposable {
@@ -896,47 +917,31 @@ export declare class IfcGeometryTiler extends Component implements Disposable {
896
917
  private streamAssets;
897
918
  private streamGeometries;
898
919
  }
899
- export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
900
- import * as THREE from "three";
901
- export declare class MaterialsUtils {
902
- static isTransparent(material: THREE.Material): boolean;
903
- }
904
- export declare class UUID {
905
- private static _pattern;
906
- private static _lut;
907
- static create(): string;
908
- static validate(uuid: string): void;
909
- }
910
- import * as THREE from "three";
911
- import { Component, Components, Event, World, Disposable } from "../core";
912
- export interface VertexPickerConfig {
913
- showOnlyVertex: boolean;
914
- snapDistance: number;
915
- previewElement: HTMLElement;
916
- }
917
- export declare class VertexPicker extends Component implements Disposable {
918
- onVertexFound: Event<THREE.Vector3>;
919
- onVertexLost: Event<THREE.Vector3>;
920
- components: Components;
921
- private _pickedPoint;
922
- private _config;
923
- private _enabled;
924
- private _workingPlane;
925
- /** {@link Disposable.onDisposed} */
926
- readonly onDisposed: Event<unknown>;
927
- set enabled(value: boolean);
928
- get enabled(): boolean;
929
- constructor(components: Components, config?: Partial<VertexPickerConfig>);
930
- [Symbol.dispose](): void;
931
- set workingPlane(plane: THREE.Plane | null);
932
- get workingPlane(): THREE.Plane | null;
933
- set config(value: Partial<VertexPickerConfig>);
934
- get config(): Partial<VertexPickerConfig>;
935
- dispose(): void;
936
- get(world: World): THREE.Vector3 | null;
937
- private getClosestVertex;
938
- private getVertices;
939
- private getVertex;
920
+ import * as WEBIFC from "web-ifc";
921
+ import { AsyncEvent, Component, Disposable, Event } from "../../core";
922
+ import { PropertiesStreamingSettings } from "../IfcGeometryTiler";
923
+ export declare class IfcPropertiesTiler extends Component implements Disposable {
924
+ static readonly uuid: "88d2c89c-ce32-47d7-8cb6-d51e4b311a0b";
925
+ onPropertiesStreamed: AsyncEvent<{
926
+ type: number;
927
+ data: {
928
+ [id: number]: any;
929
+ };
930
+ }>;
931
+ onProgress: AsyncEvent<number>;
932
+ onIndicesStreamed: AsyncEvent<Map<number, Map<number, number[]>>>;
933
+ /** {@link Disposable.onDisposed} */
934
+ readonly onDisposed: Event<string>;
935
+ enabled: boolean;
936
+ settings: PropertiesStreamingSettings;
937
+ webIfc: WEBIFC.IfcAPI;
938
+ dispose(): Promise<void>;
939
+ streamFromBuffer(data: Uint8Array): Promise<void>;
940
+ streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
941
+ private readIfcFile;
942
+ private streamIfcFile;
943
+ private streamAllProperties;
944
+ private cleanUp;
940
945
  }
941
946
  import * as WEBIFC from "web-ifc";
942
947
  export interface IfcItemsCategories {
@@ -945,6 +950,9 @@ export interface IfcItemsCategories {
945
950
  export declare class IfcCategories {
946
951
  getAll(webIfc: WEBIFC.IfcAPI, modelID: number): IfcItemsCategories;
947
952
  }
953
+ export declare const IfcElements: {
954
+ [key: number]: string;
955
+ };
948
956
  import * as FRAGS from "@thatopen/fragments";
949
957
  export declare class IfcPropertiesUtils {
950
958
  static getUnits(group: FRAGS.FragmentsGroup): Promise<number>;
@@ -973,9 +981,6 @@ export declare class IfcPropertiesUtils {
973
981
  export declare const IfcCategoryMap: {
974
982
  [key: number]: string;
975
983
  };
976
- export declare const IfcElements: {
977
- [key: number]: string;
978
- };
979
984
  import * as THREE from "three";
980
985
  import { Event, Resizeable, Updateable, Disposable, World } from "../../../core";
981
986
  export declare class MiniMap implements Resizeable, Updateable, Disposable {
@@ -1011,43 +1016,6 @@ export declare class MiniMap implements Resizeable, Updateable, Disposable {
1011
1016
  private updatePlanes;
1012
1017
  }
1013
1018
  export declare const GeometryTypes: Set<number>;
1014
- export declare const getRelationMap: (properties: Record<string, Record<string, any>>, relationType: number, onElementsFound?: ((relatingID: number, relatedIDs: number[]) => void) | undefined) => {
1015
- [relatingID: number]: number[];
1016
- };
1017
- export declare const relToAttributesMap: Map<number, {
1018
- forRelating?: "IsDecomposedBy" | "Decomposes" | "AssociatedTo" | "HasAssociations" | "ClassificationForObjects" | "IsGroupedBy" | "HasAssignments" | "IsDefinedBy" | "DefinesOcurrence" | "IsTypedBy" | "Types" | "Defines" | "ContainedInStructure" | "ContainsElements" | undefined;
1019
- forRelated?: "IsDecomposedBy" | "Decomposes" | "AssociatedTo" | "HasAssociations" | "ClassificationForObjects" | "IsGroupedBy" | "HasAssignments" | "IsDefinedBy" | "DefinesOcurrence" | "IsTypedBy" | "Types" | "Defines" | "ContainedInStructure" | "ContainsElements" | undefined;
1020
- }>;
1021
- import * as THREE from "three";
1022
- import { BaseScene, Configurable, Event } from "../../Types";
1023
- import { Components } from "../../Components";
1024
- export interface SimpleSceneConfig {
1025
- directionalLight: {
1026
- color: THREE.Color;
1027
- intensity: number;
1028
- position: THREE.Vector3;
1029
- };
1030
- ambientLight: {
1031
- color: THREE.Color;
1032
- intensity: number;
1033
- };
1034
- }
1035
- /**
1036
- * A basic 3D [scene](https://threejs.org/docs/#api/en/scenes/Scene) to add
1037
- * objects hierarchically, and easily dispose them when you are finished with it.
1038
- * @noInheritDoc
1039
- */
1040
- export declare class SimpleScene extends BaseScene implements Configurable<{}> {
1041
- /** {@link Configurable.isSetup} */
1042
- isSetup: boolean;
1043
- three: THREE.Scene;
1044
- /** {@link Configurable.onSetup} */
1045
- readonly onSetup: Event<SimpleScene>;
1046
- config: Required<SimpleSceneConfig>;
1047
- constructor(components: Components);
1048
- /** Creates a simple and nice default set up for the scene (e.g. lighting). */
1049
- setup(config?: Partial<SimpleSceneConfig>): void;
1050
- }
1051
1019
  import * as THREE from "three";
1052
1020
  import { Event, Base, World, BaseScene, BaseCamera, BaseRenderer } from "../../Types";
1053
1021
  import { Components } from "../../Components";
@@ -1074,6 +1042,11 @@ export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends Base
1074
1042
  update(delta?: number): void;
1075
1043
  dispose(disposeResources?: boolean): void;
1076
1044
  }
1045
+ import { InverseAttribute } from "./types";
1046
+ export declare const relToAttributesMap: Map<number, {
1047
+ forRelating: InverseAttribute;
1048
+ forRelated: InverseAttribute;
1049
+ }>;
1077
1050
  import * as WEBIFC from "web-ifc";
1078
1051
  import { IfcItemsCategories } from "../../../ifc";
1079
1052
  export declare class SpatialStructure {
@@ -1082,110 +1055,35 @@ export declare class SpatialStructure {
1082
1055
  setUp(webIfc: WEBIFC.IfcAPI): void;
1083
1056
  cleanUp(): void;
1084
1057
  }
1085
- import { NavigationMode } from "./types";
1086
- /**
1087
- * A {@link NavigationMode} that allows 3D navigation and panning
1088
- * like in many 3D and CAD softwares.
1089
- */
1090
- export declare class OrbitMode implements NavigationMode {
1091
- camera: any;
1092
- /** {@link NavigationMode.enabled} */
1093
- enabled: boolean;
1094
- /** {@link NavigationMode.id} */
1095
- readonly id = "Orbit";
1096
- constructor(camera: any);
1097
- /** {@link NavigationMode.set} */
1098
- set(active: boolean): void;
1099
- private activateOrbitControls;
1100
- }
1101
1058
  import * as THREE from "three";
1102
- import CameraControls from "camera-controls";
1103
- import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
1059
+ import { BaseScene, Configurable, Event } from "../../Types";
1104
1060
  import { Components } from "../../Components";
1105
- /**
1106
- * A basic camera that uses
1107
- * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
1108
- * easily control the camera in 2D and 3D. Check out it's API to find out
1109
- * what features it offers.
1110
- */
1111
- export declare class SimpleCamera extends BaseCamera implements Updateable, Disposable {
1112
- /** {@link Updateable.onBeforeUpdate} */
1113
- readonly onBeforeUpdate: Event<SimpleCamera>;
1114
- /** {@link Updateable.onAfterUpdate} */
1115
- readonly onAfterUpdate: Event<SimpleCamera>;
1116
- readonly onAspectUpdated: Event<unknown>;
1117
- /** {@link Disposable.onDisposed} */
1118
- readonly onDisposed: Event<string>;
1119
- readonly three: THREE.PerspectiveCamera;
1120
- private _allControls;
1121
- /**
1122
- * The object that controls the camera. An instance of
1123
- * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls).
1124
- * Transforming the camera directly will have no effect: you need to use this
1125
- * object to move, rotate, look at objects, etc.
1126
- */
1127
- get controls(): CameraControls;
1128
- /** {@link Component.enabled} */
1129
- get enabled(): boolean;
1130
- /** {@link Component.enabled} */
1131
- set enabled(enabled: boolean);
1132
- constructor(components: Components);
1133
- /** {@link Disposable.dispose} */
1134
- dispose(): void;
1135
- /** {@link Updateable.update} */
1136
- update(_delta: number): void;
1137
- /**
1138
- * Updates the aspect of the camera to match the size of the
1139
- * {@link Components.renderer}.
1140
- */
1141
- updateAspect: () => void;
1142
- private setupCamera;
1143
- private newCameraControls;
1144
- private setupEvents;
1145
- private static getSubsetOfThree;
1146
- }
1147
- import { NavigationMode } from "./types";
1148
- /**
1149
- * A {@link NavigationMode} that allows first person navigation,
1150
- * simulating FPS video games.
1151
- */
1152
- export declare class FirstPersonMode implements NavigationMode {
1153
- private camera;
1154
- /** {@link NavigationMode.enabled} */
1155
- enabled: boolean;
1156
- /** {@link NavigationMode.id} */
1157
- readonly id = "FirstPerson";
1158
- constructor(camera: any);
1159
- /** {@link NavigationMode.set} */
1160
- set(active: boolean): void;
1161
- private setupFirstPersonCamera;
1061
+ export interface SimpleSceneConfig {
1062
+ directionalLight: {
1063
+ color: THREE.Color;
1064
+ intensity: number;
1065
+ position: THREE.Vector3;
1066
+ };
1067
+ ambientLight: {
1068
+ color: THREE.Color;
1069
+ intensity: number;
1070
+ };
1162
1071
  }
1163
1072
  /**
1164
- * The projection system of the camera.
1165
- */
1166
- export type CameraProjection = "Perspective" | "Orthographic";
1167
- /**
1168
- * The extensible list of supported navigation modes.
1169
- */
1170
- export type NavModeID = "Orbit" | "FirstPerson" | "Plan";
1171
- /**
1172
- * An object that determines the behavior of the camera controls
1173
- * and the user input (e.g. 2D floor plan mode, first person mode, etc).
1073
+ * A basic 3D [scene](https://threejs.org/docs/#api/en/scenes/Scene) to add
1074
+ * objects hierarchically, and easily dispose them when you are finished with it.
1075
+ * @noInheritDoc
1174
1076
  */
1175
- export interface NavigationMode {
1176
- /** The unique ID of this navigation mode. */
1177
- id: NavModeID;
1178
- /**
1179
- * Enable or disable this navigation mode.
1180
- * When a new navigation mode is enabled, the previous navigation mode
1181
- * must be disabled.
1182
- *
1183
- * @param active - whether to enable or disable this mode.
1184
- * @param options - any additional data required to enable or disable it.
1185
- * */
1186
- set: (active: boolean, options?: any) => void;
1187
- /** Whether this navigation mode is active or not. */
1188
- enabled: boolean;
1077
+ export declare class SimpleScene extends BaseScene implements Configurable<{}> {
1078
+ /** {@link Configurable.isSetup} */
1079
+ isSetup: boolean;
1080
+ three: THREE.Scene;
1081
+ /** {@link Configurable.onSetup} */
1082
+ readonly onSetup: Event<SimpleScene>;
1083
+ config: Required<SimpleSceneConfig>;
1084
+ constructor(components: Components);
1085
+ /** Creates a simple and nice default set up for the scene (e.g. lighting). */
1086
+ setup(config?: Partial<SimpleSceneConfig>): void;
1189
1087
  }
1190
1088
  import * as THREE from "three";
1191
1089
  import { BaseRenderer, Event } from "../../Types";
@@ -1219,157 +1117,50 @@ export declare class SimpleRenderer extends BaseRenderer {
1219
1117
  private onContextBack;
1220
1118
  }
1221
1119
  import * as THREE from "three";
1222
- import { CameraProjection } from "./types";
1223
- import { Event } from "../../../core";
1224
- import { OrthoPerspectiveCamera } from "../index";
1225
- /**
1226
- * Object to control the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
1227
- */
1228
- export declare class ProjectionManager {
1229
- /**
1230
- * Event that fires when the {@link CameraProjection} changes.
1231
- */
1232
- readonly onChanged: Event<THREE.Camera>;
1233
- current: CameraProjection;
1234
- camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
1235
- private _component;
1236
- private _previousDistance;
1237
- /** Match Ortho zoom with Perspective distance when changing projection mode */
1238
- matchOrthoDistanceEnabled: boolean;
1239
- constructor(camera: OrthoPerspectiveCamera);
1240
- /**
1241
- * Sets the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
1242
- *
1243
- * @param projection - the new projection to set. If it is the current projection,
1244
- * it will have no effect.
1245
- */
1246
- set(projection: CameraProjection): Promise<void>;
1247
- /**
1248
- * Changes the current {@link CameraProjection} from Ortographic to Perspective
1249
- * and vice versa.
1250
- */
1251
- toggle(): Promise<void>;
1252
- private setOrthoCamera;
1253
- private getDims;
1254
- private setupOrthoCamera;
1255
- private getDistance;
1256
- private setPerspectiveCamera;
1257
- }
1258
- import { NavigationMode } from "./types";
1259
- /**
1260
- * A {@link NavigationMode} that allows to navigate floorplans in 2D,
1261
- * like many BIM tools.
1262
- */
1263
- export declare class PlanMode implements NavigationMode {
1264
- private camera;
1265
- /** {@link NavigationMode.enabled} */
1266
- enabled: boolean;
1267
- /** {@link NavigationMode.id} */
1268
- readonly id = "Plan";
1269
- private mouseAction1?;
1270
- private mouseAction2?;
1271
- private mouseInitialized;
1272
- private readonly defaultAzimuthSpeed;
1273
- private readonly defaultPolarSpeed;
1274
- constructor(camera: any);
1275
- /** {@link NavigationMode.set} */
1276
- set(active: boolean): void;
1277
- }
1278
- import * as THREE from "three";
1279
- import { Disposable, Event } from "../../Types";
1120
+ import CameraControls from "camera-controls";
1121
+ import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
1122
+ import { Components } from "../../Components";
1280
1123
  /**
1281
- * A helper to easily get the real position of the mouse in the Three.js canvas
1282
- * to work with tools like the
1283
- * [raycaster](https://threejs.org/docs/#api/en/core/Raycaster), even if it has
1284
- * been transformed through CSS or doesn't occupy the whole screen.
1124
+ * A basic camera that uses
1125
+ * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
1126
+ * easily control the camera in 2D and 3D. Check out it's API to find out
1127
+ * what features it offers.
1285
1128
  */
1286
- export declare class Mouse implements Disposable {
1287
- dom: HTMLCanvasElement;
1288
- private _event?;
1289
- private _position;
1129
+ export declare class SimpleCamera extends BaseCamera implements Updateable, Disposable {
1130
+ /** {@link Updateable.onBeforeUpdate} */
1131
+ readonly onBeforeUpdate: Event<SimpleCamera>;
1132
+ /** {@link Updateable.onAfterUpdate} */
1133
+ readonly onAfterUpdate: Event<SimpleCamera>;
1134
+ readonly onAspectUpdated: Event<unknown>;
1290
1135
  /** {@link Disposable.onDisposed} */
1291
- readonly onDisposed: Event<unknown>;
1292
- constructor(dom: HTMLCanvasElement);
1136
+ readonly onDisposed: Event<string>;
1137
+ readonly three: THREE.PerspectiveCamera;
1138
+ private _allControls;
1293
1139
  /**
1294
- * The real position of the mouse of the Three.js canvas.
1140
+ * The object that controls the camera. An instance of
1141
+ * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls).
1142
+ * Transforming the camera directly will have no effect: you need to use this
1143
+ * object to move, rotate, look at objects, etc.
1295
1144
  */
1296
- get position(): THREE.Vector2;
1297
- /** {@link Disposable.dispose} */
1298
- dispose(): void;
1299
- private getPositionY;
1300
- private getPositionX;
1301
- private updateMouseInfo;
1302
- private setupEvents;
1303
- }
1304
- import * as THREE from "three";
1305
- import { Components } from "../../Components";
1306
- import { Event, World, Disposable } from "../../Types";
1307
- import { Mouse } from "./mouse";
1308
- /**
1309
- * A simple [raycaster](https://threejs.org/docs/#api/en/core/Raycaster)
1310
- * that allows to easily get items from the scene using the mouse and touch
1311
- * events.
1312
- */
1313
- export declare class SimpleRaycaster implements Disposable {
1145
+ get controls(): CameraControls;
1314
1146
  /** {@link Component.enabled} */
1315
- enabled: boolean;
1316
- components: Components;
1317
- /** {@link Disposable.onDisposed} */
1318
- readonly onDisposed: Event<unknown>;
1319
- /** The position of the mouse in the screen. */
1320
- readonly mouse: Mouse;
1321
- readonly three: THREE.Raycaster;
1322
- world: World;
1323
- constructor(components: Components, world: World);
1147
+ get enabled(): boolean;
1148
+ /** {@link Component.enabled} */
1149
+ set enabled(enabled: boolean);
1150
+ constructor(components: Components);
1324
1151
  /** {@link Disposable.dispose} */
1325
1152
  dispose(): void;
1153
+ /** {@link Updateable.update} */
1154
+ update(_delta: number): void;
1326
1155
  /**
1327
- * Throws a ray from the camera to the mouse or touch event point and returns
1328
- * the first item found. This also takes into account the clipping planes
1329
- * used by the renderer.
1330
- *
1331
- * @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
1332
- * to query. If not provided, it will query all the meshes stored in
1333
- * {@link Components.meshes}.
1334
- */
1335
- castRay(items?: THREE.Mesh[]): THREE.Intersection | null;
1336
- 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;
1337
- private intersect;
1338
- private filterClippingPlanes;
1339
- }
1340
- /**
1341
- * Simple event handler by
1342
- * [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540).
1343
- * Keep in mind that:
1344
- * - If you want to remove it later, you might want to declare the callback as
1345
- * an object.
1346
- * - If you want to maintain the reference to 'this', you will need to declare
1347
- * the callback as an arrow function.
1348
- */
1349
- export declare class Event<T> {
1350
- /**
1351
- * Add a callback to this event instance.
1352
- * @param handler - the callback to be added to this event.
1353
- */
1354
- add(handler: T extends void ? {
1355
- (): void;
1356
- } : {
1357
- (data: T): void;
1358
- }): void;
1359
- /**
1360
- * Removes a callback from this event instance.
1361
- * @param handler - the callback to be removed from this event.
1156
+ * Updates the aspect of the camera to match the size of the
1157
+ * {@link Components.renderer}.
1362
1158
  */
1363
- remove(handler: T extends void ? {
1364
- (): void;
1365
- } : {
1366
- (data: T): void;
1367
- }): void;
1368
- /** Triggers all the callbacks assigned to this event. */
1369
- trigger: (data?: T) => void;
1370
- /** Gets rid of all the suscribed events. */
1371
- reset(): void;
1372
- private handlers;
1159
+ updateAspect: () => void;
1160
+ private setupCamera;
1161
+ private newCameraControls;
1162
+ private setupEvents;
1163
+ private static getSubsetOfThree;
1373
1164
  }
1374
1165
  /**
1375
1166
  * Simple event handler by
@@ -1380,27 +1171,27 @@ export declare class Event<T> {
1380
1171
  * - If you want to maintain the reference to 'this', you will need to declare
1381
1172
  * the callback as an arrow function.
1382
1173
  */
1383
- export declare class AsyncEvent<T> {
1174
+ export declare class Event<T> {
1384
1175
  /**
1385
1176
  * Add a callback to this event instance.
1386
1177
  * @param handler - the callback to be added to this event.
1387
1178
  */
1388
1179
  add(handler: T extends void ? {
1389
- (): Promise<void>;
1180
+ (): void;
1390
1181
  } : {
1391
- (data: T): Promise<void>;
1182
+ (data: T): void;
1392
1183
  }): void;
1393
1184
  /**
1394
1185
  * Removes a callback from this event instance.
1395
1186
  * @param handler - the callback to be removed from this event.
1396
1187
  */
1397
1188
  remove(handler: T extends void ? {
1398
- (): Promise<void>;
1189
+ (): void;
1399
1190
  } : {
1400
- (data: T): Promise<void>;
1191
+ (data: T): void;
1401
1192
  }): void;
1402
1193
  /** Triggers all the callbacks assigned to this event. */
1403
- trigger: (data?: T) => Promise<void>;
1194
+ trigger: (data?: T) => void;
1404
1195
  /** Gets rid of all the suscribed events. */
1405
1196
  reset(): void;
1406
1197
  private handlers;
@@ -1528,6 +1319,58 @@ export interface BVHGeometry extends THREE.BufferGeometry {
1528
1319
  export interface CameraControllable {
1529
1320
  controls: CameraControls;
1530
1321
  }
1322
+ /**
1323
+ * Simple event handler by
1324
+ * [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540).
1325
+ * Keep in mind that:
1326
+ * - If you want to remove it later, you might want to declare the callback as
1327
+ * an object.
1328
+ * - If you want to maintain the reference to 'this', you will need to declare
1329
+ * the callback as an arrow function.
1330
+ */
1331
+ export declare class AsyncEvent<T> {
1332
+ /**
1333
+ * Add a callback to this event instance.
1334
+ * @param handler - the callback to be added to this event.
1335
+ */
1336
+ add(handler: T extends void ? {
1337
+ (): Promise<void>;
1338
+ } : {
1339
+ (data: T): Promise<void>;
1340
+ }): void;
1341
+ /**
1342
+ * Removes a callback from this event instance.
1343
+ * @param handler - the callback to be removed from this event.
1344
+ */
1345
+ remove(handler: T extends void ? {
1346
+ (): Promise<void>;
1347
+ } : {
1348
+ (data: T): Promise<void>;
1349
+ }): void;
1350
+ /** Triggers all the callbacks assigned to this event. */
1351
+ trigger: (data?: T) => Promise<void>;
1352
+ /** Gets rid of all the suscribed events. */
1353
+ reset(): void;
1354
+ private handlers;
1355
+ }
1356
+ import { Base } from "./base";
1357
+ /**
1358
+ * Components are the building blocks of this library. Components are singleton
1359
+ * elements that contain specific functionality. For instance, the SimpleClipper
1360
+ * Component can create, delete and handle 3D clipping planes. Components must be
1361
+ * unique (they can't be instanced more than once), and have a static UUID that
1362
+ * identifies them uniquely. The can be accessed globally using the {@link Components}
1363
+ * instance.
1364
+ */
1365
+ export declare abstract class Component extends Base {
1366
+ /**
1367
+ * Whether this component is active or not. The behaviour can vary depending
1368
+ * on the type of component. E.g. a disabled dimension tool will stop creating
1369
+ * dimensions, while a disabled camera will stop moving. A disabled component
1370
+ * will not be updated automatically each frame.
1371
+ */
1372
+ abstract enabled: boolean;
1373
+ }
1531
1374
  import { Disposable, Hideable, Resizeable, Updateable, Configurable } from "./interfaces";
1532
1375
  import { Components } from "../../Components";
1533
1376
  /**
@@ -1564,24 +1407,6 @@ export declare abstract class BaseWorldItem extends Base {
1564
1407
  currentWorld: World | null;
1565
1408
  protected constructor(components: Components);
1566
1409
  }
1567
- import { Base } from "./base";
1568
- /**
1569
- * Components are the building blocks of this library. Components are singleton
1570
- * elements that contain specific functionality. For instance, the SimpleClipper
1571
- * Component can create, delete and handle 3D clipping planes. Components must be
1572
- * unique (they can't be instanced more than once), and have a static UUID that
1573
- * identifies them uniquely. The can be accessed globally using the {@link Components}
1574
- * instance.
1575
- */
1576
- export declare abstract class Component extends Base {
1577
- /**
1578
- * Whether this component is active or not. The behaviour can vary depending
1579
- * on the type of component. E.g. a disabled dimension tool will stop creating
1580
- * dimensions, while a disabled camera will stop moving. A disabled component
1581
- * will not be updated automatically each frame.
1582
- */
1583
- abstract enabled: boolean;
1584
- }
1585
1410
  import * as THREE from "three";
1586
1411
  import { Vector2 } from "three";
1587
1412
  import { Event } from "./event";
@@ -1634,67 +1459,6 @@ export declare abstract class BaseCamera extends BaseWorldItem {
1634
1459
  hasCameraControls: () => this is CameraControllable;
1635
1460
  }
1636
1461
  import * as THREE from "three";
1637
- import { Hideable, Disposable, Event, World } from "../../Types";
1638
- import { Components } from "../../Components";
1639
- /**
1640
- * Each of the planes created by {@link SimpleClipper}.
1641
- */
1642
- export declare class SimplePlane implements Disposable, Hideable {
1643
- /** Event that fires when the user starts dragging a clipping plane. */
1644
- readonly onDraggingStarted: Event<unknown>;
1645
- /** Event that fires when the user stops dragging a clipping plane. */
1646
- readonly onDraggingEnded: Event<unknown>;
1647
- /** {@link Disposable.onDisposed} */
1648
- readonly onDisposed: Event<unknown>;
1649
- readonly normal: THREE.Vector3;
1650
- readonly origin: THREE.Vector3;
1651
- readonly three: THREE.Plane;
1652
- protected readonly _helper: THREE.Object3D;
1653
- protected _visible: boolean;
1654
- protected _enabled: boolean;
1655
- components: Components;
1656
- world: World;
1657
- private _controlsActive;
1658
- private readonly _arrowBoundBox;
1659
- private readonly _planeMesh;
1660
- private readonly _controls;
1661
- private readonly _hiddenMaterial;
1662
- get enabled(): boolean;
1663
- /** {@link Component.enabled} */
1664
- set enabled(state: boolean);
1665
- /** {@link Hideable.visible } */
1666
- get visible(): boolean;
1667
- /** {@link Hideable.visible } */
1668
- set visible(state: boolean);
1669
- /** The meshes used for raycasting */
1670
- get meshes(): THREE.Mesh[];
1671
- /** The material of the clipping plane representation. */
1672
- get planeMaterial(): THREE.Material | THREE.Material[];
1673
- /** The material of the clipping plane representation. */
1674
- set planeMaterial(material: THREE.Material | THREE.Material[]);
1675
- /** The size of the clipping plane representation. */
1676
- get size(): number;
1677
- /** Sets the size of the clipping plane representation. */
1678
- set size(size: number);
1679
- get helper(): THREE.Object3D<THREE.Object3DEventMap>;
1680
- constructor(components: Components, world: World, origin: THREE.Vector3, normal: THREE.Vector3, material: THREE.Material, size?: number, activateControls?: boolean);
1681
- setFromNormalAndCoplanarPoint(normal: THREE.Vector3, point: THREE.Vector3): Promise<void>;
1682
- /** {@link Updateable.update} */
1683
- update: () => Promise<void>;
1684
- /** {@link Disposable.dispose} */
1685
- dispose(): void;
1686
- private reset;
1687
- protected toggleControls(state: boolean): void;
1688
- private newTransformControls;
1689
- private initializeControls;
1690
- private createArrowBoundingBox;
1691
- private changeDrag;
1692
- private notifyDraggingChanged;
1693
- private preventCameraMovement;
1694
- private newHelper;
1695
- private static newPlaneMesh;
1696
- }
1697
- import * as THREE from "three";
1698
1462
  import { Disposable } from "./interfaces";
1699
1463
  import { Event } from "./event";
1700
1464
  import { Components } from "../../Components";
@@ -1719,6 +1483,122 @@ export interface World extends Disposable, Updateable {
1719
1483
  renderer: BaseRenderer | null;
1720
1484
  uuid: string;
1721
1485
  }
1486
+ import { NavigationMode } from "./types";
1487
+ /**
1488
+ * A {@link NavigationMode} that allows first person navigation,
1489
+ * simulating FPS video games.
1490
+ */
1491
+ export declare class FirstPersonMode implements NavigationMode {
1492
+ private camera;
1493
+ /** {@link NavigationMode.enabled} */
1494
+ enabled: boolean;
1495
+ /** {@link NavigationMode.id} */
1496
+ readonly id = "FirstPerson";
1497
+ constructor(camera: any);
1498
+ /** {@link NavigationMode.set} */
1499
+ set(active: boolean): void;
1500
+ private setupFirstPersonCamera;
1501
+ }
1502
+ import { NavigationMode } from "./types";
1503
+ /**
1504
+ * A {@link NavigationMode} that allows 3D navigation and panning
1505
+ * like in many 3D and CAD softwares.
1506
+ */
1507
+ export declare class OrbitMode implements NavigationMode {
1508
+ camera: any;
1509
+ /** {@link NavigationMode.enabled} */
1510
+ enabled: boolean;
1511
+ /** {@link NavigationMode.id} */
1512
+ readonly id = "Orbit";
1513
+ constructor(camera: any);
1514
+ /** {@link NavigationMode.set} */
1515
+ set(active: boolean): void;
1516
+ private activateOrbitControls;
1517
+ }
1518
+ import { NavigationMode } from "./types";
1519
+ /**
1520
+ * A {@link NavigationMode} that allows to navigate floorplans in 2D,
1521
+ * like many BIM tools.
1522
+ */
1523
+ export declare class PlanMode implements NavigationMode {
1524
+ private camera;
1525
+ /** {@link NavigationMode.enabled} */
1526
+ enabled: boolean;
1527
+ /** {@link NavigationMode.id} */
1528
+ readonly id = "Plan";
1529
+ private mouseAction1?;
1530
+ private mouseAction2?;
1531
+ private mouseInitialized;
1532
+ private readonly defaultAzimuthSpeed;
1533
+ private readonly defaultPolarSpeed;
1534
+ constructor(camera: any);
1535
+ /** {@link NavigationMode.set} */
1536
+ set(active: boolean): void;
1537
+ }
1538
+ import * as THREE from "three";
1539
+ import { CameraProjection } from "./types";
1540
+ import { Event } from "../../../core";
1541
+ import { OrthoPerspectiveCamera } from "../index";
1542
+ /**
1543
+ * Object to control the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
1544
+ */
1545
+ export declare class ProjectionManager {
1546
+ /**
1547
+ * Event that fires when the {@link CameraProjection} changes.
1548
+ */
1549
+ readonly onChanged: Event<THREE.Camera>;
1550
+ current: CameraProjection;
1551
+ camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
1552
+ private _component;
1553
+ private _previousDistance;
1554
+ /** Match Ortho zoom with Perspective distance when changing projection mode */
1555
+ matchOrthoDistanceEnabled: boolean;
1556
+ constructor(camera: OrthoPerspectiveCamera);
1557
+ /**
1558
+ * Sets the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
1559
+ *
1560
+ * @param projection - the new projection to set. If it is the current projection,
1561
+ * it will have no effect.
1562
+ */
1563
+ set(projection: CameraProjection): Promise<void>;
1564
+ /**
1565
+ * Changes the current {@link CameraProjection} from Ortographic to Perspective
1566
+ * and vice versa.
1567
+ */
1568
+ toggle(): Promise<void>;
1569
+ private setOrthoCamera;
1570
+ private getDims;
1571
+ private setupOrthoCamera;
1572
+ private getDistance;
1573
+ private setPerspectiveCamera;
1574
+ }
1575
+ /**
1576
+ * The projection system of the camera.
1577
+ */
1578
+ export type CameraProjection = "Perspective" | "Orthographic";
1579
+ /**
1580
+ * The extensible list of supported navigation modes.
1581
+ */
1582
+ export type NavModeID = "Orbit" | "FirstPerson" | "Plan";
1583
+ /**
1584
+ * An object that determines the behavior of the camera controls
1585
+ * and the user input (e.g. 2D floor plan mode, first person mode, etc).
1586
+ */
1587
+ export interface NavigationMode {
1588
+ /** The unique ID of this navigation mode. */
1589
+ id: NavModeID;
1590
+ /**
1591
+ * Enable or disable this navigation mode.
1592
+ * When a new navigation mode is enabled, the previous navigation mode
1593
+ * must be disabled.
1594
+ *
1595
+ * @param active - whether to enable or disable this mode.
1596
+ * @param options - any additional data required to enable or disable it.
1597
+ * */
1598
+ set: (active: boolean, options?: any) => void;
1599
+ /** Whether this navigation mode is active or not. */
1600
+ enabled: boolean;
1601
+ }
1722
1602
  /// <reference types="node" />
1723
1603
  import * as THREE from "three";
1724
1604
  import { Hideable, Event, World } from "../../Types";
@@ -1834,6 +1714,173 @@ export declare class CullerRenderer {
1834
1714
  protected decreaseColor(): void;
1835
1715
  private applySettings;
1836
1716
  }
1717
+ export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
1718
+ import * as THREE from "three";
1719
+ import { CullerRenderer, CullerRendererSettings } from "./culler-renderer";
1720
+ import { Components } from "../../Components";
1721
+ import { Event, World } from "../../Types";
1722
+ /**
1723
+ * A renderer to determine a mesh visibility on screen
1724
+ */
1725
+ export declare class MeshCullerRenderer extends CullerRenderer {
1726
+ threshold: number;
1727
+ readonly onViewUpdated: Event<{
1728
+ seen: Set<THREE.Mesh>;
1729
+ unseen: Set<THREE.Mesh>;
1730
+ }>;
1731
+ colorMeshes: Map<string, THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[]>>;
1732
+ isProcessing: boolean;
1733
+ private _colorCodeMeshMap;
1734
+ private _meshIDColorCodeMap;
1735
+ private _currentVisibleMeshes;
1736
+ private _recentlyHiddenMeshes;
1737
+ private _intervalID;
1738
+ private readonly _transparentMat;
1739
+ constructor(components: Components, world: World, settings?: CullerRendererSettings);
1740
+ dispose(): void;
1741
+ add(mesh: THREE.Mesh | THREE.InstancedMesh): void;
1742
+ remove(mesh: THREE.Mesh | THREE.InstancedMesh): void;
1743
+ private handleWorkerMessage;
1744
+ private getAvailableMaterial;
1745
+ }
1746
+ import * as THREE from "three";
1747
+ import { Disposable, Event } from "../../Types";
1748
+ /**
1749
+ * A helper to easily get the real position of the mouse in the Three.js canvas
1750
+ * to work with tools like the
1751
+ * [raycaster](https://threejs.org/docs/#api/en/core/Raycaster), even if it has
1752
+ * been transformed through CSS or doesn't occupy the whole screen.
1753
+ */
1754
+ export declare class Mouse implements Disposable {
1755
+ dom: HTMLCanvasElement;
1756
+ private _event?;
1757
+ private _position;
1758
+ /** {@link Disposable.onDisposed} */
1759
+ readonly onDisposed: Event<unknown>;
1760
+ constructor(dom: HTMLCanvasElement);
1761
+ /**
1762
+ * The real position of the mouse of the Three.js canvas.
1763
+ */
1764
+ get position(): THREE.Vector2;
1765
+ /** {@link Disposable.dispose} */
1766
+ dispose(): void;
1767
+ private getPositionY;
1768
+ private getPositionX;
1769
+ private updateMouseInfo;
1770
+ private setupEvents;
1771
+ }
1772
+ import * as THREE from "three";
1773
+ import { Components } from "../../Components";
1774
+ import { Event, World, Disposable } from "../../Types";
1775
+ import { Mouse } from "./mouse";
1776
+ /**
1777
+ * A simple [raycaster](https://threejs.org/docs/#api/en/core/Raycaster)
1778
+ * that allows to easily get items from the scene using the mouse and touch
1779
+ * events.
1780
+ */
1781
+ export declare class SimpleRaycaster implements Disposable {
1782
+ /** {@link Component.enabled} */
1783
+ enabled: boolean;
1784
+ components: Components;
1785
+ /** {@link Disposable.onDisposed} */
1786
+ readonly onDisposed: Event<unknown>;
1787
+ /** The position of the mouse in the screen. */
1788
+ readonly mouse: Mouse;
1789
+ readonly three: THREE.Raycaster;
1790
+ world: World;
1791
+ constructor(components: Components, world: World);
1792
+ /** {@link Disposable.dispose} */
1793
+ dispose(): void;
1794
+ /**
1795
+ * Throws a ray from the camera to the mouse or touch event point and returns
1796
+ * the first item found. This also takes into account the clipping planes
1797
+ * used by the renderer.
1798
+ *
1799
+ * @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
1800
+ * to query. If not provided, it will query all the meshes stored in
1801
+ * {@link Components.meshes}.
1802
+ */
1803
+ castRay(items?: THREE.Mesh[]): THREE.Intersection | null;
1804
+ 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;
1805
+ private intersect;
1806
+ private filterClippingPlanes;
1807
+ }
1808
+ import * as THREE from "three";
1809
+ import { Hideable, Disposable, Event, World } from "../../Types";
1810
+ import { Components } from "../../Components";
1811
+ /**
1812
+ * Each of the planes created by {@link SimpleClipper}.
1813
+ */
1814
+ export declare class SimplePlane implements Disposable, Hideable {
1815
+ /** Event that fires when the user starts dragging a clipping plane. */
1816
+ readonly onDraggingStarted: Event<unknown>;
1817
+ /** Event that fires when the user stops dragging a clipping plane. */
1818
+ readonly onDraggingEnded: Event<unknown>;
1819
+ /** {@link Disposable.onDisposed} */
1820
+ readonly onDisposed: Event<unknown>;
1821
+ readonly normal: THREE.Vector3;
1822
+ readonly origin: THREE.Vector3;
1823
+ readonly three: THREE.Plane;
1824
+ protected readonly _helper: THREE.Object3D;
1825
+ protected _visible: boolean;
1826
+ protected _enabled: boolean;
1827
+ components: Components;
1828
+ world: World;
1829
+ private _controlsActive;
1830
+ private readonly _arrowBoundBox;
1831
+ private readonly _planeMesh;
1832
+ private readonly _controls;
1833
+ private readonly _hiddenMaterial;
1834
+ get enabled(): boolean;
1835
+ /** {@link Component.enabled} */
1836
+ set enabled(state: boolean);
1837
+ /** {@link Hideable.visible } */
1838
+ get visible(): boolean;
1839
+ /** {@link Hideable.visible } */
1840
+ set visible(state: boolean);
1841
+ /** The meshes used for raycasting */
1842
+ get meshes(): THREE.Mesh[];
1843
+ /** The material of the clipping plane representation. */
1844
+ get planeMaterial(): THREE.Material | THREE.Material[];
1845
+ /** The material of the clipping plane representation. */
1846
+ set planeMaterial(material: THREE.Material | THREE.Material[]);
1847
+ /** The size of the clipping plane representation. */
1848
+ get size(): number;
1849
+ /** Sets the size of the clipping plane representation. */
1850
+ set size(size: number);
1851
+ get helper(): THREE.Object3D<THREE.Object3DEventMap>;
1852
+ constructor(components: Components, world: World, origin: THREE.Vector3, normal: THREE.Vector3, material: THREE.Material, size?: number, activateControls?: boolean);
1853
+ setFromNormalAndCoplanarPoint(normal: THREE.Vector3, point: THREE.Vector3): Promise<void>;
1854
+ /** {@link Updateable.update} */
1855
+ update: () => Promise<void>;
1856
+ /** {@link Disposable.dispose} */
1857
+ dispose(): void;
1858
+ private reset;
1859
+ protected toggleControls(state: boolean): void;
1860
+ private newTransformControls;
1861
+ private initializeControls;
1862
+ private createArrowBoundingBox;
1863
+ private changeDrag;
1864
+ private notifyDraggingChanged;
1865
+ private preventCameraMovement;
1866
+ private newHelper;
1867
+ private static newPlaneMesh;
1868
+ }
1869
+ import * as THREE from "three";
1870
+ import * as WEBIFC from "web-ifc";
1871
+ import * as FRAGS from "@thatopen/fragments";
1872
+ export declare class CivilReader {
1873
+ defLineMat: THREE.LineBasicMaterial;
1874
+ read(webIfc: WEBIFC.IfcAPI): {
1875
+ alignments: Map<number, FRAGS.Alignment>;
1876
+ coordinationMatrix: THREE.Matrix4;
1877
+ } | undefined;
1878
+ get(civilItems: any): {
1879
+ alignments: Map<number, FRAGS.Alignment>;
1880
+ coordinationMatrix: THREE.Matrix4;
1881
+ } | undefined;
1882
+ private getCurves;
1883
+ }
1837
1884
  import * as WEBIFC from "web-ifc";
1838
1885
  /** Configuration of the IFC-fragment conversion. */
1839
1886
  export declare class IfcFragmentSettings {
@@ -1861,54 +1908,20 @@ export declare class IfcFragmentSettings {
1861
1908
  autoSetWasm: boolean;
1862
1909
  customLocateFileHandler: WEBIFC.LocateFileHandlerFn | null;
1863
1910
  }
1864
- import * as THREE from "three";
1865
- import * as WEBIFC from "web-ifc";
1866
- import * as FRAGS from "@thatopen/fragments";
1867
- export declare class CivilReader {
1868
- defLineMat: THREE.LineBasicMaterial;
1869
- read(webIfc: WEBIFC.IfcAPI): {
1870
- alignments: Map<number, FRAGS.Alignment>;
1871
- coordinationMatrix: THREE.Matrix4;
1872
- } | undefined;
1873
- get(civilItems: any): {
1874
- alignments: Map<number, FRAGS.Alignment>;
1875
- coordinationMatrix: THREE.Matrix4;
1876
- } | undefined;
1877
- private getCurves;
1878
- }
1879
1911
  import * as WEBIFC from "web-ifc";
1880
1912
  export declare class IfcMetadataReader {
1881
1913
  get(webIfc: WEBIFC.IfcAPI, type: number): string;
1882
1914
  }
1883
- import * as THREE from "three";
1884
- import { CullerRenderer, CullerRendererSettings } from "./culler-renderer";
1885
- import { Components } from "../../Components";
1886
- import { Event, World } from "../../Types";
1887
- /**
1888
- * A renderer to determine a mesh visibility on screen
1889
- */
1890
- export declare class MeshCullerRenderer extends CullerRenderer {
1891
- threshold: number;
1892
- readonly onViewUpdated: Event<{
1893
- seen: Set<THREE.Mesh>;
1894
- unseen: Set<THREE.Mesh>;
1895
- }>;
1896
- colorMeshes: Map<string, THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[]>>;
1897
- isProcessing: boolean;
1898
- private _colorCodeMeshMap;
1899
- private _meshIDColorCodeMap;
1900
- private _currentVisibleMeshes;
1901
- private _recentlyHiddenMeshes;
1902
- private _intervalID;
1903
- private readonly _transparentMat;
1904
- constructor(components: Components, world: World, settings?: CullerRendererSettings);
1905
- dispose(): void;
1906
- add(mesh: THREE.Mesh | THREE.InstancedMesh): void;
1907
- remove(mesh: THREE.Mesh | THREE.InstancedMesh): void;
1908
- private handleWorkerMessage;
1909
- private getAvailableMaterial;
1915
+ import { IfcFragmentSettings } from "../../FragmentIfcLoader/src";
1916
+ /** Configuration of the IFC-fragment streaming. */
1917
+ export declare class IfcStreamingSettings extends IfcFragmentSettings {
1918
+ minGeometrySize: number;
1919
+ minAssetsSize: number;
1920
+ }
1921
+ /** Configuration of the IFC-fragment streaming. */
1922
+ export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
1923
+ propertiesSize: number;
1910
1924
  }
1911
- export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
1912
1925
  import * as WEBIFC from "web-ifc";
1913
1926
  import { AsyncEvent, Component, Disposable, Event } from "../../../core";
1914
1927
  import { PropertiesStreamingSettings } from "./streaming-settings";
@@ -1936,26 +1949,6 @@ export declare class FragmentPropsStreamConverter extends Component implements D
1936
1949
  private getIndices;
1937
1950
  private cleanUp;
1938
1951
  }
1939
- import { IfcFragmentSettings } from "../../FragmentIfcLoader/src";
1940
- /** Configuration of the IFC-fragment streaming. */
1941
- export declare class IfcStreamingSettings extends IfcFragmentSettings {
1942
- minGeometrySize: number;
1943
- minAssetsSize: number;
1944
- }
1945
- /** Configuration of the IFC-fragment streaming. */
1946
- export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
1947
- propertiesSize: number;
1948
- }
1949
- import * as WEBIFC from "web-ifc";
1950
- import * as THREE from "three";
1951
- export declare class Units {
1952
- factor: number;
1953
- complement: number;
1954
- apply(matrix: THREE.Matrix4): void;
1955
- setUp(webIfc: WEBIFC.IfcAPI): void;
1956
- private getLengthUnits;
1957
- private getScaleMatrix;
1958
- }
1959
1952
  export interface StreamedGeometries {
1960
1953
  [id: number]: {
1961
1954
  boundingBox: Float32Array;
@@ -1971,6 +1964,16 @@ export interface StreamedAsset {
1971
1964
  color: number[];
1972
1965
  }[];
1973
1966
  }
1967
+ import * as WEBIFC from "web-ifc";
1968
+ import * as THREE from "three";
1969
+ export declare class Units {
1970
+ factor: number;
1971
+ complement: number;
1972
+ apply(matrix: THREE.Matrix4): void;
1973
+ setUp(webIfc: WEBIFC.IfcAPI): void;
1974
+ private getLengthUnits;
1975
+ private getScaleMatrix;
1976
+ }
1974
1977
  export type RelationsMap = Map<number, Map<number, number[]>>;
1975
1978
  export interface ModelsRelationMap {
1976
1979
  [modelID: string]: RelationsMap;