@thatopen/components 2.0.0-alpha.8 → 2.0.0
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 +8 -12
- package/dist/core/Clipper/src/simple-plane.d.ts +2 -2
- package/dist/core/Cullers/index.d.ts +32 -2
- package/dist/core/Grids/index.d.ts +1 -1
- package/dist/core/Grids/src/simple-grid.d.ts +1 -3
- package/dist/core/MiniMap/index.d.ts +3 -2
- package/dist/core/MiniMap/src/index.d.ts +1 -1
- package/dist/core/OrthoPerspectiveCamera/index.d.ts +7 -5
- package/dist/core/OrthoPerspectiveCamera/src/first-person-mode.d.ts +2 -1
- package/dist/core/OrthoPerspectiveCamera/src/orbit-mode.d.ts +3 -2
- package/dist/core/OrthoPerspectiveCamera/src/plan-mode.d.ts +2 -1
- package/dist/core/OrthoPerspectiveCamera/src/projections.d.ts +3 -3
- package/dist/core/Raycasters/src/simple-raycaster.d.ts +1 -1
- package/dist/core/Worlds/index.d.ts +35 -0
- package/dist/core/Worlds/src/simple-camera.d.ts +1 -1
- package/dist/core/Worlds/src/simple-renderer.d.ts +2 -1
- package/dist/core/index.d.ts +0 -1
- package/dist/fragments/{FragmentBoundingBox → BoundingBoxer}/index.d.ts +2 -2
- package/dist/fragments/{FragmentClassifier → Classifier}/index.d.ts +2 -2
- package/dist/fragments/{FragmentExploder → Exploder}/index.d.ts +3 -5
- package/dist/fragments/{FragmentManager → FragmentsManager}/index.d.ts +14 -6
- package/dist/fragments/IfcGeometryTiler/src/streaming-settings.d.ts +1 -1
- package/dist/fragments/{FragmentIfcLoader → IfcLoader}/index.d.ts +1 -2
- package/dist/fragments/index.d.ts +6 -6
- package/dist/ifc/IfcJsonExporter/index.d.ts +6 -1
- package/dist/ifc/IfcPropertiesManager/index.d.ts +1 -2
- package/dist/ifc/IfcRelationsIndexer/index.d.ts +5 -8
- package/dist/ifc/IfcRelationsIndexer/src/relToAttributesMap.d.ts +3 -2
- package/dist/ifc/index.d.ts +0 -1
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +2246 -2448
- package/dist/measurement/Utils/index.d.ts +9 -5
- package/dist/namespace.d.ts +810 -848
- package/dist/utils/vertex-picker.d.ts +2 -5
- package/package.json +6 -6
- package/dist/core/Materials/index.d.ts +0 -49
- package/dist/ifc/IfcPropertiesFinder/index.d.ts +0 -37
- package/dist/ifc/IfcPropertiesFinder/src/types.d.ts +0 -23
- package/dist/ifc/IfcRelationsIndexer/src/getRelationMap.d.ts +0 -3
- /package/dist/fragments/{FragmentHider → Hider}/index.d.ts +0 -0
- /package/dist/fragments/{FragmentIfcLoader → IfcLoader}/src/civil-reader.d.ts +0 -0
- /package/dist/fragments/{FragmentIfcLoader → IfcLoader}/src/ifc-fragment-settings.d.ts +0 -0
- /package/dist/fragments/{FragmentIfcLoader → IfcLoader}/src/ifc-metadata-reader.d.ts +0 -0
- /package/dist/fragments/{FragmentIfcLoader → IfcLoader}/src/index.d.ts +0 -0
- /package/dist/fragments/{FragmentIfcLoader → IfcLoader}/src/spatial-structure.d.ts +0 -0
- /package/dist/fragments/{FragmentIfcLoader → IfcLoader}/src/transform-helper.d.ts +0 -0
- /package/dist/fragments/{FragmentIfcLoader → IfcLoader}/src/units.d.ts +0 -0
|
@@ -8,15 +8,14 @@ export * from "./src";
|
|
|
8
8
|
* [clipping planes](https://threejs.org/docs/#api/en/materials/Material.clippingPlanes).
|
|
9
9
|
*
|
|
10
10
|
* @param components - the instance of {@link Components} used.
|
|
11
|
-
* @param planeType - the type of plane to be used by the clipper.
|
|
12
11
|
* E.g. {@link SimplePlane}.
|
|
13
12
|
*/
|
|
14
|
-
export declare class Clipper
|
|
13
|
+
export declare class Clipper extends Component implements Createable, Disposable, Hideable {
|
|
15
14
|
static readonly uuid: "66290bc5-18c4-4cd1-9379-2e17a0617611";
|
|
16
15
|
/** {@link Createable.onAfterCreate} */
|
|
17
|
-
readonly onAfterCreate: Event<
|
|
16
|
+
readonly onAfterCreate: Event<SimplePlane>;
|
|
18
17
|
/** {@link Createable.onAfterDelete} */
|
|
19
|
-
readonly onAfterDelete: Event<
|
|
18
|
+
readonly onAfterDelete: Event<SimplePlane>;
|
|
20
19
|
/** Event that fires when the user starts dragging a clipping plane. */
|
|
21
20
|
readonly onBeforeDrag: Event<void>;
|
|
22
21
|
/** Event that fires when the user stops dragging a clipping plane. */
|
|
@@ -40,10 +39,10 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
|
|
|
40
39
|
* has to be `true` for this to apply.
|
|
41
40
|
*/
|
|
42
41
|
toleranceOrthogonalY: number;
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
Type: new (...args: any) => SimplePlane;
|
|
43
|
+
list: SimplePlane[];
|
|
45
44
|
/** The material used in all the clipping planes. */
|
|
46
|
-
|
|
45
|
+
private _material;
|
|
47
46
|
private _size;
|
|
48
47
|
private _enabled;
|
|
49
48
|
private _visible;
|
|
@@ -64,8 +63,6 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
|
|
|
64
63
|
/** The size of the geometric representation of the clippings planes. */
|
|
65
64
|
set size(size: number);
|
|
66
65
|
constructor(components: Components);
|
|
67
|
-
endCreation(): void;
|
|
68
|
-
cancelCreation(): void;
|
|
69
66
|
/** {@link Disposable.dispose} */
|
|
70
67
|
dispose(): void;
|
|
71
68
|
/** {@link Createable.create} */
|
|
@@ -79,7 +76,7 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
|
|
|
79
76
|
* @param point - the position of the clipping plane.
|
|
80
77
|
* navigation.
|
|
81
78
|
*/
|
|
82
|
-
createFromNormalAndCoplanarPoint(world: World, normal: THREE.Vector3, point: THREE.Vector3):
|
|
79
|
+
createFromNormalAndCoplanarPoint(world: World, normal: THREE.Vector3, point: THREE.Vector3): SimplePlane;
|
|
83
80
|
/**
|
|
84
81
|
* {@link Createable.delete}
|
|
85
82
|
*
|
|
@@ -87,7 +84,7 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
|
|
|
87
84
|
* @param plane - the plane to delete. If undefined, the first plane
|
|
88
85
|
* found under the cursor will be deleted.
|
|
89
86
|
*/
|
|
90
|
-
delete(world: World, plane?:
|
|
87
|
+
delete(world: World, plane?: SimplePlane): void;
|
|
91
88
|
/** Deletes all the existing clipping planes. */
|
|
92
89
|
deleteAll(): void;
|
|
93
90
|
private deletePlane;
|
|
@@ -97,7 +94,6 @@ export declare class Clipper<T extends SimplePlane> extends Component implements
|
|
|
97
94
|
private getWorldNormal;
|
|
98
95
|
private normalizePlaneDirectionY;
|
|
99
96
|
private newPlane;
|
|
100
|
-
protected newPlaneInstance(world: World, point: THREE.Vector3, normal: THREE.Vector3): T;
|
|
101
97
|
private updateMaterialsAndPlanes;
|
|
102
98
|
private _onStartDragging;
|
|
103
99
|
private _onEndDragging;
|
|
@@ -43,9 +43,9 @@ export declare class SimplePlane implements Disposable, Hideable {
|
|
|
43
43
|
set size(size: number);
|
|
44
44
|
get helper(): THREE.Object3D<THREE.Object3DEventMap>;
|
|
45
45
|
constructor(components: Components, world: World, origin: THREE.Vector3, normal: THREE.Vector3, material: THREE.Material, size?: number, activateControls?: boolean);
|
|
46
|
-
setFromNormalAndCoplanarPoint(normal: THREE.Vector3, point: THREE.Vector3):
|
|
46
|
+
setFromNormalAndCoplanarPoint(normal: THREE.Vector3, point: THREE.Vector3): void;
|
|
47
47
|
/** {@link Updateable.update} */
|
|
48
|
-
update: () =>
|
|
48
|
+
update: () => void;
|
|
49
49
|
/** {@link Disposable.dispose} */
|
|
50
50
|
dispose(): void;
|
|
51
51
|
private reset;
|
|
@@ -7,15 +7,45 @@ export * from "./src";
|
|
|
7
7
|
* that are not visible to the camera.
|
|
8
8
|
*/
|
|
9
9
|
export declare class Cullers extends Component implements Disposable {
|
|
10
|
+
/**
|
|
11
|
+
* A unique identifier for the Cullers component.
|
|
12
|
+
*/
|
|
10
13
|
static readonly uuid: "69f2a50d-c266-44fc-b1bd-fa4d34be89e6";
|
|
14
|
+
/**
|
|
15
|
+
* Indicates whether the Cullers component is enabled.
|
|
16
|
+
*/
|
|
11
17
|
private _enabled;
|
|
18
|
+
/**
|
|
19
|
+
* A map of MeshCullerRenderer instances, keyed by their world UUIDs.
|
|
20
|
+
*/
|
|
12
21
|
list: Map<string, MeshCullerRenderer>;
|
|
13
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* An event that is triggered when the Cullers component is disposed.
|
|
24
|
+
*/
|
|
14
25
|
readonly onDisposed: Event<unknown>;
|
|
15
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Gets the enabled state of the Cullers component.
|
|
28
|
+
*
|
|
29
|
+
* @returns The current enabled state.
|
|
30
|
+
*/
|
|
16
31
|
get enabled(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Sets the enabled state of the Cullers component.
|
|
34
|
+
* Also sets the enabled state of all MeshCullerRenderer instances.
|
|
35
|
+
*
|
|
36
|
+
* @param value - The new enabled state.
|
|
37
|
+
*/
|
|
17
38
|
set enabled(value: boolean);
|
|
18
39
|
constructor(components: Components);
|
|
40
|
+
/**
|
|
41
|
+
* Creates a new MeshCullerRenderer for the given world.
|
|
42
|
+
* If a MeshCullerRenderer already exists for the world, it will return the existing one.
|
|
43
|
+
*
|
|
44
|
+
* @param world - The world for which to create the MeshCullerRenderer.
|
|
45
|
+
* @param config - Optional configuration settings for the MeshCullerRenderer.
|
|
46
|
+
*
|
|
47
|
+
* @returns The newly created or existing MeshCullerRenderer for the given world.
|
|
48
|
+
*/
|
|
19
49
|
create(world: World, config?: Partial<CullerRendererSettings>): MeshCullerRenderer;
|
|
20
50
|
delete(world: World): void;
|
|
21
51
|
/** {@link Disposable.dispose} */
|
|
@@ -7,7 +7,7 @@ export declare class Grids extends Component implements Disposable {
|
|
|
7
7
|
config: Required<GridConfig>;
|
|
8
8
|
/** {@link Component.enabled} */
|
|
9
9
|
enabled: boolean;
|
|
10
|
-
create(world: World):
|
|
10
|
+
create(world: World): SimpleGrid;
|
|
11
11
|
delete(world: World): void;
|
|
12
12
|
dispose(): void;
|
|
13
13
|
}
|
|
@@ -35,12 +35,10 @@ export declare class SimpleGrid implements Hideable, Disposable {
|
|
|
35
35
|
* perspective cameras and false for orthographic cameras.
|
|
36
36
|
*/
|
|
37
37
|
set fade(active: boolean);
|
|
38
|
-
|
|
38
|
+
readonly three: THREE.Mesh;
|
|
39
39
|
private _fade;
|
|
40
40
|
constructor(components: Components, world: World, config: GridConfig);
|
|
41
41
|
[Symbol.dispose](): void;
|
|
42
|
-
/** {@link Component.get} */
|
|
43
|
-
get(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
|
|
44
42
|
/** {@link Disposable.dispose} */
|
|
45
43
|
dispose(): void;
|
|
46
44
|
private setupEvents;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Component, Components, Disposable, Updateable, World, Event } from "../../core";
|
|
2
1
|
import { MiniMap } from "./src";
|
|
2
|
+
import { Component, Updateable, World, Event, Disposable } from "../Types";
|
|
3
|
+
import { Components } from "../Components";
|
|
3
4
|
export declare class MiniMaps extends Component implements Updateable, Disposable {
|
|
4
5
|
static readonly uuid: "39ad6aad-84c8-4adf-a1e0-7f25313a9e7f";
|
|
5
6
|
readonly onAfterUpdate: Event<unknown>;
|
|
@@ -10,6 +11,6 @@ export declare class MiniMaps extends Component implements Updateable, Disposabl
|
|
|
10
11
|
constructor(components: Components);
|
|
11
12
|
create(world: World): MiniMap;
|
|
12
13
|
delete(id: string): void;
|
|
13
|
-
dispose(): void
|
|
14
|
+
dispose(): void;
|
|
14
15
|
update(): void;
|
|
15
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from "three";
|
|
2
|
-
import {
|
|
2
|
+
import { Resizeable, Updateable, World, Event, Disposable } from "../../Types";
|
|
3
3
|
export declare class MiniMap implements Resizeable, Updateable, Disposable {
|
|
4
4
|
/** {@link Disposable.onDisposed} */
|
|
5
5
|
readonly onDisposed: Event<unknown>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as THREE from "three";
|
|
2
|
-
import { Components } from "
|
|
3
|
-
import { SimpleCamera } from "
|
|
2
|
+
import { Components } from "../Components";
|
|
3
|
+
import { SimpleCamera } from "..";
|
|
4
4
|
import { NavigationMode, NavModeID, ProjectionManager } from "./src";
|
|
5
5
|
export * from "./src";
|
|
6
6
|
/**
|
|
@@ -13,13 +13,15 @@ export declare class OrthoPerspectiveCamera extends SimpleCamera {
|
|
|
13
13
|
/**
|
|
14
14
|
* The current {@link NavigationMode}.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
_mode: NavigationMode | null;
|
|
17
17
|
readonly projection: ProjectionManager;
|
|
18
18
|
readonly threeOrtho: THREE.OrthographicCamera;
|
|
19
|
+
readonly threePersp: THREE.PerspectiveCamera;
|
|
19
20
|
protected readonly _userInputButtons: any;
|
|
20
21
|
protected readonly _frustumSize = 50;
|
|
21
22
|
protected readonly _navigationModes: Map<NavModeID, NavigationMode>;
|
|
22
|
-
|
|
23
|
+
private previousSize;
|
|
24
|
+
get mode(): NavigationMode;
|
|
23
25
|
constructor(components: Components);
|
|
24
26
|
/** {@link Disposable.dispose} */
|
|
25
27
|
dispose(): void;
|
|
@@ -46,5 +48,5 @@ export declare class OrthoPerspectiveCamera extends SimpleCamera {
|
|
|
46
48
|
private disableUserInput;
|
|
47
49
|
private enableUserInput;
|
|
48
50
|
private newOrthoCamera;
|
|
49
|
-
private
|
|
51
|
+
private setOrthoPerspCameraAspect;
|
|
50
52
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NavigationMode } from "./types";
|
|
2
|
+
import { OrthoPerspectiveCamera } from "../index";
|
|
2
3
|
/**
|
|
3
4
|
* A {@link NavigationMode} that allows first person navigation,
|
|
4
5
|
* simulating FPS video games.
|
|
@@ -9,7 +10,7 @@ export declare class FirstPersonMode implements NavigationMode {
|
|
|
9
10
|
enabled: boolean;
|
|
10
11
|
/** {@link NavigationMode.id} */
|
|
11
12
|
readonly id = "FirstPerson";
|
|
12
|
-
constructor(camera:
|
|
13
|
+
constructor(camera: OrthoPerspectiveCamera);
|
|
13
14
|
/** {@link NavigationMode.set} */
|
|
14
15
|
set(active: boolean): void;
|
|
15
16
|
private setupFirstPersonCamera;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { NavigationMode } from "./types";
|
|
2
|
+
import { OrthoPerspectiveCamera } from "../index";
|
|
2
3
|
/**
|
|
3
4
|
* A {@link NavigationMode} that allows 3D navigation and panning
|
|
4
5
|
* like in many 3D and CAD softwares.
|
|
5
6
|
*/
|
|
6
7
|
export declare class OrbitMode implements NavigationMode {
|
|
7
|
-
camera:
|
|
8
|
+
camera: OrthoPerspectiveCamera;
|
|
8
9
|
/** {@link NavigationMode.enabled} */
|
|
9
10
|
enabled: boolean;
|
|
10
11
|
/** {@link NavigationMode.id} */
|
|
11
12
|
readonly id = "Orbit";
|
|
12
|
-
constructor(camera:
|
|
13
|
+
constructor(camera: OrthoPerspectiveCamera);
|
|
13
14
|
/** {@link NavigationMode.set} */
|
|
14
15
|
set(active: boolean): void;
|
|
15
16
|
private activateOrbitControls;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NavigationMode } from "./types";
|
|
2
|
+
import { OrthoPerspectiveCamera } from "../index";
|
|
2
3
|
/**
|
|
3
4
|
* A {@link NavigationMode} that allows to navigate floorplans in 2D,
|
|
4
5
|
* like many BIM tools.
|
|
@@ -14,7 +15,7 @@ export declare class PlanMode implements NavigationMode {
|
|
|
14
15
|
private mouseInitialized;
|
|
15
16
|
private readonly defaultAzimuthSpeed;
|
|
16
17
|
private readonly defaultPolarSpeed;
|
|
17
|
-
constructor(camera:
|
|
18
|
+
constructor(camera: OrthoPerspectiveCamera);
|
|
18
19
|
/** {@link NavigationMode.set} */
|
|
19
20
|
set(active: boolean): void;
|
|
20
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as THREE from "three";
|
|
2
2
|
import { CameraProjection } from "./types";
|
|
3
|
-
import { Event } from "
|
|
3
|
+
import { Event } from "../../Types";
|
|
4
4
|
import { OrthoPerspectiveCamera } from "../index";
|
|
5
5
|
/**
|
|
6
6
|
* Object to control the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
|
|
@@ -9,7 +9,7 @@ export declare class ProjectionManager {
|
|
|
9
9
|
/**
|
|
10
10
|
* Event that fires when the {@link CameraProjection} changes.
|
|
11
11
|
*/
|
|
12
|
-
readonly onChanged: Event<THREE.
|
|
12
|
+
readonly onChanged: Event<THREE.PerspectiveCamera | THREE.OrthographicCamera>;
|
|
13
13
|
current: CameraProjection;
|
|
14
14
|
camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
|
15
15
|
private _component;
|
|
@@ -30,7 +30,7 @@ export declare class ProjectionManager {
|
|
|
30
30
|
*/
|
|
31
31
|
toggle(): Promise<void>;
|
|
32
32
|
private setOrthoCamera;
|
|
33
|
-
private
|
|
33
|
+
private getPerspectiveDims;
|
|
34
34
|
private setupOrthoCamera;
|
|
35
35
|
private getDistance;
|
|
36
36
|
private setPerspectiveCamera;
|
|
@@ -29,7 +29,7 @@ export declare class SimpleRaycaster implements Disposable {
|
|
|
29
29
|
* to query. If not provided, it will query all the meshes stored in
|
|
30
30
|
* {@link Components.meshes}.
|
|
31
31
|
*/
|
|
32
|
-
castRay(items?: THREE.
|
|
32
|
+
castRay(items?: THREE.Object3D[]): THREE.Intersection | null;
|
|
33
33
|
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;
|
|
34
34
|
private intersect;
|
|
35
35
|
private filterClippingPlanes;
|
|
@@ -3,13 +3,48 @@ import { Components } from "../Components";
|
|
|
3
3
|
import { SimpleWorld } from "./src";
|
|
4
4
|
export * from "./src";
|
|
5
5
|
export declare class Worlds extends Component implements Updateable, Disposable {
|
|
6
|
+
/**
|
|
7
|
+
* A unique identifier for the component.
|
|
8
|
+
* This UUID is used to register the component within the Components system.
|
|
9
|
+
*/
|
|
6
10
|
static readonly uuid: "fdb61dc4-2ec1-4966-b83d-54ea795fad4a";
|
|
11
|
+
/**
|
|
12
|
+
* Event triggered after the update process of all worlds.
|
|
13
|
+
* Subscribers can listen to this event to perform actions post-update.
|
|
14
|
+
*/
|
|
7
15
|
readonly onAfterUpdate: Event<unknown>;
|
|
16
|
+
/**
|
|
17
|
+
* Event triggered before the update process of all worlds.
|
|
18
|
+
* Subscribers can listen to this event to perform actions pre-update.
|
|
19
|
+
*/
|
|
8
20
|
readonly onBeforeUpdate: Event<unknown>;
|
|
21
|
+
/**
|
|
22
|
+
* Event triggered when the Worlds component is disposed.
|
|
23
|
+
* Subscribers can listen to this event to perform cleanup actions.
|
|
24
|
+
*/
|
|
9
25
|
readonly onDisposed: Event<unknown>;
|
|
26
|
+
/**
|
|
27
|
+
* A collection of worlds managed by this component.
|
|
28
|
+
* The key is the unique identifier (UUID) of the world, and the value is the World instance.
|
|
29
|
+
*/
|
|
10
30
|
list: Map<string, World>;
|
|
31
|
+
/**
|
|
32
|
+
* A flag indicating whether the Worlds component is enabled.
|
|
33
|
+
* If false, the update process will be skipped.
|
|
34
|
+
*/
|
|
11
35
|
enabled: boolean;
|
|
12
36
|
constructor(components: Components);
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new instance of a SimpleWorld and adds it to the list of worlds.
|
|
39
|
+
*
|
|
40
|
+
* @template T - The type of the scene, extending from BaseScene. Defaults to BaseScene.
|
|
41
|
+
* @template U - The type of the camera, extending from BaseCamera. Defaults to BaseCamera.
|
|
42
|
+
* @template S - The type of the renderer, extending from BaseRenderer. Defaults to BaseRenderer.
|
|
43
|
+
*
|
|
44
|
+
* @returns {SimpleWorld<T, U, S>} - The newly created SimpleWorld instance.
|
|
45
|
+
*
|
|
46
|
+
* @throws {Error} - Throws an error if a world with the same UUID already exists in the list.
|
|
47
|
+
*/
|
|
13
48
|
create<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer>(): SimpleWorld<T, U, S>;
|
|
14
49
|
delete(world: World): void;
|
|
15
50
|
dispose(): void;
|
|
@@ -16,7 +16,7 @@ export declare class SimpleCamera extends BaseCamera implements Updateable, Disp
|
|
|
16
16
|
readonly onAspectUpdated: Event<unknown>;
|
|
17
17
|
/** {@link Disposable.onDisposed} */
|
|
18
18
|
readonly onDisposed: Event<string>;
|
|
19
|
-
|
|
19
|
+
three: THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
|
20
20
|
private _allControls;
|
|
21
21
|
/**
|
|
22
22
|
* The object that controls the camera. An instance of
|
|
@@ -13,7 +13,8 @@ export declare class SimpleRenderer extends BaseRenderer {
|
|
|
13
13
|
protected _canvas: HTMLCanvasElement;
|
|
14
14
|
protected _parameters?: Partial<THREE.WebGLRendererParameters>;
|
|
15
15
|
protected _resizeObserver: ResizeObserver | null;
|
|
16
|
-
protected onContainerUpdated: Event<
|
|
16
|
+
protected onContainerUpdated: Event<unknown>;
|
|
17
|
+
private _resizing;
|
|
17
18
|
constructor(components: Components, container: HTMLElement, parameters?: Partial<THREE.WebGLRendererParameters>);
|
|
18
19
|
/** {@link Updateable.update} */
|
|
19
20
|
update(): void;
|
package/dist/core/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Component, Components, Disposable, Event } from "../../core";
|
|
|
6
6
|
* A simple implementation of bounding box that works for fragments. The resulting bbox is not 100% precise, but
|
|
7
7
|
* it's fast, and should suffice for general use cases such as camera zooming or general boundary determination.
|
|
8
8
|
*/
|
|
9
|
-
export declare class
|
|
9
|
+
export declare class BoundingBoxer extends Component implements Disposable {
|
|
10
10
|
static readonly uuid: "d1444724-dba6-4cdd-a0c7-68ee1450d166";
|
|
11
11
|
/** {@link Component.enabled} */
|
|
12
12
|
enabled: boolean;
|
|
@@ -31,6 +31,6 @@ export declare class FragmentBoundingBox extends Component implements Disposable
|
|
|
31
31
|
getMesh(): THREE.Mesh<THREE.BoxGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
|
|
32
32
|
reset(): void;
|
|
33
33
|
add(group: FragmentsGroup): void;
|
|
34
|
-
addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh): void;
|
|
34
|
+
addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh, itemIDs?: Iterable<number>): void;
|
|
35
35
|
private static getFragmentBounds;
|
|
36
36
|
}
|
|
@@ -6,7 +6,7 @@ export interface Classification {
|
|
|
6
6
|
[className: string]: FRAGS.FragmentIdMap;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
export declare class
|
|
9
|
+
export declare class Classifier extends Component implements Disposable {
|
|
10
10
|
static readonly uuid: "e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7";
|
|
11
11
|
/** {@link Component.enabled} */
|
|
12
12
|
enabled: boolean;
|
|
@@ -25,7 +25,7 @@ export declare class FragmentClassifier extends Component implements Disposable
|
|
|
25
25
|
byEntity(group: FRAGS.FragmentsGroup): void;
|
|
26
26
|
byStorey(group: FRAGS.FragmentsGroup): void;
|
|
27
27
|
byIfcRel(group: FRAGS.FragmentsGroup, ifcRel: number, systemName: string): Promise<void>;
|
|
28
|
-
setColor(items: FRAGS.FragmentIdMap, color: THREE.Color,
|
|
28
|
+
setColor(items: FRAGS.FragmentIdMap, color: THREE.Color, override?: boolean): void;
|
|
29
29
|
resetColor(items: FRAGS.FragmentIdMap): void;
|
|
30
30
|
private saveItem;
|
|
31
31
|
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { Component, Disposable, Event, Components } from "../../core";
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class Exploder extends Component implements Disposable {
|
|
3
3
|
static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
|
|
4
4
|
enabled: boolean;
|
|
5
5
|
height: number;
|
|
6
6
|
groupName: string;
|
|
7
7
|
/** {@link Disposable.onDisposed} */
|
|
8
|
-
readonly onDisposed: Event<
|
|
8
|
+
readonly onDisposed: Event<unknown>;
|
|
9
9
|
list: Set<string>;
|
|
10
10
|
constructor(components: Components);
|
|
11
11
|
dispose(): void;
|
|
12
|
-
|
|
13
|
-
reset(): void;
|
|
14
|
-
update(): void;
|
|
12
|
+
set(active: boolean): void;
|
|
15
13
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Fragment, FragmentsGroup } from "@thatopen/fragments";
|
|
2
2
|
import * as THREE from "three";
|
|
3
|
+
import * as FRAGS from "@thatopen/fragments";
|
|
3
4
|
import { Component, Components, Event, Disposable } from "../../core";
|
|
5
|
+
import { RelationsMap } from "../../ifc/IfcRelationsIndexer/src/types";
|
|
4
6
|
/**
|
|
5
7
|
* Object that can efficiently load binary files that contain
|
|
6
8
|
* [fragment geometry](https://github.com/ThatOpen/engine_fragment).
|
|
7
9
|
*/
|
|
8
|
-
export declare class
|
|
10
|
+
export declare class FragmentsManager extends Component implements Disposable {
|
|
9
11
|
static readonly uuid: "fef46874-46a3-461b-8c44-2922ab77c806";
|
|
10
12
|
/** {@link Disposable.onDisposed} */
|
|
11
13
|
readonly onDisposed: Event<unknown>;
|
|
@@ -28,12 +30,18 @@ export declare class FragmentManager extends Component implements Disposable {
|
|
|
28
30
|
dispose(): void;
|
|
29
31
|
disposeGroup(group: FragmentsGroup): void;
|
|
30
32
|
/**
|
|
31
|
-
* Loads
|
|
32
|
-
* @param data -
|
|
33
|
-
* @param
|
|
34
|
-
* @
|
|
33
|
+
* Loads a binar file that contain fragment geometry.
|
|
34
|
+
* @param data - The binary data to load.
|
|
35
|
+
* @param config - Optional configuration for loading.
|
|
36
|
+
* @param config.coordinate - Whether to apply coordinate transformation. Default is true.
|
|
37
|
+
* @param config.properties - Ifc properties to set on the loaded fragments. Not to be used when streaming.
|
|
38
|
+
* @returns The loaded FragmentsGroup.
|
|
35
39
|
*/
|
|
36
|
-
load(data: Uint8Array,
|
|
40
|
+
load(data: Uint8Array, config?: Partial<{
|
|
41
|
+
coordinate: boolean;
|
|
42
|
+
properties: FRAGS.IfcProperties;
|
|
43
|
+
relationsMap: RelationsMap;
|
|
44
|
+
}>): FragmentsGroup;
|
|
37
45
|
/**
|
|
38
46
|
* Export the specified fragments.
|
|
39
47
|
* @param group - the fragments group to be exported.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IfcFragmentSettings } from "../../
|
|
1
|
+
import { IfcFragmentSettings } from "../../IfcLoader/src";
|
|
2
2
|
/** Configuration of the IFC-fragment streaming. */
|
|
3
3
|
export declare class IfcStreamingSettings extends IfcFragmentSettings {
|
|
4
4
|
minGeometrySize: number;
|
|
@@ -2,7 +2,7 @@ import * as WEBIFC from "web-ifc";
|
|
|
2
2
|
import * as FRAGS from "@thatopen/fragments";
|
|
3
3
|
import { IfcFragmentSettings } from "./src";
|
|
4
4
|
import { Component, Components, Event, Disposable } from "../../core";
|
|
5
|
-
export declare class
|
|
5
|
+
export declare class IfcLoader extends Component implements Disposable {
|
|
6
6
|
static readonly uuid: "a659add7-1418-4771-a0d6-7d4d438e4624";
|
|
7
7
|
readonly onIfcStartedLoading: Event<void>;
|
|
8
8
|
readonly onSetup: Event<void>;
|
|
@@ -16,7 +16,6 @@ export declare class FragmentIfcLoader extends Component implements Disposable {
|
|
|
16
16
|
private _metaData;
|
|
17
17
|
private _fragmentInstances;
|
|
18
18
|
private _civil;
|
|
19
|
-
private _propertyExporter;
|
|
20
19
|
private _visitedFragments;
|
|
21
20
|
private _materialT;
|
|
22
21
|
constructor(components: Components);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
1
|
+
export * from "./BoundingBoxer";
|
|
2
|
+
export * from "./Classifier";
|
|
3
|
+
export * from "./Exploder";
|
|
4
|
+
export * from "./Hider";
|
|
5
|
+
export * from "./IfcLoader";
|
|
6
|
+
export * from "./FragmentsManager";
|
|
7
7
|
export * from "./IfcGeometryTiler";
|
|
8
8
|
export * from "./IfcPropertiesTiler";
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import * as WEBIFC from "web-ifc";
|
|
2
2
|
import * as FRAG from "@thatopen/fragments";
|
|
3
|
+
import { Component, Components } from "../../core";
|
|
3
4
|
/**
|
|
4
5
|
* Object to export all the properties from an IFC to a JS object.
|
|
5
6
|
*/
|
|
6
|
-
export declare class IfcJsonExporter {
|
|
7
|
+
export declare class IfcJsonExporter extends Component {
|
|
8
|
+
static readonly uuid: "b32c4332-cd67-436e-ba7f-196646c7a635";
|
|
9
|
+
/** {@link Component.enabled} */
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
constructor(components: Components);
|
|
7
12
|
/**
|
|
8
13
|
* Exports all the properties of an IFC into an array of JS objects.
|
|
9
14
|
* @param webIfc The instance of [web-ifc]{@link https://github.com/ThatOpen/engine_web-ifc} to use.
|
|
@@ -45,9 +45,8 @@ export declare class IfcPropertiesManager extends Component implements Disposabl
|
|
|
45
45
|
enabled: boolean;
|
|
46
46
|
attributeListeners: AttributeListener;
|
|
47
47
|
selectedModel?: FragmentsGroup;
|
|
48
|
-
|
|
48
|
+
changeMap: ChangeMap;
|
|
49
49
|
constructor(components: Components);
|
|
50
|
-
get(): ChangeMap;
|
|
51
50
|
dispose(): void;
|
|
52
51
|
private increaseMaxID;
|
|
53
52
|
static getIFCSchema(model: FragmentsGroup): import("@thatopen/fragments").IfcSchema;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as WEBIFC from "web-ifc";
|
|
2
2
|
import { FragmentsGroup } from "@thatopen/fragments";
|
|
3
3
|
import { Disposable, Event, Component, Components } from "../../core";
|
|
4
|
-
import { RelationsMap, ModelsRelationMap,
|
|
4
|
+
import { RelationsMap, ModelsRelationMap, InverseAttribute } from "./src/types";
|
|
5
5
|
/**
|
|
6
6
|
* Indexer for IFC entities, facilitating the indexing and retrieval of IFC entity relationships.
|
|
7
7
|
* It is designed to process models properties by indexing their IFC entities' relations based on predefined inverse attributes, and provides methods to query these relations.
|
|
@@ -16,11 +16,8 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
|
|
|
16
16
|
relationsMap: RelationsMap;
|
|
17
17
|
}>;
|
|
18
18
|
private _relToAttributesMap;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* This array is used to define the inverse attributes that the indexer will process and index.
|
|
22
|
-
*/
|
|
23
|
-
readonly inverseAttributes: InverseAttributes;
|
|
19
|
+
private _inverseAttributes;
|
|
20
|
+
private _ifcRels;
|
|
24
21
|
/**
|
|
25
22
|
* Holds the relationship mappings for each model processed by the indexer.
|
|
26
23
|
* The structure is a map where each key is a model's UUID, and the value is another map.
|
|
@@ -32,7 +29,6 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
|
|
|
32
29
|
readonly relationMaps: ModelsRelationMap;
|
|
33
30
|
constructor(components: Components);
|
|
34
31
|
private onFragmentsDisposed;
|
|
35
|
-
private getAttributeRels;
|
|
36
32
|
/**
|
|
37
33
|
* Adds a relation map to the model's relations map.
|
|
38
34
|
*
|
|
@@ -60,7 +56,7 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
|
|
|
60
56
|
*/
|
|
61
57
|
process(model: FragmentsGroup): Promise<RelationsMap>;
|
|
62
58
|
/**
|
|
63
|
-
* Processes a given model from a WebIfc API to index its IFC entities relations
|
|
59
|
+
* Processes a given model from a WebIfc API to index its IFC entities relations.
|
|
64
60
|
*
|
|
65
61
|
* @param ifcApi - The WebIfc API instance from which to retrieve the model's properties.
|
|
66
62
|
* @param modelID - The unique identifier of the model within the WebIfc API.
|
|
@@ -133,3 +129,4 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
|
|
|
133
129
|
*/
|
|
134
130
|
dispose(): void;
|
|
135
131
|
}
|
|
132
|
+
export type { InverseAttribute } from "./src/types";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { InverseAttribute } from "./types";
|
|
1
2
|
export declare const relToAttributesMap: Map<number, {
|
|
2
|
-
forRelating
|
|
3
|
-
forRelated
|
|
3
|
+
forRelating: InverseAttribute;
|
|
4
|
+
forRelated: InverseAttribute;
|
|
4
5
|
}>;
|