import React from "react"; import { AbsoluteFill, Img, OffthreadVideo, interpolate, spring, staticFile, useCurrentFrame, useVideoConfig, } from "remotion"; import { fontFamily } from "../fonts"; export const IntroScene: React.FC<{ date: string; bgFile?: string; }> = ({ date, bgFile }) => { const frame = useCurrentFrame(); const { fps, durationInFrames } = useVideoConfig(); void durationInFrames; void date; // Everything bounces in together, fast const mainBounce = spring({ frame, fps, config: { damping: 10, mass: 0.5, stiffness: 180 }, }); const mainScale = interpolate(mainBounce, [0, 1], [0.5, 1]); // Corner brackets const bracketOpacity = interpolate(frame, [0, 10], [0, 0.15], { extrapolateLeft: "clamp", extrapolateRight: "clamp", }); const bracketColor = `rgba(67, 172, 233, ${bracketOpacity})`; const cornerBracketStyle = ( top: boolean, left: boolean ): React.CSSProperties => ({ position: "absolute", top: top ? 60 : "auto", bottom: top ? "auto" : 60, left: left ? 60 : "auto", right: left ? "auto" : 60, width: 40, height: 40, borderTop: top ? `2px solid ${bracketColor}` : "none", borderBottom: top ? "none" : `2px solid ${bracketColor}`, borderLeft: left ? `2px solid ${bracketColor}` : "none", borderRight: left ? "none" : `2px solid ${bracketColor}`, }); return ( {/* Full-screen background video */} {bgFile && ( )} {bgFile && (
)}
{/* Everything bounces in as one unit */}
AI Resource PRO
DAILY
{/* date hidden */}
); };