From 0b58b9aeef9f39e39a77c769326bc37e22a2fb0d Mon Sep 17 00:00:00 2001 From: Tom Boullay Date: Mon, 11 May 2026 12:53:18 +0200 Subject: [PATCH] add: cinematic preview --- .../editor/EditorCinematicManifestPanel.tsx | 20 +++- src/components/editor/EditorControls.tsx | 5 +- src/components/editor/scene/EditorScene.tsx | 98 ++++++++++++++++++- src/index.css | 8 ++ src/pages/editor/page.tsx | 21 ++++ 5 files changed, 147 insertions(+), 5 deletions(-) diff --git a/src/components/editor/EditorCinematicManifestPanel.tsx b/src/components/editor/EditorCinematicManifestPanel.tsx index 24d3ec1..d360dda 100644 --- a/src/components/editor/EditorCinematicManifestPanel.tsx +++ b/src/components/editor/EditorCinematicManifestPanel.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from "react"; -import { Plus, RefreshCw, Save, Trash2 } from "lucide-react"; +import { Play, Plus, RefreshCw, Save, Trash2 } from "lucide-react"; import type { CinematicCameraKeyframe, CinematicDefinition, @@ -124,7 +124,13 @@ function updateVector( return nextVector; } -export function EditorCinematicManifestPanel(): React.JSX.Element { +interface EditorCinematicManifestPanelProps { + onPreviewCinematic?: ((cinematic: CinematicDefinition) => void) | undefined; +} + +export function EditorCinematicManifestPanel({ + onPreviewCinematic, +}: EditorCinematicManifestPanelProps): React.JSX.Element { const [manifest, setManifest] = useState(null); const [selectedCinematicId, setSelectedCinematicId] = useState(""); const [status, setStatus] = useState("Chargement des cinematics..."); @@ -431,6 +437,16 @@ export function EditorCinematicManifestPanel(): React.JSX.Element { )} + +