From f45831a4b45fdce030ebb4465a3f0c9941a23214 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sat, 31 Jan 2026 13:26:37 -0800 Subject: [PATCH] Conditionally render ScoreCube to properly clean up WebGL canvas Only mount the ScoreCube component when on the save-editor page. This ensures onDestroy is called when navigating away, properly disposing of the WebGL renderer and removing the canvas from DOM. --- src/lib/save-editor/MissionScoresEditor.svelte | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/save-editor/MissionScoresEditor.svelte b/src/lib/save-editor/MissionScoresEditor.svelte index 2f62bf8..0ac5fb0 100644 --- a/src/lib/save-editor/MissionScoresEditor.svelte +++ b/src/lib/save-editor/MissionScoresEditor.svelte @@ -1,4 +1,5 @@
- + {#if $currentPage === 'save-editor'} + + {/if}