Skip to content

Commit fee7fc3

Browse files
committed
use real pixels not CSS pixels when requesting camera feed
1 parent 1da8187 commit fee7fc3

12 files changed

+14
-14
lines changed

aframe/build/aframe-ar-location-only.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aframe/build/aframe-ar-location-only.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

aframe/build/aframe-ar-new-location-only.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aframe/build/aframe-ar-new-location-only.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

aframe/build/aframe-ar-nft.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aframe/build/aframe-ar-nft.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

aframe/build/aframe-ar.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aframe/build/aframe-ar.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

aframe/src/location-based/arjs-webcam-texture.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ AFRAME.registerComponent("arjs-webcam-texture", {
3232
const constraints = {
3333
video: {
3434
facingMode: "environment",
35-
width: { ideal: idealWidth },
36-
height: { ideal: idealHeight },
35+
width: { ideal: idealWidth * window.devicePixelRatio },
36+
height: { ideal: idealHeight * window.devicePixelRatio },
3737
},
3838
};
3939
navigator.mediaDevices

three.js/build/ar-threex-location-only.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

three.js/build/ar-threex-location-only.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

three.js/src/location-based/js/webcam-renderer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class WebcamRenderer {
4040
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
4141
const constraints = {
4242
video: {
43-
width: { ideal: idealWidth },
44-
height: { ideal: idealHeight },
43+
width: { ideal: idealWidth * window.devicePixelRatio },
44+
height: { ideal: idealHeight * window.devicePixelRatio },
4545
facingMode: "environment",
4646
},
4747
};

0 commit comments

Comments
 (0)