@xtctwins/tctwins-core 1.0.16 → 1.0.17

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.16",
3
+ "version": "1.0.17",
4
4
  "private": false,
5
5
  "description": "Web Programming Toolkit for 3D/2D BIM and CAD",
6
6
  "module": "./dist/tctwins-core.es.js",
@@ -1,7 +1,7 @@
1
1
  import { AngleMeasurementsControl } from "./AngleMeasurementsControl.js";
2
2
  import { math } from "../../viewer/scene/math/math.js";
3
- import {AngleMeasurementsPlugin} from "./AngleMeasurementsPlugin";
4
- import {PointerLens} from "../../extras/PointerLens/PointerLens";
3
+ import { AngleMeasurementsPlugin } from "./AngleMeasurementsPlugin";
4
+ import { PointerLens } from "../../extras/PointerLens/PointerLens";
5
5
 
6
6
  /**
7
7
  * Creates {@link AngleMeasurement}s in an {@link AngleMeasurementsPlugin} from mouse input.
@@ -36,58 +36,82 @@ import {PointerLens} from "../../extras/PointerLens/PointerLens";
36
36
  * angleMeasurementsMouseControl.activate();
37
37
  */
38
38
  export class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
39
+ /**
40
+ * Creates a new AngleMeasurementsMouseControl.
41
+ *
42
+ * @param {AngleMeasurementsPlugin} angleMeasurementsPlugin The AngleMeasurementsPlugin to control.
43
+ * @param {Object} [cfg] Configuration options.
44
+ * @param {PointerLens} [cfg.pointerLens] A PointerLens to use for providing a magnified view of the cursor when snapping is enabled.
45
+ * @param {boolean} [cfg.snapping=true] Whether to initially enable snap-to-vertex and snap-to-edge for this AngleMeasurementsMouseControl.
46
+ * @param {offsetX} [cfg.offsetX] offsetX of the mouse
47
+ * @param {offsetY} [cfg.offsetY] offsetY of the mouse
48
+ */
49
+ constructor(
50
+ angleMeasurementsPlugin: AngleMeasurementsPlugin,
51
+ cfg?: {
52
+ pointerLens?: PointerLens;
53
+ snapping?: boolean;
54
+ }
55
+ );
39
56
 
40
- /**
41
- * Creates a new AngleMeasurementsMouseControl.
42
- *
43
- * @param {AngleMeasurementsPlugin} angleMeasurementsPlugin The AngleMeasurementsPlugin to control.
44
- * @param {Object} [cfg] Configuration options.
45
- * @param {PointerLens} [cfg.pointerLens] A PointerLens to use for providing a magnified view of the cursor when snapping is enabled.
46
- * @param {boolean} [cfg.snapping=true] Whether to initially enable snap-to-vertex and snap-to-edge for this AngleMeasurementsMouseControl.
47
- */
48
- constructor(angleMeasurementsPlugin: AngleMeasurementsPlugin, cfg?: {
49
- pointerLens?: PointerLens;
50
- snapping?: boolean;
51
- });
57
+ /**
58
+ * @return {number} mouse offset
59
+ */
60
+ get offsetX(): number;
52
61
 
53
- /**
54
- * Gets whether this AngleMeasurementsMouseControl is currently active, responding to input.
55
- *
56
- * @returns {boolean} True if active, false otherwise.
57
- */
58
- get active(): boolean;
62
+ /**
63
+ * @param {number} offsetX
64
+ */
65
+ set offsetX(offsetX: number);
59
66
 
60
- /**
61
- * Sets whether snap-to-vertex and snap-to-edge are enabled for this AngleMeasurementsMouseControl.
62
- *
63
- * @param {boolean} snapping True to enable snap-to-vertex and snap-to-edge, false to disable.
64
- */
65
- set snapping(snapping: boolean);
67
+ /**
68
+ * @return {number} mouse offset
69
+ */
70
+ get offsetY(): number;
66
71
 
67
- /**
68
- * Gets whether snap-to-vertex and snap-to-edge are enabled for this AngleMeasurementsMouseControl.
69
- *
70
- * @returns {boolean} True if snap-to-vertex and snap-to-edge are enabled, false otherwise.
71
- */
72
- get snapping(): boolean;
72
+ /**
73
+ * @param {number} offsetY
74
+ */
75
+ set offsetY(offsetY: number);
73
76
 
74
- /**
75
- * Activates this AngleMeasurementsMouseControl, making it responsive to input.
76
- */
77
- activate(): void;
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;
78
83
 
79
- /**
80
- * Deactivates this AngleMeasurementsMouseControl, making it unresponsive to input.
81
- */
82
- deactivate(): void;
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);
83
90
 
84
- /**
85
- * Resets this AngleMeasurementsMouseControl, destroying any AngleMeasurement under construction.
86
- */
87
- reset(): void;
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;
88
97
 
89
- /**
90
- * Destroys this AngleMeasurementsMouseControl.
91
- */
92
- destroy(): void;
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;
93
117
  }
@@ -1,7 +1,7 @@
1
- import {DistanceMeasurementsControl} from "./DistanceMeasurementsControl.js";
1
+ import { DistanceMeasurementsControl } from "./DistanceMeasurementsControl.js";
2
2
 
3
- import {DistanceMeasurementsPlugin} from "./DistanceMeasurementsPlugin";
4
- import {PointerLens} from "../../extras/PointerLens/PointerLens";
3
+ import { DistanceMeasurementsPlugin } from "./DistanceMeasurementsPlugin";
4
+ import { PointerLens } from "../../extras/PointerLens/PointerLens";
5
5
 
