Encountering issues with the code snippet below:
//WebGL renderer
renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight); //TODO: set optimal size
document.body.appendChild(renderer.domElement);
In the top left corner, there is an unwanted thin white border:
https://i.sstatic.net/AXIjr.png
At the bottom right corner, scroll elements appear (indicating that
window.innerWidth, window.innerHeight
may be greater than the initial view):
https://i.sstatic.net/Ztqz2.png
Is there a way to determine the width and height values for renderer.setSize
to ensure all visible content fits inside the window? Alternatively, are there alternative solutions to resolve these issues?