@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.
@@ -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
- /** 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
- /** Initial visibility. */
12
- visible?: boolean;
13
- /** Whether the shadow of the cube is visible. */
14
- shadowVisible?: boolean;
15
- /** Whether the {@link Camera} flies or jumps to each selected axis or diagonal. */
16
- cameraFly?: string;
17
- /** 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. */
18
- cameraFitFOV?: string;
19
- /** When flying the {@link Camera} to each new axis or diagonal, how long, in seconds, that the Camera takes to get there. */
20
- cameraFlyDuration?: string;
21
- /** Custom uniform color for the faces of the NavCube. */
22
- color?: string;
23
- /** Custom color for the front face of the NavCube. Overrides ````color````. */
24
- frontColor?: string;
25
- /** Custom color for the back face of the NavCube. Overrides ````color````. */
26
- backColor?: string;
27
- /** Custom color for the left face of the NavCube. Overrides ````color````. */
28
- leftColor?: string;
29
- /** Custom color for the right face of the NavCube. Overrides ````color````. */
30
- rightColor?: string;
31
- /** Custom color for the top face of the NavCube. Overrides ````color````. */
32
- topColor?: string;
33
- /** Custom color for the bottom face of the NavCube. Overrides ````color````. */
34
- bottomColor?: string;
35
- /** Custom color for highlighting regions on the NavCube as we hover the pointer over them. */
36
- hoverColor?: string;
37
- /** Custom text color for labels of the NavCube. */
38
- textColor?: string;
39
- /** 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````. */
40
- fitVisible?: boolean;
41
- /** 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. */
42
- synchProjection?: boolean;
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
- * @constructor
52
- * @param {Viewer} viewer The Viewer.
53
- * @param {NavCubePluginConfiguration} cfg NavCubePlugin configuration.
54
- */
55
- constructor(viewer: Viewer, cfg?: NavCubePluginConfiguration);
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
- * Sets if the NavCube is visible.
59
- *
60
- * @param {Boolean} value Whether or not the NavCube is visible.
61
- */
62
- setVisible(value?: boolean): void;
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
- * Gets if the NavCube is visible.
66
- *
67
- * @return {Boolean} True when the NavCube is visible.
68
- */
69
- getVisible(): boolean;
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
- * Sets whether the axis, corner and edge-aligned views will fit the
73
- * view to the entire {@link Scene} or just to visible object-{@link Entity}s.
74
- *
75
- * Entitys are visible objects when {@link Entity.isObject} and {@link Entity.visible} are both ````true````.
76
- *
77
- * @param {Boolean} value Set ````true```` to fit only visible object-Entitys.
78
- */
79
- setFitVisible(value: boolean): void;
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
- * Gets whether the axis, corner and edge-aligned views will fit the
83
- * view to the entire {@link Scene} or just to visible object-{@link Entity}s.
84
- *
85
- * Entitys are visible objects when {@link Entity.isObject} and {@link Entity.visible} are both ````true````.
86
- *
87
- * @return {Boolean} True when fitting only visible object-Entitys.
88
- */
89
- getFitVisible(): boolean;
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
- * Sets whether the {@link Camera} flies or jumps to each selected axis or diagonal.
93
- *
94
- * Default is ````true````, to fly.
95
- *
96
- * @param {Boolean} value Set ````true```` to fly, else ````false```` to jump.
97
- */
98
- setCameraFly(value: boolean): void;
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
- * Gets whether the {@link Camera} flies or jumps to each selected axis or diagonal.
102
- *
103
- * Default is ````true````, to fly.
104
- *
105
- * @returns {Boolean} Returns ````true```` to fly, else ````false```` to jump.
106
- */
107
- getCameraFly(): boolean;
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
- * Sets how much of the field-of-view, in degrees, that the {@link Scene} should
111
- * fill the canvas when flying or jumping the {@link Camera} to each selected axis or diagonal.
112
- *
113
- * Default value is ````45````.
114
- *
115
- * @param {Number} value New FOV value.
116
- */
117
- setCameraFitFOV(value: number): void;
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
- * Gets how much of the field-of-view, in degrees, that the {@link Scene} should
121
- * fill the canvas when flying or jumping the {@link Camera} to each selected axis or diagonal.
122
- *
123
- * Default value is ````45````.
124
- *
125
- * @returns {Number} Current FOV value.
126
- */
127
- getCameraFitFOV(): number;
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
- * When flying the {@link Camera} to each new axis or diagonal, sets how long, in seconds, that the Camera takes to get there.
131
- *
132
- * Default is ````0.5````.
133
- *
134
- * @param {Boolean} value Camera flight duration in seconds.
135
- */
136
- setCameraFlyDuration(value: boolean): void;
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
- * When flying the {@link Camera} to each new axis or diagonal, gets how long, in seconds, that the Camera takes to get there.
140
- *
141
- * Default is ````0.5````.
142
- *
143
- * @returns {Boolean} Camera flight duration in seconds.
144
- */
145
- getCameraFlyDuration(): boolean;
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
- * Sets whether the NavCube switches between perspective and orthographic projections in synchrony with
149
- * the {@link Camera}. When ````false````, the NavCube will always be rendered with perspective projection.
150
- *
151
- * @param {Boolean} value Set ````true```` to keep NavCube projection synchronized with {@link Camera.projection}.
152
- */
153
- setSynchProjection(value: boolean): void;
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
- * Gets whether the NavCube switches between perspective and orthographic projections in synchrony with
157
- * the {@link Camera}. When ````false````, the NavCube will always be rendered with perspective projection.
158
- *
159
- * @return {Boolean} True when NavCube projection is synchronized with {@link Camera.projection}.
160
- */
161
- getSynchProjection(): boolean;
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
  }