@thatopen/components 2.0.0-alpha.10 → 2.0.0-alpha.11
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.
- package/dist/namespace.d.ts +747 -747
- package/package.json +1 -1
package/dist/namespace.d.ts
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
declare namespace OBC {
|
|
2
|
+
import { Component, Disposable, World, Event } from "../Types";
|
|
3
|
+
import { SimpleRaycaster } from "./src";
|
|
4
|
+
import { Components } from "../Components";
|
|
5
|
+
export declare class Raycasters extends Component implements Disposable {
|
|
6
|
+
static readonly uuid: "d5d8bdf0-db25-4952-b951-b643af207ace";
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
list: Map<string, SimpleRaycaster>;
|
|
9
|
+
onDisposed: Event<unknown>;
|
|
10
|
+
constructor(components: Components);
|
|
11
|
+
get(world: World): SimpleRaycaster;
|
|
12
|
+
delete(world: World): void;
|
|
13
|
+
dispose(): void;
|
|
14
|
+
}
|
|
2
15
|
import { Component, Disposable, Event } from "../Types";
|
|
3
16
|
/**
|
|
4
17
|
* The entry point of the Components library.
|
|
@@ -51,19 +64,6 @@ export declare class Components implements Disposable {
|
|
|
51
64
|
private update;
|
|
52
65
|
private static setupBVH;
|
|
53
66
|
}
|
|
54
|
-
import { Component, Disposable, World, Event } from "../Types";
|
|
55
|
-
import { GridConfig, SimpleGrid } from "./src";
|
|
56
|
-
export declare class Grids extends Component implements Disposable {
|
|
57
|
-
static readonly uuid: "d1e814d5-b81c-4452-87a2-f039375e0489";
|
|
58
|
-
list: Map<string, SimpleGrid>;
|
|
59
|
-
onDisposed: Event<unknown>;
|
|
60
|
-
config: Required<GridConfig>;
|
|
61
|
-
/** {@link Component.enabled} */
|
|
62
|
-
enabled: boolean;
|
|
63
|
-
create(world: World): void;
|
|
64
|
-
delete(world: World): void;
|
|
65
|
-
dispose(): void;
|
|
66
|
-
}
|
|
67
67
|
import * as THREE from "three";
|
|
68
68
|
import { Components } from "../Components";
|
|
69
69
|
import { Component } from "../Types";
|
|
@@ -107,6 +107,50 @@ export declare class Disposer extends Component {
|
|
|
107
107
|
private disposeChildren;
|
|
108
108
|
private static disposeMaterial;
|
|
109
109
|
}
|
|
110
|
+
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} */
|
|
118
|
+
enabled: boolean;
|
|
119
|
+
create(world: World): void;
|
|
120
|
+
delete(world: World): void;
|
|
121
|
+
dispose(): void;
|
|
122
|
+
}
|
|
123
|
+
import { Component, Disposable, Updateable, World, Event, BaseScene, BaseCamera, BaseRenderer } from "../Types";
|
|
124
|
+
import { Components } from "../Components";
|
|
125
|
+
import { SimpleWorld } from "./src";
|
|
126
|
+
export declare class Worlds extends Component implements Updateable, Disposable {
|
|
127
|
+
static readonly uuid: "fdb61dc4-2ec1-4966-b83d-54ea795fad4a";
|
|
128
|
+
readonly onAfterUpdate: Event<unknown>;
|
|
129
|
+
readonly onBeforeUpdate: Event<unknown>;
|
|
130
|
+
readonly onDisposed: Event<unknown>;
|
|
131
|
+
list: Map<string, World>;
|
|
132
|
+
enabled: boolean;
|
|
133
|
+
constructor(components: Components);
|
|
134
|
+
create<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer>(): SimpleWorld<T, U, S>;
|
|
135
|
+
delete(world: World): void;
|
|
136
|
+
dispose(): void;
|
|
137
|
+
update(delta?: number): void | Promise<void>;
|
|
138
|
+
}
|
|
139
|
+
import { Component, Components, Disposable, Updateable, World, Event } from "../../core";
|
|
140
|
+
import { MiniMap } from "./src";
|
|
141
|
+
export declare class MiniMaps extends Component implements Updateable, Disposable {
|
|
142
|
+
static readonly uuid: "39ad6aad-84c8-4adf-a1e0-7f25313a9e7f";
|
|
143
|
+
readonly onAfterUpdate: Event<unknown>;
|
|
144
|
+
readonly onBeforeUpdate: Event<unknown>;
|
|
145
|
+
readonly onDisposed: Event<unknown>;
|
|
146
|
+
enabled: boolean;
|
|
147
|
+
list: Map<string, MiniMap>;
|
|
148
|
+
constructor(components: Components);
|
|
149
|
+
create(world: World): MiniMap;
|
|
150
|
+
delete(id: string): void;
|
|
151
|
+
dispose(): void | Promise<void>;
|
|
152
|
+
update(): void;
|
|
153
|
+
}
|
|
110
154
|
import * as THREE from "three";
|
|
111
155
|
import { Component, Createable, Disposable, Event, Hideable, World } from "../Types";
|
|
112
156
|
import { SimplePlane } from "./src";
|
|
@@ -211,6 +255,55 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
|
|
|
211
255
|
private _onEndDragging;
|
|
212
256
|
}
|
|
213
257
|
import * as THREE from "three";
|
|
258
|
+
import { Components } from "../../core/Components";
|
|
259
|
+
import { SimpleCamera } from "../../core";
|
|
260
|
+
import { NavigationMode, NavModeID, ProjectionManager } from "./src";
|
|
261
|
+
/**
|
|
262
|
+
* A flexible camera that uses
|
|
263
|
+
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
|
|
264
|
+
* easily control the camera in 2D and 3D. It supports multiple navigation
|
|
265
|
+
* modes, such as 2D floor plan navigation, first person and 3D orbit.
|
|
266
|
+
*/
|
|
267
|
+
export declare class OrthoPerspectiveCamera extends SimpleCamera {
|
|
268
|
+
/**
|
|
269
|
+
* The current {@link NavigationMode}.
|
|
270
|
+
*/
|
|
271
|
+
mode: NavigationMode;
|
|
272
|
+
readonly projection: ProjectionManager;
|
|
273
|
+
readonly threeOrtho: THREE.OrthographicCamera;
|
|
274
|
+
protected readonly _userInputButtons: any;
|
|
275
|
+
protected readonly _frustumSize = 50;
|
|
276
|
+
protected readonly _navigationModes: Map<NavModeID, NavigationMode>;
|
|
277
|
+
get current(): THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
|
278
|
+
constructor(components: Components);
|
|
279
|
+
/** {@link Disposable.dispose} */
|
|
280
|
+
dispose(): void;
|
|
281
|
+
/**
|
|
282
|
+
* Sets a new {@link NavigationMode} and disables the previous one.
|
|
283
|
+
*
|
|
284
|
+
* @param mode - The {@link NavigationMode} to set.
|
|
285
|
+
*/
|
|
286
|
+
set(mode: NavModeID): void;
|
|
287
|
+
/**
|
|
288
|
+
* Make the camera view fit all the specified meshes.
|
|
289
|
+
*
|
|
290
|
+
* @param meshes the meshes to fit. If it is not defined, it will
|
|
291
|
+
* evaluate {@link Components.meshes}.
|
|
292
|
+
* @param offset the distance to the fit object
|
|
293
|
+
*/
|
|
294
|
+
fit(meshes: Iterable<THREE.Mesh>, offset?: number): Promise<void>;
|
|
295
|
+
/**
|
|
296
|
+
* Allows or prevents all user input.
|
|
297
|
+
*
|
|
298
|
+
* @param active - whether to enable or disable user inputs.
|
|
299
|
+
*/
|
|
300
|
+
setUserInput(active: boolean): void;
|
|
301
|
+
private disableUserInput;
|
|
302
|
+
private enableUserInput;
|
|
303
|
+
private newOrthoCamera;
|
|
304
|
+
private setOrthoCameraAspect;
|
|
305
|
+
}
|
|
306
|
+
import * as THREE from "three";
|
|
214
307
|
import { Component, Disposable, Event } from "../Types";
|
|
215
308
|
import { Components } from "../Components";
|
|
216
309
|
/**
|
|
@@ -259,98 +352,27 @@ export declare class Materials extends Component implements Disposable {
|
|
|
259
352
|
*/
|
|
260
353
|
removeMeshes(id: string, meshes: THREE.Mesh[]): void;
|
|
261
354
|
}
|
|
262
|
-
import { Component, Disposable, World, Event } from "../Types";
|
|
263
|
-
import { SimpleRaycaster } from "./src";
|
|
264
|
-
import { Components } from "../Components";
|
|
265
|
-
export declare class Raycasters extends Component implements Disposable {
|
|
266
|
-
static readonly uuid: "d5d8bdf0-db25-4952-b951-b643af207ace";
|
|
267
|
-
enabled: boolean;
|
|
268
|
-
list: Map<string, SimpleRaycaster>;
|
|
269
|
-
onDisposed: Event<unknown>;
|
|
270
|
-
constructor(components: Components);
|
|
271
|
-
get(world: World): SimpleRaycaster;
|
|
272
|
-
delete(world: World): void;
|
|
273
|
-
dispose(): void;
|
|
274
|
-
}
|
|
275
|
-
import { Component, Disposable, Updateable, World, Event, BaseScene, BaseCamera, BaseRenderer } from "../Types";
|
|
276
355
|
import { Components } from "../Components";
|
|
277
|
-
import {
|
|
278
|
-
|
|
279
|
-
static readonly uuid: "fdb61dc4-2ec1-4966-b83d-54ea795fad4a";
|
|
280
|
-
readonly onAfterUpdate: Event<unknown>;
|
|
281
|
-
readonly onBeforeUpdate: Event<unknown>;
|
|
282
|
-
readonly onDisposed: Event<unknown>;
|
|
283
|
-
list: Map<string, World>;
|
|
284
|
-
enabled: boolean;
|
|
285
|
-
constructor(components: Components);
|
|
286
|
-
create<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer>(): SimpleWorld<T, U, S>;
|
|
287
|
-
delete(world: World): void;
|
|
288
|
-
dispose(): void;
|
|
289
|
-
update(delta?: number): void | Promise<void>;
|
|
290
|
-
}
|
|
291
|
-
import * as THREE from "three";
|
|
292
|
-
import { Components } from "../../core/Components";
|
|
293
|
-
import { SimpleCamera } from "../../core";
|
|
294
|
-
import { NavigationMode, NavModeID, ProjectionManager } from "./src";
|
|
356
|
+
import { MeshCullerRenderer, CullerRendererSettings } from "./src";
|
|
357
|
+
import { Component, Event, Disposable, World } from "../Types";
|
|
295
358
|
/**
|
|
296
|
-
* A
|
|
297
|
-
*
|
|
298
|
-
* easily control the camera in 2D and 3D. It supports multiple navigation
|
|
299
|
-
* modes, such as 2D floor plan navigation, first person and 3D orbit.
|
|
359
|
+
* A tool to handle big scenes efficiently by automatically hiding the objects
|
|
360
|
+
* that are not visible to the camera.
|
|
300
361
|
*/
|
|
301
|
-
export declare class
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
readonly
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
protected readonly _navigationModes: Map<NavModeID, NavigationMode>;
|
|
311
|
-
get current(): THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
|
362
|
+
export declare class Cullers extends Component implements Disposable {
|
|
363
|
+
static readonly uuid: "69f2a50d-c266-44fc-b1bd-fa4d34be89e6";
|
|
364
|
+
private _enabled;
|
|
365
|
+
list: Map<string, MeshCullerRenderer>;
|
|
366
|
+
/** {@link Disposable.onDisposed} */
|
|
367
|
+
readonly onDisposed: Event<unknown>;
|
|
368
|
+
/** {@link Component.enabled} */
|
|
369
|
+
get enabled(): boolean;
|
|
370
|
+
set enabled(value: boolean);
|
|
312
371
|
constructor(components: Components);
|
|
372
|
+
create(world: World, config?: Partial<CullerRendererSettings>): MeshCullerRenderer;
|
|
373
|
+
delete(world: World): void;
|
|
313
374
|
/** {@link Disposable.dispose} */
|
|
314
375
|
dispose(): void;
|
|
315
|
-
/**
|
|
316
|
-
* Sets a new {@link NavigationMode} and disables the previous one.
|
|
317
|
-
*
|
|
318
|
-
* @param mode - The {@link NavigationMode} to set.
|
|
319
|
-
*/
|
|
320
|
-
set(mode: NavModeID): void;
|
|
321
|
-
/**
|
|
322
|
-
* Make the camera view fit all the specified meshes.
|
|
323
|
-
*
|
|
324
|
-
* @param meshes the meshes to fit. If it is not defined, it will
|
|
325
|
-
* evaluate {@link Components.meshes}.
|
|
326
|
-
* @param offset the distance to the fit object
|
|
327
|
-
*/
|
|
328
|
-
fit(meshes: Iterable<THREE.Mesh>, offset?: number): Promise<void>;
|
|
329
|
-
/**
|
|
330
|
-
* Allows or prevents all user input.
|
|
331
|
-
*
|
|
332
|
-
* @param active - whether to enable or disable user inputs.
|
|
333
|
-
*/
|
|
334
|
-
setUserInput(active: boolean): void;
|
|
335
|
-
private disableUserInput;
|
|
336
|
-
private enableUserInput;
|
|
337
|
-
private newOrthoCamera;
|
|
338
|
-
private setOrthoCameraAspect;
|
|
339
|
-
}
|
|
340
|
-
import { Component, Components, Disposable, Updateable, World, Event } from "../../core";
|
|
341
|
-
import { MiniMap } from "./src";
|
|
342
|
-
export declare class MiniMaps extends Component implements Updateable, Disposable {
|
|
343
|
-
static readonly uuid: "39ad6aad-84c8-4adf-a1e0-7f25313a9e7f";
|
|
344
|
-
readonly onAfterUpdate: Event<unknown>;
|
|
345
|
-
readonly onBeforeUpdate: Event<unknown>;
|
|
346
|
-
readonly onDisposed: Event<unknown>;
|
|
347
|
-
enabled: boolean;
|
|
348
|
-
list: Map<string, MiniMap>;
|
|
349
|
-
constructor(components: Components);
|
|
350
|
-
create(world: World): MiniMap;
|
|
351
|
-
delete(id: string): void;
|
|
352
|
-
dispose(): void | Promise<void>;
|
|
353
|
-
update(): void;
|
|
354
376
|
}
|
|
355
377
|
import * as WEBIFC from "web-ifc";
|
|
356
378
|
import * as FRAG from "@thatopen/fragments";
|
|
@@ -368,13 +390,6 @@ export declare class IfcJsonExporter {
|
|
|
368
390
|
*/
|
|
369
391
|
export(webIfc: WEBIFC.IfcAPI, modelID: number, indirect?: boolean, recursiveSpatial?: boolean): Promise<FRAG.IfcProperties>;
|
|
370
392
|
}
|
|
371
|
-
import * as THREE from "three";
|
|
372
|
-
export declare function obbFromPoints(vertices: ArrayLike<number>): {
|
|
373
|
-
center: THREE.Vector3;
|
|
374
|
-
halfSizes: THREE.Vector3;
|
|
375
|
-
rotation: THREE.Matrix3;
|
|
376
|
-
transformation: THREE.Matrix4;
|
|
377
|
-
};
|
|
378
393
|
import * as FRAGS from "@thatopen/fragments";
|
|
379
394
|
import { FragmentsGroup } from "@thatopen/fragments";
|
|
380
395
|
import { Disposable, Event, Component, Components } from "../../core";
|
|
@@ -412,100 +427,41 @@ export declare class IfcPropertiesFinder extends Component implements Disposable
|
|
|
412
427
|
private arrayUnion;
|
|
413
428
|
private getConditionFunctions;
|
|
414
429
|
}
|
|
415
|
-
import * as
|
|
430
|
+
import * as THREE from "three";
|
|
431
|
+
import * as FRAGS from "@thatopen/fragments";
|
|
416
432
|
import { FragmentsGroup } from "@thatopen/fragments";
|
|
417
|
-
import { Component, Disposable, Event
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
[expressID: number]: {
|
|
427
|
-
[attributeName: string]: Event<String | Boolean | Number>;
|
|
428
|
-
};
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
export declare class IfcPropertiesManager extends Component implements Disposable {
|
|
432
|
-
static readonly uuid: "58c2d9f0-183c-48d6-a402-dfcf5b9a34df";
|
|
433
|
-
/** {@link Disposable.onDisposed} */
|
|
434
|
-
readonly onDisposed: Event<string>;
|
|
435
|
-
readonly onRequestFile: Event<unknown>;
|
|
436
|
-
ifcToExport: ArrayBuffer | null;
|
|
437
|
-
readonly onElementToPset: Event<{
|
|
438
|
-
model: FragmentsGroup;
|
|
439
|
-
psetID: number;
|
|
440
|
-
elementID: number;
|
|
441
|
-
}>;
|
|
442
|
-
readonly onPropToPset: Event<{
|
|
443
|
-
model: FragmentsGroup;
|
|
444
|
-
psetID: number;
|
|
445
|
-
propID: number;
|
|
446
|
-
}>;
|
|
447
|
-
readonly onPsetRemoved: Event<{
|
|
448
|
-
model: FragmentsGroup;
|
|
449
|
-
psetID: number;
|
|
450
|
-
}>;
|
|
451
|
-
readonly onDataChanged: Event<{
|
|
452
|
-
model: FragmentsGroup;
|
|
453
|
-
expressID: number;
|
|
454
|
-
}>;
|
|
455
|
-
wasm: {
|
|
456
|
-
path: string;
|
|
457
|
-
absolute: boolean;
|
|
458
|
-
};
|
|
459
|
-
enabled: boolean;
|
|
460
|
-
attributeListeners: AttributeListener;
|
|
461
|
-
selectedModel?: FragmentsGroup;
|
|
462
|
-
private _changeMap;
|
|
463
|
-
constructor(components: Components);
|
|
464
|
-
get(): ChangeMap;
|
|
465
|
-
dispose(): void;
|
|
466
|
-
private increaseMaxID;
|
|
467
|
-
static getIFCSchema(model: FragmentsGroup): import("@thatopen/fragments").IfcSchema;
|
|
468
|
-
private newGUID;
|
|
469
|
-
private getOwnerHistory;
|
|
470
|
-
private registerChange;
|
|
471
|
-
setData(model: FragmentsGroup, ...dataToSave: Record<string, any>[]): Promise<void>;
|
|
472
|
-
newPset(model: FragmentsGroup, name: string, description?: string): Promise<{
|
|
473
|
-
pset: WEBIFC.IFC2X3.IfcPropertySet | WEBIFC.IFC4.IfcPropertySet | WEBIFC.IFC4X3.IfcPropertySet;
|
|
474
|
-
rel: WEBIFC.IFC4X3.IfcRelDefinesByProperties | WEBIFC.IFC4.IfcRelDefinesByProperties | WEBIFC.IFC2X3.IfcRelDefinesByProperties;
|
|
475
|
-
}>;
|
|
476
|
-
removePset(model: FragmentsGroup, ...psetID: number[]): Promise<void>;
|
|
477
|
-
private newSingleProperty;
|
|
478
|
-
newSingleStringProperty(model: FragmentsGroup, type: StringPropTypes, name: string, value: string): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
|
|
479
|
-
newSingleNumericProperty(model: FragmentsGroup, type: NumericPropTypes, name: string, value: number): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
|
|
480
|
-
newSingleBooleanProperty(model: FragmentsGroup, type: BooleanPropTypes, name: string, value: boolean): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
|
|
481
|
-
removePsetProp(model: FragmentsGroup, psetID: number, propID: number): Promise<void>;
|
|
482
|
-
addElementToPset(model: FragmentsGroup, psetID: number, ...elementID: number[]): Promise<void>;
|
|
483
|
-
addPropToPset(model: FragmentsGroup, psetID: number, ...propID: number[]): Promise<void>;
|
|
484
|
-
saveToIfc(model: FragmentsGroup, ifcToSaveOn: Uint8Array): Promise<Uint8Array>;
|
|
485
|
-
setAttributeListener(model: FragmentsGroup, expressID: number, attributeName: string): Promise<Event<String | Number | Boolean>>;
|
|
486
|
-
}
|
|
487
|
-
export {};
|
|
488
|
-
import { Components } from "../Components";
|
|
489
|
-
import { MeshCullerRenderer, CullerRendererSettings } from "./src";
|
|
490
|
-
import { Component, Event, Disposable, World } from "../Types";
|
|
491
|
-
/**
|
|
492
|
-
* A tool to handle big scenes efficiently by automatically hiding the objects
|
|
493
|
-
* that are not visible to the camera.
|
|
494
|
-
*/
|
|
495
|
-
export declare class Cullers extends Component implements Disposable {
|
|
496
|
-
static readonly uuid: "69f2a50d-c266-44fc-b1bd-fa4d34be89e6";
|
|
497
|
-
private _enabled;
|
|
498
|
-
list: Map<string, MeshCullerRenderer>;
|
|
433
|
+
import { Component, Components, Disposable, Event } from "../../core";
|
|
434
|
+
/**
|
|
435
|
+
* A simple implementation of bounding box that works for fragments. The resulting bbox is not 100% precise, but
|
|
436
|
+
* it's fast, and should suffice for general use cases such as camera zooming or general boundary determination.
|
|
437
|
+
*/
|
|
438
|
+
export declare class BoundingBoxes extends Component implements Disposable {
|
|
439
|
+
static readonly uuid: "d1444724-dba6-4cdd-a0c7-68ee1450d166";
|
|
440
|
+
/** {@link Component.enabled} */
|
|
441
|
+
enabled: boolean;
|
|
499
442
|
/** {@link Disposable.onDisposed} */
|
|
500
443
|
readonly onDisposed: Event<unknown>;
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
444
|
+
private _absoluteMin;
|
|
445
|
+
private _absoluteMax;
|
|
446
|
+
private _meshes;
|
|
504
447
|
constructor(components: Components);
|
|
505
|
-
|
|
506
|
-
|
|
448
|
+
static getDimensions(bbox: THREE.Box3): {
|
|
449
|
+
width: number;
|
|
450
|
+
height: number;
|
|
451
|
+
depth: number;
|
|
452
|
+
center: THREE.Vector3;
|
|
453
|
+
};
|
|
454
|
+
static newBound(positive: boolean): THREE.Vector3;
|
|
455
|
+
static getBounds(points: THREE.Vector3[], min?: THREE.Vector3, max?: THREE.Vector3): THREE.Box3;
|
|
507
456
|
/** {@link Disposable.dispose} */
|
|
508
457
|
dispose(): void;
|
|
458
|
+
get(): THREE.Box3;
|
|
459
|
+
getSphere(): THREE.Sphere;
|
|
460
|
+
getMesh(): THREE.Mesh<THREE.BoxGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
|
|
461
|
+
reset(): void;
|
|
462
|
+
add(group: FragmentsGroup): void;
|
|
463
|
+
addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh, itemIDs?: Iterable<number>): void;
|
|
464
|
+
private static getFragmentBounds;
|
|
509
465
|
}
|
|
510
466
|
import * as WEBIFC from "web-ifc";
|
|
511
467
|
import { FragmentsGroup } from "@thatopen/fragments";
|
|
@@ -643,42 +599,85 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
|
|
|
643
599
|
dispose(): void;
|
|
644
600
|
}
|
|
645
601
|
import * as THREE from "three";
|
|
646
|
-
|
|
602
|
+
export declare function obbFromPoints(vertices: ArrayLike<number>): {
|
|
603
|
+
center: THREE.Vector3;
|
|
604
|
+
halfSizes: THREE.Vector3;
|
|
605
|
+
rotation: THREE.Matrix3;
|
|
606
|
+
transformation: THREE.Matrix4;
|
|
607
|
+
};
|
|
608
|
+
import * as WEBIFC from "web-ifc";
|
|
647
609
|
import { FragmentsGroup } from "@thatopen/fragments";
|
|
648
|
-
import { Component,
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
610
|
+
import { Component, Disposable, Event, Components } from "../../core";
|
|
611
|
+
type BooleanPropTypes = "IfcBoolean" | "IfcLogical";
|
|
612
|
+
type StringPropTypes = "IfcText" | "IfcLabel" | "IfcIdentifier";
|
|
613
|
+
type NumericPropTypes = "IfcInteger" | "IfcReal";
|
|
614
|
+
interface ChangeMap {
|
|
615
|
+
[modelID: string]: Set<number>;
|
|
616
|
+
}
|
|
617
|
+
interface AttributeListener {
|
|
618
|
+
[modelID: string]: {
|
|
619
|
+
[expressID: number]: {
|
|
620
|
+
[attributeName: string]: Event<String | Boolean | Number>;
|
|
621
|
+
};
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
export declare class IfcPropertiesManager extends Component implements Disposable {
|
|
625
|
+
static readonly uuid: "58c2d9f0-183c-48d6-a402-dfcf5b9a34df";
|
|
657
626
|
/** {@link Disposable.onDisposed} */
|
|
658
|
-
readonly onDisposed: Event<
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
627
|
+
readonly onDisposed: Event<string>;
|
|
628
|
+
readonly onRequestFile: Event<unknown>;
|
|
629
|
+
ifcToExport: ArrayBuffer | null;
|
|
630
|
+
readonly onElementToPset: Event<{
|
|
631
|
+
model: FragmentsGroup;
|
|
632
|
+
psetID: number;
|
|
633
|
+
elementID: number;
|
|
634
|
+
}>;
|
|
635
|
+
readonly onPropToPset: Event<{
|
|
636
|
+
model: FragmentsGroup;
|
|
637
|
+
psetID: number;
|
|
638
|
+
propID: number;
|
|
639
|
+
}>;
|
|
640
|
+
readonly onPsetRemoved: Event<{
|
|
641
|
+
model: FragmentsGroup;
|
|
642
|
+
psetID: number;
|
|
643
|
+
}>;
|
|
644
|
+
readonly onDataChanged: Event<{
|
|
645
|
+
model: FragmentsGroup;
|
|
646
|
+
expressID: number;
|
|
647
|
+
}>;
|
|
648
|
+
wasm: {
|
|
649
|
+
path: string;
|
|
650
|
+
absolute: boolean;
|
|
668
651
|
};
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
652
|
+
enabled: boolean;
|
|
653
|
+
attributeListeners: AttributeListener;
|
|
654
|
+
selectedModel?: FragmentsGroup;
|
|
655
|
+
private _changeMap;
|
|
656
|
+
constructor(components: Components);
|
|
657
|
+
get(): ChangeMap;
|
|
672
658
|
dispose(): void;
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
659
|
+
private increaseMaxID;
|
|
660
|
+
static getIFCSchema(model: FragmentsGroup): import("@thatopen/fragments").IfcSchema;
|
|
661
|
+
private newGUID;
|
|
662
|
+
private getOwnerHistory;
|
|
663
|
+
private registerChange;
|
|
664
|
+
setData(model: FragmentsGroup, ...dataToSave: Record<string, any>[]): Promise<void>;
|
|
665
|
+
newPset(model: FragmentsGroup, name: string, description?: string): Promise<{
|
|
666
|
+
pset: WEBIFC.IFC2X3.IfcPropertySet | WEBIFC.IFC4.IfcPropertySet | WEBIFC.IFC4X3.IfcPropertySet;
|
|
667
|
+
rel: WEBIFC.IFC4X3.IfcRelDefinesByProperties | WEBIFC.IFC4.IfcRelDefinesByProperties | WEBIFC.IFC2X3.IfcRelDefinesByProperties;
|
|
668
|
+
}>;
|
|
669
|
+
removePset(model: FragmentsGroup, ...psetID: number[]): Promise<void>;
|
|
670
|
+
private newSingleProperty;
|
|
671
|
+
newSingleStringProperty(model: FragmentsGroup, type: StringPropTypes, name: string, value: string): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
|
|
672
|
+
newSingleNumericProperty(model: FragmentsGroup, type: NumericPropTypes, name: string, value: number): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
|
|
673
|
+
newSingleBooleanProperty(model: FragmentsGroup, type: BooleanPropTypes, name: string, value: boolean): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
|
|
674
|
+
removePsetProp(model: FragmentsGroup, psetID: number, propID: number): Promise<void>;
|
|
675
|
+
addElementToPset(model: FragmentsGroup, psetID: number, ...elementID: number[]): Promise<void>;
|
|
676
|
+
addPropToPset(model: FragmentsGroup, psetID: number, ...propID: number[]): Promise<void>;
|
|
677
|
+
saveToIfc(model: FragmentsGroup, ifcToSaveOn: Uint8Array): Promise<Uint8Array>;
|
|
678
|
+
setAttributeListener(model: FragmentsGroup, expressID: number, attributeName: string): Promise<Event<String | Number | Boolean>>;
|
|
680
679
|
}
|
|
681
|
-
export
|
|
680
|
+
export {};
|
|
682
681
|
import * as FRAGS from "@thatopen/fragments";
|
|
683
682
|
import { Components, Component } from "../../core";
|
|
684
683
|
export declare class FragmentHider extends Component {
|
|
@@ -689,37 +688,6 @@ export declare class FragmentHider extends Component {
|
|
|
689
688
|
isolate(items: FRAGS.FragmentIdMap): void;
|
|
690
689
|
private updateCulledVisibility;
|
|
691
690
|
}
|
|
692
|
-
import * as THREE from "three";
|
|
693
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
694
|
-
import { Disposable, Component, Event, Components } from "../../core";
|
|
695
|
-
export interface Classification {
|
|
696
|
-
[system: string]: {
|
|
697
|
-
[className: string]: FRAGS.FragmentIdMap;
|
|
698
|
-
};
|
|
699
|
-
}
|
|
700
|
-
export declare class FragmentClassifier extends Component implements Disposable {
|
|
701
|
-
static readonly uuid: "e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7";
|
|
702
|
-
/** {@link Component.enabled} */
|
|
703
|
-
enabled: boolean;
|
|
704
|
-
list: Classification;
|
|
705
|
-
/** {@link Disposable.onDisposed} */
|
|
706
|
-
readonly onDisposed: Event<unknown>;
|
|
707
|
-
constructor(components: Components);
|
|
708
|
-
private onFragmentsDisposed;
|
|
709
|
-
dispose(): void;
|
|
710
|
-
remove(guid: string): void;
|
|
711
|
-
find(filter?: {
|
|
712
|
-
[name: string]: string[];
|
|
713
|
-
}): FRAGS.FragmentIdMap;
|
|
714
|
-
byModel(modelID: string, group: FRAGS.FragmentsGroup): void;
|
|
715
|
-
byPredefinedType(group: FRAGS.FragmentsGroup): Promise<void>;
|
|
716
|
-
byEntity(group: FRAGS.FragmentsGroup): void;
|
|
717
|
-
byStorey(group: FRAGS.FragmentsGroup): void;
|
|
718
|
-
byIfcRel(group: FRAGS.FragmentsGroup, ifcRel: number, systemName: string): Promise<void>;
|
|
719
|
-
setColor(items: FRAGS.FragmentIdMap, color: THREE.Color, override?: boolean): void;
|
|
720
|
-
resetColor(items: FRAGS.FragmentIdMap): void;
|
|
721
|
-
private saveItem;
|
|
722
|
-
}
|
|
723
691
|
import { Component, Disposable, Event, Components } from "../../core";
|
|
724
692
|
export declare class FragmentExploder extends Component implements Disposable {
|
|
725
693
|
static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
|
|
@@ -767,71 +735,36 @@ export declare class FragmentIfcLoader extends Component implements Disposable {
|
|
|
767
735
|
private getGeometry;
|
|
768
736
|
private autoSetWasm;
|
|
769
737
|
}
|
|
770
|
-
import * as
|
|
771
|
-
import
|
|
772
|
-
import {
|
|
773
|
-
export
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
data: {
|
|
778
|
-
[id: number]: any;
|
|
779
|
-
};
|
|
780
|
-
}>;
|
|
781
|
-
onProgress: AsyncEvent<number>;
|
|
782
|
-
onIndicesStreamed: AsyncEvent<Map<number, Map<number, number[]>>>;
|
|
783
|
-
/** {@link Disposable.onDisposed} */
|
|
784
|
-
readonly onDisposed: Event<string>;
|
|
785
|
-
enabled: boolean;
|
|
786
|
-
settings: PropertiesStreamingSettings;
|
|
787
|
-
webIfc: WEBIFC.IfcAPI;
|
|
788
|
-
dispose(): Promise<void>;
|
|
789
|
-
streamFromBuffer(data: Uint8Array): Promise<void>;
|
|
790
|
-
streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
|
|
791
|
-
private readIfcFile;
|
|
792
|
-
private streamIfcFile;
|
|
793
|
-
private streamAllProperties;
|
|
794
|
-
private cleanUp;
|
|
738
|
+
import * as THREE from "three";
|
|
739
|
+
import * as FRAGS from "@thatopen/fragments";
|
|
740
|
+
import { Disposable, Component, Event, Components } from "../../core";
|
|
741
|
+
export interface Classification {
|
|
742
|
+
[system: string]: {
|
|
743
|
+
[className: string]: FRAGS.FragmentIdMap;
|
|
744
|
+
};
|
|
795
745
|
}
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
onGeometryStreamed: Event<{
|
|
802
|
-
buffer: Uint8Array;
|
|
803
|
-
data: StreamedGeometries;
|
|
804
|
-
}>;
|
|
805
|
-
onAssetStreamed: Event<StreamedAsset[]>;
|
|
806
|
-
onProgress: Event<number>;
|
|
807
|
-
onIfcLoaded: Event<Uint8Array>;
|
|
746
|
+
export declare class FragmentClassifier extends Component implements Disposable {
|
|
747
|
+
static readonly uuid: "e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7";
|
|
748
|
+
/** {@link Component.enabled} */
|
|
749
|
+
enabled: boolean;
|
|
750
|
+
list: Classification;
|
|
808
751
|
/** {@link Disposable.onDisposed} */
|
|
809
752
|
readonly onDisposed: Event<unknown>;
|
|
810
|
-
settings: IfcStreamingSettings;
|
|
811
|
-
enabled: boolean;
|
|
812
|
-
webIfc: WEBIFC.IfcAPI;
|
|
813
|
-
private _spatialTree;
|
|
814
|
-
private _metaData;
|
|
815
|
-
private _visitedGeometries;
|
|
816
|
-
private _streamSerializer;
|
|
817
|
-
private _geometries;
|
|
818
|
-
private _geometryCount;
|
|
819
|
-
private _civil;
|
|
820
|
-
private _groupSerializer;
|
|
821
|
-
private _assets;
|
|
822
|
-
private _meshesWithHoles;
|
|
823
753
|
constructor(components: Components);
|
|
754
|
+
private onFragmentsDisposed;
|
|
824
755
|
dispose(): void;
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
756
|
+
remove(guid: string): void;
|
|
757
|
+
find(filter?: {
|
|
758
|
+
[name: string]: string[];
|
|
759
|
+
}): FRAGS.FragmentIdMap;
|
|
760
|
+
byModel(modelID: string, group: FRAGS.FragmentsGroup): void;
|
|
761
|
+
byPredefinedType(group: FRAGS.FragmentsGroup): Promise<void>;
|
|
762
|
+
byEntity(group: FRAGS.FragmentsGroup): void;
|
|
763
|
+
byStorey(group: FRAGS.FragmentsGroup): void;
|
|
764
|
+
byIfcRel(group: FRAGS.FragmentsGroup, ifcRel: number, systemName: string): Promise<void>;
|
|
765
|
+
setColor(items: FRAGS.FragmentIdMap, color: THREE.Color, override?: boolean): void;
|
|
766
|
+
resetColor(items: FRAGS.FragmentIdMap): void;
|
|
767
|
+
private saveItem;
|
|
835
768
|
}
|
|
836
769
|
import { Fragment, FragmentsGroup } from "@thatopen/fragments";
|
|
837
770
|
import * as THREE from "three";
|
|
@@ -877,6 +810,93 @@ export declare class FragmentManager extends Component implements Disposable {
|
|
|
877
810
|
export(group: FragmentsGroup): Uint8Array;
|
|
878
811
|
coordinate(models?: FragmentsGroup[]): void;
|
|
879
812
|
}
|
|
813
|
+
import * as WEBIFC from "web-ifc";
|
|
814
|
+
import { AsyncEvent, Component, Disposable, Event } from "../../core";
|
|
815
|
+
import { PropertiesStreamingSettings } from "../IfcGeometryTiler";
|
|
816
|
+
export declare class IfcPropertiesTiler extends Component implements Disposable {
|
|
817
|
+
static readonly uuid: "88d2c89c-ce32-47d7-8cb6-d51e4b311a0b";
|
|
818
|
+
onPropertiesStreamed: AsyncEvent<{
|
|
819
|
+
type: number;
|
|
820
|
+
data: {
|
|
821
|
+
[id: number]: any;
|
|
822
|
+
};
|
|
823
|
+
}>;
|
|
824
|
+
onProgress: AsyncEvent<number>;
|
|
825
|
+
onIndicesStreamed: AsyncEvent<Map<number, Map<number, number[]>>>;
|
|
826
|
+
/** {@link Disposable.onDisposed} */
|
|
827
|
+
readonly onDisposed: Event<string>;
|
|
828
|
+
enabled: boolean;
|
|
829
|
+
settings: PropertiesStreamingSettings;
|
|
830
|
+
webIfc: WEBIFC.IfcAPI;
|
|
831
|
+
dispose(): Promise<void>;
|
|
832
|
+
streamFromBuffer(data: Uint8Array): Promise<void>;
|
|
833
|
+
streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
|
|
834
|
+
private readIfcFile;
|
|
835
|
+
private streamIfcFile;
|
|
836
|
+
private streamAllProperties;
|
|
837
|
+
private cleanUp;
|
|
838
|
+
}
|
|
839
|
+
import * as THREE from "three";
|
|
840
|
+
export interface MeasureEdge {
|
|
841
|
+
distance: number;
|
|
842
|
+
points: THREE.Vector3[];
|
|
843
|
+
}
|
|
844
|
+
export declare class MeasurementUtils {
|
|
845
|
+
static getFace(mesh: THREE.InstancedMesh | THREE.Mesh, triangleIndex: number, instance?: number): {
|
|
846
|
+
edges: MeasureEdge[];
|
|
847
|
+
indices: Set<number>;
|
|
848
|
+
} | null;
|
|
849
|
+
static distanceFromPointToLine(point: THREE.Vector3, lineStart: THREE.Vector3, lineEnd: THREE.Vector3, clamp?: boolean): number;
|
|
850
|
+
private static getFaceData;
|
|
851
|
+
static getVerticesAndNormal(mesh: THREE.Mesh | THREE.InstancedMesh, faceIndex: number, instance: number | undefined): {
|
|
852
|
+
p1: THREE.Vector3;
|
|
853
|
+
p2: THREE.Vector3;
|
|
854
|
+
p3: THREE.Vector3;
|
|
855
|
+
faceNormal: THREE.Vector3;
|
|
856
|
+
};
|
|
857
|
+
private static round;
|
|
858
|
+
}
|
|
859
|
+
import * as WEBIFC from "web-ifc";
|
|
860
|
+
import { Components, Disposable, Event, Component } from "../../core";
|
|
861
|
+
import { IfcStreamingSettings, StreamedGeometries, StreamedAsset } from "./src";
|
|
862
|
+
export declare class IfcGeometryTiler extends Component implements Disposable {
|
|
863
|
+
static readonly uuid: "d9999a00-e1f5-4d3f-8cfe-c56e08609764";
|
|
864
|
+
onGeometryStreamed: Event<{
|
|
865
|
+
buffer: Uint8Array;
|
|
866
|
+
data: StreamedGeometries;
|
|
867
|
+
}>;
|
|
868
|
+
onAssetStreamed: Event<StreamedAsset[]>;
|
|
869
|
+
onProgress: Event<number>;
|
|
870
|
+
onIfcLoaded: Event<Uint8Array>;
|
|
871
|
+
/** {@link Disposable.onDisposed} */
|
|
872
|
+
readonly onDisposed: Event<unknown>;
|
|
873
|
+
settings: IfcStreamingSettings;
|
|
874
|
+
enabled: boolean;
|
|
875
|
+
webIfc: WEBIFC.IfcAPI;
|
|
876
|
+
private _spatialTree;
|
|
877
|
+
private _metaData;
|
|
878
|
+
private _visitedGeometries;
|
|
879
|
+
private _streamSerializer;
|
|
880
|
+
private _geometries;
|
|
881
|
+
private _geometryCount;
|
|
882
|
+
private _civil;
|
|
883
|
+
private _groupSerializer;
|
|
884
|
+
private _assets;
|
|
885
|
+
private _meshesWithHoles;
|
|
886
|
+
constructor(components: Components);
|
|
887
|
+
dispose(): void;
|
|
888
|
+
streamFromBuffer(data: Uint8Array): Promise<void>;
|
|
889
|
+
streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
|
|
890
|
+
private readIfcFile;
|
|
891
|
+
private streamIfcFile;
|
|
892
|
+
private streamAllGeometries;
|
|
893
|
+
private cleanUp;
|
|
894
|
+
private getMesh;
|
|
895
|
+
private getGeometry;
|
|
896
|
+
private streamAssets;
|
|
897
|
+
private streamGeometries;
|
|
898
|
+
}
|
|
899
|
+
export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
|
|
880
900
|
import * as THREE from "three";
|
|
881
901
|
export declare class MaterialsUtils {
|
|
882
902
|
static isTransparent(material: THREE.Material): boolean;
|
|
@@ -918,9 +938,6 @@ export declare class VertexPicker extends Component implements Disposable {
|
|
|
918
938
|
private getVertices;
|
|
919
939
|
private getVertex;
|
|
920
940
|
}
|
|
921
|
-
export declare const IfcElements: {
|
|
922
|
-
[key: number]: string;
|
|
923
|
-
};
|
|
924
941
|
import * as WEBIFC from "web-ifc";
|
|
925
942
|
export interface IfcItemsCategories {
|
|
926
943
|
[itemID: number]: number;
|
|
@@ -956,27 +973,9 @@ export declare class IfcPropertiesUtils {
|
|
|
956
973
|
export declare const IfcCategoryMap: {
|
|
957
974
|
[key: number]: string;
|
|
958
975
|
};
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
points: THREE.Vector3[];
|
|
963
|
-
}
|
|
964
|
-
export declare class MeasurementUtils {
|
|
965
|
-
static getFace(mesh: THREE.InstancedMesh | THREE.Mesh, triangleIndex: number, instance?: number): {
|
|
966
|
-
edges: MeasureEdge[];
|
|
967
|
-
indices: Set<number>;
|
|
968
|
-
} | null;
|
|
969
|
-
static distanceFromPointToLine(point: THREE.Vector3, lineStart: THREE.Vector3, lineEnd: THREE.Vector3, clamp?: boolean): number;
|
|
970
|
-
private static getFaceData;
|
|
971
|
-
static getVerticesAndNormal(mesh: THREE.Mesh | THREE.InstancedMesh, faceIndex: number, instance: number | undefined): {
|
|
972
|
-
p1: THREE.Vector3;
|
|
973
|
-
p2: THREE.Vector3;
|
|
974
|
-
p3: THREE.Vector3;
|
|
975
|
-
faceNormal: THREE.Vector3;
|
|
976
|
-
};
|
|
977
|
-
private static round;
|
|
978
|
-
}
|
|
979
|
-
export declare const GeometryTypes: Set<number>;
|
|
976
|
+
export declare const IfcElements: {
|
|
977
|
+
[key: number]: string;
|
|
978
|
+
};
|
|
980
979
|
import * as THREE from "three";
|
|
981
980
|
import { Event, Resizeable, Updateable, Disposable, World } from "../../../core";
|
|
982
981
|
export declare class MiniMap implements Resizeable, Updateable, Disposable {
|
|
@@ -1011,10 +1010,70 @@ export declare class MiniMap implements Resizeable, Updateable, Disposable {
|
|
|
1011
1010
|
resize(size?: THREE.Vector2): void;
|
|
1012
1011
|
private updatePlanes;
|
|
1013
1012
|
}
|
|
1013
|
+
export declare const GeometryTypes: Set<number>;
|
|
1014
|
+
export declare const getRelationMap: (properties: Record<string, Record<string, any>>, relationType: number, onElementsFound?: ((relatingID: number, relatedIDs: number[]) => void) | undefined) => {
|
|
1015
|
+
[relatingID: number]: number[];
|
|
1016
|
+
};
|
|
1014
1017
|
export declare const relToAttributesMap: Map<number, {
|
|
1015
1018
|
forRelating?: "IsDecomposedBy" | "Decomposes" | "AssociatedTo" | "HasAssociations" | "ClassificationForObjects" | "IsGroupedBy" | "HasAssignments" | "IsDefinedBy" | "DefinesOcurrence" | "IsTypedBy" | "Types" | "Defines" | "ContainedInStructure" | "ContainsElements" | undefined;
|
|
1016
1019
|
forRelated?: "IsDecomposedBy" | "Decomposes" | "AssociatedTo" | "HasAssociations" | "ClassificationForObjects" | "IsGroupedBy" | "HasAssignments" | "IsDefinedBy" | "DefinesOcurrence" | "IsTypedBy" | "Types" | "Defines" | "ContainedInStructure" | "ContainsElements" | undefined;
|
|
1017
1020
|
}>;
|
|
1021
|
+
import * as THREE from "three";
|
|
1022
|
+
import { BaseScene, Configurable, Event } from "../../Types";
|
|
1023
|
+
import { Components } from "../../Components";
|
|
1024
|
+
export interface SimpleSceneConfig {
|
|
1025
|
+
directionalLight: {
|
|
1026
|
+
color: THREE.Color;
|
|
1027
|
+
intensity: number;
|
|
1028
|
+
position: THREE.Vector3;
|
|
1029
|
+
};
|
|
1030
|
+
ambientLight: {
|
|
1031
|
+
color: THREE.Color;
|
|
1032
|
+
intensity: number;
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* A basic 3D [scene](https://threejs.org/docs/#api/en/scenes/Scene) to add
|
|
1037
|
+
* objects hierarchically, and easily dispose them when you are finished with it.
|
|
1038
|
+
* @noInheritDoc
|
|
1039
|
+
*/
|
|
1040
|
+
export declare class SimpleScene extends BaseScene implements Configurable<{}> {
|
|
1041
|
+
/** {@link Configurable.isSetup} */
|
|
1042
|
+
isSetup: boolean;
|
|
1043
|
+
three: THREE.Scene;
|
|
1044
|
+
/** {@link Configurable.onSetup} */
|
|
1045
|
+
readonly onSetup: Event<SimpleScene>;
|
|
1046
|
+
config: Required<SimpleSceneConfig>;
|
|
1047
|
+
constructor(components: Components);
|
|
1048
|
+
/** Creates a simple and nice default set up for the scene (e.g. lighting). */
|
|
1049
|
+
setup(config?: Partial<SimpleSceneConfig>): void;
|
|
1050
|
+
}
|
|
1051
|
+
import * as THREE from "three";
|
|
1052
|
+
import { Event, Base, World, BaseScene, BaseCamera, BaseRenderer } from "../../Types";
|
|
1053
|
+
import { Components } from "../../Components";
|
|
1054
|
+
export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer> extends Base implements World {
|
|
1055
|
+
/**
|
|
1056
|
+
* All the loaded [meshes](https://threejs.org/docs/#api/en/objects/Mesh).
|
|
1057
|
+
*/
|
|
1058
|
+
readonly meshes: Set<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1059
|
+
readonly onAfterUpdate: Event<unknown>;
|
|
1060
|
+
readonly onBeforeUpdate: Event<unknown>;
|
|
1061
|
+
enabled: boolean;
|
|
1062
|
+
uuid: string;
|
|
1063
|
+
readonly onDisposed: Event<unknown>;
|
|
1064
|
+
private _scene?;
|
|
1065
|
+
private _camera?;
|
|
1066
|
+
private _renderer;
|
|
1067
|
+
get scene(): T;
|
|
1068
|
+
set scene(scene: T);
|
|
1069
|
+
get camera(): U;
|
|
1070
|
+
set camera(camera: U);
|
|
1071
|
+
get renderer(): S | null;
|
|
1072
|
+
set renderer(renderer: S | null);
|
|
1073
|
+
constructor(components: Components);
|
|
1074
|
+
update(delta?: number): void;
|
|
1075
|
+
dispose(disposeResources?: boolean): void;
|
|
1076
|
+
}
|
|
1018
1077
|
import * as WEBIFC from "web-ifc";
|
|
1019
1078
|
import { IfcItemsCategories } from "../../../ifc";
|
|
1020
1079
|
export declare class SpatialStructure {
|
|
@@ -1023,106 +1082,83 @@ export declare class SpatialStructure {
|
|
|
1023
1082
|
setUp(webIfc: WEBIFC.IfcAPI): void;
|
|
1024
1083
|
cleanUp(): void;
|
|
1025
1084
|
}
|
|
1085
|
+
import { NavigationMode } from "./types";
|
|
1086
|
+
/**
|
|
1087
|
+
* A {@link NavigationMode} that allows 3D navigation and panning
|
|
1088
|
+
* like in many 3D and CAD softwares.
|
|
1089
|
+
*/
|
|
1090
|
+
export declare class OrbitMode implements NavigationMode {
|
|
1091
|
+
camera: any;
|
|
1092
|
+
/** {@link NavigationMode.enabled} */
|
|
1093
|
+
enabled: boolean;
|
|
1094
|
+
/** {@link NavigationMode.id} */
|
|
1095
|
+
readonly id = "Orbit";
|
|
1096
|
+
constructor(camera: any);
|
|
1097
|
+
/** {@link NavigationMode.set} */
|
|
1098
|
+
set(active: boolean): void;
|
|
1099
|
+
private activateOrbitControls;
|
|
1100
|
+
}
|
|
1026
1101
|
import * as THREE from "three";
|
|
1027
|
-
import
|
|
1102
|
+
import CameraControls from "camera-controls";
|
|
1103
|
+
import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
|
|
1104
|
+
import { Components } from "../../Components";
|
|
1028
1105
|
/**
|
|
1029
|
-
* A
|
|
1030
|
-
*
|
|
1031
|
-
*
|
|
1032
|
-
*
|
|
1106
|
+
* A basic camera that uses
|
|
1107
|
+
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
|
|
1108
|
+
* easily control the camera in 2D and 3D. Check out it's API to find out
|
|
1109
|
+
* what features it offers.
|
|
1033
1110
|
*/
|
|
1034
|
-
export declare class
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1111
|
+
export declare class SimpleCamera extends BaseCamera implements Updateable, Disposable {
|
|
1112
|
+
/** {@link Updateable.onBeforeUpdate} */
|
|
1113
|
+
readonly onBeforeUpdate: Event<SimpleCamera>;
|
|
1114
|
+
/** {@link Updateable.onAfterUpdate} */
|
|
1115
|
+
readonly onAfterUpdate: Event<SimpleCamera>;
|
|
1116
|
+
readonly onAspectUpdated: Event<unknown>;
|
|
1038
1117
|
/** {@link Disposable.onDisposed} */
|
|
1039
|
-
readonly onDisposed: Event<
|
|
1040
|
-
|
|
1118
|
+
readonly onDisposed: Event<string>;
|
|
1119
|
+
readonly three: THREE.PerspectiveCamera;
|
|
1120
|
+
private _allControls;
|
|
1041
1121
|
/**
|
|
1042
|
-
* The
|
|
1122
|
+
* The object that controls the camera. An instance of
|
|
1123
|
+
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls).
|
|
1124
|
+
* Transforming the camera directly will have no effect: you need to use this
|
|
1125
|
+
* object to move, rotate, look at objects, etc.
|
|
1043
1126
|
*/
|
|
1044
|
-
get
|
|
1045
|
-
/** {@link Disposable.dispose} */
|
|
1046
|
-
dispose(): void;
|
|
1047
|
-
private getPositionY;
|
|
1048
|
-
private getPositionX;
|
|
1049
|
-
private updateMouseInfo;
|
|
1050
|
-
private setupEvents;
|
|
1051
|
-
}
|
|
1052
|
-
export declare const getRelationMap: (properties: Record<string, Record<string, any>>, relationType: number, onElementsFound?: ((relatingID: number, relatedIDs: number[]) => void) | undefined) => {
|
|
1053
|
-
[relatingID: number]: number[];
|
|
1054
|
-
};
|
|
1055
|
-
import * as THREE from "three";
|
|
1056
|
-
import { Components } from "../../Components";
|
|
1057
|
-
import { Event, World, Disposable } from "../../Types";
|
|
1058
|
-
import { Mouse } from "./mouse";
|
|
1059
|
-
/**
|
|
1060
|
-
* A simple [raycaster](https://threejs.org/docs/#api/en/core/Raycaster)
|
|
1061
|
-
* that allows to easily get items from the scene using the mouse and touch
|
|
1062
|
-
* events.
|
|
1063
|
-
*/
|
|
1064
|
-
export declare class SimpleRaycaster implements Disposable {
|
|
1127
|
+
get controls(): CameraControls;
|
|
1065
1128
|
/** {@link Component.enabled} */
|
|
1066
|
-
enabled: boolean;
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
/** The position of the mouse in the screen. */
|
|
1071
|
-
readonly mouse: Mouse;
|
|
1072
|
-
readonly three: THREE.Raycaster;
|
|
1073
|
-
world: World;
|
|
1074
|
-
constructor(components: Components, world: World);
|
|
1129
|
+
get enabled(): boolean;
|
|
1130
|
+
/** {@link Component.enabled} */
|
|
1131
|
+
set enabled(enabled: boolean);
|
|
1132
|
+
constructor(components: Components);
|
|
1075
1133
|
/** {@link Disposable.dispose} */
|
|
1076
1134
|
dispose(): void;
|
|
1135
|
+
/** {@link Updateable.update} */
|
|
1136
|
+
update(_delta: number): void;
|
|
1077
1137
|
/**
|
|
1078
|
-
*
|
|
1079
|
-
*
|
|
1080
|
-
* used by the renderer.
|
|
1081
|
-
*
|
|
1082
|
-
* @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
|
|
1083
|
-
* to query. If not provided, it will query all the meshes stored in
|
|
1084
|
-
* {@link Components.meshes}.
|
|
1138
|
+
* Updates the aspect of the camera to match the size of the
|
|
1139
|
+
* {@link Components.renderer}.
|
|
1085
1140
|
*/
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
private
|
|
1089
|
-
private
|
|
1141
|
+
updateAspect: () => void;
|
|
1142
|
+
private setupCamera;
|
|
1143
|
+
private newCameraControls;
|
|
1144
|
+
private setupEvents;
|
|
1145
|
+
private static getSubsetOfThree;
|
|
1090
1146
|
}
|
|
1091
1147
|
import { NavigationMode } from "./types";
|
|
1092
1148
|
/**
|
|
1093
|
-
* A {@link NavigationMode} that allows
|
|
1094
|
-
*
|
|
1149
|
+
* A {@link NavigationMode} that allows first person navigation,
|
|
1150
|
+
* simulating FPS video games.
|
|
1095
1151
|
*/
|
|
1096
|
-
export declare class
|
|
1152
|
+
export declare class FirstPersonMode implements NavigationMode {
|
|
1097
1153
|
private camera;
|
|
1098
1154
|
/** {@link NavigationMode.enabled} */
|
|
1099
1155
|
enabled: boolean;
|
|
1100
1156
|
/** {@link NavigationMode.id} */
|
|
1101
|
-
readonly id = "
|
|
1102
|
-
private mouseAction1?;
|
|
1103
|
-
private mouseAction2?;
|
|
1104
|
-
private mouseInitialized;
|
|
1105
|
-
private readonly defaultAzimuthSpeed;
|
|
1106
|
-
private readonly defaultPolarSpeed;
|
|
1107
|
-
constructor(camera: any);
|
|
1108
|
-
/** {@link NavigationMode.set} */
|
|
1109
|
-
set(active: boolean): void;
|
|
1110
|
-
}
|
|
1111
|
-
import { NavigationMode } from "./types";
|
|
1112
|
-
/**
|
|
1113
|
-
* A {@link NavigationMode} that allows 3D navigation and panning
|
|
1114
|
-
* like in many 3D and CAD softwares.
|
|
1115
|
-
*/
|
|
1116
|
-
export declare class OrbitMode implements NavigationMode {
|
|
1117
|
-
camera: any;
|
|
1118
|
-
/** {@link NavigationMode.enabled} */
|
|
1119
|
-
enabled: boolean;
|
|
1120
|
-
/** {@link NavigationMode.id} */
|
|
1121
|
-
readonly id = "Orbit";
|
|
1157
|
+
readonly id = "FirstPerson";
|
|
1122
1158
|
constructor(camera: any);
|
|
1123
1159
|
/** {@link NavigationMode.set} */
|
|
1124
1160
|
set(active: boolean): void;
|
|
1125
|
-
private
|
|
1161
|
+
private setupFirstPersonCamera;
|
|
1126
1162
|
}
|
|
1127
1163
|
/**
|
|
1128
1164
|
* The projection system of the camera.
|
|
@@ -1152,6 +1188,37 @@ export interface NavigationMode {
|
|
|
1152
1188
|
enabled: boolean;
|
|
1153
1189
|
}
|
|
1154
1190
|
import * as THREE from "three";
|
|
1191
|
+
import { BaseRenderer, Event } from "../../Types";
|
|
1192
|
+
import { Components } from "../../Components";
|
|
1193
|
+
/**
|
|
1194
|
+
* A basic renderer capable of rendering
|
|
1195
|
+
* ([Objec3Ds](https://threejs.org/docs/#api/en/core/Object3D).
|
|
1196
|
+
*/
|
|
1197
|
+
export declare class SimpleRenderer extends BaseRenderer {
|
|
1198
|
+
enabled: boolean;
|
|
1199
|
+
/** The HTML container of the THREE.js canvas where the scene is rendered. */
|
|
1200
|
+
container: HTMLElement;
|
|
1201
|
+
three: THREE.WebGLRenderer;
|
|
1202
|
+
protected _canvas: HTMLCanvasElement;
|
|
1203
|
+
protected _parameters?: Partial<THREE.WebGLRendererParameters>;
|
|
1204
|
+
protected _resizeObserver: ResizeObserver | null;
|
|
1205
|
+
protected onContainerUpdated: Event<HTMLElement>;
|
|
1206
|
+
constructor(components: Components, container: HTMLElement, parameters?: Partial<THREE.WebGLRendererParameters>);
|
|
1207
|
+
/** {@link Updateable.update} */
|
|
1208
|
+
update(): void;
|
|
1209
|
+
/** {@link Disposable.dispose} */
|
|
1210
|
+
dispose(): void;
|
|
1211
|
+
/** {@link Resizeable.getSize}. */
|
|
1212
|
+
getSize(): THREE.Vector2;
|
|
1213
|
+
/** {@link Resizeable.resize} */
|
|
1214
|
+
resize: (size?: THREE.Vector2) => void;
|
|
1215
|
+
setupEvents(active: boolean): void;
|
|
1216
|
+
private resizeEvent;
|
|
1217
|
+
private setupRenderer;
|
|
1218
|
+
private onContextLost;
|
|
1219
|
+
private onContextBack;
|
|
1220
|
+
}
|
|
1221
|
+
import * as THREE from "three";
|
|
1155
1222
|
import { CameraProjection } from "./types";
|
|
1156
1223
|
import { Event } from "../../../core";
|
|
1157
1224
|
import { OrthoPerspectiveCamera } from "../index";
|
|
@@ -1190,19 +1257,85 @@ export declare class ProjectionManager {
|
|
|
1190
1257
|
}
|
|
1191
1258
|
import { NavigationMode } from "./types";
|
|
1192
1259
|
/**
|
|
1193
|
-
* A {@link NavigationMode} that allows
|
|
1194
|
-
*
|
|
1260
|
+
* A {@link NavigationMode} that allows to navigate floorplans in 2D,
|
|
1261
|
+
* like many BIM tools.
|
|
1195
1262
|
*/
|
|
1196
|
-
export declare class
|
|
1263
|
+
export declare class PlanMode implements NavigationMode {
|
|
1197
1264
|
private camera;
|
|
1198
1265
|
/** {@link NavigationMode.enabled} */
|
|
1199
1266
|
enabled: boolean;
|
|
1200
1267
|
/** {@link NavigationMode.id} */
|
|
1201
|
-
readonly id = "
|
|
1268
|
+
readonly id = "Plan";
|
|
1269
|
+
private mouseAction1?;
|
|
1270
|
+
private mouseAction2?;
|
|
1271
|
+
private mouseInitialized;
|
|
1272
|
+
private readonly defaultAzimuthSpeed;
|
|
1273
|
+
private readonly defaultPolarSpeed;
|
|
1202
1274
|
constructor(camera: any);
|
|
1203
1275
|
/** {@link NavigationMode.set} */
|
|
1204
1276
|
set(active: boolean): void;
|
|
1205
|
-
|
|
1277
|
+
}
|
|
1278
|
+
import * as THREE from "three";
|
|
1279
|
+
import { Disposable, Event } from "../../Types";
|
|
1280
|
+
/**
|
|
1281
|
+
* A helper to easily get the real position of the mouse in the Three.js canvas
|
|
1282
|
+
* to work with tools like the
|
|
1283
|
+
* [raycaster](https://threejs.org/docs/#api/en/core/Raycaster), even if it has
|
|
1284
|
+
* been transformed through CSS or doesn't occupy the whole screen.
|
|
1285
|
+
*/
|
|
1286
|
+
export declare class Mouse implements Disposable {
|
|
1287
|
+
dom: HTMLCanvasElement;
|
|
1288
|
+
private _event?;
|
|
1289
|
+
private _position;
|
|
1290
|
+
/** {@link Disposable.onDisposed} */
|
|
1291
|
+
readonly onDisposed: Event<unknown>;
|
|
1292
|
+
constructor(dom: HTMLCanvasElement);
|
|
1293
|
+
/**
|
|
1294
|
+
* The real position of the mouse of the Three.js canvas.
|
|
1295
|
+
*/
|
|
1296
|
+
get position(): THREE.Vector2;
|
|
1297
|
+
/** {@link Disposable.dispose} */
|
|
1298
|
+
dispose(): void;
|
|
1299
|
+
private getPositionY;
|
|
1300
|
+
private getPositionX;
|
|
1301
|
+
private updateMouseInfo;
|
|
1302
|
+
private setupEvents;
|
|
1303
|
+
}
|
|
1304
|
+
import * as THREE from "three";
|
|
1305
|
+
import { Components } from "../../Components";
|
|
1306
|
+
import { Event, World, Disposable } from "../../Types";
|
|
1307
|
+
import { Mouse } from "./mouse";
|
|
1308
|
+
/**
|
|
1309
|
+
* A simple [raycaster](https://threejs.org/docs/#api/en/core/Raycaster)
|
|
1310
|
+
* that allows to easily get items from the scene using the mouse and touch
|
|
1311
|
+
* events.
|
|
1312
|
+
*/
|
|
1313
|
+
export declare class SimpleRaycaster implements Disposable {
|
|
1314
|
+
/** {@link Component.enabled} */
|
|
1315
|
+
enabled: boolean;
|
|
1316
|
+
components: Components;
|
|
1317
|
+
/** {@link Disposable.onDisposed} */
|
|
1318
|
+
readonly onDisposed: Event<unknown>;
|
|
1319
|
+
/** The position of the mouse in the screen. */
|
|
1320
|
+
readonly mouse: Mouse;
|
|
1321
|
+
readonly three: THREE.Raycaster;
|
|
1322
|
+
world: World;
|
|
1323
|
+
constructor(components: Components, world: World);
|
|
1324
|
+
/** {@link Disposable.dispose} */
|
|
1325
|
+
dispose(): void;
|
|
1326
|
+
/**
|
|
1327
|
+
* Throws a ray from the camera to the mouse or touch event point and returns
|
|
1328
|
+
* the first item found. This also takes into account the clipping planes
|
|
1329
|
+
* used by the renderer.
|
|
1330
|
+
*
|
|
1331
|
+
* @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
|
|
1332
|
+
* to query. If not provided, it will query all the meshes stored in
|
|
1333
|
+
* {@link Components.meshes}.
|
|
1334
|
+
*/
|
|
1335
|
+
castRay(items?: THREE.Mesh[]): THREE.Intersection | null;
|
|
1336
|
+
castRayFromVector(origin: THREE.Vector3, direction: THREE.Vector3, items?: THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>[]): THREE.Intersection<THREE.Object3D<THREE.Object3DEventMap>> | null;
|
|
1337
|
+
private intersect;
|
|
1338
|
+
private filterClippingPlanes;
|
|
1206
1339
|
}
|
|
1207
1340
|
/**
|
|
1208
1341
|
* Simple event handler by
|
|
@@ -1238,6 +1371,40 @@ export declare class Event<T> {
|
|
|
1238
1371
|
reset(): void;
|
|
1239
1372
|
private handlers;
|
|
1240
1373
|
}
|
|
1374
|
+
/**
|
|
1375
|
+
* Simple event handler by
|
|
1376
|
+
* [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540).
|
|
1377
|
+
* Keep in mind that:
|
|
1378
|
+
* - If you want to remove it later, you might want to declare the callback as
|
|
1379
|
+
* an object.
|
|
1380
|
+
* - If you want to maintain the reference to 'this', you will need to declare
|
|
1381
|
+
* the callback as an arrow function.
|
|
1382
|
+
*/
|
|
1383
|
+
export declare class AsyncEvent<T> {
|
|
1384
|
+
/**
|
|
1385
|
+
* Add a callback to this event instance.
|
|
1386
|
+
* @param handler - the callback to be added to this event.
|
|
1387
|
+
*/
|
|
1388
|
+
add(handler: T extends void ? {
|
|
1389
|
+
(): Promise<void>;
|
|
1390
|
+
} : {
|
|
1391
|
+
(data: T): Promise<void>;
|
|
1392
|
+
}): void;
|
|
1393
|
+
/**
|
|
1394
|
+
* Removes a callback from this event instance.
|
|
1395
|
+
* @param handler - the callback to be removed from this event.
|
|
1396
|
+
*/
|
|
1397
|
+
remove(handler: T extends void ? {
|
|
1398
|
+
(): Promise<void>;
|
|
1399
|
+
} : {
|
|
1400
|
+
(data: T): Promise<void>;
|
|
1401
|
+
}): void;
|
|
1402
|
+
/** Triggers all the callbacks assigned to this event. */
|
|
1403
|
+
trigger: (data?: T) => Promise<void>;
|
|
1404
|
+
/** Gets rid of all the suscribed events. */
|
|
1405
|
+
reset(): void;
|
|
1406
|
+
private handlers;
|
|
1407
|
+
}
|
|
1241
1408
|
import * as THREE from "three";
|
|
1242
1409
|
import CameraControls from "camera-controls";
|
|
1243
1410
|
import { Event } from "./event";
|
|
@@ -1361,73 +1528,10 @@ export interface BVHGeometry extends THREE.BufferGeometry {
|
|
|
1361
1528
|
export interface CameraControllable {
|
|
1362
1529
|
controls: CameraControls;
|
|
1363
1530
|
}
|
|
1531
|
+
import { Disposable, Hideable, Resizeable, Updateable, Configurable } from "./interfaces";
|
|
1532
|
+
import { Components } from "../../Components";
|
|
1364
1533
|
/**
|
|
1365
|
-
*
|
|
1366
|
-
* [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540).
|
|
1367
|
-
* Keep in mind that:
|
|
1368
|
-
* - If you want to remove it later, you might want to declare the callback as
|
|
1369
|
-
* an object.
|
|
1370
|
-
* - If you want to maintain the reference to 'this', you will need to declare
|
|
1371
|
-
* the callback as an arrow function.
|
|
1372
|
-
*/
|
|
1373
|
-
export declare class AsyncEvent<T> {
|
|
1374
|
-
/**
|
|
1375
|
-
* Add a callback to this event instance.
|
|
1376
|
-
* @param handler - the callback to be added to this event.
|
|
1377
|
-
*/
|
|
1378
|
-
add(handler: T extends void ? {
|
|
1379
|
-
(): Promise<void>;
|
|
1380
|
-
} : {
|
|
1381
|
-
(data: T): Promise<void>;
|
|
1382
|
-
}): void;
|
|
1383
|
-
/**
|
|
1384
|
-
* Removes a callback from this event instance.
|
|
1385
|
-
* @param handler - the callback to be removed from this event.
|
|
1386
|
-
*/
|
|
1387
|
-
remove(handler: T extends void ? {
|
|
1388
|
-
(): Promise<void>;
|
|
1389
|
-
} : {
|
|
1390
|
-
(data: T): Promise<void>;
|
|
1391
|
-
}): void;
|
|
1392
|
-
/** Triggers all the callbacks assigned to this event. */
|
|
1393
|
-
trigger: (data?: T) => Promise<void>;
|
|
1394
|
-
/** Gets rid of all the suscribed events. */
|
|
1395
|
-
reset(): void;
|
|
1396
|
-
private handlers;
|
|
1397
|
-
}
|
|
1398
|
-
import { Base } from "./base";
|
|
1399
|
-
/**
|
|
1400
|
-
* Components are the building blocks of this library. Components are singleton
|
|
1401
|
-
* elements that contain specific functionality. For instance, the SimpleClipper
|
|
1402
|
-
* Component can create, delete and handle 3D clipping planes. Components must be
|
|
1403
|
-
* unique (they can't be instanced more than once), and have a static UUID that
|
|
1404
|
-
* identifies them uniquely. The can be accessed globally using the {@link Components}
|
|
1405
|
-
* instance.
|
|
1406
|
-
*/
|
|
1407
|
-
export declare abstract class Component extends Base {
|
|
1408
|
-
/**
|
|
1409
|
-
* Whether this component is active or not. The behaviour can vary depending
|
|
1410
|
-
* on the type of component. E.g. a disabled dimension tool will stop creating
|
|
1411
|
-
* dimensions, while a disabled camera will stop moving. A disabled component
|
|
1412
|
-
* will not be updated automatically each frame.
|
|
1413
|
-
*/
|
|
1414
|
-
abstract enabled: boolean;
|
|
1415
|
-
}
|
|
1416
|
-
import * as THREE from "three";
|
|
1417
|
-
import CameraControls from "camera-controls";
|
|
1418
|
-
import { BaseWorldItem } from "./base-world-item";
|
|
1419
|
-
import { CameraControllable } from "./interfaces";
|
|
1420
|
-
export declare abstract class BaseCamera extends BaseWorldItem {
|
|
1421
|
-
abstract enabled: boolean;
|
|
1422
|
-
abstract three: THREE.Camera;
|
|
1423
|
-
abstract controls?: CameraControls;
|
|
1424
|
-
/** Whether is instance is {@link CameraControllable}. */
|
|
1425
|
-
hasCameraControls: () => this is CameraControllable;
|
|
1426
|
-
}
|
|
1427
|
-
import { Disposable, Hideable, Resizeable, Updateable, Configurable } from "./interfaces";
|
|
1428
|
-
import { Components } from "../../Components";
|
|
1429
|
-
/**
|
|
1430
|
-
* Base class of the library. Useful for finding out the interfaces it implements.
|
|
1534
|
+
* Base class of the library. Useful for finding out the interfaces it implements.
|
|
1431
1535
|
*/
|
|
1432
1536
|
export declare abstract class Base {
|
|
1433
1537
|
components: Components;
|
|
@@ -1460,6 +1564,24 @@ export declare abstract class BaseWorldItem extends Base {
|
|
|
1460
1564
|
currentWorld: World | null;
|
|
1461
1565
|
protected constructor(components: Components);
|
|
1462
1566
|
}
|
|
1567
|
+
import { Base } from "./base";
|
|
1568
|
+
/**
|
|
1569
|
+
* Components are the building blocks of this library. Components are singleton
|
|
1570
|
+
* elements that contain specific functionality. For instance, the SimpleClipper
|
|
1571
|
+
* Component can create, delete and handle 3D clipping planes. Components must be
|
|
1572
|
+
* unique (they can't be instanced more than once), and have a static UUID that
|
|
1573
|
+
* identifies them uniquely. The can be accessed globally using the {@link Components}
|
|
1574
|
+
* instance.
|
|
1575
|
+
*/
|
|
1576
|
+
export declare abstract class Component extends Base {
|
|
1577
|
+
/**
|
|
1578
|
+
* Whether this component is active or not. The behaviour can vary depending
|
|
1579
|
+
* on the type of component. E.g. a disabled dimension tool will stop creating
|
|
1580
|
+
* dimensions, while a disabled camera will stop moving. A disabled component
|
|
1581
|
+
* will not be updated automatically each frame.
|
|
1582
|
+
*/
|
|
1583
|
+
abstract enabled: boolean;
|
|
1584
|
+
}
|
|
1463
1585
|
import * as THREE from "three";
|
|
1464
1586
|
import { Vector2 } from "three";
|
|
1465
1587
|
import { Event } from "./event";
|
|
@@ -1501,6 +1623,78 @@ export declare abstract class BaseRenderer extends BaseWorldItem implements Upda
|
|
|
1501
1623
|
setPlane(active: boolean, plane: THREE.Plane, isLocal?: boolean): void;
|
|
1502
1624
|
}
|
|
1503
1625
|
import * as THREE from "three";
|
|
1626
|
+
import CameraControls from "camera-controls";
|
|
1627
|
+
import { BaseWorldItem } from "./base-world-item";
|
|
1628
|
+
import { CameraControllable } from "./interfaces";
|
|
1629
|
+
export declare abstract class BaseCamera extends BaseWorldItem {
|
|
1630
|
+
abstract enabled: boolean;
|
|
1631
|
+
abstract three: THREE.Camera;
|
|
1632
|
+
abstract controls?: CameraControls;
|
|
1633
|
+
/** Whether is instance is {@link CameraControllable}. */
|
|
1634
|
+
hasCameraControls: () => this is CameraControllable;
|
|
1635
|
+
}
|
|
1636
|
+
import * as THREE from "three";
|
|
1637
|
+
import { Hideable, Disposable, Event, World } from "../../Types";
|
|
1638
|
+
import { Components } from "../../Components";
|
|
1639
|
+
/**
|
|
1640
|
+
* Each of the planes created by {@link SimpleClipper}.
|
|
1641
|
+
*/
|
|
1642
|
+
export declare class SimplePlane implements Disposable, Hideable {
|
|
1643
|
+
/** Event that fires when the user starts dragging a clipping plane. */
|
|
1644
|
+
readonly onDraggingStarted: Event<unknown>;
|
|
1645
|
+
/** Event that fires when the user stops dragging a clipping plane. */
|
|
1646
|
+
readonly onDraggingEnded: Event<unknown>;
|
|
1647
|
+
/** {@link Disposable.onDisposed} */
|
|
1648
|
+
readonly onDisposed: Event<unknown>;
|
|
1649
|
+
readonly normal: THREE.Vector3;
|
|
1650
|
+
readonly origin: THREE.Vector3;
|
|
1651
|
+
readonly three: THREE.Plane;
|
|
1652
|
+
protected readonly _helper: THREE.Object3D;
|
|
1653
|
+
protected _visible: boolean;
|
|
1654
|
+
protected _enabled: boolean;
|
|
1655
|
+
components: Components;
|
|
1656
|
+
world: World;
|
|
1657
|
+
private _controlsActive;
|
|
1658
|
+
private readonly _arrowBoundBox;
|
|
1659
|
+
private readonly _planeMesh;
|
|
1660
|
+
private readonly _controls;
|
|
1661
|
+
private readonly _hiddenMaterial;
|
|
1662
|
+
get enabled(): boolean;
|
|
1663
|
+
/** {@link Component.enabled} */
|
|
1664
|
+
set enabled(state: boolean);
|
|
1665
|
+
/** {@link Hideable.visible } */
|
|
1666
|
+
get visible(): boolean;
|
|
1667
|
+
/** {@link Hideable.visible } */
|
|
1668
|
+
set visible(state: boolean);
|
|
1669
|
+
/** The meshes used for raycasting */
|
|
1670
|
+
get meshes(): THREE.Mesh[];
|
|
1671
|
+
/** The material of the clipping plane representation. */
|
|
1672
|
+
get planeMaterial(): THREE.Material | THREE.Material[];
|
|
1673
|
+
/** The material of the clipping plane representation. */
|
|
1674
|
+
set planeMaterial(material: THREE.Material | THREE.Material[]);
|
|
1675
|
+
/** The size of the clipping plane representation. */
|
|
1676
|
+
get size(): number;
|
|
1677
|
+
/** Sets the size of the clipping plane representation. */
|
|
1678
|
+
set size(size: number);
|
|
1679
|
+
get helper(): THREE.Object3D<THREE.Object3DEventMap>;
|
|
1680
|
+
constructor(components: Components, world: World, origin: THREE.Vector3, normal: THREE.Vector3, material: THREE.Material, size?: number, activateControls?: boolean);
|
|
1681
|
+
setFromNormalAndCoplanarPoint(normal: THREE.Vector3, point: THREE.Vector3): Promise<void>;
|
|
1682
|
+
/** {@link Updateable.update} */
|
|
1683
|
+
update: () => Promise<void>;
|
|
1684
|
+
/** {@link Disposable.dispose} */
|
|
1685
|
+
dispose(): void;
|
|
1686
|
+
private reset;
|
|
1687
|
+
protected toggleControls(state: boolean): void;
|
|
1688
|
+
private newTransformControls;
|
|
1689
|
+
private initializeControls;
|
|
1690
|
+
private createArrowBoundingBox;
|
|
1691
|
+
private changeDrag;
|
|
1692
|
+
private notifyDraggingChanged;
|
|
1693
|
+
private preventCameraMovement;
|
|
1694
|
+
private newHelper;
|
|
1695
|
+
private static newPlaneMesh;
|
|
1696
|
+
}
|
|
1697
|
+
import * as THREE from "three";
|
|
1504
1698
|
import { Disposable } from "./interfaces";
|
|
1505
1699
|
import { Event } from "./event";
|
|
1506
1700
|
import { Components } from "../../Components";
|
|
@@ -1525,32 +1719,6 @@ export interface World extends Disposable, Updateable {
|
|
|
1525
1719
|
renderer: BaseRenderer | null;
|
|
1526
1720
|
uuid: string;
|
|
1527
1721
|
}
|
|
1528
|
-
import * as THREE from "three";
|
|
1529
|
-
import { Event, Base, World, BaseScene, BaseCamera, BaseRenderer } from "../../Types";
|
|
1530
|
-
import { Components } from "../../Components";
|
|
1531
|
-
export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer> extends Base implements World {
|
|
1532
|
-
/**
|
|
1533
|
-
* All the loaded [meshes](https://threejs.org/docs/#api/en/objects/Mesh).
|
|
1534
|
-
*/
|
|
1535
|
-
readonly meshes: Set<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1536
|
-
readonly onAfterUpdate: Event<unknown>;
|
|
1537
|
-
readonly onBeforeUpdate: Event<unknown>;
|
|
1538
|
-
enabled: boolean;
|
|
1539
|
-
uuid: string;
|
|
1540
|
-
readonly onDisposed: Event<unknown>;
|
|
1541
|
-
private _scene?;
|
|
1542
|
-
private _camera?;
|
|
1543
|
-
private _renderer;
|
|
1544
|
-
get scene(): T;
|
|
1545
|
-
set scene(scene: T);
|
|
1546
|
-
get camera(): U;
|
|
1547
|
-
set camera(camera: U);
|
|
1548
|
-
get renderer(): S | null;
|
|
1549
|
-
set renderer(renderer: S | null);
|
|
1550
|
-
constructor(components: Components);
|
|
1551
|
-
update(delta?: number): void;
|
|
1552
|
-
dispose(disposeResources?: boolean): void;
|
|
1553
|
-
}
|
|
1554
1722
|
/// <reference types="node" />
|
|
1555
1723
|
import * as THREE from "three";
|
|
1556
1724
|
import { Hideable, Event, World } from "../../Types";
|
|
@@ -1600,113 +1768,6 @@ export declare class SimpleGrid implements Hideable, Disposable {
|
|
|
1600
1768
|
private updateZoom;
|
|
1601
1769
|
}
|
|
1602
1770
|
import * as THREE from "three";
|
|
1603
|
-
import { BaseScene, Configurable, Event } from "../../Types";
|
|
1604
|
-
import { Components } from "../../Components";
|
|
1605
|
-
export interface SimpleSceneConfig {
|
|
1606
|
-
directionalLight: {
|
|
1607
|
-
color: THREE.Color;
|
|
1608
|
-
intensity: number;
|
|
1609
|
-
position: THREE.Vector3;
|
|
1610
|
-
};
|
|
1611
|
-
ambientLight: {
|
|
1612
|
-
color: THREE.Color;
|
|
1613
|
-
intensity: number;
|
|
1614
|
-
};
|
|
1615
|
-
}
|
|
1616
|
-
/**
|
|
1617
|
-
* A basic 3D [scene](https://threejs.org/docs/#api/en/scenes/Scene) to add
|
|
1618
|
-
* objects hierarchically, and easily dispose them when you are finished with it.
|
|
1619
|
-
* @noInheritDoc
|
|
1620
|
-
*/
|
|
1621
|
-
export declare class SimpleScene extends BaseScene implements Configurable<{}> {
|
|
1622
|
-
/** {@link Configurable.isSetup} */
|
|
1623
|
-
isSetup: boolean;
|
|
1624
|
-
three: THREE.Scene;
|
|
1625
|
-
/** {@link Configurable.onSetup} */
|
|
1626
|
-
readonly onSetup: Event<SimpleScene>;
|
|
1627
|
-
config: Required<SimpleSceneConfig>;
|
|
1628
|
-
constructor(components: Components);
|
|
1629
|
-
/** Creates a simple and nice default set up for the scene (e.g. lighting). */
|
|
1630
|
-
setup(config?: Partial<SimpleSceneConfig>): void;
|
|
1631
|
-
}
|
|
1632
|
-
import * as THREE from "three";
|
|
1633
|
-
import CameraControls from "camera-controls";
|
|
1634
|
-
import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
|
|
1635
|
-
import { Components } from "../../Components";
|
|
1636
|
-
/**
|
|
1637
|
-
* A basic camera that uses
|
|
1638
|
-
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
|
|
1639
|
-
* easily control the camera in 2D and 3D. Check out it's API to find out
|
|
1640
|
-
* what features it offers.
|
|
1641
|
-
*/
|
|
1642
|
-
export declare class SimpleCamera extends BaseCamera implements Updateable, Disposable {
|
|
1643
|
-
/** {@link Updateable.onBeforeUpdate} */
|
|
1644
|
-
readonly onBeforeUpdate: Event<SimpleCamera>;
|
|
1645
|
-
/** {@link Updateable.onAfterUpdate} */
|
|
1646
|
-
readonly onAfterUpdate: Event<SimpleCamera>;
|
|
1647
|
-
readonly onAspectUpdated: Event<unknown>;
|
|
1648
|
-
/** {@link Disposable.onDisposed} */
|
|
1649
|
-
readonly onDisposed: Event<string>;
|
|
1650
|
-
readonly three: THREE.PerspectiveCamera;
|
|
1651
|
-
private _allControls;
|
|
1652
|
-
/**
|
|
1653
|
-
* The object that controls the camera. An instance of
|
|
1654
|
-
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls).
|
|
1655
|
-
* Transforming the camera directly will have no effect: you need to use this
|
|
1656
|
-
* object to move, rotate, look at objects, etc.
|
|
1657
|
-
*/
|
|
1658
|
-
get controls(): CameraControls;
|
|
1659
|
-
/** {@link Component.enabled} */
|
|
1660
|
-
get enabled(): boolean;
|
|
1661
|
-
/** {@link Component.enabled} */
|
|
1662
|
-
set enabled(enabled: boolean);
|
|
1663
|
-
constructor(components: Components);
|
|
1664
|
-
/** {@link Disposable.dispose} */
|
|
1665
|
-
dispose(): void;
|
|
1666
|
-
/** {@link Updateable.update} */
|
|
1667
|
-
update(_delta: number): void;
|
|
1668
|
-
/**
|
|
1669
|
-
* Updates the aspect of the camera to match the size of the
|
|
1670
|
-
* {@link Components.renderer}.
|
|
1671
|
-
*/
|
|
1672
|
-
updateAspect: () => void;
|
|
1673
|
-
private setupCamera;
|
|
1674
|
-
private newCameraControls;
|
|
1675
|
-
private setupEvents;
|
|
1676
|
-
private static getSubsetOfThree;
|
|
1677
|
-
}
|
|
1678
|
-
import * as THREE from "three";
|
|
1679
|
-
import { BaseRenderer, Event } from "../../Types";
|
|
1680
|
-
import { Components } from "../../Components";
|
|
1681
|
-
/**
|
|
1682
|
-
* A basic renderer capable of rendering
|
|
1683
|
-
* ([Objec3Ds](https://threejs.org/docs/#api/en/core/Object3D).
|
|
1684
|
-
*/
|
|
1685
|
-
export declare class SimpleRenderer extends BaseRenderer {
|
|
1686
|
-
enabled: boolean;
|
|
1687
|
-
/** The HTML container of the THREE.js canvas where the scene is rendered. */
|
|
1688
|
-
container: HTMLElement;
|
|
1689
|
-
three: THREE.WebGLRenderer;
|
|
1690
|
-
protected _canvas: HTMLCanvasElement;
|
|
1691
|
-
protected _parameters?: Partial<THREE.WebGLRendererParameters>;
|
|
1692
|
-
protected _resizeObserver: ResizeObserver | null;
|
|
1693
|
-
protected onContainerUpdated: Event<HTMLElement>;
|
|
1694
|
-
constructor(components: Components, container: HTMLElement, parameters?: Partial<THREE.WebGLRendererParameters>);
|
|
1695
|
-
/** {@link Updateable.update} */
|
|
1696
|
-
update(): void;
|
|
1697
|
-
/** {@link Disposable.dispose} */
|
|
1698
|
-
dispose(): void;
|
|
1699
|
-
/** {@link Resizeable.getSize}. */
|
|
1700
|
-
getSize(): THREE.Vector2;
|
|
1701
|
-
/** {@link Resizeable.resize} */
|
|
1702
|
-
resize: (size?: THREE.Vector2) => void;
|
|
1703
|
-
setupEvents(active: boolean): void;
|
|
1704
|
-
private resizeEvent;
|
|
1705
|
-
private setupRenderer;
|
|
1706
|
-
private onContextLost;
|
|
1707
|
-
private onContextBack;
|
|
1708
|
-
}
|
|
1709
|
-
import * as THREE from "three";
|
|
1710
1771
|
import { Components } from "../../Components";
|
|
1711
1772
|
import { AsyncEvent, Event, World } from "../../Types";
|
|
1712
1773
|
export interface CullerRendererSettings {
|
|
@@ -1773,7 +1834,52 @@ export declare class CullerRenderer {
|
|
|
1773
1834
|
protected decreaseColor(): void;
|
|
1774
1835
|
private applySettings;
|
|
1775
1836
|
}
|
|
1776
|
-
|
|
1837
|
+
import * as WEBIFC from "web-ifc";
|
|
1838
|
+
/** Configuration of the IFC-fragment conversion. */
|
|
1839
|
+
export declare class IfcFragmentSettings {
|
|
1840
|
+
/** Whether to extract the IFC properties into a JSON. */
|
|
1841
|
+
includeProperties: boolean;
|
|
1842
|
+
/**
|
|
1843
|
+
* Generate the geometry for categories that are not included by default,
|
|
1844
|
+
* like IFCSPACE.
|
|
1845
|
+
*/
|
|
1846
|
+
optionalCategories: number[];
|
|
1847
|
+
/** Whether to use the coordination data coming from the IFC files. */
|
|
1848
|
+
coordinate: boolean;
|
|
1849
|
+
/** Path of the WASM for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
|
|
1850
|
+
wasm: {
|
|
1851
|
+
path: string;
|
|
1852
|
+
absolute: boolean;
|
|
1853
|
+
logLevel?: WEBIFC.LogLevel;
|
|
1854
|
+
};
|
|
1855
|
+
/** List of categories that won't be converted to fragments. */
|
|
1856
|
+
excludedCategories: Set<number>;
|
|
1857
|
+
/** Whether to save the absolute location of all IFC items. */
|
|
1858
|
+
saveLocations: boolean;
|
|
1859
|
+
/** Loader settings for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
|
|
1860
|
+
webIfc: WEBIFC.LoaderSettings;
|
|
1861
|
+
autoSetWasm: boolean;
|
|
1862
|
+
customLocateFileHandler: WEBIFC.LocateFileHandlerFn | null;
|
|
1863
|
+
}
|
|
1864
|
+
import * as THREE from "three";
|
|
1865
|
+
import * as WEBIFC from "web-ifc";
|
|
1866
|
+
import * as FRAGS from "@thatopen/fragments";
|
|
1867
|
+
export declare class CivilReader {
|
|
1868
|
+
defLineMat: THREE.LineBasicMaterial;
|
|
1869
|
+
read(webIfc: WEBIFC.IfcAPI): {
|
|
1870
|
+
alignments: Map<number, FRAGS.Alignment>;
|
|
1871
|
+
coordinationMatrix: THREE.Matrix4;
|
|
1872
|
+
} | undefined;
|
|
1873
|
+
get(civilItems: any): {
|
|
1874
|
+
alignments: Map<number, FRAGS.Alignment>;
|
|
1875
|
+
coordinationMatrix: THREE.Matrix4;
|
|
1876
|
+
} | undefined;
|
|
1877
|
+
private getCurves;
|
|
1878
|
+
}
|
|
1879
|
+
import * as WEBIFC from "web-ifc";
|
|
1880
|
+
export declare class IfcMetadataReader {
|
|
1881
|
+
get(webIfc: WEBIFC.IfcAPI, type: number): string;
|
|
1882
|
+
}
|
|
1777
1883
|
import * as THREE from "three";
|
|
1778
1884
|
import { CullerRenderer, CullerRendererSettings } from "./culler-renderer";
|
|
1779
1885
|
import { Components } from "../../Components";
|
|
@@ -1802,92 +1908,7 @@ export declare class MeshCullerRenderer extends CullerRenderer {
|
|
|
1802
1908
|
private handleWorkerMessage;
|
|
1803
1909
|
private getAvailableMaterial;
|
|
1804
1910
|
}
|
|
1805
|
-
|
|
1806
|
-
import { Hideable, Disposable, Event, World } from "../../Types";
|
|
1807
|
-
import { Components } from "../../Components";
|
|
1808
|
-
/**
|
|
1809
|
-
* Each of the planes created by {@link SimpleClipper}.
|
|
1810
|
-
*/
|
|
1811
|
-
export declare class SimplePlane implements Disposable, Hideable {
|
|
1812
|
-
/** Event that fires when the user starts dragging a clipping plane. */
|
|
1813
|
-
readonly onDraggingStarted: Event<unknown>;
|
|
1814
|
-
/** Event that fires when the user stops dragging a clipping plane. */
|
|
1815
|
-
readonly onDraggingEnded: Event<unknown>;
|
|
1816
|
-
/** {@link Disposable.onDisposed} */
|
|
1817
|
-
readonly onDisposed: Event<unknown>;
|
|
1818
|
-
readonly normal: THREE.Vector3;
|
|
1819
|
-
readonly origin: THREE.Vector3;
|
|
1820
|
-
readonly three: THREE.Plane;
|
|
1821
|
-
protected readonly _helper: THREE.Object3D;
|
|
1822
|
-
protected _visible: boolean;
|
|
1823
|
-
protected _enabled: boolean;
|
|
1824
|
-
components: Components;
|
|
1825
|
-
world: World;
|
|
1826
|
-
private _controlsActive;
|
|
1827
|
-
private readonly _arrowBoundBox;
|
|
1828
|
-
private readonly _planeMesh;
|
|
1829
|
-
private readonly _controls;
|
|
1830
|
-
private readonly _hiddenMaterial;
|
|
1831
|
-
get enabled(): boolean;
|
|
1832
|
-
/** {@link Component.enabled} */
|
|
1833
|
-
set enabled(state: boolean);
|
|
1834
|
-
/** {@link Hideable.visible } */
|
|
1835
|
-
get visible(): boolean;
|
|
1836
|
-
/** {@link Hideable.visible } */
|
|
1837
|
-
set visible(state: boolean);
|
|
1838
|
-
/** The meshes used for raycasting */
|
|
1839
|
-
get meshes(): THREE.Mesh[];
|
|
1840
|
-
/** The material of the clipping plane representation. */
|
|
1841
|
-
get planeMaterial(): THREE.Material | THREE.Material[];
|
|
1842
|
-
/** The material of the clipping plane representation. */
|
|
1843
|
-
set planeMaterial(material: THREE.Material | THREE.Material[]);
|
|
1844
|
-
/** The size of the clipping plane representation. */
|
|
1845
|
-
get size(): number;
|
|
1846
|
-
/** Sets the size of the clipping plane representation. */
|
|
1847
|
-
set size(size: number);
|
|
1848
|
-
get helper(): THREE.Object3D<THREE.Object3DEventMap>;
|
|
1849
|
-
constructor(components: Components, world: World, origin: THREE.Vector3, normal: THREE.Vector3, material: THREE.Material, size?: number, activateControls?: boolean);
|
|
1850
|
-
setFromNormalAndCoplanarPoint(normal: THREE.Vector3, point: THREE.Vector3): Promise<void>;
|
|
1851
|
-
/** {@link Updateable.update} */
|
|
1852
|
-
update: () => Promise<void>;
|
|
1853
|
-
/** {@link Disposable.dispose} */
|
|
1854
|
-
dispose(): void;
|
|
1855
|
-
private reset;
|
|
1856
|
-
protected toggleControls(state: boolean): void;
|
|
1857
|
-
private newTransformControls;
|
|
1858
|
-
private initializeControls;
|
|
1859
|
-
private createArrowBoundingBox;
|
|
1860
|
-
private changeDrag;
|
|
1861
|
-
private notifyDraggingChanged;
|
|
1862
|
-
private preventCameraMovement;
|
|
1863
|
-
private newHelper;
|
|
1864
|
-
private static newPlaneMesh;
|
|
1865
|
-
}
|
|
1866
|
-
import { IfcFragmentSettings } from "../../FragmentIfcLoader/src";
|
|
1867
|
-
/** Configuration of the IFC-fragment streaming. */
|
|
1868
|
-
export declare class IfcStreamingSettings extends IfcFragmentSettings {
|
|
1869
|
-
minGeometrySize: number;
|
|
1870
|
-
minAssetsSize: number;
|
|
1871
|
-
}
|
|
1872
|
-
/** Configuration of the IFC-fragment streaming. */
|
|
1873
|
-
export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
|
|
1874
|
-
propertiesSize: number;
|
|
1875
|
-
}
|
|
1876
|
-
import * as THREE from "three";
|
|
1877
|
-
import * as WEBIFC from "web-ifc";
|
|
1878
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
1879
|
-
export declare class CivilReader {
|
|
1880
|
-
defLineMat: THREE.LineBasicMaterial;
|
|
1881
|
-
read(webIfc: WEBIFC.IfcAPI): {
|
|
1882
|
-
alignments: Map<number, FRAGS.Alignment>;
|
|
1883
|
-
coordinationMatrix: THREE.Matrix4;
|
|
1884
|
-
} | undefined;
|
|
1885
|
-
get(civilItems: any): {
|
|
1886
|
-
alignments: Map<number, FRAGS.Alignment>;
|
|
1887
|
-
coordinationMatrix: THREE.Matrix4;
|
|
1888
|
-
} | undefined;
|
|
1889
|
-
private getCurves;
|
|
1890
|
-
}
|
|
1911
|
+
export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
|
|
1891
1912
|
import * as WEBIFC from "web-ifc";
|
|
1892
1913
|
import { AsyncEvent, Component, Disposable, Event } from "../../../core";
|
|
1893
1914
|
import { PropertiesStreamingSettings } from "./streaming-settings";
|
|
@@ -1915,36 +1936,25 @@ export declare class FragmentPropsStreamConverter extends Component implements D
|
|
|
1915
1936
|
private getIndices;
|
|
1916
1937
|
private cleanUp;
|
|
1917
1938
|
}
|
|
1918
|
-
import
|
|
1919
|
-
/** Configuration of the IFC-fragment
|
|
1920
|
-
export declare class IfcFragmentSettings {
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
optionalCategories: number[];
|
|
1928
|
-
/** Whether to use the coordination data coming from the IFC files. */
|
|
1929
|
-
coordinate: boolean;
|
|
1930
|
-
/** Path of the WASM for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
|
|
1931
|
-
wasm: {
|
|
1932
|
-
path: string;
|
|
1933
|
-
absolute: boolean;
|
|
1934
|
-
logLevel?: WEBIFC.LogLevel;
|
|
1935
|
-
};
|
|
1936
|
-
/** List of categories that won't be converted to fragments. */
|
|
1937
|
-
excludedCategories: Set<number>;
|
|
1938
|
-
/** Whether to save the absolute location of all IFC items. */
|
|
1939
|
-
saveLocations: boolean;
|
|
1940
|
-
/** Loader settings for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
|
|
1941
|
-
webIfc: WEBIFC.LoaderSettings;
|
|
1942
|
-
autoSetWasm: boolean;
|
|
1943
|
-
customLocateFileHandler: WEBIFC.LocateFileHandlerFn | null;
|
|
1939
|
+
import { IfcFragmentSettings } from "../../FragmentIfcLoader/src";
|
|
1940
|
+
/** Configuration of the IFC-fragment streaming. */
|
|
1941
|
+
export declare class IfcStreamingSettings extends IfcFragmentSettings {
|
|
1942
|
+
minGeometrySize: number;
|
|
1943
|
+
minAssetsSize: number;
|
|
1944
|
+
}
|
|
1945
|
+
/** Configuration of the IFC-fragment streaming. */
|
|
1946
|
+
export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
|
|
1947
|
+
propertiesSize: number;
|
|
1944
1948
|
}
|
|
1945
1949
|
import * as WEBIFC from "web-ifc";
|
|
1946
|
-
|
|
1947
|
-
|
|
1950
|
+
import * as THREE from "three";
|
|
1951
|
+
export declare class Units {
|
|
1952
|
+
factor: number;
|
|
1953
|
+
complement: number;
|
|
1954
|
+
apply(matrix: THREE.Matrix4): void;
|
|
1955
|
+
setUp(webIfc: WEBIFC.IfcAPI): void;
|
|
1956
|
+
private getLengthUnits;
|
|
1957
|
+
private getScaleMatrix;
|
|
1948
1958
|
}
|
|
1949
1959
|
export interface StreamedGeometries {
|
|
1950
1960
|
[id: number]: {
|
|
@@ -1961,16 +1971,6 @@ export interface StreamedAsset {
|
|
|
1961
1971
|
color: number[];
|
|
1962
1972
|
}[];
|
|
1963
1973
|
}
|
|
1964
|
-
import * as WEBIFC from "web-ifc";
|
|
1965
|
-
import * as THREE from "three";
|
|
1966
|
-
export declare class Units {
|
|
1967
|
-
factor: number;
|
|
1968
|
-
complement: number;
|
|
1969
|
-
apply(matrix: THREE.Matrix4): void;
|
|
1970
|
-
setUp(webIfc: WEBIFC.IfcAPI): void;
|
|
1971
|
-
private getLengthUnits;
|
|
1972
|
-
private getScaleMatrix;
|
|
1973
|
-
}
|
|
1974
1974
|
export type RelationsMap = Map<number, Map<number, number[]>>;
|
|
1975
1975
|
export interface ModelsRelationMap {
|
|
1976
1976
|
[modelID: string]: RelationsMap;
|