@thatopen/components 2.0.0-alpha.0 → 2.0.0-alpha.10

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.
Files changed (52) hide show
  1. package/dist/core/Clipper/index.d.ts +4 -4
  2. package/dist/core/Cullers/src/culler-renderer.d.ts +3 -2
  3. package/dist/core/Cullers/src/mesh-culler-renderer.d.ts +1 -0
  4. package/dist/core/Materials/index.d.ts +3 -15
  5. package/dist/core/MiniMap/index.d.ts +15 -0
  6. package/dist/core/MiniMap/src/index.d.ts +34 -0
  7. package/dist/core/OrthoPerspectiveCamera/index.d.ts +50 -0
  8. package/dist/core/OrthoPerspectiveCamera/src/first-person-mode.d.ts +16 -0
  9. package/dist/core/OrthoPerspectiveCamera/src/index.d.ts +5 -0
  10. package/dist/core/OrthoPerspectiveCamera/src/orbit-mode.d.ts +16 -0
  11. package/dist/core/OrthoPerspectiveCamera/src/plan-mode.d.ts +20 -0
  12. package/dist/core/OrthoPerspectiveCamera/src/projections.d.ts +37 -0
  13. package/dist/core/OrthoPerspectiveCamera/src/types.d.ts +27 -0
  14. package/dist/core/Types/src/async-event.d.ts +34 -0
  15. package/dist/core/Types/src/index.d.ts +1 -0
  16. package/dist/core/Types/src/interfaces.d.ts +3 -14
  17. package/dist/core/Worlds/src/simple-renderer.d.ts +3 -4
  18. package/dist/core/index.d.ts +2 -0
  19. package/dist/fragments/{FragmentBoundingBox → BoundingBoxes}/index.d.ts +4 -4
  20. package/dist/fragments/FragmentClassifier/index.d.ts +5 -4
  21. package/dist/fragments/FragmentHider/index.d.ts +10 -0
  22. package/dist/fragments/FragmentIfcLoader/index.d.ts +1 -2
  23. package/dist/fragments/FragmentIfcLoader/src/civil-reader.d.ts +1 -1
  24. package/dist/fragments/FragmentIfcLoader/src/index.d.ts +1 -0
  25. package/dist/fragments/FragmentManager/index.d.ts +1 -1
  26. package/dist/fragments/{FragmentIfcStreamer/src/fragment-ifc-stream-converter.d.ts → IfcGeometryTiler/index.d.ts} +4 -4
  27. package/dist/fragments/{FragmentIfcStreamer → IfcGeometryTiler}/src/fragment-props-stream-converter.d.ts +4 -4
  28. package/dist/fragments/{FragmentIfcStreamer → IfcGeometryTiler}/src/index.d.ts +0 -1
  29. package/dist/fragments/IfcPropertiesTiler/index.d.ts +26 -0
  30. package/dist/fragments/index.d.ts +5 -2
  31. package/dist/ifc/IfcJsonExporter/index.d.ts +1 -1
  32. package/dist/ifc/IfcPropertiesFinder/index.d.ts +2 -2
  33. package/dist/ifc/IfcPropertiesManager/index.d.ts +2 -2
  34. package/dist/ifc/IfcRelationsIndexer/index.d.ts +135 -0
  35. package/dist/ifc/IfcRelationsIndexer/src/getRelationMap.d.ts +3 -0
  36. package/dist/ifc/IfcRelationsIndexer/src/relToAttributesMap.d.ts +4 -0
  37. package/dist/ifc/IfcRelationsIndexer/src/types.d.ts +24 -0
  38. package/dist/ifc/Utils/properties-utils.d.ts +1 -1
  39. package/dist/ifc/index.d.ts +1 -1
  40. package/dist/index.cjs +5 -5
  41. package/dist/index.d.ts +1 -0
  42. package/dist/index.mjs +3496 -2537
  43. package/dist/measurement/Utils/index.d.ts +20 -0
  44. package/dist/measurement/index.d.ts +1 -0
  45. package/dist/namespace.d.ts +1037 -590
  46. package/dist/utils/index.d.ts +1 -0
  47. package/dist/utils/vertex-picker.d.ts +31 -0
  48. package/package.json +6 -5
  49. package/dist/fragments/FragmentIfcStreamer/index.d.ts +0 -1
  50. package/dist/ifc/IfcPropertiesIndexer/index.d.ts +0 -31
  51. /package/dist/fragments/{FragmentIfcStreamer → IfcGeometryTiler}/src/base-types.d.ts +0 -0
  52. /package/dist/fragments/{FragmentIfcStreamer → IfcGeometryTiler}/src/streaming-settings.d.ts +0 -0
