@shapediver/viewer.rendering-engine.camera-engine 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/CameraEngine.d.ts +42 -42
- package/dist/implementation/CameraEngine.js +607 -607
- package/dist/implementation/CameraEngine.js.map +1 -1
- package/dist/implementation/camera/AbstractCamera.d.ts +90 -90
- package/dist/implementation/camera/AbstractCamera.js +354 -354
- package/dist/implementation/camera/AbstractCamera.js.map +1 -1
- package/dist/implementation/camera/OrthographicCamera.d.ts +37 -37
- package/dist/implementation/camera/OrthographicCamera.js +268 -268
- package/dist/implementation/camera/OrthographicCamera.js.map +1 -1
- package/dist/implementation/camera/PerspectiveCamera.d.ts +28 -28
- package/dist/implementation/camera/PerspectiveCamera.d.ts.map +1 -1
- package/dist/implementation/camera/PerspectiveCamera.js +250 -252
- package/dist/implementation/camera/PerspectiveCamera.js.map +1 -1
- package/dist/implementation/controls/AbstractCameraControls.d.ts +217 -217
- package/dist/implementation/controls/AbstractCameraControls.js +635 -635
- package/dist/implementation/controls/AbstractCameraControls.js.map +1 -1
- package/dist/implementation/controls/CameraControlsEventDistribution.d.ts +39 -39
- package/dist/implementation/controls/CameraControlsEventDistribution.d.ts.map +1 -1
- package/dist/implementation/controls/CameraControlsEventDistribution.js +287 -287
- package/dist/implementation/controls/CameraControlsEventDistribution.js.map +1 -1
- package/dist/implementation/controls/CameraControlsLogic.d.ts +36 -36
- package/dist/implementation/controls/CameraControlsLogic.js +530 -530
- package/dist/implementation/controls/CameraControlsLogic.js.map +1 -1
- package/dist/implementation/controls/OrthographicCameraControls.d.ts +7 -7
- package/dist/implementation/controls/OrthographicCameraControls.js +34 -34
- package/dist/implementation/controls/PerspectiveCameraControls.d.ts +7 -7
- package/dist/implementation/controls/PerspectiveCameraControls.js +34 -34
- package/dist/implementation/interpolation/CameraInterpolationManager.d.ts +22 -22
- package/dist/implementation/interpolation/CameraInterpolationManager.js +165 -155
- package/dist/implementation/interpolation/CameraInterpolationManager.js.map +1 -1
- package/dist/implementation/interpolation/interpolationMethods/CameraCylindricalInterpolation.d.ts +36 -36
- package/dist/implementation/interpolation/interpolationMethods/CameraCylindricalInterpolation.js +57 -57
- package/dist/implementation/interpolation/interpolationMethods/CameraLinearInterpolation.d.ts +26 -26
- package/dist/implementation/interpolation/interpolationMethods/CameraLinearInterpolation.js +31 -31
- package/dist/implementation/interpolation/interpolationMethods/CameraMultipleInterpolation.d.ts +35 -35
- package/dist/implementation/interpolation/interpolationMethods/CameraMultipleInterpolation.js +45 -45
- package/dist/implementation/interpolation/interpolationMethods/CameraMultipleInterpolation.js.map +1 -1
- package/dist/implementation/interpolation/interpolationMethods/CameraOrthographicInterpolation.d.ts +26 -26
- package/dist/implementation/interpolation/interpolationMethods/CameraOrthographicInterpolation.js +31 -31
- package/dist/implementation/interpolation/interpolationMethods/CameraSphericalInterpolation.d.ts +32 -32
- package/dist/implementation/interpolation/interpolationMethods/CameraSphericalInterpolation.js +42 -42
- package/dist/index.d.ts +16 -16
- package/dist/index.js +18 -18
- package/dist/interfaces/ICameraEngine.d.ts +12 -12
- package/dist/interfaces/ICameraEngine.js +3 -3
- package/dist/interfaces/camera/ICamera.d.ts +47 -47
- package/dist/interfaces/camera/ICamera.js +2 -2
- package/dist/interfaces/camera/IOrthographicCamera.d.ts +8 -8
- package/dist/interfaces/camera/IOrthographicCamera.js +3 -3
- package/dist/interfaces/camera/IPerspectiveCamera.d.ts +7 -7
- package/dist/interfaces/camera/IPerspectiveCamera.js +2 -2
- package/dist/interfaces/controls/ICameraControls.d.ts +105 -105
- package/dist/interfaces/controls/ICameraControls.d.ts.map +1 -1
- package/dist/interfaces/controls/ICameraControls.js +3 -3
- package/dist/interfaces/controls/ICameraControlsEventDistribution.d.ts +6 -6
- package/dist/interfaces/controls/ICameraControlsEventDistribution.js +2 -2
- package/dist/interfaces/controls/ICameraControlsLogic.d.ts +14 -14
- package/dist/interfaces/controls/ICameraControlsLogic.js +2 -2
- package/dist/interfaces/interpolation/ICameraInterpolation.d.ts +11 -11
- package/dist/interfaces/interpolation/ICameraInterpolation.js +2 -2
- package/package.json +8 -8
|
@@ -1,288 +1,288 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CameraControlsEventDistribution = void 0;
|
|
4
|
-
class CameraControlsEventDistribution {
|
|
5
|
-
// #endregion Properties (7)
|
|
6
|
-
// #region Constructors (1)
|
|
7
|
-
constructor(controls, cameraLogic) {
|
|
8
|
-
this._active = {
|
|
9
|
-
rotation: false,
|
|
10
|
-
zoom: false,
|
|
11
|
-
pan: false,
|
|
12
|
-
};
|
|
13
|
-
this._activeEvents = true;
|
|
14
|
-
this._controls = controls;
|
|
15
|
-
this._cameraLogic = cameraLogic;
|
|
16
|
-
}
|
|
17
|
-
// #endregion Constructors (1)
|
|
18
|
-
// #region Public Methods (16)
|
|
19
|
-
activateCameraEvents() {
|
|
20
|
-
this._activeEvents = true;
|
|
21
|
-
}
|
|
22
|
-
deactivateCameraEvents() {
|
|
23
|
-
this._activeEvents = false;
|
|
24
|
-
this.reset();
|
|
25
|
-
}
|
|
26
|
-
onDown(event) {
|
|
27
|
-
if (this._controls.camera.active === false)
|
|
28
|
-
return;
|
|
29
|
-
const { x, y } = this.convertInput(event);
|
|
30
|
-
const touchEvent = event.pointerType === "touch";
|
|
31
|
-
const input = this.getInput(event);
|
|
32
|
-
const mapping = event.pointerType === "touch"
|
|
33
|
-
? this._controls.input.touch
|
|
34
|
-
: this._controls.input.mouse;
|
|
35
|
-
if (input === mapping.rotate && this._controls.enableRotation) {
|
|
36
|
-
this._cameraLogic.rotate(x, y, this._active.rotation, touchEvent);
|
|
37
|
-
this._active.rotation = true;
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
this._active.rotation = false;
|
|
41
|
-
}
|
|
42
|
-
if (input === mapping.pan && this._controls.enablePan) {
|
|
43
|
-
this._cameraLogic.pan(x, y, this._active.pan, touchEvent);
|
|
44
|
-
this._active.pan = true;
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
this._active.pan = false;
|
|
48
|
-
}
|
|
49
|
-
if (input === mapping.zoom && this._controls.enableZoom) {
|
|
50
|
-
let x1 = x, y1 = y;
|
|
51
|
-
if (touchEvent &&
|
|
52
|
-
this._controls.input.touch.zoom === 2 &&
|
|
53
|
-
this._primaryPointerEvent &&
|
|
54
|
-
this._secondaryPointerEvent) {
|
|
55
|
-
x1 =
|
|
56
|
-
((this._primaryPointerEvent.pageX -
|
|
57
|
-
this._secondaryPointerEvent.pageX) /
|
|
58
|
-
window.innerWidth) *
|
|
59
|
-
(window.innerWidth / window.innerHeight);
|
|
60
|
-
y1 =
|
|
61
|
-
(this._primaryPointerEvent.pageY -
|
|
62
|
-
this._secondaryPointerEvent.pageY) /
|
|
63
|
-
window.innerHeight;
|
|
64
|
-
}
|
|
65
|
-
this._cameraLogic.zoom(x1, y1, this._active.zoom, touchEvent);
|
|
66
|
-
this._active.zoom = true;
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
this._active.zoom = false;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
onKey(event) {
|
|
73
|
-
if (this._controls.camera.active === false)
|
|
74
|
-
return;
|
|
75
|
-
if (!this._controls.enableKeyPan)
|
|
76
|
-
return;
|
|
77
|
-
switch (event.keyCode) {
|
|
78
|
-
case this._controls.input.keys.up:
|
|
79
|
-
this._cameraLogic.pan(0, 0, false, false);
|
|
80
|
-
this._cameraLogic.pan(0, this._controls.keyPanSpeed * 0.05, true, false);
|
|
81
|
-
event.preventDefault();
|
|
82
|
-
event.stopPropagation();
|
|
83
|
-
break;
|
|
84
|
-
case this._controls.input.keys.down:
|
|
85
|
-
this._cameraLogic.pan(0, 0, false, false);
|
|
86
|
-
this._cameraLogic.pan(0, -this._controls.keyPanSpeed * 0.05, true, false);
|
|
87
|
-
event.preventDefault();
|
|
88
|
-
event.stopPropagation();
|
|
89
|
-
break;
|
|
90
|
-
case this._controls.input.keys.left:
|
|
91
|
-
this._cameraLogic.pan(0, 0, false, false);
|
|
92
|
-
this._cameraLogic.pan(this._controls.keyPanSpeed * 0.05, 0, true, false);
|
|
93
|
-
event.preventDefault();
|
|
94
|
-
event.stopPropagation();
|
|
95
|
-
break;
|
|
96
|
-
case this._controls.input.keys.right:
|
|
97
|
-
this._cameraLogic.pan(0, 0, false, false);
|
|
98
|
-
this._cameraLogic.pan(-this._controls.keyPanSpeed * 0.05, 0, true, false);
|
|
99
|
-
event.preventDefault();
|
|
100
|
-
event.stopPropagation();
|
|
101
|
-
break;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
onKeyDown(event, pointerInCanvas) {
|
|
105
|
-
if (this._controls.camera.active === false)
|
|
106
|
-
return;
|
|
107
|
-
if (!this._activeEvents)
|
|
108
|
-
return;
|
|
109
|
-
if (!pointerInCanvas)
|
|
110
|
-
return;
|
|
111
|
-
this.onKey(event);
|
|
112
|
-
}
|
|
113
|
-
onKeyUp(event, pointerInCanvas) { }
|
|
114
|
-
onMouseWheel(event) {
|
|
115
|
-
if (this._controls.camera.active === false)
|
|
116
|
-
return;
|
|
117
|
-
if (!this._activeEvents)
|
|
118
|
-
return;
|
|
119
|
-
this.onWheel(event);
|
|
120
|
-
}
|
|
121
|
-
onMove(event) {
|
|
122
|
-
if (this._controls.camera.active === false)
|
|
123
|
-
return;
|
|
124
|
-
const { x, y } = this.convertInput(event);
|
|
125
|
-
const touchEvent = event.pointerType === "touch";
|
|
126
|
-
if (this._controls.enableRotation && this._active.rotation)
|
|
127
|
-
this._cameraLogic.rotate(x, y, this._active.rotation, touchEvent);
|
|
128
|
-
if (this._controls.enablePan && this._active.pan)
|
|
129
|
-
this._cameraLogic.pan(x, y, this._active.pan, touchEvent);
|
|
130
|
-
if (this._controls.enableZoom && this._active.zoom) {
|
|
131
|
-
let x1 = x, y1 = y;
|
|
132
|
-
if (touchEvent &&
|
|
133
|
-
this._controls.input.touch.zoom === 2 &&
|
|
134
|
-
this._primaryPointerEvent &&
|
|
135
|
-
this._secondaryPointerEvent) {
|
|
136
|
-
x1 =
|
|
137
|
-
((this._primaryPointerEvent.pageX -
|
|
138
|
-
this._secondaryPointerEvent.pageX) /
|
|
139
|
-
window.innerWidth) *
|
|
140
|
-
(window.innerWidth / window.innerHeight);
|
|
141
|
-
y1 =
|
|
142
|
-
(this._primaryPointerEvent.pageY -
|
|
143
|
-
this._secondaryPointerEvent.pageY) /
|
|
144
|
-
window.innerHeight;
|
|
145
|
-
}
|
|
146
|
-
this._cameraLogic.zoom(x1, y1, this._active.zoom, touchEvent);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
onPointerDown(event) {
|
|
150
|
-
if (this._controls.camera.active === false)
|
|
151
|
-
return;
|
|
152
|
-
if (!this._activeEvents)
|
|
153
|
-
return;
|
|
154
|
-
if (event.isPrimary === true)
|
|
155
|
-
this._primaryPointerEvent = event;
|
|
156
|
-
else if (event.isPrimary === false)
|
|
157
|
-
this._secondaryPointerEvent = event;
|
|
158
|
-
this.onDown(event);
|
|
159
|
-
}
|
|
160
|
-
onPointerEnd(event) {
|
|
161
|
-
if (this._controls.camera.active === false)
|
|
162
|
-
return;
|
|
163
|
-
if (!this._activeEvents)
|
|
164
|
-
return;
|
|
165
|
-
if (event.isPrimary === true)
|
|
166
|
-
this._primaryPointerEvent = undefined;
|
|
167
|
-
else if (event.isPrimary === false)
|
|
168
|
-
this._secondaryPointerEvent = undefined;
|
|
169
|
-
this.onUp(event);
|
|
170
|
-
}
|
|
171
|
-
onPointerMove(event) {
|
|
172
|
-
if (this._controls.camera.active === false)
|
|
173
|
-
return;
|
|
174
|
-
if (!this._activeEvents)
|
|
175
|
-
return;
|
|
176
|
-
if (event.isPrimary === true)
|
|
177
|
-
this._primaryPointerEvent = event;
|
|
178
|
-
else if (event.isPrimary === false)
|
|
179
|
-
this._secondaryPointerEvent = event;
|
|
180
|
-
this.onMove(event);
|
|
181
|
-
}
|
|
182
|
-
onPointerOut(event) {
|
|
183
|
-
if (this._controls.camera.active === false)
|
|
184
|
-
return;
|
|
185
|
-
this.revert();
|
|
186
|
-
if (event.isPrimary === true)
|
|
187
|
-
this._primaryPointerEvent = undefined;
|
|
188
|
-
else if (event.isPrimary === false)
|
|
189
|
-
this._secondaryPointerEvent = undefined;
|
|
190
|
-
}
|
|
191
|
-
onPointerUp(event) {
|
|
192
|
-
if (this._controls.camera.active === false)
|
|
193
|
-
return;
|
|
194
|
-
if (event.isPrimary === true)
|
|
195
|
-
this._primaryPointerEvent = undefined;
|
|
196
|
-
else if (event.isPrimary === false)
|
|
197
|
-
this._secondaryPointerEvent = undefined;
|
|
198
|
-
}
|
|
199
|
-
onUp(event) {
|
|
200
|
-
if (this._controls.camera.active === false)
|
|
201
|
-
return;
|
|
202
|
-
this.revert();
|
|
203
|
-
this._active.rotation = false;
|
|
204
|
-
this._active.zoom = false;
|
|
205
|
-
this._active.pan = false;
|
|
206
|
-
}
|
|
207
|
-
onWheel(event) {
|
|
208
|
-
if (this._controls.camera.active === false)
|
|
209
|
-
return;
|
|
210
|
-
if (!this._activeEvents)
|
|
211
|
-
return;
|
|
212
|
-
if (!this._controls.enableZoom)
|
|
213
|
-
return;
|
|
214
|
-
if (this._controls.camera.revertAtMouseUp === true) {
|
|
215
|
-
clearTimeout(this._zoomResizeTimeout);
|
|
216
|
-
this._zoomResizeTimeout = setTimeout(this.revert.bind(this), 300);
|
|
217
|
-
}
|
|
218
|
-
let delta = 0;
|
|
219
|
-
if (event.deltaY !== undefined) {
|
|
220
|
-
// WebKit / Opera / Explorer 9
|
|
221
|
-
delta = -event.deltaY;
|
|
222
|
-
}
|
|
223
|
-
else if (event.detail !== undefined) {
|
|
224
|
-
// Firefox
|
|
225
|
-
delta = -event.detail;
|
|
226
|
-
}
|
|
227
|
-
// convert to 2 screen coordinates that are far enough
|
|
228
|
-
if (Math.sign(delta) > 0) {
|
|
229
|
-
this._cameraLogic.zoom(0, 0, false, false);
|
|
230
|
-
this._cameraLogic.zoom(1, 0, true, false);
|
|
231
|
-
}
|
|
232
|
-
else {
|
|
233
|
-
this._cameraLogic.zoom(1, 0, false, false);
|
|
234
|
-
this._cameraLogic.zoom(0, 0, true, false);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
reset() {
|
|
238
|
-
this._active = {
|
|
239
|
-
rotation: false,
|
|
240
|
-
zoom: false,
|
|
241
|
-
pan: false,
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
// #endregion Public Methods (16)
|
|
245
|
-
// #region Protected Methods (2)
|
|
246
|
-
convertInput(event) {
|
|
247
|
-
if (this._primaryPointerEvent && this._secondaryPointerEvent) {
|
|
248
|
-
return {
|
|
249
|
-
x: (this._primaryPointerEvent.pageX +
|
|
250
|
-
this._secondaryPointerEvent.pageX) /
|
|
251
|
-
2,
|
|
252
|
-
y: (this._primaryPointerEvent.pageY +
|
|
253
|
-
this._secondaryPointerEvent.pageY) /
|
|
254
|
-
2,
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
return {
|
|
259
|
-
x: event.clientX,
|
|
260
|
-
y: event.clientY,
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
getInput(event) {
|
|
265
|
-
if (event.pointerType === "touch") {
|
|
266
|
-
if (this._secondaryPointerEvent) {
|
|
267
|
-
return 2;
|
|
268
|
-
}
|
|
269
|
-
else {
|
|
270
|
-
return 1;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
return event.button;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
// #endregion Protected Methods (2)
|
|
278
|
-
// #region Private Methods (1)
|
|
279
|
-
revert() {
|
|
280
|
-
if (this._controls.camera.revertAtMouseUp === true) {
|
|
281
|
-
this._controls.camera.reset({
|
|
282
|
-
duration: this._controls.camera.revertAtMouseUpDuration,
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
exports.CameraControlsEventDistribution = CameraControlsEventDistribution;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CameraControlsEventDistribution = void 0;
|
|
4
|
+
class CameraControlsEventDistribution {
|
|
5
|
+
// #endregion Properties (7)
|
|
6
|
+
// #region Constructors (1)
|
|
7
|
+
constructor(controls, cameraLogic) {
|
|
8
|
+
this._active = {
|
|
9
|
+
rotation: false,
|
|
10
|
+
zoom: false,
|
|
11
|
+
pan: false,
|
|
12
|
+
};
|
|
13
|
+
this._activeEvents = true;
|
|
14
|
+
this._controls = controls;
|
|
15
|
+
this._cameraLogic = cameraLogic;
|
|
16
|
+
}
|
|
17
|
+
// #endregion Constructors (1)
|
|
18
|
+
// #region Public Methods (16)
|
|
19
|
+
activateCameraEvents() {
|
|
20
|
+
this._activeEvents = true;
|
|
21
|
+
}
|
|
22
|
+
deactivateCameraEvents() {
|
|
23
|
+
this._activeEvents = false;
|
|
24
|
+
this.reset();
|
|
25
|
+
}
|
|
26
|
+
onDown(event) {
|
|
27
|
+
if (this._controls.camera.active === false)
|
|
28
|
+
return;
|
|
29
|
+
const { x, y } = this.convertInput(event);
|
|
30
|
+
const touchEvent = event.pointerType === "touch";
|
|
31
|
+
const input = this.getInput(event);
|
|
32
|
+
const mapping = event.pointerType === "touch"
|
|
33
|
+
? this._controls.input.touch
|
|
34
|
+
: this._controls.input.mouse;
|
|
35
|
+
if (input === mapping.rotate && this._controls.enableRotation) {
|
|
36
|
+
this._cameraLogic.rotate(x, y, this._active.rotation, touchEvent);
|
|
37
|
+
this._active.rotation = true;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this._active.rotation = false;
|
|
41
|
+
}
|
|
42
|
+
if (input === mapping.pan && this._controls.enablePan) {
|
|
43
|
+
this._cameraLogic.pan(x, y, this._active.pan, touchEvent);
|
|
44
|
+
this._active.pan = true;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this._active.pan = false;
|
|
48
|
+
}
|
|
49
|
+
if (input === mapping.zoom && this._controls.enableZoom) {
|
|
50
|
+
let x1 = x, y1 = y;
|
|
51
|
+
if (touchEvent &&
|
|
52
|
+
this._controls.input.touch.zoom === 2 &&
|
|
53
|
+
this._primaryPointerEvent &&
|
|
54
|
+
this._secondaryPointerEvent) {
|
|
55
|
+
x1 =
|
|
56
|
+
((this._primaryPointerEvent.pageX -
|
|
57
|
+
this._secondaryPointerEvent.pageX) /
|
|
58
|
+
window.innerWidth) *
|
|
59
|
+
(window.innerWidth / window.innerHeight);
|
|
60
|
+
y1 =
|
|
61
|
+
(this._primaryPointerEvent.pageY -
|
|
62
|
+
this._secondaryPointerEvent.pageY) /
|
|
63
|
+
window.innerHeight;
|
|
64
|
+
}
|
|
65
|
+
this._cameraLogic.zoom(x1, y1, this._active.zoom, touchEvent);
|
|
66
|
+
this._active.zoom = true;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
this._active.zoom = false;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
onKey(event) {
|
|
73
|
+
if (this._controls.camera.active === false)
|
|
74
|
+
return;
|
|
75
|
+
if (!this._controls.enableKeyPan)
|
|
76
|
+
return;
|
|
77
|
+
switch (event.keyCode) {
|
|
78
|
+
case this._controls.input.keys.up:
|
|
79
|
+
this._cameraLogic.pan(0, 0, false, false);
|
|
80
|
+
this._cameraLogic.pan(0, this._controls.keyPanSpeed * 0.05, true, false);
|
|
81
|
+
event.preventDefault();
|
|
82
|
+
event.stopPropagation();
|
|
83
|
+
break;
|
|
84
|
+
case this._controls.input.keys.down:
|
|
85
|
+
this._cameraLogic.pan(0, 0, false, false);
|
|
86
|
+
this._cameraLogic.pan(0, -this._controls.keyPanSpeed * 0.05, true, false);
|
|
87
|
+
event.preventDefault();
|
|
88
|
+
event.stopPropagation();
|
|
89
|
+
break;
|
|
90
|
+
case this._controls.input.keys.left:
|
|
91
|
+
this._cameraLogic.pan(0, 0, false, false);
|
|
92
|
+
this._cameraLogic.pan(this._controls.keyPanSpeed * 0.05, 0, true, false);
|
|
93
|
+
event.preventDefault();
|
|
94
|
+
event.stopPropagation();
|
|
95
|
+
break;
|
|
96
|
+
case this._controls.input.keys.right:
|
|
97
|
+
this._cameraLogic.pan(0, 0, false, false);
|
|
98
|
+
this._cameraLogic.pan(-this._controls.keyPanSpeed * 0.05, 0, true, false);
|
|
99
|
+
event.preventDefault();
|
|
100
|
+
event.stopPropagation();
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
onKeyDown(event, pointerInCanvas) {
|
|
105
|
+
if (this._controls.camera.active === false)
|
|
106
|
+
return;
|
|
107
|
+
if (!this._activeEvents)
|
|
108
|
+
return;
|
|
109
|
+
if (!pointerInCanvas)
|
|
110
|
+
return;
|
|
111
|
+
this.onKey(event);
|
|
112
|
+
}
|
|
113
|
+
onKeyUp(event, pointerInCanvas) { }
|
|
114
|
+
onMouseWheel(event) {
|
|
115
|
+
if (this._controls.camera.active === false)
|
|
116
|
+
return;
|
|
117
|
+
if (!this._activeEvents)
|
|
118
|
+
return;
|
|
119
|
+
this.onWheel(event);
|
|
120
|
+
}
|
|
121
|
+
onMove(event) {
|
|
122
|
+
if (this._controls.camera.active === false)
|
|
123
|
+
return;
|
|
124
|
+
const { x, y } = this.convertInput(event);
|
|
125
|
+
const touchEvent = event.pointerType === "touch";
|
|
126
|
+
if (this._controls.enableRotation && this._active.rotation)
|
|
127
|
+
this._cameraLogic.rotate(x, y, this._active.rotation, touchEvent);
|
|
128
|
+
if (this._controls.enablePan && this._active.pan)
|
|
129
|
+
this._cameraLogic.pan(x, y, this._active.pan, touchEvent);
|
|
130
|
+
if (this._controls.enableZoom && this._active.zoom) {
|
|
131
|
+
let x1 = x, y1 = y;
|
|
132
|
+
if (touchEvent &&
|
|
133
|
+
this._controls.input.touch.zoom === 2 &&
|
|
134
|
+
this._primaryPointerEvent &&
|
|
135
|
+
this._secondaryPointerEvent) {
|
|
136
|
+
x1 =
|
|
137
|
+
((this._primaryPointerEvent.pageX -
|
|
138
|
+
this._secondaryPointerEvent.pageX) /
|
|
139
|
+
window.innerWidth) *
|
|
140
|
+
(window.innerWidth / window.innerHeight);
|
|
141
|
+
y1 =
|
|
142
|
+
(this._primaryPointerEvent.pageY -
|
|
143
|
+
this._secondaryPointerEvent.pageY) /
|
|
144
|
+
window.innerHeight;
|
|
145
|
+
}
|
|
146
|
+
this._cameraLogic.zoom(x1, y1, this._active.zoom, touchEvent);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
onPointerDown(event) {
|
|
150
|
+
if (this._controls.camera.active === false)
|
|
151
|
+
return;
|
|
152
|
+
if (!this._activeEvents)
|
|
153
|
+
return;
|
|
154
|
+
if (event.isPrimary === true)
|
|
155
|
+
this._primaryPointerEvent = event;
|
|
156
|
+
else if (event.isPrimary === false)
|
|
157
|
+
this._secondaryPointerEvent = event;
|
|
158
|
+
this.onDown(event);
|
|
159
|
+
}
|
|
160
|
+
onPointerEnd(event) {
|
|
161
|
+
if (this._controls.camera.active === false)
|
|
162
|
+
return;
|
|
163
|
+
if (!this._activeEvents)
|
|
164
|
+
return;
|
|
165
|
+
if (event.isPrimary === true)
|
|
166
|
+
this._primaryPointerEvent = undefined;
|
|
167
|
+
else if (event.isPrimary === false)
|
|
168
|
+
this._secondaryPointerEvent = undefined;
|
|
169
|
+
this.onUp(event);
|
|
170
|
+
}
|
|
171
|
+
onPointerMove(event) {
|
|
172
|
+
if (this._controls.camera.active === false)
|
|
173
|
+
return;
|
|
174
|
+
if (!this._activeEvents)
|
|
175
|
+
return;
|
|
176
|
+
if (event.isPrimary === true)
|
|
177
|
+
this._primaryPointerEvent = event;
|
|
178
|
+
else if (event.isPrimary === false)
|
|
179
|
+
this._secondaryPointerEvent = event;
|
|
180
|
+
this.onMove(event);
|
|
181
|
+
}
|
|
182
|
+
onPointerOut(event) {
|
|
183
|
+
if (this._controls.camera.active === false)
|
|
184
|
+
return;
|
|
185
|
+
this.revert();
|
|
186
|
+
if (event.isPrimary === true)
|
|
187
|
+
this._primaryPointerEvent = undefined;
|
|
188
|
+
else if (event.isPrimary === false)
|
|
189
|
+
this._secondaryPointerEvent = undefined;
|
|
190
|
+
}
|
|
191
|
+
onPointerUp(event) {
|
|
192
|
+
if (this._controls.camera.active === false)
|
|
193
|
+
return;
|
|
194
|
+
if (event.isPrimary === true)
|
|
195
|
+
this._primaryPointerEvent = undefined;
|
|
196
|
+
else if (event.isPrimary === false)
|
|
197
|
+
this._secondaryPointerEvent = undefined;
|
|
198
|
+
}
|
|
199
|
+
onUp(event) {
|
|
200
|
+
if (this._controls.camera.active === false)
|
|
201
|
+
return;
|
|
202
|
+
this.revert();
|
|
203
|
+
this._active.rotation = false;
|
|
204
|
+
this._active.zoom = false;
|
|
205
|
+
this._active.pan = false;
|
|
206
|
+
}
|
|
207
|
+
onWheel(event) {
|
|
208
|
+
if (this._controls.camera.active === false)
|
|
209
|
+
return;
|
|
210
|
+
if (!this._activeEvents)
|
|
211
|
+
return;
|
|
212
|
+
if (!this._controls.enableZoom)
|
|
213
|
+
return;
|
|
214
|
+
if (this._controls.camera.revertAtMouseUp === true) {
|
|
215
|
+
clearTimeout(this._zoomResizeTimeout);
|
|
216
|
+
this._zoomResizeTimeout = setTimeout(this.revert.bind(this), 300);
|
|
217
|
+
}
|
|
218
|
+
let delta = 0;
|
|
219
|
+
if (event.deltaY !== undefined) {
|
|
220
|
+
// WebKit / Opera / Explorer 9
|
|
221
|
+
delta = -event.deltaY;
|
|
222
|
+
}
|
|
223
|
+
else if (event.detail !== undefined) {
|
|
224
|
+
// Firefox
|
|
225
|
+
delta = -event.detail;
|
|
226
|
+
}
|
|
227
|
+
// convert to 2 screen coordinates that are far enough
|
|
228
|
+
if (Math.sign(delta) > 0) {
|
|
229
|
+
this._cameraLogic.zoom(0, 0, false, false);
|
|
230
|
+
this._cameraLogic.zoom(1, 0, true, false);
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
this._cameraLogic.zoom(1, 0, false, false);
|
|
234
|
+
this._cameraLogic.zoom(0, 0, true, false);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
reset() {
|
|
238
|
+
this._active = {
|
|
239
|
+
rotation: false,
|
|
240
|
+
zoom: false,
|
|
241
|
+
pan: false,
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
// #endregion Public Methods (16)
|
|
245
|
+
// #region Protected Methods (2)
|
|
246
|
+
convertInput(event) {
|
|
247
|
+
if (this._primaryPointerEvent && this._secondaryPointerEvent) {
|
|
248
|
+
return {
|
|
249
|
+
x: (this._primaryPointerEvent.pageX +
|
|
250
|
+
this._secondaryPointerEvent.pageX) /
|
|
251
|
+
2,
|
|
252
|
+
y: (this._primaryPointerEvent.pageY +
|
|
253
|
+
this._secondaryPointerEvent.pageY) /
|
|
254
|
+
2,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
return {
|
|
259
|
+
x: event.clientX,
|
|
260
|
+
y: event.clientY,
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
getInput(event) {
|
|
265
|
+
if (event.pointerType === "touch") {
|
|
266
|
+
if (this._secondaryPointerEvent) {
|
|
267
|
+
return 2;
|
|
268
|
+
}
|
|
269
|
+
else {
|
|
270
|
+
return 1;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
return event.button;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
// #endregion Protected Methods (2)
|
|
278
|
+
// #region Private Methods (1)
|
|
279
|
+
revert() {
|
|
280
|
+
if (this._controls.camera.revertAtMouseUp === true) {
|
|
281
|
+
this._controls.camera.reset({
|
|
282
|
+
duration: this._controls.camera.revertAtMouseUpDuration,
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
exports.CameraControlsEventDistribution = CameraControlsEventDistribution;
|
|
288
288
|
//# sourceMappingURL=CameraControlsEventDistribution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CameraControlsEventDistribution.js","sourceRoot":"","sources":["../../../src/implementation/controls/CameraControlsEventDistribution.ts"],"names":[],"mappings":";;;AAIA,MAAa,+BAA+B;IAkB3C,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,QAAyB,EAAE,WAAiC;QAf9D,YAAO,GAAG;YACnB,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,KAAK;YACX,GAAG,EAAE,KAAK;SACV,CAAC;QACQ,kBAAa,GAAG,IAAI,CAAC;QAW9B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,8BAA8B;IAE9B,8BAA8B;IAEvB,oBAAoB;QAC1B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC3B,CAAC;IAEM,sBAAsB;QAC5B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,KAAK,EAAE,CAAC;IACd,CAAC;IAEM,MAAM,CAAC,KAAmB;QAChC,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,KAAK,KAAK;YAAE,OAAO;QAEnD,MAAM,EAAC,CAAC,EAAE,CAAC,EAAC,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAExC,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,KAAK,OAAO,CAAC;QACjD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,OAAO,GACZ,KAAK,CAAC,WAAW,KAAK,OAAO;YAC5B,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK;YAC5B,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC;QAE/B,IAAI,KAAK,KAAK,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE;
|
|
1
|
+
{"version":3,"file":"CameraControlsEventDistribution.js","sourceRoot":"","sources":["../../../src/implementation/controls/CameraControlsEventDistribution.ts"],"names":[],"mappings":";;;AAIA,MAAa,+BAA+B;IAkB3C,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,QAAyB,EAAE,WAAiC;QAf9D,YAAO,GAAG;YACnB,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,KAAK;YACX,GAAG,EAAE,KAAK;SACV,CAAC;QACQ,kBAAa,GAAG,IAAI,CAAC;QAW9B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,8BAA8B;IAE9B,8BAA8B;IAEvB,oBAAoB;QAC1B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC3B,CAAC;IAEM,sBAAsB;QAC5B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,KAAK,EAAE,CAAC;IACd,CAAC;IAEM,MAAM,CAAC,KAAmB;QAChC,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,KAAK,KAAK;YAAE,OAAO;QAEnD,MAAM,EAAC,CAAC,EAAE,CAAC,EAAC,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAExC,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,KAAK,OAAO,CAAC;QACjD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,OAAO,GACZ,KAAK,CAAC,WAAW,KAAK,OAAO;YAC5B,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK;YAC5B,CAAC,CAAC,IAAI,CAAC,SAAS,C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