From 307ac02ec35ef8e10da3f6b85ec220b4257bf500 Mon Sep 17 00:00:00 2001 From: Siddharth Date: Sat, 8 Nov 2025 22:44:36 -0700 Subject: [PATCH] shadow effect --- src/components/video-editor/SettingsPanel.tsx | 9 +++++++-- src/components/video-editor/VideoEditor.tsx | 4 ++++ src/components/video-editor/VideoPlayback.tsx | 12 +++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsx index 4d43e3b..baf787e 100644 --- a/src/components/video-editor/SettingsPanel.tsx +++ b/src/components/video-editor/SettingsPanel.tsx @@ -32,6 +32,8 @@ interface SettingsPanelProps { onZoomDepthChange?: (depth: ZoomDepth) => void; selectedZoomId?: string | null; onZoomDelete?: (id: string) => void; + showShadow?: boolean; + onShadowChange?: (showShadow: boolean) => void; } const ZOOM_DEPTH_OPTIONS: Array<{ depth: ZoomDepth; label: string }> = [ @@ -42,7 +44,7 @@ const ZOOM_DEPTH_OPTIONS: Array<{ depth: ZoomDepth; label: string }> = [ { depth: 5, label: "3.5×" }, ]; -export function SettingsPanel({ selected, onWallpaperChange, selectedZoomDepth, onZoomDepthChange, selectedZoomId, onZoomDelete }: SettingsPanelProps) { +export function SettingsPanel({ selected, onWallpaperChange, selectedZoomDepth, onZoomDepthChange, selectedZoomId, onZoomDelete, showShadow, onShadowChange }: SettingsPanelProps) { const [hsva, setHsva] = useState({ h: 0, s: 0, v: 68, a: 1 }); const [gradient, setGradient] = useState(GRADIENTS[0]); @@ -106,7 +108,10 @@ export function SettingsPanel({ selected, onWallpaperChange, selectedZoomDepth,
- +
Shadow
diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsx index 1e1b01f..1aa376e 100644 --- a/src/components/video-editor/VideoEditor.tsx +++ b/src/components/video-editor/VideoEditor.tsx @@ -27,6 +27,7 @@ export default function VideoEditor() { const [currentTime, setCurrentTime] = useState(0); const [duration, setDuration] = useState(0); const [wallpaper, setWallpaper] = useState(WALLPAPER_PATHS[0]); + const [showShadow, setShowShadow] = useState(false); const [zoomRegions, setZoomRegions] = useState([]); const [selectedZoomId, setSelectedZoomId] = useState(null); @@ -185,6 +186,7 @@ export default function VideoEditor() { onSelectZoom={handleSelectZoom} onZoomFocusChange={handleZoomFocusChange} isPlaying={isPlaying} + showShadow={showShadow} /> ); diff --git a/src/components/video-editor/VideoPlayback.tsx b/src/components/video-editor/VideoPlayback.tsx index 0277f7c..d4a69e5 100644 --- a/src/components/video-editor/VideoPlayback.tsx +++ b/src/components/video-editor/VideoPlayback.tsx @@ -23,6 +23,7 @@ interface VideoPlaybackProps { onSelectZoom: (id: string | null) => void; onZoomFocusChange: (id: string, focus: ZoomFocus) => void; isPlaying: boolean; + showShadow?: boolean; } export interface VideoPlaybackRef { @@ -44,6 +45,7 @@ const VideoPlayback = forwardRef(({ onSelectZoom, onZoomFocusChange, isPlaying, + showShadow, }, ref) => { const videoRef = useRef(null); const containerRef = useRef(null); @@ -528,7 +530,15 @@ const VideoPlayback = forwardRef(({ className="relative aspect-video rounded-sm overflow-hidden bg-cover bg-center" style={{ ...backgroundStyle, width: '100%' }} > -
+