From 775cbbb976e9d55fc40e63b4932f605308c63def Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 27 Apr 2026 15:43:12 +0200 Subject: [PATCH] Refactor simulation state management using snapshot data --- src/app/App.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/App.tsx b/src/app/App.tsx index 384c847a..b8fe3a62 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -3228,11 +3228,13 @@ export function App({ store, initialStatusMessage }: AppProps) { : authoredNavigationMode === "firstPerson" ? "Ready for First Person" : "Ready for Third Person"; - const authoredEditorSimulationClock = createRuntimeClockState( - editorState.projectDocument.time - ); const editorSimulationClock = - editorSimulationClockOverride ?? authoredEditorSimulationClock; + editorSimulationSnapshot.clock ?? + createRuntimeClockState(editorState.projectDocument.time); + const editorSimulationPlaying = editorSimulationSnapshot.playing; + const editorSimulationOverrideActive = + editorSimulationSnapshot.overrideActive; + const editorSimulationMessage = editorSimulationSnapshot.message; const editorSimulationTimeState = resolveRuntimeTimeState( editorState.projectDocument.time, editorSimulationClock