@xtctwins/tctwins-core 1.0.5 → 1.0.7

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.
Files changed (28) hide show
  1. package/package.json +1 -1
  2. package/types/extras/PointerLens/PointerLens.d.ts +144 -0
  3. package/types/extras/PointerLens/index.d.ts +1 -0
  4. package/types/extras/index.d.ts +1 -0
  5. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +78 -56
  6. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsMouseControl.d.ts +93 -0
  7. package/types/plugins/AngleMeasurementsPlugin/index.d.ts +2 -0
  8. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +86 -54
  9. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.d.ts +71 -0
  10. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +16 -2
  11. package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +2 -0
  12. package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +2 -2
  13. package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +2 -0
  14. package/types/plugins/StoreyViewsPlugin/Storey.d.ts +22 -0
  15. package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +12 -14
  16. package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +9 -0
  17. package/types/plugins/TreeViewPlugin/renderService.d.ts +128 -0
  18. package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +235 -239
  19. package/types/viewer/Configs.d.ts +26 -0
  20. package/types/viewer/Viewer.d.ts +5 -5
  21. package/types/viewer/metadata/MetaScene.d.ts +1 -1
  22. package/types/viewer/scene/Bitmap/Bitmap.d.ts +255 -0
  23. package/types/viewer/scene/Bitmap/index.d.ts +1 -0
  24. package/types/viewer/scene/LineSet/LineSet.d.ts +114 -0
  25. package/types/viewer/scene/LineSet/index.d.ts +1 -0
  26. package/types/viewer/scene/index.d.ts +5 -2
  27. package/types/viewer/scene/mesh/Mesh.d.ts +7 -0
  28. package/types/viewer/scene/webgl/PickResult.d.ts +12 -0
@@ -45,7 +45,7 @@ export declare class FastNavPlugin extends Plugin {
45
45
  * @return {Boolean} ````true```` if hiding color textures.
46
46
  */
47
47
  get hideColorTexture(): boolean;
48
-
48
+
49
49
  /**
50
50
  * Sets whether to temporarily hide color textures whenever we interact with the Viewer.
51
51
  *
@@ -53,7 +53,7 @@ export declare class FastNavPlugin extends Plugin {
53
53
  *
54
54
  * @param {Boolean} hideColorTexture ````true```` to hide color textures.
55
55
  */
56
- set hideColorTexture(hideColorTexture: boolean);
56
+ set hideColorTexture(hideColorTexture: boolean);
57
57
 
58
58
  /**
59
59
  * Sets whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer.
@@ -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}
@@ -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 {Number|String}
27
- * @abstract
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 objectId(): string | number;
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
- get xrayed(): boolean;
70
+ get xrayed(): boolean;
73
71
  }
@@ -49,6 +49,15 @@ export declare class TreeViewPlugin extends Plugin {
49
49
  */
50
50
  get hierarchy(): "containment" | "storeys" | "types";
51
51
 
52
+ /**
53
+ * Returns the map of {@link ModelTreeView}s.
54
+ *
55
+ * Each ModelTreeView is mapped to the ID of its model.
56
+ *
57
+ * @return {*|{}}
58
+ */
59
+ get modelTreeViews(): any;
60
+
52
61
  /**
53
62
  * Adds a model to this tree view.
54
63
  *
@@ -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
+ }