Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: replace hero shader and video;
kapishdimaf3d3903fff85
diff --git a/app/(home)/components/hero-phosphor-bg.tsx b/app/(home)/components/hero-phosphor-bg.tsxnew file mode 100644index 00000000..89bfadbf--- /dev/null+++ b/app/(home)/components/hero-phosphor-bg.tsx@@ -0,0 +1,56 @@+"use client";++import dynamic from "next/dynamic";+import { useTheme } from "next-themes";+import { useEffect, useState } from "react";++const Dithering = dynamic(+ () => import("@paper-design/shaders-react").then((m) => m.Dithering),+ { ssr: false },+);++const PHOSPHOR_INK = {+ light: "#0000001c",+ dark: "#ffffff28",+};++const MASKS = {+ screen:+ "[mask-image:radial-gradient(ellipse_92%_68%_at_50%_58%,black_14%,transparent_84%),linear-gradient(to_bottom,transparent_4%,black_30%,black_88%,transparent_100%),radial-gradient(ellipse_44%_30%_at_50%_31%,transparent_46%,black_92%)]",+ field:+ "[mask-image:radial-gradient(ellipse_86%_60%_at_50%_24%,black_18%,transparent_86%),linear-gradient(to_bottom,black_0%,black_46%,transparent_94%),radial-gradient(ellipse_42%_26%_at_50%_33%,transparent_48%,black_92%)]",+};++export function HeroPhosphorBg({+ variant = "screen",+}: {+ variant?: keyof typeof MASKS;+}) {+ const { resolvedTheme } = useTheme();+ const [mounted, setMounted] = useState(false);+ const [reduced, setReduced] = useState(false);++ useEffect(() => {+ setMounted(true);+ setReduced(window.matchMedia("(prefers-reduced-motion: reduce)").matches);+ }, []);++ if (!mounted) return null;++ return (+ <div+ className={`pointer-events-none absolute inset-x-0 -top-22 h-screen [mask-composite:intersect] ${MASKS[variant]}`}+ >+ <Dithering+ className="h-full w-full"+ colorBack="#00000000"+ colorFront={PHOSPHOR_INK[resolvedTheme === "dark" ? "dark" : "light"]}+ shape="simplex"+ type="4x4"+ size={3}+ scale={1.8}+ speed={reduced ? 0 : 0.1}+ />+ </div>+ );+}diff --git a/app/(home)/components/hero-shader-bg.tsx b/app/(home)/components/hero-shader-bg.tsxdeleted file mode 100644index 14eeb6b6..00000000--- a/app/(home)/components/hero-shader-bg.tsx+++ /dev/null@@ -1,43 +0,0 @@-"use client";--import dynamic from "next/dynamic";-import { useTheme } from "next-themes";-import { useEffect, useState } from "react";--// `@paper-design/shaders-react` pulls in a WebGL runtime — heavy and useless on-// the server. Load it client-only so it stays out of the initial landing bundle;-// the `mounted` gate below already keeps it from rendering before hydration.-const NeuroNoise = dynamic(- () => import("@paper-design/shaders-react").then((m) => m.NeuroNoise),- { ssr: false },-);--const NEURO_COLORS = {- light: { front: "#8f8f94", mid: "#e7e7e9", back: "#ffffff" },- dark: { front: "#6e6e74", mid: "#28282c", back: "#191919" },-};--export function HeroNeuroBg() {- const { resolvedTheme } = useTheme();- const [mounted, setMounted] = useState(false);- const [reduced, setReduced] = useState(false);- useEffect(() => {- setMounted(true);- setReduced(window.matchMedia("(prefers-reduced-motion: reduce)").matches);- }, []);- if (!mounted) return null;- const colors = NEURO_COLORS[resolvedTheme === "dark" ? "dark" : "light"];- return (- <div className="pointer-events-none absolute inset-x-0 -top-22 h-screen opacity-90 [mask-composite:intersect] [mask-image:linear-gradient(to_bottom,black_55%,transparent_98%),radial-gradient(ellipse_60%_45%_at_50%_32%,transparent_38%,black_82%)]">- <NeuroNoise- className="h-full w-full"- colorFront={colors.front}- colorMid={colors.mid}- colorBack={colors.back}- brightness={0.05}- contrast={0.35}- speed={reduced ? 0 : 0.3}- />- </div>- );-}diff --git a/app/(home)/components/sections/hero-scroll-video.tsx b/app/(home)/components/sections/hero-scroll-video.tsxindex 65013a24..eb2b6cee 100644--- a/app/(home)/components/sections/hero-scroll-video.tsx+++ b/app/(home)/components/sections/hero-scroll-video.tsx@@ -119,13 +119,13 @@ function VideoCard({ className }: { className?: string }) {return (<div className={`relative overflow-hidden ${className ?? ""}`}><video- src="https://cdn.remocn.dev/videos/intoducing-remocn.mp4"+ src="https://cdn.remocn.dev/videos/hero-crt.mp4"autoPlaymutedloopplaysInlinepreload="metadata"- poster="/introducing-remocn-poster.jpg"+ poster="/hero-crt-poster.jpg"className="block h-full w-full object-cover"/></div>diff --git a/app/(home)/components/sections/hero.tsx b/app/(home)/components/sections/hero.tsxindex 428c9be5..a106a65e 100644--- a/app/(home)/components/sections/hero.tsx+++ b/app/(home)/components/sections/hero.tsx@@ -6,7 +6,7 @@ import { Button } from "@/components/ui/button";import { useTrackEvent } from "@/lib/analytics";import { FadeUp } from "../fade-up";import { HeroBadge } from "../hero-badge";-import { HeroNeuroBg } from "../hero-shader-bg";+import { HeroPhosphorBg } from "../hero-phosphor-bg";import { HeroScrollVideo } from "./hero-scroll-video";export function Hero() {@@ -16,7 +16,7 @@ export function Hero() {<section className="relative isolate pt-8 pb-12 sm:pt-16 sm:pb-24"><div aria-hidden className="absolute inset-0 -z-10"><div className="absolute inset-0 bg-grid-fade" />- <HeroNeuroBg />+ <HeroPhosphorBg /></div><div className="section">diff --git a/app/(home)/sponsors/components/sections/hero.tsx b/app/(home)/sponsors/components/sections/hero.tsxindex cce6901e..fc2cbdca 100644--- a/app/(home)/sponsors/components/sections/hero.tsx+++ b/app/(home)/sponsors/components/sections/hero.tsx@@ -2,7 +2,7 @@ import { ArrowRight, ArrowUpRight } from "lucide-react";import Link from "next/link";import { Button } from "@/components/ui/button";import { FadeUp } from "../../../components/fade-up";-import { HeroNeuroBg } from "../../../components/hero-shader-bg";+import { HeroPhosphorBg } from "../../../components/hero-phosphor-bg";const OPENPANEL_DASHBOARD_URL = "https://op.kapish.dev/share/overview/hRpldJ";const INTRO_GATE = "sponsors-intro";@@ -44,7 +44,7 @@ export function Hero() {<section className="relative isolate pt-24 pb-4 sm:pt-28 sm:pb-6"><div aria-hidden className="absolute inset-0 -z-10"><div className="absolute inset-0 bg-grid-fade" />- <HeroNeuroBg />+ <HeroPhosphorBg variant="field" /></div><div className="section"><div className="flex flex-col items-center text-center">diff --git a/public/hero-crt-poster.jpg b/public/hero-crt-poster.jpgnew file mode 100644index 00000000..52aa1a8bBinary files /dev/null and b/public/hero-crt-poster.jpg differ