@xtctwins/tctwins-core 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/extras/ContextMenu/ContextMenu.d.ts +0 -2
- package/types/extras/PointerLens/PointerLens.d.ts +144 -0
- package/types/extras/PointerLens/index.d.ts +1 -0
- package/types/extras/index.d.ts +1 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +78 -56
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsMouseControl.d.ts +93 -0
- package/types/plugins/AngleMeasurementsPlugin/index.d.ts +2 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +86 -54
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.d.ts +71 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +16 -2
- package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +2 -0
- package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +0 -20
- package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +2 -0
- package/types/plugins/StoreyViewsPlugin/Storey.d.ts +22 -0
- package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +0 -34
- package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +12 -14
- package/types/plugins/TreeViewPlugin/renderService.d.ts +128 -0
- package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +235 -239
- package/types/viewer/Configs.d.ts +26 -0
- package/types/viewer/Viewer.d.ts +5 -5
- package/types/viewer/metadata/MetaScene.d.ts +2 -2
- package/types/viewer/scene/Bitmap/Bitmap.d.ts +255 -0
- package/types/viewer/scene/Bitmap/index.d.ts +1 -0
- package/types/viewer/scene/LineSet/LineSet.d.ts +114 -0
- package/types/viewer/scene/LineSet/index.d.ts +1 -0
- package/types/viewer/scene/index.d.ts +3 -3
- package/types/viewer/scene/input/input.d.ts +0 -5
- package/types/viewer/scene/math/math.d.ts +4 -47
- package/types/viewer/scene/mesh/Mesh.d.ts +7 -0
- package/types/viewer/scene/scene/Scene.d.ts +1 -28
- package/types/viewer/scene/webgl/PickResult.d.ts +12 -0
|
@@ -4,8 +4,6 @@ import { Viewer } from "../../viewer/Viewer";
|
|
|
4
4
|
export declare type FastNavPluginConfiguration = {
|
|
5
5
|
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
6
6
|
id?: string;
|
|
7
|
-
/** Whether to temporarily hide color textures whenever we interact with the Viewer. */
|
|
8
|
-
hideColorTexture?: boolean;
|
|
9
7
|
/** Whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer. */
|
|
10
8
|
hidePBR?: boolean;
|
|
11
9
|
/** Whether to temporarily hide scalable ambient occlusion (SAO) whenever we interact with the Viewer. */
|
|
@@ -37,24 +35,6 @@ export declare class FastNavPlugin extends Plugin {
|
|
|
37
35
|
*/
|
|
38
36
|
constructor(viewer: Viewer, cfg?: FastNavPluginConfiguration);
|
|
39
37
|
|
|
40
|
-
/**
|
|
41
|
-
* Gets whether to temporarily hide color textures whenever we interact with the Viewer.
|
|
42
|
-
*
|
|
43
|
-
* Default is ````true````.
|
|
44
|
-
*
|
|
45
|
-
* @return {Boolean} ````true```` if hiding color textures.
|
|
46
|
-
*/
|
|
47
|
-
get hideColorTexture(): boolean;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Sets whether to temporarily hide color textures whenever we interact with the Viewer.
|
|
51
|
-
*
|
|
52
|
-
* Default is ````true````.
|
|
53
|
-
*
|
|
54
|
-
* @param {Boolean} hideColorTexture ````true```` to hide color textures.
|
|
55
|
-
*/
|
|
56
|
-
set hideColorTexture(hideColorTexture: boolean);
|
|
57
|
-
|
|
58
38
|
/**
|
|
59
39
|
* Sets whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer.
|
|
60
40
|
*
|
|
@@ -34,6 +34,8 @@ export declare type NavCubePluginConfiguration = {
|
|
|
34
34
|
bottomColor?: string;
|
|
35
35
|
/** Custom color for highlighting regions on the NavCube as we hover the pointer over them. */
|
|
36
36
|
hoverColor?: string;
|
|
37
|
+
/** Custom text color for labels of the NavCube. */
|
|
38
|
+
textColor?: string;
|
|
37
39
|
/** Sets whether the axis, corner and edge-aligned views will fit the view to the entire {@link Scene} or just to visible object-{@link Entity}s. Entitys are visible objects when {@link Entity.isObject} and {@link Entity.visible} are both ````true````. */
|
|
38
40
|
fitVisible?: boolean;
|
|
39
41
|
/** Sets whether the NavCube switches between perspective and orthographic projections in synchrony with the {@link Camera}. When ````false````, the NavCube will always be rendered with perspective projection. */
|
|
@@ -39,6 +39,28 @@ export declare class Storey {
|
|
|
39
39
|
*/
|
|
40
40
|
aabb: number[];
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Axis-aligned World-space boundary of the {@link Entity}s that represent the IfcBuildingStorey.
|
|
44
|
+
*
|
|
45
|
+
* The boundary is a six-element Float32Array containing the min/max extents of the
|
|
46
|
+
* axis-aligned boundary, ie. ````[xmin, ymin, zmin, xmax, ymax, zmax]````
|
|
47
|
+
*
|
|
48
|
+
* @property storeyAABB
|
|
49
|
+
* @type {Number[]}
|
|
50
|
+
*/
|
|
51
|
+
storeyAABB :number[];
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Axis-aligned World-space boundary of the {@link Entity}s that represent the model.
|
|
55
|
+
*
|
|
56
|
+
* The boundary is a six-element Float32Array containing the min/max extents of the
|
|
57
|
+
* axis-aligned boundary, ie. ````[xmin, ymin, zmin, xmax, ymax, zmax]````
|
|
58
|
+
*
|
|
59
|
+
* @property modelAABB
|
|
60
|
+
* @type {Number[]}
|
|
61
|
+
*/
|
|
62
|
+
modelAABB : number[];
|
|
63
|
+
|
|
42
64
|
/** Number of {@link Entity}s within the IfcBuildingStorey.
|
|
43
65
|
*
|
|
44
66
|
* @type {Number}
|
|
@@ -3,19 +3,9 @@ import { Plugin, Viewer } from "../../viewer";
|
|
|
3
3
|
import { Storey } from "./Storey";
|
|
4
4
|
import { StoreyMap } from "./StoreyMap";
|
|
5
5
|
|
|
6
|
-
export declare type IFCStoreyPlanObjectStates = {
|
|
7
|
-
[key: string] : {
|
|
8
|
-
visible: boolean;
|
|
9
|
-
edges?: boolean;
|
|
10
|
-
colorize?: number[]
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
6
|
export declare type StoreyViewsPluginConfiguration = {
|
|
15
7
|
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
16
8
|
id?: string;
|
|
17
|
-
/** Map of visual states for the {@link Entity}s as rendered within each {@link Storey}. Default value is {@link IFCStoreyPlanObjectStates}. */
|
|
18
|
-
objectStates?: IFCStoreyPlanObjectStates;
|
|
19
9
|
};
|
|
20
10
|
|
|
21
11
|
/**
|
|
@@ -50,24 +40,6 @@ export declare class StoreyViewsPlugin extends Plugin {
|
|
|
50
40
|
*/
|
|
51
41
|
modelStoreys: {[key: string]: { [key: string]: Storey} };
|
|
52
42
|
|
|
53
|
-
/**
|
|
54
|
-
* Sets map of visual states for the {@link Entity}s as rendered within each {@link Storey}.
|
|
55
|
-
*
|
|
56
|
-
* Default value is {@link IFCStoreyPlanObjectStates}.
|
|
57
|
-
*
|
|
58
|
-
* @type {IFCStoreyPlanObjectStates}
|
|
59
|
-
*/
|
|
60
|
-
set objectStates(arg: IFCStoreyPlanObjectStates);
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Gets map of visual states for the {@link Entity}s as rendered within each {@link Storey}.
|
|
64
|
-
*
|
|
65
|
-
* Default value is {@link IFCStoreyPlanObjectStates}.
|
|
66
|
-
*
|
|
67
|
-
* @type {IFCStoreyPlanObjectStates}
|
|
68
|
-
*/
|
|
69
|
-
get objectStates(): IFCStoreyPlanObjectStates;
|
|
70
|
-
|
|
71
43
|
/**
|
|
72
44
|
* Arranges the {@link Camera} for a 3D orthographic view of the {@link Entity}s within the given storey.
|
|
73
45
|
*
|
|
@@ -88,20 +60,14 @@ export declare class StoreyViewsPlugin extends Plugin {
|
|
|
88
60
|
*
|
|
89
61
|
* Optionally hides all other Entitys.
|
|
90
62
|
*
|
|
91
|
-
* Optionally sets the visual appearance of each of the Entitys according to its IFC type. The appearance of
|
|
92
|
-
* IFC types in plan views is configured by {@link StoreyViewsPlugin.objectStates}.
|
|
93
|
-
*
|
|
94
63
|
* See also: {@link ObjectsMemento}, which saves and restores a memento of the visual state
|
|
95
64
|
* of the {@link Entity}'s that represent objects within a {@link Scene}.
|
|
96
65
|
*
|
|
97
66
|
* @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
|
|
98
67
|
* @param {*} [options] Options for showing the Entitys within the storey.
|
|
99
|
-
* @param {Boolean} [options.hideOthers=false] When ````true````, hide all other {@link Entity}s.
|
|
100
|
-
* @param {Boolean} [options.useObjectStates=false] When ````true````, apply the custom visibilities and appearances configured for IFC types in {@link StoreyViewsPlugin.objectStates}.
|
|
101
68
|
*/
|
|
102
69
|
showStoreyObjects(storeyId: string, options?: {
|
|
103
70
|
hideOthers?: boolean;
|
|
104
|
-
useObjectStates?: boolean
|
|
105
71
|
}): void;
|
|
106
72
|
|
|
107
73
|
/**
|
|
@@ -6,7 +6,6 @@ export declare class TreeViewNode {
|
|
|
6
6
|
* Globally unique node ID.
|
|
7
7
|
*
|
|
8
8
|
* @type {String}
|
|
9
|
-
* @abstract
|
|
10
9
|
*/
|
|
11
10
|
get nodeId(): string;
|
|
12
11
|
|
|
@@ -14,7 +13,6 @@ export declare class TreeViewNode {
|
|
|
14
13
|
* Title of the TreeViewNode.
|
|
15
14
|
*
|
|
16
15
|
* @type {String}
|
|
17
|
-
* @abstract
|
|
18
16
|
*/
|
|
19
17
|
get title(): string;
|
|
20
18
|
|
|
@@ -23,51 +21,51 @@ export declare class TreeViewNode {
|
|
|
23
21
|
*
|
|
24
22
|
* This is only defined if the TreeViewNode represents an object.
|
|
25
23
|
*
|
|
26
|
-
* @type {
|
|
27
|
-
|
|
24
|
+
* @type {String}
|
|
25
|
+
*/
|
|
26
|
+
get objectId(): string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Type of the corresponding {@link MetaObject}.
|
|
30
|
+
*
|
|
31
|
+
* @type {String}
|
|
28
32
|
*/
|
|
29
|
-
get
|
|
33
|
+
get type(): string;
|
|
30
34
|
|
|
31
35
|
/**
|
|
32
36
|
* The child TreeViewNodes.
|
|
33
37
|
*
|
|
34
38
|
* @type {Array}
|
|
35
|
-
* @abstract
|
|
36
39
|
*/
|
|
37
40
|
get children(): any[];
|
|
38
41
|
|
|
39
42
|
/** The parent TreeViewNode.
|
|
40
43
|
*
|
|
41
|
-
* @type {TreeViewNode}
|
|
42
|
-
* @abstract
|
|
44
|
+
* @type {TreeViewNode|null}
|
|
43
45
|
*/
|
|
44
|
-
get parent(): TreeViewNode;
|
|
46
|
+
get parent(): TreeViewNode | null;
|
|
45
47
|
|
|
46
48
|
/** The number of {@link Entity}s within the subtree of this TreeViewNode.
|
|
47
49
|
*
|
|
48
50
|
* @type {Number}
|
|
49
|
-
* @abstract
|
|
50
51
|
*/
|
|
51
52
|
get numEntities(): number;
|
|
52
53
|
|
|
53
54
|
/** The number of {@link Entity}s that are currently visible within the subtree of this TreeViewNode.
|
|
54
55
|
*
|
|
55
56
|
* @type {Number}
|
|
56
|
-
* @abstract
|
|
57
57
|
*/
|
|
58
58
|
get numVisibleEntities(): number;
|
|
59
59
|
|
|
60
60
|
/** Whether or not the TreeViewNode is currently checked.
|
|
61
61
|
*
|
|
62
62
|
* @type {Boolean}
|
|
63
|
-
* @abstract
|
|
64
63
|
*/
|
|
65
64
|
get checked(): boolean;
|
|
66
65
|
|
|
67
66
|
/** Whether or not the TreeViewNode is currently xrayed.
|
|
68
67
|
*
|
|
69
68
|
* @type {Boolean}
|
|
70
|
-
* @abstract
|
|
71
69
|
*/
|
|
72
|
-
|
|
70
|
+
get xrayed(): boolean;
|
|
73
71
|
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { TreeViewNode } from "./TreeViewNode";
|
|
2
|
+
type genericHandler = (event: any) => void;
|
|
3
|
+
|
|
4
|
+
export declare interface ITreeViewRenderService {
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Creates the root node element.
|
|
8
|
+
*/
|
|
9
|
+
createRootNode(): HTMLElement;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Creates a tree node element.
|
|
13
|
+
*
|
|
14
|
+
* @param node {TreeViewNode} The node.
|
|
15
|
+
* @param expandHandler {genericHandler} The handler for expanding the node.
|
|
16
|
+
* @param checkHandler {genericHandler} The handler for checking the node.
|
|
17
|
+
* @param contextmenuHandler {genericHandler} The handler for the context menu.
|
|
18
|
+
* @param titleClickHandler {genericHandler} The handler for the title click.
|
|
19
|
+
*
|
|
20
|
+
* @returns {HTMLElement} The tree node element.
|
|
21
|
+
*/
|
|
22
|
+
createNodeElement(node: TreeViewNode, expandHandler: genericHandler, checkHandler: genericHandler, contextmenuHandler: genericHandler, titleClickHandler: genericHandler): HTMLElement;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Creates a tree node element for a disabled node.
|
|
26
|
+
*
|
|
27
|
+
* @param rootName {String} The root name.
|
|
28
|
+
*
|
|
29
|
+
* @returns {HTMLElement} The disabled node element.
|
|
30
|
+
*/
|
|
31
|
+
createDisabledNodeElement(rootName: string): HTMLElement;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Adds the child nodes to the parent node.
|
|
35
|
+
*
|
|
36
|
+
* @param element {HTMLElement} The node element.
|
|
37
|
+
* @param nodes {Array<HTMLElement>} The children elements.
|
|
38
|
+
*/
|
|
39
|
+
addChildren(element: HTMLElement, nodes: Array<HTMLElement>): void;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Expands a node, changes the icon and changes the handlers.
|
|
43
|
+
*
|
|
44
|
+
* @param element {HTMLElement} The node element.
|
|
45
|
+
* @param expandHandler {genericHandler} The handler for expanding the node.
|
|
46
|
+
* @param collapseHandler {genericHandler} The handler for collapsing the node.
|
|
47
|
+
*/
|
|
48
|
+
expand(element: HTMLElement, expandHandler: genericHandler, collapseHandler: genericHandler): void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Collapses a node, changes the icon and changes the handlers.
|
|
52
|
+
*
|
|
53
|
+
* @param element {HTMLElement} The node element.
|
|
54
|
+
* @param expandHandler {genericHandler} The handler for expanding the node.
|
|
55
|
+
* @param collapseHandler {genericHandler} The handler for collapsing the node.
|
|
56
|
+
*/
|
|
57
|
+
collapse(element: HTMLElement, expandHandler: genericHandler, collapseHandler: genericHandler): void;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Returns whether the node is expanded.
|
|
61
|
+
*
|
|
62
|
+
* @param element {HTMLElement} The node element.
|
|
63
|
+
*
|
|
64
|
+
* @returns {Boolean} Whether the node is expanded.
|
|
65
|
+
*/
|
|
66
|
+
isExpanded(element: HTMLElement): boolean;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Returns the node id from the treeview element.
|
|
70
|
+
*
|
|
71
|
+
* @param element {HTMLElement} The node element.
|
|
72
|
+
*
|
|
73
|
+
* @returns {String} The node id.
|
|
74
|
+
*/
|
|
75
|
+
getId(element: HTMLElement): string | undefined;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Returns the node id from the checkbox element.
|
|
79
|
+
*
|
|
80
|
+
* @param element {HTMLElement} The node element.
|
|
81
|
+
*
|
|
82
|
+
* @returns {String} The node id.
|
|
83
|
+
*/
|
|
84
|
+
getIdFromCheckbox(element: HTMLElement): string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Returns the expand/collapse element.
|
|
88
|
+
*
|
|
89
|
+
* @param nodeId {String} The node id.
|
|
90
|
+
*
|
|
91
|
+
* @returns {HTMLElement} The expand/collapse element.
|
|
92
|
+
*/
|
|
93
|
+
getSwitchElement(nodeId: string): HTMLElement | null;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Returns the node's checkbox state.
|
|
97
|
+
*
|
|
98
|
+
* @param element {HTMLElement} The node element.
|
|
99
|
+
*
|
|
100
|
+
* @returns {Boolean} Whether the node is checked.
|
|
101
|
+
*/
|
|
102
|
+
isChecked(element: HTMLElement): boolean;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Sets the node's checkbox state.
|
|
106
|
+
*
|
|
107
|
+
* @param nodeId {String} The node id.
|
|
108
|
+
* @param checked {Boolean} Whether the node is checked.
|
|
109
|
+
*/
|
|
110
|
+
setCheckbox(nodeId: string, checked: boolean): void;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Sets the node's xrayed state.
|
|
114
|
+
*
|
|
115
|
+
* @param nodeId {String} The node is.
|
|
116
|
+
* @param xrayed {Boolean} Whether the node is xrayed.
|
|
117
|
+
*/
|
|
118
|
+
setXRayed(nodeId: string, xrayed: boolean): void;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Sets the node's highlight state.
|
|
122
|
+
* When the node is highlighted, it will be expanded and scrolled into view.
|
|
123
|
+
*
|
|
124
|
+
* @param nodeId {String} The node id.
|
|
125
|
+
* @param highlighted {Boolean} Whether the node is highlighted.
|
|
126
|
+
*/
|
|
127
|
+
setHighlighted(nodeId: string, highlighted: boolean): void;
|
|
128
|
+
}
|