@xtctwins/tctwins-core 1.0.47 → 1.0.49

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.47",
3
+ "version": "1.0.49",
4
4
  "private": false,
5
5
  "description": "Web Programming Toolkit for 3D/2D BIM and CAD",
6
6
  "module": "./dist/tctwins-core.es5.js",
@@ -1,6 +1,6 @@
1
- import {Component} from "../../viewer/scene/Component";
2
- import {AngleMeasurement} from "./AngleMeasurement";
3
- import {AngleMeasurementsPlugin} from "./AngleMeasurementsPlugin";
1
+ import { Component } from "../../viewer/scene/Component";
2
+ import { AngleMeasurement } from "./AngleMeasurement";
3
+ import { AngleMeasurementsPlugin } from "./AngleMeasurementsPlugin";
4
4
 
5
5
  /**
6
6
  * Creates {@link AngleMeasurement}s from mouse and touch input.
@@ -8,82 +8,84 @@ import {AngleMeasurementsPlugin} from "./AngleMeasurementsPlugin";
8
8
  * Once the AngleMeasurementControl is activated, the first click on any {@link Entity} begins constructing a {@link AngleMeasurement}, fixing its origin to that Entity. The next click on any Entity will complete the AngleMeasurement, fixing its target to that second Entity. The AngleMeasurementControl will then wait for the next click on any Entity, to begin constructing another AngleMeasurement, and so on, until deactivated.
9
9
  */
