@thatopen/components 2.0.0-alpha.2 → 2.0.0-alpha.3
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/Clipper/index.d.ts +1 -1
- package/dist/core/Types/src/interfaces.d.ts +3 -14
- package/dist/fragments/FragmentHider/index.d.ts +10 -0
- package/dist/fragments/index.d.ts +2 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +2478 -1965
- package/dist/measurement/Utils/index.d.ts +20 -0
- package/dist/measurement/index.d.ts +1 -0
- package/dist/namespace.d.ts +898 -634
- package/dist/navigation/MiniMap/index.d.ts +15 -0
- package/dist/navigation/MiniMap/src/index.d.ts +34 -0
- package/dist/navigation/OrthoPerspectiveCamera/index.d.ts +50 -0
- package/dist/navigation/OrthoPerspectiveCamera/src/first-person-mode.d.ts +16 -0
- package/dist/navigation/OrthoPerspectiveCamera/src/index.d.ts +5 -0
- package/dist/navigation/OrthoPerspectiveCamera/src/orbit-mode.d.ts +16 -0
- package/dist/navigation/OrthoPerspectiveCamera/src/plan-mode.d.ts +20 -0
- package/dist/navigation/OrthoPerspectiveCamera/src/projections.d.ts +37 -0
- package/dist/navigation/OrthoPerspectiveCamera/src/types.d.ts +27 -0
- package/dist/navigation/index.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/vertex-picker.d.ts +31 -0
- package/package.json +2 -2
package/dist/namespace.d.ts
CHANGED
|
@@ -51,6 +51,19 @@ export declare class Components implements Disposable {
|
|
|
51
51
|
private update;
|
|
52
52
|
private static setupBVH;
|
|
53
53
|
}
|
|
54
|
+
import { Component, Disposable, World, Event } from "../Types";
|
|
55
|
+
import { SimpleRaycaster } from "./src";
|
|
56
|
+
import { Components } from "../Components";
|
|
57
|
+
export declare class Raycasters extends Component implements Disposable {
|
|
58
|
+
static readonly uuid: "d5d8bdf0-db25-4952-b951-b643af207ace";
|
|
59
|
+
enabled: boolean;
|
|
60
|
+
list: Map<string, SimpleRaycaster>;
|
|
61
|
+
onDisposed: Event<unknown>;
|
|
62
|
+
constructor(components: Components);
|
|
63
|
+
get(world: World): SimpleRaycaster;
|
|
64
|
+
delete(world: World): void;
|
|
65
|
+
dispose(): void;
|
|
66
|
+
}
|
|
54
67
|
import * as THREE from "three";
|
|
55
68
|
import { Components } from "../Components";
|
|
56
69
|
import { Component } from "../Types";
|
|
@@ -95,35 +108,6 @@ export declare class Disposer extends Component {
|
|
|
95
108
|
private static disposeMaterial;
|
|
96
109
|
}
|
|
97
110
|
import { Component, Disposable, World, Event } from "../Types";
|
|
98
|
-
import { SimpleRaycaster } from "./src";
|
|
99
|
-
import { Components } from "../Components";
|
|
100
|
-
export declare class Raycasters extends Component implements Disposable {
|
|
101
|
-
static readonly uuid: "d5d8bdf0-db25-4952-b951-b643af207ace";
|
|
102
|
-
enabled: boolean;
|
|
103
|
-
list: Map<string, SimpleRaycaster>;
|
|
104
|
-
onDisposed: Event<unknown>;
|
|
105
|
-
constructor(components: Components);
|
|
106
|
-
get(world: World): SimpleRaycaster;
|
|
107
|
-
delete(world: World): void;
|
|
108
|
-
dispose(): void;
|
|
109
|
-
}
|
|
110
|
-
import { Component, Disposable, Updateable, World, Event, BaseScene, BaseCamera, BaseRenderer } from "../Types";
|
|
111
|
-
import { Components } from "../Components";
|
|
112
|
-
import { SimpleWorld } from "./src";
|
|
113
|
-
export declare class Worlds extends Component implements Updateable, Disposable {
|
|
114
|
-
static readonly uuid: "fdb61dc4-2ec1-4966-b83d-54ea795fad4a";
|
|
115
|
-
readonly onAfterUpdate: Event<unknown>;
|
|
116
|
-
readonly onBeforeUpdate: Event<unknown>;
|
|
117
|
-
readonly onDisposed: Event<unknown>;
|
|
118
|
-
list: Map<string, World>;
|
|
119
|
-
enabled: boolean;
|
|
120
|
-
constructor(components: Components);
|
|
121
|
-
create<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer>(): SimpleWorld<T, U, S>;
|
|
122
|
-
delete(world: World): void;
|
|
123
|
-
dispose(): void;
|
|
124
|
-
update(delta?: number): void | Promise<void>;
|
|
125
|
-
}
|
|
126
|
-
import { Component, Disposable, World, Event } from "../Types";
|
|
127
111
|
import { GridConfig, SimpleGrid } from "./src";
|
|
128
112
|
export declare class Grids extends Component implements Disposable {
|
|
129
113
|
static readonly uuid: "d1e814d5-b81c-4452-87a2-f039375e0489";
|
|
@@ -177,7 +161,7 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
|
|
|
177
161
|
* has to be 'true' for this to apply.
|
|
178
162
|
*/
|
|
179
163
|
toleranceOrthogonalY: number;
|
|
180
|
-
|
|
164
|
+
list: T[];
|
|
181
165
|
protected PlaneType: new (...args: any) => SimplePlane | T;
|
|
182
166
|
/** The material used in all the clipping planes. */
|
|
183
167
|
protected _material: THREE.Material;
|
|
@@ -239,6 +223,44 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
|
|
|
239
223
|
private _onStartDragging;
|
|
240
224
|
private _onEndDragging;
|
|
241
225
|
}
|
|
226
|
+
import { Component, Disposable, Updateable, World, Event, BaseScene, BaseCamera, BaseRenderer } from "../Types";
|
|
227
|
+
import { Components } from "../Components";
|
|
228
|
+
import { SimpleWorld } from "./src";
|
|
229
|
+
export declare class Worlds extends Component implements Updateable, Disposable {
|
|
230
|
+
static readonly uuid: "fdb61dc4-2ec1-4966-b83d-54ea795fad4a";
|
|
231
|
+
readonly onAfterUpdate: Event<unknown>;
|
|
232
|
+
readonly onBeforeUpdate: Event<unknown>;
|
|
233
|
+
readonly onDisposed: Event<unknown>;
|
|
234
|
+
list: Map<string, World>;
|
|
235
|
+
enabled: boolean;
|
|
236
|
+
constructor(components: Components);
|
|
237
|
+
create<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer>(): SimpleWorld<T, U, S>;
|
|
238
|
+
delete(world: World): void;
|
|
239
|
+
dispose(): void;
|
|
240
|
+
update(delta?: number): void | Promise<void>;
|
|
241
|
+
}
|
|
242
|
+
import { Components } from "../Components";
|
|
243
|
+
import { MeshCullerRenderer, CullerRendererSettings } from "./src";
|
|
244
|
+
import { Component, Event, Disposable, World } from "../Types";
|
|
245
|
+
/**
|
|
246
|
+
* A tool to handle big scenes efficiently by automatically hiding the objects
|
|
247
|
+
* that are not visible to the camera.
|
|
248
|
+
*/
|
|
249
|
+
export declare class Cullers extends Component implements Disposable {
|
|
250
|
+
static readonly uuid: "69f2a50d-c266-44fc-b1bd-fa4d34be89e6";
|
|
251
|
+
private _enabled;
|
|
252
|
+
list: Map<string, MeshCullerRenderer>;
|
|
253
|
+
/** {@link Disposable.onDisposed} */
|
|
254
|
+
readonly onDisposed: Event<unknown>;
|
|
255
|
+
/** {@link Component.enabled} */
|
|
256
|
+
get enabled(): boolean;
|
|
257
|
+
set enabled(value: boolean);
|
|
258
|
+
constructor(components: Components);
|
|
259
|
+
create(world: World, config?: Partial<CullerRendererSettings>): MeshCullerRenderer;
|
|
260
|
+
delete(world: World): void;
|
|
261
|
+
/** {@link Disposable.dispose} */
|
|
262
|
+
dispose(): void;
|
|
263
|
+
}
|
|
242
264
|
import * as THREE from "three";
|
|
243
265
|
import { Component, Disposable, Event, World } from "../Types";
|
|
244
266
|
import { Components } from "../Components";
|
|
@@ -300,28 +322,39 @@ export declare class Materials extends Component implements Disposable {
|
|
|
300
322
|
*/
|
|
301
323
|
removeMeshes(id: string, meshes: THREE.Mesh[]): void;
|
|
302
324
|
}
|
|
303
|
-
import
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
/** {@link Disposable.dispose} */
|
|
323
|
-
dispose(): void;
|
|
325
|
+
import * as THREE from "three";
|
|
326
|
+
export interface MeasureEdge {
|
|
327
|
+
distance: number;
|
|
328
|
+
points: THREE.Vector3[];
|
|
329
|
+
}
|
|
330
|
+
export declare class MeasurementUtils {
|
|
331
|
+
static getFace(mesh: THREE.InstancedMesh | THREE.Mesh, triangleIndex: number, instance?: number): {
|
|
332
|
+
edges: MeasureEdge[];
|
|
333
|
+
indices: Set<number>;
|
|
334
|
+
} | null;
|
|
335
|
+
static distanceFromPointToLine(point: THREE.Vector3, lineStart: THREE.Vector3, lineEnd: THREE.Vector3, clamp?: boolean): number;
|
|
336
|
+
private static getFaceData;
|
|
337
|
+
static getVerticesAndNormal(mesh: THREE.Mesh | THREE.InstancedMesh, faceIndex: number, instance: number | undefined): {
|
|
338
|
+
p1: THREE.Vector3;
|
|
339
|
+
p2: THREE.Vector3;
|
|
340
|
+
p3: THREE.Vector3;
|
|
341
|
+
faceNormal: THREE.Vector3;
|
|
342
|
+
};
|
|
343
|
+
private static round;
|
|
324
344
|
}
|
|
345
|
+
export declare class UUID {
|
|
346
|
+
private static _pattern;
|
|
347
|
+
private static _lut;
|
|
348
|
+
static create(): string;
|
|
349
|
+
static validate(uuid: string): void;
|
|
350
|
+
}
|
|
351
|
+
import * as THREE from "three";
|
|
352
|
+
export declare function obbFromPoints(vertices: ArrayLike<number>): {
|
|
353
|
+
center: THREE.Vector3;
|
|
354
|
+
halfSizes: THREE.Vector3;
|
|
355
|
+
rotation: THREE.Matrix3;
|
|
356
|
+
transformation: THREE.Matrix4;
|
|
357
|
+
};
|
|
325
358
|
import * as WEBIFC from "web-ifc";
|
|
326
359
|
import * as FRAG from "bim-fragment";
|
|
327
360
|
/**
|
|
@@ -338,140 +371,6 @@ export declare class IfcJsonExporter {
|
|
|
338
371
|
*/
|
|
339
372
|
export(webIfc: WEBIFC.IfcAPI, modelID: number, indirect?: boolean, recursiveSpatial?: boolean): Promise<FRAG.IfcProperties>;
|
|
340
373
|
}
|
|
341
|
-
import { FragmentsGroup } from "bim-fragment";
|
|
342
|
-
import { Disposable, Event, Component, Components } from "../../core";
|
|
343
|
-
import { IfcPropertiesManager } from "../IfcPropertiesManager";
|
|
344
|
-
interface IndexMap {
|
|
345
|
-
[modelID: string]: {
|
|
346
|
-
[expressID: string]: Set<number>;
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
export declare class IfcPropertiesIndexer extends Component implements Disposable {
|
|
350
|
-
static readonly uuid: "23a889ab-83b3-44a4-8bee-ead83438370b";
|
|
351
|
-
/** {@link Disposable.onDisposed} */
|
|
352
|
-
readonly onDisposed: Event<string>;
|
|
353
|
-
enabled: boolean;
|
|
354
|
-
relationsToProcess: number[];
|
|
355
|
-
indexMap: IndexMap;
|
|
356
|
-
private _propertiesManager;
|
|
357
|
-
readonly onPropertiesManagerSet: Event<IfcPropertiesManager>;
|
|
358
|
-
set propertiesManager(manager: IfcPropertiesManager | null);
|
|
359
|
-
get propertiesManager(): IfcPropertiesManager | null;
|
|
360
|
-
constructor(components: Components);
|
|
361
|
-
private onFragmentsDisposed;
|
|
362
|
-
dispose(): Promise<void>;
|
|
363
|
-
getProperties(model: FragmentsGroup, id: string): Promise<any[] | null>;
|
|
364
|
-
private getNestedPsets;
|
|
365
|
-
private getPsetProperties;
|
|
366
|
-
process(model: FragmentsGroup): Promise<void>;
|
|
367
|
-
private setEntityIndex;
|
|
368
|
-
private cloneProperty;
|
|
369
|
-
private clonePropertyArray;
|
|
370
|
-
}
|
|
371
|
-
export {};
|
|
372
|
-
import * as FRAGS from "bim-fragment";
|
|
373
|
-
import { FragmentsGroup } from "bim-fragment";
|
|
374
|
-
import { Disposable, Event, Component, Components } from "../../core";
|
|
375
|
-
import { QueryGroup } from "./src/types";
|
|
376
|
-
export interface QueryResult {
|
|
377
|
-
[modelID: string]: {
|
|
378
|
-
modelEntities: Set<number>;
|
|
379
|
-
otherEntities: Set<number>;
|
|
380
|
-
};
|
|
381
|
-
}
|
|
382
|
-
export interface IndexedModels {
|
|
383
|
-
[modelID: string]: {
|
|
384
|
-
[expressID: number]: Set<number>;
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
export declare class IfcPropertiesFinder extends Component implements Disposable {
|
|
388
|
-
readonly onFound: Event<FRAGS.FragmentIdMap>;
|
|
389
|
-
/** {@link Disposable.onDisposed} */
|
|
390
|
-
readonly onDisposed: Event<unknown>;
|
|
391
|
-
enabled: boolean;
|
|
392
|
-
indexedModels: IndexedModels;
|
|
393
|
-
private readonly _conditionFunctions;
|
|
394
|
-
private _noHandleAttributes;
|
|
395
|
-
constructor(components: Components);
|
|
396
|
-
private onFragmentsDisposed;
|
|
397
|
-
dispose(): void;
|
|
398
|
-
private indexEntityRelations;
|
|
399
|
-
find(groups: QueryGroup[], queryModels?: FragmentsGroup[]): Promise<FRAGS.FragmentIdMap>;
|
|
400
|
-
private toFragmentMap;
|
|
401
|
-
private simpleQuery;
|
|
402
|
-
private getMatchingEntities;
|
|
403
|
-
private combineArrays;
|
|
404
|
-
private getCommonElements;
|
|
405
|
-
private arrayIntersection;
|
|
406
|
-
private arrayUnion;
|
|
407
|
-
private getConditionFunctions;
|
|
408
|
-
}
|
|
409
|
-
import * as THREE from "three";
|
|
410
|
-
import * as FRAGS from "bim-fragment";
|
|
411
|
-
import { FragmentsGroup } from "bim-fragment";
|
|
412
|
-
import { Component, Components, Disposable, Event } from "../../core";
|
|
413
|
-
/**
|
|
414
|
-
* A simple implementation of bounding box that works for fragments. The resulting bbox is not 100% precise, but
|
|
415
|
-
* it's fast, and should suffice for general use cases such as camera zooming or general boundary determination.
|
|
416
|
-
*/
|
|
417
|
-
export declare class FragmentBoundingBox extends Component implements Disposable {
|
|
418
|
-
static readonly uuid: "d1444724-dba6-4cdd-a0c7-68ee1450d166";
|
|
419
|
-
/** {@link Component.enabled} */
|
|
420
|
-
enabled: boolean;
|
|
421
|
-
/** {@link Disposable.onDisposed} */
|
|
422
|
-
readonly onDisposed: Event<unknown>;
|
|
423
|
-
private _absoluteMin;
|
|
424
|
-
private _absoluteMax;
|
|
425
|
-
private _meshes;
|
|
426
|
-
constructor(components: Components);
|
|
427
|
-
static getDimensions(bbox: THREE.Box3): {
|
|
428
|
-
width: number;
|
|
429
|
-
height: number;
|
|
430
|
-
depth: number;
|
|
431
|
-
center: THREE.Vector3;
|
|
432
|
-
};
|
|
433
|
-
static newBound(positive: boolean): THREE.Vector3;
|
|
434
|
-
static getBounds(points: THREE.Vector3[], min?: THREE.Vector3, max?: THREE.Vector3): THREE.Box3;
|
|
435
|
-
/** {@link Disposable.dispose} */
|
|
436
|
-
dispose(): void;
|
|
437
|
-
get(): THREE.Box3;
|
|
438
|
-
getSphere(): THREE.Sphere;
|
|
439
|
-
getMesh(): THREE.Mesh<THREE.BoxGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
|
|
440
|
-
reset(): void;
|
|
441
|
-
add(group: FragmentsGroup): void;
|
|
442
|
-
addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh): void;
|
|
443
|
-
private static getFragmentBounds;
|
|
444
|
-
}
|
|
445
|
-
import * as FRAGS from "bim-fragment";
|
|
446
|
-
import { Disposable, Component, Event, Components } from "../../core";
|
|
447
|
-
export interface Classification {
|
|
448
|
-
[system: string]: {
|
|
449
|
-
[className: string]: FRAGS.FragmentIdMap;
|
|
450
|
-
};
|
|
451
|
-
}
|
|
452
|
-
export declare class FragmentClassifier extends Component implements Disposable {
|
|
453
|
-
static readonly uuid: "e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7";
|
|
454
|
-
/** {@link Component.enabled} */
|
|
455
|
-
enabled: boolean;
|
|
456
|
-
private _groupSystems;
|
|
457
|
-
/** {@link Disposable.onDisposed} */
|
|
458
|
-
readonly onDisposed: Event<unknown>;
|
|
459
|
-
constructor(components: Components);
|
|
460
|
-
private onFragmentsDisposed;
|
|
461
|
-
/** {@link Component.get} */
|
|
462
|
-
get(): Classification;
|
|
463
|
-
dispose(): void;
|
|
464
|
-
remove(guid: string): void;
|
|
465
|
-
find(filter?: {
|
|
466
|
-
[name: string]: string[];
|
|
467
|
-
}): FRAGS.FragmentIdMap;
|
|
468
|
-
byModel(modelID: string, group: FRAGS.FragmentsGroup): void;
|
|
469
|
-
byPredefinedType(group: FRAGS.FragmentsGroup): Promise<void>;
|
|
470
|
-
byEntity(group: FRAGS.FragmentsGroup): void;
|
|
471
|
-
byStorey(group: FRAGS.FragmentsGroup): void;
|
|
472
|
-
byIfcRel(group: FRAGS.FragmentsGroup, ifcRel: number, systemName: string): Promise<void>;
|
|
473
|
-
private saveItem;
|
|
474
|
-
}
|
|
475
374
|
import * as WEBIFC from "web-ifc";
|
|
476
375
|
import { FragmentsGroup } from "bim-fragment";
|
|
477
376
|
import { Component, Disposable, Event, Components } from "../../core";
|
|
@@ -545,49 +444,213 @@ export declare class IfcPropertiesManager extends Component implements Disposabl
|
|
|
545
444
|
setAttributeListener(model: FragmentsGroup, expressID: number, attributeName: string): Promise<Event<String | Number | Boolean>>;
|
|
546
445
|
}
|
|
547
446
|
export {};
|
|
548
|
-
import
|
|
549
|
-
import
|
|
550
|
-
import {
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
447
|
+
import * as FRAGS from "bim-fragment";
|
|
448
|
+
import { FragmentsGroup } from "bim-fragment";
|
|
449
|
+
import { Disposable, Event, Component, Components } from "../../core";
|
|
450
|
+
import { QueryGroup } from "./src/types";
|
|
451
|
+
export interface QueryResult {
|
|
452
|
+
[modelID: string]: {
|
|
453
|
+
modelEntities: Set<number>;
|
|
454
|
+
otherEntities: Set<number>;
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
export interface IndexedModels {
|
|
458
|
+
[modelID: string]: {
|
|
459
|
+
[expressID: number]: Set<number>;
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
export declare class IfcPropertiesFinder extends Component implements Disposable {
|
|
463
|
+
readonly onFound: Event<FRAGS.FragmentIdMap>;
|
|
557
464
|
/** {@link Disposable.onDisposed} */
|
|
558
465
|
readonly onDisposed: Event<unknown>;
|
|
559
|
-
readonly onFragmentsLoaded: Event<FragmentsGroup>;
|
|
560
|
-
readonly onFragmentsDisposed: Event<{
|
|
561
|
-
groupID: string;
|
|
562
|
-
fragmentIDs: string[];
|
|
563
|
-
}>;
|
|
564
|
-
/** All the created [fragments](https://github.com/ThatOpen/engine_fragment). */
|
|
565
|
-
readonly list: Map<string, Fragment>;
|
|
566
|
-
readonly groups: Map<string, FragmentsGroup>;
|
|
567
|
-
/** {@link Component.enabled} */
|
|
568
466
|
enabled: boolean;
|
|
569
|
-
|
|
570
|
-
private
|
|
571
|
-
|
|
572
|
-
|
|
467
|
+
indexedModels: IndexedModels;
|
|
468
|
+
private readonly _conditionFunctions;
|
|
469
|
+
private _noHandleAttributes;
|
|
470
|
+
constructor(components: Components);
|
|
471
|
+
private onFragmentsDisposed;
|
|
472
|
+
dispose(): void;
|
|
473
|
+
private indexEntityRelations;
|
|
474
|
+
find(groups: QueryGroup[], queryModels?: FragmentsGroup[]): Promise<FRAGS.FragmentIdMap>;
|
|
475
|
+
private toFragmentMap;
|
|
476
|
+
private simpleQuery;
|
|
477
|
+
private getMatchingEntities;
|
|
478
|
+
private combineArrays;
|
|
479
|
+
private getCommonElements;
|
|
480
|
+
private arrayIntersection;
|
|
481
|
+
private arrayUnion;
|
|
482
|
+
private getConditionFunctions;
|
|
483
|
+
}
|
|
484
|
+
import * as THREE from "three";
|
|
485
|
+
import { Components } from "../../core/Components";
|
|
486
|
+
import { SimpleCamera } from "../../core";
|
|
487
|
+
import { NavigationMode, NavModeID, ProjectionManager } from "./src";
|
|
488
|
+
/**
|
|
489
|
+
* A flexible camera that uses
|
|
490
|
+
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
|
|
491
|
+
* easily control the camera in 2D and 3D. It supports multiple navigation
|
|
492
|
+
* modes, such as 2D floor plan navigation, first person and 3D orbit.
|
|
493
|
+
*/
|
|
494
|
+
export declare class OrthoPerspectiveCamera extends SimpleCamera {
|
|
495
|
+
/**
|
|
496
|
+
* The current {@link NavigationMode}.
|
|
497
|
+
*/
|
|
498
|
+
mode: NavigationMode;
|
|
499
|
+
readonly projection: ProjectionManager;
|
|
500
|
+
readonly threeOrtho: THREE.OrthographicCamera;
|
|
501
|
+
protected readonly _userInputButtons: any;
|
|
502
|
+
protected readonly _frustumSize = 50;
|
|
503
|
+
protected readonly _navigationModes: Map<NavModeID, NavigationMode>;
|
|
504
|
+
get current(): THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
|
573
505
|
constructor(components: Components);
|
|
574
506
|
/** {@link Disposable.dispose} */
|
|
575
507
|
dispose(): void;
|
|
576
|
-
disposeGroup(group: FragmentsGroup): void;
|
|
577
508
|
/**
|
|
578
|
-
*
|
|
579
|
-
*
|
|
580
|
-
* @param
|
|
581
|
-
* @returns the list of IDs of the loaded fragments.
|
|
509
|
+
* Sets a new {@link NavigationMode} and disables the previous one.
|
|
510
|
+
*
|
|
511
|
+
* @param mode - The {@link NavigationMode} to set.
|
|
582
512
|
*/
|
|
583
|
-
|
|
513
|
+
set(mode: NavModeID): void;
|
|
584
514
|
/**
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
* @
|
|
515
|
+
* Make the camera view fit all the specified meshes.
|
|
516
|
+
*
|
|
517
|
+
* @param meshes the meshes to fit. If it is not defined, it will
|
|
518
|
+
* evaluate {@link Components.meshes}.
|
|
519
|
+
* @param offset the distance to the fit object
|
|
588
520
|
*/
|
|
589
|
-
|
|
590
|
-
|
|
521
|
+
fit(meshes: Iterable<THREE.Mesh>, offset?: number): Promise<void>;
|
|
522
|
+
/**
|
|
523
|
+
* Allows or prevents all user input.
|
|
524
|
+
*
|
|
525
|
+
* @param active - whether to enable or disable user inputs.
|
|
526
|
+
*/
|
|
527
|
+
setUserInput(active: boolean): void;
|
|
528
|
+
private disableUserInput;
|
|
529
|
+
private enableUserInput;
|
|
530
|
+
private newOrthoCamera;
|
|
531
|
+
private setOrthoCameraAspect;
|
|
532
|
+
}
|
|
533
|
+
import { FragmentsGroup } from "bim-fragment";
|
|
534
|
+
import { Disposable, Event, Component, Components } from "../../core";
|
|
535
|
+
import { IfcPropertiesManager } from "../IfcPropertiesManager";
|
|
536
|
+
interface IndexMap {
|
|
537
|
+
[modelID: string]: {
|
|
538
|
+
[expressID: string]: Set<number>;
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
export declare class IfcPropertiesIndexer extends Component implements Disposable {
|
|
542
|
+
static readonly uuid: "23a889ab-83b3-44a4-8bee-ead83438370b";
|
|
543
|
+
/** {@link Disposable.onDisposed} */
|
|
544
|
+
readonly onDisposed: Event<string>;
|
|
545
|
+
enabled: boolean;
|
|
546
|
+
relationsToProcess: number[];
|
|
547
|
+
indexMap: IndexMap;
|
|
548
|
+
private _propertiesManager;
|
|
549
|
+
readonly onPropertiesManagerSet: Event<IfcPropertiesManager>;
|
|
550
|
+
set propertiesManager(manager: IfcPropertiesManager | null);
|
|
551
|
+
get propertiesManager(): IfcPropertiesManager | null;
|
|
552
|
+
constructor(components: Components);
|
|
553
|
+
private onFragmentsDisposed;
|
|
554
|
+
dispose(): Promise<void>;
|
|
555
|
+
getProperties(model: FragmentsGroup, id: string): Promise<any[] | null>;
|
|
556
|
+
private getNestedPsets;
|
|
557
|
+
private getPsetProperties;
|
|
558
|
+
process(model: FragmentsGroup): Promise<void>;
|
|
559
|
+
private setEntityIndex;
|
|
560
|
+
private cloneProperty;
|
|
561
|
+
private clonePropertyArray;
|
|
562
|
+
}
|
|
563
|
+
export {};
|
|
564
|
+
import * as FRAGS from "bim-fragment";
|
|
565
|
+
import { Disposable, Component, Event, Components } from "../../core";
|
|
566
|
+
export interface Classification {
|
|
567
|
+
[system: string]: {
|
|
568
|
+
[className: string]: FRAGS.FragmentIdMap;
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
export declare class FragmentClassifier extends Component implements Disposable {
|
|
572
|
+
static readonly uuid: "e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7";
|
|
573
|
+
/** {@link Component.enabled} */
|
|
574
|
+
enabled: boolean;
|
|
575
|
+
private _groupSystems;
|
|
576
|
+
/** {@link Disposable.onDisposed} */
|
|
577
|
+
readonly onDisposed: Event<unknown>;
|
|
578
|
+
constructor(components: Components);
|
|
579
|
+
private onFragmentsDisposed;
|
|
580
|
+
/** {@link Component.get} */
|
|
581
|
+
get(): Classification;
|
|
582
|
+
dispose(): void;
|
|
583
|
+
remove(guid: string): void;
|
|
584
|
+
find(filter?: {
|
|
585
|
+
[name: string]: string[];
|
|
586
|
+
}): FRAGS.FragmentIdMap;
|
|
587
|
+
byModel(modelID: string, group: FRAGS.FragmentsGroup): void;
|
|
588
|
+
byPredefinedType(group: FRAGS.FragmentsGroup): Promise<void>;
|
|
589
|
+
byEntity(group: FRAGS.FragmentsGroup): void;
|
|
590
|
+
byStorey(group: FRAGS.FragmentsGroup): void;
|
|
591
|
+
byIfcRel(group: FRAGS.FragmentsGroup, ifcRel: number, systemName: string): Promise<void>;
|
|
592
|
+
private saveItem;
|
|
593
|
+
}
|
|
594
|
+
import * as THREE from "three";
|
|
595
|
+
import * as FRAGS from "bim-fragment";
|
|
596
|
+
import { FragmentsGroup } from "bim-fragment";
|
|
597
|
+
import { Component, Components, Disposable, Event } from "../../core";
|
|
598
|
+
/**
|
|
599
|
+
* A simple implementation of bounding box that works for fragments. The resulting bbox is not 100% precise, but
|
|
600
|
+
* it's fast, and should suffice for general use cases such as camera zooming or general boundary determination.
|
|
601
|
+
*/
|
|
602
|
+
export declare class FragmentBoundingBox extends Component implements Disposable {
|
|
603
|
+
static readonly uuid: "d1444724-dba6-4cdd-a0c7-68ee1450d166";
|
|
604
|
+
/** {@link Component.enabled} */
|
|
605
|
+
enabled: boolean;
|
|
606
|
+
/** {@link Disposable.onDisposed} */
|
|
607
|
+
readonly onDisposed: Event<unknown>;
|
|
608
|
+
private _absoluteMin;
|
|
609
|
+
private _absoluteMax;
|
|
610
|
+
private _meshes;
|
|
611
|
+
constructor(components: Components);
|
|
612
|
+
static getDimensions(bbox: THREE.Box3): {
|
|
613
|
+
width: number;
|
|
614
|
+
height: number;
|
|
615
|
+
depth: number;
|
|
616
|
+
center: THREE.Vector3;
|
|
617
|
+
};
|
|
618
|
+
static newBound(positive: boolean): THREE.Vector3;
|
|
619
|
+
static getBounds(points: THREE.Vector3[], min?: THREE.Vector3, max?: THREE.Vector3): THREE.Box3;
|
|
620
|
+
/** {@link Disposable.dispose} */
|
|
621
|
+
dispose(): void;
|
|
622
|
+
get(): THREE.Box3;
|
|
623
|
+
getSphere(): THREE.Sphere;
|
|
624
|
+
getMesh(): THREE.Mesh<THREE.BoxGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
|
|
625
|
+
reset(): void;
|
|
626
|
+
add(group: FragmentsGroup): void;
|
|
627
|
+
addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh): void;
|
|
628
|
+
private static getFragmentBounds;
|
|
629
|
+
}
|
|
630
|
+
import { Component, Disposable, Event, Components } from "../../core";
|
|
631
|
+
export declare class FragmentExploder extends Component implements Disposable {
|
|
632
|
+
static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
|
|
633
|
+
enabled: boolean;
|
|
634
|
+
height: number;
|
|
635
|
+
groupName: string;
|
|
636
|
+
/** {@link Disposable.onDisposed} */
|
|
637
|
+
readonly onDisposed: Event<string>;
|
|
638
|
+
list: Set<string>;
|
|
639
|
+
constructor(components: Components);
|
|
640
|
+
dispose(): void;
|
|
641
|
+
explode(): void;
|
|
642
|
+
reset(): void;
|
|
643
|
+
update(): void;
|
|
644
|
+
}
|
|
645
|
+
import * as FRAGS from "bim-fragment";
|
|
646
|
+
import { Components, Component } from "../../core";
|
|
647
|
+
export declare class FragmentHider extends Component {
|
|
648
|
+
static readonly uuid: "dd9ccf2d-8a21-4821-b7f6-2949add16a29";
|
|
649
|
+
enabled: boolean;
|
|
650
|
+
constructor(components: Components);
|
|
651
|
+
set(visible: boolean, items?: FRAGS.FragmentIdMap): void;
|
|
652
|
+
isolate(items: FRAGS.FragmentIdMap): void;
|
|
653
|
+
private updateCulledVisibility;
|
|
591
654
|
}
|
|
592
655
|
import * as WEBIFC from "web-ifc";
|
|
593
656
|
import * as FRAGS from "bim-fragment";
|
|
@@ -621,35 +684,90 @@ export declare class FragmentIfcLoader extends Component implements Disposable {
|
|
|
621
684
|
private getGeometry;
|
|
622
685
|
private autoSetWasm;
|
|
623
686
|
}
|
|
687
|
+
import { Fragment, FragmentsGroup } from "bim-fragment";
|
|
624
688
|
import * as THREE from "three";
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
689
|
+
import { Component, Components, Event, Disposable } from "../../core";
|
|
690
|
+
/**
|
|
691
|
+
* Object that can efficiently load binary files that contain
|
|
692
|
+
* [fragment geometry](https://github.com/ThatOpen/engine_fragment).
|
|
693
|
+
*/
|
|
694
|
+
export declare class FragmentManager extends Component implements Disposable {
|
|
695
|
+
static readonly uuid: "fef46874-46a3-461b-8c44-2922ab77c806";
|
|
696
|
+
/** {@link Disposable.onDisposed} */
|
|
697
|
+
readonly onDisposed: Event<unknown>;
|
|
698
|
+
readonly onFragmentsLoaded: Event<FragmentsGroup>;
|
|
699
|
+
readonly onFragmentsDisposed: Event<{
|
|
700
|
+
groupID: string;
|
|
701
|
+
fragmentIDs: string[];
|
|
702
|
+
}>;
|
|
703
|
+
/** All the created [fragments](https://github.com/ThatOpen/engine_fragment). */
|
|
704
|
+
readonly list: Map<string, Fragment>;
|
|
705
|
+
readonly groups: Map<string, FragmentsGroup>;
|
|
706
|
+
/** {@link Component.enabled} */
|
|
707
|
+
enabled: boolean;
|
|
708
|
+
baseCoordinationModel: string;
|
|
709
|
+
private _loader;
|
|
710
|
+
/** The list of meshes of the created fragments. */
|
|
711
|
+
get meshes(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>[];
|
|
712
|
+
constructor(components: Components);
|
|
713
|
+
/** {@link Disposable.dispose} */
|
|
714
|
+
dispose(): void;
|
|
715
|
+
disposeGroup(group: FragmentsGroup): void;
|
|
716
|
+
/**
|
|
717
|
+
* Loads one or many fragments into the scene.
|
|
718
|
+
* @param data - the bytes containing the data for the fragments to load.
|
|
719
|
+
* @param coordinate - whether this fragmentsgroup should be federated with the others.
|
|
720
|
+
* @returns the list of IDs of the loaded fragments.
|
|
721
|
+
*/
|
|
722
|
+
load(data: Uint8Array, coordinate?: boolean): FragmentsGroup;
|
|
723
|
+
/**
|
|
724
|
+
* Export the specified fragments.
|
|
725
|
+
* @param group - the fragments group to be exported.
|
|
726
|
+
* @returns the exported data as binary buffer.
|
|
727
|
+
*/
|
|
728
|
+
export(group: FragmentsGroup): Uint8Array;
|
|
729
|
+
coordinate(models?: FragmentsGroup[]): void;
|
|
730
|
+
}
|
|
632
731
|
import * as THREE from "three";
|
|
633
732
|
export declare class MaterialsUtils {
|
|
634
733
|
static isTransparent(material: THREE.Material): boolean;
|
|
635
734
|
}
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
735
|
+
import * as THREE from "three";
|
|
736
|
+
import { Component, Components, Event, World, Disposable } from "../core";
|
|
737
|
+
export interface VertexPickerConfig {
|
|
738
|
+
showOnlyVertex: boolean;
|
|
739
|
+
snapDistance: number;
|
|
740
|
+
previewElement: HTMLElement;
|
|
741
|
+
}
|
|
742
|
+
export declare class VertexPicker extends Component implements Disposable {
|
|
743
|
+
onVertexFound: Event<THREE.Vector3>;
|
|
744
|
+
onVertexLost: Event<THREE.Vector3>;
|
|
745
|
+
components: Components;
|
|
746
|
+
private _pickedPoint;
|
|
747
|
+
private _config;
|
|
748
|
+
private _enabled;
|
|
749
|
+
private _workingPlane;
|
|
750
|
+
/** {@link Disposable.onDisposed} */
|
|
751
|
+
readonly onDisposed: Event<unknown>;
|
|
752
|
+
set enabled(value: boolean);
|
|
753
|
+
get enabled(): boolean;
|
|
754
|
+
constructor(components: Components, config?: Partial<VertexPickerConfig>);
|
|
755
|
+
[Symbol.dispose](): void;
|
|
756
|
+
set workingPlane(plane: THREE.Plane | null);
|
|
757
|
+
get workingPlane(): THREE.Plane | null;
|
|
758
|
+
set config(value: Partial<VertexPickerConfig>);
|
|
759
|
+
get config(): Partial<VertexPickerConfig>;
|
|
760
|
+
dispose(): void;
|
|
761
|
+
get(world: World): THREE.Vector3 | null;
|
|
762
|
+
private getClosestVertex;
|
|
763
|
+
private getVertices;
|
|
764
|
+
private getVertex;
|
|
641
765
|
}
|
|
642
|
-
export declare
|
|
766
|
+
export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
|
|
767
|
+
export declare const IfcCategoryMap: {
|
|
643
768
|
[key: number]: string;
|
|
644
769
|
};
|
|
645
|
-
|
|
646
|
-
export interface IfcItemsCategories {
|
|
647
|
-
[itemID: number]: number;
|
|
648
|
-
}
|
|
649
|
-
export declare class IfcCategories {
|
|
650
|
-
getAll(webIfc: WEBIFC.IfcAPI, modelID: number): IfcItemsCategories;
|
|
651
|
-
}
|
|
652
|
-
export declare const IfcCategoryMap: {
|
|
770
|
+
export declare const IfcElements: {
|
|
653
771
|
[key: number]: string;
|
|
654
772
|
};
|
|
655
773
|
import * as FRAGS from "bim-fragment";
|
|
@@ -661,48 +779,30 @@ export declare class IfcPropertiesUtils {
|
|
|
661
779
|
static getRelationMap(model: FRAGS.FragmentsGroup, relationType: number, onElementsFound?: (relatingID: number, relatedIDs: number[]) => Promise<void>): Promise<{
|
|
662
780
|
[relatingID: number]: number[];
|
|
663
781
|
}>;
|
|
664
|
-
static getQsetQuantities(model: FRAGS.FragmentsGroup, expressID: number, onQuantityFound?: (expressID: number) => void): Promise<number[] | null>;
|
|
665
|
-
static getPsetProps(model: FRAGS.FragmentsGroup, expressID: number, onPropFound?: (expressID: number) => void): Promise<number[] | null>;
|
|
666
|
-
static getPsetRel(model: FRAGS.FragmentsGroup, psetID: number): Promise<number | null>;
|
|
667
|
-
static getQsetRel(model: FRAGS.FragmentsGroup, qsetID: number): Promise<number | null>;
|
|
668
|
-
static getEntityName(model: FRAGS.FragmentsGroup, entityID: number): Promise<{
|
|
669
|
-
key: string | null;
|
|
670
|
-
name: string | null;
|
|
671
|
-
}>;
|
|
672
|
-
static getQuantityValue(model: FRAGS.FragmentsGroup, quantityID: number): Promise<{
|
|
673
|
-
key: string | null;
|
|
674
|
-
value: number | null;
|
|
675
|
-
}>;
|
|
676
|
-
static isRel(expressID: number): boolean;
|
|
677
|
-
static attributeExists(model: FRAGS.FragmentsGroup, expressID: number, attribute: string): Promise<boolean>;
|
|
678
|
-
static groupEntitiesByType(model: FRAGS.FragmentsGroup, expressIDs: Set<number> | number[]): Promise<Map<number, Set<number>>>;
|
|
679
|
-
}
|
|
680
|
-
import * as
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
* been transformed through CSS or doesn't occupy the whole screen.
|
|
687
|
-
*/
|
|
688
|
-
export declare class Mouse implements Disposable {
|
|
689
|
-
dom: HTMLCanvasElement;
|
|
690
|
-
private _event?;
|
|
691
|
-
private _position;
|
|
692
|
-
/** {@link Disposable.onDisposed} */
|
|
693
|
-
readonly onDisposed: Event<unknown>;
|
|
694
|
-
constructor(dom: HTMLCanvasElement);
|
|
695
|
-
/**
|
|
696
|
-
* The real position of the mouse of the Three.js canvas.
|
|
697
|
-
*/
|
|
698
|
-
get position(): THREE.Vector2;
|
|
699
|
-
/** {@link Disposable.dispose} */
|
|
700
|
-
dispose(): void;
|
|
701
|
-
private getPositionY;
|
|
702
|
-
private getPositionX;
|
|
703
|
-
private updateMouseInfo;
|
|
704
|
-
private setupEvents;
|
|
782
|
+
static getQsetQuantities(model: FRAGS.FragmentsGroup, expressID: number, onQuantityFound?: (expressID: number) => void): Promise<number[] | null>;
|
|
783
|
+
static getPsetProps(model: FRAGS.FragmentsGroup, expressID: number, onPropFound?: (expressID: number) => void): Promise<number[] | null>;
|
|
784
|
+
static getPsetRel(model: FRAGS.FragmentsGroup, psetID: number): Promise<number | null>;
|
|
785
|
+
static getQsetRel(model: FRAGS.FragmentsGroup, qsetID: number): Promise<number | null>;
|
|
786
|
+
static getEntityName(model: FRAGS.FragmentsGroup, entityID: number): Promise<{
|
|
787
|
+
key: string | null;
|
|
788
|
+
name: string | null;
|
|
789
|
+
}>;
|
|
790
|
+
static getQuantityValue(model: FRAGS.FragmentsGroup, quantityID: number): Promise<{
|
|
791
|
+
key: string | null;
|
|
792
|
+
value: number | null;
|
|
793
|
+
}>;
|
|
794
|
+
static isRel(expressID: number): boolean;
|
|
795
|
+
static attributeExists(model: FRAGS.FragmentsGroup, expressID: number, attribute: string): Promise<boolean>;
|
|
796
|
+
static groupEntitiesByType(model: FRAGS.FragmentsGroup, expressIDs: Set<number> | number[]): Promise<Map<number, Set<number>>>;
|
|
797
|
+
}
|
|
798
|
+
import * as WEBIFC from "web-ifc";
|
|
799
|
+
export interface IfcItemsCategories {
|
|
800
|
+
[itemID: number]: number;
|
|
801
|
+
}
|
|
802
|
+
export declare class IfcCategories {
|
|
803
|
+
getAll(webIfc: WEBIFC.IfcAPI, modelID: number): IfcItemsCategories;
|
|
705
804
|
}
|
|
805
|
+
export declare const GeometryTypes: Set<number>;
|
|
706
806
|
import * as THREE from "three";
|
|
707
807
|
import { Components } from "../../Components";
|
|
708
808
|
import { Event, World, Disposable } from "../../Types";
|
|
@@ -739,7 +839,64 @@ export declare class SimpleRaycaster implements Disposable {
|
|
|
739
839
|
private intersect;
|
|
740
840
|
private filterClippingPlanes;
|
|
741
841
|
}
|
|
742
|
-
|
|
842
|
+
import { NavigationMode } from "./types";
|
|
843
|
+
/**
|
|
844
|
+
* A {@link NavigationMode} that allows first person navigation,
|
|
845
|
+
* simulating FPS video games.
|
|
846
|
+
*/
|
|
847
|
+
export declare class FirstPersonMode implements NavigationMode {
|
|
848
|
+
private camera;
|
|
849
|
+
/** {@link NavigationMode.enabled} */
|
|
850
|
+
enabled: boolean;
|
|
851
|
+
/** {@link NavigationMode.id} */
|
|
852
|
+
readonly id = "FirstPerson";
|
|
853
|
+
constructor(camera: any);
|
|
854
|
+
/** {@link NavigationMode.set} */
|
|
855
|
+
set(active: boolean): void;
|
|
856
|
+
private setupFirstPersonCamera;
|
|
857
|
+
}
|
|
858
|
+
import * as THREE from "three";
|
|
859
|
+
import { Disposable, Event } from "../../Types";
|
|
860
|
+
/**
|
|
861
|
+
* A helper to easily get the real position of the mouse in the Three.js canvas
|
|
862
|
+
* to work with tools like the
|
|
863
|
+
* [raycaster](https://threejs.org/docs/#api/en/core/Raycaster), even if it has
|
|
864
|
+
* been transformed through CSS or doesn't occupy the whole screen.
|
|
865
|
+
*/
|
|
866
|
+
export declare class Mouse implements Disposable {
|
|
867
|
+
dom: HTMLCanvasElement;
|
|
868
|
+
private _event?;
|
|
869
|
+
private _position;
|
|
870
|
+
/** {@link Disposable.onDisposed} */
|
|
871
|
+
readonly onDisposed: Event<unknown>;
|
|
872
|
+
constructor(dom: HTMLCanvasElement);
|
|
873
|
+
/**
|
|
874
|
+
* The real position of the mouse of the Three.js canvas.
|
|
875
|
+
*/
|
|
876
|
+
get position(): THREE.Vector2;
|
|
877
|
+
/** {@link Disposable.dispose} */
|
|
878
|
+
dispose(): void;
|
|
879
|
+
private getPositionY;
|
|
880
|
+
private getPositionX;
|
|
881
|
+
private updateMouseInfo;
|
|
882
|
+
private setupEvents;
|
|
883
|
+
}
|
|
884
|
+
import { NavigationMode } from "./types";
|
|
885
|
+
/**
|
|
886
|
+
* A {@link NavigationMode} that allows 3D navigation and panning
|
|
887
|
+
* like in many 3D and CAD softwares.
|
|
888
|
+
*/
|
|
889
|
+
export declare class OrbitMode implements NavigationMode {
|
|
890
|
+
camera: any;
|
|
891
|
+
/** {@link NavigationMode.enabled} */
|
|
892
|
+
enabled: boolean;
|
|
893
|
+
/** {@link NavigationMode.id} */
|
|
894
|
+
readonly id = "Orbit";
|
|
895
|
+
constructor(camera: any);
|
|
896
|
+
/** {@link NavigationMode.set} */
|
|
897
|
+
set(active: boolean): void;
|
|
898
|
+
private activateOrbitControls;
|
|
899
|
+
}
|
|
743
900
|
import * as WEBIFC from "web-ifc";
|
|
744
901
|
import { IfcItemsCategories } from "../../../ifc";
|
|
745
902
|
export declare class SpatialStructure {
|
|
@@ -748,132 +905,137 @@ export declare class SpatialStructure {
|
|
|
748
905
|
setUp(webIfc: WEBIFC.IfcAPI): void;
|
|
749
906
|
cleanUp(): void;
|
|
750
907
|
}
|
|
908
|
+
import { NavigationMode } from "./types";
|
|
909
|
+
/**
|
|
910
|
+
* A {@link NavigationMode} that allows to navigate floorplans in 2D,
|
|
911
|
+
* like many BIM tools.
|
|
912
|
+
*/
|
|
913
|
+
export declare class PlanMode implements NavigationMode {
|
|
914
|
+
private camera;
|
|
915
|
+
/** {@link NavigationMode.enabled} */
|
|
916
|
+
enabled: boolean;
|
|
917
|
+
/** {@link NavigationMode.id} */
|
|
918
|
+
readonly id = "Plan";
|
|
919
|
+
private mouseAction1?;
|
|
920
|
+
private mouseAction2?;
|
|
921
|
+
private mouseInitialized;
|
|
922
|
+
private readonly defaultAzimuthSpeed;
|
|
923
|
+
private readonly defaultPolarSpeed;
|
|
924
|
+
constructor(camera: any);
|
|
925
|
+
/** {@link NavigationMode.set} */
|
|
926
|
+
set(active: boolean): void;
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* The projection system of the camera.
|
|
930
|
+
*/
|
|
931
|
+
export type CameraProjection = "Perspective" | "Orthographic";
|
|
932
|
+
/**
|
|
933
|
+
* The extensible list of supported navigation modes.
|
|
934
|
+
*/
|
|
935
|
+
export type NavModeID = "Orbit" | "FirstPerson" | "Plan";
|
|
936
|
+
/**
|
|
937
|
+
* An object that determines the behavior of the camera controls
|
|
938
|
+
* and the user input (e.g. 2D floor plan mode, first person mode, etc).
|
|
939
|
+
*/
|
|
940
|
+
export interface NavigationMode {
|
|
941
|
+
/** The unique ID of this navigation mode. */
|
|
942
|
+
id: NavModeID;
|
|
943
|
+
/**
|
|
944
|
+
* Enable or disable this navigation mode.
|
|
945
|
+
* When a new navigation mode is enabled, the previous navigation mode
|
|
946
|
+
* must be disabled.
|
|
947
|
+
*
|
|
948
|
+
* @param active - whether to enable or disable this mode.
|
|
949
|
+
* @param options - any additional data required to enable or disable it.
|
|
950
|
+
* */
|
|
951
|
+
set: (active: boolean, options?: any) => void;
|
|
952
|
+
/** Whether this navigation mode is active or not. */
|
|
953
|
+
enabled: boolean;
|
|
954
|
+
}
|
|
955
|
+
/// <reference types="node" />
|
|
751
956
|
import * as THREE from "three";
|
|
752
|
-
import { Hideable,
|
|
957
|
+
import { Hideable, Event, World } from "../../Types";
|
|
753
958
|
import { Components } from "../../Components";
|
|
959
|
+
export interface GridConfig {
|
|
960
|
+
color: THREE.Color;
|
|
961
|
+
size1: number;
|
|
962
|
+
size2: number;
|
|
963
|
+
distance: number;
|
|
964
|
+
}
|
|
754
965
|
/**
|
|
755
|
-
*
|
|
966
|
+
* An infinite grid. Created by
|
|
967
|
+
* [fyrestar](https://github.com/Fyrestar/THREE.InfiniteGridHelper)
|
|
968
|
+
* and translated to typescript by
|
|
969
|
+
* [dkaraush](https://github.com/dkaraush/THREE.InfiniteGridHelper/blob/master/InfiniteGridHelper.ts).
|
|
756
970
|
*/
|
|
757
|
-
export declare class
|
|
758
|
-
/** Event that fires when the user starts dragging a clipping plane. */
|
|
759
|
-
readonly onDraggingStarted: Event<unknown>;
|
|
760
|
-
/** Event that fires when the user stops dragging a clipping plane. */
|
|
761
|
-
readonly onDraggingEnded: Event<unknown>;
|
|
971
|
+
export declare class SimpleGrid implements Hideable, Disposable {
|
|
762
972
|
/** {@link Disposable.onDisposed} */
|
|
763
973
|
readonly onDisposed: Event<unknown>;
|
|
764
|
-
readonly normal: THREE.Vector3;
|
|
765
|
-
readonly origin: THREE.Vector3;
|
|
766
|
-
readonly three: THREE.Plane;
|
|
767
|
-
protected readonly _helper: THREE.Object3D;
|
|
768
|
-
protected _visible: boolean;
|
|
769
|
-
protected _enabled: boolean;
|
|
770
|
-
components: Components;
|
|
771
974
|
world: World;
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
private readonly _planeMesh;
|
|
775
|
-
private readonly _controls;
|
|
776
|
-
private readonly _hiddenMaterial;
|
|
777
|
-
get enabled(): boolean;
|
|
778
|
-
/** {@link Component.enabled} */
|
|
779
|
-
set enabled(state: boolean);
|
|
780
|
-
/** {@link Hideable.visible } */
|
|
975
|
+
components: Components;
|
|
976
|
+
/** {@link Hideable.visible} */
|
|
781
977
|
get visible(): boolean;
|
|
782
|
-
/** {@link Hideable.visible
|
|
783
|
-
set visible(
|
|
784
|
-
/** The
|
|
785
|
-
get
|
|
786
|
-
/**
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
978
|
+
/** {@link Hideable.visible} */
|
|
979
|
+
set visible(visible: boolean);
|
|
980
|
+
/** The material of the grid. */
|
|
981
|
+
get material(): THREE.ShaderMaterial;
|
|
982
|
+
/**
|
|
983
|
+
* Whether the grid should fade away with distance. Recommended to be true for
|
|
984
|
+
* perspective cameras and false for orthographic cameras.
|
|
985
|
+
*/
|
|
986
|
+
get fade(): boolean;
|
|
987
|
+
/**
|
|
988
|
+
* Whether the grid should fade away with distance. Recommended to be true for
|
|
989
|
+
* perspective cameras and false for orthographic cameras.
|
|
990
|
+
*/
|
|
991
|
+
set fade(active: boolean);
|
|
992
|
+
private readonly _grid;
|
|
993
|
+
private _fade;
|
|
994
|
+
constructor(components: Components, world: World, config: GridConfig);
|
|
995
|
+
[Symbol.dispose](): void;
|
|
996
|
+
/** {@link Component.get} */
|
|
997
|
+
get(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
|
|
799
998
|
/** {@link Disposable.dispose} */
|
|
800
999
|
dispose(): void;
|
|
801
|
-
private
|
|
802
|
-
|
|
803
|
-
private newTransformControls;
|
|
804
|
-
private initializeControls;
|
|
805
|
-
private createArrowBoundingBox;
|
|
806
|
-
private changeDrag;
|
|
807
|
-
private notifyDraggingChanged;
|
|
808
|
-
private preventCameraMovement;
|
|
809
|
-
private newHelper;
|
|
810
|
-
private static newPlaneMesh;
|
|
1000
|
+
private setupEvents;
|
|
1001
|
+
private updateZoom;
|
|
811
1002
|
}
|
|
812
1003
|
import * as THREE from "three";
|
|
813
|
-
import {
|
|
814
|
-
import { Event
|
|
815
|
-
|
|
816
|
-
updateInterval?: number;
|
|
817
|
-
width?: number;
|
|
818
|
-
height?: number;
|
|
819
|
-
autoUpdate?: boolean;
|
|
820
|
-
}
|
|
1004
|
+
import { CameraProjection } from "./types";
|
|
1005
|
+
import { Event } from "../../../core";
|
|
1006
|
+
import { OrthoPerspectiveCamera } from "../index";
|
|
821
1007
|
/**
|
|
822
|
-
*
|
|
1008
|
+
* Object to control the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
|
|
823
1009
|
*/
|
|
824
|
-
export declare class
|
|
825
|
-
/** {@link Disposable.onDisposed} */
|
|
826
|
-
readonly onDisposed: Event<string>;
|
|
827
|
-
/**
|
|
828
|
-
* Fires after making the visibility check to the meshes. It lists the
|
|
829
|
-
* meshes that are currently visible, and the ones that were visible
|
|
830
|
-
* just before but not anymore.
|
|
831
|
-
*/
|
|
832
|
-
readonly onViewUpdated: Event<any>;
|
|
833
|
-
/** {@link Component.enabled} */
|
|
834
|
-
enabled: boolean;
|
|
1010
|
+
export declare class ProjectionManager {
|
|
835
1011
|
/**
|
|
836
|
-
*
|
|
837
|
-
* You can bind this to the camera movement, to a certain interval, etc.
|
|
1012
|
+
* Event that fires when the {@link CameraProjection} changes.
|
|
838
1013
|
*/
|
|
839
|
-
|
|
1014
|
+
readonly onChanged: Event<THREE.Camera>;
|
|
1015
|
+
current: CameraProjection;
|
|
1016
|
+
camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
|
1017
|
+
private _component;
|
|
1018
|
+
private _previousDistance;
|
|
1019
|
+
/** Match Ortho zoom with Perspective distance when changing projection mode */
|
|
1020
|
+
matchOrthoDistanceEnabled: boolean;
|
|
1021
|
+
constructor(camera: OrthoPerspectiveCamera);
|
|
840
1022
|
/**
|
|
841
|
-
*
|
|
842
|
-
*
|
|
1023
|
+
* Sets the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
|
|
1024
|
+
*
|
|
1025
|
+
* @param projection - the new projection to set. If it is the current projection,
|
|
1026
|
+
* it will have no effect.
|
|
843
1027
|
*/
|
|
844
|
-
|
|
845
|
-
components: Components;
|
|
846
|
-
readonly world: World;
|
|
847
|
-
readonly renderer: THREE.WebGLRenderer;
|
|
848
|
-
protected autoUpdate: boolean;
|
|
849
|
-
protected updateInterval: number;
|
|
850
|
-
protected readonly worker: Worker;
|
|
851
|
-
protected readonly scene: THREE.Scene;
|
|
852
|
-
private _width;
|
|
853
|
-
private _height;
|
|
854
|
-
private _availableColor;
|
|
855
|
-
private readonly renderTarget;
|
|
856
|
-
private readonly bufferSize;
|
|
857
|
-
private readonly _buffer;
|
|
858
|
-
constructor(components: Components, world: World, settings?: CullerRendererSettings);
|
|
859
|
-
/** {@link Disposable.dispose} */
|
|
860
|
-
dispose(): void;
|
|
1028
|
+
set(projection: CameraProjection): Promise<void>;
|
|
861
1029
|
/**
|
|
862
|
-
*
|
|
863
|
-
*
|
|
864
|
-
* @param force if true, it will refresh the scene even if needsUpdate is
|
|
865
|
-
* not true.
|
|
1030
|
+
* Changes the current {@link CameraProjection} from Ortographic to Perspective
|
|
1031
|
+
* and vice versa.
|
|
866
1032
|
*/
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
};
|
|
874
|
-
protected increaseColor(): void;
|
|
875
|
-
protected decreaseColor(): void;
|
|
876
|
-
private applySettings;
|
|
1033
|
+
toggle(): Promise<void>;
|
|
1034
|
+
private setOrthoCamera;
|
|
1035
|
+
private getDims;
|
|
1036
|
+
private setupOrthoCamera;
|
|
1037
|
+
private getDistance;
|
|
1038
|
+
private setPerspectiveCamera;
|
|
877
1039
|
}
|
|
878
1040
|
import * as THREE from "three";
|
|
879
1041
|
import { CullerRenderer, CullerRendererSettings } from "./culler-renderer";
|
|
@@ -899,103 +1061,76 @@ export declare class MeshCullerRenderer extends CullerRenderer {
|
|
|
899
1061
|
dispose(): void;
|
|
900
1062
|
add(mesh: THREE.Mesh | THREE.InstancedMesh): void;
|
|
901
1063
|
remove(mesh: THREE.Mesh | THREE.InstancedMesh): void;
|
|
902
|
-
private handleWorkerMessage;
|
|
903
|
-
private getAvailableMaterial;
|
|
904
|
-
}
|
|
905
|
-
import { IfcFragmentSettings } from "../../FragmentIfcLoader/src";
|
|
906
|
-
/** Configuration of the IFC-fragment streaming. */
|
|
907
|
-
export declare class IfcStreamingSettings extends IfcFragmentSettings {
|
|
908
|
-
minGeometrySize: number;
|
|
909
|
-
minAssetsSize: number;
|
|
910
|
-
}
|
|
911
|
-
/** Configuration of the IFC-fragment streaming. */
|
|
912
|
-
export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
|
|
913
|
-
propertiesSize: number;
|
|
914
|
-
}
|
|
915
|
-
export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
|
|
916
|
-
import * as WEBIFC from "web-ifc";
|
|
917
|
-
import { Component, Disposable, Event } from "../../../core";
|
|
918
|
-
import { PropertiesStreamingSettings } from "./streaming-settings";
|
|
919
|
-
export declare class FragmentPropsStreamConverter extends Component implements Disposable {
|
|
920
|
-
static readonly uuid: "88d2c89c-ce32-47d7-8cb6-d51e4b311a0b";
|
|
921
|
-
onPropertiesStreamed: Event<{
|
|
922
|
-
type: number;
|
|
923
|
-
data: {
|
|
924
|
-
[id: number]: any;
|
|
925
|
-
};
|
|
926
|
-
}>;
|
|
927
|
-
onProgress: Event<number>;
|
|
928
|
-
onIndicesStreamed: Event<number[][]>;
|
|
929
|
-
/** {@link Disposable.onDisposed} */
|
|
930
|
-
readonly onDisposed: Event<string>;
|
|
931
|
-
enabled: boolean;
|
|
932
|
-
settings: PropertiesStreamingSettings;
|
|
933
|
-
webIfc: WEBIFC.IfcAPI;
|
|
934
|
-
dispose(): Promise<void>;
|
|
935
|
-
streamFromBuffer(data: Uint8Array): Promise<void>;
|
|
936
|
-
streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
|
|
937
|
-
private readIfcFile;
|
|
938
|
-
private streamIfcFile;
|
|
939
|
-
private streamAllProperties;
|
|
940
|
-
private getIndices;
|
|
941
|
-
private cleanUp;
|
|
1064
|
+
private handleWorkerMessage;
|
|
1065
|
+
private getAvailableMaterial;
|
|
942
1066
|
}
|
|
943
|
-
import * as
|
|
944
|
-
import { Components
|
|
945
|
-
import {
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
1067
|
+
import * as THREE from "three";
|
|
1068
|
+
import { Components } from "../../Components";
|
|
1069
|
+
import { Event, World } from "../../Types";
|
|
1070
|
+
export interface CullerRendererSettings {
|
|
1071
|
+
updateInterval?: number;
|
|
1072
|
+
width?: number;
|
|
1073
|
+
height?: number;
|
|
1074
|
+
autoUpdate?: boolean;
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* A base renderer to determine visibility on screen
|
|
1078
|
+
*/
|
|
1079
|
+
export declare class CullerRenderer {
|
|
956
1080
|
/** {@link Disposable.onDisposed} */
|
|
957
|
-
readonly onDisposed: Event<
|
|
958
|
-
|
|
1081
|
+
readonly onDisposed: Event<string>;
|
|
1082
|
+
/**
|
|
1083
|
+
* Fires after making the visibility check to the meshes. It lists the
|
|
1084
|
+
* meshes that are currently visible, and the ones that were visible
|
|
1085
|
+
* just before but not anymore.
|
|
1086
|
+
*/
|
|
1087
|
+
readonly onViewUpdated: Event<any>;
|
|
1088
|
+
/** {@link Component.enabled} */
|
|
959
1089
|
enabled: boolean;
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
1090
|
+
/**
|
|
1091
|
+
* Needs to check whether there are objects that need to be hidden or shown.
|
|
1092
|
+
* You can bind this to the camera movement, to a certain interval, etc.
|
|
1093
|
+
*/
|
|
1094
|
+
needsUpdate: boolean;
|
|
1095
|
+
/**
|
|
1096
|
+
* Render the internal scene used to determine the object visibility. Used
|
|
1097
|
+
* for debugging purposes.
|
|
1098
|
+
*/
|
|
1099
|
+
renderDebugFrame: boolean;
|
|
1100
|
+
components: Components;
|
|
1101
|
+
readonly world: World;
|
|
1102
|
+
readonly renderer: THREE.WebGLRenderer;
|
|
1103
|
+
protected autoUpdate: boolean;
|
|
1104
|
+
protected updateInterval: number;
|
|
1105
|
+
protected readonly worker: Worker;
|
|
1106
|
+
protected readonly scene: THREE.Scene;
|
|
1107
|
+
private _width;
|
|
1108
|
+
private _height;
|
|
1109
|
+
private _availableColor;
|
|
1110
|
+
private readonly renderTarget;
|
|
1111
|
+
private readonly bufferSize;
|
|
1112
|
+
private readonly _buffer;
|
|
1113
|
+
constructor(components: Components, world: World, settings?: CullerRendererSettings);
|
|
1114
|
+
/** {@link Disposable.dispose} */
|
|
972
1115
|
dispose(): void;
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
[id: number]: {
|
|
986
|
-
boundingBox: Float32Array;
|
|
987
|
-
hasHoles: boolean;
|
|
988
|
-
geometryFile?: string;
|
|
1116
|
+
/**
|
|
1117
|
+
* The function that the culler uses to reprocess the scene. Generally it's
|
|
1118
|
+
* better to call needsUpdate, but you can also call this to force it.
|
|
1119
|
+
* @param force if true, it will refresh the scene even if needsUpdate is
|
|
1120
|
+
* not true.
|
|
1121
|
+
*/
|
|
1122
|
+
updateVisibility: (force?: boolean) => Promise<void>;
|
|
1123
|
+
protected getAvailableColor(): {
|
|
1124
|
+
r: number;
|
|
1125
|
+
g: number;
|
|
1126
|
+
b: number;
|
|
1127
|
+
code: string;
|
|
989
1128
|
};
|
|
1129
|
+
protected increaseColor(): void;
|
|
1130
|
+
protected decreaseColor(): void;
|
|
1131
|
+
private applySettings;
|
|
990
1132
|
}
|
|
991
|
-
export
|
|
992
|
-
id: number;
|
|
993
|
-
geometries: {
|
|
994
|
-
geometryID: number;
|
|
995
|
-
transformation: number[];
|
|
996
|
-
color: number[];
|
|
997
|
-
}[];
|
|
998
|
-
}
|
|
1133
|
+
export declare function readPixelsAsync(gl: WebGL2RenderingContext, x: number, y: number, w: number, h: number, format: any, type: any, dest: ArrayBufferView): Promise<ArrayBufferView>;
|
|
999
1134
|
import * as THREE from "three";
|
|
1000
1135
|
import { BaseRenderer, Event } from "../../Types";
|
|
1001
1136
|
import { Components } from "../../Components";
|
|
@@ -1029,62 +1164,6 @@ export declare class SimpleRenderer extends BaseRenderer {
|
|
|
1029
1164
|
private updateContainer;
|
|
1030
1165
|
}
|
|
1031
1166
|
import * as THREE from "three";
|
|
1032
|
-
import { Event, Base, World, BaseScene, BaseCamera, BaseRenderer } from "../../Types";
|
|
1033
|
-
import { Components } from "../../Components";
|
|
1034
|
-
export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer> extends Base implements World {
|
|
1035
|
-
/**
|
|
1036
|
-
* All the loaded [meshes](https://threejs.org/docs/#api/en/objects/Mesh).
|
|
1037
|
-
*/
|
|
1038
|
-
readonly meshes: Set<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1039
|
-
readonly onAfterUpdate: Event<unknown>;
|
|
1040
|
-
readonly onBeforeUpdate: Event<unknown>;
|
|
1041
|
-
enabled: boolean;
|
|
1042
|
-
uuid: string;
|
|
1043
|
-
readonly onDisposed: Event<unknown>;
|
|
1044
|
-
private _scene?;
|
|
1045
|
-
private _camera?;
|
|
1046
|
-
private _renderer;
|
|
1047
|
-
get scene(): T;
|
|
1048
|
-
set scene(scene: T);
|
|
1049
|
-
get camera(): U;
|
|
1050
|
-
set camera(camera: U);
|
|
1051
|
-
get renderer(): S | null;
|
|
1052
|
-
set renderer(renderer: S | null);
|
|
1053
|
-
constructor(components: Components);
|
|
1054
|
-
update(delta?: number): void;
|
|
1055
|
-
dispose(disposeResources?: boolean): void;
|
|
1056
|
-
}
|
|
1057
|
-
import * as THREE from "three";
|
|
1058
|
-
import { BaseScene, Configurable, Event } from "../../Types";
|
|
1059
|
-
import { Components } from "../../Components";
|
|
1060
|
-
export interface SimpleSceneConfig {
|
|
1061
|
-
directionalLight: {
|
|
1062
|
-
color: THREE.Color;
|
|
1063
|
-
intensity: number;
|
|
1064
|
-
position: THREE.Vector3;
|
|
1065
|
-
};
|
|
1066
|
-
ambientLight: {
|
|
1067
|
-
color: THREE.Color;
|
|
1068
|
-
intensity: number;
|
|
1069
|
-
};
|
|
1070
|
-
}
|
|
1071
|
-
/**
|
|
1072
|
-
* A basic 3D [scene](https://threejs.org/docs/#api/en/scenes/Scene) to add
|
|
1073
|
-
* objects hierarchically, and easily dispose them when you are finished with it.
|
|
1074
|
-
* @noInheritDoc
|
|
1075
|
-
*/
|
|
1076
|
-
export declare class SimpleScene extends BaseScene implements Configurable<{}> {
|
|
1077
|
-
/** {@link Configurable.isSetup} */
|
|
1078
|
-
isSetup: boolean;
|
|
1079
|
-
three: THREE.Scene;
|
|
1080
|
-
/** {@link Configurable.onSetup} */
|
|
1081
|
-
readonly onSetup: Event<SimpleScene>;
|
|
1082
|
-
config: Required<SimpleSceneConfig>;
|
|
1083
|
-
constructor(components: Components);
|
|
1084
|
-
/** Creates a simple and nice default set up for the scene (e.g. lighting). */
|
|
1085
|
-
setup(config?: Partial<SimpleSceneConfig>): void;
|
|
1086
|
-
}
|
|
1087
|
-
import * as THREE from "three";
|
|
1088
1167
|
import CameraControls from "camera-controls";
|
|
1089
1168
|
import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
|
|
1090
1169
|
import { Components } from "../../Components";
|
|
@@ -1130,6 +1209,32 @@ export declare class SimpleCamera extends BaseCamera implements Updateable, Disp
|
|
|
1130
1209
|
private setupEvents;
|
|
1131
1210
|
private static getSubsetOfThree;
|
|
1132
1211
|
}
|
|
1212
|
+
import * as THREE from "three";
|
|
1213
|
+
import { Event, Base, World, BaseScene, BaseCamera, BaseRenderer } from "../../Types";
|
|
1214
|
+
import { Components } from "../../Components";
|
|
1215
|
+
export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer> extends Base implements World {
|
|
1216
|
+
/**
|
|
1217
|
+
* All the loaded [meshes](https://threejs.org/docs/#api/en/objects/Mesh).
|
|
1218
|
+
*/
|
|
1219
|
+
readonly meshes: Set<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1220
|
+
readonly onAfterUpdate: Event<unknown>;
|
|
1221
|
+
readonly onBeforeUpdate: Event<unknown>;
|
|
1222
|
+
enabled: boolean;
|
|
1223
|
+
uuid: string;
|
|
1224
|
+
readonly onDisposed: Event<unknown>;
|
|
1225
|
+
private _scene?;
|
|
1226
|
+
private _camera?;
|
|
1227
|
+
private _renderer;
|
|
1228
|
+
get scene(): T;
|
|
1229
|
+
set scene(scene: T);
|
|
1230
|
+
get camera(): U;
|
|
1231
|
+
set camera(camera: U);
|
|
1232
|
+
get renderer(): S | null;
|
|
1233
|
+
set renderer(renderer: S | null);
|
|
1234
|
+
constructor(components: Components);
|
|
1235
|
+
update(delta?: number): void;
|
|
1236
|
+
dispose(disposeResources?: boolean): void;
|
|
1237
|
+
}
|
|
1133
1238
|
/**
|
|
1134
1239
|
* Simple event handler by
|
|
1135
1240
|
* [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540).
|
|
@@ -1229,7 +1334,7 @@ export interface Updateable {
|
|
|
1229
1334
|
* Function used to update the state of this component each frame. For
|
|
1230
1335
|
* instance, a renderer component will make a render each frame.
|
|
1231
1336
|
*/
|
|
1232
|
-
update(delta?: number): void
|
|
1337
|
+
update(delta?: number): void;
|
|
1233
1338
|
}
|
|
1234
1339
|
/** Basic type to describe the progress of any kind of process. */
|
|
1235
1340
|
export interface Progress {
|
|
@@ -1244,31 +1349,20 @@ export interface Progress {
|
|
|
1244
1349
|
* dimensions.
|
|
1245
1350
|
*/
|
|
1246
1351
|
export interface Createable {
|
|
1247
|
-
readonly onBeforeCreate: Event<any>;
|
|
1248
1352
|
/** Creates a new instance of an element (e.g. a new Dimension). */
|
|
1249
1353
|
create: (data: any) => void;
|
|
1250
|
-
/** Fired after successfully calling {@link Createable.create} */
|
|
1251
|
-
readonly onAfterCreate: Event<any>;
|
|
1252
1354
|
/**
|
|
1253
1355
|
* Finish the creation process of the component, successfully creating an
|
|
1254
1356
|
* instance of whatever the component creates.
|
|
1255
1357
|
*/
|
|
1256
|
-
endCreation
|
|
1257
|
-
/** Fired before calling {@link Createable.cancelCreation}. */
|
|
1258
|
-
readonly onBeforeCancel: Event<any>;
|
|
1358
|
+
endCreation?: (data: any) => void;
|
|
1259
1359
|
/**
|
|
1260
1360
|
* Cancels the creation process of the component, going back to the state
|
|
1261
1361
|
* before starting to create.
|
|
1262
1362
|
*/
|
|
1263
|
-
cancelCreation
|
|
1264
|
-
/** Fired after calling {@link Createable.cancelCreation}. */
|
|
1265
|
-
readonly onAfterCancel: Event<any>;
|
|
1266
|
-
/** Fired before calling {@link Createable.delete}. */
|
|
1267
|
-
readonly onBeforeDelete: Event<any>;
|
|
1363
|
+
cancelCreation?: (data: any) => void;
|
|
1268
1364
|
/** Deletes an existing instance of an element (e.g. a Dimension). */
|
|
1269
1365
|
delete: (data: any) => void;
|
|
1270
|
-
/** Fired after successfully calling {@link Createable.delete()} */
|
|
1271
|
-
readonly onAfterDelete: Event<any>;
|
|
1272
1366
|
}
|
|
1273
1367
|
/**
|
|
1274
1368
|
* Whether this component supports to be configured.
|
|
@@ -1298,24 +1392,35 @@ export interface BVHGeometry extends THREE.BufferGeometry {
|
|
|
1298
1392
|
export interface CameraControllable {
|
|
1299
1393
|
controls: CameraControls;
|
|
1300
1394
|
}
|
|
1301
|
-
import
|
|
1395
|
+
import * as THREE from "three";
|
|
1396
|
+
import { BaseScene, Configurable, Event } from "../../Types";
|
|
1302
1397
|
import { Components } from "../../Components";
|
|
1398
|
+
export interface SimpleSceneConfig {
|
|
1399
|
+
directionalLight: {
|
|
1400
|
+
color: THREE.Color;
|
|
1401
|
+
intensity: number;
|
|
1402
|
+
position: THREE.Vector3;
|
|
1403
|
+
};
|
|
1404
|
+
ambientLight: {
|
|
1405
|
+
color: THREE.Color;
|
|
1406
|
+
intensity: number;
|
|
1407
|
+
};
|
|
1408
|
+
}
|
|
1303
1409
|
/**
|
|
1304
|
-
*
|
|
1410
|
+
* A basic 3D [scene](https://threejs.org/docs/#api/en/scenes/Scene) to add
|
|
1411
|
+
* objects hierarchically, and easily dispose them when you are finished with it.
|
|
1412
|
+
* @noInheritDoc
|
|
1305
1413
|
*/
|
|
1306
|
-
export declare
|
|
1307
|
-
|
|
1414
|
+
export declare class SimpleScene extends BaseScene implements Configurable<{}> {
|
|
1415
|
+
/** {@link Configurable.isSetup} */
|
|
1416
|
+
isSetup: boolean;
|
|
1417
|
+
three: THREE.Scene;
|
|
1418
|
+
/** {@link Configurable.onSetup} */
|
|
1419
|
+
readonly onSetup: Event<SimpleScene>;
|
|
1420
|
+
config: Required<SimpleSceneConfig>;
|
|
1308
1421
|
constructor(components: Components);
|
|
1309
|
-
/**
|
|
1310
|
-
|
|
1311
|
-
/** Whether is component is {@link Resizeable}. */
|
|
1312
|
-
isResizeable: () => this is Resizeable;
|
|
1313
|
-
/** Whether is component is {@link Updateable}. */
|
|
1314
|
-
isUpdateable: () => this is Updateable;
|
|
1315
|
-
/** Whether is component is {@link Hideable}. */
|
|
1316
|
-
isHideable: () => this is Hideable;
|
|
1317
|
-
/** Whether is component is {@link Configurable}. */
|
|
1318
|
-
isConfigurable: () => this is Configurable<any>;
|
|
1422
|
+
/** Creates a simple and nice default set up for the scene (e.g. lighting). */
|
|
1423
|
+
setup(config?: Partial<SimpleSceneConfig>): void;
|
|
1319
1424
|
}
|
|
1320
1425
|
import { Base } from "./base";
|
|
1321
1426
|
/**
|
|
@@ -1352,6 +1457,25 @@ export declare abstract class BaseWorldItem extends Base {
|
|
|
1352
1457
|
currentWorld: World | null;
|
|
1353
1458
|
protected constructor(components: Components);
|
|
1354
1459
|
}
|
|
1460
|
+
import { Disposable, Hideable, Resizeable, Updateable, Configurable } from "./interfaces";
|
|
1461
|
+
import { Components } from "../../Components";
|
|
1462
|
+
/**
|
|
1463
|
+
* Base class of the library. Useful for finding out the interfaces it implements.
|
|
1464
|
+
*/
|
|
1465
|
+
export declare abstract class Base {
|
|
1466
|
+
components: Components;
|
|
1467
|
+
constructor(components: Components);
|
|
1468
|
+
/** Whether is component is {@link Disposable}. */
|
|
1469
|
+
isDisposeable: () => this is Disposable;
|
|
1470
|
+
/** Whether is component is {@link Resizeable}. */
|
|
1471
|
+
isResizeable: () => this is Resizeable;
|
|
1472
|
+
/** Whether is component is {@link Updateable}. */
|
|
1473
|
+
isUpdateable: () => this is Updateable;
|
|
1474
|
+
/** Whether is component is {@link Hideable}. */
|
|
1475
|
+
isHideable: () => this is Hideable;
|
|
1476
|
+
/** Whether is component is {@link Configurable}. */
|
|
1477
|
+
isConfigurable: () => this is Configurable<any>;
|
|
1478
|
+
}
|
|
1355
1479
|
import * as THREE from "three";
|
|
1356
1480
|
import CameraControls from "camera-controls";
|
|
1357
1481
|
import { BaseWorldItem } from "./base-world-item";
|
|
@@ -1377,6 +1501,28 @@ export declare abstract class BaseScene extends BaseWorldItem implements Disposa
|
|
|
1377
1501
|
dispose(): void;
|
|
1378
1502
|
}
|
|
1379
1503
|
import * as THREE from "three";
|
|
1504
|
+
import { BaseScene } from "./base-scene";
|
|
1505
|
+
import { BaseCamera } from "./base-camera";
|
|
1506
|
+
import { BaseRenderer } from "./base-renderer";
|
|
1507
|
+
import { Updateable, Disposable } from "./interfaces";
|
|
1508
|
+
export interface World extends Disposable, Updateable {
|
|
1509
|
+
meshes: Set<THREE.Mesh>;
|
|
1510
|
+
scene: BaseScene;
|
|
1511
|
+
camera: BaseCamera;
|
|
1512
|
+
renderer: BaseRenderer | null;
|
|
1513
|
+
uuid: string;
|
|
1514
|
+
}
|
|
1515
|
+
import { IfcFragmentSettings } from "../../FragmentIfcLoader/src";
|
|
1516
|
+
/** Configuration of the IFC-fragment streaming. */
|
|
1517
|
+
export declare class IfcStreamingSettings extends IfcFragmentSettings {
|
|
1518
|
+
minGeometrySize: number;
|
|
1519
|
+
minAssetsSize: number;
|
|
1520
|
+
}
|
|
1521
|
+
/** Configuration of the IFC-fragment streaming. */
|
|
1522
|
+
export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
|
|
1523
|
+
propertiesSize: number;
|
|
1524
|
+
}
|
|
1525
|
+
import * as THREE from "three";
|
|
1380
1526
|
import { Vector2 } from "three";
|
|
1381
1527
|
import { Event } from "./event";
|
|
1382
1528
|
import { BaseWorldItem } from "./base-world-item";
|
|
@@ -1417,74 +1563,133 @@ export declare abstract class BaseRenderer extends BaseWorldItem implements Upda
|
|
|
1417
1563
|
setPlane(active: boolean, plane: THREE.Plane, isLocal?: boolean): void;
|
|
1418
1564
|
}
|
|
1419
1565
|
import * as THREE from "three";
|
|
1420
|
-
import {
|
|
1421
|
-
import { BaseCamera } from "./base-camera";
|
|
1422
|
-
import { BaseRenderer } from "./base-renderer";
|
|
1423
|
-
import { Updateable, Disposable } from "./interfaces";
|
|
1424
|
-
export interface World extends Disposable, Updateable {
|
|
1425
|
-
meshes: Set<THREE.Mesh>;
|
|
1426
|
-
scene: BaseScene;
|
|
1427
|
-
camera: BaseCamera;
|
|
1428
|
-
renderer: BaseRenderer | null;
|
|
1429
|
-
uuid: string;
|
|
1430
|
-
}
|
|
1431
|
-
/// <reference types="node" />
|
|
1432
|
-
import * as THREE from "three";
|
|
1433
|
-
import { Hideable, Event, World } from "../../Types";
|
|
1566
|
+
import { Hideable, Disposable, Event, World } from "../../Types";
|
|
1434
1567
|
import { Components } from "../../Components";
|
|
1435
|
-
export interface GridConfig {
|
|
1436
|
-
color: THREE.Color;
|
|
1437
|
-
size1: number;
|
|
1438
|
-
size2: number;
|
|
1439
|
-
distance: number;
|
|
1440
|
-
}
|
|
1441
1568
|
/**
|
|
1442
|
-
*
|
|
1443
|
-
* [fyrestar](https://github.com/Fyrestar/THREE.InfiniteGridHelper)
|
|
1444
|
-
* and translated to typescript by
|
|
1445
|
-
* [dkaraush](https://github.com/dkaraush/THREE.InfiniteGridHelper/blob/master/InfiniteGridHelper.ts).
|
|
1569
|
+
* Each of the planes created by {@link SimpleClipper}.
|
|
1446
1570
|
*/
|
|
1447
|
-
export declare class
|
|
1571
|
+
export declare class SimplePlane implements Disposable, Hideable {
|
|
1572
|
+
/** Event that fires when the user starts dragging a clipping plane. */
|
|
1573
|
+
readonly onDraggingStarted: Event<unknown>;
|
|
1574
|
+
/** Event that fires when the user stops dragging a clipping plane. */
|
|
1575
|
+
readonly onDraggingEnded: Event<unknown>;
|
|
1448
1576
|
/** {@link Disposable.onDisposed} */
|
|
1449
1577
|
readonly onDisposed: Event<unknown>;
|
|
1450
|
-
|
|
1578
|
+
readonly normal: THREE.Vector3;
|
|
1579
|
+
readonly origin: THREE.Vector3;
|
|
1580
|
+
readonly three: THREE.Plane;
|
|
1581
|
+
protected readonly _helper: THREE.Object3D;
|
|
1582
|
+
protected _visible: boolean;
|
|
1583
|
+
protected _enabled: boolean;
|
|
1451
1584
|
components: Components;
|
|
1452
|
-
|
|
1585
|
+
world: World;
|
|
1586
|
+
private _controlsActive;
|
|
1587
|
+
private readonly _arrowBoundBox;
|
|
1588
|
+
private readonly _planeMesh;
|
|
1589
|
+
private readonly _controls;
|
|
1590
|
+
private readonly _hiddenMaterial;
|
|
1591
|
+
get enabled(): boolean;
|
|
1592
|
+
/** {@link Component.enabled} */
|
|
1593
|
+
set enabled(state: boolean);
|
|
1594
|
+
/** {@link Hideable.visible } */
|
|
1453
1595
|
get visible(): boolean;
|
|
1454
|
-
/** {@link Hideable.visible} */
|
|
1455
|
-
set visible(
|
|
1456
|
-
/** The
|
|
1457
|
-
get
|
|
1458
|
-
/**
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
[Symbol.dispose](): void;
|
|
1472
|
-
/** {@link Component.get} */
|
|
1473
|
-
get(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
|
|
1596
|
+
/** {@link Hideable.visible } */
|
|
1597
|
+
set visible(state: boolean);
|
|
1598
|
+
/** The meshes used for raycasting */
|
|
1599
|
+
get meshes(): THREE.Mesh[];
|
|
1600
|
+
/** The material of the clipping plane representation. */
|
|
1601
|
+
get planeMaterial(): THREE.Material | THREE.Material[];
|
|
1602
|
+
/** The material of the clipping plane representation. */
|
|
1603
|
+
set planeMaterial(material: THREE.Material | THREE.Material[]);
|
|
1604
|
+
/** The size of the clipping plane representation. */
|
|
1605
|
+
get size(): number;
|
|
1606
|
+
/** Sets the size of the clipping plane representation. */
|
|
1607
|
+
set size(size: number);
|
|
1608
|
+
get helper(): THREE.Object3D<THREE.Object3DEventMap>;
|
|
1609
|
+
constructor(components: Components, world: World, origin: THREE.Vector3, normal: THREE.Vector3, material: THREE.Material, size?: number, activateControls?: boolean);
|
|
1610
|
+
setFromNormalAndCoplanarPoint(normal: THREE.Vector3, point: THREE.Vector3): Promise<void>;
|
|
1611
|
+
/** {@link Updateable.update} */
|
|
1612
|
+
update: () => Promise<void>;
|
|
1474
1613
|
/** {@link Disposable.dispose} */
|
|
1475
1614
|
dispose(): void;
|
|
1476
|
-
private
|
|
1477
|
-
|
|
1615
|
+
private reset;
|
|
1616
|
+
protected toggleControls(state: boolean): void;
|
|
1617
|
+
private newTransformControls;
|
|
1618
|
+
private initializeControls;
|
|
1619
|
+
private createArrowBoundingBox;
|
|
1620
|
+
private changeDrag;
|
|
1621
|
+
private notifyDraggingChanged;
|
|
1622
|
+
private preventCameraMovement;
|
|
1623
|
+
private newHelper;
|
|
1624
|
+
private static newPlaneMesh;
|
|
1478
1625
|
}
|
|
1479
1626
|
import * as WEBIFC from "web-ifc";
|
|
1480
|
-
import
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1627
|
+
import { Components, Disposable, Event, Component } from "../../../core";
|
|
1628
|
+
import { IfcStreamingSettings } from "./streaming-settings";
|
|
1629
|
+
import { StreamedGeometries, StreamedAsset } from "./base-types";
|
|
1630
|
+
export declare class FragmentIfcStreamConverter extends Component implements Disposable {
|
|
1631
|
+
static readonly uuid: "d9999a00-e1f5-4d3f-8cfe-c56e08609764";
|
|
1632
|
+
onGeometryStreamed: Event<{
|
|
1633
|
+
buffer: Uint8Array;
|
|
1634
|
+
data: StreamedGeometries;
|
|
1635
|
+
}>;
|
|
1636
|
+
onAssetStreamed: Event<StreamedAsset[]>;
|
|
1637
|
+
onProgress: Event<number>;
|
|
1638
|
+
onIfcLoaded: Event<Uint8Array>;
|
|
1639
|
+
/** {@link Disposable.onDisposed} */
|
|
1640
|
+
readonly onDisposed: Event<unknown>;
|
|
1641
|
+
settings: IfcStreamingSettings;
|
|
1642
|
+
enabled: boolean;
|
|
1643
|
+
webIfc: WEBIFC.IfcAPI;
|
|
1644
|
+
private _spatialTree;
|
|
1645
|
+
private _metaData;
|
|
1646
|
+
private _visitedGeometries;
|
|
1647
|
+
private _streamSerializer;
|
|
1648
|
+
private _geometries;
|
|
1649
|
+
private _geometryCount;
|
|
1650
|
+
private _civil;
|
|
1651
|
+
private _groupSerializer;
|
|
1652
|
+
private _assets;
|
|
1653
|
+
private _meshesWithHoles;
|
|
1654
|
+
constructor(components: Components);
|
|
1655
|
+
dispose(): void;
|
|
1656
|
+
streamFromBuffer(data: Uint8Array): Promise<void>;
|
|
1657
|
+
streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
|
|
1658
|
+
private readIfcFile;
|
|
1659
|
+
private streamIfcFile;
|
|
1660
|
+
private streamAllGeometries;
|
|
1661
|
+
private cleanUp;
|
|
1662
|
+
private getMesh;
|
|
1663
|
+
private getGeometry;
|
|
1664
|
+
private streamAssets;
|
|
1665
|
+
private streamGeometries;
|
|
1666
|
+
}
|
|
1667
|
+
import * as WEBIFC from "web-ifc";
|
|
1668
|
+
import { Component, Disposable, Event } from "../../../core";
|
|
1669
|
+
import { PropertiesStreamingSettings } from "./streaming-settings";
|
|
1670
|
+
export declare class FragmentPropsStreamConverter extends Component implements Disposable {
|
|
1671
|
+
static readonly uuid: "88d2c89c-ce32-47d7-8cb6-d51e4b311a0b";
|
|
1672
|
+
onPropertiesStreamed: Event<{
|
|
1673
|
+
type: number;
|
|
1674
|
+
data: {
|
|
1675
|
+
[id: number]: any;
|
|
1676
|
+
};
|
|
1677
|
+
}>;
|
|
1678
|
+
onProgress: Event<number>;
|
|
1679
|
+
onIndicesStreamed: Event<number[][]>;
|
|
1680
|
+
/** {@link Disposable.onDisposed} */
|
|
1681
|
+
readonly onDisposed: Event<string>;
|
|
1682
|
+
enabled: boolean;
|
|
1683
|
+
settings: PropertiesStreamingSettings;
|
|
1684
|
+
webIfc: WEBIFC.IfcAPI;
|
|
1685
|
+
dispose(): Promise<void>;
|
|
1686
|
+
streamFromBuffer(data: Uint8Array): Promise<void>;
|
|
1687
|
+
streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
|
|
1688
|
+
private readIfcFile;
|
|
1689
|
+
private streamIfcFile;
|
|
1690
|
+
private streamAllProperties;
|
|
1691
|
+
private getIndices;
|
|
1692
|
+
private cleanUp;
|
|
1488
1693
|
}
|
|
1489
1694
|
import * as WEBIFC from "web-ifc";
|
|
1490
1695
|
/** Configuration of the IFC-fragment conversion. */
|
|
@@ -1532,26 +1737,36 @@ import * as WEBIFC from "web-ifc";
|
|
|
1532
1737
|
export declare class IfcMetadataReader {
|
|
1533
1738
|
get(webIfc: WEBIFC.IfcAPI, type: number): string;
|
|
1534
1739
|
}
|
|
1740
|
+
import * as WEBIFC from "web-ifc";
|
|
1741
|
+
import * as THREE from "three";
|
|
1742
|
+
export declare class Units {
|
|
1743
|
+
factor: number;
|
|
1744
|
+
complement: number;
|
|
1745
|
+
apply(matrix: THREE.Matrix4): void;
|
|
1746
|
+
setUp(webIfc: WEBIFC.IfcAPI): void;
|
|
1747
|
+
private getLengthUnits;
|
|
1748
|
+
private getScaleMatrix;
|
|
1749
|
+
}
|
|
1750
|
+
export interface StreamedGeometries {
|
|
1751
|
+
[id: number]: {
|
|
1752
|
+
boundingBox: Float32Array;
|
|
1753
|
+
hasHoles: boolean;
|
|
1754
|
+
geometryFile?: string;
|
|
1755
|
+
};
|
|
1756
|
+
}
|
|
1757
|
+
export interface StreamedAsset {
|
|
1758
|
+
id: number;
|
|
1759
|
+
geometries: {
|
|
1760
|
+
geometryID: number;
|
|
1761
|
+
transformation: number[];
|
|
1762
|
+
color: number[];
|
|
1763
|
+
}[];
|
|
1764
|
+
}
|
|
1535
1765
|
import { BufferGeometry } from "three";
|
|
1536
1766
|
import * as THREE from "three";
|
|
1537
1767
|
export declare class TransformHelper {
|
|
1538
1768
|
getHelper(geometries: BufferGeometry[]): THREE.Object3D<THREE.Object3DEventMap>;
|
|
1539
1769
|
}
|
|
1540
|
-
import { Component, Disposable, Event, Components } from "../../core";
|
|
1541
|
-
export declare class FragmentExploder extends Component implements Disposable {
|
|
1542
|
-
static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
|
|
1543
|
-
enabled: boolean;
|
|
1544
|
-
height: number;
|
|
1545
|
-
groupName: string;
|
|
1546
|
-
/** {@link Disposable.onDisposed} */
|
|
1547
|
-
readonly onDisposed: Event<string>;
|
|
1548
|
-
list: Set<string>;
|
|
1549
|
-
constructor(components: Components);
|
|
1550
|
-
dispose(): void;
|
|
1551
|
-
explode(): void;
|
|
1552
|
-
reset(): void;
|
|
1553
|
-
update(): void;
|
|
1554
|
-
}
|
|
1555
1770
|
export type QueryConditions = "is" | "includes" | "startsWith" | "endsWith" | "matches";
|
|
1556
1771
|
export type ConditionFunctions = {
|
|
1557
1772
|
[queryCondition in QueryConditions]: (leftValue: string | boolean | number, rightValue: string | boolean | number) => boolean;
|
|
@@ -1575,5 +1790,54 @@ export interface Query {
|
|
|
1575
1790
|
description?: string;
|
|
1576
1791
|
groups: QueryGroup;
|
|
1577
1792
|
}
|
|
1793
|
+
import { Component, Components, Disposable, Updateable, World, Event } from "../../core";
|
|
1794
|
+
import { MiniMap } from "./src";
|
|
1795
|
+
export declare class MiniMaps extends Component implements Updateable, Disposable {
|
|
1796
|
+
static readonly uuid: "39ad6aad-84c8-4adf-a1e0-7f25313a9e7f";
|
|
1797
|
+
readonly onAfterUpdate: Event<unknown>;
|
|
1798
|
+
readonly onBeforeUpdate: Event<unknown>;
|
|
1799
|
+
readonly onDisposed: Event<unknown>;
|
|
1800
|
+
enabled: boolean;
|
|
1801
|
+
list: Map<string, MiniMap>;
|
|
1802
|
+
constructor(components: Components);
|
|
1803
|
+
create(world: World): MiniMap;
|
|
1804
|
+
delete(id: string): void;
|
|
1805
|
+
dispose(): void | Promise<void>;
|
|
1806
|
+
update(): void;
|
|
1807
|
+
}
|
|
1808
|
+
import * as THREE from "three";
|
|
1809
|
+
import { Event, Resizeable, Updateable, Disposable, World } from "../../../core";
|
|
1810
|
+
export declare class MiniMap implements Resizeable, Updateable, Disposable {
|
|
1811
|
+
/** {@link Disposable.onDisposed} */
|
|
1812
|
+
readonly onDisposed: Event<unknown>;
|
|
1813
|
+
readonly onAfterUpdate: Event<unknown>;
|
|
1814
|
+
readonly onBeforeUpdate: Event<unknown>;
|
|
1815
|
+
readonly onResize: Event<THREE.Vector2>;
|
|
1816
|
+
frontOffset: number;
|
|
1817
|
+
overrideMaterial: THREE.MeshDepthMaterial;
|
|
1818
|
+
backgroundColor: THREE.Color;
|
|
1819
|
+
renderer: THREE.WebGLRenderer;
|
|
1820
|
+
enabled: boolean;
|
|
1821
|
+
world: World;
|
|
1822
|
+
private _lockRotation;
|
|
1823
|
+
private _camera;
|
|
1824
|
+
private _plane;
|
|
1825
|
+
private _size;
|
|
1826
|
+
private _tempVector1;
|
|
1827
|
+
private _tempVector2;
|
|
1828
|
+
private _tempTarget;
|
|
1829
|
+
private readonly down;
|
|
1830
|
+
get lockRotation(): boolean;
|
|
1831
|
+
set lockRotation(active: boolean);
|
|
1832
|
+
get zoom(): number;
|
|
1833
|
+
set zoom(value: number);
|
|
1834
|
+
constructor(world: World);
|
|
1835
|
+
dispose(): void;
|
|
1836
|
+
get(): THREE.OrthographicCamera;
|
|
1837
|
+
update(): void;
|
|
1838
|
+
getSize(): THREE.Vector2;
|
|
1839
|
+
resize(size?: THREE.Vector2): void;
|
|
1840
|
+
private updatePlanes;
|
|
1841
|
+
}
|
|
1578
1842
|
|
|
1579
1843
|
}
|