@thatopen/components 2.0.0-alpha.5 → 2.0.0-alpha.6
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/core/Cullers/src/culler-renderer.d.ts +3 -2
- package/dist/core/Cullers/src/mesh-culler-renderer.d.ts +1 -0
- package/dist/core/Types/src/async-event.d.ts +34 -0
- package/dist/core/Types/src/index.d.ts +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +150 -114
- package/dist/namespace.d.ts +789 -753
- package/package.json +1 -1
package/dist/namespace.d.ts
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
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
|
-
}
|
|
15
2
|
import * as THREE from "three";
|
|
16
3
|
import { Components } from "../Components";
|
|
17
4
|
import { Component } from "../Types";
|
|
@@ -55,6 +42,84 @@ export declare class Disposer extends Component {
|
|
|
55
42
|
private disposeChildren;
|
|
56
43
|
private static disposeMaterial;
|
|
57
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
|
+
import { Component, Disposable, Event } from "../Types";
|
|
59
|
+
/**
|
|
60
|
+
* The entry point of the Components library.
|
|
61
|
+
* It can:
|
|
62
|
+
* - Create and access all the components of the library.
|
|
63
|
+
* - Update all the updatable components automatically.
|
|
64
|
+
* - Dispose all the components, preventing memory leaks.
|
|
65
|
+
*/
|
|
66
|
+
export declare class Components implements Disposable {
|
|
67
|
+
static readonly release = "1.4.21";
|
|
68
|
+
/** {@link Disposable.onDisposed} */
|
|
69
|
+
readonly onDisposed: Event<void>;
|
|
70
|
+
/** The list of components created in this app. */
|
|
71
|
+
readonly list: Map<string, Component>;
|
|
72
|
+
/** If disabled, the animation loop will be stopped. */
|
|
73
|
+
enabled: boolean;
|
|
74
|
+
private _clock;
|
|
75
|
+
add(uuid: string, instance: Component): void;
|
|
76
|
+
/**
|
|
77
|
+
* Retrieves a component. If it already exists in this app, it returns the instance of the component. If it
|
|
78
|
+
* doesn't exist, it will instance it automatically.
|
|
79
|
+
*
|
|
80
|
+
* @param Component - The component to get or create.
|
|
81
|
+
*/
|
|
82
|
+
get<U extends Component>(Component: new (components: Components) => U): U;
|
|
83
|
+
constructor();
|
|
84
|
+
/**
|
|
85
|
+
* Initializes the library. It should be called at the start of the app after
|
|
86
|
+
* initializing the scene, the renderer and the
|
|
87
|
+
* camera. Additionally, if any component that need a raycaster is
|
|
88
|
+
* used, the {@link raycaster} will need to be initialized.
|
|
89
|
+
*/
|
|
90
|
+
init(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Disposes the memory of all the components and tools of this instance of
|
|
93
|
+
* the library. A memory leak will be created if:
|
|
94
|
+
*
|
|
95
|
+
* - An instance of the library ends up out of scope and this function isn't
|
|
96
|
+
* called. This is especially relevant in Single Page Applications (React,
|
|
97
|
+
* Angular, Vue, etc).
|
|
98
|
+
*
|
|
99
|
+
* - Any of the objects of this instance (meshes, geometries, etc) is
|
|
100
|
+
* referenced by a reference type (object or array).
|
|
101
|
+
*
|
|
102
|
+
* You can learn more about how Three.js handles memory leaks
|
|
103
|
+
* [here](https://threejs.org/docs/#manual/en/introduction/How-to-dispose-of-objects).
|
|
104
|
+
*
|
|
105
|
+
*/
|
|
106
|
+
dispose(): void;
|
|
107
|
+
private update;
|
|
108
|
+
private static setupBVH;
|
|
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
|
+
}
|
|
58
123
|
import * as THREE from "three";
|
|
59
124
|
import { Component, Createable, Disposable, Event, Hideable, World } from "../Types";
|
|
60
125
|
import { SimplePlane } from "./src";
|
|
@@ -174,93 +239,6 @@ export declare class Worlds extends Component implements Updateable, Disposable
|
|
|
174
239
|
dispose(): void;
|
|
175
240
|
update(delta?: number): void | Promise<void>;
|
|
176
241
|
}
|
|
177
|
-
import { Component, Disposable, Event } from "../Types";
|
|
178
|
-
/**
|
|
179
|
-
* The entry point of the Components library.
|
|
180
|
-
* It can:
|
|
181
|
-
* - Create and access all the components of the library.
|
|
182
|
-
* - Update all the updatable components automatically.
|
|
183
|
-
* - Dispose all the components, preventing memory leaks.
|
|
184
|
-
*/
|
|
185
|
-
export declare class Components implements Disposable {
|
|
186
|
-
static readonly release = "1.4.21";
|
|
187
|
-
/** {@link Disposable.onDisposed} */
|
|
188
|
-
readonly onDisposed: Event<void>;
|
|
189
|
-
/** The list of components created in this app. */
|
|
190
|
-
readonly list: Map<string, Component>;
|
|
191
|
-
/** If disabled, the animation loop will be stopped. */
|
|
192
|
-
enabled: boolean;
|
|
193
|
-
private _clock;
|
|
194
|
-
add(uuid: string, instance: Component): void;
|
|
195
|
-
/**
|
|
196
|
-
* Retrieves a component. If it already exists in this app, it returns the instance of the component. If it
|
|
197
|
-
* doesn't exist, it will instance it automatically.
|
|
198
|
-
*
|
|
199
|
-
* @param Component - The component to get or create.
|
|
200
|
-
*/
|
|
201
|
-
get<U extends Component>(Component: new (components: Components) => U): U;
|
|
202
|
-
constructor();
|
|
203
|
-
/**
|
|
204
|
-
* Initializes the library. It should be called at the start of the app after
|
|
205
|
-
* initializing the scene, the renderer and the
|
|
206
|
-
* camera. Additionally, if any component that need a raycaster is
|
|
207
|
-
* used, the {@link raycaster} will need to be initialized.
|
|
208
|
-
*/
|
|
209
|
-
init(): void;
|
|
210
|
-
/**
|
|
211
|
-
* Disposes the memory of all the components and tools of this instance of
|
|
212
|
-
* the library. A memory leak will be created if:
|
|
213
|
-
*
|
|
214
|
-
* - An instance of the library ends up out of scope and this function isn't
|
|
215
|
-
* called. This is especially relevant in Single Page Applications (React,
|
|
216
|
-
* Angular, Vue, etc).
|
|
217
|
-
*
|
|
218
|
-
* - Any of the objects of this instance (meshes, geometries, etc) is
|
|
219
|
-
* referenced by a reference type (object or array).
|
|
220
|
-
*
|
|
221
|
-
* You can learn more about how Three.js handles memory leaks
|
|
222
|
-
* [here](https://threejs.org/docs/#manual/en/introduction/How-to-dispose-of-objects).
|
|
223
|
-
*
|
|
224
|
-
*/
|
|
225
|
-
dispose(): void;
|
|
226
|
-
private update;
|
|
227
|
-
private static setupBVH;
|
|
228
|
-
}
|
|
229
|
-
import { Components } from "../Components";
|
|
230
|
-
import { MeshCullerRenderer, CullerRendererSettings } from "./src";
|
|
231
|
-
import { Component, Event, Disposable, World } from "../Types";
|
|
232
|
-
/**
|
|
233
|
-
* A tool to handle big scenes efficiently by automatically hiding the objects
|
|
234
|
-
* that are not visible to the camera.
|
|
235
|
-
*/
|
|
236
|
-
export declare class Cullers extends Component implements Disposable {
|
|
237
|
-
static readonly uuid: "69f2a50d-c266-44fc-b1bd-fa4d34be89e6";
|
|
238
|
-
private _enabled;
|
|
239
|
-
list: Map<string, MeshCullerRenderer>;
|
|
240
|
-
/** {@link Disposable.onDisposed} */
|
|
241
|
-
readonly onDisposed: Event<unknown>;
|
|
242
|
-
/** {@link Component.enabled} */
|
|
243
|
-
get enabled(): boolean;
|
|
244
|
-
set enabled(value: boolean);
|
|
245
|
-
constructor(components: Components);
|
|
246
|
-
create(world: World, config?: Partial<CullerRendererSettings>): MeshCullerRenderer;
|
|
247
|
-
delete(world: World): void;
|
|
248
|
-
/** {@link Disposable.dispose} */
|
|
249
|
-
dispose(): void;
|
|
250
|
-
}
|
|
251
|
-
import { Component, Disposable, World, Event } from "../Types";
|
|
252
|
-
import { GridConfig, SimpleGrid } from "./src";
|
|
253
|
-
export declare class Grids extends Component implements Disposable {
|
|
254
|
-
static readonly uuid: "d1e814d5-b81c-4452-87a2-f039375e0489";
|
|
255
|
-
list: Map<string, SimpleGrid>;
|
|
256
|
-
onDisposed: Event<unknown>;
|
|
257
|
-
config: Required<GridConfig>;
|
|
258
|
-
/** {@link Component.enabled} */
|
|
259
|
-
enabled: boolean;
|
|
260
|
-
create(world: World): void;
|
|
261
|
-
delete(world: World): void;
|
|
262
|
-
dispose(): void;
|
|
263
|
-
}
|
|
264
242
|
import * as THREE from "three";
|
|
265
243
|
import { Component, Disposable, Event, World } from "../Types";
|
|
266
244
|
import { Components } from "../Components";
|
|
@@ -322,84 +300,96 @@ export declare class Materials extends Component implements Disposable {
|
|
|
322
300
|
*/
|
|
323
301
|
removeMeshes(id: string, meshes: THREE.Mesh[]): void;
|
|
324
302
|
}
|
|
325
|
-
import
|
|
326
|
-
import {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
export declare class
|
|
333
|
-
static readonly uuid: "
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
private _groupSystems;
|
|
303
|
+
import { Components } from "../Components";
|
|
304
|
+
import { MeshCullerRenderer, CullerRendererSettings } from "./src";
|
|
305
|
+
import { Component, Event, Disposable, World } from "../Types";
|
|
306
|
+
/**
|
|
307
|
+
* A tool to handle big scenes efficiently by automatically hiding the objects
|
|
308
|
+
* that are not visible to the camera.
|
|
309
|
+
*/
|
|
310
|
+
export declare class Cullers extends Component implements Disposable {
|
|
311
|
+
static readonly uuid: "69f2a50d-c266-44fc-b1bd-fa4d34be89e6";
|
|
312
|
+
private _enabled;
|
|
313
|
+
list: Map<string, MeshCullerRenderer>;
|
|
337
314
|
/** {@link Disposable.onDisposed} */
|
|
338
315
|
readonly onDisposed: Event<unknown>;
|
|
316
|
+
/** {@link Component.enabled} */
|
|
317
|
+
get enabled(): boolean;
|
|
318
|
+
set enabled(value: boolean);
|
|
339
319
|
constructor(components: Components);
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
320
|
+
create(world: World, config?: Partial<CullerRendererSettings>): MeshCullerRenderer;
|
|
321
|
+
delete(world: World): void;
|
|
322
|
+
/** {@link Disposable.dispose} */
|
|
343
323
|
dispose(): void;
|
|
344
|
-
remove(guid: string): void;
|
|
345
|
-
find(filter?: {
|
|
346
|
-
[name: string]: string[];
|
|
347
|
-
}): FRAGS.FragmentIdMap;
|
|
348
|
-
byModel(modelID: string, group: FRAGS.FragmentsGroup): void;
|
|
349
|
-
byPredefinedType(group: FRAGS.FragmentsGroup): Promise<void>;
|
|
350
|
-
byEntity(group: FRAGS.FragmentsGroup): void;
|
|
351
|
-
byStorey(group: FRAGS.FragmentsGroup): void;
|
|
352
|
-
byIfcRel(group: FRAGS.FragmentsGroup, ifcRel: number, systemName: string): Promise<void>;
|
|
353
|
-
private saveItem;
|
|
354
|
-
}
|
|
355
|
-
import * as THREE from "three";
|
|
356
|
-
export declare function obbFromPoints(vertices: ArrayLike<number>): {
|
|
357
|
-
center: THREE.Vector3;
|
|
358
|
-
halfSizes: THREE.Vector3;
|
|
359
|
-
rotation: THREE.Matrix3;
|
|
360
|
-
transformation: THREE.Matrix4;
|
|
361
|
-
};
|
|
362
|
-
export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
|
|
363
|
-
import * as THREE from "three";
|
|
364
|
-
export declare class MaterialsUtils {
|
|
365
|
-
static isTransparent(material: THREE.Material): boolean;
|
|
366
|
-
}
|
|
367
|
-
export declare class UUID {
|
|
368
|
-
private static _pattern;
|
|
369
|
-
private static _lut;
|
|
370
|
-
static create(): string;
|
|
371
|
-
static validate(uuid: string): void;
|
|
372
324
|
}
|
|
373
325
|
import * as THREE from "three";
|
|
374
|
-
import {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
readonly
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
set config(value: Partial<VertexPickerConfig>);
|
|
397
|
-
get config(): Partial<VertexPickerConfig>;
|
|
326
|
+
import { Components } from "../../core/Components";
|
|
327
|
+
import { SimpleCamera } from "../../core";
|
|
328
|
+
import { NavigationMode, NavModeID, ProjectionManager } from "./src";
|
|
329
|
+
/**
|
|
330
|
+
* A flexible camera that uses
|
|
331
|
+
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
|
|
332
|
+
* easily control the camera in 2D and 3D. It supports multiple navigation
|
|
333
|
+
* modes, such as 2D floor plan navigation, first person and 3D orbit.
|
|
334
|
+
*/
|
|
335
|
+
export declare class OrthoPerspectiveCamera extends SimpleCamera {
|
|
336
|
+
/**
|
|
337
|
+
* The current {@link NavigationMode}.
|
|
338
|
+
*/
|
|
339
|
+
mode: NavigationMode;
|
|
340
|
+
readonly projection: ProjectionManager;
|
|
341
|
+
readonly threeOrtho: THREE.OrthographicCamera;
|
|
342
|
+
protected readonly _userInputButtons: any;
|
|
343
|
+
protected readonly _frustumSize = 50;
|
|
344
|
+
protected readonly _navigationModes: Map<NavModeID, NavigationMode>;
|
|
345
|
+
get current(): THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
|
346
|
+
constructor(components: Components);
|
|
347
|
+
/** {@link Disposable.dispose} */
|
|
398
348
|
dispose(): void;
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
349
|
+
/**
|
|
350
|
+
* Sets a new {@link NavigationMode} and disables the previous one.
|
|
351
|
+
*
|
|
352
|
+
* @param mode - The {@link NavigationMode} to set.
|
|
353
|
+
*/
|
|
354
|
+
set(mode: NavModeID): void;
|
|
355
|
+
/**
|
|
356
|
+
* Make the camera view fit all the specified meshes.
|
|
357
|
+
*
|
|
358
|
+
* @param meshes the meshes to fit. If it is not defined, it will
|
|
359
|
+
* evaluate {@link Components.meshes}.
|
|
360
|
+
* @param offset the distance to the fit object
|
|
361
|
+
*/
|
|
362
|
+
fit(meshes: Iterable<THREE.Mesh>, offset?: number): Promise<void>;
|
|
363
|
+
/**
|
|
364
|
+
* Allows or prevents all user input.
|
|
365
|
+
*
|
|
366
|
+
* @param active - whether to enable or disable user inputs.
|
|
367
|
+
*/
|
|
368
|
+
setUserInput(active: boolean): void;
|
|
369
|
+
private disableUserInput;
|
|
370
|
+
private enableUserInput;
|
|
371
|
+
private newOrthoCamera;
|
|
372
|
+
private setOrthoCameraAspect;
|
|
373
|
+
}
|
|
374
|
+
import * as THREE from "three";
|
|
375
|
+
export interface MeasureEdge {
|
|
376
|
+
distance: number;
|
|
377
|
+
points: THREE.Vector3[];
|
|
378
|
+
}
|
|
379
|
+
export declare class MeasurementUtils {
|
|
380
|
+
static getFace(mesh: THREE.InstancedMesh | THREE.Mesh, triangleIndex: number, instance?: number): {
|
|
381
|
+
edges: MeasureEdge[];
|
|
382
|
+
indices: Set<number>;
|
|
383
|
+
} | null;
|
|
384
|
+
static distanceFromPointToLine(point: THREE.Vector3, lineStart: THREE.Vector3, lineEnd: THREE.Vector3, clamp?: boolean): number;
|
|
385
|
+
private static getFaceData;
|
|
386
|
+
static getVerticesAndNormal(mesh: THREE.Mesh | THREE.InstancedMesh, faceIndex: number, instance: number | undefined): {
|
|
387
|
+
p1: THREE.Vector3;
|
|
388
|
+
p2: THREE.Vector3;
|
|
389
|
+
p3: THREE.Vector3;
|
|
390
|
+
faceNormal: THREE.Vector3;
|
|
391
|
+
};
|
|
392
|
+
private static round;
|
|
403
393
|
}
|
|
404
394
|
import * as THREE from "three";
|
|
405
395
|
import * as FRAGS from "@thatopen/fragments";
|
|
@@ -447,26 +437,6 @@ export declare class FragmentHider extends Component {
|
|
|
447
437
|
isolate(items: FRAGS.FragmentIdMap): void;
|
|
448
438
|
private updateCulledVisibility;
|
|
449
439
|
}
|
|
450
|
-
import * as THREE from "three";
|
|
451
|
-
export interface MeasureEdge {
|
|
452
|
-
distance: number;
|
|
453
|
-
points: THREE.Vector3[];
|
|
454
|
-
}
|
|
455
|
-
export declare class MeasurementUtils {
|
|
456
|
-
static getFace(mesh: THREE.InstancedMesh | THREE.Mesh, triangleIndex: number, instance?: number): {
|
|
457
|
-
edges: MeasureEdge[];
|
|
458
|
-
indices: Set<number>;
|
|
459
|
-
} | null;
|
|
460
|
-
static distanceFromPointToLine(point: THREE.Vector3, lineStart: THREE.Vector3, lineEnd: THREE.Vector3, clamp?: boolean): number;
|
|
461
|
-
private static getFaceData;
|
|
462
|
-
static getVerticesAndNormal(mesh: THREE.Mesh | THREE.InstancedMesh, faceIndex: number, instance: number | undefined): {
|
|
463
|
-
p1: THREE.Vector3;
|
|
464
|
-
p2: THREE.Vector3;
|
|
465
|
-
p3: THREE.Vector3;
|
|
466
|
-
faceNormal: THREE.Vector3;
|
|
467
|
-
};
|
|
468
|
-
private static round;
|
|
469
|
-
}
|
|
470
440
|
import * as WEBIFC from "web-ifc";
|
|
471
441
|
import * as FRAGS from "@thatopen/fragments";
|
|
472
442
|
import { IfcFragmentSettings } from "./src";
|
|
@@ -499,6 +469,14 @@ export declare class FragmentIfcLoader extends Component implements Disposable {
|
|
|
499
469
|
private getGeometry;
|
|
500
470
|
private autoSetWasm;
|
|
501
471
|
}
|
|
472
|
+
import * as THREE from "three";
|
|
473
|
+
export declare function obbFromPoints(vertices: ArrayLike<number>): {
|
|
474
|
+
center: THREE.Vector3;
|
|
475
|
+
halfSizes: THREE.Vector3;
|
|
476
|
+
rotation: THREE.Matrix3;
|
|
477
|
+
transformation: THREE.Matrix4;
|
|
478
|
+
};
|
|
479
|
+
export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
|
|
502
480
|
import { Component, Disposable, Event, Components } from "../../core";
|
|
503
481
|
export declare class FragmentExploder extends Component implements Disposable {
|
|
504
482
|
static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
|
|
@@ -514,6 +492,52 @@ export declare class FragmentExploder extends Component implements Disposable {
|
|
|
514
492
|
reset(): void;
|
|
515
493
|
update(): void;
|
|
516
494
|
}
|
|
495
|
+
import * as FRAGS from "@thatopen/fragments";
|
|
496
|
+
import { Disposable, Component, Event, Components } from "../../core";
|
|
497
|
+
export interface Classification {
|
|
498
|
+
[system: string]: {
|
|
499
|
+
[className: string]: FRAGS.FragmentIdMap;
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
export declare class FragmentClassifier extends Component implements Disposable {
|
|
503
|
+
static readonly uuid: "e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7";
|
|
504
|
+
/** {@link Component.enabled} */
|
|
505
|
+
enabled: boolean;
|
|
506
|
+
private _groupSystems;
|
|
507
|
+
/** {@link Disposable.onDisposed} */
|
|
508
|
+
readonly onDisposed: Event<unknown>;
|
|
509
|
+
constructor(components: Components);
|
|
510
|
+
private onFragmentsDisposed;
|
|
511
|
+
/** {@link Component.get} */
|
|
512
|
+
get(): Classification;
|
|
513
|
+
dispose(): void;
|
|
514
|
+
remove(guid: string): void;
|
|
515
|
+
find(filter?: {
|
|
516
|
+
[name: string]: string[];
|
|
517
|
+
}): FRAGS.FragmentIdMap;
|
|
518
|
+
byModel(modelID: string, group: FRAGS.FragmentsGroup): void;
|
|
519
|
+
byPredefinedType(group: FRAGS.FragmentsGroup): Promise<void>;
|
|
520
|
+
byEntity(group: FRAGS.FragmentsGroup): void;
|
|
521
|
+
byStorey(group: FRAGS.FragmentsGroup): void;
|
|
522
|
+
byIfcRel(group: FRAGS.FragmentsGroup, ifcRel: number, systemName: string): Promise<void>;
|
|
523
|
+
private saveItem;
|
|
524
|
+
}
|
|
525
|
+
import * as WEBIFC from "web-ifc";
|
|
526
|
+
import * as FRAG from "@thatopen/fragments";
|
|
527
|
+
/**
|
|
528
|
+
* Object to export all the properties from an IFC to a JS object.
|
|
529
|
+
*/
|
|
530
|
+
export declare class IfcJsonExporter {
|
|
531
|
+
/**
|
|
532
|
+
* Exports all the properties of an IFC into an array of JS objects.
|
|
533
|
+
* @param webIfc The instance of [web-ifc]{@link https://github.com/ThatOpen/engine_web-ifc} to use.
|
|
534
|
+
* @param modelID ID of the IFC model whose properties to extract.
|
|
535
|
+
* @param indirect whether to get the indirect relationships as well.
|
|
536
|
+
* @param recursiveSpatial whether to get the properties of spatial items recursively
|
|
537
|
+
* to make the location data available (e.g. absolute position of building).
|
|
538
|
+
*/
|
|
539
|
+
export(webIfc: WEBIFC.IfcAPI, modelID: number, indirect?: boolean, recursiveSpatial?: boolean): Promise<FRAG.IfcProperties>;
|
|
540
|
+
}
|
|
517
541
|
import { Fragment, FragmentsGroup } from "@thatopen/fragments";
|
|
518
542
|
import * as THREE from "three";
|
|
519
543
|
import { Component, Components, Event, Disposable } from "../../core";
|
|
@@ -558,105 +582,46 @@ export declare class FragmentManager extends Component implements Disposable {
|
|
|
558
582
|
export(group: FragmentsGroup): Uint8Array;
|
|
559
583
|
coordinate(models?: FragmentsGroup[]): void;
|
|
560
584
|
}
|
|
561
|
-
import * as
|
|
562
|
-
import { Components } from "../../core/Components";
|
|
563
|
-
import { SimpleCamera } from "../../core";
|
|
564
|
-
import { NavigationMode, NavModeID, ProjectionManager } from "./src";
|
|
565
|
-
/**
|
|
566
|
-
* A flexible camera that uses
|
|
567
|
-
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
|
|
568
|
-
* easily control the camera in 2D and 3D. It supports multiple navigation
|
|
569
|
-
* modes, such as 2D floor plan navigation, first person and 3D orbit.
|
|
570
|
-
*/
|
|
571
|
-
export declare class OrthoPerspectiveCamera extends SimpleCamera {
|
|
572
|
-
/**
|
|
573
|
-
* The current {@link NavigationMode}.
|
|
574
|
-
*/
|
|
575
|
-
mode: NavigationMode;
|
|
576
|
-
readonly projection: ProjectionManager;
|
|
577
|
-
readonly threeOrtho: THREE.OrthographicCamera;
|
|
578
|
-
protected readonly _userInputButtons: any;
|
|
579
|
-
protected readonly _frustumSize = 50;
|
|
580
|
-
protected readonly _navigationModes: Map<NavModeID, NavigationMode>;
|
|
581
|
-
get current(): THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
|
582
|
-
constructor(components: Components);
|
|
583
|
-
/** {@link Disposable.dispose} */
|
|
584
|
-
dispose(): void;
|
|
585
|
-
/**
|
|
586
|
-
* Sets a new {@link NavigationMode} and disables the previous one.
|
|
587
|
-
*
|
|
588
|
-
* @param mode - The {@link NavigationMode} to set.
|
|
589
|
-
*/
|
|
590
|
-
set(mode: NavModeID): void;
|
|
591
|
-
/**
|
|
592
|
-
* Make the camera view fit all the specified meshes.
|
|
593
|
-
*
|
|
594
|
-
* @param meshes the meshes to fit. If it is not defined, it will
|
|
595
|
-
* evaluate {@link Components.meshes}.
|
|
596
|
-
* @param offset the distance to the fit object
|
|
597
|
-
*/
|
|
598
|
-
fit(meshes: Iterable<THREE.Mesh>, offset?: number): Promise<void>;
|
|
599
|
-
/**
|
|
600
|
-
* Allows or prevents all user input.
|
|
601
|
-
*
|
|
602
|
-
* @param active - whether to enable or disable user inputs.
|
|
603
|
-
*/
|
|
604
|
-
setUserInput(active: boolean): void;
|
|
605
|
-
private disableUserInput;
|
|
606
|
-
private enableUserInput;
|
|
607
|
-
private newOrthoCamera;
|
|
608
|
-
private setOrthoCameraAspect;
|
|
609
|
-
}
|
|
610
|
-
import * as WEBIFC from "web-ifc";
|
|
611
|
-
import * as FRAG from "@thatopen/fragments";
|
|
612
|
-
/**
|
|
613
|
-
* Object to export all the properties from an IFC to a JS object.
|
|
614
|
-
*/
|
|
615
|
-
export declare class IfcJsonExporter {
|
|
616
|
-
/**
|
|
617
|
-
* Exports all the properties of an IFC into an array of JS objects.
|
|
618
|
-
* @param webIfc The instance of [web-ifc]{@link https://github.com/ThatOpen/engine_web-ifc} to use.
|
|
619
|
-
* @param modelID ID of the IFC model whose properties to extract.
|
|
620
|
-
* @param indirect whether to get the indirect relationships as well.
|
|
621
|
-
* @param recursiveSpatial whether to get the properties of spatial items recursively
|
|
622
|
-
* to make the location data available (e.g. absolute position of building).
|
|
623
|
-
*/
|
|
624
|
-
export(webIfc: WEBIFC.IfcAPI, modelID: number, indirect?: boolean, recursiveSpatial?: boolean): Promise<FRAG.IfcProperties>;
|
|
625
|
-
}
|
|
585
|
+
import * as FRAGS from "@thatopen/fragments";
|
|
626
586
|
import { FragmentsGroup } from "@thatopen/fragments";
|
|
627
587
|
import { Disposable, Event, Component, Components } from "../../core";
|
|
628
|
-
import {
|
|
629
|
-
interface
|
|
588
|
+
import { QueryGroup } from "./src/types";
|
|
589
|
+
export interface QueryResult {
|
|
630
590
|
[modelID: string]: {
|
|
631
|
-
|
|
591
|
+
modelEntities: Set<number>;
|
|
592
|
+
otherEntities: Set<number>;
|
|
632
593
|
};
|
|
633
594
|
}
|
|
634
|
-
export
|
|
635
|
-
|
|
595
|
+
export interface IndexedModels {
|
|
596
|
+
[modelID: string]: {
|
|
597
|
+
[expressID: number]: Set<number>;
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
export declare class IfcPropertiesFinder extends Component implements Disposable {
|
|
601
|
+
readonly onFound: Event<FRAGS.FragmentIdMap>;
|
|
636
602
|
/** {@link Disposable.onDisposed} */
|
|
637
|
-
readonly onDisposed: Event<
|
|
603
|
+
readonly onDisposed: Event<unknown>;
|
|
638
604
|
enabled: boolean;
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
private
|
|
642
|
-
readonly onPropertiesManagerSet: Event<IfcPropertiesManager>;
|
|
643
|
-
set propertiesManager(manager: IfcPropertiesManager | null);
|
|
644
|
-
get propertiesManager(): IfcPropertiesManager | null;
|
|
605
|
+
indexedModels: IndexedModels;
|
|
606
|
+
private readonly _conditionFunctions;
|
|
607
|
+
private _noHandleAttributes;
|
|
645
608
|
constructor(components: Components);
|
|
646
609
|
private onFragmentsDisposed;
|
|
647
|
-
dispose():
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
private
|
|
651
|
-
|
|
652
|
-
private
|
|
653
|
-
private
|
|
654
|
-
private
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
import
|
|
610
|
+
dispose(): void;
|
|
611
|
+
private indexEntityRelations;
|
|
612
|
+
find(groups: QueryGroup[], queryModels?: FragmentsGroup[]): Promise<FRAGS.FragmentIdMap>;
|
|
613
|
+
private toFragmentMap;
|
|
614
|
+
private simpleQuery;
|
|
615
|
+
private getMatchingEntities;
|
|
616
|
+
private combineArrays;
|
|
617
|
+
private getCommonElements;
|
|
618
|
+
private arrayIntersection;
|
|
619
|
+
private arrayUnion;
|
|
620
|
+
private getConditionFunctions;
|
|
621
|
+
}
|
|
622
|
+
import * as WEBIFC from "web-ifc";
|
|
623
|
+
import { FragmentsGroup } from "@thatopen/fragments";
|
|
624
|
+
import { Component, Disposable, Event, Components } from "../../core";
|
|
660
625
|
type BooleanPropTypes = "IfcBoolean" | "IfcLogical";
|
|
661
626
|
type StringPropTypes = "IfcText" | "IfcLabel" | "IfcIdentifier";
|
|
662
627
|
type NumericPropTypes = "IfcInteger" | "IfcReal";
|
|
@@ -727,42 +692,77 @@ export declare class IfcPropertiesManager extends Component implements Disposabl
|
|
|
727
692
|
setAttributeListener(model: FragmentsGroup, expressID: number, attributeName: string): Promise<Event<String | Number | Boolean>>;
|
|
728
693
|
}
|
|
729
694
|
export {};
|
|
730
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
731
695
|
import { FragmentsGroup } from "@thatopen/fragments";
|
|
732
696
|
import { Disposable, Event, Component, Components } from "../../core";
|
|
733
|
-
import {
|
|
734
|
-
|
|
735
|
-
[modelID: string]: {
|
|
736
|
-
modelEntities: Set<number>;
|
|
737
|
-
otherEntities: Set<number>;
|
|
738
|
-
};
|
|
739
|
-
}
|
|
740
|
-
export interface IndexedModels {
|
|
697
|
+
import { IfcPropertiesManager } from "../IfcPropertiesManager";
|
|
698
|
+
interface IndexMap {
|
|
741
699
|
[modelID: string]: {
|
|
742
|
-
[expressID:
|
|
700
|
+
[expressID: string]: Set<number>;
|
|
743
701
|
};
|
|
744
702
|
}
|
|
745
|
-
export declare class
|
|
746
|
-
readonly
|
|
703
|
+
export declare class IfcPropertiesIndexer extends Component implements Disposable {
|
|
704
|
+
static readonly uuid: "23a889ab-83b3-44a4-8bee-ead83438370b";
|
|
747
705
|
/** {@link Disposable.onDisposed} */
|
|
748
|
-
readonly onDisposed: Event<
|
|
706
|
+
readonly onDisposed: Event<string>;
|
|
749
707
|
enabled: boolean;
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
private
|
|
708
|
+
relationsToProcess: number[];
|
|
709
|
+
indexMap: IndexMap;
|
|
710
|
+
private _propertiesManager;
|
|
711
|
+
readonly onPropertiesManagerSet: Event<IfcPropertiesManager>;
|
|
712
|
+
set propertiesManager(manager: IfcPropertiesManager | null);
|
|
713
|
+
get propertiesManager(): IfcPropertiesManager | null;
|
|
753
714
|
constructor(components: Components);
|
|
754
715
|
private onFragmentsDisposed;
|
|
716
|
+
dispose(): Promise<void>;
|
|
717
|
+
getProperties(model: FragmentsGroup, id: string): Promise<any[] | null>;
|
|
718
|
+
private getNestedPsets;
|
|
719
|
+
private getPsetProperties;
|
|
720
|
+
process(model: FragmentsGroup): Promise<void>;
|
|
721
|
+
private setEntityIndex;
|
|
722
|
+
private cloneProperty;
|
|
723
|
+
private clonePropertyArray;
|
|
724
|
+
}
|
|
725
|
+
export {};
|
|
726
|
+
import * as THREE from "three";
|
|
727
|
+
export declare class MaterialsUtils {
|
|
728
|
+
static isTransparent(material: THREE.Material): boolean;
|
|
729
|
+
}
|
|
730
|
+
export declare class UUID {
|
|
731
|
+
private static _pattern;
|
|
732
|
+
private static _lut;
|
|
733
|
+
static create(): string;
|
|
734
|
+
static validate(uuid: string): void;
|
|
735
|
+
}
|
|
736
|
+
import * as THREE from "three";
|
|
737
|
+
import { Component, Components, Event, World, Disposable } from "../core";
|
|
738
|
+
export interface VertexPickerConfig {
|
|
739
|
+
showOnlyVertex: boolean;
|
|
740
|
+
snapDistance: number;
|
|
741
|
+
previewElement: HTMLElement;
|
|
742
|
+
}
|
|
743
|
+
export declare class VertexPicker extends Component implements Disposable {
|
|
744
|
+
onVertexFound: Event<THREE.Vector3>;
|
|
745
|
+
onVertexLost: Event<THREE.Vector3>;
|
|
746
|
+
components: Components;
|
|
747
|
+
private _pickedPoint;
|
|
748
|
+
private _config;
|
|
749
|
+
private _enabled;
|
|
750
|
+
private _workingPlane;
|
|
751
|
+
/** {@link Disposable.onDisposed} */
|
|
752
|
+
readonly onDisposed: Event<unknown>;
|
|
753
|
+
set enabled(value: boolean);
|
|
754
|
+
get enabled(): boolean;
|
|
755
|
+
constructor(components: Components, config?: Partial<VertexPickerConfig>);
|
|
756
|
+
[Symbol.dispose](): void;
|
|
757
|
+
set workingPlane(plane: THREE.Plane | null);
|
|
758
|
+
get workingPlane(): THREE.Plane | null;
|
|
759
|
+
set config(value: Partial<VertexPickerConfig>);
|
|
760
|
+
get config(): Partial<VertexPickerConfig>;
|
|
755
761
|
dispose(): void;
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
private
|
|
759
|
-
private
|
|
760
|
-
private getMatchingEntities;
|
|
761
|
-
private combineArrays;
|
|
762
|
-
private getCommonElements;
|
|
763
|
-
private arrayIntersection;
|
|
764
|
-
private arrayUnion;
|
|
765
|
-
private getConditionFunctions;
|
|
762
|
+
get(world: World): THREE.Vector3 | null;
|
|
763
|
+
private getClosestVertex;
|
|
764
|
+
private getVertices;
|
|
765
|
+
private getVertex;
|
|
766
766
|
}
|
|
767
767
|
import * as WEBIFC from "web-ifc";
|
|
768
768
|
import { IfcItemsCategories } from "../../../ifc";
|
|
@@ -772,7 +772,6 @@ export declare class SpatialStructure {
|
|
|
772
772
|
setUp(webIfc: WEBIFC.IfcAPI): void;
|
|
773
773
|
cleanUp(): void;
|
|
774
774
|
}
|
|
775
|
-
export declare const GeometryTypes: Set<number>;
|
|
776
775
|
import * as WEBIFC from "web-ifc";
|
|
777
776
|
export interface IfcItemsCategories {
|
|
778
777
|
[itemID: number]: number;
|
|
@@ -783,6 +782,7 @@ export declare class IfcCategories {
|
|
|
783
782
|
export declare const IfcElements: {
|
|
784
783
|
[key: number]: string;
|
|
785
784
|
};
|
|
785
|
+
export declare const GeometryTypes: Set<number>;
|
|
786
786
|
export declare const IfcCategoryMap: {
|
|
787
787
|
[key: number]: string;
|
|
788
788
|
};
|
|
@@ -812,30 +812,128 @@ export declare class IfcPropertiesUtils {
|
|
|
812
812
|
static groupEntitiesByType(model: FRAGS.FragmentsGroup, expressIDs: Set<number> | number[]): Promise<Map<number, Set<number>>>;
|
|
813
813
|
}
|
|
814
814
|
import * as THREE from "three";
|
|
815
|
-
import {
|
|
816
|
-
|
|
817
|
-
|
|
815
|
+
import { Disposable, Event } from "../../Types";
|
|
816
|
+
/**
|
|
817
|
+
* A helper to easily get the real position of the mouse in the Three.js canvas
|
|
818
|
+
* to work with tools like the
|
|
819
|
+
* [raycaster](https://threejs.org/docs/#api/en/core/Raycaster), even if it has
|
|
820
|
+
* been transformed through CSS or doesn't occupy the whole screen.
|
|
821
|
+
*/
|
|
822
|
+
export declare class Mouse implements Disposable {
|
|
823
|
+
dom: HTMLCanvasElement;
|
|
824
|
+
private _event?;
|
|
825
|
+
private _position;
|
|
826
|
+
/** {@link Disposable.onDisposed} */
|
|
827
|
+
readonly onDisposed: Event<unknown>;
|
|
828
|
+
constructor(dom: HTMLCanvasElement);
|
|
818
829
|
/**
|
|
819
|
-
*
|
|
830
|
+
* The real position of the mouse of the Three.js canvas.
|
|
820
831
|
*/
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
832
|
+
get position(): THREE.Vector2;
|
|
833
|
+
/** {@link Disposable.dispose} */
|
|
834
|
+
dispose(): void;
|
|
835
|
+
private getPositionY;
|
|
836
|
+
private getPositionX;
|
|
837
|
+
private updateMouseInfo;
|
|
838
|
+
private setupEvents;
|
|
839
|
+
}
|
|
840
|
+
import * as THREE from "three";
|
|
841
|
+
import { BaseRenderer, Event } from "../../Types";
|
|
842
|
+
import { Components } from "../../Components";
|
|
843
|
+
/**
|
|
844
|
+
* A basic renderer capable of rendering
|
|
845
|
+
* ([Objec3Ds](https://threejs.org/docs/#api/en/core/Object3D).
|
|
846
|
+
*/
|
|
847
|
+
export declare class SimpleRenderer extends BaseRenderer {
|
|
848
|
+
/** {@link Component.enabled} */
|
|
824
849
|
enabled: boolean;
|
|
825
|
-
|
|
850
|
+
/** The HTML container of the THREE.js canvas where the scene is rendered. */
|
|
851
|
+
container: HTMLElement | null;
|
|
852
|
+
three: THREE.WebGLRenderer;
|
|
853
|
+
protected _canvas: HTMLCanvasElement;
|
|
854
|
+
protected _parameters?: Partial<THREE.WebGLRendererParameters>;
|
|
855
|
+
protected onContainerUpdated: Event<HTMLElement>;
|
|
856
|
+
constructor(components: Components, container?: HTMLElement, parameters?: Partial<THREE.WebGLRendererParameters>);
|
|
857
|
+
/** {@link Updateable.update} */
|
|
858
|
+
update(): void;
|
|
859
|
+
/** {@link Disposable.dispose} */
|
|
860
|
+
dispose(): void;
|
|
861
|
+
/** {@link Resizeable.getSize}. */
|
|
862
|
+
getSize(): THREE.Vector2;
|
|
863
|
+
/** {@link Resizeable.resize} */
|
|
864
|
+
resize: (size?: THREE.Vector2) => void;
|
|
865
|
+
setupEvents(active: boolean): void;
|
|
866
|
+
private resizeEvent;
|
|
867
|
+
private setupRenderer;
|
|
868
|
+
private onContextLost;
|
|
869
|
+
private onContextBack;
|
|
870
|
+
private updateContainer;
|
|
871
|
+
}
|
|
872
|
+
import * as THREE from "three";
|
|
873
|
+
import { Components } from "../../Components";
|
|
874
|
+
import { Event, World, Disposable } from "../../Types";
|
|
875
|
+
import { Mouse } from "./mouse";
|
|
876
|
+
/**
|
|
877
|
+
* A simple [raycaster](https://threejs.org/docs/#api/en/core/Raycaster)
|
|
878
|
+
* that allows to easily get items from the scene using the mouse and touch
|
|
879
|
+
* events.
|
|
880
|
+
*/
|
|
881
|
+
export declare class SimpleRaycaster implements Disposable {
|
|
882
|
+
/** {@link Component.enabled} */
|
|
883
|
+
enabled: boolean;
|
|
884
|
+
components: Components;
|
|
885
|
+
/** {@link Disposable.onDisposed} */
|
|
826
886
|
readonly onDisposed: Event<unknown>;
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
887
|
+
/** The position of the mouse in the screen. */
|
|
888
|
+
readonly mouse: Mouse;
|
|
889
|
+
readonly three: THREE.Raycaster;
|
|
890
|
+
world: World;
|
|
891
|
+
constructor(components: Components, world: World);
|
|
892
|
+
/** {@link Disposable.dispose} */
|
|
893
|
+
dispose(): void;
|
|
894
|
+
/**
|
|
895
|
+
* Throws a ray from the camera to the mouse or touch event point and returns
|
|
896
|
+
* the first item found. This also takes into account the clipping planes
|
|
897
|
+
* used by the renderer.
|
|
898
|
+
*
|
|
899
|
+
* @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
|
|
900
|
+
* to query. If not provided, it will query all the meshes stored in
|
|
901
|
+
* {@link Components.meshes}.
|
|
902
|
+
*/
|
|
903
|
+
castRay(items?: THREE.Mesh[]): THREE.Intersection | null;
|
|
904
|
+
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;
|
|
905
|
+
private intersect;
|
|
906
|
+
private filterClippingPlanes;
|
|
907
|
+
}
|
|
908
|
+
import * as THREE from "three";
|
|
909
|
+
import { BaseScene, Configurable, Event } from "../../Types";
|
|
910
|
+
import { Components } from "../../Components";
|
|
911
|
+
export interface SimpleSceneConfig {
|
|
912
|
+
directionalLight: {
|
|
913
|
+
color: THREE.Color;
|
|
914
|
+
intensity: number;
|
|
915
|
+
position: THREE.Vector3;
|
|
916
|
+
};
|
|
917
|
+
ambientLight: {
|
|
918
|
+
color: THREE.Color;
|
|
919
|
+
intensity: number;
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* A basic 3D [scene](https://threejs.org/docs/#api/en/scenes/Scene) to add
|
|
924
|
+
* objects hierarchically, and easily dispose them when you are finished with it.
|
|
925
|
+
* @noInheritDoc
|
|
926
|
+
*/
|
|
927
|
+
export declare class SimpleScene extends BaseScene implements Configurable<{}> {
|
|
928
|
+
/** {@link Configurable.isSetup} */
|
|
929
|
+
isSetup: boolean;
|
|
930
|
+
three: THREE.Scene;
|
|
931
|
+
/** {@link Configurable.onSetup} */
|
|
932
|
+
readonly onSetup: Event<SimpleScene>;
|
|
933
|
+
config: Required<SimpleSceneConfig>;
|
|
836
934
|
constructor(components: Components);
|
|
837
|
-
|
|
838
|
-
|
|
935
|
+
/** Creates a simple and nice default set up for the scene (e.g. lighting). */
|
|
936
|
+
setup(config?: Partial<SimpleSceneConfig>): void;
|
|
839
937
|
}
|
|
840
938
|
/// <reference types="node" />
|
|
841
939
|
import * as THREE from "three";
|
|
@@ -886,112 +984,30 @@ export declare class SimpleGrid implements Hideable, Disposable {
|
|
|
886
984
|
private updateZoom;
|
|
887
985
|
}
|
|
888
986
|
import * as THREE from "three";
|
|
889
|
-
import { BaseScene,
|
|
987
|
+
import { Event, Base, World, BaseScene, BaseCamera, BaseRenderer } from "../../Types";
|
|
890
988
|
import { Components } from "../../Components";
|
|
891
|
-
export
|
|
892
|
-
directionalLight: {
|
|
893
|
-
color: THREE.Color;
|
|
894
|
-
intensity: number;
|
|
895
|
-
position: THREE.Vector3;
|
|
896
|
-
};
|
|
897
|
-
ambientLight: {
|
|
898
|
-
color: THREE.Color;
|
|
899
|
-
intensity: number;
|
|
900
|
-
};
|
|
901
|
-
}
|
|
902
|
-
/**
|
|
903
|
-
* A basic 3D [scene](https://threejs.org/docs/#api/en/scenes/Scene) to add
|
|
904
|
-
* objects hierarchically, and easily dispose them when you are finished with it.
|
|
905
|
-
* @noInheritDoc
|
|
906
|
-
*/
|
|
907
|
-
export declare class SimpleScene extends BaseScene implements Configurable<{}> {
|
|
908
|
-
/** {@link Configurable.isSetup} */
|
|
909
|
-
isSetup: boolean;
|
|
910
|
-
three: THREE.Scene;
|
|
911
|
-
/** {@link Configurable.onSetup} */
|
|
912
|
-
readonly onSetup: Event<SimpleScene>;
|
|
913
|
-
config: Required<SimpleSceneConfig>;
|
|
914
|
-
constructor(components: Components);
|
|
915
|
-
/** Creates a simple and nice default set up for the scene (e.g. lighting). */
|
|
916
|
-
setup(config?: Partial<SimpleSceneConfig>): void;
|
|
917
|
-
}
|
|
918
|
-
import * as THREE from "three";
|
|
919
|
-
import CameraControls from "camera-controls";
|
|
920
|
-
import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
|
|
921
|
-
import { Components } from "../../Components";
|
|
922
|
-
/**
|
|
923
|
-
* A basic camera that uses
|
|
924
|
-
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
|
|
925
|
-
* easily control the camera in 2D and 3D. Check out it's API to find out
|
|
926
|
-
* what features it offers.
|
|
927
|
-
*/
|
|
928
|
-
export declare class SimpleCamera extends BaseCamera implements Updateable, Disposable {
|
|
929
|
-
/** {@link Updateable.onBeforeUpdate} */
|
|
930
|
-
readonly onBeforeUpdate: Event<SimpleCamera>;
|
|
931
|
-
/** {@link Updateable.onAfterUpdate} */
|
|
932
|
-
readonly onAfterUpdate: Event<SimpleCamera>;
|
|
933
|
-
readonly onAspectUpdated: Event<unknown>;
|
|
934
|
-
/** {@link Disposable.onDisposed} */
|
|
935
|
-
readonly onDisposed: Event<string>;
|
|
936
|
-
readonly three: THREE.PerspectiveCamera;
|
|
937
|
-
private _allControls;
|
|
938
|
-
/**
|
|
939
|
-
* The object that controls the camera. An instance of
|
|
940
|
-
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls).
|
|
941
|
-
* Transforming the camera directly will have no effect: you need to use this
|
|
942
|
-
* object to move, rotate, look at objects, etc.
|
|
943
|
-
*/
|
|
944
|
-
get controls(): CameraControls;
|
|
945
|
-
/** {@link Component.enabled} */
|
|
946
|
-
get enabled(): boolean;
|
|
947
|
-
/** {@link Component.enabled} */
|
|
948
|
-
set enabled(enabled: boolean);
|
|
949
|
-
constructor(components: Components);
|
|
950
|
-
/** {@link Disposable.dispose} */
|
|
951
|
-
dispose(): void;
|
|
952
|
-
/** {@link Updateable.update} */
|
|
953
|
-
update(_delta: number): void;
|
|
989
|
+
export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer> extends Base implements World {
|
|
954
990
|
/**
|
|
955
|
-
*
|
|
956
|
-
* {@link Components.renderer}.
|
|
991
|
+
* All the loaded [meshes](https://threejs.org/docs/#api/en/objects/Mesh).
|
|
957
992
|
*/
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
private setupEvents;
|
|
962
|
-
private static getSubsetOfThree;
|
|
963
|
-
}
|
|
964
|
-
import * as THREE from "three";
|
|
965
|
-
import { BaseRenderer, Event } from "../../Types";
|
|
966
|
-
import { Components } from "../../Components";
|
|
967
|
-
/**
|
|
968
|
-
* A basic renderer capable of rendering
|
|
969
|
-
* ([Objec3Ds](https://threejs.org/docs/#api/en/core/Object3D).
|
|
970
|
-
*/
|
|
971
|
-
export declare class SimpleRenderer extends BaseRenderer {
|
|
972
|
-
/** {@link Component.enabled} */
|
|
993
|
+
readonly meshes: Set<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
994
|
+
readonly onAfterUpdate: Event<unknown>;
|
|
995
|
+
readonly onBeforeUpdate: Event<unknown>;
|
|
973
996
|
enabled: boolean;
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
resize: (size?: THREE.Vector2) => void;
|
|
989
|
-
setupEvents(active: boolean): void;
|
|
990
|
-
private resizeEvent;
|
|
991
|
-
private setupRenderer;
|
|
992
|
-
private onContextLost;
|
|
993
|
-
private onContextBack;
|
|
994
|
-
private updateContainer;
|
|
997
|
+
uuid: string;
|
|
998
|
+
readonly onDisposed: Event<unknown>;
|
|
999
|
+
private _scene?;
|
|
1000
|
+
private _camera?;
|
|
1001
|
+
private _renderer;
|
|
1002
|
+
get scene(): T;
|
|
1003
|
+
set scene(scene: T);
|
|
1004
|
+
get camera(): U;
|
|
1005
|
+
set camera(camera: U);
|
|
1006
|
+
get renderer(): S | null;
|
|
1007
|
+
set renderer(renderer: S | null);
|
|
1008
|
+
constructor(components: Components);
|
|
1009
|
+
update(delta?: number): void;
|
|
1010
|
+
dispose(disposeResources?: boolean): void;
|
|
995
1011
|
}
|
|
996
1012
|
/**
|
|
997
1013
|
* Simple event handler by
|
|
@@ -1027,6 +1043,40 @@ export declare class Event<T> {
|
|
|
1027
1043
|
reset(): void;
|
|
1028
1044
|
private handlers;
|
|
1029
1045
|
}
|
|
1046
|
+
/**
|
|
1047
|
+
* Simple event handler by
|
|
1048
|
+
* [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540).
|
|
1049
|
+
* Keep in mind that:
|
|
1050
|
+
* - If you want to remove it later, you might want to declare the callback as
|
|
1051
|
+
* an object.
|
|
1052
|
+
* - If you want to maintain the reference to 'this', you will need to declare
|
|
1053
|
+
* the callback as an arrow function.
|
|
1054
|
+
*/
|
|
1055
|
+
export declare class AsyncEvent<T> {
|
|
1056
|
+
/**
|
|
1057
|
+
* Add a callback to this event instance.
|
|
1058
|
+
* @param handler - the callback to be added to this event.
|
|
1059
|
+
*/
|
|
1060
|
+
add(handler: T extends void ? {
|
|
1061
|
+
(): Promise<void>;
|
|
1062
|
+
} : {
|
|
1063
|
+
(data: T): Promise<void>;
|
|
1064
|
+
}): void;
|
|
1065
|
+
/**
|
|
1066
|
+
* Removes a callback from this event instance.
|
|
1067
|
+
* @param handler - the callback to be removed from this event.
|
|
1068
|
+
*/
|
|
1069
|
+
remove(handler: T extends void ? {
|
|
1070
|
+
(): Promise<void>;
|
|
1071
|
+
} : {
|
|
1072
|
+
(data: T): Promise<void>;
|
|
1073
|
+
}): void;
|
|
1074
|
+
/** Triggers all the callbacks assigned to this event. */
|
|
1075
|
+
trigger: (data?: T) => Promise<void>;
|
|
1076
|
+
/** Gets rid of all the suscribed events. */
|
|
1077
|
+
reset(): void;
|
|
1078
|
+
private handlers;
|
|
1079
|
+
}
|
|
1030
1080
|
import * as THREE from "three";
|
|
1031
1081
|
import CameraControls from "camera-controls";
|
|
1032
1082
|
import { Event } from "./event";
|
|
@@ -1168,52 +1218,51 @@ export declare abstract class Component extends Base {
|
|
|
1168
1218
|
*/
|
|
1169
1219
|
abstract enabled: boolean;
|
|
1170
1220
|
}
|
|
1171
|
-
import
|
|
1221
|
+
import * as THREE from "three";
|
|
1222
|
+
import CameraControls from "camera-controls";
|
|
1223
|
+
import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
|
|
1172
1224
|
import { Components } from "../../Components";
|
|
1173
1225
|
/**
|
|
1174
|
-
*
|
|
1226
|
+
* A basic camera that uses
|
|
1227
|
+
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
|
|
1228
|
+
* easily control the camera in 2D and 3D. Check out it's API to find out
|
|
1229
|
+
* what features it offers.
|
|
1175
1230
|
*/
|
|
1176
|
-
export declare
|
|
1177
|
-
|
|
1231
|
+
export declare class SimpleCamera extends BaseCamera implements Updateable, Disposable {
|
|
1232
|
+
/** {@link Updateable.onBeforeUpdate} */
|
|
1233
|
+
readonly onBeforeUpdate: Event<SimpleCamera>;
|
|
1234
|
+
/** {@link Updateable.onAfterUpdate} */
|
|
1235
|
+
readonly onAfterUpdate: Event<SimpleCamera>;
|
|
1236
|
+
readonly onAspectUpdated: Event<unknown>;
|
|
1237
|
+
/** {@link Disposable.onDisposed} */
|
|
1238
|
+
readonly onDisposed: Event<string>;
|
|
1239
|
+
readonly three: THREE.PerspectiveCamera;
|
|
1240
|
+
private _allControls;
|
|
1241
|
+
/**
|
|
1242
|
+
* The object that controls the camera. An instance of
|
|
1243
|
+
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls).
|
|
1244
|
+
* Transforming the camera directly will have no effect: you need to use this
|
|
1245
|
+
* object to move, rotate, look at objects, etc.
|
|
1246
|
+
*/
|
|
1247
|
+
get controls(): CameraControls;
|
|
1248
|
+
/** {@link Component.enabled} */
|
|
1249
|
+
get enabled(): boolean;
|
|
1250
|
+
/** {@link Component.enabled} */
|
|
1251
|
+
set enabled(enabled: boolean);
|
|
1178
1252
|
constructor(components: Components);
|
|
1179
|
-
/**
|
|
1180
|
-
|
|
1181
|
-
/**
|
|
1182
|
-
|
|
1183
|
-
/**
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
import { Event } from "./event";
|
|
1193
|
-
import { Components } from "../../Components";
|
|
1194
|
-
/**
|
|
1195
|
-
* One of the elements that make a world. It can be either a scene, a camera
|
|
1196
|
-
* or a renderer.
|
|
1197
|
-
*/
|
|
1198
|
-
export declare abstract class BaseWorldItem extends Base {
|
|
1199
|
-
readonly worlds: Map<string, World>;
|
|
1200
|
-
readonly onWorldChanged: Event<{
|
|
1201
|
-
world: World;
|
|
1202
|
-
action: "added" | "removed";
|
|
1203
|
-
}>;
|
|
1204
|
-
currentWorld: World | null;
|
|
1205
|
-
protected constructor(components: Components);
|
|
1206
|
-
}
|
|
1207
|
-
import * as THREE from "three";
|
|
1208
|
-
import CameraControls from "camera-controls";
|
|
1209
|
-
import { BaseWorldItem } from "./base-world-item";
|
|
1210
|
-
import { CameraControllable } from "./interfaces";
|
|
1211
|
-
export declare abstract class BaseCamera extends BaseWorldItem {
|
|
1212
|
-
abstract enabled: boolean;
|
|
1213
|
-
abstract three: THREE.Camera;
|
|
1214
|
-
abstract controls?: CameraControls;
|
|
1215
|
-
/** Whether is instance is {@link CameraControllable}. */
|
|
1216
|
-
hasCameraControls: () => this is CameraControllable;
|
|
1253
|
+
/** {@link Disposable.dispose} */
|
|
1254
|
+
dispose(): void;
|
|
1255
|
+
/** {@link Updateable.update} */
|
|
1256
|
+
update(_delta: number): void;
|
|
1257
|
+
/**
|
|
1258
|
+
* Updates the aspect of the camera to match the size of the
|
|
1259
|
+
* {@link Components.renderer}.
|
|
1260
|
+
*/
|
|
1261
|
+
updateAspect: () => void;
|
|
1262
|
+
private setupCamera;
|
|
1263
|
+
private newCameraControls;
|
|
1264
|
+
private setupEvents;
|
|
1265
|
+
private static getSubsetOfThree;
|
|
1217
1266
|
}
|
|
1218
1267
|
import * as THREE from "three";
|
|
1219
1268
|
import { Vector2 } from "three";
|
|
@@ -1256,6 +1305,34 @@ export declare abstract class BaseRenderer extends BaseWorldItem implements Upda
|
|
|
1256
1305
|
setPlane(active: boolean, plane: THREE.Plane, isLocal?: boolean): void;
|
|
1257
1306
|
}
|
|
1258
1307
|
import * as THREE from "three";
|
|
1308
|
+
import CameraControls from "camera-controls";
|
|
1309
|
+
import { BaseWorldItem } from "./base-world-item";
|
|
1310
|
+
import { CameraControllable } from "./interfaces";
|
|
1311
|
+
export declare abstract class BaseCamera extends BaseWorldItem {
|
|
1312
|
+
abstract enabled: boolean;
|
|
1313
|
+
abstract three: THREE.Camera;
|
|
1314
|
+
abstract controls?: CameraControls;
|
|
1315
|
+
/** Whether is instance is {@link CameraControllable}. */
|
|
1316
|
+
hasCameraControls: () => this is CameraControllable;
|
|
1317
|
+
}
|
|
1318
|
+
import { Base } from "./base";
|
|
1319
|
+
import { World } from "./world";
|
|
1320
|
+
import { Event } from "./event";
|
|
1321
|
+
import { Components } from "../../Components";
|
|
1322
|
+
/**
|
|
1323
|
+
* One of the elements that make a world. It can be either a scene, a camera
|
|
1324
|
+
* or a renderer.
|
|
1325
|
+
*/
|
|
1326
|
+
export declare abstract class BaseWorldItem extends Base {
|
|
1327
|
+
readonly worlds: Map<string, World>;
|
|
1328
|
+
readonly onWorldChanged: Event<{
|
|
1329
|
+
world: World;
|
|
1330
|
+
action: "added" | "removed";
|
|
1331
|
+
}>;
|
|
1332
|
+
currentWorld: World | null;
|
|
1333
|
+
protected constructor(components: Components);
|
|
1334
|
+
}
|
|
1335
|
+
import * as THREE from "three";
|
|
1259
1336
|
import { BaseScene } from "./base-scene";
|
|
1260
1337
|
import { BaseCamera } from "./base-camera";
|
|
1261
1338
|
import { BaseRenderer } from "./base-renderer";
|
|
@@ -1267,6 +1344,25 @@ export interface World extends Disposable, Updateable {
|
|
|
1267
1344
|
renderer: BaseRenderer | null;
|
|
1268
1345
|
uuid: string;
|
|
1269
1346
|
}
|
|
1347
|
+
import { Disposable, Hideable, Resizeable, Updateable, Configurable } from "./interfaces";
|
|
1348
|
+
import { Components } from "../../Components";
|
|
1349
|
+
/**
|
|
1350
|
+
* Base class of the library. Useful for finding out the interfaces it implements.
|
|
1351
|
+
*/
|
|
1352
|
+
export declare abstract class Base {
|
|
1353
|
+
components: Components;
|
|
1354
|
+
constructor(components: Components);
|
|
1355
|
+
/** Whether is component is {@link Disposable}. */
|
|
1356
|
+
isDisposeable: () => this is Disposable;
|
|
1357
|
+
/** Whether is component is {@link Resizeable}. */
|
|
1358
|
+
isResizeable: () => this is Resizeable;
|
|
1359
|
+
/** Whether is component is {@link Updateable}. */
|
|
1360
|
+
isUpdateable: () => this is Updateable;
|
|
1361
|
+
/** Whether is component is {@link Hideable}. */
|
|
1362
|
+
isHideable: () => this is Hideable;
|
|
1363
|
+
/** Whether is component is {@link Configurable}. */
|
|
1364
|
+
isConfigurable: () => this is Configurable<any>;
|
|
1365
|
+
}
|
|
1270
1366
|
import * as THREE from "three";
|
|
1271
1367
|
import { Disposable } from "./interfaces";
|
|
1272
1368
|
import { Event } from "./event";
|
|
@@ -1280,117 +1376,9 @@ export declare abstract class BaseScene extends BaseWorldItem implements Disposa
|
|
|
1280
1376
|
/** {@link Disposable.dispose} */
|
|
1281
1377
|
dispose(): void;
|
|
1282
1378
|
}
|
|
1283
|
-
import * as WEBIFC from "web-ifc";
|
|
1284
|
-
/** Configuration of the IFC-fragment conversion. */
|
|
1285
|
-
export declare class IfcFragmentSettings {
|
|
1286
|
-
/** Whether to extract the IFC properties into a JSON. */
|
|
1287
|
-
includeProperties: boolean;
|
|
1288
|
-
/**
|
|
1289
|
-
* Generate the geometry for categories that are not included by default,
|
|
1290
|
-
* like IFCSPACE.
|
|
1291
|
-
*/
|
|
1292
|
-
optionalCategories: number[];
|
|
1293
|
-
/** Whether to use the coordination data coming from the IFC files. */
|
|
1294
|
-
coordinate: boolean;
|
|
1295
|
-
/** Path of the WASM for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
|
|
1296
|
-
wasm: {
|
|
1297
|
-
path: string;
|
|
1298
|
-
absolute: boolean;
|
|
1299
|
-
logLevel?: WEBIFC.LogLevel;
|
|
1300
|
-
};
|
|
1301
|
-
/** List of categories that won't be converted to fragments. */
|
|
1302
|
-
excludedCategories: Set<number>;
|
|
1303
|
-
/** Whether to save the absolute location of all IFC items. */
|
|
1304
|
-
saveLocations: boolean;
|
|
1305
|
-
/** Loader settings for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
|
|
1306
|
-
webIfc: WEBIFC.LoaderSettings;
|
|
1307
|
-
autoSetWasm: boolean;
|
|
1308
|
-
customLocateFileHandler: WEBIFC.LocateFileHandlerFn | null;
|
|
1309
|
-
}
|
|
1310
|
-
import * as THREE from "three";
|
|
1311
|
-
import * as WEBIFC from "web-ifc";
|
|
1312
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
1313
|
-
export declare class CivilReader {
|
|
1314
|
-
defLineMat: THREE.LineBasicMaterial;
|
|
1315
|
-
read(webIfc: WEBIFC.IfcAPI): {
|
|
1316
|
-
alignments: Map<number, FRAGS.Alignment>;
|
|
1317
|
-
coordinationMatrix: THREE.Matrix4;
|
|
1318
|
-
} | undefined;
|
|
1319
|
-
get(civilItems: any): {
|
|
1320
|
-
alignments: Map<number, FRAGS.Alignment>;
|
|
1321
|
-
coordinationMatrix: THREE.Matrix4;
|
|
1322
|
-
} | undefined;
|
|
1323
|
-
private getCurves;
|
|
1324
|
-
}
|
|
1325
|
-
import * as WEBIFC from "web-ifc";
|
|
1326
|
-
export declare class IfcMetadataReader {
|
|
1327
|
-
get(webIfc: WEBIFC.IfcAPI, type: number): string;
|
|
1328
|
-
}
|
|
1329
|
-
import * as THREE from "three";
|
|
1330
|
-
import { Disposable, Event } from "../../Types";
|
|
1331
|
-
/**
|
|
1332
|
-
* A helper to easily get the real position of the mouse in the Three.js canvas
|
|
1333
|
-
* to work with tools like the
|
|
1334
|
-
* [raycaster](https://threejs.org/docs/#api/en/core/Raycaster), even if it has
|
|
1335
|
-
* been transformed through CSS or doesn't occupy the whole screen.
|
|
1336
|
-
*/
|
|
1337
|
-
export declare class Mouse implements Disposable {
|
|
1338
|
-
dom: HTMLCanvasElement;
|
|
1339
|
-
private _event?;
|
|
1340
|
-
private _position;
|
|
1341
|
-
/** {@link Disposable.onDisposed} */
|
|
1342
|
-
readonly onDisposed: Event<unknown>;
|
|
1343
|
-
constructor(dom: HTMLCanvasElement);
|
|
1344
|
-
/**
|
|
1345
|
-
* The real position of the mouse of the Three.js canvas.
|
|
1346
|
-
*/
|
|
1347
|
-
get position(): THREE.Vector2;
|
|
1348
|
-
/** {@link Disposable.dispose} */
|
|
1349
|
-
dispose(): void;
|
|
1350
|
-
private getPositionY;
|
|
1351
|
-
private getPositionX;
|
|
1352
|
-
private updateMouseInfo;
|
|
1353
|
-
private setupEvents;
|
|
1354
|
-
}
|
|
1355
1379
|
import * as THREE from "three";
|
|
1356
1380
|
import { Components } from "../../Components";
|
|
1357
|
-
import { Event, World
|
|
1358
|
-
import { Mouse } from "./mouse";
|
|
1359
|
-
/**
|
|
1360
|
-
* A simple [raycaster](https://threejs.org/docs/#api/en/core/Raycaster)
|
|
1361
|
-
* that allows to easily get items from the scene using the mouse and touch
|
|
1362
|
-
* events.
|
|
1363
|
-
*/
|
|
1364
|
-
export declare class SimpleRaycaster implements Disposable {
|
|
1365
|
-
/** {@link Component.enabled} */
|
|
1366
|
-
enabled: boolean;
|
|
1367
|
-
components: Components;
|
|
1368
|
-
/** {@link Disposable.onDisposed} */
|
|
1369
|
-
readonly onDisposed: Event<unknown>;
|
|
1370
|
-
/** The position of the mouse in the screen. */
|
|
1371
|
-
readonly mouse: Mouse;
|
|
1372
|
-
readonly three: THREE.Raycaster;
|
|
1373
|
-
world: World;
|
|
1374
|
-
constructor(components: Components, world: World);
|
|
1375
|
-
/** {@link Disposable.dispose} */
|
|
1376
|
-
dispose(): void;
|
|
1377
|
-
/**
|
|
1378
|
-
* Throws a ray from the camera to the mouse or touch event point and returns
|
|
1379
|
-
* the first item found. This also takes into account the clipping planes
|
|
1380
|
-
* used by the renderer.
|
|
1381
|
-
*
|
|
1382
|
-
* @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
|
|
1383
|
-
* to query. If not provided, it will query all the meshes stored in
|
|
1384
|
-
* {@link Components.meshes}.
|
|
1385
|
-
*/
|
|
1386
|
-
castRay(items?: THREE.Mesh[]): THREE.Intersection | null;
|
|
1387
|
-
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;
|
|
1388
|
-
private intersect;
|
|
1389
|
-
private filterClippingPlanes;
|
|
1390
|
-
}
|
|
1391
|
-
import * as THREE from "three";
|
|
1392
|
-
import { Components } from "../../Components";
|
|
1393
|
-
import { Event, World } from "../../Types";
|
|
1381
|
+
import { AsyncEvent, Event, World } from "../../Types";
|
|
1394
1382
|
export interface CullerRendererSettings {
|
|
1395
1383
|
updateInterval?: number;
|
|
1396
1384
|
width?: number;
|
|
@@ -1408,7 +1396,7 @@ export declare class CullerRenderer {
|
|
|
1408
1396
|
* meshes that are currently visible, and the ones that were visible
|
|
1409
1397
|
* just before but not anymore.
|
|
1410
1398
|
*/
|
|
1411
|
-
readonly onViewUpdated: Event<any>;
|
|
1399
|
+
readonly onViewUpdated: Event<any> | AsyncEvent<any>;
|
|
1412
1400
|
/** {@link Component.enabled} */
|
|
1413
1401
|
enabled: boolean;
|
|
1414
1402
|
/**
|
|
@@ -1424,166 +1412,36 @@ export declare class CullerRenderer {
|
|
|
1424
1412
|
components: Components;
|
|
1425
1413
|
readonly world: World;
|
|
1426
1414
|
readonly renderer: THREE.WebGLRenderer;
|
|
1427
|
-
protected autoUpdate: boolean;
|
|
1428
|
-
protected updateInterval: number;
|
|
1429
|
-
protected readonly worker: Worker;
|
|
1430
|
-
protected readonly scene: THREE.Scene;
|
|
1431
|
-
private _width;
|
|
1432
|
-
private _height;
|
|
1433
|
-
private _availableColor;
|
|
1434
|
-
private readonly renderTarget;
|
|
1435
|
-
private readonly bufferSize;
|
|
1436
|
-
private readonly _buffer;
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
dispose
|
|
1440
|
-
/**
|
|
1441
|
-
* The function that the culler uses to reprocess the scene. Generally it's
|
|
1442
|
-
* better to call needsUpdate, but you can also call this to force it.
|
|
1443
|
-
* @param force if true, it will refresh the scene even if needsUpdate is
|
|
1444
|
-
* not true.
|
|
1445
|
-
*/
|
|
1446
|
-
updateVisibility: (force?: boolean) => Promise<void>;
|
|
1447
|
-
protected getAvailableColor(): {
|
|
1448
|
-
r: number;
|
|
1449
|
-
g: number;
|
|
1450
|
-
b: number;
|
|
1451
|
-
code: string;
|
|
1452
|
-
};
|
|
1453
|
-
protected increaseColor(): void;
|
|
1454
|
-
protected decreaseColor(): void;
|
|
1455
|
-
private applySettings;
|
|
1456
|
-
}
|
|
1457
|
-
import * as THREE from "three";
|
|
1458
|
-
import { CullerRenderer, CullerRendererSettings } from "./culler-renderer";
|
|
1459
|
-
import { Components } from "../../Components";
|
|
1460
|
-
import { Event, World } from "../../Types";
|
|
1461
|
-
/**
|
|
1462
|
-
* A renderer to determine a mesh visibility on screen
|
|
1463
|
-
*/
|
|
1464
|
-
export declare class MeshCullerRenderer extends CullerRenderer {
|
|
1465
|
-
threshold: number;
|
|
1466
|
-
readonly onViewUpdated: Event<{
|
|
1467
|
-
seen: Set<THREE.Mesh>;
|
|
1468
|
-
unseen: Set<THREE.Mesh>;
|
|
1469
|
-
}>;
|
|
1470
|
-
colorMeshes: Map<string, THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[]>>;
|
|
1471
|
-
isProcessing: boolean;
|
|
1472
|
-
private _colorCodeMeshMap;
|
|
1473
|
-
private _meshIDColorCodeMap;
|
|
1474
|
-
private _currentVisibleMeshes;
|
|
1475
|
-
private _recentlyHiddenMeshes;
|
|
1476
|
-
private readonly _transparentMat;
|
|
1477
|
-
constructor(components: Components, world: World, settings?: CullerRendererSettings);
|
|
1478
|
-
dispose(): void;
|
|
1479
|
-
add(mesh: THREE.Mesh | THREE.InstancedMesh): void;
|
|
1480
|
-
remove(mesh: THREE.Mesh | THREE.InstancedMesh): void;
|
|
1481
|
-
private handleWorkerMessage;
|
|
1482
|
-
private getAvailableMaterial;
|
|
1483
|
-
}
|
|
1484
|
-
import * as WEBIFC from "web-ifc";
|
|
1485
|
-
import * as THREE from "three";
|
|
1486
|
-
export declare class Units {
|
|
1487
|
-
factor: number;
|
|
1488
|
-
complement: number;
|
|
1489
|
-
apply(matrix: THREE.Matrix4): void;
|
|
1490
|
-
setUp(webIfc: WEBIFC.IfcAPI): void;
|
|
1491
|
-
private getLengthUnits;
|
|
1492
|
-
private getScaleMatrix;
|
|
1493
|
-
}
|
|
1494
|
-
export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
|
|
1495
|
-
import { IfcFragmentSettings } from "../../FragmentIfcLoader/src";
|
|
1496
|
-
/** Configuration of the IFC-fragment streaming. */
|
|
1497
|
-
export declare class IfcStreamingSettings extends IfcFragmentSettings {
|
|
1498
|
-
minGeometrySize: number;
|
|
1499
|
-
minAssetsSize: number;
|
|
1500
|
-
}
|
|
1501
|
-
/** Configuration of the IFC-fragment streaming. */
|
|
1502
|
-
export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
|
|
1503
|
-
propertiesSize: number;
|
|
1504
|
-
}
|
|
1505
|
-
import * as WEBIFC from "web-ifc";
|
|
1506
|
-
import { Component, Disposable, Event } from "../../../core";
|
|
1507
|
-
import { PropertiesStreamingSettings } from "./streaming-settings";
|
|
1508
|
-
export declare class FragmentPropsStreamConverter extends Component implements Disposable {
|
|
1509
|
-
static readonly uuid: "88d2c89c-ce32-47d7-8cb6-d51e4b311a0b";
|
|
1510
|
-
onPropertiesStreamed: Event<{
|
|
1511
|
-
type: number;
|
|
1512
|
-
data: {
|
|
1513
|
-
[id: number]: any;
|
|
1514
|
-
};
|
|
1515
|
-
}>;
|
|
1516
|
-
onProgress: Event<number>;
|
|
1517
|
-
onIndicesStreamed: Event<number[][]>;
|
|
1518
|
-
/** {@link Disposable.onDisposed} */
|
|
1519
|
-
readonly onDisposed: Event<string>;
|
|
1520
|
-
enabled: boolean;
|
|
1521
|
-
settings: PropertiesStreamingSettings;
|
|
1522
|
-
webIfc: WEBIFC.IfcAPI;
|
|
1523
|
-
dispose(): Promise<void>;
|
|
1524
|
-
streamFromBuffer(data: Uint8Array): Promise<void>;
|
|
1525
|
-
streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
|
|
1526
|
-
private readIfcFile;
|
|
1527
|
-
private streamIfcFile;
|
|
1528
|
-
private streamAllProperties;
|
|
1529
|
-
private getIndices;
|
|
1530
|
-
private cleanUp;
|
|
1531
|
-
}
|
|
1532
|
-
import * as WEBIFC from "web-ifc";
|
|
1533
|
-
import { Components, Disposable, Event, Component } from "../../../core";
|
|
1534
|
-
import { IfcStreamingSettings } from "./streaming-settings";
|
|
1535
|
-
import { StreamedGeometries, StreamedAsset } from "./base-types";
|
|
1536
|
-
export declare class FragmentIfcStreamConverter extends Component implements Disposable {
|
|
1537
|
-
static readonly uuid: "d9999a00-e1f5-4d3f-8cfe-c56e08609764";
|
|
1538
|
-
onGeometryStreamed: Event<{
|
|
1539
|
-
buffer: Uint8Array;
|
|
1540
|
-
data: StreamedGeometries;
|
|
1541
|
-
}>;
|
|
1542
|
-
onAssetStreamed: Event<StreamedAsset[]>;
|
|
1543
|
-
onProgress: Event<number>;
|
|
1544
|
-
onIfcLoaded: Event<Uint8Array>;
|
|
1545
|
-
/** {@link Disposable.onDisposed} */
|
|
1546
|
-
readonly onDisposed: Event<unknown>;
|
|
1547
|
-
settings: IfcStreamingSettings;
|
|
1548
|
-
enabled: boolean;
|
|
1549
|
-
webIfc: WEBIFC.IfcAPI;
|
|
1550
|
-
private _spatialTree;
|
|
1551
|
-
private _metaData;
|
|
1552
|
-
private _visitedGeometries;
|
|
1553
|
-
private _streamSerializer;
|
|
1554
|
-
private _geometries;
|
|
1555
|
-
private _geometryCount;
|
|
1556
|
-
private _civil;
|
|
1557
|
-
private _groupSerializer;
|
|
1558
|
-
private _assets;
|
|
1559
|
-
private _meshesWithHoles;
|
|
1560
|
-
constructor(components: Components);
|
|
1415
|
+
protected autoUpdate: boolean;
|
|
1416
|
+
protected updateInterval: number;
|
|
1417
|
+
protected readonly worker: Worker;
|
|
1418
|
+
protected readonly scene: THREE.Scene;
|
|
1419
|
+
private _width;
|
|
1420
|
+
private _height;
|
|
1421
|
+
private _availableColor;
|
|
1422
|
+
private readonly renderTarget;
|
|
1423
|
+
private readonly bufferSize;
|
|
1424
|
+
private readonly _buffer;
|
|
1425
|
+
protected _isWorkerBusy: boolean;
|
|
1426
|
+
constructor(components: Components, world: World, settings?: CullerRendererSettings);
|
|
1427
|
+
/** {@link Disposable.dispose} */
|
|
1561
1428
|
dispose(): void;
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
[id: number]: {
|
|
1575
|
-
boundingBox: Float32Array;
|
|
1576
|
-
hasHoles: boolean;
|
|
1577
|
-
geometryFile?: string;
|
|
1429
|
+
/**
|
|
1430
|
+
* The function that the culler uses to reprocess the scene. Generally it's
|
|
1431
|
+
* better to call needsUpdate, but you can also call this to force it.
|
|
1432
|
+
* @param force if true, it will refresh the scene even if needsUpdate is
|
|
1433
|
+
* not true.
|
|
1434
|
+
*/
|
|
1435
|
+
updateVisibility: (force?: boolean) => Promise<void>;
|
|
1436
|
+
protected getAvailableColor(): {
|
|
1437
|
+
r: number;
|
|
1438
|
+
g: number;
|
|
1439
|
+
b: number;
|
|
1440
|
+
code: string;
|
|
1578
1441
|
};
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
geometries: {
|
|
1583
|
-
geometryID: number;
|
|
1584
|
-
transformation: number[];
|
|
1585
|
-
color: number[];
|
|
1586
|
-
}[];
|
|
1442
|
+
protected increaseColor(): void;
|
|
1443
|
+
protected decreaseColor(): void;
|
|
1444
|
+
private applySettings;
|
|
1587
1445
|
}
|
|
1588
1446
|
import * as THREE from "three";
|
|
1589
1447
|
import { Hideable, Disposable, Event, World } from "../../Types";
|
|
@@ -1646,6 +1504,51 @@ export declare class SimplePlane implements Disposable, Hideable {
|
|
|
1646
1504
|
private newHelper;
|
|
1647
1505
|
private static newPlaneMesh;
|
|
1648
1506
|
}
|
|
1507
|
+
export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
|
|
1508
|
+
import * as THREE from "three";
|
|
1509
|
+
import { CullerRenderer, CullerRendererSettings } from "./culler-renderer";
|
|
1510
|
+
import { Components } from "../../Components";
|
|
1511
|
+
import { Event, World } from "../../Types";
|
|
1512
|
+
/**
|
|
1513
|
+
* A renderer to determine a mesh visibility on screen
|
|
1514
|
+
*/
|
|
1515
|
+
export declare class MeshCullerRenderer extends CullerRenderer {
|
|
1516
|
+
threshold: number;
|
|
1517
|
+
readonly onViewUpdated: Event<{
|
|
1518
|
+
seen: Set<THREE.Mesh>;
|
|
1519
|
+
unseen: Set<THREE.Mesh>;
|
|
1520
|
+
}>;
|
|
1521
|
+
colorMeshes: Map<string, THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[]>>;
|
|
1522
|
+
isProcessing: boolean;
|
|
1523
|
+
private _colorCodeMeshMap;
|
|
1524
|
+
private _meshIDColorCodeMap;
|
|
1525
|
+
private _currentVisibleMeshes;
|
|
1526
|
+
private _recentlyHiddenMeshes;
|
|
1527
|
+
private _intervalID;
|
|
1528
|
+
private readonly _transparentMat;
|
|
1529
|
+
constructor(components: Components, world: World, settings?: CullerRendererSettings);
|
|
1530
|
+
dispose(): void;
|
|
1531
|
+
add(mesh: THREE.Mesh | THREE.InstancedMesh): void;
|
|
1532
|
+
remove(mesh: THREE.Mesh | THREE.InstancedMesh): void;
|
|
1533
|
+
private handleWorkerMessage;
|
|
1534
|
+
private getAvailableMaterial;
|
|
1535
|
+
}
|
|
1536
|
+
import { NavigationMode } from "./types";
|
|
1537
|
+
/**
|
|
1538
|
+
* A {@link NavigationMode} that allows first person navigation,
|
|
1539
|
+
* simulating FPS video games.
|
|
1540
|
+
*/
|
|
1541
|
+
export declare class FirstPersonMode implements NavigationMode {
|
|
1542
|
+
private camera;
|
|
1543
|
+
/** {@link NavigationMode.enabled} */
|
|
1544
|
+
enabled: boolean;
|
|
1545
|
+
/** {@link NavigationMode.id} */
|
|
1546
|
+
readonly id = "FirstPerson";
|
|
1547
|
+
constructor(camera: any);
|
|
1548
|
+
/** {@link NavigationMode.set} */
|
|
1549
|
+
set(active: boolean): void;
|
|
1550
|
+
private setupFirstPersonCamera;
|
|
1551
|
+
}
|
|
1649
1552
|
import { NavigationMode } from "./types";
|
|
1650
1553
|
/**
|
|
1651
1554
|
* A {@link NavigationMode} that allows 3D navigation and panning
|
|
@@ -1699,6 +1602,16 @@ export declare class ProjectionManager {
|
|
|
1699
1602
|
private getDistance;
|
|
1700
1603
|
private setPerspectiveCamera;
|
|
1701
1604
|
}
|
|
1605
|
+
import { IfcFragmentSettings } from "../../FragmentIfcLoader/src";
|
|
1606
|
+
/** Configuration of the IFC-fragment streaming. */
|
|
1607
|
+
export declare class IfcStreamingSettings extends IfcFragmentSettings {
|
|
1608
|
+
minGeometrySize: number;
|
|
1609
|
+
minAssetsSize: number;
|
|
1610
|
+
}
|
|
1611
|
+
/** Configuration of the IFC-fragment streaming. */
|
|
1612
|
+
export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
|
|
1613
|
+
propertiesSize: number;
|
|
1614
|
+
}
|
|
1702
1615
|
import { NavigationMode } from "./types";
|
|
1703
1616
|
/**
|
|
1704
1617
|
* A {@link NavigationMode} that allows to navigate floorplans in 2D,
|
|
@@ -1746,21 +1659,144 @@ export interface NavigationMode {
|
|
|
1746
1659
|
/** Whether this navigation mode is active or not. */
|
|
1747
1660
|
enabled: boolean;
|
|
1748
1661
|
}
|
|
1749
|
-
import
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1662
|
+
import * as WEBIFC from "web-ifc";
|
|
1663
|
+
import { Component, Disposable, Event } from "../../../core";
|
|
1664
|
+
import { PropertiesStreamingSettings } from "./streaming-settings";
|
|
1665
|
+
export declare class FragmentPropsStreamConverter extends Component implements Disposable {
|
|
1666
|
+
static readonly uuid: "88d2c89c-ce32-47d7-8cb6-d51e4b311a0b";
|
|
1667
|
+
onPropertiesStreamed: Event<{
|
|
1668
|
+
type: number;
|
|
1669
|
+
data: {
|
|
1670
|
+
[id: number]: any;
|
|
1671
|
+
};
|
|
1672
|
+
}>;
|
|
1673
|
+
onProgress: Event<number>;
|
|
1674
|
+
onIndicesStreamed: Event<number[][]>;
|
|
1675
|
+
/** {@link Disposable.onDisposed} */
|
|
1676
|
+
readonly onDisposed: Event<string>;
|
|
1757
1677
|
enabled: boolean;
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
private
|
|
1678
|
+
settings: PropertiesStreamingSettings;
|
|
1679
|
+
webIfc: WEBIFC.IfcAPI;
|
|
1680
|
+
dispose(): Promise<void>;
|
|
1681
|
+
streamFromBuffer(data: Uint8Array): Promise<void>;
|
|
1682
|
+
streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
|
|
1683
|
+
private readIfcFile;
|
|
1684
|
+
private streamIfcFile;
|
|
1685
|
+
private streamAllProperties;
|
|
1686
|
+
private getIndices;
|
|
1687
|
+
private cleanUp;
|
|
1688
|
+
}
|
|
1689
|
+
import * as WEBIFC from "web-ifc";
|
|
1690
|
+
import { Components, Disposable, Event, Component } from "../../../core";
|
|
1691
|
+
import { IfcStreamingSettings } from "./streaming-settings";
|
|
1692
|
+
import { StreamedGeometries, StreamedAsset } from "./base-types";
|
|
1693
|
+
export declare class FragmentIfcStreamConverter extends Component implements Disposable {
|
|
1694
|
+
static readonly uuid: "d9999a00-e1f5-4d3f-8cfe-c56e08609764";
|
|
1695
|
+
onGeometryStreamed: Event<{
|
|
1696
|
+
buffer: Uint8Array;
|
|
1697
|
+
data: StreamedGeometries;
|
|
1698
|
+
}>;
|
|
1699
|
+
onAssetStreamed: Event<StreamedAsset[]>;
|
|
1700
|
+
onProgress: Event<number>;
|
|
1701
|
+
onIfcLoaded: Event<Uint8Array>;
|
|
1702
|
+
/** {@link Disposable.onDisposed} */
|
|
1703
|
+
readonly onDisposed: Event<unknown>;
|
|
1704
|
+
settings: IfcStreamingSettings;
|
|
1705
|
+
enabled: boolean;
|
|
1706
|
+
webIfc: WEBIFC.IfcAPI;
|
|
1707
|
+
private _spatialTree;
|
|
1708
|
+
private _metaData;
|
|
1709
|
+
private _visitedGeometries;
|
|
1710
|
+
private _streamSerializer;
|
|
1711
|
+
private _geometries;
|
|
1712
|
+
private _geometryCount;
|
|
1713
|
+
private _civil;
|
|
1714
|
+
private _groupSerializer;
|
|
1715
|
+
private _assets;
|
|
1716
|
+
private _meshesWithHoles;
|
|
1717
|
+
constructor(components: Components);
|
|
1718
|
+
dispose(): void;
|
|
1719
|
+
streamFromBuffer(data: Uint8Array): Promise<void>;
|
|
1720
|
+
streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
|
|
1721
|
+
private readIfcFile;
|
|
1722
|
+
private streamIfcFile;
|
|
1723
|
+
private streamAllGeometries;
|
|
1724
|
+
private cleanUp;
|
|
1725
|
+
private getMesh;
|
|
1726
|
+
private getGeometry;
|
|
1727
|
+
private streamAssets;
|
|
1728
|
+
private streamGeometries;
|
|
1729
|
+
}
|
|
1730
|
+
export interface StreamedGeometries {
|
|
1731
|
+
[id: number]: {
|
|
1732
|
+
boundingBox: Float32Array;
|
|
1733
|
+
hasHoles: boolean;
|
|
1734
|
+
geometryFile?: string;
|
|
1735
|
+
};
|
|
1736
|
+
}
|
|
1737
|
+
export interface StreamedAsset {
|
|
1738
|
+
id: number;
|
|
1739
|
+
geometries: {
|
|
1740
|
+
geometryID: number;
|
|
1741
|
+
transformation: number[];
|
|
1742
|
+
color: number[];
|
|
1743
|
+
}[];
|
|
1744
|
+
}
|
|
1745
|
+
import * as THREE from "three";
|
|
1746
|
+
import * as WEBIFC from "web-ifc";
|
|
1747
|
+
import * as FRAGS from "@thatopen/fragments";
|
|
1748
|
+
export declare class CivilReader {
|
|
1749
|
+
defLineMat: THREE.LineBasicMaterial;
|
|
1750
|
+
read(webIfc: WEBIFC.IfcAPI): {
|
|
1751
|
+
alignments: Map<number, FRAGS.Alignment>;
|
|
1752
|
+
coordinationMatrix: THREE.Matrix4;
|
|
1753
|
+
} | undefined;
|
|
1754
|
+
get(civilItems: any): {
|
|
1755
|
+
alignments: Map<number, FRAGS.Alignment>;
|
|
1756
|
+
coordinationMatrix: THREE.Matrix4;
|
|
1757
|
+
} | undefined;
|
|
1758
|
+
private getCurves;
|
|
1759
|
+
}
|
|
1760
|
+
import * as WEBIFC from "web-ifc";
|
|
1761
|
+
/** Configuration of the IFC-fragment conversion. */
|
|
1762
|
+
export declare class IfcFragmentSettings {
|
|
1763
|
+
/** Whether to extract the IFC properties into a JSON. */
|
|
1764
|
+
includeProperties: boolean;
|
|
1765
|
+
/**
|
|
1766
|
+
* Generate the geometry for categories that are not included by default,
|
|
1767
|
+
* like IFCSPACE.
|
|
1768
|
+
*/
|
|
1769
|
+
optionalCategories: number[];
|
|
1770
|
+
/** Whether to use the coordination data coming from the IFC files. */
|
|
1771
|
+
coordinate: boolean;
|
|
1772
|
+
/** Path of the WASM for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
|
|
1773
|
+
wasm: {
|
|
1774
|
+
path: string;
|
|
1775
|
+
absolute: boolean;
|
|
1776
|
+
logLevel?: WEBIFC.LogLevel;
|
|
1777
|
+
};
|
|
1778
|
+
/** List of categories that won't be converted to fragments. */
|
|
1779
|
+
excludedCategories: Set<number>;
|
|
1780
|
+
/** Whether to save the absolute location of all IFC items. */
|
|
1781
|
+
saveLocations: boolean;
|
|
1782
|
+
/** Loader settings for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
|
|
1783
|
+
webIfc: WEBIFC.LoaderSettings;
|
|
1784
|
+
autoSetWasm: boolean;
|
|
1785
|
+
customLocateFileHandler: WEBIFC.LocateFileHandlerFn | null;
|
|
1786
|
+
}
|
|
1787
|
+
import * as WEBIFC from "web-ifc";
|
|
1788
|
+
export declare class IfcMetadataReader {
|
|
1789
|
+
get(webIfc: WEBIFC.IfcAPI, type: number): string;
|
|
1790
|
+
}
|
|
1791
|
+
import * as WEBIFC from "web-ifc";
|
|
1792
|
+
import * as THREE from "three";
|
|
1793
|
+
export declare class Units {
|
|
1794
|
+
factor: number;
|
|
1795
|
+
complement: number;
|
|
1796
|
+
apply(matrix: THREE.Matrix4): void;
|
|
1797
|
+
setUp(webIfc: WEBIFC.IfcAPI): void;
|
|
1798
|
+
private getLengthUnits;
|
|
1799
|
+
private getScaleMatrix;
|
|
1764
1800
|
}
|
|
1765
1801
|
import { BufferGeometry } from "three";
|
|
1766
1802
|
import * as THREE from "three";
|