@xtctwins/tctwins-core 1.0.19 → 1.0.20

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xtctwins/tctwins-core",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "private": false,
5
5
  "description": "Web Programming Toolkit for 3D/2D BIM and CAD",
6
6
  "module": "./dist/tctwins-core.es.js",
@@ -68,4 +68,4 @@
68
68
  "/dist",
69
69
  "/types"
70
70
  ]
71
- }
71
+ }
@@ -0,0 +1,51 @@
1
+ import { Viewer } from "../../viewer";
2
+ export class PointerCircle {
3
+ /**
4
+ * Constructs a new PointerCircle.
5
+ *
6
+ * @param {Viewer} viewer The Viewer instance.
7
+ * @param {Object} [cfg] PointerCircle configuration.
8
+ * @param {boolean} [cfg.active=true] Whether PointerCircle is active. The PointerCircle can only be shown when this is `true` (default).
9
+ * @param {number} [cfg.zoomFactor=2] The zoom factor for the lens.
10
+ */
11
+ constructor(
12
+ viewer: Viewer,
13
+ cfg?: {
14
+ active?: boolean;
15
+ zoomFactor?: number;
16
+ }
17
+ );
18
+
19
+ /**
20
+ * Show the circle at the given canvas coordinates and begin shrinking it.
21
+ */
22
+ start(circlePos: any): void;
23
+
24
+ /**
25
+ * Stop the shricking circle and hide it.
26
+ */
27
+ stop(): void;
28
+
29
+ /**
30
+ * Sets the zoom factor for the lens.
31
+ *
32
+ * This is `2` by default.
33
+ *
34
+ * @param durationMs
35
+ */
36
+ set durationMs(durationMs: number);
37
+
38
+ /**
39
+ * Gets the zoom factor for the lens.
40
+ *
41
+ * This is `2` by default.
42
+ *
43
+ * @returns Number
44
+ */
45
+ get durationMs(): number;
46
+
47
+ /**
48
+ * Destroys this PointerLens.
49
+ */
50
+ destroy(): void;
51
+ }
@@ -0,0 +1 @@
1
+ export * from "./PointerCircle";
@@ -1,2 +1,3 @@
1
1
  export * from "./ContextMenu";
2
2
  export * from "./PointerLens";
3
+ export * from "./PointerCircle";
@@ -110,4 +110,18 @@ export declare class AngleMeasurementsPlugin extends Plugin {
110
110
  * @param {Function} callback Callback fired on the event
111
111
  */
112
112
  on(event: "measurementDestroyed", callback: (measurement: AngleMeasurement) => void): void;
113
+
114
+ /**
115
+ * trigger when hover measure object
116
+ * @param event
117
+ * @param e
118
+ */
119
+ on(event: "mouseOver", e: any): void;
120
+
121
+ /**
122
+ * trigger when leave measure object
123
+ * @param event
124
+ * @param e
125
+ */
126
+ on(event: "mouseLeave", e: any): void;
113
127
  }
