/** * Premium Scene Components * High-end visual styles for business and luxury content */ import React from 'react'; import { AbsoluteFill, useCurrentFrame, useVideoConfig, interpolate, Easing, } from 'remotion'; import { SceneData } from './types'; import { premiumTokens } from './premium-tokens'; // ============================================================================ // 1. ELEGANCE SCENE - Apple-style elegant presentation // ============================================================================ interface PremiumSceneProps { scene: SceneData; } export const EleganceScene: React.FC = ({ scene }) => { const frame = useCurrentFrame(); const { fps } = useVideoConfig(); const { elegance } = premiumTokens.colors; const typography = premiumTokens.typography.elegance; const effects = premiumTokens.effects.elegance; // Main title: 2-second slow fade-in with micro scale const titleOpacity = interpolate(frame, [0, 60], [0, 1], { extrapolateRight: 'clamp', easing: Easing.bezier(0.25, 0.1, 0.25, 1), }); const titleScale = interpolate(frame, [0, 60], [0.98, 1], { extrapolateRight: 'clamp', easing: Easing.out(Easing.cubic), }); const titleBlur = interpolate(frame, [0, 30], [5, 0], { extrapolateRight: 'clamp', }); // Subtitle: delayed 0.5s, float up from bottom const subtitleOpacity = interpolate(frame, [15, 45], [0, 1], { extrapolateRight: 'clamp', easing: Easing.out(Easing.cubic), }); const subtitleTranslateY = interpolate(frame, [15, 45], [30, 0], { extrapolateRight: 'clamp', easing: Easing.out(Easing.cubic), }); // Gradient mask animation const maskY = interpolate(frame, [0, 45], [-100, 150], { extrapolateRight: 'clamp', easing: Easing.out(Easing.quad), }); const maskOpacity = interpolate(frame, [0, 20, 40, 60], [0, 1, 1, 0], { extrapolateRight: 'clamp', }); return ( {/* Gradient mask effect */}
{/* Main content card */}

{scene.title}

{scene.subtitle && (

{scene.subtitle}

)}
); }; // ============================================================================ // 2. AUTHORITY SCENE - TED-style authoritative narrative // ============================================================================ export const AuthorityScene: React.FC = ({ scene }) => { const frame = useCurrentFrame(); const { authority } = premiumTokens.colors; const typography = premiumTokens.typography.authority; const effects = premiumTokens.effects.authority; // Title: slide in from left const titleTranslateX = interpolate(frame, [0, 45], [-50, 0], { extrapolateRight: 'clamp', easing: Easing.out(Easing.cubic), }); const titleOpacity = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: 'clamp', }); // Number counter animation const numberScale = interpolate(frame, [15, 45], [0.8, 1], { extrapolateRight: 'clamp', easing: Easing.out(Easing.back(1.2)), }); const numberOpacity = interpolate(frame, [15, 45], [0, 1], { extrapolateRight: 'clamp', }); // Quote line animation const lineWidth = interpolate(frame, [0, 30], [0, 60], { extrapolateRight: 'clamp', easing: Easing.out(Easing.cubic), }); return ( {/* Dark overlay for text readability - 移除,使用全局遮罩 */} {/* Quote line */}
{/* Content container with semi-transparent background */}
{/* Number display */} {scene.number && (
{scene.number}
)} {/* Title */}

{scene.title}

{/* Subtitle */} {scene.subtitle && (

{scene.subtitle}

)}
); }; // ============================================================================ // 3. LUXURY SCENE - High-end luxury brand style // ============================================================================ export const LuxuryScene: React.FC = ({ scene }) => { const frame = useCurrentFrame(); const { luxury } = premiumTokens.colors; const typography = premiumTokens.typography.luxury; const effects = premiumTokens.effects.luxury; // Ultra-slow 3-second fade-in const titleOpacity = interpolate(frame, [0, 90], [0, 1], { extrapolateRight: 'clamp', easing: Easing.bezier(0.22, 0.61, 0.36, 1), }); // Brightness pulse (breathing effect) const brightness = interpolate( frame % 120, [0, 60, 120], [0.85, 1, 0.85], { easing: Easing.in(Easing.ease), } ); // Gold sweep effect const sweepX = interpolate(frame, [30, 90], [-100, 100], { extrapolateRight: 'clamp', easing: Easing.in(Easing.cubic), }); const sweepOpacity = interpolate(frame, [30, 45, 75, 90], [0, 1, 1, 0], { extrapolateRight: 'clamp', }); return ( {/* Gold sweep effect */}
{/* Main title */}

{scene.title}

{/* Subtle decorative line */}
{/* Subtitle */} {scene.subtitle && (

{scene.subtitle}

)}
); }; // ============================================================================ // 4. MINIMAL SCENE - Architecture and design style // ============================================================================ export const MinimalScene: React.FC = ({ scene }) => { const frame = useCurrentFrame(); const { minimal } = premiumTokens.colors; const typography = premiumTokens.typography.minimal; // Geometric line expansion const lineWidth = interpolate(frame, [0, 30], [0, 100], { extrapolateRight: 'clamp', easing: Easing.linear, }); // Letter stagger effect const titleOpacity = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: 'clamp', }); // Letters appear one by one const letterCount = Math.floor(interpolate(frame, [0, 30], [0, scene.title.length], { extrapolateRight: 'clamp', })); const visibleTitle = scene.title.substring(0, letterCount); return ( {/* Top geometric line */}
{/* Main title with stagger */}

{visibleTitle}

{/* Blue accent line */}
{/* Subtitle */} {scene.subtitle && (

{scene.subtitle}

)}
{/* Bottom geometric line */}
); }; // ============================================================================ // 5. CINEMATIC SCENE - Movie trailer style // ============================================================================ export const CinematicScene: React.FC = ({ scene }) => { const frame = useCurrentFrame(); const { cinematic } = premiumTokens.colors; const typography = premiumTokens.typography.cinematic; const effects = premiumTokens.effects.cinematic; // Push-in camera effect (dolly zoom) const scale = interpolate(frame, [0, 75], [1.2, 1], { extrapolateRight: 'clamp', easing: Easing.out(Easing.quad), }); // Blur to focus const blur = interpolate(frame, [0, 40], [8, 0], { extrapolateRight: 'clamp', }); // Fade in const opacity = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: 'clamp', }); // Lens flare position const flareX = interpolate(frame, [20, 60], [-20, 120], { extrapolateRight: 'clamp', easing: Easing.bezier(0.65, 0, 0.35, 1), }); const flareOpacity = interpolate(frame, [20, 40, 50, 60], [0, 0.6, 0.6, 0], { extrapolateRight: 'clamp', }); return ( {/* Cinematic black bars */}
{/* Vignette effect */}
{/* Lens flare */}
{/* Main content */}

{scene.title}

{/* Red accent bar */} {scene.subtitle && ( <>

{scene.subtitle}

)}
); };