@xtctwins/tctwins-core 1.0.27 → 1.0.28
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
CHANGED
|
@@ -2,102 +2,132 @@ import { Plugin, Viewer } from "../../viewer";
|
|
|
2
2
|
import { SectionPlane } from "../../viewer/scene/sectionPlane";
|
|
3
3
|
|
|
4
4
|
export declare type SectionPlanesPluginConfiguration = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** ID of a canvas element to display the overview. */
|
|
8
|
+
overviewCanvasId?: string;
|
|
9
|
+
/** Initial visibility of the overview canvas. */
|
|
10
|
+
overviewVisible?: boolean;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* SectionPlanesPlugin is a {@link Viewer} plugin that manages {@link SectionPlane}s.
|
|
15
15
|
*/
|
|
16
16
|
export declare class SectionPlanesPlugin extends Plugin {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
17
|
+
/**
|
|
18
|
+
* @constructor
|
|
19
|
+
* @param {Viewer} viewer The Viewer.
|
|
20
|
+
* @param {SectionPlanesPluginConfiguration} cfg Plugin configuration.
|
|
21
|
+
*/
|
|
22
|
+
constructor(viewer: Viewer, cfg?: SectionPlanesPluginConfiguration);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Sets if the overview canvas is visible.
|
|
26
|
+
*
|
|
27
|
+
* @param {Boolean} visible Whether or not the overview canvas is visible.
|
|
28
|
+
*/
|
|
29
|
+
setOverviewVisible(visible: boolean): void;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Gets if the overview canvas is visible.
|
|
33
|
+
*
|
|
34
|
+
* @return {Boolean} True when the overview canvas is visible.
|
|
35
|
+
*/
|
|
36
|
+
getOverviewVisible(): boolean;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Returns a map of the {@link SectionPlane}s created by this SectionPlanesPlugin.
|
|
40
|
+
*
|
|
41
|
+
* @returns {{String:SectionPlane}} A map containing the {@link SectionPlane}s, each mapped to its {@link SectionPlane.id}.
|
|
42
|
+
*/
|
|
43
|
+
get sectionPlanes(): { [key: string]: SectionPlane };
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 设置是否是触屏模式
|
|
47
|
+
* @param {boolean} touch
|
|
48
|
+
*/
|
|
49
|
+
set isTouch(touch: boolean);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 设置剖切方式
|
|
53
|
+
* @param {string} way
|
|
54
|
+
*/
|
|
55
|
+
set sectionWay(way: string);
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 设置剖切面方向
|
|
59
|
+
* @param {number} direction
|
|
60
|
+
*/
|
|
61
|
+
set sectionDirection(direction: number);
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* 设置剖切对象样式
|
|
65
|
+
* @param {any} cfg
|
|
66
|
+
* @param {number} cfg.planeSize?
|
|
67
|
+
* @param {number} cfg.controlSize?
|
|
68
|
+
* @param {number} cfg.planeOpacity?
|
|
69
|
+
* @param {number[]} cfg.controlFillColor?
|
|
70
|
+
* @param {number[]} cfg.controlEdgeColor?
|
|
71
|
+
*/
|
|
72
|
+
set sectionConfigs(cfg: any);
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* 设置剖切面位置
|
|
76
|
+
* @param pos
|
|
77
|
+
*/
|
|
78
|
+
setControlPos(posRate: number): void;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Creates a {@link SectionPlane}.
|
|
82
|
+
*
|
|
83
|
+
* The {@link SectionPlane} will be registered by {@link SectionPlane.id} in {@link SectionPlanesPlugin.sectionPlanes}.
|
|
84
|
+
*
|
|
85
|
+
* @param {Object} params {@link SectionPlane} configuration.
|
|
86
|
+
* @param {String} [params.id] Unique ID to assign to the {@link SectionPlane}. Must be unique among all components in the {@link Viewer}'s {@link Scene}. Auto-generated when omitted.
|
|
87
|
+
* @param {Number[]} [params.pos=[0,0,0]] World-space position of the {@link SectionPlane}.
|
|
88
|
+
* @param {Number[]} [params.dir=[0,0,-1]] World-space vector indicating the orientation of the {@link SectionPlane}.
|
|
89
|
+
* @param {Boolean} [params.active=true] Whether the {@link SectionPlane} is initially active. Only clips while this is true.
|
|
90
|
+
* @returns {SectionPlane} The new {@link SectionPlane}.
|
|
91
|
+
*/
|
|
92
|
+
createSectionPlane(params?: { id?: string; pos?: number[]; dir?: number[]; active?: boolean }): SectionPlane;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Inverts the direction of {@link SectionPlane.dir} on every existing SectionPlane.
|
|
96
|
+
*
|
|
97
|
+
* Inverts all SectionPlanes, including those that were not created with SectionPlanesPlugin.
|
|
98
|
+
*/
|
|
99
|
+
flipSectionPlanes(): void;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Shows the 3D editing gizmo for a {@link SectionPlane}.
|
|
103
|
+
*
|
|
104
|
+
* @param {String} id ID of the {@link SectionPlane}.
|
|
105
|
+
*/
|
|
106
|
+
showControl(id: string): void;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Gets the ID of the {@link SectionPlane} that the 3D editing gizmo is shown for.
|
|
110
|
+
*
|
|
111
|
+
* Returns ````null```` when the editing gizmo is not shown.
|
|
112
|
+
*
|
|
113
|
+
* @returns {String} ID of the the {@link SectionPlane} that the 3D editing gizmo is shown for, if shown, else ````null````.
|
|
114
|
+
*/
|
|
115
|
+
getShownControl(): string;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Hides the 3D {@link SectionPlane} editing gizmo if shown.
|
|
119
|
+
*/
|
|
120
|
+
hideControl(): void;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Destroys a {@link SectionPlane} created by this SectionPlanesPlugin.
|
|
124
|
+
*
|
|
125
|
+
* @param {String} id ID of the {@link SectionPlane}.
|
|
126
|
+
*/
|
|
127
|
+
destroySectionPlane(id: string): void;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Destroys all {@link SectionPlane}s created by this SectionPlanesPlugin.
|
|
131
|
+
*/
|
|
132
|
+
clear(): void;
|
|
103
133
|
}
|