10
10
  export declare class AngleMeasurementsControl extends Component {
11
- /**
12
- * The {@link AngleMeasurementsPlugin} that owns this AngleMeasurementsControl.
13
- * @type {AngleMeasurementsPlugin}
14
- */
15
- plugin: AngleMeasurementsPlugin;
11
+ /**
12
+ * The {@link AngleMeasurementsPlugin} that owns this AngleMeasurementsControl.
13
+ * @type {AngleMeasurementsPlugin}
14
+ */
15
+ plugin: AngleMeasurementsPlugin;
16
16
 
17
- /**
18
- * Sets whether snap-to-vertex and snap-to-edge are enabled for this AngleMeasurementsControl.
19
- *
20
- * This is `true` by default.
21
- *
22
- * Internally, this deactivates then activates the AngleMeasurementsControl when changed, which means that
23
- * it will destroy any AngleMeasurements currently under construction, and incurs some overhead, since it unbinds
24
- * and rebinds various input handlers.
25
- *
26
- * @param {boolean} snapping Whether to enable snap-to-vertex and snap-edge for this AngleMeasurementsControl.
27
- */
28
- set snapping(snapping: boolean);
17
+ /**
18
+ * Sets whether snap-to-vertex and snap-to-edge are enabled for this AngleMeasurementsControl.
19
+ *
20
+ * This is `true` by default.
21
+ *
22
+ * Internally, this deactivates then activates the AngleMeasurementsControl when changed, which means that
23
+ * it will destroy any AngleMeasurements currently under construction, and incurs some overhead, since it unbinds
24
+ * and rebinds various input handlers.
25
+ *
26
+ * @param {boolean} snapping Whether to enable snap-to-vertex and snap-edge for this AngleMeasurementsControl.
27
+ */
28
+ set snapping(snapping: boolean);
29
29
 
30
- /**
31
- * Gets whether snap-to-vertex and snap-to-edge are enabled for this AngleMeasurementsControl.
32
- *
33
- * This is `true` by default.
34
- *
35
- * @returns {boolean} Whether snap-to-vertex and snap-to-edge are enabled for this AngleMeasurementsControl.
36
- */
37
- get snapping(): boolean;
30
+ /**
31
+ * Gets whether snap-to-vertex and snap-to-edge are enabled for this AngleMeasurementsControl.
32
+ *
33
+ * This is `true` by default.
34
+ *
35
+ * @returns {boolean} Whether snap-to-vertex and snap-to-edge are enabled for this AngleMeasurementsControl.
36
+ */
37
+ get snapping(): boolean;
38
38
 
39
- /** Gets if this AngleMeasurementsControl is currently active, where it is responding to input.
40
- *
41
- * @returns {Boolean}
42
- */
43
- get active(): boolean;
39
+ /** Gets if this AngleMeasurementsControl is currently active, where it is responding to input.
40
+ *
41
+ * @returns {Boolean}
42
+ */
43
+ get active(): boolean;
44
44
 
45
- /**
46
- * Activates this AngleMeasurementsControl, ready to respond to input.
47
- */
48
- activate(): void;
45
+ set active(active: boolean);
49
46
 
50
- /**
51
- * Deactivates this AngleMeasurementsControl, making it unresponsive to input.
52
- *
53
- * Destroys any {@link AngleMeasurement} under construction.
54
- */
55
- deactivate(): void;
47
+ /**
48
+ * Activates this AngleMeasurementsControl, ready to respond to input.
49
+ */
50
+ activate(): void;
56
51
 
57
- /**
58
- * Resets this AngleMeasurementsControl.
59
- *
60
- * Destroys any {@link AngleMeasurement} under construction.
61
- *
62
- * Does nothing if the AngleMeasurementsControl is not active.
63
- */
64
- reset(): void;
52
+ /**
53
+ * Deactivates this AngleMeasurementsControl, making it unresponsive to input.
54
+ *
55
+ * Destroys any {@link AngleMeasurement} under construction.
56
+ */
57
+ deactivate(): void;
65
58
 
66
- /**
67
- * Fires when the measurement is ended.
68
- * @param event The measurementEnd event
69
- * @param callback Called fired on the event
70
- * @param scope Scope for the callback
71
- */
72
- on(event: "measurementEnd", callback: (measurement: AngleMeasurement) => void, scope?: any): string
59
+ /**
60
+ * Resets this AngleMeasurementsControl.
61
+ *
62
+ * Destroys any {@link AngleMeasurement} under construction.
63
+ *
64
+ * Does nothing if the AngleMeasurementsControl is not active.
65
+ */
66
+ reset(): void;
73
67
 
74
- /**
75
- * Fires when the measurement is cancelled.
76
- * @param event The measurementCancel event
77
- * @param callback Called fired on the event
78
- * @param scope Scope for the callback
79
- */
80
- on(event: "measurementCancel", callback: (measurement: AngleMeasurement) => void, scope?: any): string
68
+ /**
69
+ * Fires when the measurement is ended.
70
+ * @param event The measurementEnd event
71
+ * @param callback Called fired on the event
72
+ * @param scope Scope for the callback
73
+ */
74
+ on(event: "measurementEnd", callback: (measurement: AngleMeasurement) => void, scope?: any): string;
81
75
 
82
- /**
83
- * Fires when the measurement is started.
84
- * @param event The measurementStart event
85
- * @param callback Called fired on the event
86
- * @param scope Scope for the callback
87
- */
88
- on(event: "measurementStart", callback: (measurement: AngleMeasurement) => void, scope?: any): string
76
+ /**
77
+ * Fires when the measurement is cancelled.
78
+ * @param event The measurementCancel event
79
+ * @param callback Called fired on the event
80
+ * @param scope Scope for the callback
81
+ */
82
+ on(event: "measurementCancel", callback: (measurement: AngleMeasurement) => void, scope?: any): string;
83
+
84
+ /**
85
+ * Fires when the measurement is started.
86
+ * @param event The measurementStart event
87
+ * @param callback Called fired on the event
88
+ * @param scope Scope for the callback
89
+ */
90
+ on(event: "measurementStart", callback: (measurement: AngleMeasurement) => void, scope?: any): string;
89
91
  }
@@ -84,6 +84,7 @@ export class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
84
84
  * @returns {boolean} True if active, false otherwise.
85
85
  */
86
86
  get active(): boolean;
87
+ set active(active: boolean);
87
88
 
88
89
  /**
89
90
  * Sets whether snap-to-vertex and snap-to-edge are enabled for this AngleMeasurementsMouseControl.
@@ -85,6 +85,9 @@ export declare class AngleMeasurementsPlugin extends Plugin {
85
85
  */