6
6
  /**
7
7
  * Creates {@link DistanceMeasurement}s in a {@link DistanceMeasurementsPlugin} from mouse input.
@@ -14,58 +14,82 @@ import {PointerLens} from "../../extras/PointerLens/PointerLens";
14
14
  * });
15
15
  */
16
16
  export class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {
17
+ /**
18
+ * Creates a DistanceMeasurementsMouseControl bound to the given DistanceMeasurementsPlugin.
19
+ *
20
+ * @param {DistanceMeasurementsPlugin} distanceMeasurementsPlugin The DistanceMeasurementsPlugin to control.
21
+ * @param {Object} cfg Configuration options.
22
+ * @param {PointerLens} [cfg.pointerLens] A PointerLens to provide a magnified view of the cursor when snapping is enabled.
23
+ * @param {boolean} [cfg.snapping=true] Whether to enable snap-to-vertex and snap-to-edge for this DistanceMeasurementsMouseControl.
24
+ * @param {offsetX} [cfg.offsetX] offsetX of the mouse
25
+ * @param {offsetY} [cfg.offsetY] offsetY of the mouse
26
+ */
27
+ constructor(
28
+ distanceMeasurementsPlugin: DistanceMeasurementsPlugin,
29
+ cfg?: {
30
+ pointerLens?: PointerLens;
31
+ snapping?: boolean;
32
+ }
33
+ );
17
34
 
18
- /**
19
- * Creates a DistanceMeasurementsMouseControl bound to the given DistanceMeasurementsPlugin.
20
- *
21
- * @param {DistanceMeasurementsPlugin} distanceMeasurementsPlugin The DistanceMeasurementsPlugin to control.
22
- * @param {Object} cfg Configuration options.
23
- * @param {PointerLens} [cfg.pointerLens] A PointerLens to provide a magnified view of the cursor when snapping is enabled.
24
- * @param {boolean} [cfg.snapping=true] Whether to enable snap-to-vertex and snap-to-edge for this DistanceMeasurementsMouseControl.
25
- */
26
- constructor(distanceMeasurementsPlugin: DistanceMeasurementsPlugin, cfg?: {
27
- pointerLens?: PointerLens;
28
- snapping?: boolean;
29
- });
35
+ /**
36
+ * @return {number} mouse offset
37
+ */
38
+ get offsetX(): number;
30
39
 
31
- /**
32
- * Gets if this DistanceMeasurementsMouseControl is currently active, where it is responding to input.
33
- *
34
- * @returns {boolean} True if this DistanceMeasurementsMouseControl is active.
35
- */
36
- get active(): boolean;
40
+ /**
41
+ * @param {number} offsetX
42
+ */
43
+ set offsetX(offsetX: number);
37
44
 
38
- /**
39
- * Sets whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsMouseControl.
40
- *
41
- * @param {boolean} snapping Whether to enable snap-to-vertex and snap-to-edge for this DistanceMeasurementsMouseControl.
42
- */
43
- set snapping(snapping: boolean);
45
+ /**
46
+ * @return {number} mouse offset
47
+ */
48
+ get offsetY(): number;
44
49
 
45
- /**
46
- * Gets whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsMouseControl.
47
- *
48
- * @returns {boolean} Whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsMouseControl.
49
- */
50
- get snapping(): boolean;
50
+ /**
51
+ * @param {number} offsetY
52
+ */
53
+ set offsetY(offsetY: number);
51
54
 
52
- /**
53
- * Activates this DistanceMeasurementsMouseControl, ready to respond to input.
54
- */
55
- activate(): void;
55
+ /**
56
+ * Gets if this DistanceMeasurementsMouseControl is currently active, where it is responding to input.
57
+ *
58
+ * @returns {boolean} True if this DistanceMeasurementsMouseControl is active.
59
+ */
60
+ get active(): boolean;
56
61
 
57
- /**
58
- * Deactivates this DistanceMeasurementsMouseControl, making it unresponsive to input.
59
- */
60
- deactivate(): void;
62
+ /**
63
+ * Sets whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsMouseControl.
64
+ *
65
+ * @param {boolean} snapping Whether to enable snap-to-vertex and snap-to-edge for this DistanceMeasurementsMouseControl.
66
+ */
67
+ set snapping(snapping: boolean);
61
68
 
62
- /**
63
- * Resets this DistanceMeasurementsMouseControl.
64
- */
65
- reset(): void;
69
+ /**
70
+ * Gets whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsMouseControl.
71
+ *
72
+ * @returns {boolean} Whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsMouseControl.
73
+ */
74
+ get snapping(): boolean;
66
75
 
67
- /**
68
- * Destroys this DistanceMeasurementsMouseControl.
69
- */
70
- destroy(): void;
76
+ /**
77
+ * Activates this DistanceMeasurementsMouseControl, ready to respond to input.
78
+ */
79
+ activate(): void;
80
+
81
+ /**
82
+ * Deactivates this DistanceMeasurementsMouseControl, making it unresponsive to input.
83
+ */
84
+ deactivate(): void;
85
+
86
+ /**
87
+ * Resets this DistanceMeasurementsMouseControl.
88
+ */
89
+ reset(): void;
90
+
91
+ /**
92
+ * Destroys this DistanceMeasurementsMouseControl.
93
+ */
94
+ destroy(): void;
71
95
  }