From 5d2f76e2381880aac8826f211aed811616c3a3ad Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Sun, 7 Dec 2025 11:53:20 -0500 Subject: [PATCH] fix orthographic aspect ratio --- src/moto/space.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/moto/space.js b/src/moto/space.js index 45101885..5cb5a7d5 100644 --- a/src/moto/space.js +++ b/src/moto/space.js @@ -767,7 +767,15 @@ function requestRefresh(timeout) { function onResize() { updateLastAction(); - camera.aspect = aspect(); + if (camera.isPerspectiveCamera) { + camera.aspect = aspect(); + } else if (camera.isOrthographicCamera) { + const asp = aspect(); + camera.left = -100 * asp; + camera.right = 100 * asp; + camera.top = 100; + camera.bottom = -100; + } camera.updateProjectionMatrix(); renderer.setSize(width(), height()); container.style.width = width();