@@ -0,0 +1,117 @@
1
+ import { AngleMeasurementsControl } from "./AngleMeasurementsControl.js";
2
+ import { AngleMeasurementsPlugin } from "./AngleMeasurementsPlugin.js";
3
+ import { PointerLens } from "../../extras/PointerLens/PointerLens.js";
4
+ import { PointerCircle } from "../../extras/PointerCircle/PointerCircle.js";
5
+ /**
6
+ * Creates {@link AngleMeasurement}s in an {@link AngleMeasurementsPlugin} from mouse input.
7
+ *
8
+ * @example
9
+ * import { Viewer, XKTLoaderPlugin, AngleMeasurementsPlugin, AngleMeasurementsMouseControl, PointerLens } from "xeokit-sdk.es.js";
10
+ *
11
+ * const viewer = new Viewer({
12
+ * canvasId: "myCanvas",
13
+ * });
14
+ *
15
+ * viewer.camera.eye = [-3.93, 2.85, 27.01];
16
+ * viewer.camera.look = [4.40, 3.72, 8.89];
17
+ * viewer.camera.up = [-0.01, 0.99, 0.039];
18
+ *
19
+ * const xktLoader = new XKTLoaderPlugin(viewer);
20
+ *
21
+ * const sceneModel = xktLoader.load({
22
+ * id: "myModel",
23
+ * src: "Duplex.xkt"
24
+ * });
25
+ *
26
+ * const angleMeasurements = new AngleMeasurementsPlugin(viewer);
27
+ *
28
+ * const pointerLens = new PointerLens(viewer); // Create a PointerLens instance
29
+ *
30
+ * const angleMeasurementsMouseControl = new AngleMeasurementsMouseControl(angleMeasurements, {
31
+ * pointerLens: pointerLens,
32
+ * snapping: true
33
+ * });
34
+ *
35
+ * angleMeasurementsMouseControl.activate();
36
+ */
37
+ export class AngleMeasurementsTouchControl extends AngleMeasurementsControl {
38
+ /**
39
+ * Creates a AngleMeasurementsTouchControl bound to the given AngleMeasurementsPlugin.
40
+ * @param {PointerLens} [cfg.pointerLens] A PointerLens to use to provide a magnified view of the cursor when snapping is enabled.
41
+ * @param {boolean} [cfg.snapToEdge=true] Whether to initially enable snap-to-vertex and snap-to-edge for this AngleMeasurementsMouseControl.
42
+ * @param {boolean} [cfg.snapToVertex=true] Whether to initially enable snap-to-vertex and snap-to-edge for this AngleMeasurementsMouseControl.
43
+ * @param {_offsetX} [cfg._offsetX] _offsetX of the mouse
44
+ * @param {_offsetY} [cfg._offsetY] _offsetY of the mouse
45
+ */
46
+ constructor(
47
+ angleMeasurementsPlugin: AngleMeasurementsPlugin,
48
+ cfg?: {
49
+ pointerLens?: PointerLens;
50
+ snapToEdge?: boolean;
51
+ snapToVertex?: boolean;
52
+ offsetX?: number;
53
+ offsetY?: number;
54
+ }
55
+ );
56
+
57
+ /**
58
+ * @return {number} mouse offset
59
+ */
60
+ get offsetX(): number;
61
+
62
+ /**
63
+ * @param {number} offsetX
64
+ */
65
+ set offsetX(offsetX: number);
66
+
67
+ /**
68
+ * @return {number} mouse offset
69
+ */
70
+ get offsetY(): number;
71
+
72
+ /**
73
+ * @param {number} offsetY
74
+ */
75
+ set offsetY(offsetY: number);
76
+
77
+ /**
78
+ * Gets whether this AngleMeasurementsMouseControl is currently active, responding to input.
79
+ *
80
+ * @returns {boolean} True if active, false otherwise.
81
+ */
82
+ get active(): boolean;
83
+
84
+ /**
85
+ * Sets whether snap-to-vertex and snap-to-edge are enabled for this AngleMeasurementsMouseControl.
86
+ *
87
+ * @param {boolean} snapping True to enable snap-to-vertex and snap-to-edge, false to disable.
88
+ */
89
+ set snapping(snapping: boolean);
90
+
91
+ /**
92
+ * Gets whether snap-to-vertex and snap-to-edge are enabled for this AngleMeasurementsMouseControl.
93
+ *
94
+ * @returns {boolean} True if snap-to-vertex and snap-to-edge are enabled, false otherwise.
95
+ */
96
+ get snapping(): boolean;
97
+
98
+ /**
99
+ * Activates this AngleMeasurementsMouseControl, making it responsive to input.
100
+ */
101
+ activate(): void;
102
+
103
+ /**
104
+ * Deactivates this AngleMeasurementsMouseControl, making it unresponsive to input.
105
+ */
106
+ deactivate(): void;
107
+
108
+ /**
109
+ * Resets this AngleMeasurementsMouseControl, destroying any AngleMeasurement under construction.
110
+ */
111
+ reset(): void;
112
+
113
+ /**
114
+ * Destroys this AngleMeasurementsMouseControl.
115
+ */
116
+ destroy(): void;
117
+ }
@@ -1,3 +1,4 @@
1
1
  export * from "./AngleMeasurementsPlugin";
2
2
  export * from "./AngleMeasurementsControl";
3
- export * from "./AngleMeasurementsMouseControl";
3
+ export * from "./AngleMeasurementsMouseControl";
4
+ export * from "./AngleMeasurementsTouchControl";
@@ -1,5 +1,4 @@
1
1
  import { DistanceMeasurementsControl } from "./DistanceMeasurementsControl.js";
2
-
3
2
  import { DistanceMeasurementsPlugin } from "./DistanceMeasurementsPlugin";
4
3
  import { PointerLens } from "../../extras/PointerLens/PointerLens";
5
4
 
@@ -3,147 +3,160 @@ import { DistanceMeasurementsControl } from "./DistanceMeasurementsControl";
3
3
  import { DistanceMeasurement } from "./DistanceMeasurement";
