From d2bc7b26b9f8bbecf038df1e7616b4e53c673232 Mon Sep 17 00:00:00 2001 From: Richie McIlroy <33632126+richiemcilroy@users.noreply.github.com> Date: Thu, 4 Sep 2025 14:20:37 +0100 Subject: [PATCH 01/10] feat: wip for split view --- .../src/routes/editor/ConfigSidebar.tsx | 156 +++++---- .../src/routes/editor/SceneSegmentConfig.tsx | 314 ++++++++++++++++++ .../src/routes/editor/Timeline/SceneTrack.tsx | 4 + apps/desktop/src/utils/tauri.ts | 6 +- crates/project/src/configuration.rs | 38 +++ crates/rendering/src/lib.rs | 222 ++++++++++++- crates/rendering/src/scene.rs | 125 ++++++- packages/ui-solid/src/auto-imports.d.ts | 14 +- 8 files changed, 804 insertions(+), 75 deletions(-) create mode 100644 apps/desktop/src/routes/editor/SceneSegmentConfig.tsx diff --git a/apps/desktop/src/routes/editor/ConfigSidebar.tsx b/apps/desktop/src/routes/editor/ConfigSidebar.tsx index 1327530aa3..29114acb81 100644 --- a/apps/desktop/src/routes/editor/ConfigSidebar.tsx +++ b/apps/desktop/src/routes/editor/ConfigSidebar.tsx @@ -45,6 +45,7 @@ import { type CameraShape, commands, type SceneSegment, + type SplitViewSettings, type StereoMode, type TimelineSegment, type ZoomSegment, @@ -53,6 +54,7 @@ import IconLucideMonitor from "~icons/lucide/monitor"; import IconLucideSparkles from "~icons/lucide/sparkles"; import { CaptionsTab } from "./CaptionsTab"; import { useEditorContext } from "./context"; +import { SceneSegmentConfig } from "./SceneSegmentConfig"; import { DEFAULT_GRADIENT_FROM, DEFAULT_GRADIENT_TO, @@ -2284,12 +2286,21 @@ function ClipSegmentConfig(props: { ); } -function SceneSegmentConfig(props: { +// SceneSegmentConfig moved to separate file for better organization +// The old implementation below is kept temporarily for reference +function OldSceneSegmentConfig(props: { segmentIndex: number; segment: SceneSegment; }) { const { setProject, setEditorState, projectActions } = useEditorContext(); + // Initialize split view settings if not present + const splitViewSettings = (): SplitViewSettings => props.segment.splitViewSettings || { + cameraPosition: { x: 0.5, y: 0.5 }, + screenPosition: { x: 0.5, y: 0.5 }, + cameraSide: "right", + }; + return ( <>
- + -
-+ + +
+- + -
-+ + +
+- + -
-+ + +
+- + -
-+ + +
+