@wemap/camera 10.0.0-alpha.10 → 10.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/Camera.js +0 -4
- package/src/CameraUtils.js +1 -5
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"directory": "packages/camera"
|
|
13
13
|
},
|
|
14
14
|
"name": "@wemap/camera",
|
|
15
|
-
"version": "10.0.0-alpha.
|
|
15
|
+
"version": "10.0.0-alpha.7",
|
|
16
16
|
"bugs": {
|
|
17
17
|
"url": "https://github.com/wemap/wemap-modules-js/issues"
|
|
18
18
|
},
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"license": "ISC",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@wemap/logger": "^
|
|
27
|
+
"@wemap/logger": "^9.0.0",
|
|
28
28
|
"@zxing/library": "^0.18.4",
|
|
29
29
|
"events": "^3.3.0"
|
|
30
30
|
},
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"@types/events": "^3.0.0"
|
|
33
33
|
},
|
|
34
34
|
"type": "module",
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "f5c2315cc2406793433e8ff33a4152e0efe8f801"
|
|
36
36
|
}
|
package/src/Camera.js
CHANGED
|
@@ -239,10 +239,6 @@ class Camera extends EventEmitter {
|
|
|
239
239
|
|
|
240
240
|
_computeFov = () => {
|
|
241
241
|
|
|
242
|
-
if ([Camera.State.STOPPING, Camera.State.STOPPED].includes(this.state)) {
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
242
|
this.fov = calcDisplayedFov(
|
|
247
243
|
this.videoContainer,
|
|
248
244
|
this.videoElement,
|
package/src/CameraUtils.js
CHANGED
|
@@ -11,17 +11,13 @@ export function convertFov(angle, aspectRatio) {
|
|
|
11
11
|
* @param {HTMLDivElement} videoContainer
|
|
12
12
|
* @param {HTMLVideoElement} videoElement
|
|
13
13
|
* @param {number} hardwareVerticalFov
|
|
14
|
-
* @returns {object
|
|
14
|
+
* @returns {object}
|
|
15
15
|
*/
|
|
16
16
|
export function calcDisplayedFov(videoContainer, videoElement, hardwareVerticalFov) {
|
|
17
17
|
|
|
18
18
|
const sourceWidth = videoElement.videoWidth;
|
|
19
19
|
const sourceHeight = videoElement.videoHeight;
|
|
20
20
|
|
|
21
|
-
if (!sourceWidth || !sourceHeight) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
21
|
const containerWidth = videoContainer.offsetWidth;
|
|
26
22
|
const containerHeight = videoContainer.offsetHeight;
|
|
27
23
|
|