From f200d1043a983f0d752ef4cb7fae05c0af32c40e Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 11 Apr 2026 04:28:26 +0200 Subject: [PATCH] Add runtime global state interfaces and default creation function --- src/runtime-three/runtime-global-state.ts | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/runtime-three/runtime-global-state.ts diff --git a/src/runtime-three/runtime-global-state.ts b/src/runtime-three/runtime-global-state.ts new file mode 100644 index 00000000..6c2b4728 --- /dev/null +++ b/src/runtime-three/runtime-global-state.ts @@ -0,0 +1,24 @@ +export interface RuntimeSceneTransitionRecord { + fromSceneId: string; + fromSceneName: string; + toSceneId: string; + toSceneName: string; + viaExitEntityId: string; + targetEntryEntityId: string; +} + +export interface RuntimeGlobalState { + flags: Record; + activeMusicCueId: string | null; + transitionCount: number; + lastSceneTransition: RuntimeSceneTransitionRecord | null; +} + +export function createDefaultRuntimeGlobalState(): RuntimeGlobalState { + return { + flags: {}, + activeMusicCueId: null, + transitionCount: 0, + lastSceneTransition: null + }; +}