Hi everyone, I’m trying to figure out the best way to make the position (and scale if needed) of the model across all devices without relying only on match medias. Ofc I can’t use %, so is there something built into Three.js that could help me achieve the best result? Also any other solution (if someone has it) is much appreciated. Right now I am using a orthographic camera in my scene.
This is what happens:
I want the model to position like this
But of course when I resize the screen it gets cut out like this
This is how I resize the orthographic camera whenever the page gets resized:
rendererSize.width = window.innerWidth;
rendererSize.height = window.innerHeight;
aspect = rendererSize.width / rendererSize.height;
//* [ORTHOGRAPHIC CAMERA]
camera.left = -f * aspect;
camera.right = f * aspect;
camera.updateProjectionMatrix();
renderer.setSize(rendererSize.width, rendererSize.height);