import React from "react"; import { useCurrentFrame, useVideoConfig, AbsoluteFill, interpolate, Easing, } from "remotion"; import type { RemotionScene } from "../Root"; import { THEMES } from "../base/theme/colors"; import { Background } from "../base/components/background"; import { SubtitleBar } from "../base/components/subtitle-bar"; import { AnimatedText } from "../base/components/animated-text"; import { Watermark } from "../base/components/watermark"; import { StepIndicator } from "./components/step-indicator"; import { KeyPointCard } from "./components/key-point-card"; interface KnowledgeSceneProps { scene: RemotionScene; sceneIndex: number; totalScenes: number; totalFrames: number; title: string; channelName?: string; } const KnowledgeScene: React.FC = ({ scene, sceneIndex, totalScenes, totalFrames, title, channelName, }) => { const frame = useCurrentFrame(); const colors = THEMES.knowledge; const visualText = scene.displayText ?? scene.narration; const fadeOpacity = interpolate( frame, [0, 10, scene.endFrame - scene.startFrame - 10, scene.endFrame - scene.startFrame], [0, 1, 1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" } ); return ( {/* Step indicator */}
{/* Title label */}
{title}
{/* Content */}
{scene.keyframes.length > 0 && ( kf.type === "text" || kf.type === "highlight") .map((kf) => kf.content)} color={colors.primaryLight} /> )}
{scene.wordTimestamps.length > 0 && ( )}
); }; export default KnowledgeScene;