86
86
  destroyMeasurement(id: string): void;
87
87
 
88
+ setLabelsShown(labelsShown: boolean): void;
89
+
90
+ setMeasurementsShown(visible: any): void;
88
91
  /**
89
92
  * Destroys all {@link AngleMeasurement}s.
90
93
  */
@@ -82,6 +82,7 @@ export class AngleMeasurementsTouchControl extends AngleMeasurementsControl {
82
82
  * @returns {boolean} True if active, false otherwise.
83
83
  */
84
84
  get active(): boolean;
85
+ set active(active: boolean);
85
86
 
86
87
  /**
87
88
  * Sets whether snap-to-vertex and snap-to-edge are enabled for this AngleMeasurementsMouseControl.
@@ -1,97 +1,96 @@
1
- import {Component} from "../../viewer/scene/Component";
2
- import {DistanceMeasurement} from "./DistanceMeasurement";
3
- import {DistanceMeasurementsPlugin} from "./DistanceMeasurementsPlugin";
1
+ import { Component } from "../../viewer/scene/Component";
2
+ import { DistanceMeasurement } from "./DistanceMeasurement";
3
+ import { DistanceMeasurementsPlugin } from "./DistanceMeasurementsPlugin";
4
4
 
5
5
  /**
6
6
  * Creates {@link DistanceMeasurement}s from mouse and touch input.
7
7
  */
8
8
  export declare class DistanceMeasurementsControl extends Component {
9
+ /**
10
+ * The {@link DistanceMeasurementsPlugin} that owns this DistanceMeasurementsControl.
11
+ * @type {DistanceMeasurementsPlugin}
12
+ */
13
+ plugin: DistanceMeasurementsPlugin;
9
14
 
10
- /**
11
- * The {@link DistanceMeasurementsPlugin} that owns this DistanceMeasurementsControl.
12
- * @type {DistanceMeasurementsPlugin}
13
- */
14
- plugin: DistanceMeasurementsPlugin;
15
+ /**
16
+ * Sets whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsControl.
17
+ *
18
+ * This is `true` by default.
19
+ *
20
+ * Internally, this deactivates then activates the DistanceMeasurementsControl when changed, which means that
21
+ * it will destroy any DistanceMeasurements currently under construction, and incurs some overhead, since it unbinds
22
+ * and rebinds various input handlers.
23
+ *
24
+ * @param {boolean} snapping Whether to enable snap-to-vertex and snap-edge for this DistanceMeasurementsControl.
25
+ */
26
+ set snapping(snapping: boolean);
15
27
 
16
- /**
17
- * Sets whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsControl.
18
- *
19
- * This is `true` by default.
20
- *
21
- * Internally, this deactivates then activates the DistanceMeasurementsControl when changed, which means that
22
- * it will destroy any DistanceMeasurements currently under construction, and incurs some overhead, since it unbinds
23
- * and rebinds various input handlers.
24
- *
25
- * @param {boolean} snapping Whether to enable snap-to-vertex and snap-edge for this DistanceMeasurementsControl.
26
- */
27
- set snapping(snapping: boolean);
28
+ /**
29
+ * Gets whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsControl.
30
+ *
31
+ * This is `true` by default.
32
+ *
33
+ * @returns {boolean} Whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsControl.
34
+ */
35
+ get snapping(): boolean;
28
36
 
29
- /**
30
- * Gets whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsControl.
31
- *
32
- * This is `true` by default.
33
- *
34
- * @returns {boolean} Whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsControl.
35
- */
36
- get snapping(): boolean;
37
+ /** Gets if this DistanceMeasurementsControl is currently active, where it is responding to input.
38
+ *
39
+ * @returns {Boolean}
40
+ */
41
+ get active(): boolean;
42
+ set active(active: boolean);
37
43
 
44
+ /**
45
+ * Activates this DistanceMeasurementsControl, ready to respond to input.
46
+ */
47
+ activate(): void;
38
48
 
39
- /** Gets if this DistanceMeasurementsControl is currently active, where it is responding to input.
40
- *
41
- * @returns {Boolean}
42
- */
43
- get active(): boolean;
49
+ /**
50
+ * Deactivates this DistanceMeasurementsControl, making it unresponsive to input.
51
+ *
52
+ * Destroys any {@link DistanceMeasurement} under construction.
53
+ */
54
+ deactivate(): void;
44
55
 
45
- /**
46
- * Activates this DistanceMeasurementsControl, ready to respond to input.
47
- */
48
- activate(): void;
56
+ /**
57
+ * Resets this DistanceMeasurementsControl.
58
+ *
59
+ * Destroys any {@link DistanceMeasurement} under construction.
60
+ *
61
+ * Does nothing if the DistanceMeasurementsControl is not active.
62
+ */
63
+ reset(): void;
49
64
 
50
- /**
51
- * Deactivates this DistanceMeasurementsControl, making it unresponsive to input.
52
- *
53
- * Destroys any {@link DistanceMeasurement} under construction.
54
- */
55
- deactivate(): void;
65
+ /**
66
+ * Fires when the measurement is ended.
67
+ * @param event The measurementEnd event
68
+ * @param callback Called fired on the event
69
+ * @param scope Scope for the callback
70
+ */
71
+ on(event: "measurementEnd", callback: (measurement: DistanceMeasurement) => void, scope?: any): string;
56
72
 
57
- /**
58
- * Resets this DistanceMeasurementsControl.
59
- *
60
- * Destroys any {@link DistanceMeasurement} under construction.
61
- *
62
- * Does nothing if the DistanceMeasurementsControl is not active.
63
- */
64
- reset(): void;
73
+ /**
74
+ * Fires when the measurement is cancelled.
75
+ * @param event The measurementCancel event
76
+ * @param callback Called fired on the event
77
+ * @param scope Scope for the callback
78
+ */
79
+ on(event: "measurementCancel", callback: (measurement: DistanceMeasurement) => void, scope?: any): string;
65
80
 
66
- /**
67
- * Fires when the measurement is ended.
68
- * @param event The measurementEnd event
69
- * @param callback Called fired on the event
70
- * @param scope Scope for the callback
71
- */
72
- on(event: "measurementEnd", callback: (measurement: DistanceMeasurement) => void, scope?: any): string
81
+ /**
82
+ * Fires when the measurement is started.
83
+ * @param event The measurementStart event
84
+ * @param callback Called fired on the event
85
+ * @param scope Scope for the callback
86
+ */
87
+ on(event: "measurementStart", callback: (measurement: DistanceMeasurement) => void, scope?: any): string;
73
88
 
74
- /**
75
- * Fires when the measurement is cancelled.
76
- * @param event The measurementCancel event
77
- * @param callback Called fired on the event
78
- * @param scope Scope for the callback
79
- */
80
- on(event: "measurementCancel", callback: (measurement: DistanceMeasurement) => void, scope?: any): string
81
-
82
- /**
83
- * Fires when the measurement is started.
84
- * @param event The measurementStart event
85
- * @param callback Called fired on the event
86
- * @param scope Scope for the callback
87
- */
88
- on(event: "measurementStart", callback: (measurement: DistanceMeasurement) => void, scope?: any): string
89
-
90
- /**
91
- * Fires when the the control is (de)activated
92
- * @param event The activation event
93
- * @param callback Called fired on the event
94
- * @param scope Scope for the callback
95
- */
96
- on(event: "activated", callback: (activated: boolean) => void, scope?: any): string
89
+ /**
90
+ * Fires when the the control is (de)activated
91
+ * @param event The activation event
92
+ * @param callback Called fired on the event
93
+ * @param scope Scope for the callback
94
+ */
95
+ on(event: "activated", callback: (activated: boolean) => void, scope?: any): string;
97
96
  }
@@ -61,6 +61,7 @@ export class DistanceMeasurementsMouseControl extends DistanceMeasurementsContro
61
61
  * @returns {boolean} True if this DistanceMeasurementsMouseControl is active.
62
62
  */
63
63
  get active(): boolean;
64
+ set active(active: boolean);
64
65
 
65
66
  /**
66
67
  * Sets whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsMouseControl.
@@ -121,6 +121,14 @@ export declare class DistanceMeasurementsPlugin extends Plugin {
121
121
  */
122
122
  destroyMeasurement(id: string): void;
123
123
 
124
+ setLabelsShown(labelsShown: boolean): void;
125
+
126
+ setMeasurementsShown(visible: any): void;
127
+
128
+ setAxisVisible(axisVisible: any): void;
129
+
130
+ getAxisVisible(): boolean;
131
+
124
132
  /**
125
133
  * Destroys all {@link DistanceMeasurement}s.
126
134
  */
@@ -61,6 +61,7 @@ export class DistanceMeasurementsTouchControl extends DistanceMeasurementsContro
61
61
  * @returns {boolean} True if active, false otherwise.
62
62
  */
63
63
  get active(): boolean;
64
+ set active(active: boolean);
64
65
 
65
66
  /**
66
67
  * Sets whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsTouchControl.
@@ -110,7 +110,8 @@ export declare class SectionPlanesPlugin extends Plugin {
110
110
  * @param {String} id ID of the {@link SectionPlane}.
111
111
  */
112
112
  showControl(id: string): void;
113
-
113
+ getShownControls(): void;
114
+ showAllControl(): void;
114
115
  /**
115
116
  * Gets the ID of the {@link SectionPlane} that the 3D editing gizmo is shown for.
116
117
  *
@@ -24,6 +24,7 @@ export declare class SkyboxesPlugin extends Plugin {
24
24
  size?: number;
25
25
  scale?: number[];
26
26
  src?: string;
27
+ image?: HTMLImageElement;
27
28
  }
28
29
  ): any; //Skybox;
29
30
 
@@ -1,93 +1,96 @@
1
1
  import { Component } from "../Component";
2
2
 
3
3
  export declare type SectionPlaneConfiguration = {
4
- /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
5
- id?: string;
6
- /** Indicates whether or not this SectionPlane is active. */
7
- active?: boolean;
8
- /** World-space position of the SectionPlane. */
9
- pos?: number[];
10
- /** Vector perpendicular to the plane surface, indicating the SectionPlane plane orientation. */
11
- dir?: number[];
4
+ /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
5
+ id?: string;
6
+ /** Indicates whether or not this SectionPlane is active. */
7
+ active?: boolean;
8
+ /** World-space position of the SectionPlane. */
9
+ pos?: number[];
10
+ /** Vector perpendicular to the plane surface, indicating the SectionPlane plane orientation. */
11
+ dir?: number[];
12
12
  };
