@shapediver/viewer.viewport 3.16.7 → 3.16.9
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/implementation/PostProcessingApi.d.ts +37 -37
- package/dist/implementation/PostProcessingApi.js +149 -149
- package/dist/implementation/PostProcessingApi.js.map +1 -1
- package/dist/implementation/ViewportApi.d.ts +217 -217
- package/dist/implementation/ViewportApi.js +1003 -993
- package/dist/implementation/ViewportApi.js.map +1 -1
- package/dist/implementation/camera/AbstractCameraApi.d.ts +140 -140
- package/dist/implementation/camera/AbstractCameraApi.js +478 -478
- package/dist/implementation/camera/AbstractCameraApi.js.map +1 -1
- package/dist/implementation/camera/OrthographicCameraApi.d.ts +10 -10
- package/dist/implementation/camera/OrthographicCameraApi.js +47 -47
- package/dist/implementation/camera/OrthographicCameraApi.js.map +1 -1
- package/dist/implementation/camera/PerspectiveCameraApi.d.ts +10 -10
- package/dist/implementation/camera/PerspectiveCameraApi.js +46 -46
- package/dist/implementation/camera/PerspectiveCameraApi.js.map +1 -1
- package/dist/implementation/lights/AbstractLightApi.d.ts +19 -19
- package/dist/implementation/lights/AbstractLightApi.js +80 -80
- package/dist/implementation/lights/AbstractLightApi.js.map +1 -1
- package/dist/implementation/lights/LightSceneApi.d.ts +68 -68
- package/dist/implementation/lights/LightSceneApi.js +171 -171
- package/dist/implementation/lights/LightSceneApi.js.map +1 -1
- package/dist/implementation/lights/types/AmbientLightApi.d.ts +8 -8
- package/dist/implementation/lights/types/AmbientLightApi.js +26 -26
- package/dist/implementation/lights/types/AmbientLightApi.js.map +1 -1
- package/dist/implementation/lights/types/DirectionalLightApi.d.ts +17 -17
- package/dist/implementation/lights/types/DirectionalLightApi.js +76 -76
- package/dist/implementation/lights/types/DirectionalLightApi.js.map +1 -1
- package/dist/implementation/lights/types/HemisphereLightApi.d.ts +11 -11
- package/dist/implementation/lights/types/HemisphereLightApi.js +46 -46
- package/dist/implementation/lights/types/HemisphereLightApi.js.map +1 -1
- package/dist/implementation/lights/types/PointLightApi.d.ts +15 -15
- package/dist/implementation/lights/types/PointLightApi.js +66 -66
- package/dist/implementation/lights/types/PointLightApi.js.map +1 -1
- package/dist/implementation/lights/types/SpotLightApi.d.ts +21 -21
- package/dist/implementation/lights/types/SpotLightApi.js +96 -96
- package/dist/implementation/lights/types/SpotLightApi.js.map +1 -1
- package/dist/index.d.ts +52 -52
- package/dist/index.js +189 -189
- package/dist/interfaces/IPostProcessingApi.d.ts +183 -183
- package/dist/interfaces/IPostProcessingApi.js +2 -2
- package/dist/interfaces/IViewportApi.d.ts +699 -699
- package/dist/interfaces/IViewportApi.js +2 -2
- package/dist/interfaces/camera/ICameraApi.d.ts +256 -256
- package/dist/interfaces/camera/ICameraApi.js +2 -2
- package/dist/interfaces/camera/IOrthographicCameraApi.d.ts +13 -13
- package/dist/interfaces/camera/IOrthographicCameraApi.js +2 -2
- package/dist/interfaces/camera/IPerspectiveCameraApi.d.ts +12 -12
- package/dist/interfaces/camera/IPerspectiveCameraApi.js +2 -2
- package/dist/interfaces/lights/ILightApi.d.ts +35 -35
- package/dist/interfaces/lights/ILightApi.js +2 -2
- package/dist/interfaces/lights/ILightSceneApi.d.ts +138 -138
- package/dist/interfaces/lights/ILightSceneApi.js +2 -2
- package/dist/interfaces/lights/types/IAmbientLightApi.d.ts +6 -6
- package/dist/interfaces/lights/types/IAmbientLightApi.d.ts.map +1 -1
- package/dist/interfaces/lights/types/IAmbientLightApi.js +2 -2
- package/dist/interfaces/lights/types/IDirectionalLightApi.d.ts +24 -24
- package/dist/interfaces/lights/types/IDirectionalLightApi.js +2 -2
- package/dist/interfaces/lights/types/IHemisphereLightApi.d.ts +12 -12
- package/dist/interfaces/lights/types/IHemisphereLightApi.js +2 -2
- package/dist/interfaces/lights/types/IPointLightApi.d.ts +20 -20
- package/dist/interfaces/lights/types/IPointLightApi.js +2 -2
- package/dist/interfaces/lights/types/ISpotLightApi.d.ts +32 -32
- package/dist/interfaces/lights/types/ISpotLightApi.js +2 -2
- package/dist/main.d.ts +30 -30
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +91 -91
- package/dist/main.js.map +1 -1
- package/package.json +20 -20
|
@@ -1,479 +1,479 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
-
};
|
|
8
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
-
};
|
|
13
|
-
var _AbstractCameraApi_camera, _AbstractCameraApi_inputValidator, _AbstractCameraApi_logger, _AbstractCameraApi_viewportApi, _AbstractCameraApi_validateOptions;
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.AbstractCameraApi = void 0;
|
|
16
|
-
const viewer_shared_math_1 = require("@shapediver/viewer.shared.math");
|
|
17
|
-
const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
|
|
18
|
-
class AbstractCameraApi {
|
|
19
|
-
constructor(viewportApi, camera) {
|
|
20
|
-
_AbstractCameraApi_camera.set(this, void 0);
|
|
21
|
-
_AbstractCameraApi_inputValidator.set(this, viewer_shared_services_1.InputValidator.instance);
|
|
22
|
-
_AbstractCameraApi_logger.set(this, viewer_shared_services_1.Logger.instance);
|
|
23
|
-
_AbstractCameraApi_viewportApi.set(this, void 0);
|
|
24
|
-
this.scope = "AbstractCameraApi";
|
|
25
|
-
_AbstractCameraApi_validateOptions.set(this, (scope, options) => {
|
|
26
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, options, "object", false);
|
|
27
|
-
const prop = Object.assign({}, options);
|
|
28
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, prop.easing, "string", false);
|
|
29
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, prop.duration, "number", false);
|
|
30
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, prop.coordinates, "string", false);
|
|
31
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, prop.interpolation, "string", false);
|
|
32
|
-
});
|
|
33
|
-
__classPrivateFieldSet(this, _AbstractCameraApi_viewportApi, viewportApi, "f");
|
|
34
|
-
__classPrivateFieldSet(this, _AbstractCameraApi_camera, camera, "f");
|
|
35
|
-
}
|
|
36
|
-
get autoAdjust() {
|
|
37
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").autoAdjust;
|
|
38
|
-
}
|
|
39
|
-
set autoAdjust(value) {
|
|
40
|
-
const scope = "autoAdjust";
|
|
41
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
42
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").autoAdjust = value;
|
|
43
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
44
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
45
|
-
}
|
|
46
|
-
get autoRotationSpeed() {
|
|
47
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.autoRotationSpeed;
|
|
48
|
-
}
|
|
49
|
-
set autoRotationSpeed(value) {
|
|
50
|
-
const scope = "autoRotationSpeed";
|
|
51
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
52
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.autoRotationSpeed = value;
|
|
53
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
54
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
55
|
-
}
|
|
56
|
-
get cameraMovementDuration() {
|
|
57
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").cameraMovementDuration;
|
|
58
|
-
}
|
|
59
|
-
set cameraMovementDuration(value) {
|
|
60
|
-
const scope = "cameraMovementDuration";
|
|
61
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
62
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").cameraMovementDuration = value;
|
|
63
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
64
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
65
|
-
}
|
|
66
|
-
get cubePositionRestriction() {
|
|
67
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.cubePositionRestriction;
|
|
68
|
-
}
|
|
69
|
-
set cubePositionRestriction(value) {
|
|
70
|
-
const scope = "cubePositionRestriction";
|
|
71
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "object");
|
|
72
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.min, "vec3");
|
|
73
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.max, "vec3");
|
|
74
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.cubePositionRestriction = value;
|
|
75
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
76
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
77
|
-
}
|
|
78
|
-
get cubeTargetRestriction() {
|
|
79
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.cubeTargetRestriction;
|
|
80
|
-
}
|
|
81
|
-
set cubeTargetRestriction(value) {
|
|
82
|
-
const scope = "cubeTargetRestriction";
|
|
83
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "object");
|
|
84
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.min, "vec3");
|
|
85
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.max, "vec3");
|
|
86
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.cubeTargetRestriction = value;
|
|
87
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
88
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
89
|
-
}
|
|
90
|
-
get damping() {
|
|
91
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.damping;
|
|
92
|
-
}
|
|
93
|
-
set damping(value) {
|
|
94
|
-
const scope = "damping";
|
|
95
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
96
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.damping = value;
|
|
97
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
98
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
99
|
-
}
|
|
100
|
-
get defaultPosition() {
|
|
101
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").defaultPosition;
|
|
102
|
-
}
|
|
103
|
-
set defaultPosition(value) {
|
|
104
|
-
const scope = "defaultPosition";
|
|
105
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "vec3");
|
|
106
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").defaultPosition = value;
|
|
107
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
108
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
109
|
-
}
|
|
110
|
-
get defaultTarget() {
|
|
111
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").defaultTarget;
|
|
112
|
-
}
|
|
113
|
-
set defaultTarget(value) {
|
|
114
|
-
const scope = "defaultTarget";
|
|
115
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "vec3");
|
|
116
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").defaultTarget = value;
|
|
117
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
118
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
119
|
-
}
|
|
120
|
-
get enableAutoRotation() {
|
|
121
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableAutoRotation;
|
|
122
|
-
}
|
|
123
|
-
set enableAutoRotation(value) {
|
|
124
|
-
const scope = "enableAutoRotation";
|
|
125
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
126
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableAutoRotation = value;
|
|
127
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
128
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
129
|
-
}
|
|
130
|
-
get enableAzimuthRotation() {
|
|
131
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableAzimuthRotation;
|
|
132
|
-
}
|
|
133
|
-
set enableAzimuthRotation(value) {
|
|
134
|
-
const scope = "enableAzimuthRotation";
|
|
135
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
136
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableAzimuthRotation = value;
|
|
137
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
138
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
139
|
-
}
|
|
140
|
-
get enableKeyPan() {
|
|
141
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableKeyPan;
|
|
142
|
-
}
|
|
143
|
-
set enableKeyPan(value) {
|
|
144
|
-
const scope = "enableKeyPan";
|
|
145
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
146
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableKeyPan = value;
|
|
147
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
148
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
149
|
-
}
|
|
150
|
-
get enableObjectControls() {
|
|
151
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableObjectControls;
|
|
152
|
-
}
|
|
153
|
-
set enableObjectControls(value) {
|
|
154
|
-
const scope = "enableObjectControls";
|
|
155
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
156
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableObjectControls = value;
|
|
157
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
158
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
159
|
-
}
|
|
160
|
-
get enablePan() {
|
|
161
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enablePan;
|
|
162
|
-
}
|
|
163
|
-
set enablePan(value) {
|
|
164
|
-
const scope = "enablePan";
|
|
165
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
166
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enablePan = value;
|
|
167
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
168
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
169
|
-
}
|
|
170
|
-
get enablePolarRotation() {
|
|
171
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enablePolarRotation;
|
|
172
|
-
}
|
|
173
|
-
set enablePolarRotation(value) {
|
|
174
|
-
const scope = "enablePolarRotation";
|
|
175
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
176
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enablePolarRotation = value;
|
|
177
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
178
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
179
|
-
}
|
|
180
|
-
get enableRotation() {
|
|
181
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableRotation;
|
|
182
|
-
}
|
|
183
|
-
set enableRotation(value) {
|
|
184
|
-
const scope = "enableRotation";
|
|
185
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
186
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableRotation = value;
|
|
187
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
188
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
189
|
-
}
|
|
190
|
-
get enableTurntableControls() {
|
|
191
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableTurntableControls;
|
|
192
|
-
}
|
|
193
|
-
set enableTurntableControls(value) {
|
|
194
|
-
const scope = "enableTurntableControls";
|
|
195
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
196
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableTurntableControls = value;
|
|
197
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
198
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
199
|
-
}
|
|
200
|
-
get enableZoom() {
|
|
201
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableZoom;
|
|
202
|
-
}
|
|
203
|
-
set enableZoom(value) {
|
|
204
|
-
const scope = "enableZoom";
|
|
205
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
206
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableZoom = value;
|
|
207
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
208
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
209
|
-
}
|
|
210
|
-
get enabled() {
|
|
211
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enabled;
|
|
212
|
-
}
|
|
213
|
-
set enabled(value) {
|
|
214
|
-
const scope = "enabled";
|
|
215
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
216
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enabled = value;
|
|
217
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
218
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
219
|
-
}
|
|
220
|
-
get id() {
|
|
221
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").id;
|
|
222
|
-
}
|
|
223
|
-
get initialAutoAdjust() {
|
|
224
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").initialAutoAdjust;
|
|
225
|
-
}
|
|
226
|
-
set initialAutoAdjust(value) {
|
|
227
|
-
const scope = "initialAutoAdjust";
|
|
228
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
229
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").initialAutoAdjust = value;
|
|
230
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
231
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
232
|
-
}
|
|
233
|
-
get isDefault() {
|
|
234
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").isDefault;
|
|
235
|
-
}
|
|
236
|
-
get keyPanSpeed() {
|
|
237
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.keyPanSpeed;
|
|
238
|
-
}
|
|
239
|
-
set keyPanSpeed(value) {
|
|
240
|
-
const scope = "keyPanSpeed";
|
|
241
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
242
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.keyPanSpeed = value;
|
|
243
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
244
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
245
|
-
}
|
|
246
|
-
get movementSmoothness() {
|
|
247
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.movementSmoothness;
|
|
248
|
-
}
|
|
249
|
-
set movementSmoothness(value) {
|
|
250
|
-
const scope = "movementSmoothness";
|
|
251
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
252
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.movementSmoothness = value;
|
|
253
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
254
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
255
|
-
}
|
|
256
|
-
get name() {
|
|
257
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").name;
|
|
258
|
-
}
|
|
259
|
-
set name(value) {
|
|
260
|
-
const scope = "name";
|
|
261
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "string", false);
|
|
262
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").name = value;
|
|
263
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
264
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
265
|
-
}
|
|
266
|
-
get objectControlsCenter() {
|
|
267
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.objectControlsCenter;
|
|
268
|
-
}
|
|
269
|
-
set objectControlsCenter(value) {
|
|
270
|
-
const scope = "objectControlsCenter";
|
|
271
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "vec3");
|
|
272
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.objectControlsCenter = value;
|
|
273
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
274
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
275
|
-
}
|
|
276
|
-
get order() {
|
|
277
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").order;
|
|
278
|
-
}
|
|
279
|
-
set order(value) {
|
|
280
|
-
const scope = "order";
|
|
281
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number", false);
|
|
282
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").order = value;
|
|
283
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
284
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
285
|
-
}
|
|
286
|
-
get panSpeed() {
|
|
287
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.panSpeed;
|
|
288
|
-
}
|
|
289
|
-
set panSpeed(value) {
|
|
290
|
-
const scope = "panSpeed";
|
|
291
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
292
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.panSpeed = value;
|
|
293
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
294
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
295
|
-
}
|
|
296
|
-
get position() {
|
|
297
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").position;
|
|
298
|
-
}
|
|
299
|
-
set position(value) {
|
|
300
|
-
const scope = "position";
|
|
301
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "vec3");
|
|
302
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").position = value;
|
|
303
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
304
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
305
|
-
}
|
|
306
|
-
get revertAtMouseUp() {
|
|
307
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").revertAtMouseUp;
|
|
308
|
-
}
|
|
309
|
-
set revertAtMouseUp(value) {
|
|
310
|
-
const scope = "revertAtMouseUp";
|
|
311
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
312
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").revertAtMouseUp = value;
|
|
313
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
314
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
315
|
-
}
|
|
316
|
-
get revertAtMouseUpDuration() {
|
|
317
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").revertAtMouseUpDuration;
|
|
318
|
-
}
|
|
319
|
-
set revertAtMouseUpDuration(value) {
|
|
320
|
-
const scope = "revertAtMouseUpDuration";
|
|
321
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
322
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").revertAtMouseUpDuration = value;
|
|
323
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
324
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
325
|
-
}
|
|
326
|
-
get rotationRestriction() {
|
|
327
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.rotationRestriction;
|
|
328
|
-
}
|
|
329
|
-
set rotationRestriction(value) {
|
|
330
|
-
const scope = "rotationRestriction";
|
|
331
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "object");
|
|
332
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.minAzimuthAngle, "number");
|
|
333
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.maxAzimuthAngle, "number");
|
|
334
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.minPolarAngle, "number");
|
|
335
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.maxPolarAngle, "number");
|
|
336
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.rotationRestriction = value;
|
|
337
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
338
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
339
|
-
}
|
|
340
|
-
get rotationSpeed() {
|
|
341
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.rotationSpeed;
|
|
342
|
-
}
|
|
343
|
-
set rotationSpeed(value) {
|
|
344
|
-
const scope = "rotationSpeed";
|
|
345
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
346
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.rotationSpeed = value;
|
|
347
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
348
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
349
|
-
}
|
|
350
|
-
get spherePositionRestriction() {
|
|
351
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.spherePositionRestriction;
|
|
352
|
-
}
|
|
353
|
-
set spherePositionRestriction(value) {
|
|
354
|
-
const scope = "spherePositionRestriction";
|
|
355
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "object");
|
|
356
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.center, "vec3");
|
|
357
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.radius, "number");
|
|
358
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.spherePositionRestriction = value;
|
|
359
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
360
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
361
|
-
}
|
|
362
|
-
get sphereTargetRestriction() {
|
|
363
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.sphereTargetRestriction;
|
|
364
|
-
}
|
|
365
|
-
set sphereTargetRestriction(value) {
|
|
366
|
-
const scope = "sphereTargetRestriction";
|
|
367
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "object");
|
|
368
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.center, "vec3");
|
|
369
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.radius, "number");
|
|
370
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.sphereTargetRestriction = value;
|
|
371
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
372
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
373
|
-
}
|
|
374
|
-
get target() {
|
|
375
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").target;
|
|
376
|
-
}
|
|
377
|
-
set target(value) {
|
|
378
|
-
const scope = "target";
|
|
379
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "vec3");
|
|
380
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").target = value;
|
|
381
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
382
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
383
|
-
}
|
|
384
|
-
get turntableCenter() {
|
|
385
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.turntableCenter;
|
|
386
|
-
}
|
|
387
|
-
set turntableCenter(value) {
|
|
388
|
-
const scope = "turntableCenter";
|
|
389
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "vec3");
|
|
390
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.turntableCenter = value;
|
|
391
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
392
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
393
|
-
}
|
|
394
|
-
get type() {
|
|
395
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").type;
|
|
396
|
-
}
|
|
397
|
-
get zoomRestriction() {
|
|
398
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.zoomRestriction;
|
|
399
|
-
}
|
|
400
|
-
set zoomRestriction(value) {
|
|
401
|
-
const scope = "zoomRestriction";
|
|
402
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "object");
|
|
403
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.minDistance, "number");
|
|
404
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.maxDistance, "number");
|
|
405
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.zoomRestriction = value;
|
|
406
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
407
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
408
|
-
}
|
|
409
|
-
get zoomSpeed() {
|
|
410
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.zoomSpeed;
|
|
411
|
-
}
|
|
412
|
-
set zoomSpeed(value) {
|
|
413
|
-
const scope = "zoomSpeed";
|
|
414
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
415
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.zoomSpeed = value;
|
|
416
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
417
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
418
|
-
}
|
|
419
|
-
get zoomToFactor() {
|
|
420
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").zoomExtentsFactor;
|
|
421
|
-
}
|
|
422
|
-
set zoomToFactor(value) {
|
|
423
|
-
const scope = "zoomToFactor";
|
|
424
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
425
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").zoomExtentsFactor = value;
|
|
426
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
427
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
428
|
-
}
|
|
429
|
-
animate(path, options) {
|
|
430
|
-
const scope = "animate";
|
|
431
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, path, "array");
|
|
432
|
-
for (let i = 0; i < path.length; i++) {
|
|
433
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, path[i].position, "vec3");
|
|
434
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, path[i].target, "vec3");
|
|
435
|
-
}
|
|
436
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_validateOptions, "f").call(this, scope, options);
|
|
437
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").animate(path, options);
|
|
438
|
-
}
|
|
439
|
-
calculateZoomTo(zoomTarget, startingPosition, startingTarget) {
|
|
440
|
-
const scope = "calculateZoomTo";
|
|
441
|
-
if (zoomTarget !== undefined && !(zoomTarget instanceof viewer_shared_math_1.Box))
|
|
442
|
-
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${zoomTarget} is not of type Box.`, zoomTarget, "Box");
|
|
443
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, startingPosition, "vec3", false);
|
|
444
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, startingTarget, "vec3", false);
|
|
445
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").calculateZoomTo(zoomTarget, startingPosition, startingTarget);
|
|
446
|
-
}
|
|
447
|
-
project(p) {
|
|
448
|
-
const scope = "project";
|
|
449
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, p, "vec3");
|
|
450
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").project(p);
|
|
451
|
-
}
|
|
452
|
-
reset(options) {
|
|
453
|
-
const scope = "reset";
|
|
454
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_validateOptions, "f").call(this, scope, options);
|
|
455
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").reset(options);
|
|
456
|
-
}
|
|
457
|
-
set(position, target, options) {
|
|
458
|
-
const scope = "set";
|
|
459
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, position, "vec3", false);
|
|
460
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, target, "vec3", false);
|
|
461
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_validateOptions, "f").call(this, scope, options);
|
|
462
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").set(position, target, options);
|
|
463
|
-
}
|
|
464
|
-
unproject(p) {
|
|
465
|
-
const scope = "unproject";
|
|
466
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, p, "vec3", false);
|
|
467
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").unproject(p);
|
|
468
|
-
}
|
|
469
|
-
zoomTo(zoomTarget, options) {
|
|
470
|
-
const scope = "zoomTo";
|
|
471
|
-
if (zoomTarget !== undefined && !(zoomTarget instanceof viewer_shared_math_1.Box))
|
|
472
|
-
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${zoomTarget} is not of type Box.`, zoomTarget, "Box");
|
|
473
|
-
__classPrivateFieldGet(this, _AbstractCameraApi_validateOptions, "f").call(this, scope, options);
|
|
474
|
-
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").zoomTo(zoomTarget, options);
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
exports.AbstractCameraApi = AbstractCameraApi;
|
|
478
|
-
_AbstractCameraApi_camera = new WeakMap(), _AbstractCameraApi_inputValidator = new WeakMap(), _AbstractCameraApi_logger = new WeakMap(), _AbstractCameraApi_viewportApi = new WeakMap(), _AbstractCameraApi_validateOptions = new WeakMap();
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var _AbstractCameraApi_camera, _AbstractCameraApi_inputValidator, _AbstractCameraApi_logger, _AbstractCameraApi_viewportApi, _AbstractCameraApi_validateOptions;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AbstractCameraApi = void 0;
|
|
16
|
+
const viewer_shared_math_1 = require("@shapediver/viewer.shared.math");
|
|
17
|
+
const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
|
|
18
|
+
class AbstractCameraApi {
|
|
19
|
+
constructor(viewportApi, camera) {
|
|
20
|
+
_AbstractCameraApi_camera.set(this, void 0);
|
|
21
|
+
_AbstractCameraApi_inputValidator.set(this, viewer_shared_services_1.InputValidator.instance);
|
|
22
|
+
_AbstractCameraApi_logger.set(this, viewer_shared_services_1.Logger.instance);
|
|
23
|
+
_AbstractCameraApi_viewportApi.set(this, void 0);
|
|
24
|
+
this.scope = "AbstractCameraApi";
|
|
25
|
+
_AbstractCameraApi_validateOptions.set(this, (scope, options) => {
|
|
26
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, options, "object", false);
|
|
27
|
+
const prop = Object.assign({}, options);
|
|
28
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, prop.easing, "string", false);
|
|
29
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, prop.duration, "number", false);
|
|
30
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, prop.coordinates, "string", false);
|
|
31
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, prop.interpolation, "string", false);
|
|
32
|
+
});
|
|
33
|
+
__classPrivateFieldSet(this, _AbstractCameraApi_viewportApi, viewportApi, "f");
|
|
34
|
+
__classPrivateFieldSet(this, _AbstractCameraApi_camera, camera, "f");
|
|
35
|
+
}
|
|
36
|
+
get autoAdjust() {
|
|
37
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").autoAdjust;
|
|
38
|
+
}
|
|
39
|
+
set autoAdjust(value) {
|
|
40
|
+
const scope = "autoAdjust";
|
|
41
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
42
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").autoAdjust = value;
|
|
43
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
44
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
45
|
+
}
|
|
46
|
+
get autoRotationSpeed() {
|
|
47
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.autoRotationSpeed;
|
|
48
|
+
}
|
|
49
|
+
set autoRotationSpeed(value) {
|
|
50
|
+
const scope = "autoRotationSpeed";
|
|
51
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
52
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.autoRotationSpeed = value;
|
|
53
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
54
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
55
|
+
}
|
|
56
|
+
get cameraMovementDuration() {
|
|
57
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").cameraMovementDuration;
|
|
58
|
+
}
|
|
59
|
+
set cameraMovementDuration(value) {
|
|
60
|
+
const scope = "cameraMovementDuration";
|
|
61
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
62
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").cameraMovementDuration = value;
|
|
63
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
64
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
65
|
+
}
|
|
66
|
+
get cubePositionRestriction() {
|
|
67
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.cubePositionRestriction;
|
|
68
|
+
}
|
|
69
|
+
set cubePositionRestriction(value) {
|
|
70
|
+
const scope = "cubePositionRestriction";
|
|
71
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "object");
|
|
72
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.min, "vec3");
|
|
73
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.max, "vec3");
|
|
74
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.cubePositionRestriction = value;
|
|
75
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
76
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
77
|
+
}
|
|
78
|
+
get cubeTargetRestriction() {
|
|
79
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.cubeTargetRestriction;
|
|
80
|
+
}
|
|
81
|
+
set cubeTargetRestriction(value) {
|
|
82
|
+
const scope = "cubeTargetRestriction";
|
|
83
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "object");
|
|
84
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.min, "vec3");
|
|
85
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.max, "vec3");
|
|
86
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.cubeTargetRestriction = value;
|
|
87
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
88
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
89
|
+
}
|
|
90
|
+
get damping() {
|
|
91
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.damping;
|
|
92
|
+
}
|
|
93
|
+
set damping(value) {
|
|
94
|
+
const scope = "damping";
|
|
95
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
96
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.damping = value;
|
|
97
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
98
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
99
|
+
}
|
|
100
|
+
get defaultPosition() {
|
|
101
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").defaultPosition;
|
|
102
|
+
}
|
|
103
|
+
set defaultPosition(value) {
|
|
104
|
+
const scope = "defaultPosition";
|
|
105
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "vec3");
|
|
106
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").defaultPosition = value;
|
|
107
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
108
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
109
|
+
}
|
|
110
|
+
get defaultTarget() {
|
|
111
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").defaultTarget;
|
|
112
|
+
}
|
|
113
|
+
set defaultTarget(value) {
|
|
114
|
+
const scope = "defaultTarget";
|
|
115
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "vec3");
|
|
116
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").defaultTarget = value;
|
|
117
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
118
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
119
|
+
}
|
|
120
|
+
get enableAutoRotation() {
|
|
121
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableAutoRotation;
|
|
122
|
+
}
|
|
123
|
+
set enableAutoRotation(value) {
|
|
124
|
+
const scope = "enableAutoRotation";
|
|
125
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
126
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableAutoRotation = value;
|
|
127
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
128
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
129
|
+
}
|
|
130
|
+
get enableAzimuthRotation() {
|
|
131
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableAzimuthRotation;
|
|
132
|
+
}
|
|
133
|
+
set enableAzimuthRotation(value) {
|
|
134
|
+
const scope = "enableAzimuthRotation";
|
|
135
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
136
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableAzimuthRotation = value;
|
|
137
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
138
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
139
|
+
}
|
|
140
|
+
get enableKeyPan() {
|
|
141
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableKeyPan;
|
|
142
|
+
}
|
|
143
|
+
set enableKeyPan(value) {
|
|
144
|
+
const scope = "enableKeyPan";
|
|
145
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
146
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableKeyPan = value;
|
|
147
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
148
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
149
|
+
}
|
|
150
|
+
get enableObjectControls() {
|
|
151
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableObjectControls;
|
|
152
|
+
}
|
|
153
|
+
set enableObjectControls(value) {
|
|
154
|
+
const scope = "enableObjectControls";
|
|
155
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
156
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableObjectControls = value;
|
|
157
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
158
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
159
|
+
}
|
|
160
|
+
get enablePan() {
|
|
161
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enablePan;
|
|
162
|
+
}
|
|
163
|
+
set enablePan(value) {
|
|
164
|
+
const scope = "enablePan";
|
|
165
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
166
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enablePan = value;
|
|
167
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
168
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
169
|
+
}
|
|
170
|
+
get enablePolarRotation() {
|
|
171
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enablePolarRotation;
|
|
172
|
+
}
|
|
173
|
+
set enablePolarRotation(value) {
|
|
174
|
+
const scope = "enablePolarRotation";
|
|
175
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
176
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enablePolarRotation = value;
|
|
177
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
178
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
179
|
+
}
|
|
180
|
+
get enableRotation() {
|
|
181
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableRotation;
|
|
182
|
+
}
|
|
183
|
+
set enableRotation(value) {
|
|
184
|
+
const scope = "enableRotation";
|
|
185
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
186
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableRotation = value;
|
|
187
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
188
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
189
|
+
}
|
|
190
|
+
get enableTurntableControls() {
|
|
191
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableTurntableControls;
|
|
192
|
+
}
|
|
193
|
+
set enableTurntableControls(value) {
|
|
194
|
+
const scope = "enableTurntableControls";
|
|
195
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
196
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableTurntableControls = value;
|
|
197
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
198
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
199
|
+
}
|
|
200
|
+
get enableZoom() {
|
|
201
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableZoom;
|
|
202
|
+
}
|
|
203
|
+
set enableZoom(value) {
|
|
204
|
+
const scope = "enableZoom";
|
|
205
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
206
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enableZoom = value;
|
|
207
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
208
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
209
|
+
}
|
|
210
|
+
get enabled() {
|
|
211
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enabled;
|
|
212
|
+
}
|
|
213
|
+
set enabled(value) {
|
|
214
|
+
const scope = "enabled";
|
|
215
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
216
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.enabled = value;
|
|
217
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
218
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
219
|
+
}
|
|
220
|
+
get id() {
|
|
221
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").id;
|
|
222
|
+
}
|
|
223
|
+
get initialAutoAdjust() {
|
|
224
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").initialAutoAdjust;
|
|
225
|
+
}
|
|
226
|
+
set initialAutoAdjust(value) {
|
|
227
|
+
const scope = "initialAutoAdjust";
|
|
228
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
229
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").initialAutoAdjust = value;
|
|
230
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
231
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
232
|
+
}
|
|
233
|
+
get isDefault() {
|
|
234
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").isDefault;
|
|
235
|
+
}
|
|
236
|
+
get keyPanSpeed() {
|
|
237
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.keyPanSpeed;
|
|
238
|
+
}
|
|
239
|
+
set keyPanSpeed(value) {
|
|
240
|
+
const scope = "keyPanSpeed";
|
|
241
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
242
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.keyPanSpeed = value;
|
|
243
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
244
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
245
|
+
}
|
|
246
|
+
get movementSmoothness() {
|
|
247
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.movementSmoothness;
|
|
248
|
+
}
|
|
249
|
+
set movementSmoothness(value) {
|
|
250
|
+
const scope = "movementSmoothness";
|
|
251
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
252
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.movementSmoothness = value;
|
|
253
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
254
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
255
|
+
}
|
|
256
|
+
get name() {
|
|
257
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").name;
|
|
258
|
+
}
|
|
259
|
+
set name(value) {
|
|
260
|
+
const scope = "name";
|
|
261
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "string", false);
|
|
262
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").name = value;
|
|
263
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
264
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
265
|
+
}
|
|
266
|
+
get objectControlsCenter() {
|
|
267
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.objectControlsCenter;
|
|
268
|
+
}
|
|
269
|
+
set objectControlsCenter(value) {
|
|
270
|
+
const scope = "objectControlsCenter";
|
|
271
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "vec3");
|
|
272
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.objectControlsCenter = value;
|
|
273
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
274
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
275
|
+
}
|
|
276
|
+
get order() {
|
|
277
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").order;
|
|
278
|
+
}
|
|
279
|
+
set order(value) {
|
|
280
|
+
const scope = "order";
|
|
281
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number", false);
|
|
282
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").order = value;
|
|
283
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
284
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
285
|
+
}
|
|
286
|
+
get panSpeed() {
|
|
287
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.panSpeed;
|
|
288
|
+
}
|
|
289
|
+
set panSpeed(value) {
|
|
290
|
+
const scope = "panSpeed";
|
|
291
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
292
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.panSpeed = value;
|
|
293
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
294
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
295
|
+
}
|
|
296
|
+
get position() {
|
|
297
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").position;
|
|
298
|
+
}
|
|
299
|
+
set position(value) {
|
|
300
|
+
const scope = "position";
|
|
301
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "vec3");
|
|
302
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").position = value;
|
|
303
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
304
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
305
|
+
}
|
|
306
|
+
get revertAtMouseUp() {
|
|
307
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").revertAtMouseUp;
|
|
308
|
+
}
|
|
309
|
+
set revertAtMouseUp(value) {
|
|
310
|
+
const scope = "revertAtMouseUp";
|
|
311
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "boolean");
|
|
312
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").revertAtMouseUp = value;
|
|
313
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
314
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
315
|
+
}
|
|
316
|
+
get revertAtMouseUpDuration() {
|
|
317
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").revertAtMouseUpDuration;
|
|
318
|
+
}
|
|
319
|
+
set revertAtMouseUpDuration(value) {
|
|
320
|
+
const scope = "revertAtMouseUpDuration";
|
|
321
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
322
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").revertAtMouseUpDuration = value;
|
|
323
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
324
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
325
|
+
}
|
|
326
|
+
get rotationRestriction() {
|
|
327
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.rotationRestriction;
|
|
328
|
+
}
|
|
329
|
+
set rotationRestriction(value) {
|
|
330
|
+
const scope = "rotationRestriction";
|
|
331
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "object");
|
|
332
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.minAzimuthAngle, "number");
|
|
333
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.maxAzimuthAngle, "number");
|
|
334
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.minPolarAngle, "number");
|
|
335
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.maxPolarAngle, "number");
|
|
336
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.rotationRestriction = value;
|
|
337
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
338
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
339
|
+
}
|
|
340
|
+
get rotationSpeed() {
|
|
341
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.rotationSpeed;
|
|
342
|
+
}
|
|
343
|
+
set rotationSpeed(value) {
|
|
344
|
+
const scope = "rotationSpeed";
|
|
345
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
346
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.rotationSpeed = value;
|
|
347
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
348
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
349
|
+
}
|
|
350
|
+
get spherePositionRestriction() {
|
|
351
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.spherePositionRestriction;
|
|
352
|
+
}
|
|
353
|
+
set spherePositionRestriction(value) {
|
|
354
|
+
const scope = "spherePositionRestriction";
|
|
355
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "object");
|
|
356
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.center, "vec3");
|
|
357
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.radius, "number");
|
|
358
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.spherePositionRestriction = value;
|
|
359
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
360
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
361
|
+
}
|
|
362
|
+
get sphereTargetRestriction() {
|
|
363
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.sphereTargetRestriction;
|
|
364
|
+
}
|
|
365
|
+
set sphereTargetRestriction(value) {
|
|
366
|
+
const scope = "sphereTargetRestriction";
|
|
367
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "object");
|
|
368
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.center, "vec3");
|
|
369
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.radius, "number");
|
|
370
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.sphereTargetRestriction = value;
|
|
371
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
372
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
373
|
+
}
|
|
374
|
+
get target() {
|
|
375
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").target;
|
|
376
|
+
}
|
|
377
|
+
set target(value) {
|
|
378
|
+
const scope = "target";
|
|
379
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "vec3");
|
|
380
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").target = value;
|
|
381
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
382
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
383
|
+
}
|
|
384
|
+
get turntableCenter() {
|
|
385
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.turntableCenter;
|
|
386
|
+
}
|
|
387
|
+
set turntableCenter(value) {
|
|
388
|
+
const scope = "turntableCenter";
|
|
389
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "vec3");
|
|
390
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.turntableCenter = value;
|
|
391
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
392
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
393
|
+
}
|
|
394
|
+
get type() {
|
|
395
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").type;
|
|
396
|
+
}
|
|
397
|
+
get zoomRestriction() {
|
|
398
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.zoomRestriction;
|
|
399
|
+
}
|
|
400
|
+
set zoomRestriction(value) {
|
|
401
|
+
const scope = "zoomRestriction";
|
|
402
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "object");
|
|
403
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.minDistance, "number");
|
|
404
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value.maxDistance, "number");
|
|
405
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.zoomRestriction = value;
|
|
406
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
407
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
408
|
+
}
|
|
409
|
+
get zoomSpeed() {
|
|
410
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.zoomSpeed;
|
|
411
|
+
}
|
|
412
|
+
set zoomSpeed(value) {
|
|
413
|
+
const scope = "zoomSpeed";
|
|
414
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
415
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").controls.zoomSpeed = value;
|
|
416
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
417
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
418
|
+
}
|
|
419
|
+
get zoomToFactor() {
|
|
420
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").zoomExtentsFactor;
|
|
421
|
+
}
|
|
422
|
+
set zoomToFactor(value) {
|
|
423
|
+
const scope = "zoomToFactor";
|
|
424
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number");
|
|
425
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").zoomExtentsFactor = value;
|
|
426
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`);
|
|
427
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_viewportApi, "f").update();
|
|
428
|
+
}
|
|
429
|
+
animate(path, options) {
|
|
430
|
+
const scope = "animate";
|
|
431
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, path, "array");
|
|
432
|
+
for (let i = 0; i < path.length; i++) {
|
|
433
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, path[i].position, "vec3");
|
|
434
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, path[i].target, "vec3");
|
|
435
|
+
}
|
|
436
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_validateOptions, "f").call(this, scope, options);
|
|
437
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").animate(path, options);
|
|
438
|
+
}
|
|
439
|
+
calculateZoomTo(zoomTarget, startingPosition, startingTarget) {
|
|
440
|
+
const scope = "calculateZoomTo";
|
|
441
|
+
if (zoomTarget !== undefined && !(zoomTarget instanceof viewer_shared_math_1.Box))
|
|
442
|
+
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${zoomTarget} is not of type Box.`, zoomTarget, "Box");
|
|
443
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, startingPosition, "vec3", false);
|
|
444
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, startingTarget, "vec3", false);
|
|
445
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").calculateZoomTo(zoomTarget, startingPosition, startingTarget);
|
|
446
|
+
}
|
|
447
|
+
project(p) {
|
|
448
|
+
const scope = "project";
|
|
449
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, p, "vec3");
|
|
450
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").project(p);
|
|
451
|
+
}
|
|
452
|
+
reset(options) {
|
|
453
|
+
const scope = "reset";
|
|
454
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_validateOptions, "f").call(this, scope, options);
|
|
455
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").reset(options);
|
|
456
|
+
}
|
|
457
|
+
set(position, target, options) {
|
|
458
|
+
const scope = "set";
|
|
459
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, position, "vec3", false);
|
|
460
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, target, "vec3", false);
|
|
461
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_validateOptions, "f").call(this, scope, options);
|
|
462
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").set(position, target, options);
|
|
463
|
+
}
|
|
464
|
+
unproject(p) {
|
|
465
|
+
const scope = "unproject";
|
|
466
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, p, "vec3", false);
|
|
467
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").unproject(p);
|
|
468
|
+
}
|
|
469
|
+
zoomTo(zoomTarget, options) {
|
|
470
|
+
const scope = "zoomTo";
|
|
471
|
+
if (zoomTarget !== undefined && !(zoomTarget instanceof viewer_shared_math_1.Box))
|
|
472
|
+
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${zoomTarget} is not of type Box.`, zoomTarget, "Box");
|
|
473
|
+
__classPrivateFieldGet(this, _AbstractCameraApi_validateOptions, "f").call(this, scope, options);
|
|
474
|
+
return __classPrivateFieldGet(this, _AbstractCameraApi_camera, "f").zoomTo(zoomTarget, options);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
exports.AbstractCameraApi = AbstractCameraApi;
|
|
478
|
+
_AbstractCameraApi_camera = new WeakMap(), _AbstractCameraApi_inputValidator = new WeakMap(), _AbstractCameraApi_logger = new WeakMap(), _AbstractCameraApi_viewportApi = new WeakMap(), _AbstractCameraApi_validateOptions = new WeakMap();
|
|
479
479
|
//# sourceMappingURL=AbstractCameraApi.js.map
|