@@ -40,10 +40,10 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
40
40
  * has to be `true` for this to apply.
41
41
  */
42
42
  toleranceOrthogonalY: number;
43
- planes: T[];
43
+ list: T[];
44
44
  protected PlaneType: new (...args: any) => SimplePlane | T;
45
45
  /** The material used in all the clipping planes. */
46
- protected _material: THREE.Material;
46
+ protected _material: THREE.MeshBasicMaterial;
47
47
  private _size;
48
48
  private _enabled;
49
49
  private _visible;
@@ -56,9 +56,9 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
56
56
  /** {@link Hideable.visible } */
57
57
  set visible(state: boolean);
58
58
  /** The material of the clipping plane representation. */
59
- get material(): THREE.Material;
59
+ get material(): THREE.MeshBasicMaterial;
60
60
  /** The material of the clipping plane representation. */
61
- set material(material: THREE.Material);
61
+ set material(material: THREE.MeshBasicMaterial);
62
62
  /** The size of the geometric representation of the clippings planes. */
63
63
  get size(): number;
64
64
  /** The size of the geometric representation of the clippings planes. */
@@ -1,6 +1,6 @@
1
1
  import * as THREE from "three";
2
2
  import { Components } from "../../Components";
3
- import { Event, World } from "../../Types";
3
+ import { AsyncEvent, Event, World } from "../../Types";
4
4
  export interface CullerRendererSettings {
5
5
  updateInterval?: number;
6
6
  width?: number;
@@ -18,7 +18,7 @@ export declare class CullerRenderer {
18
18
  * meshes that are currently visible, and the ones that were visible
19
19
  * just before but not anymore.
20
20
  */
21
- readonly onViewUpdated: Event<any>;
21
+ readonly onViewUpdated: Event<any> | AsyncEvent<any>;
22
22
  /** {@link Component.enabled} */
23
23
  enabled: boolean;
24
24
  /**
@@ -44,6 +44,7 @@ export declare class CullerRenderer {
44
44
  private readonly renderTarget;
45
45
  private readonly bufferSize;
46
46
  private readonly _buffer;
47
+ protected _isWorkerBusy: boolean;
47
48
  constructor(components: Components, world: World, settings?: CullerRendererSettings);
48
49
  /** {@link Disposable.dispose} */
49
50
  dispose(): void;
@@ -17,6 +17,7 @@ export declare class MeshCullerRenderer extends CullerRenderer {
17
17
  private _meshIDColorCodeMap;
18
18
  private _currentVisibleMeshes;
19
19
  private _recentlyHiddenMeshes;
20
+ private _intervalID;
20
21
  private readonly _transparentMat;
21
22
  constructor(components: Components, world: World, settings?: CullerRendererSettings);
22
23
  dispose(): void;
@@ -1,5 +1,5 @@
1
1
  import * as THREE from "three";
2
- import { Component, Disposable, Event, World } from "../Types";
2
+ import { Component, Disposable, Event } from "../Types";
3
3
  import { Components } from "../Components";
4
4
  /**
5
5
  * A tool to easily handle the materials of massive amounts of
@@ -9,7 +9,6 @@ export declare class Materials extends Component implements Disposable {
9
9
  static readonly uuid: "24989d27-fa2f-4797-8b08-35918f74e502";
10
10
  /** {@link Component.enabled} */
11
11
  enabled: boolean;
12
- private _originalBackground;
13
12
  /** {@link Disposable.onDisposed} */
14
13
  readonly onDisposed: Event<string>;
15
14
  list: {
@@ -20,6 +19,8 @@ export declare class Materials extends Component implements Disposable {
20
19
  };
21
20
  private _originals;
22
21
  constructor(components: Components);
22
+ /** {@link Disposable.dispose} */
23
+ dispose(): void;
23
24
  /**
24
25
  * Turns the specified material styles on or off.
25
26
  *
@@ -27,19 +28,6 @@ export declare class Materials extends Component implements Disposable {
27
28
  * @param ids the ids of the style to turn on or off.
28
29
  */
29
30
  set(active: boolean, ids?: string[]): void;
30
- /** {@link Disposable.dispose} */
31
- dispose(): void;
32
- /**
33
- * Sets the color of the background of the scene.
34
- *
35
- * @param color: the color to apply.
36
- */
37
- setBackgroundColor(color: THREE.Color, world: World): void;
38
- /**
39
- * Resets the scene background to the color that was being used
40
- * before applying the material manager.
41
- */
42
- resetBackgroundColor(world: World): void;
43
31
  /**
44
32
  * Creates a new material style.
45
33
  * @param id the identifier of the style to create.
@@ -0,0 +1,15 @@
1
+ import { Component, Components, Disposable, Updateable, World, Event } from "../../core";
2
+ import { MiniMap } from "./src";
3
+ export declare class MiniMaps extends Component implements Updateable, Disposable {
4
+ static readonly uuid: "39ad6aad-84c8-4adf-a1e0-7f25313a9e7f";
5
+ readonly onAfterUpdate: Event<unknown>;
6
+ readonly onBeforeUpdate: Event<unknown>;
7
+ readonly onDisposed: Event<unknown>;
8
+ enabled: boolean;
9
+ list: Map<string, MiniMap>;
10
+ constructor(components: Components);
11
+ create(world: World): MiniMap;
12
+ delete(id: string): void;
13
+ dispose(): void | Promise<void>;
14
+ update(): void;
15
+ }
@@ -0,0 +1,34 @@
1
+ import * as THREE from "three";
2
+ import { Event, Resizeable, Updateable, Disposable, World } from "../../../core";
3
+ export declare class MiniMap implements Resizeable, Updateable, Disposable {
4
+ /** {@link Disposable.onDisposed} */
5
+ readonly onDisposed: Event<unknown>;
6
+ readonly onAfterUpdate: Event<unknown>;
7
+ readonly onBeforeUpdate: Event<unknown>;
8
+ readonly onResize: Event<THREE.Vector2>;
9
+ frontOffset: number;
10
+ overrideMaterial: THREE.MeshDepthMaterial;
11
+ backgroundColor: THREE.Color;
12
+ renderer: THREE.WebGLRenderer;
13
+ enabled: boolean;
14
+ world: World;
15
+ private _lockRotation;
16
+ private _camera;
17
+ private _plane;
18
+ private _size;
19
+ private _tempVector1;
20
+ private _tempVector2;
21
+ private _tempTarget;
22
+ private readonly down;
23
+ get lockRotation(): boolean;
24
+ set lockRotation(active: boolean);
25
+ get zoom(): number;
26
+ set zoom(value: number);
27
+ constructor(world: World);
28
+ dispose(): void;
29
+ get(): THREE.OrthographicCamera;
30
+ update(): void;
31
+ getSize(): THREE.Vector2;
32
+ resize(size?: THREE.Vector2): void;
33
+ private updatePlanes;
34
+ }
@@ -0,0 +1,50 @@
1
+ import * as THREE from "three";
2
+ import { Components } from "../../core/Components";
3
+ import { SimpleCamera } from "../../core";
4
+ import { NavigationMode, NavModeID, ProjectionManager } from "./src";
5
+ export * from "./src";
6
+ /**
7
+ * A flexible camera that uses
8
+ * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
9
+ * easily control the camera in 2D and 3D. It supports multiple navigation
10
+ * modes, such as 2D floor plan navigation, first person and 3D orbit.
11
+ */
12
+ export declare class OrthoPerspectiveCamera extends SimpleCamera {
13
+ /**
14
+ * The current {@link NavigationMode}.
15
+ */
16
+ mode: NavigationMode;
17
+ readonly projection: ProjectionManager;
18
+ readonly threeOrtho: THREE.OrthographicCamera;
19
+ protected readonly _userInputButtons: any;
20
+ protected readonly _frustumSize = 50;
21
+ protected readonly _navigationModes: Map<NavModeID, NavigationMode>;
22
+ get current(): THREE.PerspectiveCamera | THREE.OrthographicCamera;
23
+ constructor(components: Components);
24
+ /** {@link Disposable.dispose} */
25
+ dispose(): void;
26
+ /**
27
+ * Sets a new {@link NavigationMode} and disables the previous one.
28
+ *
29
+ * @param mode - The {@link NavigationMode} to set.
30
+ */
31
+ set(mode: NavModeID): void;
32
+ /**
33
+ * Make the camera view fit all the specified meshes.
34
+ *
35
+ * @param meshes the meshes to fit. If it is not defined, it will
36
+ * evaluate {@link Components.meshes}.
37
+ * @param offset the distance to the fit object
38
+ */
39
+ fit(meshes: Iterable<THREE.Mesh>, offset?: number): Promise<void>;
40
+ /**
41
+ * Allows or prevents all user input.
42
+ *
43
+ * @param active - whether to enable or disable user inputs.
44
+ */
45
+ setUserInput(active: boolean): void;
46
+ private disableUserInput;
47
+ private enableUserInput;
48
+ private newOrthoCamera;
49
+ private setOrthoCameraAspect;
50
+ }
@@ -0,0 +1,16 @@
1
+ import { NavigationMode } from "./types";
2
+ /**
3
+ * A {@link NavigationMode} that allows first person navigation,
4
+ * simulating FPS video games.
5
+ */
6
+ export declare class FirstPersonMode implements NavigationMode {
7
+ private camera;
8
+ /** {@link NavigationMode.enabled} */
9
+ enabled: boolean;
10
+ /** {@link NavigationMode.id} */
11
+ readonly id = "FirstPerson";
12
+ constructor(camera: any);
13
+ /** {@link NavigationMode.set} */
14
+ set(active: boolean): void;
15
+ private setupFirstPersonCamera;
16
+ }
@@ -0,0 +1,5 @@
1
+ export * from "./first-person-mode";
2
+ export * from "./orbit-mode";
3
+ export * from "./plan-mode";
4
+ export * from "./projections";
5
+ export * from "./types";
@@ -0,0 +1,16 @@
1
+ import { NavigationMode } from "./types";
2
+ /**
3
+ * A {@link NavigationMode} that allows 3D navigation and panning
4
+ * like in many 3D and CAD softwares.
5
+ */
6
+ export declare class OrbitMode implements NavigationMode {
7
+ camera: any;
8
+ /** {@link NavigationMode.enabled} */
9
+ enabled: boolean;
10
+ /** {@link NavigationMode.id} */
11
+ readonly id = "Orbit";
12
+ constructor(camera: any);
13
+ /** {@link NavigationMode.set} */
14
+ set(active: boolean): void;
15
+ private activateOrbitControls;
16
+ }
@@ -0,0 +1,20 @@
1
+ import { NavigationMode } from "./types";
2
+ /**
3
+ * A {@link NavigationMode} that allows to navigate floorplans in 2D,
4
+ * like many BIM tools.
5
+ */
6
+ export declare class PlanMode implements NavigationMode {
7
+ private camera;
8
+ /** {@link NavigationMode.enabled} */
9
+ enabled: boolean;
10
+ /** {@link NavigationMode.id} */
11
+ readonly id = "Plan";
12
+ private mouseAction1?;
13
+ private mouseAction2?;
14
+ private mouseInitialized;
15
+ private readonly defaultAzimuthSpeed;
16
+ private readonly defaultPolarSpeed;
17
+ constructor(camera: any);
18
+ /** {@link NavigationMode.set} */
19
+ set(active: boolean): void;
20
+ }
@@ -0,0 +1,37 @@
1
+ import * as THREE from "three";
2
+ import { CameraProjection } from "./types";
3
+ import { Event } from "../../../core";
4
+ import { OrthoPerspectiveCamera } from "../index";
5
+ /**
6
+ * Object to control the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
7
+ */
8
+ export declare class ProjectionManager {
9
+ /**
10
+ * Event that fires when the {@link CameraProjection} changes.
11
+ */
12
+ readonly onChanged: Event<THREE.Camera>;
13
+ current: CameraProjection;
14
+ camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
15
+ private _component;
16
+ private _previousDistance;
17
+ /** Match Ortho zoom with Perspective distance when changing projection mode */
18
+ matchOrthoDistanceEnabled: boolean;
19
+ constructor(camera: OrthoPerspectiveCamera);
20
+ /**
21
+ * Sets the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
22
+ *
23
+ * @param projection - the new projection to set. If it is the current projection,
24
+ * it will have no effect.
25
+ */
26
+ set(projection: CameraProjection): Promise<void>;
27
+ /**
28
+ * Changes the current {@link CameraProjection} from Ortographic to Perspective
29
+ * and vice versa.
30
+ */
31
+ toggle(): Promise<void>;
32
+ private setOrthoCamera;
33
+ private getDims;
34
+ private setupOrthoCamera;
35
+ private getDistance;
36
+ private setPerspectiveCamera;
37
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The projection system of the camera.
3
+ */
4
+ export type CameraProjection = "Perspective" | "Orthographic";
5
+ /**
6
+ * The extensible list of supported navigation modes.
7
+ */
8
+ export type NavModeID = "Orbit" | "FirstPerson" | "Plan";
9
+ /**
10
+ * An object that determines the behavior of the camera controls
11
+ * and the user input (e.g. 2D floor plan mode, first person mode, etc).
12
+ */
13
+ export interface NavigationMode {
14
+ /** The unique ID of this navigation mode. */
15
+ id: NavModeID;
16
+ /**
17
+ * Enable or disable this navigation mode.
18
+ * When a new navigation mode is enabled, the previous navigation mode
19
+ * must be disabled.
20
+ *
21
+ * @param active - whether to enable or disable this mode.
22
+ * @param options - any additional data required to enable or disable it.
23
+ * */
24
+ set: (active: boolean, options?: any) => void;
25
+ /** Whether this navigation mode is active or not. */
26
+ enabled: boolean;
27
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Simple event handler by
3
+ * [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540).
4
+ * Keep in mind that:
5
+ * - If you want to remove it later, you might want to declare the callback as
6
+ * an object.
7
+ * - If you want to maintain the reference to `this`, you will need to declare
8
+ * the callback as an arrow function.
9
+ */
10
+ export declare class AsyncEvent<T> {
11
+ /**
12
+ * Add a callback to this event instance.
13
+ * @param handler - the callback to be added to this event.
14
+ */
15
+ add(handler: T extends void ? {
16
+ (): Promise<void>;
17
+ } : {
18
+ (data: T): Promise<void>;
19
+ }): void;
20
+ /**
21
+ * Removes a callback from this event instance.
22
+ * @param handler - the callback to be removed from this event.
23
+ */
24
+ remove(handler: T extends void ? {
25
+ (): Promise<void>;
26
+ } : {
27
+ (data: T): Promise<void>;
28
+ }): void;
29
+ /** Triggers all the callbacks assigned to this event. */
30
+ trigger: (data?: T) => Promise<void>;
31
+ /** Gets rid of all the suscribed events. */
32
+ reset(): void;
33
+ private handlers;
34
+ }
@@ -1,4 +1,5 @@
1
1
  export * from "./event";
2
+ export * from "./async-event";
2
3
  export * from "./interfaces";
3
4
  export * from "./component";
4
5
  export * from "./base";
@@ -63,7 +63,7 @@ export interface Updateable {
63
63
  * Function used to update the state of this component each frame. For
64
64
  * instance, a renderer component will make a render each frame.
65
65
  */
66
- update(delta?: number): void | Promise<void>;
66
+ update(delta?: number): void;
67
67
  }
68
68
  /** Basic type to describe the progress of any kind of process. */
69
69
  export interface Progress {
@@ -78,31 +78,20 @@ export interface Progress {
78
78
  * dimensions.
79
79
  */
80
80
  export interface Createable {
81
- readonly onBeforeCreate: Event<any>;
82
81
  /** Creates a new instance of an element (e.g. a new Dimension). */
83
82
  create: (data: any) => void;
84
- /** Fired after successfully calling {@link Createable.create} */
85
- readonly onAfterCreate: Event<any>;
86
83
  /**
87
84
  * Finish the creation process of the component, successfully creating an
88
85
  * instance of whatever the component creates.
89
86
  */
90
- endCreation: (data: any) => void;
91
- /** Fired before calling {@link Createable.cancelCreation}. */
92
- readonly onBeforeCancel: Event<any>;
87
+ endCreation?: (data: any) => void;
93
88
  /**
94
89
  * Cancels the creation process of the component, going back to the state
95
90
  * before starting to create.
96
91
  */
97
- cancelCreation: (data: any) => void;
98
- /** Fired after calling {@link Createable.cancelCreation}. */
99
- readonly onAfterCancel: Event<any>;
100
- /** Fired before calling {@link Createable.delete}. */
101
- readonly onBeforeDelete: Event<any>;
92
+ cancelCreation?: (data: any) => void;
102
93
  /** Deletes an existing instance of an element (e.g. a Dimension). */
103
94
  delete: (data: any) => void;
104
- /** Fired after successfully calling {@link Createable.delete()} */
105
- readonly onAfterDelete: Event<any>;
106
95
  }
107
96
  /**
108
97
  * Whether this component supports to be configured.
@@ -6,15 +6,15 @@ import { Components } from "../../Components";
6
6
  * ([Objec3Ds](https://threejs.org/docs/#api/en/core/Object3D).
7
7
  */
8
8
  export declare class SimpleRenderer extends BaseRenderer {
9
- /** {@link Component.enabled} */
10
9
  enabled: boolean;
11
10
  /** The HTML container of the THREE.js canvas where the scene is rendered. */
12
- container: HTMLElement | null;
11
+ container: HTMLElement;
13
12
  three: THREE.WebGLRenderer;
14
13
  protected _canvas: HTMLCanvasElement;
15
14
  protected _parameters?: Partial<THREE.WebGLRendererParameters>;
15
+ protected _resizeObserver: ResizeObserver | null;
16
16
  protected onContainerUpdated: Event<HTMLElement>;
17
- constructor(components: Components, container?: HTMLElement, parameters?: Partial<THREE.WebGLRendererParameters>);
17
+ constructor(components: Components, container: HTMLElement, parameters?: Partial<THREE.WebGLRendererParameters>);
18
18
  /** {@link Updateable.update} */
19
19
  update(): void;
20
20
  /** {@link Disposable.dispose} */
@@ -28,5 +28,4 @@ export declare class SimpleRenderer extends BaseRenderer {
28
28
  private setupRenderer;
29
29
  private onContextLost;
30
30
  private onContextBack;
31
- private updateContainer;
32
31
  }
@@ -7,3 +7,5 @@ export * from "./Grids";
7
7
  export * from "./Clipper";
8
8
  export * from "./Materials";
9
9
  export * from "./Cullers";
10
+ export * from "./MiniMap";
11
+ export * from "./OrthoPerspectiveCamera";
@@ -1,12 +1,12 @@
1
1
  import * as THREE from "three";
2
- import * as FRAGS from "bim-fragment";
3
- import { FragmentsGroup } from "bim-fragment";
2
+ import * as FRAGS from "@thatopen/fragments";
3
+ import { FragmentsGroup } from "@thatopen/fragments";
4
4
  import { Component, Components, Disposable, Event } from "../../core";
5
5
  /**
6
6
  * A simple implementation of bounding box that works for fragments. The resulting bbox is not 100% precise, but
7
7
  * it's fast, and should suffice for general use cases such as camera zooming or general boundary determination.
8
8
  */
9
- export declare class FragmentBoundingBox extends Component implements Disposable {
9
+ export declare class BoundingBoxes extends Component implements Disposable {
10
10
  static readonly uuid: "d1444724-dba6-4cdd-a0c7-68ee1450d166";
11
11
  /** {@link Component.enabled} */
12
12
  enabled: boolean;
@@ -31,6 +31,6 @@ export declare class FragmentBoundingBox extends Component implements Disposable
31
31
  getMesh(): THREE.Mesh<THREE.BoxGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
32
32
  reset(): void;
33
33
  add(group: FragmentsGroup): void;
34
- addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh): void;
34
+ addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh, itemIDs?: Iterable<number>): void;
35
35
  private static getFragmentBounds;
36
36
  }
@@ -1,4 +1,5 @@
1
- import * as FRAGS from "bim-fragment";
1
+ import * as THREE from "three";
2
+ import * as FRAGS from "@thatopen/fragments";
2
3
  import { Disposable, Component, Event, Components } from "../../core";
3
4
  export interface Classification {
4
5
  [system: string]: {
@@ -9,13 +10,11 @@ export declare class FragmentClassifier extends Component implements Disposable
9
10
  static readonly uuid: "e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7";
10
11
  /** {@link Component.enabled} */
11
12
  enabled: boolean;
12
- private _groupSystems;
13
+ list: Classification;
13
14
  /** {@link Disposable.onDisposed} */
14
15
  readonly onDisposed: Event<unknown>;
15
16
  constructor(components: Components);
16
17
  private onFragmentsDisposed;
17
- /** {@link Component.get} */
18
- get(): Classification;
19
18
  dispose(): void;
20
19
  remove(guid: string): void;
21
20
  find(filter?: {
@@ -26,5 +25,7 @@ export declare class FragmentClassifier extends Component implements Disposable
26
25
  byEntity(group: FRAGS.FragmentsGroup): void;
27
26
  byStorey(group: FRAGS.FragmentsGroup): void;
28
27
  byIfcRel(group: FRAGS.FragmentsGroup, ifcRel: number, systemName: string): Promise<void>;
28
+ setColor(items: FRAGS.FragmentIdMap, color: THREE.Color, override?: boolean): void;
29
+ resetColor(items: FRAGS.FragmentIdMap): void;
29
30
  private saveItem;
30
31
  }
@@ -0,0 +1,10 @@
1
+ import * as FRAGS from "@thatopen/fragments";
2
+ import { Components, Component } from "../../core";
3
+ export declare class FragmentHider extends Component {
4
+ static readonly uuid: "dd9ccf2d-8a21-4821-b7f6-2949add16a29";
5
+ enabled: boolean;
6
+ constructor(components: Components);
7
+ set(visible: boolean, items?: FRAGS.FragmentIdMap): void;
8
+ isolate(items: FRAGS.FragmentIdMap): void;
9
+ private updateCulledVisibility;
10
+ }
@@ -1,10 +1,9 @@
1
1
  import * as WEBIFC from "web-ifc";
2
- import * as FRAGS from "bim-fragment";
2
+ import * as FRAGS from "@thatopen/fragments";
3
3
  import { IfcFragmentSettings } from "./src";
4
4
  import { Component, Components, Event, Disposable } from "../../core";
5
5
  export declare class FragmentIfcLoader extends Component implements Disposable {
6
6
  static readonly uuid: "a659add7-1418-4771-a0d6-7d4d438e4624";
7
- readonly onIfcLoaded: Event<FRAGS.FragmentsGroup>;
8
7
  readonly onIfcStartedLoading: Event<void>;
9
8
  readonly onSetup: Event<void>;
10
9
  /** {@link Disposable.onDisposed} */
@@ -1,6 +1,6 @@
1
1
  import * as THREE from "three";
2
2
  import * as WEBIFC from "web-ifc";
3
- import * as FRAGS from "bim-fragment";
3
+ import * as FRAGS from "@thatopen/fragments";
4
4
  export declare class CivilReader {
5
5
  defLineMat: THREE.LineBasicMaterial;
6
6
  read(webIfc: WEBIFC.IfcAPI): {
@@ -1,3 +1,4 @@
1
1
  export * from "./ifc-fragment-settings";
2
+ export * from "./spatial-structure";
2
3
  export * from "./civil-reader";
3
4
  export * from "./ifc-metadata-reader";
@@ -1,4 +1,4 @@
1
- import { Fragment, FragmentsGroup } from "bim-fragment";
1
+ import { Fragment, FragmentsGroup } from "@thatopen/fragments";
2
2
  import * as THREE from "three";
3
3
  import { Component, Components, Event, Disposable } from "../../core";
4
4
  /**
@@ -1,8 +1,8 @@
1
1
  import * as WEBIFC from "web-ifc";
2
- import { Components, Disposable, Event, Component } from "../../../core";
3
- import { IfcStreamingSettings } from "./streaming-settings";
4
- import { StreamedGeometries, StreamedAsset } from "./base-types";
5
- export declare class FragmentIfcStreamConverter extends Component implements Disposable {
2
+ import { Components, Disposable, Event, Component } from "../../core";
3
+ import { IfcStreamingSettings, StreamedGeometries, StreamedAsset } from "./src";
4
+ export * from "./src";
5
+ export declare class IfcGeometryTiler extends Component implements Disposable {
6
6
  static readonly uuid: "d9999a00-e1f5-4d3f-8cfe-c56e08609764";
7
7
  onGeometryStreamed: Event<{
8
8
  buffer: Uint8Array;
@@ -1,16 +1,16 @@
1
1
  import * as WEBIFC from "web-ifc";
2
- import { Component, Disposable, Event } from "../../../core";
2
+ import { AsyncEvent, Component, Disposable, Event } from "../../../core";
3
3
  import { PropertiesStreamingSettings } from "./streaming-settings";
4
4
  export declare class FragmentPropsStreamConverter extends Component implements Disposable {
5
5
  static readonly uuid: "88d2c89c-ce32-47d7-8cb6-d51e4b311a0b";
6
- onPropertiesStreamed: Event<{
6
+ onPropertiesStreamed: AsyncEvent<{
7
7
  type: number;
8
8
  data: {
9
9
  [id: number]: any;
10
10
  };
11
11
  }>;
12
- onProgress: Event<number>;
13
- onIndicesStreamed: Event<number[][]>;
12
+ onProgress: AsyncEvent<number>;
13
+ onIndicesStreamed: AsyncEvent<number[][]>;
14
14
  /** {@link Disposable.onDisposed} */
15
15
  readonly onDisposed: Event<string>;
16
16
  enabled: boolean;
@@ -1,4 +1,3 @@
1
1
  export * from "./streaming-settings";
2
2
  export * from "./fragment-props-stream-converter";
3
- export * from "./fragment-ifc-stream-converter";
4
3
  export * from "./base-types";
@@ -0,0 +1,26 @@
1
+ import * as WEBIFC from "web-ifc";
2
+ import { AsyncEvent, Component, Disposable, Event } from "../../core";
3
+ import { PropertiesStreamingSettings } from "../IfcGeometryTiler";
4
+ export declare class IfcPropertiesTiler extends Component implements Disposable {
5
+ static readonly uuid: "88d2c89c-ce32-47d7-8cb6-d51e4b311a0b";
6
+ onPropertiesStreamed: AsyncEvent<{
7
+ type: number;
8
+ data: {
9
+ [id: number]: any;
10
+ };
11
+ }>;
12
+ onProgress: AsyncEvent<number>;
13
+ onIndicesStreamed: AsyncEvent<Map<number, Map<number, number[]>>>;
14
+ /** {@link Disposable.onDisposed} */
15
+ readonly onDisposed: Event<string>;
16
+ enabled: boolean;
17
+ settings: PropertiesStreamingSettings;
18
+ webIfc: WEBIFC.IfcAPI;
19
+ dispose(): Promise<void>;
20
+ streamFromBuffer(data: Uint8Array): Promise<void>;
21
+ streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
22
+ private readIfcFile;
23
+ private streamIfcFile;
24
+ private streamAllProperties;
25
+ private cleanUp;
26
+ }
@@ -1,5 +1,8 @@
1
- export * from "./FragmentBoundingBox";
1
+ export * from "./BoundingBoxes";
2
2
  export * from "./FragmentClassifier";
3
+ export * from "./FragmentExploder";
4
+ export * from "./FragmentHider";
3
5
  export * from "./FragmentIfcLoader";
4
- export * from "./FragmentIfcStreamer";
5
6
  export * from "./FragmentManager";
7
+ export * from "./IfcGeometryTiler";
8
+ export * from "./IfcPropertiesTiler";
@@ -1,5 +1,5 @@
1
1
  import * as WEBIFC from "web-ifc";
2
- import * as FRAG from "bim-fragment";
2
+ import * as FRAG from "@thatopen/fragments";
3
3
  /**
4
4
  * Object to export all the properties from an IFC to a JS object.
5
5
  */