4
4
 
5
5
  export declare type DistanceMeasurementsPluginConfiguration = {
6
- /** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
7
- id?: string;
8
- /** The minimum length, in pixels, of an axis wire beyond which its label is shown. */
9
- labelMinAxisLength?: number;
10
- /** Container DOM element for markers and labels. Defaults to ````document.body````. */
11
- container?: HTMLElement;
12
- /** The default value of the DistanceMeasurements `visible` property. */
13
- defaultVisible?: boolean;
14
- /** The default value of the DistanceMeasurements `originVisible` property. */
15
- defaultOriginVisible?: boolean;
16
- /** The default value of the DistanceMeasurements `targetVisible` property. */
17
- defaultTargetVisible?: boolean;
18
- /** The default value of the DistanceMeasurements `wireVisible` property. */
19
- defaultWireVisible?: boolean;
20
- /** The default value of the DistanceMeasurements `axisVisible` property. */
21
- defaultAxisVisible?: boolean;
22
- /** The default color of the length dots, wire and label. */
23
- defaultColor?: string;
24
- /** If set, the wires, dots and labels will have this zIndex (+1 for dots and +2 for labels). */
25
- zIndex?: number;
6
+ /** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
7
+ id?: string;
8
+ /** The minimum length, in pixels, of an axis wire beyond which its label is shown. */
9
+ labelMinAxisLength?: number;
10
+ /** Container DOM element for markers and labels. Defaults to ````document.body````. */
11
+ container?: HTMLElement;
12
+ /** The default value of the DistanceMeasurements `visible` property. */
13
+ defaultVisible?: boolean;
14
+ /** The default value of the DistanceMeasurements `originVisible` property. */
15
+ defaultOriginVisible?: boolean;
16
+ /** The default value of the DistanceMeasurements `targetVisible` property. */
17
+ defaultTargetVisible?: boolean;
18
+ /** The default value of the DistanceMeasurements `wireVisible` property. */
19
+ defaultWireVisible?: boolean;
20
+ /** The default value of the DistanceMeasurements `axisVisible` property. */
21
+ defaultAxisVisible?: boolean;
22
+ /** The default color of the length dots, wire and label. */
23
+ defaultColor?: string;
24
+ /** If set, the wires, dots and labels will have this zIndex (+1 for dots and +2 for labels). */
25
+ zIndex?: number;
26
26
  };
27
27
 
28
28
  /**
29
29
  * {@link Viewer} plugin for measuring point-to-point distances.
30
30
  */
