From 675c15fabffde16920654ee05f0594f766744b5e Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 15 Apr 2026 03:43:57 +0200 Subject: [PATCH] Add readSceneTransitionTargetKey function in App.tsx --- src/app/App.tsx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/app/App.tsx b/src/app/App.tsx index cd44bc21..a472c580 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -1375,6 +1375,33 @@ function readSequenceVisibilityTargetKey( throw new Error("Sequence visibility targets must reference a brush or model instance."); } +function readSceneTransitionTargetKey(value: string): { + targetSceneId: string; + targetEntryEntityId: string; +} { + const separatorIndex = value.indexOf("::"); + + if (separatorIndex <= 0 || separatorIndex >= value.length - 2) { + throw new Error( + "Scene transition targets must reference a scene id and Scene Entry id." + ); + } + + const targetSceneId = value.slice(0, separatorIndex).trim(); + const targetEntryEntityId = value.slice(separatorIndex + 2).trim(); + + if (targetSceneId.length === 0 || targetEntryEntityId.length === 0) { + throw new Error( + "Scene transition targets must reference a scene id and Scene Entry id." + ); + } + + return { + targetSceneId, + targetEntryEntityId + }; +} + function getDefaultTriggerVolumeLinkTrigger( triggerOnEnter: boolean, triggerOnExit: boolean