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

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 (42) hide show
  1. package/dist/core/Clipper/index.d.ts +8 -12
  2. package/dist/core/Clipper/src/simple-plane.d.ts +2 -2
  3. package/dist/core/Grids/index.d.ts +1 -1
  4. package/dist/core/Grids/src/simple-grid.d.ts +1 -3
  5. package/dist/core/MiniMap/index.d.ts +3 -2
  6. package/dist/core/MiniMap/src/index.d.ts +1 -1
  7. package/dist/core/OrthoPerspectiveCamera/index.d.ts +5 -4
  8. package/dist/core/OrthoPerspectiveCamera/src/first-person-mode.d.ts +2 -1
  9. package/dist/core/OrthoPerspectiveCamera/src/orbit-mode.d.ts +3 -2
  10. package/dist/core/OrthoPerspectiveCamera/src/plan-mode.d.ts +2 -1
  11. package/dist/core/OrthoPerspectiveCamera/src/projections.d.ts +3 -3
  12. package/dist/core/Raycasters/src/simple-raycaster.d.ts +1 -1
  13. package/dist/core/Worlds/src/simple-camera.d.ts +1 -1
  14. package/dist/core/Worlds/src/simple-renderer.d.ts +1 -1
  15. package/dist/core/index.d.ts +0 -1
  16. package/dist/fragments/{BoundingBoxes → BoundingBoxer}/index.d.ts +1 -1
  17. package/dist/fragments/{FragmentClassifier → Classifier}/index.d.ts +1 -1
  18. package/dist/fragments/{FragmentExploder → Exploder}/index.d.ts +3 -5
  19. package/dist/fragments/{FragmentManager → FragmentsManager}/index.d.ts +1 -1
  20. package/dist/fragments/IfcGeometryTiler/src/streaming-settings.d.ts +1 -1
  21. package/dist/fragments/{FragmentIfcLoader → IfcLoader}/index.d.ts +1 -2
  22. package/dist/fragments/index.d.ts +6 -6
  23. package/dist/ifc/IfcJsonExporter/index.d.ts +6 -1
  24. package/dist/ifc/IfcPropertiesManager/index.d.ts +1 -2
  25. package/dist/ifc/index.d.ts +0 -1
  26. package/dist/index.cjs +5 -5
  27. package/dist/index.mjs +1791 -2051
  28. package/dist/measurement/Utils/index.d.ts +9 -5
  29. package/dist/namespace.d.ts +791 -899
  30. package/dist/utils/vertex-picker.d.ts +2 -5
  31. package/package.json +2 -3
  32. package/dist/core/Materials/index.d.ts +0 -49
  33. package/dist/ifc/IfcPropertiesFinder/index.d.ts +0 -37
  34. package/dist/ifc/IfcPropertiesFinder/src/types.d.ts +0 -23
  35. /package/dist/fragments/{FragmentHider → Hider}/index.d.ts +0 -0
  36. /package/dist/fragments/{FragmentIfcLoader → IfcLoader}/src/civil-reader.d.ts +0 -0
  37. /package/dist/fragments/{FragmentIfcLoader → IfcLoader}/src/ifc-fragment-settings.d.ts +0 -0
  38. /package/dist/fragments/{FragmentIfcLoader → IfcLoader}/src/ifc-metadata-reader.d.ts +0 -0
  39. /package/dist/fragments/{FragmentIfcLoader → IfcLoader}/src/index.d.ts +0 -0
  40. /package/dist/fragments/{FragmentIfcLoader → IfcLoader}/src/spatial-structure.d.ts +0 -0
  41. /package/dist/fragments/{FragmentIfcLoader → IfcLoader}/src/transform-helper.d.ts +0 -0
  42. /package/dist/fragments/{FragmentIfcLoader → IfcLoader}/src/units.d.ts +0 -0
@@ -42,19 +42,6 @@ export declare class Disposer extends Component {
42
42
  private disposeChildren;
43
43
  private static disposeMaterial;
44
44
  }
45
- import { Component, Disposable, World, Event } from "../Types";
46
- import { SimpleRaycaster } from "./src";
47
- import { Components } from "../Components";
48
- export declare class Raycasters extends Component implements Disposable {
49
- static readonly uuid: "d5d8bdf0-db25-4952-b951-b643af207ace";
50
- enabled: boolean;
51
- list: Map<string, SimpleRaycaster>;
52
- onDisposed: Event<unknown>;
53
- constructor(components: Components);
54
- get(world: World): SimpleRaycaster;
55
- delete(world: World): void;
56
- dispose(): void;
57
- }
58
45
  import { Component, Disposable, Event } from "../Types";
59
46
  /**
60
47
  * The entry point of the Components library.
@@ -108,15 +95,15 @@ export declare class Components implements Disposable {
108
95
  private static setupBVH;
109
96
  }
110
97
  import { Component, Disposable, World, Event } from "../Types";
111
- import { GridConfig, SimpleGrid } from "./src";
112
- export declare class Grids extends Component implements Disposable {
113
- static readonly uuid: "d1e814d5-b81c-4452-87a2-f039375e0489";
114
- list: Map<string, SimpleGrid>;
115
- onDisposed: Event<unknown>;
116
- config: Required<GridConfig>;
117
- /** {@link Component.enabled} */
98
+ import { SimpleRaycaster } from "./src";
99
+ import { Components } from "../Components";
100
+ export declare class Raycasters extends Component implements Disposable {
101
+ static readonly uuid: "d5d8bdf0-db25-4952-b951-b643af207ace";
118
102
  enabled: boolean;
119
- create(world: World): void;
103
+ list: Map<string, SimpleRaycaster>;
104
+ onDisposed: Event<unknown>;
105
+ constructor(components: Components);
106
+ get(world: World): SimpleRaycaster;
120
107
  delete(world: World): void;
121
108
  dispose(): void;
122
109
  }
