@thatopen/components 2.0.0-alpha.4 → 2.0.0-alpha.5

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.
@@ -12,58 +12,6 @@ export declare class Raycasters extends Component implements Disposable {
12
12
  delete(world: World): void;
13
13
  dispose(): void;
14
14
  }
15
- import { Component, Disposable, Event } from "../Types";
16
- /**
17
- * The entry point of the Components library.
18
- * It can:
19
- * - Create and access all the components of the library.
20
- * - Update all the updatable components automatically.
21
- * - Dispose all the components, preventing memory leaks.
22
- */
23
- export declare class Components implements Disposable {
24
- static readonly release = "1.4.21";
25
- /** {@link Disposable.onDisposed} */
26
- readonly onDisposed: Event<void>;
27
- /** The list of components created in this app. */
28
- readonly list: Map<string, Component>;
29
- /** If disabled, the animation loop will be stopped. */
30
- enabled: boolean;
31
- private _clock;
32
- add(uuid: string, instance: Component): void;
33
- /**
34
- * Retrieves a component. If it already exists in this app, it returns the instance of the component. If it
35
- * doesn't exist, it will instance it automatically.
36
- *
37
- * @param Component - The component to get or create.
38
- */
39
- get<U extends Component>(Component: new (components: Components) => U): U;
40
- constructor();
41
- /**
42
- * Initializes the library. It should be called at the start of the app after
43
- * initializing the scene, the renderer and the
44
- * camera. Additionally, if any component that need a raycaster is
45
- * used, the {@link raycaster} will need to be initialized.
46
- */
47
- init(): void;
48
- /**
49
- * Disposes the memory of all the components and tools of this instance of
50
- * the library. A memory leak will be created if:
51
- *
52
- * - An instance of the library ends up out of scope and this function isn't
53
- * called. This is especially relevant in Single Page Applications (React,
54
- * Angular, Vue, etc).
55
- *
56
- * - Any of the objects of this instance (meshes, geometries, etc) is
57
- * referenced by a reference type (object or array).
58
- *
59
- * You can learn more about how Three.js handles memory leaks
60
- * [here](https://threejs.org/docs/#manual/en/introduction/How-to-dispose-of-objects).
61
- *
62
- */
63
- dispose(): void;
64
- private update;
65
- private static setupBVH;
66
- }
67
15
  import * as THREE from "three";
68
16
  import { Components } from "../Components";
69
17
  import { Component } from "../Types";
@@ -107,35 +55,6 @@ export declare class Disposer extends Component {
107
55
  private disposeChildren;
108
56
  private static disposeMaterial;
109
57
  }
110
- import { Component, Disposable, Updateable, World, Event, BaseScene, BaseCamera, BaseRenderer } from "../Types";
111
- import { Components } from "../Components";
112
- import { SimpleWorld } from "./src";
113
- export declare class Worlds extends Component implements Updateable, Disposable {
114
- static readonly uuid: "fdb61dc4-2ec1-4966-b83d-54ea795fad4a";
115
- readonly onAfterUpdate: Event<unknown>;
116
- readonly onBeforeUpdate: Event<unknown>;
117
- readonly onDisposed: Event<unknown>;
118
- list: Map<string, World>;
119
- enabled: boolean;
120
- constructor(components: Components);
121
- create<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer>(): SimpleWorld<T, U, S>;
122
- delete(world: World): void;
123
- dispose(): void;
124
- update(delta?: number): void | Promise<void>;
125
- }
126
- import { Component, Disposable, World, Event } from "../Types";
127
- import { GridConfig, SimpleGrid } from "./src";
128
- export declare class Grids extends Component implements Disposable {
129
- static readonly uuid: "d1e814d5-b81c-4452-87a2-f039375e0489";
130
- list: Map<string, SimpleGrid>;
131
- onDisposed: Event<unknown>;
132
- config: Required<GridConfig>;
133
- /** {@link Component.enabled} */
134
- enabled: boolean;
135
- create(world: World): void;
136
- delete(world: World): void;
137
- dispose(): void;
138
- }
139
58
  import * as THREE from "three";
140
59
  import { Component, Createable, Disposable, Event, Hideable, World } from "../Types";
141
60
  import { SimplePlane } from "./src";
@@ -239,6 +158,109 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
239
158
  private _onStartDragging;
240
159
  private _onEndDragging;
241
160
  }
161
+ import { Component, Disposable, Updateable, World, Event, BaseScene, BaseCamera, BaseRenderer } from "../Types";
162
+ import { Components } from "../Components";
163
+ import { SimpleWorld } from "./src";
164
+ export declare class Worlds extends Component implements Updateable, Disposable {
165
+ static readonly uuid: "fdb61dc4-2ec1-4966-b83d-54ea795fad4a";
166
+ readonly onAfterUpdate: Event<unknown>;
167
+ readonly onBeforeUpdate: Event<unknown>;
168
+ readonly onDisposed: Event<unknown>;
169
+ list: Map<string, World>;
170
+ enabled: boolean;
171
+ constructor(components: Components);
172
+ create<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer>(): SimpleWorld<T, U, S>;
173
+ delete(world: World): void;
174
+ dispose(): void;
175
+ update(delta?: number): void | Promise<void>;
176
+ }
177
+ import { Component, Disposable, Event } from "../Types";
178
+ /**
179
+ * The entry point of the Components library.
180
+ * It can:
181
+ * - Create and access all the components of the library.
182
+ * - Update all the updatable components automatically.
183
+ * - Dispose all the components, preventing memory leaks.
184
+ */
185
+ export declare class Components implements Disposable {
186
+ static readonly release = "1.4.21";
187
+ /** {@link Disposable.onDisposed} */
188
+ readonly onDisposed: Event<void>;
189
+ /** The list of components created in this app. */
190
+ readonly list: Map<string, Component>;
191
+ /** If disabled, the animation loop will be stopped. */
192
+ enabled: boolean;
193
+ private _clock;
194
+ add(uuid: string, instance: Component): void;
195
+ /**
196
+ * Retrieves a component. If it already exists in this app, it returns the instance of the component. If it
197
+ * doesn't exist, it will instance it automatically.
198
+ *
199
+ * @param Component - The component to get or create.
200
+ */
201
+ get<U extends Component>(Component: new (components: Components) => U): U;
202
+ constructor();
203
+ /**
204
+ * Initializes the library. It should be called at the start of the app after
205
+ * initializing the scene, the renderer and the
206
+ * camera. Additionally, if any component that need a raycaster is
207
+ * used, the {@link raycaster} will need to be initialized.
208
+ */
209
+ init(): void;
210
+ /**
211
+ * Disposes the memory of all the components and tools of this instance of
212
+ * the library. A memory leak will be created if:
213
+ *
214
+ * - An instance of the library ends up out of scope and this function isn't
215
+ * called. This is especially relevant in Single Page Applications (React,
216
+ * Angular, Vue, etc).
217
+ *
218
+ * - Any of the objects of this instance (meshes, geometries, etc) is
219
+ * referenced by a reference type (object or array).
220
+ *
221
+ * You can learn more about how Three.js handles memory leaks
222
+ * [here](https://threejs.org/docs/#manual/en/introduction/How-to-dispose-of-objects).
223
+ *
224
+ */
225
+ dispose(): void;
226
+ private update;
227
+ private static setupBVH;
228
+ }
229
+ import { Components } from "../Components";
230
+ import { MeshCullerRenderer, CullerRendererSettings } from "./src";
231
+ import { Component, Event, Disposable, World } from "../Types";
232
+ /**
233
+ * A tool to handle big scenes efficiently by automatically hiding the objects
234
+ * that are not visible to the camera.
235
+ */
236
+ export declare class Cullers extends Component implements Disposable {
237
+ static readonly uuid: "69f2a50d-c266-44fc-b1bd-fa4d34be89e6";
238
+ private _enabled;
239
+ list: Map<string, MeshCullerRenderer>;
240
+ /** {@link Disposable.onDisposed} */
241
+ readonly onDisposed: Event<unknown>;
242
+ /** {@link Component.enabled} */
243
+ get enabled(): boolean;
244
+ set enabled(value: boolean);
245
+ constructor(components: Components);
246
+ create(world: World, config?: Partial<CullerRendererSettings>): MeshCullerRenderer;
247
+ delete(world: World): void;
248
+ /** {@link Disposable.dispose} */
249
+ dispose(): void;
250
+ }
251
+ import { Component, Disposable, World, Event } from "../Types";
252
+ import { GridConfig, SimpleGrid } from "./src";
253
+ export declare class Grids extends Component implements Disposable {
254
+ static readonly uuid: "d1e814d5-b81c-4452-87a2-f039375e0489";
255
+ list: Map<string, SimpleGrid>;
256
+ onDisposed: Event<unknown>;
257
+ config: Required<GridConfig>;
258
+ /** {@link Component.enabled} */
259
+ enabled: boolean;
260
+ create(world: World): void;
261
+ delete(world: World): void;
262
+ dispose(): void;
263
+ }
242
264
  import * as THREE from "three";
243
265
  import { Component, Disposable, Event, World } from "../Types";
244
266
  import { Components } from "../Components";
@@ -300,80 +322,7 @@ export declare class Materials extends Component implements Disposable {
300
322
  */
301
323
  removeMeshes(id: string, meshes: THREE.Mesh[]): void;
302
324
  }
