@xtctwins/tctwins-core 1.0.50 → 1.0.53

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.50",
3
+ "version": "1.0.53",
4
4
  "private": false,
5
5
  "description": "Web Programming Toolkit for 3D/2D BIM and CAD",
6
6
  "module": "./dist/tctwins-core.es5.js",
@@ -98,6 +98,10 @@ export class AngleMeasurementsTouchControl extends AngleMeasurementsControl {
98
98
  */
99
99
  get snapping(): boolean;
100
100
 
101
+ set touchState(state: number);
102
+
103
+ get touchState(): number;
104
+
101
105
  /**
102
106
  * Activates this AngleMeasurementsMouseControl, making it responsive to input.
103
107
  */
@@ -108,6 +108,8 @@ export declare class AnnotationsPlugin extends Plugin {
108
108
  */
109
109
  destroyAnnotation(id: string): void;
110
110
 
111
+ setAllVisible(visible: boolean): void;
112
+
111
113
  /**
112
114
  * Destroys all {@link Annotation}s.
113
115
  */
@@ -77,6 +77,10 @@ export class DistanceMeasurementsTouchControl extends DistanceMeasurementsContro
77
77
  */
78
78
  get snapping(): boolean;
79
79
 
80
+ set touchState(state: number);
81
+
82
+ get touchState(): number;
83
+
80
84
  /**
81
85
  * Activates this DistanceMeasurementsTouchControl, making it responsive to input.
82
86
  */
@@ -1,5 +1,6 @@
1
1
  import { Plugin, Viewer } from "../../viewer";
2
2
  import { SectionPlane } from "../../viewer/scene/sectionPlane";
3
+ import { SectionBox } from "../../viewer/scene/SectionBox";
3
4
 
4
5
  export declare type SectionPlanesPluginConfiguration = {
5
6
  /** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
@@ -42,6 +43,22 @@ export declare class SectionPlanesPlugin extends Plugin {
42
43
  */
43
44
  get sectionPlanes(): { [key: string]: SectionPlane };
44
45
 
46
+ /**
47
+ * Creates a {@link SectionPlane}.
48
+ *
49
+ * The {@link SectionPlane} will be registered by {@link SectionPlane.id} in {@link SectionPlanesPlugin.sectionPlanes}.
50
+ *
51
+ * @param {Object} params {@link SectionPlane} configuration.
52
+ * @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.
53
+ * @param {Number[]} [params.pos=[0,0,0]] World-space position of the {@link SectionPlane}.
54
+ * @param {Number[]} [params.dir=[0,0,-1]] World-space vector indicating the orientation of the {@link SectionPlane}.
55
+ * @param {Boolean} [params.active=true] Whether the {@link SectionPlane} is initially active. Only clips while this is true.
56
+ * @returns {SectionPlane} The new {@link SectionPlane}.
57
+ */
58
+ createSectionPlane(params?: { id?: string; pos?: number[]; dir?: number[]; active?: boolean }): SectionPlane;
59
+
60
+ createSectionBox(param: { active?: boolean }): SectionBox;
61
+
45
62
  /**
46
63
  * 设置是否是触屏模式
47
64
  * @param {boolean} touch
@@ -71,6 +88,18 @@ export declare class SectionPlanesPlugin extends Plugin {
71
88
  */
72
89
  set sectionConfigs(cfg: any);
73
90
 
91
+ /**
92
+ * 设置剖切盒平面样式
93
+ * @param {any} cfg
94
+ * @param {number} cfg.planeSize?
95
+ * @param {number[]} cfg.controlSize?
96
+ * @param {number[]} cfg.planeOpacity?
97
+ * @param {number} cfg.controlFillColor?
98
+ */
99
+ set boxPlaneConfigs(cfg: any);
100
+
101
+ get controlBox(): SectionBox;
102
+
74
103
  /**
75
104
  * 设置剖切面位置
76
105
  * @param pos
@@ -83,20 +112,6 @@ export declare class SectionPlanesPlugin extends Plugin {
83
112
  */
84
113
  getControlPos(): void;
85
114
 
86
- /**
87
- * Creates a {@link SectionPlane}.
88
- *
89
- * The {@link SectionPlane} will be registered by {@link SectionPlane.id} in {@link SectionPlanesPlugin.sectionPlanes}.
90
- *
91
- * @param {Object} params {@link SectionPlane} configuration.
92
- * @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.
93
- * @param {Number[]} [params.pos=[0,0,0]] World-space position of the {@link SectionPlane}.
94
- * @param {Number[]} [params.dir=[0,0,-1]] World-space vector indicating the orientation of the {@link SectionPlane}.
95
- * @param {Boolean} [params.active=true] Whether the {@link SectionPlane} is initially active. Only clips while this is true.
96
- * @returns {SectionPlane} The new {@link SectionPlane}.
97
- */
98
- createSectionPlane(params?: { id?: string; pos?: number[]; dir?: number[]; active?: boolean }): SectionPlane;
99
-
100
115
  /**
101
116
  * Inverts the direction of {@link SectionPlane.dir} on every existing SectionPlane.
102
117
  *
@@ -110,8 +125,11 @@ export declare class SectionPlanesPlugin extends Plugin {
110
125
  * @param {String} id ID of the {@link SectionPlane}.
111
126
  */
112
127
  showControl(id: string): void;
128
+
113
129
  getShownControls(): void;
130
+
114
131
  showAllControl(): void;
132
+
115
133
  /**
116
134
  * Gets the ID of the {@link SectionPlane} that the 3D editing gizmo is shown for.
117
135
  *
@@ -129,6 +129,9 @@ export declare class CameraControl extends Component {
129
129
  on(event: "touchDoublePickedSurface", callback: (e?: { canvasPos: number[] }) => void, scope?: any): string;
130
130
  on(event: "touchDoublePickedNothing", callback: () => void, scope?: any): string;
131
131
 
132
+ on(event: "personModeSpeedUp", callback: (speedNum: number) => void, scope?: any): string;
133
+ on(event: "personModeSpeedDown", callback: (speedNum: number) => void, scope?: any): string;
134
+
132
135
  /**
133
136
  * 停止漫游
134
137
  */
@@ -137,7 +140,12 @@ export declare class CameraControl extends Component {
137
140
  * 设置漫游移动速率
138
141
  * @param {number} rate
139
142
  */
140
- set moveRate(rate: Number);
143
+ set moveRate(rate: number);
144
+
145
+ get moveRate(): number;
146
+
147
+ speedUp(): void;
148
+ speedDown(): void;
141
149
 
142
150
  /**
143
151
  * 漫游向右
@@ -0,0 +1,41 @@
1
+ import { Component } from "../Component";
2
+
3
+ export declare class SectionBox extends Component {
4
+ /**
5
+ * @constructor
6
+ * @param {Component} [owner] Owner component. When destroyed, the owner will destroy this SectionBox as well.
7
+ * @param {SectionPlaneConfiguration} [cfg] SectionBox configuration
8
+ */
9
+ constructor(owner?: Component, cfg?: any);
10
+
11
+ /**
12
+ * Sets if this SectionBox is active or not.
13
+ *
14
+ * Default value is ````true````.
15
+ *
16
+ * @param {Boolean} value Set ````true```` to activate else ````false```` to deactivate.
17
+ */
18
+ set active(arg: boolean);
19
+
20
+ /**
21
+ * Gets if this SectionBox is active or not.
22
+ *
23
+ * Default value is ````true````.
24
+ *
25
+ * @returns {Boolean} Returns ````true```` if active.
26
+ */
27
+ get active(): boolean;
28
+
29
+ set visible(visible: boolean);
30
+ get visible(): boolean;
31
+
32
+ /**
33
+ * Gets this SectionPlane's distance to the origin of the World-space coordinate system.
34
+ *
35
+ * This is the dot product of {@link SectionPlane.pos} and {@link SectionPlane.dir} and is automatically re-calculated
36
+ * each time either of two properties are updated.
37
+ *
38
+ * @returns {Number}
39
+ */
40
+ get dist(): number;
41
+ }
@@ -0,0 +1 @@
1
+ export * from "./SectionBox";