@xtctwins/tctwins-core 1.0.18 → 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/dist/tctwins-core.es.js +8056 -5406
- package/dist/tctwins-core.min.es.js +5 -5
- package/package.json +3 -3
- package/types/extras/PointerCircle/PointerCircle.d.ts +51 -0
- package/types/extras/PointerCircle/index.d.ts +1 -0
- package/types/extras/index.d.ts +1 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +14 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsTouchControl.d.ts +117 -0
- package/types/plugins/AngleMeasurementsPlugin/index.d.ts +2 -1
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.d.ts +0 -1
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +142 -129
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsTouchControl.d.ts +96 -0
- package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +1 -0
- package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +140 -138
- package/types/viewer/Viewer.d.ts +246 -232
- package/types/viewer/scene/CameraControl/CameraControl.d.ts +17 -0
- package/types/viewer/scene/input/input.d.ts +58 -42
|
@@ -2,44 +2,46 @@ import { Plugin } from "../../viewer/Plugin";
|
|
|
2
2
|
import { Viewer } from "../../viewer/Viewer";
|
|
3
3
|
|
|
4
4
|
export declare type NavCubePluginConfiguration = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
5
|
+
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** ID of an existing HTML canvas to display the NavCube - either this or canvasElement is mandatory. When both values are given, the element reference is always preferred to the ID. */
|
|
8
|
+
canvasId?: string;
|
|
9
|
+
/** Reference of an existing HTML canvas to display the NavCube - either this or canvasId is mandatory. When both values are given, the element reference is always preferred to the ID. */
|
|
10
|
+
canvasElement?: HTMLCanvasElement;
|
|
11
|
+
/** Reference of an existing div to contain the canvas */
|
|
12
|
+
viewerElement: HTMLDivElement;
|
|
13
|
+
/** Initial visibility. */
|
|
14
|
+
visible?: boolean;
|
|
15
|
+
/** Whether the shadow of the cube is visible. */
|
|
16
|
+
shadowVisible?: boolean;
|
|
17
|
+
/** Whether the {@link Camera} flies or jumps to each selected axis or diagonal. */
|
|
18
|
+
cameraFly?: string;
|
|
19
|
+
/** How much of the field-of-view, in degrees, that the 3D scene should fill the {@link Canvas} when the {@link Camera} moves to an axis or diagonal. */
|
|
20
|
+
cameraFitFOV?: string;
|
|
21
|
+
/** When flying the {@link Camera} to each new axis or diagonal, how long, in seconds, that the Camera takes to get there. */
|
|
22
|
+
cameraFlyDuration?: string;
|
|
23
|
+
/** Custom uniform color for the faces of the NavCube. */
|
|
24
|
+
color?: string;
|
|
25
|
+
/** Custom color for the front face of the NavCube. Overrides ````color````. */
|
|
26
|
+
frontColor?: string;
|
|
27
|
+
/** Custom color for the back face of the NavCube. Overrides ````color````. */
|
|
28
|
+
backColor?: string;
|
|
29
|
+
/** Custom color for the left face of the NavCube. Overrides ````color````. */
|
|
30
|
+
leftColor?: string;
|
|
31
|
+
/** Custom color for the right face of the NavCube. Overrides ````color````. */
|
|
32
|
+
rightColor?: string;
|
|
33
|
+
/** Custom color for the top face of the NavCube. Overrides ````color````. */
|
|
34
|
+
topColor?: string;
|
|
35
|
+
/** Custom color for the bottom face of the NavCube. Overrides ````color````. */
|
|
36
|
+
bottomColor?: string;
|
|
37
|
+
/** Custom color for highlighting regions on the NavCube as we hover the pointer over them. */
|
|
38
|
+
hoverColor?: string;
|
|
39
|
+
/** Custom text color for labels of the NavCube. */
|
|
40
|
+
textColor?: string;
|
|
41
|
+
/** Sets whether the axis, corner and edge-aligned views will fit the view to the entire {@link Scene} or just to visible object-{@link Entity}s. Entitys are visible objects when {@link Entity.isObject} and {@link Entity.visible} are both ````true````. */
|
|
42
|
+
fitVisible?: boolean;
|
|
43
|
+
/** Sets whether the NavCube switches between perspective and orthographic projections in synchrony with the {@link Camera}. When ````false````, the NavCube will always be rendered with perspective projection. */
|
|
44
|
+
synchProjection?: boolean;
|
|
43
45
|
};
|
|
44
46
|
|
|
45
47
|
/**
|
|
@@ -47,116 +49,116 @@ export declare type NavCubePluginConfiguration = {
|
|
|
47
49
|
*
|
|
48
50
|
*/
|
|
49
51
|
export declare class NavCubePlugin extends Plugin {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
/**
|
|
53
|
+
* @constructor
|
|
54
|
+
* @param {Viewer} viewer The Viewer.
|
|
55
|
+
* @param {NavCubePluginConfiguration} cfg NavCubePlugin configuration.
|
|
56
|
+
*/
|
|
57
|
+
constructor(viewer: Viewer, cfg?: NavCubePluginConfiguration);
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Sets if the NavCube is visible.
|
|
61
|
+
*
|
|
62
|
+
* @param {Boolean} value Whether or not the NavCube is visible.
|
|
63
|
+
*/
|
|
64
|
+
setVisible(value?: boolean): void;
|
|
63
65
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Gets if the NavCube is visible.
|
|
68
|
+
*
|
|
69
|
+
* @return {Boolean} True when the NavCube is visible.
|
|
70
|
+
*/
|
|
71
|
+
getVisible(): boolean;
|
|
70
72
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Sets whether the axis, corner and edge-aligned views will fit the
|
|
75
|
+
* view to the entire {@link Scene} or just to visible object-{@link Entity}s.
|
|
76
|
+
*
|
|
77
|
+
* Entitys are visible objects when {@link Entity.isObject} and {@link Entity.visible} are both ````true````.
|
|
78
|
+
*
|
|
79
|
+
* @param {Boolean} value Set ````true```` to fit only visible object-Entitys.
|
|
80
|
+
*/
|
|
81
|
+
setFitVisible(value: boolean): void;
|
|
80
82
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
/**
|
|
84
|
+
* Gets whether the axis, corner and edge-aligned views will fit the
|
|
85
|
+
* view to the entire {@link Scene} or just to visible object-{@link Entity}s.
|
|
86
|
+
*
|
|
87
|
+
* Entitys are visible objects when {@link Entity.isObject} and {@link Entity.visible} are both ````true````.
|
|
88
|
+
*
|
|
89
|
+
* @return {Boolean} True when fitting only visible object-Entitys.
|
|
90
|
+
*/
|
|
91
|
+
getFitVisible(): boolean;
|
|
90
92
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
/**
|
|
94
|
+
* Sets whether the {@link Camera} flies or jumps to each selected axis or diagonal.
|
|
95
|
+
*
|
|
96
|
+
* Default is ````true````, to fly.
|
|
97
|
+
*
|
|
98
|
+
* @param {Boolean} value Set ````true```` to fly, else ````false```` to jump.
|
|
99
|
+
*/
|
|
100
|
+
setCameraFly(value: boolean): void;
|
|
99
101
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Gets whether the {@link Camera} flies or jumps to each selected axis or diagonal.
|
|
104
|
+
*
|
|
105
|
+
* Default is ````true````, to fly.
|
|
106
|
+
*
|
|
107
|
+
* @returns {Boolean} Returns ````true```` to fly, else ````false```` to jump.
|
|
108
|
+
*/
|
|
109
|
+
getCameraFly(): boolean;
|
|
108
110
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
111
|
+
/**
|
|
112
|
+
* Sets how much of the field-of-view, in degrees, that the {@link Scene} should
|
|
113
|
+
* fill the canvas when flying or jumping the {@link Camera} to each selected axis or diagonal.
|
|
114
|
+
*
|
|
115
|
+
* Default value is ````45````.
|
|
116
|
+
*
|
|
117
|
+
* @param {Number} value New FOV value.
|
|
118
|
+
*/
|
|
119
|
+
setCameraFitFOV(value: number): void;
|
|
118
120
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
121
|
+
/**
|
|
122
|
+
* Gets how much of the field-of-view, in degrees, that the {@link Scene} should
|
|
123
|
+
* fill the canvas when flying or jumping the {@link Camera} to each selected axis or diagonal.
|
|
124
|
+
*
|
|
125
|
+
* Default value is ````45````.
|
|
126
|
+
*
|
|
127
|
+
* @returns {Number} Current FOV value.
|
|
128
|
+
*/
|
|
129
|
+
getCameraFitFOV(): number;
|
|
128
130
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
/**
|
|
132
|
+
* When flying the {@link Camera} to each new axis or diagonal, sets how long, in seconds, that the Camera takes to get there.
|
|
133
|
+
*
|
|
134
|
+
* Default is ````0.5````.
|
|
135
|
+
*
|
|
136
|
+
* @param {Boolean} value Camera flight duration in seconds.
|
|
137
|
+
*/
|
|
138
|
+
setCameraFlyDuration(value: boolean): void;
|
|
137
139
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
140
|
+
/**
|
|
141
|
+
* When flying the {@link Camera} to each new axis or diagonal, gets how long, in seconds, that the Camera takes to get there.
|
|
142
|
+
*
|
|
143
|
+
* Default is ````0.5````.
|
|
144
|
+
*
|
|
145
|
+
* @returns {Boolean} Camera flight duration in seconds.
|
|
146
|
+
*/
|
|
147
|
+
getCameraFlyDuration(): boolean;
|
|
146
148
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
149
|
+
/**
|
|
150
|
+
* Sets whether the NavCube switches between perspective and orthographic projections in synchrony with
|
|
151
|
+
* the {@link Camera}. When ````false````, the NavCube will always be rendered with perspective projection.
|
|
152
|
+
*
|
|
153
|
+
* @param {Boolean} value Set ````true```` to keep NavCube projection synchronized with {@link Camera.projection}.
|
|
154
|
+
*/
|
|
155
|
+
setSynchProjection(value: boolean): void;
|
|
154
156
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Gets whether the NavCube switches between perspective and orthographic projections in synchrony with
|
|
159
|
+
* the {@link Camera}. When ````false````, the NavCube will always be rendered with perspective projection.
|
|
160
|
+
*
|
|
161
|
+
* @return {Boolean} True when NavCube projection is synchronized with {@link Camera.projection}.
|
|
162
|
+
*/
|
|
163
|
+
getSynchProjection(): boolean;
|
|
162
164
|
}
|