13
13
 
14
14
  /**
15
15
  * An arbitrarily-aligned World-space clipping plane.
16
16
  */
17
17
  export declare class SectionPlane extends Component {
18
- /**
19
- * @constructor
20
- * @param {Component} [owner] Owner component. When destroyed, the owner will destroy this SectionPlane as well.
21
- * @param {SectionPlaneConfiguration} [cfg] SectionPlane configuration
22
- */
23
- constructor(owner?: Component, cfg?: SectionPlaneConfiguration);
18
+ /**
19
+ * @constructor
20
+ * @param {Component} [owner] Owner component. When destroyed, the owner will destroy this SectionPlane as well.
21
+ * @param {SectionPlaneConfiguration} [cfg] SectionPlane configuration
22
+ */
23
+ constructor(owner?: Component, cfg?: SectionPlaneConfiguration);
24
24
 
25
- /**
26
- * Sets if this SectionPlane is active or not.
27
- *
28
- * Default value is ````true````.
29
- *
30
- * @param {Boolean} value Set ````true```` to activate else ````false```` to deactivate.
31
- */
32
- set active(arg: boolean);
25
+ /**
26
+ * Sets if this SectionPlane is active or not.
27
+ *
28
+ * Default value is ````true````.
29
+ *
30
+ * @param {Boolean} value Set ````true```` to activate else ````false```` to deactivate.
31
+ */
32
+ set active(arg: boolean);
33
33
 
34
- /**
35
- * Gets if this SectionPlane is active or not.
36
- *
37
- * Default value is ````true````.
38
- *
39
- * @returns {Boolean} Returns ````true```` if active.
40
- */
41
- get active(): boolean;
34
+ /**
35
+ * Gets if this SectionPlane is active or not.
36
+ *
37
+ * Default value is ````true````.
38
+ *
39
+ * @returns {Boolean} Returns ````true```` if active.
40
+ */
41
+ get active(): boolean;
42
42
 
43
- /**
44
- * Sets the World-space position of this SectionPlane's plane.
45
- *
46
- * Default value is ````[0, 0, 0]````.
47
- *
48
- * @param {Number[]} value New position.
49
- */
50
- set pos(arg: number[]);
43
+ /**
44
+ * Sets the World-space position of this SectionPlane's plane.
45
+ *
46
+ * Default value is ````[0, 0, 0]````.
47
+ *
48
+ * @param {Number[]} value New position.
49
+ */
50
+ set pos(arg: number[]);
51
51
 
52
- /**
53
- * Gets the World-space position of this SectionPlane's plane.
54
- *
55
- * Default value is ````[0, 0, 0]````.
56
- *
57
- * @returns {Number[]} Current position.
58
- */
59
- get pos(): number[];
52
+ /**
53
+ * Gets the World-space position of this SectionPlane's plane.
54
+ *
55
+ * Default value is ````[0, 0, 0]````.
56
+ *
57
+ * @returns {Number[]} Current position.
58
+ */
59
+ get pos(): number[];
60
60
 
61
- /**
62
- * Sets the direction of this SectionPlane's plane.
63
- *
64
- * Default value is ````[0, 0, -1]````.
65
- *
66
- * @param {Number[]} value New direction.
67
- */
68
- set dir(arg: number[]);
61
+ /**
62
+ * Sets the direction of this SectionPlane's plane.
63
+ *
64
+ * Default value is ````[0, 0, -1]````.
65
+ *
66
+ * @param {Number[]} value New direction.
67
+ */
68
+ set dir(arg: number[]);
69
69
 
70
- /**
71
- * Gets the direction of this SectionPlane's plane.
72
- *
73
- * Default value is ````[0, 0, -1]````.
74
- *
75
- * @returns {Number[]} value Current direction.
76
- */
77
- get dir(): number[];
70
+ /**
71
+ * Gets the direction of this SectionPlane's plane.
72
+ *
73
+ * Default value is ````[0, 0, -1]````.
74
+ *
75
+ * @returns {Number[]} value Current direction.
76
+ */
77
+ get dir(): number[];
78
78
 
79
- /**
80
- * Gets this SectionPlane's distance to the origin of the World-space coordinate system.
81
- *
82
- * This is the dot product of {@link SectionPlane.pos} and {@link SectionPlane.dir} and is automatically re-calculated
83
- * each time either of two properties are updated.
84
- *
85
- * @returns {Number}
86
- */
87
- get dist(): number;
79
+ /**
80
+ * Gets this SectionPlane's distance to the origin of the World-space coordinate system.
81
+ *
82
+ * This is the dot product of {@link SectionPlane.pos} and {@link SectionPlane.dir} and is automatically re-calculated
83
+ * each time either of two properties are updated.
84
+ *
85
+ * @returns {Number}
86
+ */
87
+ get dist(): number;
88
88
 
89
- /**
90
- * Inverts the direction of {@link SectionPlane.dir}.
91
- */
92
- flipDir(): void;
89
+ get control(): any;
90
+ set control(control: any);
91
+
92
+ /**
93
+ * Inverts the direction of {@link SectionPlane.dir}.
94
+ */
95
+ flipDir(): void;
93
96
  }