@thatopen/components 2.1.26 → 2.2.0-alpha.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/Components/index.d.ts +1 -1
- package/dist/core/Viewpoints/index.d.ts +13 -0
- package/dist/core/Viewpoints/src/Viewpoint.d.ts +37 -0
- package/dist/core/Viewpoints/src/index.d.ts +2 -0
- package/dist/core/Viewpoints/src/types.d.ts +33 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/fragments/FragmentsManager/index.d.ts +9 -1
- package/dist/ifc/IfcRelationsIndexer/index.d.ts +12 -0
- package/dist/index.cjs +2049 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +17404 -4728
- package/dist/namespace.d.ts +2445 -1933
- package/dist/openbim/BCFTopics/index.d.ts +86 -0
- package/dist/openbim/BCFTopics/src/Comment.d.ts +33 -0
- package/dist/openbim/BCFTopics/src/Topic.d.ts +129 -0
- package/dist/openbim/BCFTopics/src/TopicForm/index.d.ts +10 -0
- package/dist/openbim/BCFTopics/src/TopicForm/src/template.d.ts +20 -0
- package/dist/openbim/BCFTopics/src/TopicPanel/index.d.ts +12 -0
- package/dist/openbim/BCFTopics/src/TopicPanel/src/template.d.ts +37 -0
- package/dist/openbim/BCFTopics/src/TopicsList/index.d.ts +12 -0
- package/dist/openbim/BCFTopics/src/TopicsList/src/template.d.ts +37 -0
- package/dist/openbim/BCFTopics/src/index.d.ts +6 -0
- package/dist/openbim/BCFTopics/src/types.d.ts +35 -0
- package/dist/openbim/index.d.ts +1 -0
- package/package.json +4 -2
|
@@ -6,7 +6,7 @@ export declare class Components implements Disposable {
|
|
|
6
6
|
/**
|
|
7
7
|
* The version of the @thatopen/components library.
|
|
8
8
|
*/
|
|
9
|
-
static readonly release = "2.
|
|
9
|
+
static readonly release = "2.2.0-alpha.0";
|
|
10
10
|
/** {@link Disposable.onDisposed} */
|
|
11
11
|
readonly onDisposed: Event<void>;
|
|
12
12
|
/**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { World, Component, Disposable, Event, DataMap } from "../Types";
|
|
2
|
+
import { Components } from "../Components";
|
|
3
|
+
import { BCFViewpoint, Viewpoint } from "./src";
|
|
4
|
+
export declare class Viewpoints extends Component implements Disposable {
|
|
5
|
+
static readonly uuid: "ee867824-a796-408d-8aa0-4e5962a83c66";
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
readonly list: DataMap<string, Viewpoint>;
|
|
8
|
+
create(world: World, data?: Partial<BCFViewpoint>): Viewpoint;
|
|
9
|
+
constructor(components: Components);
|
|
10
|
+
readonly onDisposed: Event<unknown>;
|
|
11
|
+
dispose(): void;
|
|
12
|
+
}
|
|
13
|
+
export * from "./src";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
import * as FRAGS from "@thatopen/fragments";
|
|
3
|
+
import { BCFViewpoint, ViewpointOrthographicCamera, ViewpointPerspectiveCamera } from "./types";
|
|
4
|
+
import { CameraProjection } from "../../OrthoPerspectiveCamera";
|
|
5
|
+
import { Components } from "../../Components";
|
|
6
|
+
import { DataSet, World } from "../../Types";
|
|
7
|
+
import { SimplePlane } from "../../Clipper";
|
|
8
|
+
export declare class Viewpoint implements BCFViewpoint {
|
|
9
|
+
name: string;
|
|
10
|
+
guid: string;
|
|
11
|
+
clippingPlanes: DataSet<SimplePlane>;
|
|
12
|
+
camera: ViewpointPerspectiveCamera | ViewpointOrthographicCamera;
|
|
13
|
+
readonly exceptionComponents: DataSet<string>;
|
|
14
|
+
readonly selectionComponents: DataSet<string>;
|
|
15
|
+
spacesVisible: boolean;
|
|
16
|
+
spaceBoundariesVisible: boolean;
|
|
17
|
+
openingsVisible: boolean;
|
|
18
|
+
defaultVisibility: boolean;
|
|
19
|
+
private get _selectionModelIdMap();
|
|
20
|
+
private get _exceptionModelIdMap();
|
|
21
|
+
get selection(): FRAGS.FragmentIdMap;
|
|
22
|
+
get exception(): FRAGS.FragmentIdMap;
|
|
23
|
+
get projection(): CameraProjection;
|
|
24
|
+
get position(): THREE.Vector3;
|
|
25
|
+
get direction(): THREE.Vector3;
|
|
26
|
+
private _components;
|
|
27
|
+
readonly world: World;
|
|
28
|
+
private get _managerVersion();
|
|
29
|
+
get topics(): import("../../../openbim/BCFTopics").Topic[];
|
|
30
|
+
constructor(components: Components, world: World);
|
|
31
|
+
addComponentsFromMap(fragmentIdMap: FRAGS.FragmentIdMap): Promise<void>;
|
|
32
|
+
set(data: Partial<BCFViewpoint>): void;
|
|
33
|
+
go(transition?: boolean): Promise<void>;
|
|
34
|
+
updateCamera(): void;
|
|
35
|
+
private createComponentTags;
|
|
36
|
+
serialize(version?: import("../../../openbim/BCFTopics").BCFVersion): Promise<string>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SimplePlane } from "../../Clipper";
|
|
2
|
+
import { DataSet } from "../../Types";
|
|
3
|
+
export interface ViewpointCamera {
|
|
4
|
+
direction: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
z: number;
|
|
8
|
+
};
|
|
9
|
+
position: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
z: number;
|
|
13
|
+
};
|
|
14
|
+
aspectRatio: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ViewpointPerspectiveCamera extends ViewpointCamera {
|
|
17
|
+
fov: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ViewpointOrthographicCamera extends ViewpointCamera {
|
|
20
|
+
viewToWorldScale: number;
|
|
21
|
+
}
|
|
22
|
+
export interface BCFViewpoint {
|
|
23
|
+
name: string;
|
|
24
|
+
guid: string;
|
|
25
|
+
camera: ViewpointPerspectiveCamera | ViewpointOrthographicCamera;
|
|
26
|
+
selectionComponents: Iterable<string>;
|
|
27
|
+
exceptionComponents: Iterable<string>;
|
|
28
|
+
clippingPlanes: DataSet<SimplePlane>;
|
|
29
|
+
spacesVisible: boolean;
|
|
30
|
+
spaceBoundariesVisible: boolean;
|
|
31
|
+
openingsVisible: boolean;
|
|
32
|
+
defaultVisibility: boolean;
|
|
33
|
+
}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -100,6 +100,14 @@ export declare class FragmentsManager extends Component implements Disposable {
|
|
|
100
100
|
modelIdToFragmentIdMap(modelIdMap: {
|
|
101
101
|
[modelID: string]: Set<number>;
|
|
102
102
|
}): FRAGS.FragmentIdMap;
|
|
103
|
+
/**
|
|
104
|
+
* Converts a collection of IFC GUIDs to a fragmentIdMap.
|
|
105
|
+
*
|
|
106
|
+
* @param guids - An iterable collection of global IDs to be converted to a fragment ID map.
|
|
107
|
+
*
|
|
108
|
+
* @returns A fragment ID map, where the keys are fragment IDs and the values are the corresponding express IDs.
|
|
109
|
+
*/
|
|
110
|
+
guidToFragmentIdMap(guids: Iterable<string>): FRAGS.FragmentIdMap;
|
|
103
111
|
/**
|
|
104
112
|
* Applies coordinate transformation to the provided models.
|
|
105
113
|
* If no models are provided, all groups are used.
|
|
@@ -124,7 +132,7 @@ export declare class FragmentsManager extends Component implements Disposable {
|
|
|
124
132
|
* @param originalCoordinateSystem - The original coordinate system of the object.
|
|
125
133
|
* This should be a THREE.Matrix4 representing the object's transformation matrix.
|
|
126
134
|
*/
|
|
127
|
-
applyBaseCoordinateSystem(object: THREE.Object3D | THREE.Vector3, originalCoordinateSystem
|
|
135
|
+
applyBaseCoordinateSystem(object: THREE.Object3D | THREE.Vector3, originalCoordinateSystem?: THREE.Matrix4): void;
|
|
128
136
|
/**
|
|
129
137
|
* Creates a copy of the whole model or a part of it.
|
|
130
138
|
*
|
|
@@ -139,6 +139,18 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
|
|
|
139
139
|
getRelationsMapFromJSON(json: string): RelationsMap;
|
|
140
140
|
/** {@link Disposable.dispose} */
|
|
141
141
|
dispose(): void;
|
|
142
|
+
/**
|
|
143
|
+
* Retrieves the entities within a given model that have a specific relation with a given entity.
|
|
144
|
+
*
|
|
145
|
+
* @param model - The BIM model to search for related entities.
|
|
146
|
+
* @param inv - The IFC schema inverse attribute of the relation to search for (e.g., "IsDefinedBy", "ContainsElements").
|
|
147
|
+
* @param expressID - The expressID of the entity within the model.
|
|
148
|
+
*
|
|
149
|
+
* @returns A `Set` with the expressIDs of the entities that have the specified relation with the given entity.
|
|
150
|
+
*
|
|
151
|
+
* @throws An error if the model relations are not indexed or if the inverse attribute name is invalid.
|
|
152
|
+
*/
|
|
153
|
+
getEntitiesWithRelation(model: FragmentsGroup, inv: InverseAttribute, expressID: number): Set<number>;
|
|
142
154
|
/**
|
|
143
155
|
* Adds relations between an entity and other entities in a BIM model.
|
|
144
156
|
*
|