31
31
  export declare class DistanceMeasurementsPlugin extends Plugin {
32
- /**
33
- * @constructor
34
- * @param {Viewer} viewer The Viewer.
35
- * @param {DistanceMeasurementsPluginConfiguration} [cfg] Plugin configuration.
36
- */
37
- constructor(viewer: Viewer, cfg?: DistanceMeasurementsPluginConfiguration);
38
-
39
- /**
40
- * Sets the minimum length, in pixels, of an axis wire beyond which its label is shown.
41
- *
42
- * The axis wire's label is not shown when its length is less than this value.
43
- *
44
- * This is ````25```` pixels by default.
45
- *
46
- * Must not be less than ````1````.
47
- *
48
- * @type {number}
49
- */
50
- set labelMinAxisLength(arg: number);
32
+ /**
33
+ * @constructor
34
+ * @param {Viewer} viewer The Viewer.
35
+ * @param {DistanceMeasurementsPluginConfiguration} [cfg] Plugin configuration.
36
+ */
37
+ constructor(viewer: Viewer, cfg?: DistanceMeasurementsPluginConfiguration);
51
38
 
52
- /**
53
- * Gets the minimum length, in pixels, of an axis wire beyond which its label is shown.
54
- * @returns {number}
55
- */
56
- get labelMinAxisLength(): number;
57
-
58
- /**
59
- * Gets the {@link DistanceMeasurementsControl}, which creates {@link DistanceMeasurement}s from user input.
60
- *
61
- * @type {DistanceMeasurementsControl}
62
- */
63
- get control(): DistanceMeasurementsControl;
39
+ /**
40
+ * Sets the minimum length, in pixels, of an axis wire beyond which its label is shown.
41
+ *
42
+ * The axis wire's label is not shown when its length is less than this value.
43
+ *
44
+ * This is ````25```` pixels by default.
45
+ *
46
+ * Must not be less than ````1````.
47
+ *
48
+ * @type {number}
49
+ */
50
+ set labelMinAxisLength(arg: number);
64
51
 
65
- /**
66
- * Gets the existing {@link DistanceMeasurement}s, each mapped to its {@link DistanceMeasurement.id}.
67
- *
68
- * @type {{String:DistanceMeasurement}}
69
- */
70
- get measurements(): { [key:string]: DistanceMeasurement };
52
+ /**
53
+ * Gets the minimum length, in pixels, of an axis wire beyond which its label is shown.
54
+ * @returns {number}
55
+ */
56
+ get labelMinAxisLength(): number;
71
57
 
72
- /**
73
- * Creates a {@link DistanceMeasurement}.
74
- *
75
- * The DistanceMeasurement is then registered by {@link DistanceMeasurement.id} in {@link DistanceMeasurementsPlugin.measurements}.
76
- *
77
- * @param {Object} params {@link DistanceMeasurement} configuration.
78
- * @param {String} params.id Unique ID to assign to {@link DistanceMeasurement.id}. The DistanceMeasurement will be registered by this in {@link DistanceMeasurementsPlugin.measurements} and {@link Scene.components}. Must be unique among all components in the {@link Viewer}.
79
- * @param {Number[]} params.origin.worldPos Origin World-space 3D position.
80
- * @param {Entity} params.origin.entity Origin Entity.
81
- * @param {Number[]} params.target.worldPos Target World-space 3D position.
82
- * @param {Entity} params.target.entity Target Entity.
83
- * @param {Boolean} [params.visible=true] Whether to initially show the {@link DistanceMeasurement}.
84
- * @param {Boolean} [params.originVisible=true] Whether to initially show the {@link DistanceMeasurement} origin.
85
- * @param {Boolean} [params.targetVisible=true] Whether to initially show the {@link DistanceMeasurement} target.
86
- * @param {Boolean} [params.wireVisible=true] Whether to initially show the direct point-to-point wire between {@link DistanceMeasurement.origin} and {@link DistanceMeasurement.target}.
87
- * @param {Boolean} [params.axisVisible=true] Whether to initially show the axis-aligned wires between {@link DistanceMeasurement.origin} and {@link DistanceMeasurement.target}.
88
- * @param {string} [params.color] The color of the length dot, wire and label.
89
- * @returns {DistanceMeasurement} The new {@link DistanceMeasurement}.
90
- */
91
- createMeasurement(params?: {
92
- id: string;
93
- origin: {
94
- entity: Entity;
95
- worldPos: number[];
96
- };
97
- target: {
98
- entity: Entity;
99
- worldPos: number[];
100
- };
101
- visible?: boolean;
102
- originVisible?: boolean;
103
- targetVisible?: boolean;
104
- wireVisible?: boolean;
105
- axisVisible?: boolean;
106
- color?: string;
107
- }): DistanceMeasurement;
108
-
109
- /**
110
- * Destroys a {@link DistanceMeasurement}.
111
- *
112
- * @param {String} id ID of DistanceMeasurement to destroy.
113
- */
114
- destroyMeasurement(id: string): void;
58
+ /**
59
+ * Gets the {@link DistanceMeasurementsControl}, which creates {@link DistanceMeasurement}s from user input.
60
+ *
61
+ * @type {DistanceMeasurementsControl}
62
+ */
63
+ get control(): DistanceMeasurementsControl;
115
64
 
116
- /**
117
- * Destroys all {@link DistanceMeasurement}s.
118
- */
119
- clear(): void;
65
+ /**
66
+ * Gets the existing {@link DistanceMeasurement}s, each mapped to its {@link DistanceMeasurement.id}.
67
+ *
68
+ * @type {{String:DistanceMeasurement}}
69
+ */
70
+ get measurements(): { [key: string]: DistanceMeasurement };
120
71
 
121
- /**
122
- * Fires when a measurement is created.
123
- * @param {String} event The measurementCreated event
124
- * @param {Function} callback Callback fired on the event
125
- */
126
- on(event: "measurementCreated", callback: (measurement: DistanceMeasurement)=> void): string;
72
+ /**
73
+ * Creates a {@link DistanceMeasurement}.
74
+ *
75
+ * The DistanceMeasurement is then registered by {@link DistanceMeasurement.id} in {@link DistanceMeasurementsPlugin.measurements}.
76
+ *
77
+ * @param {Object} params {@link DistanceMeasurement} configuration.
78
+ * @param {String} params.id Unique ID to assign to {@link DistanceMeasurement.id}. The DistanceMeasurement will be registered by this in {@link DistanceMeasurementsPlugin.measurements} and {@link Scene.components}. Must be unique among all components in the {@link Viewer}.
79
+ * @param {Number[]} params.origin.worldPos Origin World-space 3D position.
80
+ * @param {Entity} params.origin.entity Origin Entity.
81
+ * @param {Number[]} params.target.worldPos Target World-space 3D position.
82
+ * @param {Entity} params.target.entity Target Entity.
83
+ * @param {Boolean} [params.visible=true] Whether to initially show the {@link DistanceMeasurement}.
84
+ * @param {Boolean} [params.originVisible=true] Whether to initially show the {@link DistanceMeasurement} origin.
85
+ * @param {Boolean} [params.targetVisible=true] Whether to initially show the {@link DistanceMeasurement} target.
86
+ * @param {Boolean} [params.wireVisible=true] Whether to initially show the direct point-to-point wire between {@link DistanceMeasurement.origin} and {@link DistanceMeasurement.target}.
87
+ * @param {Boolean} [params.axisVisible=true] Whether to initially show the axis-aligned wires between {@link DistanceMeasurement.origin} and {@link DistanceMeasurement.target}.
88
+ * @param {string} [params.color] The color of the length dot, wire and label.
89
+ * @returns {DistanceMeasurement} The new {@link DistanceMeasurement}.
90
+ */
91
+ createMeasurement(params?: {
92
+ id: string;
93
+ origin: {
94
+ entity: Entity;
95
+ worldPos: number[];
96
+ };
97
+ target: {
98
+ entity: Entity;
99
+ worldPos: number[];
100
+ };
101
+ visible?: boolean;
102
+ originVisible?: boolean;
103
+ targetVisible?: boolean;
104
+ wireVisible?: boolean;
105
+ axisVisible?: boolean;
106
+ color?: string;
107
+ }): DistanceMeasurement;
127
108
 
128
- /**
129
- * Fires when a measurement is completed.
130
- * @param {String} event The measurementEnd event
131
- * @param {Function} callback Callback fired on the event
132
- */
133
- on(event: "measurementEnd", callback: (measurement: DistanceMeasurement)=> void): string;
109
+ /**
110
+ * Destroys a {@link DistanceMeasurement}.
111
+ *
112
+ * @param {String} id ID of DistanceMeasurement to destroy.
113
+ */
114
+ destroyMeasurement(id: string): void;
134
115
 
135
- /**
136
- * Fires when a measurement is cancelled.
137
- * @param {String} event The measurementCancel event
138
- * @param {Function} callback Callback fired on the event
139
- */
140
- on(event: "measurementCancel", callback: (measurement: DistanceMeasurement)=> void): string;
116
+ /**
117
+ * Destroys all {@link DistanceMeasurement}s.
118
+ */
119
+ clear(): void;
141
120
 
142
- /**
143
- * Fires when a measurement is destroyed.
144
- * @param {String} event The measurementDestroyed event
145
- * @param {Function} callback Callback fired on the event
146
- */
147
- on(event: "measurementDestroyed", callback: (measurement: DistanceMeasurement)=> void): string;
148
-
121
+ /**
122
+ * Fires when a measurement is created.
123
+ * @param {String} event The measurementCreated event
124
+ * @param {Function} callback Callback fired on the event
125
+ */
126
+ on(event: "measurementCreated", callback: (measurement: DistanceMeasurement) => void): string;
127
+
128
+ /**
129
+ * Fires when a measurement is completed.
130
+ * @param {String} event The measurementEnd event
131
+ * @param {Function} callback Callback fired on the event
132
+ */
133
+ on(event: "measurementEnd", callback: (measurement: DistanceMeasurement) => void): string;
134
+
135
+ /**
136
+ * Fires when a measurement is cancelled.
137
+ * @param {String} event The measurementCancel event
138
+ * @param {Function} callback Callback fired on the event
139
+ */
140
+ on(event: "measurementCancel", callback: (measurement: DistanceMeasurement) => void): string;
141
+
142
+ /**
143
+ * Fires when a measurement is destroyed.
144
+ * @param {String} event The measurementDestroyed event
145
+ * @param {Function} callback Callback fired on the event
146
+ */
147
+ on(event: "measurementDestroyed", callback: (measurement: DistanceMeasurement) => void): string;
148
+
149
+ /**
150
+ * trigger when hover measure object
151
+ * @param event
152
+ * @param e
153
+ */
154
+ on(event: "mouseOver", e: any): void;
155
+
156
+ /**
157
+ * trigger when leave measure object
158
+ * @param event
159
+ * @param e
160
+ */
161
+ on(event: "mouseLeave", e: any): void;
149
162
  }
