Update camera.js

No need to involve pixel ratio here.
This commit is contained in:
lucaskuzma 2018-09-18 09:22:26 +02:00 committed by GitHub
parent 337e21226b
commit 44808a4974
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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();