From 1539860da8ce92dc17c494c6384c5cabcda46c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Tue, 24 Jan 2023 19:28:58 +0100 Subject: [PATCH] fix: rotate models right side up in (pre)view --- webui/src/components/display/blobs/ModelViewer.svelte | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webui/src/components/display/blobs/ModelViewer.svelte b/webui/src/components/display/blobs/ModelViewer.svelte index a864847..2b002a1 100644 --- a/webui/src/components/display/blobs/ModelViewer.svelte +++ b/webui/src/components/display/blobs/ModelViewer.svelte @@ -47,6 +47,9 @@ mesh.geometry.applyMatrix4( new THREE.Matrix4().makeTranslation(-middle.x, -middle.y, -middle.z) ); + mesh.geometry.applyMatrix4( + new THREE.Matrix4().makeRotationX(-Math.PI / 2) + ); const largestDimension = Math.max( geometry.boundingBox.max.x,