From 44808a4974ea9edc1dc83b4e04f9e9ec75d0e351 Mon Sep 17 00:00:00 2001 From: lucaskuzma Date: Tue, 18 Sep 2018 09:22:26 +0200 Subject: [PATCH] Update camera.js No need to involve pixel ratio here. --- src/js/app/components/camera.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/app/components/camera.js b/src/js/app/components/camera.js index 8ed343b..1c4e2d5 100644 --- a/src/js/app/components/camera.js +++ b/src/js/app/components/camera.js @@ -20,8 +20,8 @@ export default class Camera { } updateSize(renderer) { - // Multiply by dpr in case it is retina device - this.threeCamera.aspect = renderer.domElement.width * Config.dpr / renderer.domElement.height * Config.dpr; + // Update camera aspect ratio with window aspect ratio + this.threeCamera.aspect = renderer.domElement.width / renderer.domElement.height; // Always call updateProjectionMatrix on camera change this.threeCamera.updateProjectionMatrix();