-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Description
Hi.
I've been trying to resize the canvas renderer without scaling the content but can't seem to find a solution. I've been searching high and low and am now asking here for help since I feel like I'm not making any progress on the issue. All demos scale as far as I noticed except for OrthographicCamera but I need perspective.
Just to clarify, I would like to create my scene and objects and have that scene center to the browser when resized but not scale. I tried to compensate by scaling and repositioning camera according to browser scale but it's far from perfect.
This code resizes the renderer and sets up the camera, but it causes the whole scene to scale.Are there any solutions, workarounds for this?
function onWindowResize(){
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize( window.innerWidth , window.innerHeight );
}Thank you very much. I appreciate your hard work here and love the library.