303
- import { Components } from "../Components";
304
- import { MeshCullerRenderer, CullerRendererSettings } from "./src";
305
- import { Component, Event, Disposable, World } from "../Types";
306
- /**
307
- * A tool to handle big scenes efficiently by automatically hiding the objects
308
- * that are not visible to the camera.
309
- */
310
- export declare class Cullers extends Component implements Disposable {
311
- static readonly uuid: "69f2a50d-c266-44fc-b1bd-fa4d34be89e6";
312
- private _enabled;
313
- list: Map<string, MeshCullerRenderer>;
314
- /** {@link Disposable.onDisposed} */
315
- readonly onDisposed: Event<unknown>;
316
- /** {@link Component.enabled} */
317
- get enabled(): boolean;
318
- set enabled(value: boolean);
319
- constructor(components: Components);
320
- create(world: World, config?: Partial<CullerRendererSettings>): MeshCullerRenderer;
321
- delete(world: World): void;
322
- /** {@link Disposable.dispose} */
323
- dispose(): void;
324
- }
325
- import * as THREE from "three";
326
- import * as FRAGS from "bim-fragment";
327
- import { FragmentsGroup } from "bim-fragment";
328
- import { Component, Components, Disposable, Event } from "../../core";
329
- /**
330
- * A simple implementation of bounding box that works for fragments. The resulting bbox is not 100% precise, but
331
- * it's fast, and should suffice for general use cases such as camera zooming or general boundary determination.
332
- */
333
- export declare class FragmentBoundingBox extends Component implements Disposable {
334
- static readonly uuid: "d1444724-dba6-4cdd-a0c7-68ee1450d166";
335
- /** {@link Component.enabled} */
336
- enabled: boolean;
337
- /** {@link Disposable.onDisposed} */
338
- readonly onDisposed: Event<unknown>;
339
- private _absoluteMin;
340
- private _absoluteMax;
341
- private _meshes;
342
- constructor(components: Components);
343
- static getDimensions(bbox: THREE.Box3): {
344
- width: number;
345
- height: number;
346
- depth: number;
347
- center: THREE.Vector3;
348
- };
349
- static newBound(positive: boolean): THREE.Vector3;
350
- static getBounds(points: THREE.Vector3[], min?: THREE.Vector3, max?: THREE.Vector3): THREE.Box3;
351
- /** {@link Disposable.dispose} */
352
- dispose(): void;
353
- get(): THREE.Box3;
354
- getSphere(): THREE.Sphere;
355
- getMesh(): THREE.Mesh<THREE.BoxGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
356
- reset(): void;
357
- add(group: FragmentsGroup): void;
358
- addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh): void;
359
- private static getFragmentBounds;
360
- }
361
- import { Component, Disposable, Event, Components } from "../../core";
362
- export declare class FragmentExploder extends Component implements Disposable {
363
- static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
364
- enabled: boolean;
365
- height: number;
366
- groupName: string;
367
- /** {@link Disposable.onDisposed} */
368
- readonly onDisposed: Event<string>;
369
- list: Set<string>;
370
- constructor(components: Components);
371
- dispose(): void;
372
- explode(): void;
373
- reset(): void;
374
- update(): void;
375
- }
376
- import * as FRAGS from "bim-fragment";
325
+ import * as FRAGS from "@thatopen/fragments";
377
326
  import { Disposable, Component, Event, Components } from "../../core";