@@ -0,0 +1,96 @@
1
+ import { DistanceMeasurementsControl } from "./DistanceMeasurementsControl.js";
2
+ import { DistanceMeasurementsPlugin } from "./DistanceMeasurementsPlugin.js";
3
+ import { PointerLens } from "../../extras/PointerLens/PointerLens.js";
4
+ import { PointerCircle } from "../../extras/PointerCircle/PointerCircle.js";
5
+
6
+ /**
7
+ * Creates {@link DistanceMeasurement}s in a {@link DistanceMeasurementsPlugin} from mouse input.
8
+ *
9
+ * @example
10
+ * // Usage
11
+ * const distanceMeasurementsControl = new DistanceMeasurementsMouseControl(distanceMeasurementsPlugin, {
12
+ * pointerLens: new PointerLens(viewer),
13
+ * snapping: true
14
+ * });
15
+ */
16
+ export class DistanceMeasurementsTouchControl extends DistanceMeasurementsControl {
17
+ /**
18
+ * Creates a DistanceMeasurementsTouchControl bound to the given DistanceMeasurementsPlugin.
19
+ * @param {PointerLens} [cfg.pointerLens] A PointerLens to use to provide a magnified view of the cursor when snapping is enabled.
20
+ * @param {boolean} [cfg.snapToEdge=true] Whether to initially enable snap-to-vertex and snap-to-edge for this DistanceMeasurementsTouchControl.
21
+ * @param {boolean} [cfg.snapToVertex=true] Whether to initially enable snap-to-vertex and snap-to-edge for this DistanceMeasurementsTouchControl.
22
+ * @param {_offsetX} [cfg._offsetX] _offsetX of the mouse
23
+ * @param {_offsetY} [cfg._offsetY] _offsetY of the mouse
24
+ */
25
+ constructor(
26
+ distanceMeasurementsPlugin: DistanceMeasurementsPlugin,
27
+ cfg?: {
28
+ pointerLens?: PointerLens;
29
+ snapToEdge?: boolean;
30
+ snapToVertex?: boolean;
31
+ offsetX?: number;
32
+ offsetY?: number;
33
+ }
34
+ );
35
+
36
+ /**
37
+ * @return {number} mouse offset
38
+ */
39
+ get offsetX(): number;
40
+
41
+ /**
42
+ * @param {number} offsetX
43
+ */
44
+ set offsetX(offsetX: number);
45
+
46
+ /**
47
+ * @return {number} mouse offset
48
+ */
49
+ get offsetY(): number;
50
+
51
+ /**
52
+ * @param {number} offsetY
53
+ */
54
+ set offsetY(offsetY: number);
55
+
56
+ /**
57
+ * Gets whether this DistanceMeasurementsTouchControl is currently active, responding to input.
58
+ *
59
+ * @returns {boolean} True if active, false otherwise.
60
+ */
61
+ get active(): boolean;
62
+
63
+ /**
64
+ * Sets whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsTouchControl.
65
+ *
66
+ * @param {boolean} snapping True to enable snap-to-vertex and snap-to-edge, false to disable.
67
+ */
68
+ set snapping(snapping: boolean);
69
+
70
+ /**
71
+ * Gets whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsTouchControl.
72
+ *
73
+ * @returns {boolean} True if snap-to-vertex and snap-to-edge are enabled, false otherwise.
74
+ */
75
+ get snapping(): boolean;
76
+
77
+ /**
78
+ * Activates this DistanceMeasurementsTouchControl, making it responsive to input.
79
+ */
80
+ activate(): void;
81
+
82
+ /**
83
+ * Deactivates this DistanceMeasurementsTouchControl, making it unresponsive to input.
84
+ */
85
+ deactivate(): void;
86
+
87
+ /**
88
+ * Resets this DistanceMeasurementsTouchControl, destroying any DistanceMeasurement under construction.
89
+ */
90
+ reset(): void;
91
+
92
+ /**
93
+ * Destroys this DistanceMeasurementsTouchControl.
94
+ */
95
+ destroy(): void;
96
+ }
@@ -1,3 +1,4 @@
1
1
  export * from "./DistanceMeasurementsPlugin";
2
2
  export * from "./DistanceMeasurementsControl";
3
3
  export * from "./DistanceMeasurementsMouseControl";
4
+ export * from "./DistanceMeasurementsTouchControl";