@@ -145,15 +132,14 @@ import { Components } from "../Components";
145
132
  * [clipping planes](https://threejs.org/docs/#api/en/materials/Material.clippingPlanes).
146
133
  *
147
134
  * @param components - the instance of {@link Components} used.
148
- * @param planeType - the type of plane to be used by the clipper.
149
135
  * E.g. {@link SimplePlane}.
150
136
  */
151
- export declare class Clipper<T extends SimplePlane> extends Component implements Createable, Disposable, Hideable {
137
+ export declare class Clipper extends Component implements Createable, Disposable, Hideable {
152
138
  static readonly uuid: "66290bc5-18c4-4cd1-9379-2e17a0617611";
153
139
  /** {@link Createable.onAfterCreate} */
154
- readonly onAfterCreate: Event<T>;
140
+ readonly onAfterCreate: Event<SimplePlane>;
155
141
  /** {@link Createable.onAfterDelete} */
156
- readonly onAfterDelete: Event<T>;
142
+ readonly onAfterDelete: Event<SimplePlane>;
157
143
  /** Event that fires when the user starts dragging a clipping plane. */
158
144
  readonly onBeforeDrag: Event<void>;
159
145
  /** Event that fires when the user stops dragging a clipping plane. */
@@ -177,10 +163,10 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
177
163
  * has to be 'true' for this to apply.
178
164
  */
179
165
  toleranceOrthogonalY: number;
180
- list: T[];
181
- protected PlaneType: new (...args: any) => SimplePlane | T;
166
+ Type: new (...args: any) => SimplePlane;
167
+ list: SimplePlane[];
182
168
  /** The material used in all the clipping planes. */
183
- protected _material: THREE.MeshBasicMaterial;
169
+ private _material;
184
170
  private _size;
185
171
  private _enabled;
186
172
  private _visible;
@@ -201,8 +187,6 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
201
187
  /** The size of the geometric representation of the clippings planes. */
202
188
  set size(size: number);
203
189
  constructor(components: Components);
204
- endCreation(): void;
205
- cancelCreation(): void;
206
190
  /** {@link Disposable.dispose} */
207
191
  dispose(): void;
208
192
  /** {@link Createable.create} */
@@ -216,7 +200,7 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
216
200
  * @param point - the position of the clipping plane.
217
201
  * navigation.
218
202
  */
219
- createFromNormalAndCoplanarPoint(world: World, normal: THREE.Vector3, point: THREE.Vector3): T;
203
+ createFromNormalAndCoplanarPoint(world: World, normal: THREE.Vector3, point: THREE.Vector3): SimplePlane;
220
204
  /**
221
205
  * {@link Createable.delete}
222
206
  *
@@ -224,7 +208,7 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
224
208
  * @param plane - the plane to delete. If undefined, the first plane
225
209
  * found under the cursor will be deleted.
226
210
  */
227
- delete(world: World, plane?: T): void;
211
+ delete(world: World, plane?: SimplePlane): void;
228
212
  /** Deletes all the existing clipping planes. */
229
213
  deleteAll(): void;
230
214
  private deletePlane;
@@ -234,84 +218,13 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
234
218
  private getWorldNormal;
235
219
  private normalizePlaneDirectionY;
236
220
  private newPlane;
237
- protected newPlaneInstance(world: World, point: THREE.Vector3, normal: THREE.Vector3): T;
238
221
  private updateMaterialsAndPlanes;
239
222
  private _onStartDragging;
240
223
  private _onEndDragging;
241
224
  }
242
- import * as THREE from "three";
243
- import { Component, Disposable, Event } from "../Types";
244
- import { Components } from "../Components";
245
- /**
246
- * A tool to easily handle the materials of massive amounts of
247
- * objects and scene background easily.
248
- */
249
- export declare class Materials extends Component implements Disposable {
250
- static readonly uuid: "24989d27-fa2f-4797-8b08-35918f74e502";
251
- /** {@link Component.enabled} */
252
- enabled: boolean;
253
- /** {@link Disposable.onDisposed} */
254
- readonly onDisposed: Event<string>;
255
- list: {
256
- [id: string]: {
257
- material: THREE.Material;
258
- meshes: Set<THREE.Mesh | THREE.InstancedMesh>;
259
- };
260
- };
261
- private _originals;
262
- constructor(components: Components);
263
- /** {@link Disposable.dispose} */
264
- dispose(): void;
265
- /**
266
- * Turns the specified material styles on or off.
267
- *
268
- * @param active whether to turn it on or off.
269
- * @param ids the ids of the style to turn on or off.
270
- */
271
- set(active: boolean, ids?: string[]): void;
272
- /**
273
- * Creates a new material style.
274
- * @param id the identifier of the style to create.
275
- * @param material the material of the style.
276
- */
277
- addMaterial(id: string, material: THREE.Material): void;
278
- /**
279
- * Assign meshes to a certain style.
280
- * @param id the identifier of the style.
281
- * @param meshes the meshes to assign to the style.
282
- */
283
- addMeshes(id: string, meshes: THREE.Mesh[]): void;
284
- /**
285
- * Remove meshes from a certain style.
286
- * @param id the identifier of the style.
287
- * @param meshes the meshes to assign to the style.
288
- */
289
- removeMeshes(id: string, meshes: THREE.Mesh[]): void;
290
- }
291
- import { Components } from "../Components";
292
- import { MeshCullerRenderer, CullerRendererSettings } from "./src";
293
- import { Component, Event, Disposable, World } from "../Types";
294
- /**
295
- * A tool to handle big scenes efficiently by automatically hiding the objects
296
- * that are not visible to the camera.
297
- */
298
- export declare class Cullers extends Component implements Disposable {
299
- static readonly uuid: "69f2a50d-c266-44fc-b1bd-fa4d34be89e6";
300
- private _enabled;
301
- list: Map<string, MeshCullerRenderer>;
302
- /** {@link Disposable.onDisposed} */
303
- readonly onDisposed: Event<unknown>;
304
- /** {@link Component.enabled} */
305
- get enabled(): boolean;
306
- set enabled(value: boolean);
307
- constructor(components: Components);
308
- create(world: World, config?: Partial<CullerRendererSettings>): MeshCullerRenderer;
309
- delete(world: World): void;
310
- /** {@link Disposable.dispose} */
311
- dispose(): void;
312
- }
313
- import { Component, Components, Disposable, Updateable, World, Event } from "../../core";
314
225
  import { MiniMap } from "./src";
226
+ import { Component, Updateable, World, Event, Disposable } from "../Types";
227
+ import { Components } from "../Components";
315
228
  export declare class MiniMaps extends Component implements Updateable, Disposable {
316
229
  static readonly uuid: "39ad6aad-84c8-4adf-a1e0-7f25313a9e7f";
317
230
  readonly onAfterUpdate: Event<unknown>;
@@ -322,12 +235,12 @@ export declare class MiniMaps extends Component implements Updateable, Disposabl
322
235
  constructor(components: Components);
323
236
  create(world: World): MiniMap;
324
237
  delete(id: string): void;
325
- dispose(): void | Promise<void>;
238
+ dispose(): void;
326
239
  update(): void;
327
240
  }
328
241
  import * as THREE from "three";
329
- import { Components } from "../../core/Components";
330
- import { SimpleCamera } from "../../core";
242
+ import { Components } from "../Components";
243
+ import { SimpleCamera } from "..";
331
244
  import { NavigationMode, NavModeID, ProjectionManager } from "./src";
332
245
  /**
333
246
  * A flexible camera that uses
@@ -339,13 +252,14 @@ export declare class OrthoPerspectiveCamera extends SimpleCamera {
339
252
  /**
340
253
  * The current {@link NavigationMode}.
341
254
  */
342
- mode: NavigationMode;
255
+ _mode: NavigationMode | null;
343
256
  readonly projection: ProjectionManager;
344
257
  readonly threeOrtho: THREE.OrthographicCamera;
258
+ readonly threePersp: THREE.PerspectiveCamera;
345
259
  protected readonly _userInputButtons: any;
346
260
  protected readonly _frustumSize = 50;
347
261
  protected readonly _navigationModes: Map<NavModeID, NavigationMode>;
348
- get current(): THREE.PerspectiveCamera | THREE.OrthographicCamera;
262
+ get mode(): NavigationMode;
349
263
  constructor(components: Components);
350
264
  /** {@link Disposable.dispose} */
351
265
  dispose(): void;
@@ -374,12 +288,39 @@ export declare class OrthoPerspectiveCamera extends SimpleCamera {
374
288
  private newOrthoCamera;
375
289
  private setOrthoCameraAspect;
376
290
  }
291
+ import { Components } from "../Components";
292
+ import { MeshCullerRenderer, CullerRendererSettings } from "./src";
293
+ import { Component, Event, Disposable, World } from "../Types";
294
+ /**
295
+ * A tool to handle big scenes efficiently by automatically hiding the objects
296
+ * that are not visible to the camera.
297
+ */
298
+ export declare class Cullers extends Component implements Disposable {
299
+ static readonly uuid: "69f2a50d-c266-44fc-b1bd-fa4d34be89e6";
300
+ private _enabled;
301
+ list: Map<string, MeshCullerRenderer>;
302
+ /** {@link Disposable.onDisposed} */
303
+ readonly onDisposed: Event<unknown>;
304
+ /** {@link Component.enabled} */
305
+ get enabled(): boolean;
306
+ set enabled(value: boolean);
307
+ constructor(components: Components);
308
+ create(world: World, config?: Partial<CullerRendererSettings>): MeshCullerRenderer;
309
+ delete(world: World): void;
310
+ /** {@link Disposable.dispose} */
311
+ dispose(): void;
312
+ }
377
313
  import * as WEBIFC from "web-ifc";
378
314
  import * as FRAG from "@thatopen/fragments";
315
+ import { Component, Components } from "../../core";
379
316
  /**
380
317
  * Object to export all the properties from an IFC to a JS object.
381
318
  */
382
- export declare class IfcJsonExporter {
319
+ export declare class IfcJsonExporter extends Component {
320
+ static readonly uuid: "b32c4332-cd67-436e-ba7f-196646c7a635";
321
+ /** {@link Component.enabled} */
322
+ enabled: boolean;
323
+ constructor(components: Components);
383
324
  /**
384
325
  * Exports all the properties of an IFC into an array of JS objects.
385
326
  * @param webIfc The instance of [web-ifc]{@link https://github.com/ThatOpen/engine_web-ifc} to use.
@@ -390,42 +331,170 @@ export declare class IfcJsonExporter {
390
331
  */
391
332
  export(webIfc: WEBIFC.IfcAPI, modelID: number, indirect?: boolean, recursiveSpatial?: boolean): Promise<FRAG.IfcProperties>;
392
333
  }
393
- import * as FRAGS from "@thatopen/fragments";
334
+ import { Component, Disposable, World, Event } from "../Types";
335
+ import { GridConfig, SimpleGrid } from "./src";
336
+ export declare class Grids extends Component implements Disposable {
337
+ static readonly uuid: "d1e814d5-b81c-4452-87a2-f039375e0489";
338
+ list: Map<string, SimpleGrid>;
339
+ onDisposed: Event<unknown>;
340
+ config: Required<GridConfig>;
341
+ /** {@link Component.enabled} */
342
+ enabled: boolean;
343
+ create(world: World): SimpleGrid;
344
+ delete(world: World): void;
345
+ dispose(): void;
346
+ }
347
+ import * as WEBIFC from "web-ifc";
394
348
  import { FragmentsGroup } from "@thatopen/fragments";
395
- import { Disposable, Event, Component, Components } from "../../core";
396
- import { QueryGroup } from "./src/types";
397
- export interface QueryResult {
349
+ import { Component, Disposable, Event, Components } from "../../core";
350
+ type BooleanPropTypes = "IfcBoolean" | "IfcLogical";
351
+ type StringPropTypes = "IfcText" | "IfcLabel" | "IfcIdentifier";
352
+ type NumericPropTypes = "IfcInteger" | "IfcReal";
353
+ interface ChangeMap {
354
+ [modelID: string]: Set<number>;
355
+ }
356
+ interface AttributeListener {
398
357
  [modelID: string]: {
399
- modelEntities: Set<number>;
400
- otherEntities: Set<number>;
358
+ [expressID: number]: {
359
+ [attributeName: string]: Event<String | Boolean | Number>;
360
+ };
401
361
  };
402
362
  }
403
- export interface IndexedModels {
404
- [modelID: string]: {
405
- [expressID: number]: Set<number>;
363
+ export declare class IfcPropertiesManager extends Component implements Disposable {
364
+ static readonly uuid: "58c2d9f0-183c-48d6-a402-dfcf5b9a34df";
365
+ /** {@link Disposable.onDisposed} */
366
+ readonly onDisposed: Event<string>;
367
+ readonly onRequestFile: Event<unknown>;
368
+ ifcToExport: ArrayBuffer | null;
369
+ readonly onElementToPset: Event<{
370
+ model: FragmentsGroup;
371
+ psetID: number;
372
+ elementID: number;
373
+ }>;
374
+ readonly onPropToPset: Event<{
375
+ model: FragmentsGroup;
376
+ psetID: number;
377
+ propID: number;
378
+ }>;
379
+ readonly onPsetRemoved: Event<{
380
+ model: FragmentsGroup;
381
+ psetID: number;
382
+ }>;
383
+ readonly onDataChanged: Event<{
384
+ model: FragmentsGroup;
385
+ expressID: number;
386
+ }>;
387
+ wasm: {
388
+ path: string;
389
+ absolute: boolean;
390
+ };
391
+ enabled: boolean;
392
+ attributeListeners: AttributeListener;
393
+ selectedModel?: FragmentsGroup;
394
+ changeMap: ChangeMap;
395
+ constructor(components: Components);
396
+ dispose(): void;
397
+ private increaseMaxID;
398
+ static getIFCSchema(model: FragmentsGroup): import("@thatopen/fragments").IfcSchema;
399
+ private newGUID;
400
+ private getOwnerHistory;
401
+ private registerChange;
402
+ setData(model: FragmentsGroup, ...dataToSave: Record<string, any>[]): Promise<void>;
403
+ newPset(model: FragmentsGroup, name: string, description?: string): Promise<{
404
+ pset: WEBIFC.IFC2X3.IfcPropertySet | WEBIFC.IFC4.IfcPropertySet | WEBIFC.IFC4X3.IfcPropertySet;
405
+ rel: WEBIFC.IFC4X3.IfcRelDefinesByProperties | WEBIFC.IFC4.IfcRelDefinesByProperties | WEBIFC.IFC2X3.IfcRelDefinesByProperties;
406
+ }>;
407
+ removePset(model: FragmentsGroup, ...psetID: number[]): Promise<void>;
408
+ private newSingleProperty;
409
+ newSingleStringProperty(model: FragmentsGroup, type: StringPropTypes, name: string, value: string): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
410
+ newSingleNumericProperty(model: FragmentsGroup, type: NumericPropTypes, name: string, value: number): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
411
+ newSingleBooleanProperty(model: FragmentsGroup, type: BooleanPropTypes, name: string, value: boolean): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
412
+ removePsetProp(model: FragmentsGroup, psetID: number, propID: number): Promise<void>;
413
+ addElementToPset(model: FragmentsGroup, psetID: number, ...elementID: number[]): Promise<void>;
414
+ addPropToPset(model: FragmentsGroup, psetID: number, ...propID: number[]): Promise<void>;
415
+ saveToIfc(model: FragmentsGroup, ifcToSaveOn: Uint8Array): Promise<Uint8Array>;
416
+ setAttributeListener(model: FragmentsGroup, expressID: number, attributeName: string): Promise<Event<String | Number | Boolean>>;
417
+ }
418
+ export {};
419
+ import * as THREE from "three";
420
+ import { Component, Components } from "../../core";
421
+ export interface MeasureEdge {
422
+ distance: number;
423
+ points: THREE.Vector3[];
424
+ }
425
+ export declare class MeasurementUtils extends Component {
426
+ enabled: boolean;
427
+ static uuid: string;
428
+ constructor(components: Components);
429
+ getFace(mesh: THREE.InstancedMesh | THREE.Mesh, triangleIndex: number, instance?: number): {
430
+ edges: MeasureEdge[];
431
+ indices: Set<number>;
432
+ } | null;
433
+ static distanceFromPointToLine(point: THREE.Vector3, lineStart: THREE.Vector3, lineEnd: THREE.Vector3, clamp?: boolean): number;
434
+ private getFaceData;
435
+ getVerticesAndNormal(mesh: THREE.Mesh | THREE.InstancedMesh, faceIndex: number, instance: number | undefined): {
436
+ p1: THREE.Vector3;
437
+ p2: THREE.Vector3;
438
+ p3: THREE.Vector3;
439
+ faceNormal: THREE.Vector3;
406
440
  };
441
+ private round;
407
442
  }
408
- export declare class IfcPropertiesFinder extends Component implements Disposable {
409
- readonly onFound: Event<FRAGS.FragmentIdMap>;
443
+ import { Component, Disposable, Event, Components } from "../../core";
444
+ export declare class Exploder extends Component implements Disposable {
445
+ static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
446
+ enabled: boolean;
447
+ height: number;
448
+ groupName: string;
410
449
  /** {@link Disposable.onDisposed} */
411
450
  readonly onDisposed: Event<unknown>;
451
+ list: Set<string>;
452
+ constructor(components: Components);
453
+ dispose(): void;
454
+ set(active: boolean): void;
455
+ }
456
+ import * as THREE from "three";
457
+ export declare function obbFromPoints(vertices: ArrayLike<number>): {
458
+ center: THREE.Vector3;
459
+ halfSizes: THREE.Vector3;
460
+ rotation: THREE.Matrix3;
461
+ transformation: THREE.Matrix4;
462
+ };
463
+ import * as THREE from "three";
464
+ import * as FRAGS from "@thatopen/fragments";
465
+ import { FragmentsGroup } from "@thatopen/fragments";
466
+ import { Component, Components, Disposable, Event } from "../../core";
467
+ /**
468
+ * A simple implementation of bounding box that works for fragments. The resulting bbox is not 100% precise, but
469
+ * it's fast, and should suffice for general use cases such as camera zooming or general boundary determination.
470
+ */
471
+ export declare class BoundingBoxer extends Component implements Disposable {
472
+ static readonly uuid: "d1444724-dba6-4cdd-a0c7-68ee1450d166";
473
+ /** {@link Component.enabled} */
412
474
  enabled: boolean;
413
- indexedModels: IndexedModels;
414
- private readonly _conditionFunctions;
415
- private _noHandleAttributes;
475
+ /** {@link Disposable.onDisposed} */
476
+ readonly onDisposed: Event<unknown>;
477
+ private _absoluteMin;
478
+ private _absoluteMax;
479
+ private _meshes;
416
480
  constructor(components: Components);
417
- private onFragmentsDisposed;
481
+ static getDimensions(bbox: THREE.Box3): {
482
+ width: number;
483
+ height: number;
484
+ depth: number;
485
+ center: THREE.Vector3;
486
+ };
487
+ static newBound(positive: boolean): THREE.Vector3;
488
+ static getBounds(points: THREE.Vector3[], min?: THREE.Vector3, max?: THREE.Vector3): THREE.Box3;
489
+ /** {@link Disposable.dispose} */
418
490
  dispose(): void;
419
- private indexEntityRelations;
420
- find(groups: QueryGroup[], queryModels?: FragmentsGroup[]): Promise<FRAGS.FragmentIdMap>;
421
- private toFragmentMap;
422
- private simpleQuery;
423
- private getMatchingEntities;
424
- private combineArrays;
425
- private getCommonElements;
426
- private arrayIntersection;
427
- private arrayUnion;
428
- private getConditionFunctions;
491
+ get(): THREE.Box3;
492
+ getSphere(): THREE.Sphere;
493
+ getMesh(): THREE.Mesh<THREE.BoxGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
494
+ reset(): void;
495
+ add(group: FragmentsGroup): void;
496
+ addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh, itemIDs?: Iterable<number>): void;
497
+ private static getFragmentBounds;
429
498
  }
430
499
  import * as WEBIFC from "web-ifc";
431
500
  import { FragmentsGroup } from "@thatopen/fragments";
@@ -559,199 +628,6 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
559
628
  dispose(): void;
560
629
  }
561
630
  export type { InverseAttribute } from "./src/types";
562
- import * as WEBIFC from "web-ifc";
563
- import { FragmentsGroup } from "@thatopen/fragments";
564
- import { Component, Disposable, Event, Components } from "../../core";
565
- type BooleanPropTypes = "IfcBoolean" | "IfcLogical";
566
- type StringPropTypes = "IfcText" | "IfcLabel" | "IfcIdentifier";
567
- type NumericPropTypes = "IfcInteger" | "IfcReal";
568
- interface ChangeMap {
569
- [modelID: string]: Set<number>;
570
- }
571
- interface AttributeListener {
572
- [modelID: string]: {
573
- [expressID: number]: {
574
- [attributeName: string]: Event<String | Boolean | Number>;
575
- };
576
- };
577
- }
578
- export declare class IfcPropertiesManager extends Component implements Disposable {
579
- static readonly uuid: "58c2d9f0-183c-48d6-a402-dfcf5b9a34df";
580
- /** {@link Disposable.onDisposed} */
581
- readonly onDisposed: Event<string>;
582
- readonly onRequestFile: Event<unknown>;
583
- ifcToExport: ArrayBuffer | null;
584
- readonly onElementToPset: Event<{
585
- model: FragmentsGroup;
586
- psetID: number;
587
- elementID: number;
588
- }>;
589
- readonly onPropToPset: Event<{
590
- model: FragmentsGroup;
591
- psetID: number;
592
- propID: number;
593
- }>;
594
- readonly onPsetRemoved: Event<{
595
- model: FragmentsGroup;
596
- psetID: number;
597
- }>;
598
- readonly onDataChanged: Event<{
599
- model: FragmentsGroup;
600
- expressID: number;
601
- }>;
602
- wasm: {
603
- path: string;
604
- absolute: boolean;
605
- };
606
- enabled: boolean;
607
- attributeListeners: AttributeListener;
608
- selectedModel?: FragmentsGroup;
609
- private _changeMap;
610
- constructor(components: Components);
611
- get(): ChangeMap;
612
- dispose(): void;
613
- private increaseMaxID;
614
- static getIFCSchema(model: FragmentsGroup): import("@thatopen/fragments").IfcSchema;
615
- private newGUID;
616
- private getOwnerHistory;
617
- private registerChange;
618
- setData(model: FragmentsGroup, ...dataToSave: Record<string, any>[]): Promise<void>;
619
- newPset(model: FragmentsGroup, name: string, description?: string): Promise<{
620
- pset: WEBIFC.IFC2X3.IfcPropertySet | WEBIFC.IFC4.IfcPropertySet | WEBIFC.IFC4X3.IfcPropertySet;
621
- rel: WEBIFC.IFC4X3.IfcRelDefinesByProperties | WEBIFC.IFC4.IfcRelDefinesByProperties | WEBIFC.IFC2X3.IfcRelDefinesByProperties;
622
- }>;
623
- removePset(model: FragmentsGroup, ...psetID: number[]): Promise<void>;
624
- private newSingleProperty;
625
- newSingleStringProperty(model: FragmentsGroup, type: StringPropTypes, name: string, value: string): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
626
- newSingleNumericProperty(model: FragmentsGroup, type: NumericPropTypes, name: string, value: number): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
627
- newSingleBooleanProperty(model: FragmentsGroup, type: BooleanPropTypes, name: string, value: boolean): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
628
- removePsetProp(model: FragmentsGroup, psetID: number, propID: number): Promise<void>;
629
- addElementToPset(model: FragmentsGroup, psetID: number, ...elementID: number[]): Promise<void>;
630
- addPropToPset(model: FragmentsGroup, psetID: number, ...propID: number[]): Promise<void>;
631
- saveToIfc(model: FragmentsGroup, ifcToSaveOn: Uint8Array): Promise<Uint8Array>;
632
- setAttributeListener(model: FragmentsGroup, expressID: number, attributeName: string): Promise<Event<String | Number | Boolean>>;
633
- }
634
- export {};
635
- import * as THREE from "three";
636
- export interface MeasureEdge {
637
- distance: number;
638
- points: THREE.Vector3[];
639
- }
640
- export declare class MeasurementUtils {
641
- static getFace(mesh: THREE.InstancedMesh | THREE.Mesh, triangleIndex: number, instance?: number): {
642
- edges: MeasureEdge[];
643
- indices: Set<number>;
644
- } | null;
645
- static distanceFromPointToLine(point: THREE.Vector3, lineStart: THREE.Vector3, lineEnd: THREE.Vector3, clamp?: boolean): number;
646
- private static getFaceData;
647
- static getVerticesAndNormal(mesh: THREE.Mesh | THREE.InstancedMesh, faceIndex: number, instance: number | undefined): {
648
- p1: THREE.Vector3;
649
- p2: THREE.Vector3;
650
- p3: THREE.Vector3;
651
- faceNormal: THREE.Vector3;
652
- };
653
- private static round;
654
- }
655
- import * as THREE from "three";
656
- import * as FRAGS from "@thatopen/fragments";
657
- import { FragmentsGroup } from "@thatopen/fragments";
658
- import { Component, Components, Disposable, Event } from "../../core";
659
- /**
660
- * A simple implementation of bounding box that works for fragments. The resulting bbox is not 100% precise, but
661
- * it's fast, and should suffice for general use cases such as camera zooming or general boundary determination.
662
- */
663
- export declare class BoundingBoxes extends Component implements Disposable {
664
- static readonly uuid: "d1444724-dba6-4cdd-a0c7-68ee1450d166";
665
- /** {@link Component.enabled} */
666
- enabled: boolean;
667
- /** {@link Disposable.onDisposed} */
668
- readonly onDisposed: Event<unknown>;
669
- private _absoluteMin;
670
- private _absoluteMax;
671
- private _meshes;
672
- constructor(components: Components);
673
- static getDimensions(bbox: THREE.Box3): {
674
- width: number;
675
- height: number;
676
- depth: number;
677
- center: THREE.Vector3;
678
- };
679
- static newBound(positive: boolean): THREE.Vector3;
680
- static getBounds(points: THREE.Vector3[], min?: THREE.Vector3, max?: THREE.Vector3): THREE.Box3;
681
- /** {@link Disposable.dispose} */
682
- dispose(): void;
683
- get(): THREE.Box3;
684
- getSphere(): THREE.Sphere;
685
- getMesh(): THREE.Mesh<THREE.BoxGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
686
- reset(): void;
687
- add(group: FragmentsGroup): void;
688
- addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh, itemIDs?: Iterable<number>): void;
689
- private static getFragmentBounds;
690
- }
691
- import { Component, Disposable, Event, Components } from "../../core";
692
- export declare class FragmentExploder extends Component implements Disposable {
693
- static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
694
- enabled: boolean;
695
- height: number;
696
- groupName: string;
697
- /** {@link Disposable.onDisposed} */
698
- readonly onDisposed: Event<string>;
699
- list: Set<string>;
700
- constructor(components: Components);
701
- dispose(): void;
702
- explode(): void;
703
- reset(): void;
704
- update(): void;
705
- }
706
- export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
707
- import * as THREE from "three";
708
- export declare function obbFromPoints(vertices: ArrayLike<number>): {
709
- center: THREE.Vector3;
710
- halfSizes: THREE.Vector3;
711
- rotation: THREE.Matrix3;
712
- transformation: THREE.Matrix4;
713
- };
714
- import * as THREE from "three";
715
- export declare class MaterialsUtils {
716
- static isTransparent(material: THREE.Material): boolean;
717
- }
718
- import * as THREE from "three";
719
- import { Component, Components, Event, World, Disposable } from "../core";
720
- export interface VertexPickerConfig {
721
- showOnlyVertex: boolean;
722
- snapDistance: number;
723
- previewElement: HTMLElement;
724
- }
725
- export declare class VertexPicker extends Component implements Disposable {
726
- onVertexFound: Event<THREE.Vector3>;
727
- onVertexLost: Event<THREE.Vector3>;
728
- components: Components;
729
- private _pickedPoint;
730
- private _config;
731
- private _enabled;
732
- private _workingPlane;
733
- /** {@link Disposable.onDisposed} */
734
- readonly onDisposed: Event<unknown>;
735
- set enabled(value: boolean);
736
- get enabled(): boolean;
737
- constructor(components: Components, config?: Partial<VertexPickerConfig>);
738
- [Symbol.dispose](): void;
739
- set workingPlane(plane: THREE.Plane | null);
740
- get workingPlane(): THREE.Plane | null;
741
- set config(value: Partial<VertexPickerConfig>);
742
- get config(): Partial<VertexPickerConfig>;
743
- dispose(): void;
744
- get(world: World): THREE.Vector3 | null;
745
- private getClosestVertex;
746
- private getVertices;
747
- private getVertex;
748
- }
749
- export declare class UUID {
750
- private static _pattern;
751
- private static _lut;
752
- static create(): string;
753
- static validate(uuid: string): void;
754
- }
755
631
  import * as THREE from "three";
756
632
  import * as FRAGS from "@thatopen/fragments";
757
633
  import { Disposable, Component, Event, Components } from "../../core";
@@ -760,7 +636,7 @@ export interface Classification {
760
636
  [className: string]: FRAGS.FragmentIdMap;
761
637
  };
762
638
  }
763
- export declare class FragmentClassifier extends Component implements Disposable {
639
+ export declare class Classifier extends Component implements Disposable {
764
640
  static readonly uuid: "e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7";
765
641
  /** {@link Component.enabled} */
766
642
  enabled: boolean;
@@ -783,48 +659,7 @@ export declare class FragmentClassifier extends Component implements Disposable
783
659
  resetColor(items: FRAGS.FragmentIdMap): void;
784
660
  private saveItem;
785
661
  }
786
- import * as FRAGS from "@thatopen/fragments";
787
- import { Components, Component } from "../../core";
788
- export declare class FragmentHider extends Component {
789
- static readonly uuid: "dd9ccf2d-8a21-4821-b7f6-2949add16a29";
790
- enabled: boolean;
791
- constructor(components: Components);
792
- set(visible: boolean, items?: FRAGS.FragmentIdMap): void;
793
- isolate(items: FRAGS.FragmentIdMap): void;
794
- private updateCulledVisibility;
795
- }
796
- import * as WEBIFC from "web-ifc";
797
- import * as FRAGS from "@thatopen/fragments";
798
- import { IfcFragmentSettings } from "./src";
799
- import { Component, Components, Event, Disposable } from "../../core";
800
- export declare class FragmentIfcLoader extends Component implements Disposable {
801
- static readonly uuid: "a659add7-1418-4771-a0d6-7d4d438e4624";
802
- readonly onIfcStartedLoading: Event<void>;
803
- readonly onSetup: Event<void>;
804
- /** {@link Disposable.onDisposed} */
805
- readonly onDisposed: Event<string>;
806
- settings: IfcFragmentSettings;
807
- enabled: boolean;
808
- webIfc: WEBIFC.IfcAPI;
809
- private _material;
810
- private _spatialTree;
811
- private _metaData;
812
- private _fragmentInstances;
813
- private _civil;
814
- private _propertyExporter;
815
- private _visitedFragments;
816
- private _materialT;
817
- constructor(components: Components);
818
- dispose(): void;
819
- setup(config?: Partial<IfcFragmentSettings>): Promise<void>;
820
- load(data: Uint8Array, coordinate?: boolean): Promise<FRAGS.FragmentsGroup>;
821
- readIfcFile(data: Uint8Array): Promise<number>;
822
- private getAllGeometries;
823
- cleanUp(): void;
824
- private getMesh;
825
- private getGeometry;
826
- private autoSetWasm;
827
- }
662
+ export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
828
663
  import { Fragment, FragmentsGroup } from "@thatopen/fragments";
829
664
  import * as THREE from "three";
830
665
  import * as FRAGS from "@thatopen/fragments";
@@ -834,7 +669,7 @@ import { RelationsMap } from "../../ifc/IfcRelationsIndexer/src/types";
834
669
  * Object that can efficiently load binary files that contain
835
670
  * [fragment geometry](https://github.com/ThatOpen/engine_fragment).
836
671
  */
837
- export declare class FragmentManager extends Component implements Disposable {
672
+ export declare class FragmentsManager extends Component implements Disposable {
838
673
  static readonly uuid: "fef46874-46a3-461b-8c44-2922ab77c806";
839
674
  /** {@link Disposable.onDisposed} */
840
675
  readonly onDisposed: Event<unknown>;
@@ -877,24 +712,70 @@ export declare class FragmentManager extends Component implements Disposable {
877
712
  export(group: FragmentsGroup): Uint8Array;
878
713
  coordinate(models?: FragmentsGroup[]): void;
879
714
  }
715
+ import * as FRAGS from "@thatopen/fragments";
716
+ import { Components, Component } from "../../core";
717
+ export declare class FragmentHider extends Component {
718
+ static readonly uuid: "dd9ccf2d-8a21-4821-b7f6-2949add16a29";
719
+ enabled: boolean;
720
+ constructor(components: Components);
721
+ set(visible: boolean, items?: FRAGS.FragmentIdMap): void;
722
+ isolate(items: FRAGS.FragmentIdMap): void;
723
+ private updateCulledVisibility;
724
+ }
725
+ import * as THREE from "three";
726
+ export declare class MaterialsUtils {
727
+ static isTransparent(material: THREE.Material): boolean;
728
+ }
880
729
  import * as WEBIFC from "web-ifc";
881
- import { Components, Disposable, Event, Component } from "../../core";
882
- import { IfcStreamingSettings, StreamedGeometries, StreamedAsset } from "./src";
883
- export declare class IfcGeometryTiler extends Component implements Disposable {
884
- static readonly uuid: "d9999a00-e1f5-4d3f-8cfe-c56e08609764";
885
- onGeometryStreamed: Event<{
886
- buffer: Uint8Array;
887
- data: StreamedGeometries;
730
+ import { AsyncEvent, Component, Disposable, Event } from "../../core";
731
+ import { PropertiesStreamingSettings } from "../IfcGeometryTiler";
732
+ export declare class IfcPropertiesTiler extends Component implements Disposable {
733
+ static readonly uuid: "88d2c89c-ce32-47d7-8cb6-d51e4b311a0b";
734
+ onPropertiesStreamed: AsyncEvent<{
735
+ type: number;
736
+ data: {
737
+ [id: number]: any;
738
+ };
888
739
  }>;
889
- onAssetStreamed: Event<StreamedAsset[]>;
890
- onProgress: Event<number>;
891
- onIfcLoaded: Event<Uint8Array>;
740
+ onProgress: AsyncEvent<number>;
741
+ onIndicesStreamed: AsyncEvent<Map<number, Map<number, number[]>>>;
892
742
  /** {@link Disposable.onDisposed} */
893
- readonly onDisposed: Event<unknown>;
894
- settings: IfcStreamingSettings;
743
+ readonly onDisposed: Event<string>;
895
744
  enabled: boolean;
745
+ settings: PropertiesStreamingSettings;
896
746
  webIfc: WEBIFC.IfcAPI;
897
- private _spatialTree;
747
+ dispose(): Promise<void>;
748
+ streamFromBuffer(data: Uint8Array): Promise<void>;
749
+ streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
750
+ private readIfcFile;
751
+ private streamIfcFile;
752
+ private streamAllProperties;
753
+ private cleanUp;
754
+ }
755
+ export declare class UUID {
756
+ private static _pattern;
757
+ private static _lut;
758
+ static create(): string;
759
+ static validate(uuid: string): void;
760
+ }
761
+ import * as WEBIFC from "web-ifc";
762
+ import { Components, Disposable, Event, Component } from "../../core";
763
+ import { IfcStreamingSettings, StreamedGeometries, StreamedAsset } from "./src";
764
+ export declare class IfcGeometryTiler extends Component implements Disposable {
765
+ static readonly uuid: "d9999a00-e1f5-4d3f-8cfe-c56e08609764";
766
+ onGeometryStreamed: Event<{
767
+ buffer: Uint8Array;
768
+ data: StreamedGeometries;
769
+ }>;
770
+ onAssetStreamed: Event<StreamedAsset[]>;
771
+ onProgress: Event<number>;
772
+ onIfcLoaded: Event<Uint8Array>;
773
+ /** {@link Disposable.onDisposed} */
774
+ readonly onDisposed: Event<unknown>;
775
+ settings: IfcStreamingSettings;
776
+ enabled: boolean;
777
+ webIfc: WEBIFC.IfcAPI;
778
+ private _spatialTree;
898
779
  private _metaData;
899
780
  private _visitedGeometries;
900
781
  private _streamSerializer;
@@ -918,31 +799,67 @@ export declare class IfcGeometryTiler extends Component implements Disposable {
918
799
  private streamGeometries;
919
800
  }
920
801
  import * as WEBIFC from "web-ifc";
921
- import { AsyncEvent, Component, Disposable, Event } from "../../core";
922
- import { PropertiesStreamingSettings } from "../IfcGeometryTiler";
923
- export declare class IfcPropertiesTiler extends Component implements Disposable {
924
- static readonly uuid: "88d2c89c-ce32-47d7-8cb6-d51e4b311a0b";
925
- onPropertiesStreamed: AsyncEvent<{
926
- type: number;
927
- data: {
928
- [id: number]: any;
929
- };
930
- }>;
931
- onProgress: AsyncEvent<number>;
932
- onIndicesStreamed: AsyncEvent<Map<number, Map<number, number[]>>>;
802
+ import * as FRAGS from "@thatopen/fragments";
803
+ import { IfcFragmentSettings } from "./src";
804
+ import { Component, Components, Event, Disposable } from "../../core";
805
+ export declare class IfcLoader extends Component implements Disposable {
806
+ static readonly uuid: "a659add7-1418-4771-a0d6-7d4d438e4624";
807
+ readonly onIfcStartedLoading: Event<void>;
808
+ readonly onSetup: Event<void>;
933
809
  /** {@link Disposable.onDisposed} */
934
810
  readonly onDisposed: Event<string>;
811
+ settings: IfcFragmentSettings;
935
812
  enabled: boolean;
936
- settings: PropertiesStreamingSettings;
937
813
  webIfc: WEBIFC.IfcAPI;
938
- dispose(): Promise<void>;
939
- streamFromBuffer(data: Uint8Array): Promise<void>;
940
- streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
941
- private readIfcFile;
942
- private streamIfcFile;
943
- private streamAllProperties;
944
- private cleanUp;
814
+ private _material;
815
+ private _spatialTree;
816
+ private _metaData;
817
+ private _fragmentInstances;
818
+ private _civil;
819
+ private _visitedFragments;
820
+ private _materialT;
821
+ constructor(components: Components);
822
+ dispose(): void;
823
+ setup(config?: Partial<IfcFragmentSettings>): Promise<void>;
824
+ load(data: Uint8Array, coordinate?: boolean): Promise<FRAGS.FragmentsGroup>;
825
+ readIfcFile(data: Uint8Array): Promise<number>;
826
+ private getAllGeometries;
827
+ cleanUp(): void;
828
+ private getMesh;
829
+ private getGeometry;
830
+ private autoSetWasm;
831
+ }
832
+ import * as THREE from "three";
833
+ import { Component, Components, Event, World } from "../core";
834
+ export interface VertexPickerConfig {
835
+ showOnlyVertex: boolean;
836
+ snapDistance: number;
837
+ previewElement: HTMLElement;
838
+ }
839
+ export declare class VertexPicker extends Component {
840
+ onVertexFound: Event<THREE.Vector3>;
841
+ onVertexLost: Event<THREE.Vector3>;
842
+ components: Components;
843
+ private _pickedPoint;
844
+ private _config;
845
+ private _enabled;
846
+ private _workingPlane;
847
+ set enabled(value: boolean);
848
+ get enabled(): boolean;
849
+ constructor(components: Components, config?: Partial<VertexPickerConfig>);
850
+ set workingPlane(plane: THREE.Plane | null);
851
+ get workingPlane(): THREE.Plane | null;
852
+ set config(value: Partial<VertexPickerConfig>);
853
+ get config(): Partial<VertexPickerConfig>;
854
+ dispose(): void;
855
+ get(world: World): THREE.Vector3 | null;
856
+ private getClosestVertex;
857
+ private getVertices;
858
+ private getVertex;
945
859
  }
860
+ export declare const IfcElements: {
861
+ [key: number]: string;
862
+ };
946
863
  import * as WEBIFC from "web-ifc";
947
864
  export interface IfcItemsCategories {
948
865
  [itemID: number]: number;
@@ -950,7 +867,7 @@ export interface IfcItemsCategories {
950
867
  export declare class IfcCategories {
951
868
  getAll(webIfc: WEBIFC.IfcAPI, modelID: number): IfcItemsCategories;
952
869
  }
953
- export declare const IfcElements: {
870
+ export declare const IfcCategoryMap: {
954
871
  [key: number]: string;
955
872
  };
956
873
  import * as FRAGS from "@thatopen/fragments";
@@ -978,11 +895,9 @@ export declare class IfcPropertiesUtils {
978
895
  static attributeExists(model: FRAGS.FragmentsGroup, expressID: number, attribute: string): Promise<boolean>;
979
896
  static groupEntitiesByType(model: FRAGS.FragmentsGroup, expressIDs: Set<number> | number[]): Promise<Map<number, Set<number>>>;
980
897
  }
981
- export declare const IfcCategoryMap: {
982
- [key: number]: string;
983
- };
898
+ export declare const GeometryTypes: Set<number>;
984
899
  import * as THREE from "three";
985
- import { Event, Resizeable, Updateable, Disposable, World } from "../../../core";
900
+ import { Resizeable, Updateable, World, Event, Disposable } from "../../Types";
986
901
  export declare class MiniMap implements Resizeable, Updateable, Disposable {
987
902
  /** {@link Disposable.onDisposed} */
988
903
  readonly onDisposed: Event<unknown>;
@@ -1015,7 +930,57 @@ export declare class MiniMap implements Resizeable, Updateable, Disposable {
1015
930
  resize(size?: THREE.Vector2): void;
1016
931
  private updatePlanes;
1017
932
  }
1018
- export declare const GeometryTypes: Set<number>;
933
+ /// <reference types="node" />
934
+ import * as THREE from "three";
935
+ import { Hideable, Event, World } from "../../Types";
936
+ import { Components } from "../../Components";
937
+ export interface GridConfig {
938
+ color: THREE.Color;
939
+ size1: number;
940
+ size2: number;
941
+ distance: number;
942
+ }
943
+ /**
944
+ * An infinite grid. Created by
945
+ * [fyrestar](https://github.com/Fyrestar/THREE.InfiniteGridHelper)
946
+ * and translated to typescript by
947
+ * [dkaraush](https://github.com/dkaraush/THREE.InfiniteGridHelper/blob/master/InfiniteGridHelper.ts).
948
+ */
949
+ export declare class SimpleGrid implements Hideable, Disposable {
950
+ /** {@link Disposable.onDisposed} */
951
+ readonly onDisposed: Event<unknown>;
952
+ world: World;
953
+ components: Components;
954
+ /** {@link Hideable.visible} */
955
+ get visible(): boolean;
956
+ /** {@link Hideable.visible} */
957
+ set visible(visible: boolean);
958
+ /** The material of the grid. */
959
+ get material(): THREE.ShaderMaterial;
960
+ /**
961
+ * Whether the grid should fade away with distance. Recommended to be true for
962
+ * perspective cameras and false for orthographic cameras.
963
+ */
964
+ get fade(): boolean;
965
+ /**
966
+ * Whether the grid should fade away with distance. Recommended to be true for
967
+ * perspective cameras and false for orthographic cameras.
968
+ */
969
+ set fade(active: boolean);
970
+ readonly three: THREE.Mesh;
971
+ private _fade;
972
+ constructor(components: Components, world: World, config: GridConfig);
973
+ [Symbol.dispose](): void;
974
+ /** {@link Disposable.dispose} */
975
+ dispose(): void;
976
+ private setupEvents;
977
+ private updateZoom;
978
+ }
979
+ import { InverseAttribute } from "./types";
980
+ export declare const relToAttributesMap: Map<number, {
981
+ forRelating: InverseAttribute;
982
+ forRelated: InverseAttribute;
983
+ }>;
1019
984
  import * as THREE from "three";
1020
985
  import { Event, Base, World, BaseScene, BaseCamera, BaseRenderer } from "../../Types";
1021
986
  import { Components } from "../../Components";
@@ -1042,19 +1007,6 @@ export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends Base
1042
1007
  update(delta?: number): void;
1043
1008
  dispose(disposeResources?: boolean): void;
1044
1009
  }
1045
- import { InverseAttribute } from "./types";
1046
- export declare const relToAttributesMap: Map<number, {
1047
- forRelating: InverseAttribute;
1048
- forRelated: InverseAttribute;
1049
- }>;
1050
- import * as WEBIFC from "web-ifc";
1051
- import { IfcItemsCategories } from "../../../ifc";
1052
- export declare class SpatialStructure {
1053
- itemsByFloor: IfcItemsCategories;
1054
- private _units;
1055
- setUp(webIfc: WEBIFC.IfcAPI): void;
1056
- cleanUp(): void;
1057
- }
1058
1010
  import * as THREE from "three";
1059
1011
  import { BaseScene, Configurable, Event } from "../../Types";
1060
1012
  import { Components } from "../../Components";
@@ -1085,6 +1037,14 @@ export declare class SimpleScene extends BaseScene implements Configurable<{}> {
1085
1037
  /** Creates a simple and nice default set up for the scene (e.g. lighting). */
1086
1038
  setup(config?: Partial<SimpleSceneConfig>): void;
1087
1039
  }
1040
+ import * as WEBIFC from "web-ifc";
1041
+ import { IfcItemsCategories } from "../../../ifc";
1042
+ export declare class SpatialStructure {
1043
+ itemsByFloor: IfcItemsCategories;
1044
+ private _units;
1045
+ setUp(webIfc: WEBIFC.IfcAPI): void;
1046
+ cleanUp(): void;
1047
+ }
1088
1048
  import * as THREE from "three";
1089
1049
  import { BaseRenderer, Event } from "../../Types";
1090
1050
  import { Components } from "../../Components";
@@ -1100,7 +1060,7 @@ export declare class SimpleRenderer extends BaseRenderer {
1100
1060
  protected _canvas: HTMLCanvasElement;
1101
1061
  protected _parameters?: Partial<THREE.WebGLRendererParameters>;
1102
1062
  protected _resizeObserver: ResizeObserver | null;
1103
- protected onContainerUpdated: Event<HTMLElement>;
1063
+ protected onContainerUpdated: Event<unknown>;
1104
1064
  constructor(components: Components, container: HTMLElement, parameters?: Partial<THREE.WebGLRendererParameters>);
1105
1065
  /** {@link Updateable.update} */
1106
1066
  update(): void;
@@ -1117,6 +1077,68 @@ export declare class SimpleRenderer extends BaseRenderer {
1117
1077
  private onContextBack;
1118
1078
  }
1119
1079
  import * as THREE from "three";
1080
+ import { Disposable, Event } from "../../Types";
1081
+ /**
1082
+ * A helper to easily get the real position of the mouse in the Three.js canvas
1083
+ * to work with tools like the
1084
+ * [raycaster](https://threejs.org/docs/#api/en/core/Raycaster), even if it has
1085
+ * been transformed through CSS or doesn't occupy the whole screen.
1086
+ */
1087
+ export declare class Mouse implements Disposable {
1088
+ dom: HTMLCanvasElement;
1089
+ private _event?;
1090
+ private _position;
1091
+ /** {@link Disposable.onDisposed} */
1092
+ readonly onDisposed: Event<unknown>;
1093
+ constructor(dom: HTMLCanvasElement);
1094
+ /**
1095
+ * The real position of the mouse of the Three.js canvas.
1096
+ */
1097
+ get position(): THREE.Vector2;
1098
+ /** {@link Disposable.dispose} */
1099
+ dispose(): void;
1100
+ private getPositionY;
1101
+ private getPositionX;
1102
+ private updateMouseInfo;
1103
+ private setupEvents;
1104
+ }
1105
+ import * as THREE from "three";
1106
+ import { Components } from "../../Components";
1107
+ import { Event, World, Disposable } from "../../Types";
1108
+ import { Mouse } from "./mouse";
1109
+ /**
1110
+ * A simple [raycaster](https://threejs.org/docs/#api/en/core/Raycaster)
1111
+ * that allows to easily get items from the scene using the mouse and touch
1112
+ * events.
1113
+ */
1114
+ export declare class SimpleRaycaster implements Disposable {
1115
+ /** {@link Component.enabled} */
1116
+ enabled: boolean;
1117
+ components: Components;
1118
+ /** {@link Disposable.onDisposed} */
1119
+ readonly onDisposed: Event<unknown>;
1120
+ /** The position of the mouse in the screen. */
1121
+ readonly mouse: Mouse;
1122
+ readonly three: THREE.Raycaster;
1123
+ world: World;
1124
+ constructor(components: Components, world: World);
1125
+ /** {@link Disposable.dispose} */
1126
+ dispose(): void;
1127
+ /**
1128
+ * Throws a ray from the camera to the mouse or touch event point and returns
1129
+ * the first item found. This also takes into account the clipping planes
1130
+ * used by the renderer.
1131
+ *
1132
+ * @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
1133
+ * to query. If not provided, it will query all the meshes stored in
1134
+ * {@link Components.meshes}.
1135
+ */
1136
+ castRay(items?: THREE.Object3D[]): THREE.Intersection | null;
1137
+ castRayFromVector(origin: THREE.Vector3, direction: THREE.Vector3, items?: THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>[]): THREE.Intersection<THREE.Object3D<THREE.Object3DEventMap>> | null;
1138
+ private intersect;
1139
+ private filterClippingPlanes;
1140
+ }
1141
+ import * as THREE from "three";
1120
1142
  import CameraControls from "camera-controls";
1121
1143
  import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
1122
1144
  import { Components } from "../../Components";
@@ -1134,7 +1156,7 @@ export declare class SimpleCamera extends BaseCamera implements Updateable, Disp
1134
1156
  readonly onAspectUpdated: Event<unknown>;
1135
1157
  /** {@link Disposable.onDisposed} */
1136
1158
  readonly onDisposed: Event<string>;
1137
- readonly three: THREE.PerspectiveCamera;
1159
+ three: THREE.PerspectiveCamera | THREE.OrthographicCamera;
1138
1160
  private _allControls;
1139
1161
  /**
1140
1162
  * The object that controls the camera. An instance of
@@ -1162,10 +1184,225 @@ export declare class SimpleCamera extends BaseCamera implements Updateable, Disp
1162
1184
  private setupEvents;
1163
1185
  private static getSubsetOfThree;
1164
1186
  }
1187
+ import * as THREE from "three";
1188
+ import { Components } from "../../Components";
1189
+ import { AsyncEvent, Event, World } from "../../Types";
1190
+ export interface CullerRendererSettings {
1191
+ updateInterval?: number;
1192
+ width?: number;
1193
+ height?: number;
1194
+ autoUpdate?: boolean;
1195
+ }
1165
1196
  /**
1166
- * Simple event handler by
1167
- * [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540).
1168
- * Keep in mind that:
1197
+ * A base renderer to determine visibility on screen
1198
+ */
1199
+ export declare class CullerRenderer {
1200
+ /** {@link Disposable.onDisposed} */
1201
+ readonly onDisposed: Event<string>;
1202
+ /**
1203
+ * Fires after making the visibility check to the meshes. It lists the
1204
+ * meshes that are currently visible, and the ones that were visible
1205
+ * just before but not anymore.
1206
+ */
1207
+ readonly onViewUpdated: Event<any> | AsyncEvent<any>;
1208
+ /** {@link Component.enabled} */
1209
+ enabled: boolean;
1210
+ /**
1211
+ * Needs to check whether there are objects that need to be hidden or shown.
1212
+ * You can bind this to the camera movement, to a certain interval, etc.
1213
+ */
1214
+ needsUpdate: boolean;
1215
+ /**
1216
+ * Render the internal scene used to determine the object visibility. Used
1217
+ * for debugging purposes.
1218
+ */
1219
+ renderDebugFrame: boolean;
1220
+ components: Components;
1221
+ readonly world: World;
1222
+ readonly renderer: THREE.WebGLRenderer;
1223
+ protected autoUpdate: boolean;
1224
+ protected updateInterval: number;
1225
+ protected readonly worker: Worker;
1226
+ protected readonly scene: THREE.Scene;
1227
+ private _width;
1228
+ private _height;
1229
+ private _availableColor;
1230
+ private readonly renderTarget;
1231
+ private readonly bufferSize;
1232
+ private readonly _buffer;
1233
+ protected _isWorkerBusy: boolean;
1234
+ constructor(components: Components, world: World, settings?: CullerRendererSettings);
1235
+ /** {@link Disposable.dispose} */
1236
+ dispose(): void;
1237
+ /**
1238
+ * The function that the culler uses to reprocess the scene. Generally it's
1239
+ * better to call needsUpdate, but you can also call this to force it.
1240
+ * @param force if true, it will refresh the scene even if needsUpdate is
1241
+ * not true.
1242
+ */
1243
+ updateVisibility: (force?: boolean) => Promise<void>;
1244
+ protected getAvailableColor(): {
1245
+ r: number;
1246
+ g: number;
1247
+ b: number;
1248
+ code: string;
1249
+ };
1250
+ protected increaseColor(): void;
1251
+ protected decreaseColor(): void;
1252
+ private applySettings;
1253
+ }
1254
+ import * as THREE from "three";
1255
+ import { CullerRenderer, CullerRendererSettings } from "./culler-renderer";
1256
+ import { Components } from "../../Components";
1257
+ import { Event, World } from "../../Types";
1258
+ /**
1259
+ * A renderer to determine a mesh visibility on screen
1260
+ */
1261
+ export declare class MeshCullerRenderer extends CullerRenderer {
1262
+ threshold: number;
1263
+ readonly onViewUpdated: Event<{
1264
+ seen: Set<THREE.Mesh>;
1265
+ unseen: Set<THREE.Mesh>;
1266
+ }>;
1267
+ colorMeshes: Map<string, THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[]>>;
1268
+ isProcessing: boolean;
1269
+ private _colorCodeMeshMap;
1270
+ private _meshIDColorCodeMap;
1271
+ private _currentVisibleMeshes;
1272
+ private _recentlyHiddenMeshes;
1273
+ private _intervalID;
1274
+ private readonly _transparentMat;
1275
+ constructor(components: Components, world: World, settings?: CullerRendererSettings);
1276
+ dispose(): void;
1277
+ add(mesh: THREE.Mesh | THREE.InstancedMesh): void;
1278
+ remove(mesh: THREE.Mesh | THREE.InstancedMesh): void;
1279
+ private handleWorkerMessage;
1280
+ private getAvailableMaterial;
1281
+ }
1282
+ export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
1283
+ import { NavigationMode } from "./types";
1284
+ import { OrthoPerspectiveCamera } from "../index";
1285
+ /**
1286
+ * A {@link NavigationMode} that allows 3D navigation and panning
1287
+ * like in many 3D and CAD softwares.
1288
+ */
1289
+ export declare class OrbitMode implements NavigationMode {
1290
+ camera: OrthoPerspectiveCamera;
1291
+ /** {@link NavigationMode.enabled} */
1292
+ enabled: boolean;
1293
+ /** {@link NavigationMode.id} */
1294
+ readonly id = "Orbit";
1295
+ constructor(camera: OrthoPerspectiveCamera);
1296
+ /** {@link NavigationMode.set} */
1297
+ set(active: boolean): void;
1298
+ private activateOrbitControls;
1299
+ }
1300
+ import { NavigationMode } from "./types";
1301
+ import { OrthoPerspectiveCamera } from "../index";
1302
+ /**
1303
+ * A {@link NavigationMode} that allows first person navigation,
1304
+ * simulating FPS video games.
1305
+ */
1306
+ export declare class FirstPersonMode implements NavigationMode {
1307
+ private camera;
1308
+ /** {@link NavigationMode.enabled} */
1309
+ enabled: boolean;
1310
+ /** {@link NavigationMode.id} */
1311
+ readonly id = "FirstPerson";
1312
+ constructor(camera: OrthoPerspectiveCamera);
1313
+ /** {@link NavigationMode.set} */
1314
+ set(active: boolean): void;
1315
+ private setupFirstPersonCamera;
1316
+ }
1317
+ import * as THREE from "three";
1318
+ import { CameraProjection } from "./types";
1319
+ import { Event } from "../../Types";
1320
+ import { OrthoPerspectiveCamera } from "../index";
1321
+ /**
1322
+ * Object to control the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
1323
+ */
1324
+ export declare class ProjectionManager {
1325
+ /**
1326
+ * Event that fires when the {@link CameraProjection} changes.
1327
+ */
1328
+ readonly onChanged: Event<THREE.PerspectiveCamera | THREE.OrthographicCamera>;
1329
+ current: CameraProjection;
1330
+ camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
1331
+ private _component;
1332
+ private _previousDistance;
1333
+ /** Match Ortho zoom with Perspective distance when changing projection mode */
1334
+ matchOrthoDistanceEnabled: boolean;
1335
+ constructor(camera: OrthoPerspectiveCamera);
1336
+ /**
1337
+ * Sets the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
1338
+ *
1339
+ * @param projection - the new projection to set. If it is the current projection,
1340
+ * it will have no effect.
1341
+ */
1342
+ set(projection: CameraProjection): Promise<void>;
1343
+ /**
1344
+ * Changes the current {@link CameraProjection} from Ortographic to Perspective
1345
+ * and vice versa.
1346
+ */
1347
+ toggle(): Promise<void>;
1348
+ private setOrthoCamera;
1349
+ private getPerspectiveDims;
1350
+ private setupOrthoCamera;
1351
+ private getDistance;
1352
+ private setPerspectiveCamera;
1353
+ }
1354
+ import { NavigationMode } from "./types";
1355
+ import { OrthoPerspectiveCamera } from "../index";
1356
+ /**
1357
+ * A {@link NavigationMode} that allows to navigate floorplans in 2D,
1358
+ * like many BIM tools.
1359
+ */
1360
+ export declare class PlanMode implements NavigationMode {
1361
+ private camera;
1362
+ /** {@link NavigationMode.enabled} */
1363
+ enabled: boolean;
1364
+ /** {@link NavigationMode.id} */
1365
+ readonly id = "Plan";
1366
+ private mouseAction1?;
1367
+ private mouseAction2?;
1368
+ private mouseInitialized;
1369
+ private readonly defaultAzimuthSpeed;
1370
+ private readonly defaultPolarSpeed;
1371
+ constructor(camera: OrthoPerspectiveCamera);
1372
+ /** {@link NavigationMode.set} */
1373
+ set(active: boolean): void;
1374
+ }
1375
+ /**
1376
+ * The projection system of the camera.
1377
+ */
1378
+ export type CameraProjection = "Perspective" | "Orthographic";
1379
+ /**
1380
+ * The extensible list of supported navigation modes.
1381
+ */
1382
+ export type NavModeID = "Orbit" | "FirstPerson" | "Plan";
1383
+ /**
1384
+ * An object that determines the behavior of the camera controls
1385
+ * and the user input (e.g. 2D floor plan mode, first person mode, etc).
1386
+ */
1387
+ export interface NavigationMode {
1388
+ /** The unique ID of this navigation mode. */
1389
+ id: NavModeID;
1390
+ /**
1391
+ * Enable or disable this navigation mode.
1392
+ * When a new navigation mode is enabled, the previous navigation mode
1393
+ * must be disabled.
1394
+ *
1395
+ * @param active - whether to enable or disable this mode.
1396
+ * @param options - any additional data required to enable or disable it.
1397
+ * */
1398
+ set: (active: boolean, options?: any) => void;
1399
+ /** Whether this navigation mode is active or not. */
1400
+ enabled: boolean;
1401
+ }
1402
+ /**
1403
+ * Simple event handler by
1404
+ * [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540).
1405
+ * Keep in mind that:
1169
1406
  * - If you want to remove it later, you might want to declare the callback as
1170
1407
  * an object.
1171
1408
  * - If you want to maintain the reference to 'this', you will need to declare
@@ -1319,40 +1556,6 @@ export interface BVHGeometry extends THREE.BufferGeometry {
1319
1556
  export interface CameraControllable {
1320
1557
  controls: CameraControls;
1321
1558
  }
1322
- /**
1323
- * Simple event handler by
1324
- * [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540).
1325
- * Keep in mind that:
1326
- * - If you want to remove it later, you might want to declare the callback as
1327
- * an object.
1328
- * - If you want to maintain the reference to 'this', you will need to declare
1329
- * the callback as an arrow function.
1330
- */
1331
- export declare class AsyncEvent<T> {
1332
- /**
1333
- * Add a callback to this event instance.
1334
- * @param handler - the callback to be added to this event.
1335
- */
1336
- add(handler: T extends void ? {
1337
- (): Promise<void>;
1338
- } : {
1339
- (data: T): Promise<void>;
1340
- }): void;
1341
- /**
1342
- * Removes a callback from this event instance.
1343
- * @param handler - the callback to be removed from this event.
1344
- */
1345
- remove(handler: T extends void ? {
1346
- (): Promise<void>;
1347
- } : {
1348
- (data: T): Promise<void>;
1349
- }): void;
1350
- /** Triggers all the callbacks assigned to this event. */
1351
- trigger: (data?: T) => Promise<void>;
1352
- /** Gets rid of all the suscribed events. */
1353
- reset(): void;
1354
- private handlers;
1355
- }
1356
1559
  import { Base } from "./base";
1357
1560
  /**
1358
1561
  * Components are the building blocks of this library. Components are singleton
@@ -1390,420 +1593,132 @@ export declare abstract class Base {
1390
1593
  /** Whether is component is {@link Configurable}. */
1391
1594
  isConfigurable: () => this is Configurable<any>;
1392
1595
  }
1393
- import { Base } from "./base";
1394
- import { World } from "./world";
1395
- import { Event } from "./event";
1396
- import { Components } from "../../Components";
1397
- /**
1398
- * One of the elements that make a world. It can be either a scene, a camera
1399
- * or a renderer.
1400
- */
1401
- export declare abstract class BaseWorldItem extends Base {
1402
- readonly worlds: Map<string, World>;
1403
- readonly onWorldChanged: Event<{
1404
- world: World;
1405
- action: "added" | "removed";
1406
- }>;
1407
- currentWorld: World | null;
1408
- protected constructor(components: Components);
1409
- }
1410
- import * as THREE from "three";
1411
- import { Vector2 } from "three";
1412
- import { Event } from "./event";
1413
- import { BaseWorldItem } from "./base-world-item";
1414
- import { Disposable, Resizeable, Updateable } from "./interfaces";
1415
- export declare abstract class BaseRenderer extends BaseWorldItem implements Updateable, Disposable, Resizeable {
1416
- abstract three: THREE.WebGLRenderer;
1417
- /** {@link Updateable.onBeforeUpdate} */
1418
- onAfterUpdate: Event<unknown>;
1419
- /** {@link Updateable.onAfterUpdate} */
1420
- onBeforeUpdate: Event<unknown>;
1421
- /** {@link Disposable.onDisposed} */
1422
- readonly onDisposed: Event<undefined>;
1423
- readonly onResize: Event<THREE.Vector2>;
1424
- /**
1425
- * Event that fires when there has been a change to the list of clipping
1426
- * planes used by the active renderer.
1427
- */
1428
- readonly onClippingPlanesUpdated: Event<unknown>;
1429
- abstract update(delta?: number): void | Promise<void>;
1430
- abstract dispose(): void;
1431
- abstract getSize(): Vector2;
1432
- abstract resize(size: Vector2 | undefined): void;
1433
- /**
1434
- * The list of [clipping planes](https://threejs.org/docs/#api/en/renderers/WebGLRenderer.clippingPlanes) used by this
1435
- * instance of the renderer.
1436
- */
1437
- clippingPlanes: THREE.Plane[];
1438
- /**
1439
- * Forces the update of the clipping planes and all components that depend
1440
- * on them that are subscribed to 'onClippingPlanesUpdated'.
1441
- */
1442
- updateClippingPlanes(): void;
1443
- /**
1444
- * Adds or removes a
1445
- * [clipping plane](https://threejs.org/docs/#api/en/renderers/WebGLRenderer.clippingPlanes)
1446
- * to the renderer.
1447
- */
1448
- setPlane(active: boolean, plane: THREE.Plane, isLocal?: boolean): void;
1449
- }
1450
- import * as THREE from "three";
1451
- import CameraControls from "camera-controls";
1452
- import { BaseWorldItem } from "./base-world-item";
1453
- import { CameraControllable } from "./interfaces";
1454
- export declare abstract class BaseCamera extends BaseWorldItem {
1455
- abstract enabled: boolean;
1456
- abstract three: THREE.Camera;
1457
- abstract controls?: CameraControls;
1458
- /** Whether is instance is {@link CameraControllable}. */
1459
- hasCameraControls: () => this is CameraControllable;
1460
- }
1461
- import * as THREE from "three";
1462
- import { Disposable } from "./interfaces";
1463
- import { Event } from "./event";
1464
- import { Components } from "../../Components";
1465
- import { BaseWorldItem } from "./base-world-item";
1466
- export declare abstract class BaseScene extends BaseWorldItem implements Disposable {
1467
- /** {@link Disposable.onDisposed} */
1468
- readonly onDisposed: Event<unknown>;
1469
- abstract three: THREE.Object3D;
1470
- protected constructor(components: Components);
1471
- /** {@link Disposable.dispose} */
1472
- dispose(): void;
1473
- }
1474
- import * as THREE from "three";
1475
- import { BaseScene } from "./base-scene";
1476
- import { BaseCamera } from "./base-camera";
1477
- import { BaseRenderer } from "./base-renderer";
1478
- import { Updateable, Disposable } from "./interfaces";
1479
- export interface World extends Disposable, Updateable {
1480
- meshes: Set<THREE.Mesh>;
1481
- scene: BaseScene;
1482
- camera: BaseCamera;
1483
- renderer: BaseRenderer | null;
1484
- uuid: string;
1485
- }
1486
- import { NavigationMode } from "./types";
1487
- /**
1488
- * A {@link NavigationMode} that allows first person navigation,
1489
- * simulating FPS video games.
1490
- */
1491
- export declare class FirstPersonMode implements NavigationMode {
1492
- private camera;
1493
- /** {@link NavigationMode.enabled} */
1494
- enabled: boolean;
1495
- /** {@link NavigationMode.id} */
1496
- readonly id = "FirstPerson";
1497
- constructor(camera: any);
1498
- /** {@link NavigationMode.set} */
1499
- set(active: boolean): void;
1500
- private setupFirstPersonCamera;
1501
- }
1502
- import { NavigationMode } from "./types";
1503
- /**
1504
- * A {@link NavigationMode} that allows 3D navigation and panning
1505
- * like in many 3D and CAD softwares.
1506
- */
1507
- export declare class OrbitMode implements NavigationMode {
1508
- camera: any;
1509
- /** {@link NavigationMode.enabled} */
1510
- enabled: boolean;
1511
- /** {@link NavigationMode.id} */
1512
- readonly id = "Orbit";
1513
- constructor(camera: any);
1514
- /** {@link NavigationMode.set} */
1515
- set(active: boolean): void;
1516
- private activateOrbitControls;
1517
- }
1518
- import { NavigationMode } from "./types";
1519
- /**
1520
- * A {@link NavigationMode} that allows to navigate floorplans in 2D,
1521
- * like many BIM tools.
1522
- */
1523
- export declare class PlanMode implements NavigationMode {
1524
- private camera;
1525
- /** {@link NavigationMode.enabled} */
1526
- enabled: boolean;
1527
- /** {@link NavigationMode.id} */
1528
- readonly id = "Plan";
1529
- private mouseAction1?;
1530
- private mouseAction2?;
1531
- private mouseInitialized;
1532
- private readonly defaultAzimuthSpeed;
1533
- private readonly defaultPolarSpeed;
1534
- constructor(camera: any);
1535
- /** {@link NavigationMode.set} */
1536
- set(active: boolean): void;
1537
- }
1538
- import * as THREE from "three";
1539
- import { CameraProjection } from "./types";
1540
- import { Event } from "../../../core";
1541
- import { OrthoPerspectiveCamera } from "../index";
1542
- /**
1543
- * Object to control the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
1544
- */
1545
- export declare class ProjectionManager {
1546
- /**
1547
- * Event that fires when the {@link CameraProjection} changes.
1548
- */
1549
- readonly onChanged: Event<THREE.Camera>;
1550
- current: CameraProjection;
1551
- camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
1552
- private _component;
1553
- private _previousDistance;
1554
- /** Match Ortho zoom with Perspective distance when changing projection mode */
1555
- matchOrthoDistanceEnabled: boolean;
1556
- constructor(camera: OrthoPerspectiveCamera);
1557
- /**
1558
- * Sets the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
1559
- *
1560
- * @param projection - the new projection to set. If it is the current projection,
1561
- * it will have no effect.
1562
- */
1563
- set(projection: CameraProjection): Promise<void>;
1564
- /**
1565
- * Changes the current {@link CameraProjection} from Ortographic to Perspective
1566
- * and vice versa.
1567
- */
1568
- toggle(): Promise<void>;
1569
- private setOrthoCamera;
1570
- private getDims;
1571
- private setupOrthoCamera;
1572
- private getDistance;
1573
- private setPerspectiveCamera;
1574
- }
1575
- /**
1576
- * The projection system of the camera.
1577
- */
1578
- export type CameraProjection = "Perspective" | "Orthographic";
1579
- /**
1580
- * The extensible list of supported navigation modes.
1581
- */
1582
- export type NavModeID = "Orbit" | "FirstPerson" | "Plan";
1583
- /**
1584
- * An object that determines the behavior of the camera controls
1585
- * and the user input (e.g. 2D floor plan mode, first person mode, etc).
1586
- */
1587
- export interface NavigationMode {
1588
- /** The unique ID of this navigation mode. */
1589
- id: NavModeID;
1590
- /**
1591
- * Enable or disable this navigation mode.
1592
- * When a new navigation mode is enabled, the previous navigation mode
1593
- * must be disabled.
1594
- *
1595
- * @param active - whether to enable or disable this mode.
1596
- * @param options - any additional data required to enable or disable it.
1597
- * */
1598
- set: (active: boolean, options?: any) => void;
1599
- /** Whether this navigation mode is active or not. */
1600
- enabled: boolean;
1601
- }
1602
- /// <reference types="node" />
1603
- import * as THREE from "three";
1604
- import { Hideable, Event, World } from "../../Types";
1605
- import { Components } from "../../Components";
1606
- export interface GridConfig {
1607
- color: THREE.Color;
1608
- size1: number;
1609
- size2: number;
1610
- distance: number;
1611
- }
1612
1596
  /**
1613
- * An infinite grid. Created by
1614
- * [fyrestar](https://github.com/Fyrestar/THREE.InfiniteGridHelper)
1615
- * and translated to typescript by
1616
- * [dkaraush](https://github.com/dkaraush/THREE.InfiniteGridHelper/blob/master/InfiniteGridHelper.ts).
1597
+ * Simple event handler by
1598
+ * [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540).
1599
+ * Keep in mind that:
1600
+ * - If you want to remove it later, you might want to declare the callback as
1601
+ * an object.
1602
+ * - If you want to maintain the reference to 'this', you will need to declare
1603
+ * the callback as an arrow function.
1617
1604
  */
1618
- export declare class SimpleGrid implements Hideable, Disposable {
1619
- /** {@link Disposable.onDisposed} */
1620
- readonly onDisposed: Event<unknown>;
1621
- world: World;
1622
- components: Components;
1623
- /** {@link Hideable.visible} */
1624
- get visible(): boolean;
1625
- /** {@link Hideable.visible} */
1626
- set visible(visible: boolean);
1627
- /** The material of the grid. */
1628
- get material(): THREE.ShaderMaterial;
1605
+ export declare class AsyncEvent<T> {
1629
1606
  /**
1630
- * Whether the grid should fade away with distance. Recommended to be true for
1631
- * perspective cameras and false for orthographic cameras.
1607
+ * Add a callback to this event instance.
1608
+ * @param handler - the callback to be added to this event.
1632
1609
  */
1633
- get fade(): boolean;
1610
+ add(handler: T extends void ? {
1611
+ (): Promise<void>;
1612
+ } : {
1613
+ (data: T): Promise<void>;
1614
+ }): void;
1634
1615
  /**
1635
- * Whether the grid should fade away with distance. Recommended to be true for
1636
- * perspective cameras and false for orthographic cameras.
1616
+ * Removes a callback from this event instance.
1617
+ * @param handler - the callback to be removed from this event.
1637
1618
  */
1638
- set fade(active: boolean);
1639
- private readonly _grid;
1640
- private _fade;
1641
- constructor(components: Components, world: World, config: GridConfig);
1642
- [Symbol.dispose](): void;
1643
- /** {@link Component.get} */
1644
- get(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
1645
- /** {@link Disposable.dispose} */
1646
- dispose(): void;
1647
- private setupEvents;
1648
- private updateZoom;
1619
+ remove(handler: T extends void ? {
1620
+ (): Promise<void>;
1621
+ } : {
1622
+ (data: T): Promise<void>;
1623
+ }): void;
1624
+ /** Triggers all the callbacks assigned to this event. */
1625
+ trigger: (data?: T) => Promise<void>;
1626
+ /** Gets rid of all the suscribed events. */
1627
+ reset(): void;
1628
+ private handlers;
1649
1629
  }
1650
- import * as THREE from "three";
1630
+ import { Base } from "./base";
1631
+ import { World } from "./world";
1632
+ import { Event } from "./event";
1651
1633
  import { Components } from "../../Components";
1652
- import { AsyncEvent, Event, World } from "../../Types";
1653
- export interface CullerRendererSettings {
1654
- updateInterval?: number;
1655
- width?: number;
1656
- height?: number;
1657
- autoUpdate?: boolean;
1658
- }
1659
1634
  /**
1660
- * A base renderer to determine visibility on screen
1635
+ * One of the elements that make a world. It can be either a scene, a camera
1636
+ * or a renderer.
1661
1637
  */
1662
- export declare class CullerRenderer {
1638
+ export declare abstract class BaseWorldItem extends Base {
1639
+ readonly worlds: Map<string, World>;
1640
+ readonly onWorldChanged: Event<{
1641
+ world: World;
1642
+ action: "added" | "removed";
1643
+ }>;
1644
+ currentWorld: World | null;
1645
+ protected constructor(components: Components);
1646
+ }
1647
+ import * as THREE from "three";
1648
+ import CameraControls from "camera-controls";
1649
+ import { BaseWorldItem } from "./base-world-item";
1650
+ import { CameraControllable } from "./interfaces";
1651
+ export declare abstract class BaseCamera extends BaseWorldItem {
1652
+ abstract enabled: boolean;
1653
+ abstract three: THREE.Camera;
1654
+ abstract controls?: CameraControls;
1655
+ /** Whether is instance is {@link CameraControllable}. */
1656
+ hasCameraControls: () => this is CameraControllable;
1657
+ }
1658
+ import * as THREE from "three";
1659
+ import { Vector2 } from "three";
1660
+ import { Event } from "./event";
1661
+ import { BaseWorldItem } from "./base-world-item";
1662
+ import { Disposable, Resizeable, Updateable } from "./interfaces";
1663
+ export declare abstract class BaseRenderer extends BaseWorldItem implements Updateable, Disposable, Resizeable {
1664
+ abstract three: THREE.WebGLRenderer;
1665
+ /** {@link Updateable.onBeforeUpdate} */
1666
+ onAfterUpdate: Event<unknown>;
1667
+ /** {@link Updateable.onAfterUpdate} */
1668
+ onBeforeUpdate: Event<unknown>;
1663
1669
  /** {@link Disposable.onDisposed} */
1664
- readonly onDisposed: Event<string>;
1670
+ readonly onDisposed: Event<undefined>;
1671
+ readonly onResize: Event<THREE.Vector2>;
1665
1672
  /**
1666
- * Fires after making the visibility check to the meshes. It lists the
1667
- * meshes that are currently visible, and the ones that were visible
1668
- * just before but not anymore.
1673
+ * Event that fires when there has been a change to the list of clipping
1674
+ * planes used by the active renderer.
1669
1675
  */
1670
- readonly onViewUpdated: Event<any> | AsyncEvent<any>;
1671
- /** {@link Component.enabled} */
1672
- enabled: boolean;
1676
+ readonly onClippingPlanesUpdated: Event<unknown>;
1677
+ abstract update(delta?: number): void | Promise<void>;
1678
+ abstract dispose(): void;
1679
+ abstract getSize(): Vector2;
1680
+ abstract resize(size: Vector2 | undefined): void;
1673
1681
  /**
1674
- * Needs to check whether there are objects that need to be hidden or shown.
1675
- * You can bind this to the camera movement, to a certain interval, etc.
1682
+ * The list of [clipping planes](https://threejs.org/docs/#api/en/renderers/WebGLRenderer.clippingPlanes) used by this
1683
+ * instance of the renderer.
1676
1684
  */
1677
- needsUpdate: boolean;
1685
+ clippingPlanes: THREE.Plane[];
1678
1686
  /**
1679
- * Render the internal scene used to determine the object visibility. Used
1680
- * for debugging purposes.
1687
+ * Forces the update of the clipping planes and all components that depend
1688
+ * on them that are subscribed to 'onClippingPlanesUpdated'.
1681
1689
  */
1682
- renderDebugFrame: boolean;
1683
- components: Components;
1684
- readonly world: World;
1685
- readonly renderer: THREE.WebGLRenderer;
1686
- protected autoUpdate: boolean;
1687
- protected updateInterval: number;
1688
- protected readonly worker: Worker;
1689
- protected readonly scene: THREE.Scene;
1690
- private _width;
1691
- private _height;
1692
- private _availableColor;
1693
- private readonly renderTarget;
1694
- private readonly bufferSize;
1695
- private readonly _buffer;
1696
- protected _isWorkerBusy: boolean;
1697
- constructor(components: Components, world: World, settings?: CullerRendererSettings);
1698
- /** {@link Disposable.dispose} */
1699
- dispose(): void;
1690
+ updateClippingPlanes(): void;
1700
1691
  /**
1701
- * The function that the culler uses to reprocess the scene. Generally it's
1702
- * better to call needsUpdate, but you can also call this to force it.
1703
- * @param force if true, it will refresh the scene even if needsUpdate is
1704
- * not true.
1692
+ * Adds or removes a
1693
+ * [clipping plane](https://threejs.org/docs/#api/en/renderers/WebGLRenderer.clippingPlanes)
1694
+ * to the renderer.
1705
1695
  */
1706
- updateVisibility: (force?: boolean) => Promise<void>;
1707
- protected getAvailableColor(): {
1708
- r: number;
1709
- g: number;
1710
- b: number;
1711
- code: string;
1712
- };
1713
- protected increaseColor(): void;
1714
- protected decreaseColor(): void;
1715
- private applySettings;
1696
+ setPlane(active: boolean, plane: THREE.Plane, isLocal?: boolean): void;
1716
1697
  }
1717
- export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
1718
1698
  import * as THREE from "three";
1719
- import { CullerRenderer, CullerRendererSettings } from "./culler-renderer";
1699
+ import { Disposable } from "./interfaces";
1700
+ import { Event } from "./event";
1720
1701
  import { Components } from "../../Components";
1721
- import { Event, World } from "../../Types";
1722
- /**
1723
- * A renderer to determine a mesh visibility on screen
1724
- */
1725
- export declare class MeshCullerRenderer extends CullerRenderer {
1726
- threshold: number;
1727
- readonly onViewUpdated: Event<{
1728
- seen: Set<THREE.Mesh>;
1729
- unseen: Set<THREE.Mesh>;
1730
- }>;
1731
- colorMeshes: Map<string, THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[]>>;
1732
- isProcessing: boolean;
1733
- private _colorCodeMeshMap;
1734
- private _meshIDColorCodeMap;
1735
- private _currentVisibleMeshes;
1736
- private _recentlyHiddenMeshes;
1737
- private _intervalID;
1738
- private readonly _transparentMat;
1739
- constructor(components: Components, world: World, settings?: CullerRendererSettings);
1740
- dispose(): void;
1741
- add(mesh: THREE.Mesh | THREE.InstancedMesh): void;
1742
- remove(mesh: THREE.Mesh | THREE.InstancedMesh): void;
1743
- private handleWorkerMessage;
1744
- private getAvailableMaterial;
1745
- }
1746
- import * as THREE from "three";
1747
- import { Disposable, Event } from "../../Types";
1748
- /**
1749
- * A helper to easily get the real position of the mouse in the Three.js canvas
1750
- * to work with tools like the
1751
- * [raycaster](https://threejs.org/docs/#api/en/core/Raycaster), even if it has
1752
- * been transformed through CSS or doesn't occupy the whole screen.
1753
- */
1754
- export declare class Mouse implements Disposable {
1755
- dom: HTMLCanvasElement;
1756
- private _event?;
1757
- private _position;
1702
+ import { BaseWorldItem } from "./base-world-item";
1703
+ export declare abstract class BaseScene extends BaseWorldItem implements Disposable {
1758
1704
  /** {@link Disposable.onDisposed} */
1759
1705
  readonly onDisposed: Event<unknown>;
1760
- constructor(dom: HTMLCanvasElement);
1761
- /**
1762
- * The real position of the mouse of the Three.js canvas.
1763
- */
1764
- get position(): THREE.Vector2;
1706
+ abstract three: THREE.Object3D;
1707
+ protected constructor(components: Components);
1765
1708
  /** {@link Disposable.dispose} */
1766
1709
  dispose(): void;
1767
- private getPositionY;
1768
- private getPositionX;
1769
- private updateMouseInfo;
1770
- private setupEvents;
1771
1710
  }
1772
1711
  import * as THREE from "three";
1773
- import { Components } from "../../Components";
1774
- import { Event, World, Disposable } from "../../Types";
1775
- import { Mouse } from "./mouse";
1776
- /**
1777
- * A simple [raycaster](https://threejs.org/docs/#api/en/core/Raycaster)
1778
- * that allows to easily get items from the scene using the mouse and touch
1779
- * events.
1780
- */
1781
- export declare class SimpleRaycaster implements Disposable {
1782
- /** {@link Component.enabled} */
1783
- enabled: boolean;
1784
- components: Components;
1785
- /** {@link Disposable.onDisposed} */
1786
- readonly onDisposed: Event<unknown>;
1787
- /** The position of the mouse in the screen. */
1788
- readonly mouse: Mouse;
1789
- readonly three: THREE.Raycaster;
1790
- world: World;
1791
- constructor(components: Components, world: World);
1792
- /** {@link Disposable.dispose} */
1793
- dispose(): void;
1794
- /**
1795
- * Throws a ray from the camera to the mouse or touch event point and returns
1796
- * the first item found. This also takes into account the clipping planes
1797
- * used by the renderer.
1798
- *
1799
- * @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
1800
- * to query. If not provided, it will query all the meshes stored in
1801
- * {@link Components.meshes}.
1802
- */
1803
- castRay(items?: THREE.Mesh[]): THREE.Intersection | null;
1804
- castRayFromVector(origin: THREE.Vector3, direction: THREE.Vector3, items?: THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>[]): THREE.Intersection<THREE.Object3D<THREE.Object3DEventMap>> | null;
1805
- private intersect;
1806
- private filterClippingPlanes;
1712
+ import { BaseScene } from "./base-scene";
1713
+ import { BaseCamera } from "./base-camera";
1714
+ import { BaseRenderer } from "./base-renderer";
1715
+ import { Updateable, Disposable } from "./interfaces";
1716
+ export interface World extends Disposable, Updateable {
1717
+ meshes: Set<THREE.Mesh>;
1718
+ scene: BaseScene;
1719
+ camera: BaseCamera;
1720
+ renderer: BaseRenderer | null;
1721
+ uuid: string;
1807
1722
  }
1808
1723
  import * as THREE from "three";
1809
1724
  import { Hideable, Disposable, Event, World } from "../../Types";
@@ -1850,9 +1765,9 @@ export declare class SimplePlane implements Disposable, Hideable {
1850
1765
  set size(size: number);
1851
1766
  get helper(): THREE.Object3D<THREE.Object3DEventMap>;
1852
1767
  constructor(components: Components, world: World, origin: THREE.Vector3, normal: THREE.Vector3, material: THREE.Material, size?: number, activateControls?: boolean);
1853
- setFromNormalAndCoplanarPoint(normal: THREE.Vector3, point: THREE.Vector3): Promise<void>;
1768
+ setFromNormalAndCoplanarPoint(normal: THREE.Vector3, point: THREE.Vector3): void;
1854
1769
  /** {@link Updateable.update} */
1855
- update: () => Promise<void>;
1770
+ update: () => void;
1856
1771
  /** {@link Disposable.dispose} */
1857
1772
  dispose(): void;
1858
1773
  private reset;
@@ -1866,20 +1781,15 @@ export declare class SimplePlane implements Disposable, Hideable {
1866
1781
  private newHelper;
1867
1782
  private static newPlaneMesh;
1868
1783
  }
1869
- import * as THREE from "three";
1870
1784
  import * as WEBIFC from "web-ifc";
1871
- import * as FRAGS from "@thatopen/fragments";
1872
- export declare class CivilReader {
1873
- defLineMat: THREE.LineBasicMaterial;
1874
- read(webIfc: WEBIFC.IfcAPI): {
1875
- alignments: Map<number, FRAGS.Alignment>;
1876
- coordinationMatrix: THREE.Matrix4;
1877
- } | undefined;
1878
- get(civilItems: any): {
1879
- alignments: Map<number, FRAGS.Alignment>;
1880
- coordinationMatrix: THREE.Matrix4;
1881
- } | undefined;
1882
- private getCurves;
1785
+ import * as THREE from "three";
1786
+ export declare class Units {
1787
+ factor: number;
1788
+ complement: number;
1789
+ apply(matrix: THREE.Matrix4): void;
1790
+ setUp(webIfc: WEBIFC.IfcAPI): void;
1791
+ private getLengthUnits;
1792
+ private getScaleMatrix;
1883
1793
  }
1884
1794
  import * as WEBIFC from "web-ifc";
1885
1795
  /** Configuration of the IFC-fragment conversion. */
@@ -1908,11 +1818,26 @@ export declare class IfcFragmentSettings {
1908
1818
  autoSetWasm: boolean;
1909
1819
  customLocateFileHandler: WEBIFC.LocateFileHandlerFn | null;
1910
1820
  }
1821
+ import * as THREE from "three";
1822
+ import * as WEBIFC from "web-ifc";
1823
+ import * as FRAGS from "@thatopen/fragments";
1824
+ export declare class CivilReader {
1825
+ defLineMat: THREE.LineBasicMaterial;
1826
+ read(webIfc: WEBIFC.IfcAPI): {
1827
+ alignments: Map<number, FRAGS.Alignment>;
1828
+ coordinationMatrix: THREE.Matrix4;
1829
+ } | undefined;
1830
+ get(civilItems: any): {
1831
+ alignments: Map<number, FRAGS.Alignment>;
1832
+ coordinationMatrix: THREE.Matrix4;
1833
+ } | undefined;
1834
+ private getCurves;
1835
+ }
1911
1836
  import * as WEBIFC from "web-ifc";
1912
1837
  export declare class IfcMetadataReader {
1913
1838
  get(webIfc: WEBIFC.IfcAPI, type: number): string;
1914
1839
  }
1915
- import { IfcFragmentSettings } from "../../FragmentIfcLoader/src";
1840
+ import { IfcFragmentSettings } from "../../IfcLoader/src";
1916
1841
  /** Configuration of the IFC-fragment streaming. */
1917
1842
  export declare class IfcStreamingSettings extends IfcFragmentSettings {
1918
1843
  minGeometrySize: number;
@@ -1964,16 +1889,6 @@ export interface StreamedAsset {
1964
1889
  color: number[];
1965
1890
  }[];
1966
1891
  }
1967
- import * as WEBIFC from "web-ifc";
1968
- import * as THREE from "three";
1969
- export declare class Units {
1970
- factor: number;
1971
- complement: number;
1972
- apply(matrix: THREE.Matrix4): void;
1973
- setUp(webIfc: WEBIFC.IfcAPI): void;
1974
- private getLengthUnits;
1975
- private getScaleMatrix;
1976
- }
1977
1892
  export type RelationsMap = Map<number, Map<number, number[]>>;
1978
1893
  export interface ModelsRelationMap {
1979
1894
  [modelID: string]: RelationsMap;
@@ -2003,28 +1918,5 @@ import * as THREE from "three";
2003
1918
  export declare class TransformHelper {
2004
1919
  getHelper(geometries: BufferGeometry[]): THREE.Object3D<THREE.Object3DEventMap>;
2005
1920
  }
2006
- export type QueryConditions = "is" | "includes" | "startsWith" | "endsWith" | "matches";
2007
- export type ConditionFunctions = {
2008
- [queryCondition in QueryConditions]: (leftValue: string | boolean | number, rightValue: string | boolean | number) => boolean;
2009
- };
2010
- export type QueryOperators = "AND" | "OR";
2011
- export interface AttributeQuery {
2012
- operator?: QueryOperators;
2013
- attribute: string;
2014
- condition: QueryConditions;
2015
- value: string | number | boolean;
2016
- negateResult?: boolean;
2017
- caseSensitive?: boolean;
2018
- }
2019
- export interface QueryGroup {
2020
- operator?: QueryOperators;
2021
- description?: string;
2022
- queries: (AttributeQuery | QueryGroup)[];
2023
- }
2024
- export interface Query {
2025
- name: string;
2026
- description?: string;
2027
- groups: QueryGroup;
2028
- }
2029
1921
 
2030
1922
  }