commit
7381928803
|
@ -20,8 +20,8 @@ export default class Camera {
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSize(renderer) {
|
updateSize(renderer) {
|
||||||
// Multiply by dpr in case it is retina device
|
// Update camera aspect ratio with window aspect ratio
|
||||||
this.threeCamera.aspect = renderer.domElement.width * Config.dpr / renderer.domElement.height * Config.dpr;
|
this.threeCamera.aspect = renderer.domElement.width / renderer.domElement.height;
|
||||||
|
|
||||||
// Always call updateProjectionMatrix on camera change
|
// Always call updateProjectionMatrix on camera change
|
||||||
this.threeCamera.updateProjectionMatrix();
|
this.threeCamera.updateProjectionMatrix();
|
||||||
|
|
Loading…
Reference in New Issue