Currently, I have implemented a basic window resizing code in my project:
function onWindowResize() {
windowHalfX = window.innerWidth / 2;
windowHalfY = window.innerHeight / 2;
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize( window.innerWidth, window.innerHeight );
}
The code effectively resizes the window; however, it scales the content based on the height rather than the width of the window. In my website's design, maintaining the visible width of the content is crucial over its height. Unfortunately, I am struggling to modify the code to scale the content based on the width instead of the height.
You can observe the issue I'm encountering by visiting the following link:
If you have any guidance or suggestions on how to tackle this problem, I would greatly appreciate it! Thank you for your help!