@thatopen/components 2.3.0-alpha.9 → 2.3.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 +20 -3
- package/dist/core/Grids/src/simple-grid-config.d.ts +34 -0
- package/dist/core/MiniMap/index.d.ts +2 -0
- package/dist/core/MiniMap/src/index.d.ts +2 -89
- package/dist/core/MiniMap/src/mini-map-config.d.ts +112 -0
- package/dist/core/MiniMap/src/mini-map.d.ts +100 -0
- package/dist/core/Viewpoints/index.d.ts +1 -0
- package/dist/core/Viewpoints/src/types.d.ts +3 -0
- package/dist/core/Viewpoints/src/viewpoint.d.ts +12 -5
- package/dist/core/Worlds/index.d.ts +2 -16
- package/dist/core/Worlds/src/simple-world.d.ts +2 -2
- package/dist/fragments/Classifier/index.d.ts +1 -1
- package/dist/fragments/FragmentsManager/index.d.ts +8 -0
- package/dist/fragments/IfcLoader/index.d.ts +1 -1
- package/dist/ifc/IfcFinder/index.d.ts +50 -0
- package/dist/ifc/IfcFinder/src/ifc-basic-query.d.ts +35 -0
- package/dist/ifc/IfcFinder/src/ifc-finder-query.d.ts +96 -0
- package/dist/ifc/IfcFinder/src/ifc-property-query.d.ts +36 -0
- package/dist/ifc/IfcFinder/src/ifc-query-group.d.ts +69 -0
- package/dist/ifc/IfcFinder/src/index.d.ts +4 -0
- package/dist/ifc/IfcFinder/src/types.d.ts +84 -0
- package/dist/ifc/IfcPropertiesManager/index.d.ts +24 -6
- package/dist/ifc/IfcPropertiesManager/src/index.d.ts +3 -0
- package/dist/ifc/IfcPropertiesManager/src/rel-attrs.d.ts +7 -0
- package/dist/ifc/IfcPropertiesManager/src/rel-names.d.ts +3 -0
- package/dist/ifc/IfcPropertiesManager/src/types.d.ts +18 -0
- package/dist/ifc/IfcRelationsIndexer/index.d.ts +36 -6
- package/dist/ifc/IfcRelationsIndexer/src/index.d.ts +2 -0
- package/dist/ifc/IfcRelationsIndexer/src/relToAttributesMap.d.ts +1 -1
- package/dist/ifc/IfcRelationsIndexer/src/types.d.ts +4 -2
- package/dist/ifc/Utils/ifc-category-case.d.ts +3 -0
- package/dist/ifc/Utils/index.d.ts +1 -0
- package/dist/ifc/index.d.ts +1 -0
- package/dist/index.cjs +100 -57
- package/dist/index.mjs +14274 -11195
- package/dist/namespace.d.ts +3984 -3058
- package/dist/openbim/BCFTopics/index.d.ts +4 -0
- package/dist/openbim/IDSSpecifications/index.d.ts +61 -0
- package/dist/openbim/IDSSpecifications/src/Specification.d.ts +39 -0
- package/dist/openbim/IDSSpecifications/src/exporters/parameter.d.ts +2 -0
- package/dist/openbim/IDSSpecifications/src/facets/Attribute.d.ts +12 -0
- package/dist/openbim/IDSSpecifications/src/facets/Classification.d.ts +20 -0
- package/dist/openbim/IDSSpecifications/src/facets/Entity.d.ts +14 -0
- package/dist/openbim/IDSSpecifications/src/facets/Facet.d.ts +25 -0
- package/dist/openbim/IDSSpecifications/src/facets/Material.d.ts +9 -0
- package/dist/openbim/IDSSpecifications/src/facets/PartOf.d.ts +25 -0
- package/dist/openbim/IDSSpecifications/src/facets/Property.d.ts +22 -0
- package/dist/openbim/IDSSpecifications/src/facets/index.d.ts +5 -0
- package/dist/openbim/IDSSpecifications/src/importers/attribute.d.ts +3 -0
- package/dist/openbim/IDSSpecifications/src/importers/classification.d.ts +3 -0
- package/dist/openbim/IDSSpecifications/src/importers/entity.d.ts +3 -0
- package/dist/openbim/IDSSpecifications/src/importers/index.d.ts +3 -0
- package/dist/openbim/IDSSpecifications/src/importers/parameter.d.ts +2 -0
- package/dist/openbim/IDSSpecifications/src/importers/property.d.ts +3 -0
- package/dist/openbim/IDSSpecifications/src/index.d.ts +3 -0
- package/dist/openbim/IDSSpecifications/src/types.d.ts +51 -0
- package/dist/openbim/index.d.ts +1 -0
- package/package.json +5 -5
|
@@ -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.3.0
|
|
9
|
+
static readonly release = "2.3.0";
|
|
10
10
|
/** {@link Disposable.onDisposed} */
|
|
11
11
|
readonly onDisposed: Event<void>;
|
|
12
12
|
/**
|
|
@@ -20,6 +20,25 @@ export declare class Components implements Disposable {
|
|
|
20
20
|
*/
|
|
21
21
|
enabled: boolean;
|
|
22
22
|
private _clock;
|
|
23
|
+
/**
|
|
24
|
+
* Event that triggers the Components instance is initialized.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* This event is triggered once when the {@link Components.init} method has been called and finish processing.
|
|
28
|
+
* This is useful to set configuration placeholders that need to be executed when the components instance is initialized.
|
|
29
|
+
* For example, enabling and configuring custom effects in a post-production renderer.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* const components = new Components();
|
|
34
|
+
* components.onInit.add(() => {
|
|
35
|
+
* // Enable custom effects in the post-production renderer
|
|
36
|
+
* // or any other operation dependant on the component initialization
|
|
37
|
+
* });
|
|
38
|
+
* components.init();
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
readonly onInit: Event<undefined>;
|
|
23
42
|
/**
|
|
24
43
|
* Adds a component to the list of components.
|
|
25
44
|
* Throws an error if a component with the same UUID already exists.
|
|
@@ -51,8 +70,6 @@ export declare class Components implements Disposable {
|
|
|
51
70
|
* Initializes the Components instance.
|
|
52
71
|
* This method starts the animation loop, sets the enabled flag to true,
|
|
53
72
|
* and calls the update method.
|
|
54
|
-
*
|
|
55
|
-
* @returns {void}
|
|
56
73
|
*/
|
|
57
74
|
init(): void;
|
|
58
75
|
/**
|
|
@@ -13,6 +13,10 @@ type SimpleGridConfigType = {
|
|
|
13
13
|
* Configuration interface for the {@link SimpleGrid}.
|
|
14
14
|
*/
|
|
15
15
|
export interface SimpleGridConfig {
|
|
16
|
+
/**
|
|
17
|
+
* Whether the grid is visible or not.
|
|
18
|
+
*/
|
|
19
|
+
visible: boolean;
|
|
16
20
|
/**
|
|
17
21
|
* The color of the grid lines.
|
|
18
22
|
*/
|
|
@@ -32,15 +36,45 @@ export interface SimpleGridConfig {
|
|
|
32
36
|
}
|
|
33
37
|
export declare class SimpleGridConfigManager extends Configurator<SimpleGrid, SimpleGridConfigType> {
|
|
34
38
|
protected _config: SimpleGridConfigType;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the grid is visible or not.
|
|
41
|
+
*/
|
|
35
42
|
get visible(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether the grid is visible or not.
|
|
45
|
+
*/
|
|
36
46
|
set visible(value: boolean);
|
|
47
|
+
/**
|
|
48
|
+
* The color of the grid lines.
|
|
49
|
+
*/
|
|
37
50
|
get color(): THREE.Color;
|
|
51
|
+
/**
|
|
52
|
+
* The color of the grid lines.
|
|
53
|
+
*/
|
|
38
54
|
set color(value: THREE.Color);
|
|
55
|
+
/**
|
|
56
|
+
* The size of the primary grid lines.
|
|
57
|
+
*/
|
|
39
58
|
get primarySize(): number;
|
|
59
|
+
/**
|
|
60
|
+
* The size of the primary grid lines.
|
|
61
|
+
*/
|
|
40
62
|
set primarySize(value: number);
|
|
63
|
+
/**
|
|
64
|
+
* The size of the secondary grid lines.
|
|
65
|
+
*/
|
|
41
66
|
get secondarySize(): number;
|
|
67
|
+
/**
|
|
68
|
+
* The size of the secondary grid lines.
|
|
69
|
+
*/
|
|
42
70
|
set secondarySize(value: number);
|
|
71
|
+
/**
|
|
72
|
+
* The distance at which the grid lines start to fade away.
|
|
73
|
+
*/
|
|
43
74
|
get distance(): number;
|
|
75
|
+
/**
|
|
76
|
+
* The distance at which the grid lines start to fade away.
|
|
77
|
+
*/
|
|
44
78
|
set distance(value: number);
|
|
45
79
|
}
|
|
46
80
|
export {};
|
|
@@ -17,6 +17,8 @@ export declare class MiniMaps extends Component implements Updateable, Disposabl
|
|
|
17
17
|
readonly onBeforeUpdate: Event<unknown>;
|
|
18
18
|
/** {@link Disposable.onDisposed} */
|
|
19
19
|
readonly onDisposed: Event<unknown>;
|
|
20
|
+
/** {@link Configurable.onSetup} */
|
|
21
|
+
readonly onSetup: Event<unknown>;
|
|
20
22
|
/** {@link Component.enabled} */
|
|
21
23
|
enabled: boolean;
|
|
22
24
|
/**
|
|
@@ -1,89 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A class representing a 2D minimap of a 3D world.
|
|
5
|
-
*/
|
|
6
|
-
export declare class MiniMap implements Resizeable, Updateable, Disposable {
|
|
7
|
-
/** {@link Disposable.onDisposed} */
|
|
8
|
-
readonly onDisposed: Event<unknown>;
|
|
9
|
-
/** {@link Updateable.onAfterUpdate} */
|
|
10
|
-
readonly onAfterUpdate: Event<unknown>;
|
|
11
|
-
/** {@link Updateable.onBeforeUpdate} */
|
|
12
|
-
readonly onBeforeUpdate: Event<unknown>;
|
|
13
|
-
/** {@link Resizeable.onResize} */
|
|
14
|
-
readonly onResize: Event<THREE.Vector2>;
|
|
15
|
-
/**
|
|
16
|
-
* The front offset of the minimap.
|
|
17
|
-
* It determines how much the minimap's view is offset from the camera's view.
|
|
18
|
-
* By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
|
|
19
|
-
*/
|
|
20
|
-
frontOffset: number;
|
|
21
|
-
/**
|
|
22
|
-
* The override material for the minimap.
|
|
23
|
-
* It is used to render the depth information of the world onto the minimap.
|
|
24
|
-
*/
|
|
25
|
-
overrideMaterial: THREE.MeshDepthMaterial;
|
|
26
|
-
/**
|
|
27
|
-
* The background color of the minimap.
|
|
28
|
-
* It is used to set the background color of the minimap's renderer.
|
|
29
|
-
*/
|
|
30
|
-
backgroundColor: THREE.Color;
|
|
31
|
-
/**
|
|
32
|
-
* The WebGL renderer for the minimap.
|
|
33
|
-
* It is used to render the minimap onto the screen.
|
|
34
|
-
*/
|
|
35
|
-
renderer: THREE.WebGLRenderer;
|
|
36
|
-
/**
|
|
37
|
-
* A flag indicating whether the minimap is enabled.
|
|
38
|
-
* If disabled, the minimap will not update or render.
|
|
39
|
-
*/
|
|
40
|
-
enabled: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* The world in which the minimap is displayed.
|
|
43
|
-
* It provides access to the 3D scene, camera, and other relevant world elements.
|
|
44
|
-
*/
|
|
45
|
-
world: World;
|
|
46
|
-
private _lockRotation;
|
|
47
|
-
private _camera;
|
|
48
|
-
private _plane;
|
|
49
|
-
private _size;
|
|
50
|
-
private _tempVector1;
|
|
51
|
-
private _tempVector2;
|
|
52
|
-
private _tempTarget;
|
|
53
|
-
private readonly down;
|
|
54
|
-
/**
|
|
55
|
-
* Gets or sets whether the minimap rotation is locked.
|
|
56
|
-
* When rotation is locked, the minimap will always face the same direction as the camera.
|
|
57
|
-
*/
|
|
58
|
-
get lockRotation(): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Sets whether the minimap rotation is locked.
|
|
61
|
-
* When rotation is locked, the minimap will always face the same direction as the camera.
|
|
62
|
-
* @param active - If `true`, rotation is locked. If `false`, rotation is not locked.
|
|
63
|
-
*/
|
|
64
|
-
set lockRotation(active: boolean);
|
|
65
|
-
/**
|
|
66
|
-
* Gets the current zoom level of the minimap.
|
|
67
|
-
* The zoom level determines how much of the world is visible on the minimap.
|
|
68
|
-
* @returns The current zoom level of the minimap.
|
|
69
|
-
*/
|
|
70
|
-
get zoom(): number;
|
|
71
|
-
/**
|
|
72
|
-
* Sets the zoom level of the minimap.
|
|
73
|
-
* The zoom level determines how much of the world is visible on the minimap.
|
|
74
|
-
* @param value - The new zoom level of the minimap.
|
|
75
|
-
*/
|
|
76
|
-
set zoom(value: number);
|
|
77
|
-
constructor(world: World);
|
|
78
|
-
/** {@link Disposable.dispose} */
|
|
79
|
-
dispose(): void;
|
|
80
|
-
/** Returns the camera used by the MiniMap */
|
|
81
|
-
get(): THREE.OrthographicCamera;
|
|
82
|
-
/** {@link Updateable.update} */
|
|
83
|
-
update(): void;
|
|
84
|
-
/** {@link Resizeable.getSize} */
|
|
85
|
-
getSize(): THREE.Vector2;
|
|
86
|
-
/** {@link Resizeable.resize} */
|
|
87
|
-
resize(size?: THREE.Vector2): void;
|
|
88
|
-
private updatePlanes;
|
|
89
|
-
}
|
|
1
|
+
export * from "./mini-map";
|
|
2
|
+
export * from "./mini-map-config";
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
import { BooleanSettingsControl, ColorSettingsControl, NumberSettingControl } from "../../Types";
|
|
3
|
+
import { Configurator } from "../../ConfigManager";
|
|
4
|
+
import { MiniMap } from "./index";
|
|
5
|
+
type MiniMapConfigType = {
|
|
6
|
+
visible: BooleanSettingsControl;
|
|
7
|
+
lockRotation: BooleanSettingsControl;
|
|
8
|
+
zoom: NumberSettingControl;
|
|
9
|
+
frontOffset: NumberSettingControl;
|
|
10
|
+
sizeX: NumberSettingControl;
|
|
11
|
+
sizeY: NumberSettingControl;
|
|
12
|
+
backgroundColor: ColorSettingsControl;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Configuration interface for the {@link MiniMap}.
|
|
16
|
+
*/
|
|
17
|
+
export interface MiniMapConfig {
|
|
18
|
+
/**
|
|
19
|
+
* Whether the minimap is visible or not.
|
|
20
|
+
*/
|
|
21
|
+
visible: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to lock the rotation of the top camera in the minimap.
|
|
24
|
+
*/
|
|
25
|
+
lockRotation: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The zoom of the camera in the minimap.
|
|
28
|
+
*/
|
|
29
|
+
zoom: number;
|
|
30
|
+
/**
|
|
31
|
+
* The front offset of the minimap.
|
|
32
|
+
* It determines how much the minimap's view is offset from the camera's view.
|
|
33
|
+
* By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
|
|
34
|
+
*/
|
|
35
|
+
frontOffset: number;
|
|
36
|
+
/**
|
|
37
|
+
* The horizontal dimension of the minimap.
|
|
38
|
+
*/
|
|
39
|
+
sizeX: number;
|
|
40
|
+
/**
|
|
41
|
+
* The vertical dimension of the minimap.
|
|
42
|
+
*/
|
|
43
|
+
sizeY: number;
|
|
44
|
+
/**
|
|
45
|
+
* The color of the background of the minimap.
|
|
46
|
+
*/
|
|
47
|
+
backgroundColor: THREE.Color;
|
|
48
|
+
}
|
|
49
|
+
export declare class MiniMapConfigManager extends Configurator<MiniMap, MiniMapConfigType> {
|
|
50
|
+
protected _config: MiniMapConfigType;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the minimap is visible or not.
|
|
53
|
+
*/
|
|
54
|
+
get visible(): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the minimap is visible or not.
|
|
57
|
+
*/
|
|
58
|
+
set visible(value: boolean);
|
|
59
|
+
/**
|
|
60
|
+
* Whether to lock the rotation of the top camera in the minimap.
|
|
61
|
+
*/
|
|
62
|
+
get lockRotation(): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Whether to lock the rotation of the top camera in the minimap.
|
|
65
|
+
*/
|
|
66
|
+
set lockRotation(value: boolean);
|
|
67
|
+
/**
|
|
68
|
+
* The zoom of the camera in the minimap.
|
|
69
|
+
*/
|
|
70
|
+
get zoom(): number;
|
|
71
|
+
/**
|
|
72
|
+
* The zoom of the camera in the minimap.
|
|
73
|
+
*/
|
|
74
|
+
set zoom(value: number);
|
|
75
|
+
/**
|
|
76
|
+
* The front offset of the minimap.
|
|
77
|
+
* It determines how much the minimap's view is offset from the camera's view.
|
|
78
|
+
* By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
|
|
79
|
+
*/
|
|
80
|
+
get frontOffset(): number;
|
|
81
|
+
/**
|
|
82
|
+
* The front offset of the minimap.
|
|
83
|
+
* It determines how much the minimap's view is offset from the camera's view.
|
|
84
|
+
* By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
|
|
85
|
+
*/
|
|
86
|
+
set frontOffset(value: number);
|
|
87
|
+
/**
|
|
88
|
+
* The horizontal dimension of the minimap.
|
|
89
|
+
*/
|
|
90
|
+
get sizeX(): number;
|
|
91
|
+
/**
|
|
92
|
+
* The horizontal dimension of the minimap.
|
|
93
|
+
*/
|
|
94
|
+
set sizeX(value: number);
|
|
95
|
+
/**
|
|
96
|
+
* The vertical dimension of the minimap.
|
|
97
|
+
*/
|
|
98
|
+
get sizeY(): number;
|
|
99
|
+
/**
|
|
100
|
+
* The vertical dimension of the minimap.
|
|
101
|
+
*/
|
|
102
|
+
set sizeY(value: number);
|
|
103
|
+
/**
|
|
104
|
+
* The color of the background of the minimap.
|
|
105
|
+
*/
|
|
106
|
+
get backgroundColor(): THREE.Color;
|
|
107
|
+
/**
|
|
108
|
+
* The color of the background of the minimap.
|
|
109
|
+
*/
|
|
110
|
+
set backgroundColor(value: THREE.Color);
|
|
111
|
+
}
|
|
112
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
import { Resizeable, Updateable, World, Event, Disposable, Configurable } from "../../Types";
|
|
3
|
+
import { MiniMapConfig, MiniMapConfigManager } from "./mini-map-config";
|
|
4
|
+
import { Components } from "../../Components";
|
|
5
|
+
/**
|
|
6
|
+
* A class representing a 2D minimap of a 3D world.
|
|
7
|
+
*/
|
|
8
|
+
export declare class MiniMap implements Resizeable, Updateable, Disposable, Configurable<MiniMapConfigManager, MiniMapConfig> {
|
|
9
|
+
/** {@link Disposable.onDisposed} */
|
|
10
|
+
readonly onDisposed: Event<unknown>;
|
|
11
|
+
/** {@link Updateable.onAfterUpdate} */
|
|
12
|
+
readonly onAfterUpdate: Event<unknown>;
|
|
13
|
+
/** {@link Updateable.onBeforeUpdate} */
|
|
14
|
+
readonly onBeforeUpdate: Event<unknown>;
|
|
15
|
+
/** {@link Resizeable.onResize} */
|
|
16
|
+
readonly onResize: Event<THREE.Vector2>;
|
|
17
|
+
/** {@link Configurable.onSetup} */
|
|
18
|
+
readonly onSetup: Event<unknown>;
|
|
19
|
+
/**
|
|
20
|
+
* The front offset of the minimap.
|
|
21
|
+
* It determines how much the minimap's view is offset from the camera's view.
|
|
22
|
+
* By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
|
|
23
|
+
*/
|
|
24
|
+
frontOffset: number;
|
|
25
|
+
/**
|
|
26
|
+
* The override material for the minimap.
|
|
27
|
+
* It is used to render the depth information of the world onto the minimap.
|
|
28
|
+
*/
|
|
29
|
+
overrideMaterial: THREE.MeshDepthMaterial;
|
|
30
|
+
/**
|
|
31
|
+
* The background color of the minimap.
|
|
32
|
+
* It is used to set the background color of the minimap's renderer.
|
|
33
|
+
*/
|
|
34
|
+
backgroundColor: THREE.Color;
|
|
35
|
+
/**
|
|
36
|
+
* The WebGL renderer for the minimap.
|
|
37
|
+
* It is used to render the minimap onto the screen.
|
|
38
|
+
*/
|
|
39
|
+
renderer: THREE.WebGLRenderer;
|
|
40
|
+
/**
|
|
41
|
+
* A flag indicating whether the minimap is enabled.
|
|
42
|
+
* If disabled, the minimap will not update or render.
|
|
43
|
+
*/
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The world in which the minimap is displayed.
|
|
47
|
+
* It provides access to the 3D scene, camera, and other relevant world elements.
|
|
48
|
+
*/
|
|
49
|
+
world: World;
|
|
50
|
+
/** {@link Configurable.config} */
|
|
51
|
+
config: MiniMapConfigManager;
|
|
52
|
+
/** {@link Configurable.isSetup} */
|
|
53
|
+
isSetup: boolean;
|
|
54
|
+
protected _defaultConfig: MiniMapConfig;
|
|
55
|
+
private _lockRotation;
|
|
56
|
+
private _size;
|
|
57
|
+
private _camera;
|
|
58
|
+
private _plane;
|
|
59
|
+
private _tempVector1;
|
|
60
|
+
private _tempVector2;
|
|
61
|
+
private _tempTarget;
|
|
62
|
+
private readonly down;
|
|
63
|
+
/**
|
|
64
|
+
* Gets or sets whether the minimap rotation is locked.
|
|
65
|
+
* When rotation is locked, the minimap will always face the same direction as the camera.
|
|
66
|
+
*/
|
|
67
|
+
get lockRotation(): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Sets whether the minimap rotation is locked.
|
|
70
|
+
* When rotation is locked, the minimap will always face the same direction as the camera.
|
|
71
|
+
* @param active - If `true`, rotation is locked. If `false`, rotation is not locked.
|
|
72
|
+
*/
|
|
73
|
+
set lockRotation(active: boolean);
|
|
74
|
+
/**
|
|
75
|
+
* Gets the current zoom level of the minimap.
|
|
76
|
+
* The zoom level determines how much of the world is visible on the minimap.
|
|
77
|
+
* @returns The current zoom level of the minimap.
|
|
78
|
+
*/
|
|
79
|
+
get zoom(): number;
|
|
80
|
+
/**
|
|
81
|
+
* Sets the zoom level of the minimap.
|
|
82
|
+
* The zoom level determines how much of the world is visible on the minimap.
|
|
83
|
+
* @param value - The new zoom level of the minimap.
|
|
84
|
+
*/
|
|
85
|
+
set zoom(value: number);
|
|
86
|
+
constructor(world: World, components: Components);
|
|
87
|
+
/** {@link Disposable.dispose} */
|
|
88
|
+
dispose(): void;
|
|
89
|
+
/** Returns the camera used by the MiniMap */
|
|
90
|
+
get(): THREE.OrthographicCamera;
|
|
91
|
+
/** {@link Updateable.update} */
|
|
92
|
+
update(): void;
|
|
93
|
+
/** {@link Resizeable.getSize} */
|
|
94
|
+
getSize(): THREE.Vector2;
|
|
95
|
+
/** {@link Resizeable.resize} */
|
|
96
|
+
resize(size?: THREE.Vector2): void;
|
|
97
|
+
/** {@link Configurable.setup} */
|
|
98
|
+
setup(config?: Partial<MiniMapConfig>): void;
|
|
99
|
+
private updatePlanes;
|
|
100
|
+
}
|
|
@@ -25,6 +25,7 @@ export declare class Viewpoints extends Component implements Disposable, Configu
|
|
|
25
25
|
setup(): void;
|
|
26
26
|
onSetup: Event<unknown>;
|
|
27
27
|
config: ViewpointsConfigManager;
|
|
28
|
+
/** {@link Disposable.onDisposed} */
|
|
28
29
|
readonly onDisposed: Event<unknown>;
|
|
29
30
|
/**
|
|
30
31
|
* Disposes of the Viewpoints component and its associated resources.
|
|
@@ -19,6 +19,9 @@ export interface ViewpointPerspectiveCamera extends ViewpointCamera {
|
|
|
19
19
|
export interface ViewpointOrthographicCamera extends ViewpointCamera {
|
|
20
20
|
viewToWorldScale: number;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Represents a viewpoint in a BCF file.
|
|
24
|
+
*/
|
|
22
25
|
export interface BCFViewpoint {
|
|
23
26
|
title?: string;
|
|
24
27
|
guid: string;
|
|
@@ -5,13 +5,21 @@ import { CameraProjection } from "../../OrthoPerspectiveCamera";
|
|
|
5
5
|
import { Components } from "../../Components";
|
|
6
6
|
import { DataMap, DataSet, World } from "../../Types";
|
|
7
7
|
import { SimplePlane } from "../../Clipper";
|
|
8
|
+
/**
|
|
9
|
+
* Represents a BCF compliant viewpoint from BuildingSMART.
|
|
10
|
+
*
|
|
11
|
+
* The Viewpoint class provides methods for managing and interacting with viewpoints.
|
|
12
|
+
* It includes functionality for setting viewpoint properties, updating the camera,
|
|
13
|
+
* applying color to components, and serializing the viewpoint for export.
|
|
14
|
+
*/
|
|
8
15
|
export declare class Viewpoint implements BCFViewpoint {
|
|
9
16
|
title?: string;
|
|
10
|
-
guid: string;
|
|
17
|
+
readonly guid: string;
|
|
11
18
|
/**
|
|
12
19
|
* ClippingPlanes can be used to define a subsection of a building model that is related to the topic.
|
|
13
20
|
* Each clipping plane is defined by Location and Direction.
|
|
14
21
|
* The Direction vector points in the invisible direction meaning the half-space that is clipped.
|
|
22
|
+
* @experimental
|
|
15
23
|
*/
|
|
16
24
|
clippingPlanes: DataSet<SimplePlane>;
|
|
17
25
|
camera: ViewpointPerspectiveCamera | ViewpointOrthographicCamera;
|
|
@@ -114,14 +122,13 @@ export declare class Viewpoint implements BCFViewpoint {
|
|
|
114
122
|
* Adds components to the viewpoint based on the provided fragment ID map.
|
|
115
123
|
*
|
|
116
124
|
* @param fragmentIdMap - A map containing fragment IDs as keys and arrays of express IDs as values.
|
|
117
|
-
*
|
|
118
|
-
* @returns A Promise that resolves when the components have been added to the viewpoint.
|
|
119
125
|
*/
|
|
120
|
-
addComponentsFromMap(fragmentIdMap: FRAGS.FragmentIdMap):
|
|
126
|
+
addComponentsFromMap(fragmentIdMap: FRAGS.FragmentIdMap): void;
|
|
121
127
|
/**
|
|
122
|
-
*
|
|
128
|
+
* Replace the properties of the viewpoint with the provided data.
|
|
123
129
|
*
|
|
124
130
|
* @remarks The guid will be ommited as it shouldn't change after it has been initially set.
|
|
131
|
+
* @remarks The existing selection and exception components will be fully replaced in case new ones are provided.
|
|
125
132
|
*
|
|
126
133
|
* @param data - An object containing the properties to be set.
|
|
127
134
|
* The properties not included in the object will remain unchanged.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Disposable, Updateable, World, Event, BaseScene, BaseCamera, BaseRenderer } from "../Types";
|
|
1
|
+
import { Component, Disposable, Updateable, World, Event, BaseScene, BaseCamera, BaseRenderer, DataMap } from "../Types";
|
|
2
2
|
import { Components } from "../Components";
|
|
3
3
|
import { SimpleWorld } from "./src";
|
|
4
4
|
export * from "./src";
|
|
@@ -17,21 +17,11 @@ export declare class Worlds extends Component implements Updateable, Disposable
|
|
|
17
17
|
readonly onBeforeUpdate: Event<unknown>;
|
|
18
18
|
/** {@link Disposable.onDisposed} */
|
|
19
19
|
readonly onDisposed: Event<unknown>;
|
|
20
|
-
/**
|
|
21
|
-
* An event that is triggered when a new world is created.
|
|
22
|
-
* The event passes the newly created world as a parameter.
|
|
23
|
-
*/
|
|
24
|
-
readonly onWorldCreated: Event<World>;
|
|
25
|
-
/**
|
|
26
|
-
* An event that is triggered when a world is deleted.
|
|
27
|
-
* The event passes the UUID of the deleted world as a parameter.
|
|
28
|
-
*/
|
|
29
|
-
readonly onWorldDeleted: Event<string>;
|
|
30
20
|
/**
|
|
31
21
|
* A collection of worlds managed by this component.
|
|
32
22
|
* The key is the unique identifier (UUID) of the world, and the value is the World instance.
|
|
33
23
|
*/
|
|
34
|
-
list:
|
|
24
|
+
list: DataMap<string, World>;
|
|
35
25
|
/** {@link Component.enabled} */
|
|
36
26
|
enabled: boolean;
|
|
37
27
|
constructor(components: Components);
|
|
@@ -51,16 +41,12 @@ export declare class Worlds extends Component implements Updateable, Disposable
|
|
|
51
41
|
* @param {World} world - The world to be deleted.
|
|
52
42
|
*
|
|
53
43
|
* @throws {Error} - Throws an error if the provided world is not found in the list.
|
|
54
|
-
*
|
|
55
|
-
* @returns {void}
|
|
56
44
|
*/
|
|
57
45
|
delete(world: World): void;
|
|
58
46
|
/**
|
|
59
47
|
* Disposes of the Worlds component and all its managed worlds.
|
|
60
48
|
* This method sets the enabled flag to false, disposes of all worlds, clears the list,
|
|
61
49
|
* and triggers the onDisposed event.
|
|
62
|
-
*
|
|
63
|
-
* @returns {void}
|
|
64
50
|
*/
|
|
65
51
|
dispose(): void;
|
|
66
52
|
/** {@link Updateable.update} */
|
|
@@ -28,9 +28,9 @@ export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends Base
|
|
|
28
28
|
*/
|
|
29
29
|
enabled: boolean;
|
|
30
30
|
/**
|
|
31
|
-
* A unique identifier for the world.
|
|
31
|
+
* A unique identifier for the world. Is not meant to be changed at any moment.
|
|
32
32
|
*/
|
|
33
|
-
uuid: string;
|
|
33
|
+
readonly uuid: string;
|
|
34
34
|
/**
|
|
35
35
|
* An optional name for the world.
|
|
36
36
|
*/
|
|
@@ -14,7 +14,7 @@ export interface Classification {
|
|
|
14
14
|
* A class within the system.
|
|
15
15
|
* The key is the class name, and the value is an object containing a map of fragment IDs with extra information.
|
|
16
16
|
*/
|
|
17
|
-
[
|
|
17
|
+
[groupName: string]: {
|
|
18
18
|
map: FRAGS.FragmentIdMap;
|
|
19
19
|
name: string;
|
|
20
20
|
id: number | null;
|
|
@@ -108,6 +108,14 @@ export declare class FragmentsManager extends Component implements Disposable {
|
|
|
108
108
|
* @returns A fragment ID map, where the keys are fragment IDs and the values are the corresponding express IDs.
|
|
109
109
|
*/
|
|
110
110
|
guidToFragmentIdMap(guids: Iterable<string>): FRAGS.FragmentIdMap;
|
|
111
|
+
/**
|
|
112
|
+
* Converts a fragment ID map to a collection of IFC GUIDs.
|
|
113
|
+
*
|
|
114
|
+
* @param fragmentIdMap - A fragment ID map to be converted to a collection of IFC GUIDs.
|
|
115
|
+
*
|
|
116
|
+
* @returns An array of IFC GUIDs.
|
|
117
|
+
*/
|
|
118
|
+
fragmentIdMapToGuids(fragmentIdMap: FRAGS.FragmentIdMap): string[];
|
|
111
119
|
/**
|
|
112
120
|
* Applies coordinate transformation to the provided models.
|
|
113
121
|
* If no models are provided, all groups are used.
|
|
@@ -76,7 +76,7 @@ export declare class IfcLoader extends Component implements Disposable {
|
|
|
76
76
|
* const group = await ifcLoader.load(ifcData);
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
|
-
load(data: Uint8Array, coordinate?: boolean): Promise<FRAGS.FragmentsGroup>;
|
|
79
|
+
load(data: Uint8Array, coordinate?: boolean, name?: string): Promise<FRAGS.FragmentsGroup>;
|
|
80
80
|
/**
|
|
81
81
|
* Reads an IFC file and initializes the Web-IFC library.
|
|
82
82
|
*
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Component, Components } from "../../core";
|
|
2
|
+
import { IfcQueryGroup } from "./src/ifc-query-group";
|
|
3
|
+
import { IfcFinderQuery } from "./src";
|
|
4
|
+
export * from "./src";
|
|
5
|
+
/**
|
|
6
|
+
* Component to make text queries in the IFC.
|
|
7
|
+
*/
|
|
8
|
+
export declare class IfcFinder extends Component {
|
|
9
|
+
/**
|
|
10
|
+
* A unique identifier for the component.
|
|
11
|
+
* This UUID is used to register the component within the Components system.
|
|
12
|
+
*/
|
|
13
|
+
static readonly uuid: "0da7ad77-f734-42ca-942f-a074adfd1e3a";
|
|
14
|
+
/** {@link Component.enabled} */
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* List of all created {@link IfcQueryGroup} instances.
|
|
18
|
+
*/
|
|
19
|
+
list: Map<string, IfcQueryGroup>;
|
|
20
|
+
/**
|
|
21
|
+
* List of all queries from all created {@link IfcQueryGroup} instances.
|
|
22
|
+
*/
|
|
23
|
+
get queries(): Set<IfcFinderQuery>;
|
|
24
|
+
constructor(components: Components);
|
|
25
|
+
/**
|
|
26
|
+
* Imports all the query groups provided in the given data. You can generate this data to save the result of queries and persist it over time.
|
|
27
|
+
* @param data The data containing the serialized query groups to import.
|
|
28
|
+
*/
|
|
29
|
+
import(data: {
|
|
30
|
+
[groupID: string]: any;
|
|
31
|
+
}): void;
|
|
32
|
+
/**
|
|
33
|
+
* Exports all the query groups created. You can then import this data back using the import method.
|
|
34
|
+
*/
|
|
35
|
+
export(): {
|
|
36
|
+
[groupID: string]: any;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Creates a new {@link IfcQueryGroup}.
|
|
40
|
+
*/
|
|
41
|
+
create(): IfcQueryGroup;
|
|
42
|
+
/**
|
|
43
|
+
* Creates the {@link IfcQueryGroup} with the given ID.
|
|
44
|
+
*/
|
|
45
|
+
delete(id: string): void;
|
|
46
|
+
/**
|
|
47
|
+
* Deletes all {@link IfcQueryGroup} instances.
|
|
48
|
+
*/
|
|
49
|
+
clear(): void;
|
|
50
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as FRAGS from "@thatopen/fragments";
|
|
2
|
+
import { IfcFinderRule, SerializedQuery } from "./types";
|
|
3
|
+
import { IfcFinderQuery } from "./ifc-finder-query";
|
|
4
|
+
import { Components } from "../../../core";
|
|
5
|
+
/**
|
|
6
|
+
* A query that checks the direct attributes of IFC items.
|
|
7
|
+
*/
|
|
8
|
+
export declare class IfcBasicQuery extends IfcFinderQuery {
|
|
9
|
+
/**
|
|
10
|
+
* {@link IfcFinderQuery.name}
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* The type of this query.
|
|
15
|
+
*/
|
|
16
|
+
static type: "IfcBasicQuery";
|
|
17
|
+
/**
|
|
18
|
+
* {@link IfcFinderQuery.items}
|
|
19
|
+
*/
|
|
20
|
+
get items(): FRAGS.FragmentIdMap;
|
|
21
|
+
constructor(components: Components, data: {
|
|
22
|
+
name: string;
|
|
23
|
+
rules: IfcFinderRule[];
|
|
24
|
+
inclusive: boolean;
|
|
25
|
+
});
|
|
26
|
+
/**
|
|
27
|
+
* {@link IfcFinderQuery.export}
|
|
28
|
+
*/
|
|
29
|
+
export(): SerializedQuery;
|
|
30
|
+
/**
|
|
31
|
+
* {@link IfcFinderQuery.update}
|
|
32
|
+
*/
|
|
33
|
+
update(modelID: string, file: File): Promise<void>;
|
|
34
|
+
protected findInLines(modelID: string, lines: string[]): void;
|
|
35
|
+
}
|