378
327
  export interface Classification {
379
328
  [system: string]: {
@@ -403,8 +352,93 @@ export declare class FragmentClassifier extends Component implements Disposable
403
352
  byIfcRel(group: FRAGS.FragmentsGroup, ifcRel: number, systemName: string): Promise<void>;
404
353
  private saveItem;
405
354
  }
406
- import * as FRAGS from "bim-fragment";
407
- import { Components, Component } from "../../core";
355
+ import * as THREE from "three";
356
+ export declare function obbFromPoints(vertices: ArrayLike<number>): {
357
+ center: THREE.Vector3;
358
+ halfSizes: THREE.Vector3;
359
+ rotation: THREE.Matrix3;
360
+ transformation: THREE.Matrix4;
361
+ };
362
+ export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
363
+ import * as THREE from "three";
364
+ export declare class MaterialsUtils {
365
+ static isTransparent(material: THREE.Material): boolean;
366
+ }
367
+ export declare class UUID {
368
+ private static _pattern;
369
+ private static _lut;
370
+ static create(): string;
371
+ static validate(uuid: string): void;
372
+ }
373
+ import * as THREE from "three";
374
+ import { Component, Components, Event, World, Disposable } from "../core";
375
+ export interface VertexPickerConfig {
376
+ showOnlyVertex: boolean;
377
+ snapDistance: number;
378
+ previewElement: HTMLElement;
379
+ }
380
+ export declare class VertexPicker extends Component implements Disposable {
381
+ onVertexFound: Event<THREE.Vector3>;
382
+ onVertexLost: Event<THREE.Vector3>;
383
+ components: Components;
384
+ private _pickedPoint;
385
+ private _config;
386
+ private _enabled;
387
+ private _workingPlane;
388
+ /** {@link Disposable.onDisposed} */
389
+ readonly onDisposed: Event<unknown>;
390
+ set enabled(value: boolean);
391
+ get enabled(): boolean;
392
+ constructor(components: Components, config?: Partial<VertexPickerConfig>);
393
+ [Symbol.dispose](): void;
394
+ set workingPlane(plane: THREE.Plane | null);
395
+ get workingPlane(): THREE.Plane | null;
396
+ set config(value: Partial<VertexPickerConfig>);
397
+ get config(): Partial<VertexPickerConfig>;
398
+ dispose(): void;
399
+ get(world: World): THREE.Vector3 | null;
400
+ private getClosestVertex;
401
+ private getVertices;
402
+ private getVertex;
403
+ }
404
+ import * as THREE from "three";
405
+ import * as FRAGS from "@thatopen/fragments";
406
+ import { FragmentsGroup } from "@thatopen/fragments";
407
+ import { Component, Components, Disposable, Event } from "../../core";
408
+ /**
409
+ * A simple implementation of bounding box that works for fragments. The resulting bbox is not 100% precise, but
410
+ * it's fast, and should suffice for general use cases such as camera zooming or general boundary determination.
411
+ */
412
+ export declare class FragmentBoundingBox extends Component implements Disposable {
413
+ static readonly uuid: "d1444724-dba6-4cdd-a0c7-68ee1450d166";
414
+ /** {@link Component.enabled} */
415
+ enabled: boolean;
416
+ /** {@link Disposable.onDisposed} */
417
+ readonly onDisposed: Event<unknown>;
418
+ private _absoluteMin;
419
+ private _absoluteMax;
420
+ private _meshes;
421
+ constructor(components: Components);
422
+ static getDimensions(bbox: THREE.Box3): {
423
+ width: number;
424
+ height: number;
425
+ depth: number;
426
+ center: THREE.Vector3;
427
+ };
428
+ static newBound(positive: boolean): THREE.Vector3;
429
+ static getBounds(points: THREE.Vector3[], min?: THREE.Vector3, max?: THREE.Vector3): THREE.Box3;
430
+ /** {@link Disposable.dispose} */
431
+ dispose(): void;
432
+ get(): THREE.Box3;
433
+ getSphere(): THREE.Sphere;
434
+ getMesh(): THREE.Mesh<THREE.BoxGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
435
+ reset(): void;
436
+ add(group: FragmentsGroup): void;
437
+ addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh): void;
438
+ private static getFragmentBounds;
439
+ }
440
+ import * as FRAGS from "@thatopen/fragments";
441
+ import { Components, Component } from "../../core";
408
442
  export declare class FragmentHider extends Component {
409
443
  static readonly uuid: "dd9ccf2d-8a21-4821-b7f6-2949add16a29";
410
444
  enabled: boolean;
@@ -413,8 +447,28 @@ export declare class FragmentHider extends Component {
413
447
  isolate(items: FRAGS.FragmentIdMap): void;
414
448
  private updateCulledVisibility;
415
449
  }
450
+ import * as THREE from "three";
451
+ export interface MeasureEdge {
452
+ distance: number;
453
+ points: THREE.Vector3[];
454
+ }
455
+ export declare class MeasurementUtils {
456
+ static getFace(mesh: THREE.InstancedMesh | THREE.Mesh, triangleIndex: number, instance?: number): {
457
+ edges: MeasureEdge[];
458
+ indices: Set<number>;
459
+ } | null;
460
+ static distanceFromPointToLine(point: THREE.Vector3, lineStart: THREE.Vector3, lineEnd: THREE.Vector3, clamp?: boolean): number;
461
+ private static getFaceData;
462
+ static getVerticesAndNormal(mesh: THREE.Mesh | THREE.InstancedMesh, faceIndex: number, instance: number | undefined): {
463
+ p1: THREE.Vector3;
464
+ p2: THREE.Vector3;
465
+ p3: THREE.Vector3;
466
+ faceNormal: THREE.Vector3;
467
+ };
468
+ private static round;
469
+ }
416
470
  import * as WEBIFC from "web-ifc";
417
- import * as FRAGS from "bim-fragment";
471
+ import * as FRAGS from "@thatopen/fragments";
418
472
  import { IfcFragmentSettings } from "./src";
419
473
  import { Component, Components, Event, Disposable } from "../../core";
420
474
  export declare class FragmentIfcLoader extends Component implements Disposable {
@@ -445,7 +499,22 @@ export declare class FragmentIfcLoader extends Component implements Disposable {
445
499
  private getGeometry;
446
500
  private autoSetWasm;
447
501
  }
448
- import { Fragment, FragmentsGroup } from "bim-fragment";
502
+ import { Component, Disposable, Event, Components } from "../../core";
503
+ export declare class FragmentExploder extends Component implements Disposable {
504
+ static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
505
+ enabled: boolean;
506
+ height: number;
507
+ groupName: string;
508
+ /** {@link Disposable.onDisposed} */
509
+ readonly onDisposed: Event<string>;
510
+ list: Set<string>;
511
+ constructor(components: Components);
512
+ dispose(): void;
513
+ explode(): void;
514
+ reset(): void;
515
+ update(): void;
516
+ }
517
+ import { Fragment, FragmentsGroup } from "@thatopen/fragments";
449
518
  import * as THREE from "three";
450
519
  import { Component, Components, Event, Disposable } from "../../core";
451
520
  /**
@@ -538,114 +607,8 @@ export declare class OrthoPerspectiveCamera extends SimpleCamera {
538
607
  private newOrthoCamera;
539
608
  private setOrthoCameraAspect;
540
609
  }
541
- import * as THREE from "three";
542
- export declare function obbFromPoints(vertices: ArrayLike<number>): {
543
- center: THREE.Vector3;
544
- halfSizes: THREE.Vector3;
545
- rotation: THREE.Matrix3;
546
- transformation: THREE.Matrix4;
547
- };
548
- export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
549
- import * as THREE from "three";
550
- export declare class MaterialsUtils {
551
- static isTransparent(material: THREE.Material): boolean;
552
- }
553
- import * as THREE from "three";
554
- export interface MeasureEdge {
555
- distance: number;
556
- points: THREE.Vector3[];
557
- }
558
- export declare class MeasurementUtils {
559
- static getFace(mesh: THREE.InstancedMesh | THREE.Mesh, triangleIndex: number, instance?: number): {
560
- edges: MeasureEdge[];
561
- indices: Set<number>;
562
- } | null;
563
- static distanceFromPointToLine(point: THREE.Vector3, lineStart: THREE.Vector3, lineEnd: THREE.Vector3, clamp?: boolean): number;
564
- private static getFaceData;
565
- static getVerticesAndNormal(mesh: THREE.Mesh | THREE.InstancedMesh, faceIndex: number, instance: number | undefined): {
566
- p1: THREE.Vector3;
567
- p2: THREE.Vector3;
568
- p3: THREE.Vector3;
569
- faceNormal: THREE.Vector3;
570
- };
571
- private static round;
572
- }
573
- export declare class UUID {
574
- private static _pattern;
575
- private static _lut;
576
- static create(): string;
577
- static validate(uuid: string): void;
578
- }
579
- import * as THREE from "three";
580
- import { Component, Components, Event, World, Disposable } from "../core";
581
- export interface VertexPickerConfig {
582
- showOnlyVertex: boolean;
583
- snapDistance: number;
584
- previewElement: HTMLElement;
585
- }
586
- export declare class VertexPicker extends Component implements Disposable {
587
- onVertexFound: Event<THREE.Vector3>;
588
- onVertexLost: Event<THREE.Vector3>;
589
- components: Components;
590
- private _pickedPoint;
591
- private _config;
592
- private _enabled;
593
- private _workingPlane;
594
- /** {@link Disposable.onDisposed} */
595
- readonly onDisposed: Event<unknown>;
596
- set enabled(value: boolean);
597
- get enabled(): boolean;
598
- constructor(components: Components, config?: Partial<VertexPickerConfig>);
599
- [Symbol.dispose](): void;
600
- set workingPlane(plane: THREE.Plane | null);
601
- get workingPlane(): THREE.Plane | null;
602
- set config(value: Partial<VertexPickerConfig>);
603
- get config(): Partial<VertexPickerConfig>;
604
- dispose(): void;
605
- get(world: World): THREE.Vector3 | null;
606
- private getClosestVertex;
607
- private getVertices;
608
- private getVertex;
609
- }
610
- import * as FRAGS from "bim-fragment";
611
- import { FragmentsGroup } from "bim-fragment";
612
- import { Disposable, Event, Component, Components } from "../../core";
613
- import { QueryGroup } from "./src/types";
614
- export interface QueryResult {
615
- [modelID: string]: {
616
- modelEntities: Set<number>;
617
- otherEntities: Set<number>;
618
- };
619
- }
620
- export interface IndexedModels {
621
- [modelID: string]: {
622
- [expressID: number]: Set<number>;
623
- };
624
- }
625
- export declare class IfcPropertiesFinder extends Component implements Disposable {
626
- readonly onFound: Event<FRAGS.FragmentIdMap>;
627
- /** {@link Disposable.onDisposed} */
628
- readonly onDisposed: Event<unknown>;
629
- enabled: boolean;
630
- indexedModels: IndexedModels;
631
- private readonly _conditionFunctions;
632
- private _noHandleAttributes;
633
- constructor(components: Components);
634
- private onFragmentsDisposed;
635
- dispose(): void;
636
- private indexEntityRelations;
637
- find(groups: QueryGroup[], queryModels?: FragmentsGroup[]): Promise<FRAGS.FragmentIdMap>;
638
- private toFragmentMap;
639
- private simpleQuery;
640
- private getMatchingEntities;
641
- private combineArrays;
642
- private getCommonElements;
643
- private arrayIntersection;
644
- private arrayUnion;
645
- private getConditionFunctions;
646
- }
647
610
  import * as WEBIFC from "web-ifc";
648
- import * as FRAG from "bim-fragment";
611
+ import * as FRAG from "@thatopen/fragments";
649
612
  /**
650
613
  * Object to export all the properties from an IFC to a JS object.
651
614
  */
@@ -660,85 +623,39 @@ export declare class IfcJsonExporter {
660
623
  */
661
624
  export(webIfc: WEBIFC.IfcAPI, modelID: number, indirect?: boolean, recursiveSpatial?: boolean): Promise<FRAG.IfcProperties>;
662
625
  }
663
- import { FragmentsGroup } from "bim-fragment";
626
+ import { FragmentsGroup } from "@thatopen/fragments";
664
627
  import { Disposable, Event, Component, Components } from "../../core";
665
- interface RelationMap {
666
- [modelID: string]: Map<number, Map<number, number[]>>;
628
+ import { IfcPropertiesManager } from "../IfcPropertiesManager";
629
+ interface IndexMap {
630
+ [modelID: string]: {
631
+ [expressID: string]: Set<number>;
632
+ };
667
633
  }
668
634
  export declare class IfcPropertiesIndexer extends Component implements Disposable {
669
635
  static readonly uuid: "23a889ab-83b3-44a4-8bee-ead83438370b";
670
636
  /** {@link Disposable.onDisposed} */
671
637
  readonly onDisposed: Event<string>;
672
638
  enabled: boolean;
673
- /**
674
- * All the inverse attributes this component can processes.
675
- */
676
- readonly inverseAttributes: string[];
677
- inverseAttributesToProcess: string[];
678
- private _relToAttributesMap;
679
- readonly relationMaps: RelationMap;
639
+ relationsToProcess: number[];
640
+ indexMap: IndexMap;
641
+ private _propertiesManager;
642
+ readonly onPropertiesManagerSet: Event<IfcPropertiesManager>;
643
+ set propertiesManager(manager: IfcPropertiesManager | null);
644
+ get propertiesManager(): IfcPropertiesManager | null;
680
645
  constructor(components: Components);
681
646
  private onFragmentsDisposed;
682
- private getAttributeRels;
683
- private setRelMap;
684
- /**
685
- * Processes a given model to index its IFC entities relations based on predefined inverse attributes.
686
- * This method iterates through each specified inverse attribute, retrieves the corresponding relations,
687
- * and maps them in a structured way to facilitate quick access to related entities.
688
- *
689
- * The process involves querying the model for each relation type associated with the inverse attributes
690
- * and updating the internal relationMaps with the relationships found. This map is keyed by the model's UUID
691
- * and contains a nested map where each key is an entity's expressID and its value is another map.
692
- * This inner map's keys are the indices of the inverse attributes, and its values are arrays of expressIDs
693
- * of entities that are related through that attribute.
694
- *
695
- * @param model The 'FragmentsGroup' model to be processed. It must have properties loaded.
696
- * @returns A promise that resolves to the relations map for the processed model. This map is a detailed
697
- * representation of the relations indexed by entity expressIDs and relation types.
698
- * @throws An error if the model does not have properties loaded.
699
- */
700
- process(model: FragmentsGroup): Promise<Map<number, Map<number, number[]>>>;
701
- /**
702
- * Retrieves the relations of a specific entity within a model based on the given relation name.
703
- * This method searches the indexed relation maps for the specified model and entity,
704
- * returning the IDs of related entities if a match is found.
705
- *
706
- * @param model The 'FragmentsGroup' model containing the entity.
707
- * @param expressID The unique identifier of the entity within the model.
708
- * @param relationName The IFC schema inverse attribute of the relation to search for (e.g., "IsDefinedBy", "ContainsElements").
709
- * @returns An array of express IDs representing the related entities, or 'null' if no relations are found
710
- * or the specified relation name is not indexed.
711
- */
712
- getEntityRelations(model: FragmentsGroup, expressID: number, relationName: string): number[] | null;
713
- /**
714
- * Serializes the relations of a specific model into a JSON string.
715
- * This method iterates through the relations indexed for the given model,
716
- * organizing them into a structured object where each key is an expressID of an entity,
717
- * and its value is another object mapping relation indices to arrays of related entity expressIDs.
718
- * The resulting object is then serialized into a JSON string.
719
- *
720
- * @param model The 'FragmentsGroup' model whose relations are to be serialized.
721
- * @returns A JSON string representing the serialized relations of the specified model.
722
- * If the model has no indexed relations, 'null' is returned.
723
- */
724
- serializeModelRelations(model: FragmentsGroup): string | null;
725
- /**
726
- * Serializes all relations of every model processed by the indexer into a JSON string.
727
- * This method iterates through each model's relations indexed in 'relationMaps', organizing them
728
- * into a structured JSON object. Each top-level key in this object corresponds to a model's UUID,
729
- * and its value is another object mapping entity expressIDs to their related entities, categorized
730
- * by relation types. The structure facilitates easy access to any entity's relations across all models.
731
- *
732
- * @returns A JSON string representing the serialized relations of all models processed by the indexer.
733
- * If no relations have been indexed, an empty object is returned as a JSON string.
734
- */
735
- serializeRelations(): string;
736
- getRelationsMapFromJSON(json: string): Map<number, Map<number, number[]>>;
737
- dispose(): void;
647
+ dispose(): Promise<void>;
648
+ getProperties(model: FragmentsGroup, id: string): Promise<any[] | null>;
649
+ private getNestedPsets;
650
+ private getPsetProperties;
651
+ process(model: FragmentsGroup): Promise<void>;
652
+ private setEntityIndex;
653
+ private cloneProperty;
654
+ private clonePropertyArray;
738
655
  }
739
656
  export {};
740
657
  import * as WEBIFC from "web-ifc";
741
- import { FragmentsGroup } from "bim-fragment";
658
+ import { FragmentsGroup } from "@thatopen/fragments";
742
659
  import { Component, Disposable, Event, Components } from "../../core";
743
660
  type BooleanPropTypes = "IfcBoolean" | "IfcLogical";
744
661
  type StringPropTypes = "IfcText" | "IfcLabel" | "IfcIdentifier";
@@ -789,7 +706,7 @@ export declare class IfcPropertiesManager extends Component implements Disposabl
789
706
  get(): ChangeMap;
790
707
  dispose(): void;
791
708
  private increaseMaxID;
792
- static getIFCSchema(model: FragmentsGroup): import("bim-fragment").IfcSchema;
709
+ static getIFCSchema(model: FragmentsGroup): import("@thatopen/fragments").IfcSchema;
793
710
  private newGUID;
794
711
  private getOwnerHistory;
795
712
  private registerChange;
@@ -810,20 +727,66 @@ export declare class IfcPropertiesManager extends Component implements Disposabl
810
727
  setAttributeListener(model: FragmentsGroup, expressID: number, attributeName: string): Promise<Event<String | Number | Boolean>>;
811
728
  }
812
729
  export {};
813
- import * as WEBIFC from "web-ifc";
814
- export interface IfcItemsCategories {
815
- [itemID: number]: number;
816
- }
817
- export declare class IfcCategories {
818
- getAll(webIfc: WEBIFC.IfcAPI, modelID: number): IfcItemsCategories;
730
+ import * as FRAGS from "@thatopen/fragments";
731
+ import { FragmentsGroup } from "@thatopen/fragments";
732
+ import { Disposable, Event, Component, Components } from "../../core";
733
+ import { QueryGroup } from "./src/types";
734
+ export interface QueryResult {
735
+ [modelID: string]: {
736
+ modelEntities: Set<number>;
737
+ otherEntities: Set<number>;
738
+ };
819
739
  }
820
- export declare const IfcElements: {
740
+ export interface IndexedModels {
741
+ [modelID: string]: {
742
+ [expressID: number]: Set<number>;
743
+ };
744
+ }
745
+ export declare class IfcPropertiesFinder extends Component implements Disposable {
746
+ readonly onFound: Event<FRAGS.FragmentIdMap>;
747
+ /** {@link Disposable.onDisposed} */
748
+ readonly onDisposed: Event<unknown>;
749
+ enabled: boolean;
750
+ indexedModels: IndexedModels;
751
+ private readonly _conditionFunctions;
752
+ private _noHandleAttributes;
753
+ constructor(components: Components);
754
+ private onFragmentsDisposed;
755
+ dispose(): void;
756
+ private indexEntityRelations;
757
+ find(groups: QueryGroup[], queryModels?: FragmentsGroup[]): Promise<FRAGS.FragmentIdMap>;
758
+ private toFragmentMap;
759
+ private simpleQuery;
760
+ private getMatchingEntities;
761
+ private combineArrays;
762
+ private getCommonElements;
763
+ private arrayIntersection;
764
+ private arrayUnion;
765
+ private getConditionFunctions;
766
+ }
767
+ import * as WEBIFC from "web-ifc";
768
+ import { IfcItemsCategories } from "../../../ifc";
769
+ export declare class SpatialStructure {
770
+ itemsByFloor: IfcItemsCategories;
771
+ private _units;
772
+ setUp(webIfc: WEBIFC.IfcAPI): void;
773
+ cleanUp(): void;
774
+ }
775
+ export declare const GeometryTypes: Set<number>;
776
+ import * as WEBIFC from "web-ifc";
777
+ export interface IfcItemsCategories {
778
+ [itemID: number]: number;
779
+ }
780
+ export declare class IfcCategories {
781
+ getAll(webIfc: WEBIFC.IfcAPI, modelID: number): IfcItemsCategories;
782
+ }
783
+ export declare const IfcElements: {
821
784
  [key: number]: string;
822
785
  };
823
786
  export declare const IfcCategoryMap: {
824
787
  [key: number]: string;
825
788
  };
826
- import * as FRAGS from "bim-fragment";
789
+ import * as FRAGS from "@thatopen/fragments";
827
790
  export declare class IfcPropertiesUtils {
828
791
  static getUnits(group: FRAGS.FragmentsGroup): Promise<number>;
829
792
  static findItemByGuid(model: FRAGS.FragmentsGroup, guid: string): Promise<{
@@ -848,7 +811,222 @@ export declare class IfcPropertiesUtils {
848
811
  static attributeExists(model: FRAGS.FragmentsGroup, expressID: number, attribute: string): Promise<boolean>;
849
812
  static groupEntitiesByType(model: FRAGS.FragmentsGroup, expressIDs: Set<number> | number[]): Promise<Map<number, Set<number>>>;
850
813
  }
851
- export declare const GeometryTypes: Set<number>;
814
+ import * as THREE from "three";
815
+ import { Event, Base, World, BaseScene, BaseCamera, BaseRenderer } from "../../Types";
816
+ import { Components } from "../../Components";
817
+ export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer> extends Base implements World {
818
+ /**
819
+ * All the loaded [meshes](https://threejs.org/docs/#api/en/objects/Mesh).
820
+ */
821
+ readonly meshes: Set<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
822
+ readonly onAfterUpdate: Event<unknown>;
823
+ readonly onBeforeUpdate: Event<unknown>;
824
+ enabled: boolean;
825
+ uuid: string;
826
+ readonly onDisposed: Event<unknown>;
827
+ private _scene?;
828
+ private _camera?;
829
+ private _renderer;
830
+ get scene(): T;
831
+ set scene(scene: T);
832
+ get camera(): U;
833
+ set camera(camera: U);
834
+ get renderer(): S | null;
835
+ set renderer(renderer: S | null);
836
+ constructor(components: Components);
837
+ update(delta?: number): void;
838
+ dispose(disposeResources?: boolean): void;
839
+ }
840
+ /// <reference types="node" />
841
+ import * as THREE from "three";
842
+ import { Hideable, Event, World } from "../../Types";
843
+ import { Components } from "../../Components";
844
+ export interface GridConfig {
845
+ color: THREE.Color;
846
+ size1: number;
847
+ size2: number;
848
+ distance: number;
849
+ }
850
+ /**
851
+ * An infinite grid. Created by
852
+ * [fyrestar](https://github.com/Fyrestar/THREE.InfiniteGridHelper)
853
+ * and translated to typescript by
854
+ * [dkaraush](https://github.com/dkaraush/THREE.InfiniteGridHelper/blob/master/InfiniteGridHelper.ts).
855
+ */
856
+ export declare class SimpleGrid implements Hideable, Disposable {
857
+ /** {@link Disposable.onDisposed} */
858
+ readonly onDisposed: Event<unknown>;
859
+ world: World;
860
+ components: Components;
861
+ /** {@link Hideable.visible} */
862
+ get visible(): boolean;
863
+ /** {@link Hideable.visible} */
864
+ set visible(visible: boolean);
865
+ /** The material of the grid. */
866
+ get material(): THREE.ShaderMaterial;
867
+ /**
868
+ * Whether the grid should fade away with distance. Recommended to be true for
869
+ * perspective cameras and false for orthographic cameras.
870
+ */
871
+ get fade(): boolean;
872
+ /**
873
+ * Whether the grid should fade away with distance. Recommended to be true for
874
+ * perspective cameras and false for orthographic cameras.
875
+ */
876
+ set fade(active: boolean);
877
+ private readonly _grid;
878
+ private _fade;
879
+ constructor(components: Components, world: World, config: GridConfig);
880
+ [Symbol.dispose](): void;
881
+ /** {@link Component.get} */
882
+ get(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
883
+ /** {@link Disposable.dispose} */
884
+ dispose(): void;
885
+ private setupEvents;
886
+ private updateZoom;
887
+ }
888
+ import * as THREE from "three";
889
+ import { BaseScene, Configurable, Event } from "../../Types";
890
+ import { Components } from "../../Components";
891
+ export interface SimpleSceneConfig {
892
+ directionalLight: {
893
+ color: THREE.Color;
894
+ intensity: number;
895
+ position: THREE.Vector3;
896
+ };
897
+ ambientLight: {
898
+ color: THREE.Color;
899
+ intensity: number;
900
+ };
901
+ }
902
+ /**
903
+ * A basic 3D [scene](https://threejs.org/docs/#api/en/scenes/Scene) to add
904
+ * objects hierarchically, and easily dispose them when you are finished with it.
905
+ * @noInheritDoc
906
+ */
907
+ export declare class SimpleScene extends BaseScene implements Configurable<{}> {
908
+ /** {@link Configurable.isSetup} */
909
+ isSetup: boolean;
910
+ three: THREE.Scene;
911
+ /** {@link Configurable.onSetup} */
912
+ readonly onSetup: Event<SimpleScene>;
913
+ config: Required<SimpleSceneConfig>;
914
+ constructor(components: Components);
915
+ /** Creates a simple and nice default set up for the scene (e.g. lighting). */
916
+ setup(config?: Partial<SimpleSceneConfig>): void;
917
+ }
918
+ import * as THREE from "three";
919
+ import CameraControls from "camera-controls";
920
+ import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
921
+ import { Components } from "../../Components";
922
+ /**
923
+ * A basic camera that uses
924
+ * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
925
+ * easily control the camera in 2D and 3D. Check out it's API to find out
926
+ * what features it offers.
927
+ */
928
+ export declare class SimpleCamera extends BaseCamera implements Updateable, Disposable {
929
+ /** {@link Updateable.onBeforeUpdate} */
930
+ readonly onBeforeUpdate: Event<SimpleCamera>;
931
+ /** {@link Updateable.onAfterUpdate} */
932
+ readonly onAfterUpdate: Event<SimpleCamera>;
933
+ readonly onAspectUpdated: Event<unknown>;
934
+ /** {@link Disposable.onDisposed} */
935
+ readonly onDisposed: Event<string>;
936
+ readonly three: THREE.PerspectiveCamera;
937
+ private _allControls;
938
+ /**
939
+ * The object that controls the camera. An instance of
940
+ * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls).
941
+ * Transforming the camera directly will have no effect: you need to use this
942
+ * object to move, rotate, look at objects, etc.
943
+ */
944
+ get controls(): CameraControls;
945
+ /** {@link Component.enabled} */
946
+ get enabled(): boolean;
947
+ /** {@link Component.enabled} */
948
+ set enabled(enabled: boolean);
949
+ constructor(components: Components);
950
+ /** {@link Disposable.dispose} */
951
+ dispose(): void;
952
+ /** {@link Updateable.update} */
953
+ update(_delta: number): void;
954
+ /**
955
+ * Updates the aspect of the camera to match the size of the
956
+ * {@link Components.renderer}.
957
+ */
958
+ updateAspect: () => void;
959
+ private setupCamera;
960
+ private newCameraControls;
961
+ private setupEvents;
962
+ private static getSubsetOfThree;
963
+ }
964
+ import * as THREE from "three";
965
+ import { BaseRenderer, Event } from "../../Types";
966
+ import { Components } from "../../Components";
967
+ /**
968
+ * A basic renderer capable of rendering
969
+ * ([Objec3Ds](https://threejs.org/docs/#api/en/core/Object3D).
970
+ */
971
+ export declare class SimpleRenderer extends BaseRenderer {
972
+ /** {@link Component.enabled} */
973
+ enabled: boolean;
974
+ /** The HTML container of the THREE.js canvas where the scene is rendered. */
975
+ container: HTMLElement | null;
976
+ three: THREE.WebGLRenderer;
977
+ protected _canvas: HTMLCanvasElement;
978
+ protected _parameters?: Partial<THREE.WebGLRendererParameters>;
979
+ protected onContainerUpdated: Event<HTMLElement>;
980
+ constructor(components: Components, container?: HTMLElement, parameters?: Partial<THREE.WebGLRendererParameters>);
981
+ /** {@link Updateable.update} */
982
+ update(): void;
983
+ /** {@link Disposable.dispose} */
984
+ dispose(): void;
985
+ /** {@link Resizeable.getSize}. */
986
+ getSize(): THREE.Vector2;
987
+ /** {@link Resizeable.resize} */
988
+ resize: (size?: THREE.Vector2) => void;
989
+ setupEvents(active: boolean): void;
990
+ private resizeEvent;
991
+ private setupRenderer;
992
+ private onContextLost;
993
+ private onContextBack;
994
+ private updateContainer;
995
+ }
996
+ /**
997
+ * Simple event handler by
998
+ * [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540).
999
+ * Keep in mind that:
1000
+ * - If you want to remove it later, you might want to declare the callback as
1001
+ * an object.
1002
+ * - If you want to maintain the reference to 'this', you will need to declare
1003
+ * the callback as an arrow function.
1004
+ */
1005
+ export declare class Event<T> {
1006
+ /**
1007
+ * Add a callback to this event instance.
1008
+ * @param handler - the callback to be added to this event.
1009
+ */
1010
+ add(handler: T extends void ? {
1011
+ (): void;
1012
+ } : {
1013
+ (data: T): void;
1014
+ }): void;
1015
+ /**
1016
+ * Removes a callback from this event instance.
1017
+ * @param handler - the callback to be removed from this event.
1018
+ */
1019
+ remove(handler: T extends void ? {
1020
+ (): void;
1021
+ } : {
1022
+ (data: T): void;
1023
+ }): void;
1024
+ /** Triggers all the callbacks assigned to this event. */
1025
+ trigger: (data?: T) => void;
1026
+ /** Gets rid of all the suscribed events. */
1027
+ reset(): void;
1028
+ private handlers;
1029
+ }
852
1030
  import * as THREE from "three";
853
1031
  import CameraControls from "camera-controls";
854
1032
  import { Event } from "./event";
@@ -972,40 +1150,6 @@ export interface BVHGeometry extends THREE.BufferGeometry {
972
1150
  export interface CameraControllable {
973
1151
  controls: CameraControls;
974
1152
  }
975
- /**
976
- * Simple event handler by
977
- * [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540).
978
- * Keep in mind that:
979
- * - If you want to remove it later, you might want to declare the callback as
980
- * an object.
981
- * - If you want to maintain the reference to 'this', you will need to declare
982
- * the callback as an arrow function.
983
- */
984
- export declare class Event<T> {
985
- /**
986
- * Add a callback to this event instance.
987
- * @param handler - the callback to be added to this event.
988
- */
989
- add(handler: T extends void ? {
990
- (): void;
991
- } : {
992
- (data: T): void;
993
- }): void;
994
- /**
995
- * Removes a callback from this event instance.
996
- * @param handler - the callback to be removed from this event.
997
- */
998
- remove(handler: T extends void ? {
999
- (): void;
1000
- } : {
1001
- (data: T): void;
1002
- }): void;
1003
- /** Triggers all the callbacks assigned to this event. */
1004
- trigger: (data?: T) => void;
1005
- /** Gets rid of all the suscribed events. */
1006
- reset(): void;
1007
- private handlers;
1008
- }
1009
1153
  import { Base } from "./base";
1010
1154
  /**
1011
1155
  * Components are the building blocks of this library. Components are singleton
@@ -1060,14 +1204,6 @@ export declare abstract class BaseWorldItem extends Base {
1060
1204
  currentWorld: World | null;
1061
1205
  protected constructor(components: Components);
1062
1206
  }
1063
- import * as WEBIFC from "web-ifc";
1064
- import { IfcItemsCategories } from "../../../ifc";
1065
- export declare class SpatialStructure {
1066
- itemsByFloor: IfcItemsCategories;
1067
- private _units;
1068
- setUp(webIfc: WEBIFC.IfcAPI): void;
1069
- cleanUp(): void;
1070
- }
1071
1207
  import * as THREE from "three";
1072
1208
  import CameraControls from "camera-controls";
1073
1209
  import { BaseWorldItem } from "./base-world-item";
@@ -1080,19 +1216,6 @@ export declare abstract class BaseCamera extends BaseWorldItem {
1080
1216
  hasCameraControls: () => this is CameraControllable;
1081
1217
  }
1082
1218
  import * as THREE from "three";
1083
- import { Disposable } from "./interfaces";
1084
- import { Event } from "./event";
1085
- import { Components } from "../../Components";
1086
- import { BaseWorldItem } from "./base-world-item";
1087
- export declare abstract class BaseScene extends BaseWorldItem implements Disposable {
1088
- /** {@link Disposable.onDisposed} */
1089
- readonly onDisposed: Event<unknown>;
1090
- abstract three: THREE.Object3D;
1091
- protected constructor(components: Components);
1092
- /** {@link Disposable.dispose} */
1093
- dispose(): void;
1094
- }
1095
- import * as THREE from "three";
1096
1219
  import { Vector2 } from "three";
1097
1220
  import { Event } from "./event";
1098
1221
  import { BaseWorldItem } from "./base-world-item";
@@ -1145,99 +1268,64 @@ export interface World extends Disposable, Updateable {
1145
1268
  uuid: string;
1146
1269
  }
1147
1270
  import * as THREE from "three";
1271
+ import { Disposable } from "./interfaces";
1272
+ import { Event } from "./event";
1148
1273
  import { Components } from "../../Components";
1149
- import { Event, World } from "../../Types";
1150
- export interface CullerRendererSettings {
1151
- updateInterval?: number;
1152
- width?: number;
1153
- height?: number;
1154
- autoUpdate?: boolean;
1155
- }
1156
- /**
1157
- * A base renderer to determine visibility on screen
1158
- */
1159
- export declare class CullerRenderer {
1274
+ import { BaseWorldItem } from "./base-world-item";
1275
+ export declare abstract class BaseScene extends BaseWorldItem implements Disposable {
1160
1276
  /** {@link Disposable.onDisposed} */
1161
- readonly onDisposed: Event<string>;
1162
- /**
1163
- * Fires after making the visibility check to the meshes. It lists the
1164
- * meshes that are currently visible, and the ones that were visible
1165
- * just before but not anymore.
1166
- */
1167
- readonly onViewUpdated: Event<any>;
1168
- /** {@link Component.enabled} */
1169
- enabled: boolean;
1170
- /**
1171
- * Needs to check whether there are objects that need to be hidden or shown.
1172
- * You can bind this to the camera movement, to a certain interval, etc.
1173
- */
1174
- needsUpdate: boolean;
1175
- /**
1176
- * Render the internal scene used to determine the object visibility. Used
1177
- * for debugging purposes.
1178
- */
1179
- renderDebugFrame: boolean;
1180
- components: Components;
1181
- readonly world: World;
1182
- readonly renderer: THREE.WebGLRenderer;
1183
- protected autoUpdate: boolean;
1184
- protected updateInterval: number;
1185
- protected readonly worker: Worker;
1186
- protected readonly scene: THREE.Scene;
1187
- private _width;
1188
- private _height;
1189
- private _availableColor;
1190
- private readonly renderTarget;
1191
- private readonly bufferSize;
1192
- private readonly _buffer;
1193
- constructor(components: Components, world: World, settings?: CullerRendererSettings);
1277
+ readonly onDisposed: Event<unknown>;
1278
+ abstract three: THREE.Object3D;
1279
+ protected constructor(components: Components);
1194
1280
  /** {@link Disposable.dispose} */
1195
1281
  dispose(): void;
1282
+ }
1283
+ import * as WEBIFC from "web-ifc";
1284
+ /** Configuration of the IFC-fragment conversion. */
1285
+ export declare class IfcFragmentSettings {
1286
+ /** Whether to extract the IFC properties into a JSON. */
1287
+ includeProperties: boolean;
1196
1288
  /**
1197
- * The function that the culler uses to reprocess the scene. Generally it's
1198
- * better to call needsUpdate, but you can also call this to force it.
1199
- * @param force if true, it will refresh the scene even if needsUpdate is
1200
- * not true.
1289
+ * Generate the geometry for categories that are not included by default,
1290
+ * like IFCSPACE.
1201
1291
  */
1202
- updateVisibility: (force?: boolean) => Promise<void>;
1203
- protected getAvailableColor(): {
1204
- r: number;
1205
- g: number;
1206
- b: number;
1207
- code: string;
1292
+ optionalCategories: number[];
1293
+ /** Whether to use the coordination data coming from the IFC files. */
1294
+ coordinate: boolean;
1295
+ /** Path of the WASM for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
1296
+ wasm: {
1297
+ path: string;
1298
+ absolute: boolean;
1299
+ logLevel?: WEBIFC.LogLevel;
1208
1300
  };
1209
- protected increaseColor(): void;
1210
- protected decreaseColor(): void;
1211
- private applySettings;
1212
- }
1213
- import * as THREE from "three";
1214
- import { CullerRenderer, CullerRendererSettings } from "./culler-renderer";
1215
- import { Components } from "../../Components";
1216
- import { Event, World } from "../../Types";
1217
- /**
1218
- * A renderer to determine a mesh visibility on screen
1219
- */
1220
- export declare class MeshCullerRenderer extends CullerRenderer {
1221
- threshold: number;
1222
- readonly onViewUpdated: Event<{
1223
- seen: Set<THREE.Mesh>;
1224
- unseen: Set<THREE.Mesh>;
1225
- }>;
1226
- colorMeshes: Map<string, THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[]>>;
1227
- isProcessing: boolean;
1228
- private _colorCodeMeshMap;
1229
- private _meshIDColorCodeMap;
1230
- private _currentVisibleMeshes;
1231
- private _recentlyHiddenMeshes;
1232
- private readonly _transparentMat;
1233
- constructor(components: Components, world: World, settings?: CullerRendererSettings);
1234
- dispose(): void;
1235
- add(mesh: THREE.Mesh | THREE.InstancedMesh): void;
1236
- remove(mesh: THREE.Mesh | THREE.InstancedMesh): void;
1237
- private handleWorkerMessage;
1238
- private getAvailableMaterial;
1301
+ /** List of categories that won't be converted to fragments. */
1302
+ excludedCategories: Set<number>;
1303
+ /** Whether to save the absolute location of all IFC items. */
1304
+ saveLocations: boolean;
1305
+ /** Loader settings for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
1306
+ webIfc: WEBIFC.LoaderSettings;
1307
+ autoSetWasm: boolean;
1308
+ customLocateFileHandler: WEBIFC.LocateFileHandlerFn | null;
1309
+ }
1310
+ import * as THREE from "three";
1311
+ import * as WEBIFC from "web-ifc";
1312
+ import * as FRAGS from "@thatopen/fragments";
1313
+ export declare class CivilReader {
1314
+ defLineMat: THREE.LineBasicMaterial;
1315
+ read(webIfc: WEBIFC.IfcAPI): {
1316
+ alignments: Map<number, FRAGS.Alignment>;
1317
+ coordinationMatrix: THREE.Matrix4;
1318
+ } | undefined;
1319
+ get(civilItems: any): {
1320
+ alignments: Map<number, FRAGS.Alignment>;
1321
+ coordinationMatrix: THREE.Matrix4;
1322
+ } | undefined;
1323
+ private getCurves;
1324
+ }
1325
+ import * as WEBIFC from "web-ifc";
1326
+ export declare class IfcMetadataReader {
1327
+ get(webIfc: WEBIFC.IfcAPI, type: number): string;
1239
1328
  }
1240
- export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
1241
1329
  import * as THREE from "three";
1242
1330
  import { Disposable, Event } from "../../Types";
1243
1331
  /**
@@ -1301,200 +1389,109 @@ export declare class SimpleRaycaster implements Disposable {
1301
1389
  private filterClippingPlanes;
1302
1390
  }
1303
1391
  import * as THREE from "three";
1304
- import { Event, Base, World, BaseScene, BaseCamera, BaseRenderer } from "../../Types";
1305
1392
  import { Components } from "../../Components";
1306
- export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer> extends Base implements World {
1307
- /**
1308
- * All the loaded [meshes](https://threejs.org/docs/#api/en/objects/Mesh).
1309
- */
1310
- readonly meshes: Set<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
1311
- readonly onAfterUpdate: Event<unknown>;
1312
- readonly onBeforeUpdate: Event<unknown>;
1313
- enabled: boolean;
1314
- uuid: string;
1315
- readonly onDisposed: Event<unknown>;
1316
- private _scene?;
1317
- private _camera?;
1318
- private _renderer;
1319
- get scene(): T;
1320
- set scene(scene: T);
1321
- get camera(): U;
1322
- set camera(camera: U);
1323
- get renderer(): S | null;
1324
- set renderer(renderer: S | null);
1325
- constructor(components: Components);
1326
- update(delta?: number): void;
1327
- dispose(disposeResources?: boolean): void;
1393
+ import { Event, World } from "../../Types";
1394
+ export interface CullerRendererSettings {
1395
+ updateInterval?: number;
1396
+ width?: number;
1397
+ height?: number;
1398
+ autoUpdate?: boolean;
1328
1399
  }
1329
- import * as THREE from "three";
1330
- import { Hideable, Disposable, Event, World } from "../../Types";
1331
- import { Components } from "../../Components";
1332
1400
  /**
1333
- * Each of the planes created by {@link SimpleClipper}.
1401
+ * A base renderer to determine visibility on screen
1334
1402
  */
1335
- export declare class SimplePlane implements Disposable, Hideable {
1336
- /** Event that fires when the user starts dragging a clipping plane. */
1337
- readonly onDraggingStarted: Event<unknown>;
1338
- /** Event that fires when the user stops dragging a clipping plane. */
1339
- readonly onDraggingEnded: Event<unknown>;
1403
+ export declare class CullerRenderer {
1340
1404
  /** {@link Disposable.onDisposed} */
1341
- readonly onDisposed: Event<unknown>;
1342
- readonly normal: THREE.Vector3;
1343
- readonly origin: THREE.Vector3;
1344
- readonly three: THREE.Plane;
1345
- protected readonly _helper: THREE.Object3D;
1346
- protected _visible: boolean;
1347
- protected _enabled: boolean;
1348
- components: Components;
1349
- world: World;
1350
- private _controlsActive;
1351
- private readonly _arrowBoundBox;
1352
- private readonly _planeMesh;
1353
- private readonly _controls;
1354
- private readonly _hiddenMaterial;
1355
- get enabled(): boolean;
1356
- /** {@link Component.enabled} */
1357
- set enabled(state: boolean);
1358
- /** {@link Hideable.visible } */
1359
- get visible(): boolean;
1360
- /** {@link Hideable.visible } */
1361
- set visible(state: boolean);
1362
- /** The meshes used for raycasting */
1363
- get meshes(): THREE.Mesh[];
1364
- /** The material of the clipping plane representation. */
1365
- get planeMaterial(): THREE.Material | THREE.Material[];
1366
- /** The material of the clipping plane representation. */
1367
- set planeMaterial(material: THREE.Material | THREE.Material[]);
1368
- /** The size of the clipping plane representation. */
1369
- get size(): number;
1370
- /** Sets the size of the clipping plane representation. */
1371
- set size(size: number);
1372
- get helper(): THREE.Object3D<THREE.Object3DEventMap>;
1373
- constructor(components: Components, world: World, origin: THREE.Vector3, normal: THREE.Vector3, material: THREE.Material, size?: number, activateControls?: boolean);
1374
- setFromNormalAndCoplanarPoint(normal: THREE.Vector3, point: THREE.Vector3): Promise<void>;
1375
- /** {@link Updateable.update} */
1376
- update: () => Promise<void>;
1377
- /** {@link Disposable.dispose} */
1378
- dispose(): void;
1379
- private reset;
1380
- protected toggleControls(state: boolean): void;
1381
- private newTransformControls;
1382
- private initializeControls;
1383
- private createArrowBoundingBox;
1384
- private changeDrag;
1385
- private notifyDraggingChanged;
1386
- private preventCameraMovement;
1387
- private newHelper;
1388
- private static newPlaneMesh;
1389
- }
1390
- import * as THREE from "three";
1391
- import { BaseScene, Configurable, Event } from "../../Types";
1392
- import { Components } from "../../Components";
1393
- export interface SimpleSceneConfig {
1394
- directionalLight: {
1395
- color: THREE.Color;
1396
- intensity: number;
1397
- position: THREE.Vector3;
1398
- };
1399
- ambientLight: {
1400
- color: THREE.Color;
1401
- intensity: number;
1402
- };
1403
- }
1404
- /**
1405
- * A basic 3D [scene](https://threejs.org/docs/#api/en/scenes/Scene) to add
1406
- * objects hierarchically, and easily dispose them when you are finished with it.
1407
- * @noInheritDoc
1408
- */
1409
- export declare class SimpleScene extends BaseScene implements Configurable<{}> {
1410
- /** {@link Configurable.isSetup} */
1411
- isSetup: boolean;
1412
- three: THREE.Scene;
1413
- /** {@link Configurable.onSetup} */
1414
- readonly onSetup: Event<SimpleScene>;
1415
- config: Required<SimpleSceneConfig>;
1416
- constructor(components: Components);
1417
- /** Creates a simple and nice default set up for the scene (e.g. lighting). */
1418
- setup(config?: Partial<SimpleSceneConfig>): void;
1419
- }
1420
- import * as THREE from "three";
1421
- import { BaseRenderer, Event } from "../../Types";
1422
- import { Components } from "../../Components";
1423
- /**
1424
- * A basic renderer capable of rendering
1425
- * ([Objec3Ds](https://threejs.org/docs/#api/en/core/Object3D).
1426
- */
1427
- export declare class SimpleRenderer extends BaseRenderer {
1405
+ readonly onDisposed: Event<string>;
1406
+ /**
1407
+ * Fires after making the visibility check to the meshes. It lists the
1408
+ * meshes that are currently visible, and the ones that were visible
1409
+ * just before but not anymore.
1410
+ */
1411
+ readonly onViewUpdated: Event<any>;
1428
1412
  /** {@link Component.enabled} */
1429
1413
  enabled: boolean;
1430
- /** The HTML container of the THREE.js canvas where the scene is rendered. */
1431
- container: HTMLElement | null;
1432
- three: THREE.WebGLRenderer;
1433
- protected _canvas: HTMLCanvasElement;
1434
- protected _parameters?: Partial<THREE.WebGLRendererParameters>;
1435
- protected onContainerUpdated: Event<HTMLElement>;
1436
- constructor(components: Components, container?: HTMLElement, parameters?: Partial<THREE.WebGLRendererParameters>);
1437
- /** {@link Updateable.update} */
1438
- update(): void;
1414
+ /**
1415
+ * Needs to check whether there are objects that need to be hidden or shown.
1416
+ * You can bind this to the camera movement, to a certain interval, etc.
1417
+ */
1418
+ needsUpdate: boolean;
1419
+ /**
1420
+ * Render the internal scene used to determine the object visibility. Used
1421
+ * for debugging purposes.
1422
+ */
1423
+ renderDebugFrame: boolean;
1424
+ components: Components;
1425
+ readonly world: World;
1426
+ readonly renderer: THREE.WebGLRenderer;
1427
+ protected autoUpdate: boolean;
1428
+ protected updateInterval: number;
1429
+ protected readonly worker: Worker;
1430
+ protected readonly scene: THREE.Scene;
1431
+ private _width;
1432
+ private _height;
1433
+ private _availableColor;
1434
+ private readonly renderTarget;
1435
+ private readonly bufferSize;
1436
+ private readonly _buffer;
1437
+ constructor(components: Components, world: World, settings?: CullerRendererSettings);
1439
1438
  /** {@link Disposable.dispose} */
1440
1439
  dispose(): void;
1441
- /** {@link Resizeable.getSize}. */
1442
- getSize(): THREE.Vector2;
1443
- /** {@link Resizeable.resize} */
1444
- resize: (size?: THREE.Vector2) => void;
1445
- setupEvents(active: boolean): void;
1446
- private resizeEvent;
1447
- private setupRenderer;
1448
- private onContextLost;
1449
- private onContextBack;
1450
- private updateContainer;
1440
+ /**
1441
+ * The function that the culler uses to reprocess the scene. Generally it's
1442
+ * better to call needsUpdate, but you can also call this to force it.
1443
+ * @param force if true, it will refresh the scene even if needsUpdate is
1444
+ * not true.
1445
+ */
1446
+ updateVisibility: (force?: boolean) => Promise<void>;
1447
+ protected getAvailableColor(): {
1448
+ r: number;
1449
+ g: number;
1450
+ b: number;
1451
+ code: string;
1452
+ };
1453
+ protected increaseColor(): void;
1454
+ protected decreaseColor(): void;
1455
+ private applySettings;
1451
1456
  }
1452
1457
  import * as THREE from "three";
1453
- import CameraControls from "camera-controls";
1454
- import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
1458
+ import { CullerRenderer, CullerRendererSettings } from "./culler-renderer";
1455
1459
  import { Components } from "../../Components";
1460
+ import { Event, World } from "../../Types";
1456
1461
  /**
1457
- * A basic camera that uses
1458
- * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
1459
- * easily control the camera in 2D and 3D. Check out it's API to find out
1460
- * what features it offers.
1462
+ * A renderer to determine a mesh visibility on screen
1461
1463
  */
1462
- export declare class SimpleCamera extends BaseCamera implements Updateable, Disposable {
1463
- /** {@link Updateable.onBeforeUpdate} */
1464
- readonly onBeforeUpdate: Event<SimpleCamera>;
1465
- /** {@link Updateable.onAfterUpdate} */
1466
- readonly onAfterUpdate: Event<SimpleCamera>;
1467
- readonly onAspectUpdated: Event<unknown>;
1468
- /** {@link Disposable.onDisposed} */
1469
- readonly onDisposed: Event<string>;
1470
- readonly three: THREE.PerspectiveCamera;
1471
- private _allControls;
1472
- /**
1473
- * The object that controls the camera. An instance of
1474
- * [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls).
1475
- * Transforming the camera directly will have no effect: you need to use this
1476
- * object to move, rotate, look at objects, etc.
1477
- */
1478
- get controls(): CameraControls;
1479
- /** {@link Component.enabled} */
1480
- get enabled(): boolean;
1481
- /** {@link Component.enabled} */
1482
- set enabled(enabled: boolean);
1483
- constructor(components: Components);
1484
- /** {@link Disposable.dispose} */
1464
+ export declare class MeshCullerRenderer extends CullerRenderer {
1465
+ threshold: number;
1466
+ readonly onViewUpdated: Event<{
1467
+ seen: Set<THREE.Mesh>;
1468
+ unseen: Set<THREE.Mesh>;
1469
+ }>;
1470
+ colorMeshes: Map<string, THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[]>>;
1471
+ isProcessing: boolean;
1472
+ private _colorCodeMeshMap;
1473
+ private _meshIDColorCodeMap;
1474
+ private _currentVisibleMeshes;
1475
+ private _recentlyHiddenMeshes;
1476
+ private readonly _transparentMat;
1477
+ constructor(components: Components, world: World, settings?: CullerRendererSettings);
1485
1478
  dispose(): void;
1486
- /** {@link Updateable.update} */
1487
- update(_delta: number): void;
1488
- /**
1489
- * Updates the aspect of the camera to match the size of the
1490
- * {@link Components.renderer}.
1491
- */
1492
- updateAspect: () => void;
1493
- private setupCamera;
1494
- private newCameraControls;
1495
- private setupEvents;
1496
- private static getSubsetOfThree;
1479
+ add(mesh: THREE.Mesh | THREE.InstancedMesh): void;
1480
+ remove(mesh: THREE.Mesh | THREE.InstancedMesh): void;
1481
+ private handleWorkerMessage;
1482
+ private getAvailableMaterial;
1483
+ }
1484
+ import * as WEBIFC from "web-ifc";
1485
+ import * as THREE from "three";
1486
+ export declare class Units {
1487
+ factor: number;
1488
+ complement: number;
1489
+ apply(matrix: THREE.Matrix4): void;
1490
+ setUp(webIfc: WEBIFC.IfcAPI): void;
1491
+ private getLengthUnits;
1492
+ private getScaleMatrix;
1497
1493
  }
1494
+ export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
1498
1495
  import { IfcFragmentSettings } from "../../FragmentIfcLoader/src";
1499
1496
  /** Configuration of the IFC-fragment streaming. */
1500
1497
  export declare class IfcStreamingSettings extends IfcFragmentSettings {
@@ -1505,54 +1502,6 @@ export declare class IfcStreamingSettings extends IfcFragmentSettings {
1505
1502
  export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
1506
1503
  propertiesSize: number;
1507
1504
  }
1508
- /// <reference types="node" />
1509
- import * as THREE from "three";
1510
- import { Hideable, Event, World } from "../../Types";
1511
- import { Components } from "../../Components";
1512
- export interface GridConfig {
1513
- color: THREE.Color;
1514
- size1: number;
1515
- size2: number;
1516
- distance: number;
1517
- }
1518
- /**
1519
- * An infinite grid. Created by
1520
- * [fyrestar](https://github.com/Fyrestar/THREE.InfiniteGridHelper)
1521
- * and translated to typescript by
1522
- * [dkaraush](https://github.com/dkaraush/THREE.InfiniteGridHelper/blob/master/InfiniteGridHelper.ts).
1523
- */
1524
- export declare class SimpleGrid implements Hideable, Disposable {
1525
- /** {@link Disposable.onDisposed} */
1526
- readonly onDisposed: Event<unknown>;
1527
- world: World;
1528
- components: Components;
1529
- /** {@link Hideable.visible} */
1530
- get visible(): boolean;
1531
- /** {@link Hideable.visible} */
1532
- set visible(visible: boolean);
1533
- /** The material of the grid. */
1534
- get material(): THREE.ShaderMaterial;
1535
- /**
1536
- * Whether the grid should fade away with distance. Recommended to be true for
1537
- * perspective cameras and false for orthographic cameras.
1538
- */
1539
- get fade(): boolean;
1540
- /**
1541
- * Whether the grid should fade away with distance. Recommended to be true for
1542
- * perspective cameras and false for orthographic cameras.
1543
- */
1544
- set fade(active: boolean);
1545
- private readonly _grid;
1546
- private _fade;
1547
- constructor(components: Components, world: World, config: GridConfig);
1548
- [Symbol.dispose](): void;
1549
- /** {@link Component.get} */
1550
- get(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
1551
- /** {@link Disposable.dispose} */
1552
- dispose(): void;
1553
- private setupEvents;
1554
- private updateZoom;
1555
- }
1556
1505
  import * as WEBIFC from "web-ifc";
1557
1506
  import { Component, Disposable, Event } from "../../../core";
1558
1507
  import { PropertiesStreamingSettings } from "./streaming-settings";
@@ -1580,21 +1529,6 @@ export declare class FragmentPropsStreamConverter extends Component implements D
1580
1529
  private getIndices;
1581
1530
  private cleanUp;
1582
1531
  }
1583
- export interface StreamedGeometries {
1584
- [id: number]: {
1585
- boundingBox: Float32Array;
1586
- hasHoles: boolean;
1587
- geometryFile?: string;
1588
- };
1589
- }
1590
- export interface StreamedAsset {
1591
- id: number;
1592
- geometries: {
1593
- geometryID: number;
1594
- transformation: number[];
1595
- color: number[];
1596
- }[];
1597
- }
1598
1532
  import * as WEBIFC from "web-ifc";
1599
1533
  import { Components, Disposable, Event, Component } from "../../../core";
1600
1534
  import { IfcStreamingSettings } from "./streaming-settings";
@@ -1636,6 +1570,82 @@ export declare class FragmentIfcStreamConverter extends Component implements Dis
1636
1570
  private streamAssets;
1637
1571
  private streamGeometries;
1638
1572
  }
1573
+ export interface StreamedGeometries {
1574
+ [id: number]: {
1575
+ boundingBox: Float32Array;
1576
+ hasHoles: boolean;
1577
+ geometryFile?: string;
1578
+ };
1579
+ }
1580
+ export interface StreamedAsset {
1581
+ id: number;
1582
+ geometries: {
1583
+ geometryID: number;
1584
+ transformation: number[];
1585
+ color: number[];
1586
+ }[];
1587
+ }
1588
+ import * as THREE from "three";
1589
+ import { Hideable, Disposable, Event, World } from "../../Types";
1590
+ import { Components } from "../../Components";
1591
+ /**
1592
+ * Each of the planes created by {@link SimpleClipper}.
1593
+ */
1594
+ export declare class SimplePlane implements Disposable, Hideable {
1595
+ /** Event that fires when the user starts dragging a clipping plane. */
1596
+ readonly onDraggingStarted: Event<unknown>;
1597
+ /** Event that fires when the user stops dragging a clipping plane. */
1598
+ readonly onDraggingEnded: Event<unknown>;
1599
+ /** {@link Disposable.onDisposed} */
1600
+ readonly onDisposed: Event<unknown>;
1601
+ readonly normal: THREE.Vector3;
1602
+ readonly origin: THREE.Vector3;
1603
+ readonly three: THREE.Plane;
1604
+ protected readonly _helper: THREE.Object3D;
1605
+ protected _visible: boolean;
1606
+ protected _enabled: boolean;
1607
+ components: Components;
1608
+ world: World;
1609
+ private _controlsActive;
1610
+ private readonly _arrowBoundBox;
1611
+ private readonly _planeMesh;
1612
+ private readonly _controls;
1613
+ private readonly _hiddenMaterial;
1614
+ get enabled(): boolean;
1615
+ /** {@link Component.enabled} */
1616
+ set enabled(state: boolean);
1617
+ /** {@link Hideable.visible } */
1618
+ get visible(): boolean;
1619
+ /** {@link Hideable.visible } */
1620
+ set visible(state: boolean);
1621
+ /** The meshes used for raycasting */
1622
+ get meshes(): THREE.Mesh[];
1623
+ /** The material of the clipping plane representation. */
1624
+ get planeMaterial(): THREE.Material | THREE.Material[];
1625
+ /** The material of the clipping plane representation. */
1626
+ set planeMaterial(material: THREE.Material | THREE.Material[]);
1627
+ /** The size of the clipping plane representation. */
1628
+ get size(): number;
1629
+ /** Sets the size of the clipping plane representation. */
1630
+ set size(size: number);
1631
+ get helper(): THREE.Object3D<THREE.Object3DEventMap>;
1632
+ constructor(components: Components, world: World, origin: THREE.Vector3, normal: THREE.Vector3, material: THREE.Material, size?: number, activateControls?: boolean);
1633
+ setFromNormalAndCoplanarPoint(normal: THREE.Vector3, point: THREE.Vector3): Promise<void>;
1634
+ /** {@link Updateable.update} */
1635
+ update: () => Promise<void>;
1636
+ /** {@link Disposable.dispose} */
1637
+ dispose(): void;
1638
+ private reset;
1639
+ protected toggleControls(state: boolean): void;
1640
+ private newTransformControls;
1641
+ private initializeControls;
1642
+ private createArrowBoundingBox;
1643
+ private changeDrag;
1644
+ private notifyDraggingChanged;
1645
+ private preventCameraMovement;
1646
+ private newHelper;
1647
+ private static newPlaneMesh;
1648
+ }
1639
1649
  import { NavigationMode } from "./types";
1640
1650
  /**
1641
1651
  * A {@link NavigationMode} that allows 3D navigation and panning
@@ -1652,22 +1662,6 @@ export declare class OrbitMode implements NavigationMode {
1652
1662
  set(active: boolean): void;
1653
1663
  private activateOrbitControls;
1654
1664
  }
1655
- import { NavigationMode } from "./types";
1656
- /**
1657
- * A {@link NavigationMode} that allows first person navigation,
1658
- * simulating FPS video games.
1659
- */
1660
- export declare class FirstPersonMode implements NavigationMode {
1661
- private camera;
1662
- /** {@link NavigationMode.enabled} */
1663
- enabled: boolean;
1664
- /** {@link NavigationMode.id} */
1665
- readonly id = "FirstPerson";
1666
- constructor(camera: any);
1667
- /** {@link NavigationMode.set} */
1668
- set(active: boolean): void;
1669
- private setupFirstPersonCamera;
1670
- }
1671
1665
  import * as THREE from "three";
1672
1666
  import { CameraProjection } from "./types";
1673
1667
  import { Event } from "../../../core";
@@ -1752,61 +1746,21 @@ export interface NavigationMode {
1752
1746
  /** Whether this navigation mode is active or not. */
1753
1747
  enabled: boolean;
1754
1748
  }
1755
- import * as WEBIFC from "web-ifc";
1756
- import * as THREE from "three";
1757
- export declare class Units {
1758
- factor: number;
1759
- complement: number;
1760
- apply(matrix: THREE.Matrix4): void;
1761
- setUp(webIfc: WEBIFC.IfcAPI): void;
1762
- private getLengthUnits;
1763
- private getScaleMatrix;
1764
- }
1765
- import * as WEBIFC from "web-ifc";
1766
- /** Configuration of the IFC-fragment conversion. */
1767
- export declare class IfcFragmentSettings {
1768
- /** Whether to extract the IFC properties into a JSON. */
1769
- includeProperties: boolean;
1770
- /**
1771
- * Generate the geometry for categories that are not included by default,
1772
- * like IFCSPACE.
1773
- */
1774
- optionalCategories: number[];
1775
- /** Whether to use the coordination data coming from the IFC files. */
1776
- coordinate: boolean;
1777
- /** Path of the WASM for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
1778
- wasm: {
1779
- path: string;
1780
- absolute: boolean;
1781
- logLevel?: WEBIFC.LogLevel;
1782
- };
1783
- /** List of categories that won't be converted to fragments. */
1784
- excludedCategories: Set<number>;
1785
- /** Whether to save the absolute location of all IFC items. */
1786
- saveLocations: boolean;
1787
- /** Loader settings for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
1788
- webIfc: WEBIFC.LoaderSettings;
1789
- autoSetWasm: boolean;
1790
- customLocateFileHandler: WEBIFC.LocateFileHandlerFn | null;
1791
- }
1792
- import * as THREE from "three";
1793
- import * as WEBIFC from "web-ifc";
1794
- import * as FRAGS from "bim-fragment";
1795
- export declare class CivilReader {
1796
- defLineMat: THREE.LineBasicMaterial;
1797
- read(webIfc: WEBIFC.IfcAPI): {
1798
- alignments: Map<number, FRAGS.Alignment>;
1799
- coordinationMatrix: THREE.Matrix4;
1800
- } | undefined;
1801
- get(civilItems: any): {
1802
- alignments: Map<number, FRAGS.Alignment>;
1803
- coordinationMatrix: THREE.Matrix4;
1804
- } | undefined;
1805
- private getCurves;
1806
- }
1807
- import * as WEBIFC from "web-ifc";
1808
- export declare class IfcMetadataReader {
1809
- get(webIfc: WEBIFC.IfcAPI, type: number): string;
1749
+ import { NavigationMode } from "./types";
1750
+ /**
1751
+ * A {@link NavigationMode} that allows first person navigation,
1752
+ * simulating FPS video games.
1753
+ */
1754
+ export declare class FirstPersonMode implements NavigationMode {
1755
+ private camera;
1756
+ /** {@link NavigationMode.enabled} */
1757
+ enabled: boolean;
1758
+ /** {@link NavigationMode.id} */
1759
+ readonly id = "FirstPerson";
1760
+ constructor(camera: any);
1761
+ /** {@link NavigationMode.set} */
1762
+ set(active: boolean): void;
1763
+ private setupFirstPersonCamera;
1810
1764
  }
1811
1765
  import { BufferGeometry } from "three";
1812
1766
  import * as THREE from "three";