Refactor code

This commit is contained in:
sallbet 2023-03-13 03:40:33 +03:00
parent 44484e32a1
commit 70a5a98b65
Signed by: sallbet
GPG Key ID: 3C8A1BC17088B308

View File

@ -143,8 +143,7 @@ document.addEventListener('DOMContentLoaded', () => {
width = window.innerWidth;
height = window.innerHeight;
renderer.setSize(width, height);
const aspect = width / height;
camera.aspect = aspect;
camera.aspect = width / height;
camera.updateProjectionMatrix();
if (controls) controls.handleResize();
}