Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: ship Real, ASCII Dissolve, Carret Wipe, Icon Scatter
kapishdimaa81b15f21773
diff --git a/components/docs/examples/ascii-dissolve-example.tsx b/components/docs/examples/ascii-dissolve-example.tsxnew file mode 100644index 00000000..1b311e8b--- /dev/null+++ b/components/docs/examples/ascii-dissolve-example.tsx@@ -0,0 +1,84 @@+"use client";++import { linearTiming, TransitionSeries } from "@remotion/transitions";+import { AbsoluteFill } from "remotion";+import { asciiDissolve } from "@/registry/remocn/ascii-dissolve";++const FONT_FAMILY =+ "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif";++function Scene({ label, background }: { label: string; background: string }) {+ return (+ <AbsoluteFill+ style={{+ background,+ alignItems: "center",+ justifyContent: "center",+ }}+ >+ <span+ style={{+ fontFamily: FONT_FAMILY,+ fontSize: 96,+ fontWeight: 600,+ letterSpacing: "-0.03em",+ color: "#f2f2f2",+ }}+ >+ {label}+ </span>+ </AbsoluteFill>+ );+}++interface AsciiDissolveExampleProps {+ colorBack?: string;+ colorFront?: string;+ cellSize?: number;+}++export function AsciiDissolveExampleScene({+ colorBack,+ colorFront,+ cellSize,+}: AsciiDissolveExampleProps) {+ return (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={70}>+ <Scene label="Scene A" background="#0d0d10" />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 40 })}+ presentation={asciiDissolve({ colorBack, colorFront, cellSize })}+ />+ <TransitionSeries.Sequence durationInFrames={70}>+ <Scene label="Scene B" background="#141318" />+ </TransitionSeries.Sequence>+ </TransitionSeries>+ );+}++export const asciiDissolveExampleCode = (+ values: Record<string, unknown>,+): string => {+ const colorBack = (values.colorBack as string) ?? "#0d0d10";+ const colorFront = (values.colorFront as string) ?? "#f2f2f2";+ const cellSize = (values.cellSize as number) ?? 22;+ return `import { TransitionSeries, linearTiming } from "@remotion/transitions";+import { asciiDissolve } from "@/components/remocn/ascii-dissolve";++export const MyVideo = () => (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneA />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 40 })}+ presentation={asciiDissolve({ colorBack: "${colorBack}", colorFront: "${colorFront}", cellSize: ${cellSize} })}+ />+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneB />+ </TransitionSeries.Sequence>+ </TransitionSeries>+);`;+};diff --git a/components/docs/examples/caret-wipe-example.tsx b/components/docs/examples/caret-wipe-example.tsxnew file mode 100644index 00000000..e73a1c43--- /dev/null+++ b/components/docs/examples/caret-wipe-example.tsx@@ -0,0 +1,84 @@+"use client";++import { linearTiming, TransitionSeries } from "@remotion/transitions";+import { AbsoluteFill } from "remotion";+import { caretWipe } from "@/registry/remocn/caret-wipe";++const FONT_FAMILY =+ "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif";++function Scene({ label, background }: { label: string; background: string }) {+ return (+ <AbsoluteFill+ style={{+ background,+ alignItems: "center",+ justifyContent: "center",+ }}+ >+ <span+ style={{+ fontFamily: FONT_FAMILY,+ fontSize: 96,+ fontWeight: 600,+ letterSpacing: "-0.03em",+ color: "#f2f2f2",+ }}+ >+ {label}+ </span>+ </AbsoluteFill>+ );+}++interface CaretWipeExampleProps {+ direction?: "left" | "right";+ caretColor?: string;+ caretWidth?: number;+}++export function CaretWipeExampleScene({+ direction,+ caretColor,+ caretWidth,+}: CaretWipeExampleProps) {+ return (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={70}>+ <Scene label="Scene A" background="#0d0d10" />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 40 })}+ presentation={caretWipe({ direction, caretColor, caretWidth })}+ />+ <TransitionSeries.Sequence durationInFrames={70}>+ <Scene label="Scene B" background="#141318" />+ </TransitionSeries.Sequence>+ </TransitionSeries>+ );+}++export const caretWipeExampleCode = (+ values: Record<string, unknown>,+): string => {+ const direction = (values.direction as string) ?? "right";+ const caretColor = (values.caretColor as string) ?? "#C3E88D";+ const caretWidth = (values.caretWidth as number) ?? 3;+ return `import { TransitionSeries, linearTiming } from "@remotion/transitions";+import { caretWipe } from "@/components/remocn/caret-wipe";++export const MyVideo = () => (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneA />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 40 })}+ presentation={caretWipe({ direction: "${direction}", caretColor: "${caretColor}", caretWidth: ${caretWidth} })}+ />+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneB />+ </TransitionSeries.Sequence>+ </TransitionSeries>+);`;+};diff --git a/components/docs/examples/icon-scatter-example.tsx b/components/docs/examples/icon-scatter-example.tsxnew file mode 100644index 00000000..c35bb7fd--- /dev/null+++ b/components/docs/examples/icon-scatter-example.tsx@@ -0,0 +1,87 @@+"use client";++import { linearTiming, TransitionSeries } from "@remotion/transitions";+import { AbsoluteFill } from "remotion";+import { iconScatter } from "@/registry/remocn/icon-scatter";++const FONT_FAMILY =+ "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif";++function Scene({ label, background }: { label: string; background: string }) {+ return (+ <AbsoluteFill+ style={{+ background,+ alignItems: "center",+ justifyContent: "center",+ }}+ >+ <span+ style={{+ fontFamily: FONT_FAMILY,+ fontSize: 96,+ fontWeight: 600,+ letterSpacing: "-0.03em",+ color: "#f2f2f2",+ }}+ >+ {label}+ </span>+ </AbsoluteFill>+ );+}++interface IconScatterExampleProps {+ count?: number;+ color?: string;+ coverColor?: string;+ flyDistance?: number;+}++export function IconScatterExampleScene({+ count,+ color,+ coverColor,+ flyDistance,+}: IconScatterExampleProps) {+ return (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={70}>+ <Scene label="Scene A" background="#0a0a0a" />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 40 })}+ presentation={iconScatter({ count, color, coverColor, flyDistance })}+ />+ <TransitionSeries.Sequence durationInFrames={70}>+ <Scene label="Scene B" background="#141318" />+ </TransitionSeries.Sequence>+ </TransitionSeries>+ );+}++export const iconScatterExampleCode = (+ values: Record<string, unknown>,+): string => {+ const count = (values.count as number) ?? 15;+ const color = (values.color as string) ?? "#fafafa";+ const coverColor = (values.coverColor as string) ?? "#0a0a0a";+ const flyDistance = (values.flyDistance as number) ?? 260;+ return `import { TransitionSeries, linearTiming } from "@remotion/transitions";+import { iconScatter } from "@/components/remocn/icon-scatter";++export const MyVideo = () => (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneA />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 40 })}+ presentation={iconScatter({ count: ${count}, color: "${color}", coverColor: "${coverColor}", flyDistance: ${flyDistance} })}+ />+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneB />+ </TransitionSeries.Sequence>+ </TransitionSeries>+);`;+};diff --git a/components/docs/examples/reel-example.tsx b/components/docs/examples/reel-example.tsxnew file mode 100644index 00000000..d34d071b--- /dev/null+++ b/components/docs/examples/reel-example.tsx@@ -0,0 +1,63 @@+"use client";++import { staticFile } from "remotion";+import { Reel } from "@/registry/remocn/reel";++const DEMO_IMAGES = [+ staticFile("reel/reel-1.jpg"),+ staticFile("reel/reel-2.jpg"),+ staticFile("reel/reel-3.jpg"),+ staticFile("reel/reel-4.jpg"),+ staticFile("reel/reel-5.jpg"),+ staticFile("reel/reel-6.jpg"),+];++export function ReelExampleScene({+ width,+ height,+ radius,+ step,+ reveal,+}: {+ width?: number;+ height?: number;+ radius?: number;+ step?: number;+ reveal?: number;+}) {+ return (+ <Reel+ images={DEMO_IMAGES}+ width={width}+ height={height}+ radius={radius}+ step={step}+ reveal={reveal}+ />+ );+}++export const reelExampleCode = (values: Record<string, unknown>): string => {+ const width = (values.width as number) ?? 1180;+ const height = (values.height as number) ?? 676;+ const radius = (values.radius as number) ?? 16;+ const step = (values.step as number) ?? 20;+ const reveal = (values.reveal as number) ?? 13;+ return `import { staticFile } from "remotion";+import { Reel } from "@/components/remocn/reel";++export const MyScene = () => (+ <Reel+ images={[+ staticFile("shot-1.png"),+ staticFile("shot-2.png"),+ staticFile("shot-3.png"),+ ]}+ width={${width}}+ height={${height}}+ radius={${radius}}+ step={${step}}+ reveal={${reveal}}+ />+);`;+};diff --git a/config/site.ts b/config/site.tsindex b830c391..23dc2e3a 100644--- a/config/site.ts+++ b/config/site.ts@@ -66,6 +66,14 @@ export const NEW_BADGE_PATHS = new Set<string>(["/docs/effects/scribble-circle","/docs/typography/hand-count","/docs/effects/crumple-toss",+ "/docs/transitions/ascii-dissolve",+ "/docs/transitions/caret-wipe",+ "/docs/transitions/icon-scatter",+ "/docs/shaders/components/shader-caustics",+ "/docs/shaders/components/shader-gem-smoke",+ "/docs/shaders/components/shader-strata",+ "/docs/shaders/components/shader-weave",+ "/docs/ui-blocks/reel",]);export const FOOTER_NAV: NavLink[] = [diff --git a/content/docs/components.mdx b/content/docs/components.mdxindex 4e98bfe7..0a93b7b5 100644--- a/content/docs/components.mdx+++ b/content/docs/components.mdx@@ -372,6 +372,12 @@ Pre-assembled interface elements: code editors, layouts, charts, and workflow vistatus: "stable",href: "/docs/ui-blocks/polaroid",},+ {+ name: "Reel",+ description: "A fixed centered card where images stack on the z-axis and each blooms open over the last",+ status: "stable",+ href: "/docs/ui-blocks/reel",+ },]}/>@@ -471,6 +477,31 @@ Scene transitions, camera moves, and stylized wipes.]}/>+### Stylized++<ComponentCardGrid+ items={[+ {+ name: "AsciiDissolve",+ description: "Dissolve one scene into the next through a drifting field of ASCII glyphs",+ status: "stable",+ href: "/docs/transitions/ascii-dissolve",+ },+ {+ name: "CaretWipe",+ description: "Sweep a typing caret across the frame, wiping the outgoing scene into the next",+ status: "stable",+ href: "/docs/transitions/caret-wipe",+ },+ {+ name: "IconScatter",+ description: "Scatter a field of icons over the cut, hiding the scene swap at the field's peak",+ status: "stable",+ href: "/docs/transitions/icon-scatter",+ },+ ]}+/>+## EffectsPhysical overlays and hand-made motion.diff --git a/content/docs/shaders/components/meta.json b/content/docs/shaders/components/meta.jsonindex 8f6db7ce..4dc2d085 100644--- a/content/docs/shaders/components/meta.json+++ b/content/docs/shaders/components/meta.json@@ -19,6 +19,10 @@"shader-god-rays","shader-smoke-ring","shader-metaballs",- "shader-pulsing-border"+ "shader-pulsing-border",+ "shader-caustics",+ "shader-gem-smoke",+ "shader-strata",+ "shader-weave"]}diff --git a/content/docs/shaders/components/shader-caustics.mdx b/content/docs/shaders/components/shader-caustics.mdxnew file mode 100644index 00000000..7361e46c--- /dev/null+++ b/content/docs/shaders/components/shader-caustics.mdx@@ -0,0 +1,38 @@+---+title: Caustics+description: A field of refracted light — the bright filaments light makes through a rippling surface+---++<ComponentPreview name="shader-caustics" />++## Installation++<InstallBlock name="shader-caustics" />++## Usage++```tsx+// src/Root.tsx+import { Composition } from "remotion";+import { ShaderCaustics } from "@/components/remocn/shader-caustics";++const ShaderCausticsScene = () => (+ <ShaderCaustics speed={1} scale={5.2} intensity={1} />+);++export const RemotionRoot = () => (+ <Composition+ id="ShaderCaustics"+ component={ShaderCausticsScene}+ durationInFrames={150}+ fps={30}+ width={1280}+ height={720}+ />+);+```++A custom WebGL shader written for the remocn registry — frame-driven and+deterministic, with no wall-clock time, so every render is identical. Feed+`colors` a two-stop range for the water tone and lift `accentAmount` to tint+the brightest filaments with `accent`.diff --git a/content/docs/shaders/components/shader-gem-smoke.mdx b/content/docs/shaders/components/shader-gem-smoke.mdxnew file mode 100644index 00000000..a7e80a99--- /dev/null+++ b/content/docs/shaders/components/shader-gem-smoke.mdx@@ -0,0 +1,50 @@+---+title: Gem Smoke+description: Animated color fields flowing behind and inside a glassy logo silhouette+---++<ComponentPreview name="shader-gem-smoke" />++## Installation++<InstallBlock name="shader-gem-smoke" />++## Usage++Feed it a brand mark via `image` — a URL, e.g. `staticFile("symbol.svg")`. The+shape is processed once and cached, so smoke lives behind and inside the glassy+silhouette and every frame renders the same smoke at the same time.++```tsx+// src/Root.tsx+import { Composition, staticFile } from "remotion";+import { ShaderGemSmoke } from "@/components/remocn/shader-gem-smoke";++const ShaderGemSmokeScene = () => (+ <ShaderGemSmoke+ image={staticFile("symbol.svg")}+ speed={1}+ colorBack="#0a0a10"+ size={0.8}+ />+);++export const RemotionRoot = () => (+ <Composition+ id="ShaderGemSmoke"+ component={ShaderGemSmokeScene}+ durationInFrames={150}+ fps={30}+ width={1280}+ height={720}+ />+);+```++Driven deterministically by the current frame (`frame` from+`useCurrentFrame()`), so renders stay identical. Any other `GemSmoke` prop is+forwarded through.++## Credits++Shader by [paper-design/shaders](https://github.com/paper-design/shaders).diff --git a/content/docs/shaders/components/shader-strata.mdx b/content/docs/shaders/components/shader-strata.mdxnew file mode 100644index 00000000..096b658f--- /dev/null+++ b/content/docs/shaders/components/shader-strata.mdx@@ -0,0 +1,39 @@+---+title: Strata+description: Fine horizontal sediment layers displaced by fbm noise, each drifting at its own depth+---++<ComponentPreview name="shader-strata" />++## Installation++<InstallBlock name="shader-strata" />++## Usage++```tsx+// src/Root.tsx+import { Composition } from "remotion";+import { ShaderStrata } from "@/components/remocn/shader-strata";++const ShaderStrataScene = () => (+ <ShaderStrata speed={1} layers={14} amplitude={0.16} />+);++export const RemotionRoot = () => (+ <Composition+ id="ShaderStrata"+ component={ShaderStrataScene}+ durationInFrames={150}+ fps={30}+ width={1280}+ height={720}+ />+);+```++A custom WebGL shader written for the remocn registry — frame-driven and+deterministic, with no wall-clock time. Each layer's edge is displaced by fbm+noise and drifts at its own depth speed, so the stack reads as a living+foundation rather than a gradient. Pass `colors` bottom-to-top and lift+`accentAmount` to tint the layers with `accent`.diff --git a/content/docs/shaders/components/shader-weave.mdx b/content/docs/shaders/components/shader-weave.mdxnew file mode 100644index 00000000..73ab8c86--- /dev/null+++ b/content/docs/shaders/components/shader-weave.mdx@@ -0,0 +1,39 @@+---+title: Weave+description: A woven substrate of warp and weft threads crossing on a domain-warped grid+---++<ComponentPreview name="shader-weave" />++## Installation++<InstallBlock name="shader-weave" />++## Usage++```tsx+// src/Root.tsx+import { Composition } from "remotion";+import { ShaderWeave } from "@/components/remocn/shader-weave";++const ShaderWeaveScene = () => (+ <ShaderWeave speed={1} scale={22} warp={0.03} />+);++export const RemotionRoot = () => (+ <Composition+ id="ShaderWeave"+ component={ShaderWeaveScene}+ durationInFrames={150}+ fps={30}+ width={1280}+ height={720}+ />+);+```++A custom WebGL shader written for the remocn registry — frame-driven and+deterministic, with no wall-clock time. Warp and weft threads cross on a+domain-warped grid, interlacing over and under like real cloth, with a slow+sheen of light travelling across the fabric. Raise `scale` for a finer weave+and `warp` for a more irregular hand-woven grid.diff --git a/content/docs/transitions/ascii-dissolve.mdx b/content/docs/transitions/ascii-dissolve.mdxnew file mode 100644index 00000000..148e5070--- /dev/null+++ b/content/docs/transitions/ascii-dissolve.mdx@@ -0,0 +1,81 @@+---+title: ASCII Dissolve+description: Dissolve one scene into the next through a drifting field of ASCII glyphs+---++<ComponentPreview name="ascii-dissolve" />++## Installation++<InstallBlock name="ascii-dissolve" />++## Usage++`asciiDissolve()` is a Remotion transition presentation. Pass it to a+`TransitionSeries.Transition` between two sequences. The outgoing scene blurs+out under a rising grid of monospace glyphs, then the incoming scene resolves+cell by cell as the field dissolves.++```tsx+import { TransitionSeries, linearTiming } from "@remotion/transitions";+import { asciiDissolve } from "@/components/remocn/ascii-dissolve";++export const MyVideo = () => (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneA />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 40 })}+ presentation={asciiDissolve()}+ />+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneB />+ </TransitionSeries.Sequence>+ </TransitionSeries>+);+```++## Props++`asciiDissolve(props)` accepts:++<PropsTable+ rows={[+ {+ name: "colorBack",+ type: "string",+ default: '"#0d0d10"',+ description: "Canvas behind the glyphs during the hold.",+ },+ {+ name: "colorFront",+ type: "string",+ default: '"rgba(242,242,242,0.6)"',+ description: "Glyph color.",+ },+ {+ name: "cellSize",+ type: "number",+ default: "22",+ description: "Row height of one glyph cell, in pixels.",+ },+ {+ name: "ramp",+ type: "string",+ default: '" .:-=+*#%@"',+ description: "Density ramp, lightest to densest.",+ },+ {+ name: "accentColor",+ type: "string",+ description: "Optional second color for a sparse scattering of accent cells.",+ },+ {+ name: "accentDensity",+ type: "number",+ default: "0.05",+ description: "Share of cells rendered in the accent color, 0–1.",+ },+ ]}+/>diff --git a/content/docs/transitions/caret-wipe.mdx b/content/docs/transitions/caret-wipe.mdxnew file mode 100644index 00000000..ba955813--- /dev/null+++ b/content/docs/transitions/caret-wipe.mdx@@ -0,0 +1,70 @@+---+title: Caret Wipe+description: Sweep a typing caret across the frame, wiping the outgoing scene into the next+---++<ComponentPreview name="caret-wipe" />++## Installation++<InstallBlock name="caret-wipe" />++## Usage++`caretWipe()` is a Remotion transition presentation. Pass it to a+`TransitionSeries.Transition` between two sequences. A text caret sweeps across+the frame — the outgoing scene is erased behind it and the incoming scene is+typed in ahead of it, like a cursor rewriting the screen.++```tsx+import { TransitionSeries, linearTiming } from "@remotion/transitions";+import { caretWipe } from "@/components/remocn/caret-wipe";++export const MyVideo = () => (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneA />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 40 })}+ presentation={caretWipe({ direction: "right" })}+ />+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneB />+ </TransitionSeries.Sequence>+ </TransitionSeries>+);+```++## Props++`caretWipe(props)` accepts:++<PropsTable+ rows={[+ {+ name: "direction",+ type: '"left" | "right"',+ default: '"right"',+ description: "Sweep direction. `right` types the screen left→right; `left` reverses it.",+ },+ {+ name: "caretColor",+ type: "string",+ default: '"#C3E88D"',+ description: "The caret's color — the remocn lime by default.",+ },+ {+ name: "caretWidth",+ type: "number",+ default: "3",+ description: "Caret bar width, in pixels.",+ },+ {+ name: "caretHeight",+ type: "number",+ default: "0.5",+ description: "Caret bar height as a fraction of frame height (0–1), vertically centered.",+ },+ ]}+/>diff --git a/content/docs/transitions/icon-scatter.mdx b/content/docs/transitions/icon-scatter.mdxnew file mode 100644index 00000000..c6c079b4--- /dev/null+++ b/content/docs/transitions/icon-scatter.mdx@@ -0,0 +1,88 @@+---+title: Icon Scatter+description: Scatter a field of icons over the cut, hiding the scene swap at the field's peak+---++<ComponentPreview name="icon-scatter" />++## Installation++<InstallBlock name="icon-scatter" />++## Usage++`iconScatter()` is a Remotion transition presentation. Pass it to a+`TransitionSeries.Transition` between two sequences. A field of line icons flies+in and fills the frame, a cover fill hides the swap at the field's peak, then+the icons scatter away to reveal the incoming scene.++```tsx+import { TransitionSeries, linearTiming } from "@remotion/transitions";+import { iconScatter } from "@/components/remocn/icon-scatter";++export const MyVideo = () => (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneA />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 40 })}+ presentation={iconScatter({ count: 15 })}+ />+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneB />+ </TransitionSeries.Sequence>+ </TransitionSeries>+);+```++## Props++`iconScatter(props)` accepts:++<PropsTable+ rows={[+ {+ name: "count",+ type: "number",+ default: "15",+ description: "How many icons populate the field.",+ },+ {+ name: "color",+ type: "string",+ default: '"#fafafa"',+ description: "Icon stroke color.",+ },+ {+ name: "coverColor",+ type: "string",+ default: '"#0a0a0a"',+ description: "The fill that hides the swap at the field's peak.",+ },+ {+ name: "coverOpacity",+ type: "number",+ default: "0.92",+ description: "Peak opacity of the cover fill (0–1). Lower shows more of the swap.",+ },+ {+ name: "strokeWidth",+ type: "number",+ default: "2",+ description: "Stroke width of the icons, in their 24px viewBox units.",+ },+ {+ name: "flyDistance",+ type: "number",+ default: "260",+ description: "How far icons fly on scatter, in pixels.",+ },+ {+ name: "seed",+ type: "string",+ default: '"icon-scatter"',+ description: "Seed so two scatters in one video can differ.",+ },+ ]}+/>diff --git a/content/docs/transitions/index.mdx b/content/docs/transitions/index.mdxindex 7440e35b..271326cc 100644--- a/content/docs/transitions/index.mdx+++ b/content/docs/transitions/index.mdx@@ -94,3 +94,30 @@ Textured, organic transitions driven by frame-synced shaders. They install `@pap},]}/>++## Stylized++Kinetic, interface-flavored transitions — typed wipes, scattering icons, and messaging motion.++<ComponentCardGrid+ items={[+ {+ name: "AsciiDissolve",+ description: "Dissolve one scene into the next through a drifting field of ASCII glyphs",+ status: "stable",+ href: "/docs/transitions/ascii-dissolve",+ },+ {+ name: "CaretWipe",+ description: "Sweep a typing caret across the frame, wiping the outgoing scene into the next",+ status: "stable",+ href: "/docs/transitions/caret-wipe",+ },+ {+ name: "IconScatter",+ description: "Scatter a field of icons over the cut, hiding the scene swap at the field's peak",+ status: "stable",+ href: "/docs/transitions/icon-scatter",+ },+ ]}+/>diff --git a/content/docs/transitions/meta.json b/content/docs/transitions/meta.jsonindex 9ecd8b9e..fd413450 100644--- a/content/docs/transitions/meta.json+++ b/content/docs/transitions/meta.json@@ -15,6 +15,9 @@"push-through","focus-pull","zoom-blur",- "page-turn"+ "page-turn",+ "ascii-dissolve",+ "caret-wipe",+ "icon-scatter"]}diff --git a/content/docs/ui-blocks/meta.json b/content/docs/ui-blocks/meta.jsonindex 55a0a24f..8cb2ff5f 100644--- a/content/docs/ui-blocks/meta.json+++ b/content/docs/ui-blocks/meta.json@@ -13,6 +13,7 @@"progress-steps","paper-sticker","polaroid",- "check-list"+ "check-list",+ "reel"]}diff --git a/content/docs/ui-blocks/reel.mdx b/content/docs/ui-blocks/reel.mdxnew file mode 100644index 00000000..1c0c7612--- /dev/null+++ b/content/docs/ui-blocks/reel.mdx@@ -0,0 +1,100 @@+---+title: Reel+description: A fixed centered card where images stack on the z-axis and each blooms open over the last+---++<ComponentPreview name="reel" />++## Installation++<InstallBlock name="reel" />++## Usage++Give `Reel` an ordered list of image URLs. Each image stacks on the z-axis over+the previous one at the same centered position, and reveals via a centre-out+mask that expands from its middle — so a new shot blooms open over the last and+the frame is never blank. No camera move: the mask is the only motion. Pace the+reveals with `step` (frames between images) and `reveal` (frames for one image+to open).++```tsx+// src/Root.tsx+import { Composition, staticFile } from "remotion";+import { Reel } from "@/components/remocn/reel";++const ReelScene = () => (+ <Reel+ images={[+ staticFile("shot-1.png"),+ staticFile("shot-2.png"),+ staticFile("shot-3.png"),+ ]}+ />+);++export const RemotionRoot = () => (+ <Composition+ id="Reel"+ component={ReelScene}+ durationInFrames={160}+ fps={30}+ width={1280}+ height={720}+ />+);+```++## Props++<PropsTable+ rows={[+ {+ name: "images",+ type: "string[]",+ description: "Ordered image URLs. Each reveals over the previous one in sequence.",+ },+ {+ name: "width",+ type: "number",+ default: "1180",+ description: "Card width, in pixels. The card is centered in the composition.",+ },+ {+ name: "height",+ type: "number",+ default: "676",+ description: "Card height, in pixels.",+ },+ {+ name: "radius",+ type: "number",+ default: "16",+ description: "Corner radius of the card, in pixels.",+ },+ {+ name: "step",+ type: "number",+ default: "20",+ description: "Frames between successive reveals.",+ },+ {+ name: "reveal",+ type: "number",+ default: "13",+ description: "Frames for one image's centre-out mask to fully open.",+ },+ {+ name: "objectPosition",+ type: "string",+ default: '"top"',+ description: "CSS object-position for the images inside the card.",+ },+ {+ name: "background",+ type: "string",+ default: '"#050506"',+ description: "Card surface color, shown behind an image while it opens.",+ },+ ]}+/>diff --git a/public/reel/reel-1.jpg b/public/reel/reel-1.jpgnew file mode 100644index 00000000..0237a75dBinary files /dev/null and b/public/reel/reel-1.jpg differdiff --git a/public/reel/reel-2.jpg b/public/reel/reel-2.jpgnew file mode 100644index 00000000..2db6773dBinary files /dev/null and b/public/reel/reel-2.jpg differdiff --git a/public/reel/reel-3.jpg b/public/reel/reel-3.jpgnew file mode 100644index 00000000..532e6c85Binary files /dev/null and b/public/reel/reel-3.jpg differdiff --git a/public/reel/reel-4.jpg b/public/reel/reel-4.jpgnew file mode 100644index 00000000..f4581f7aBinary files /dev/null and b/public/reel/reel-4.jpg differdiff --git a/public/reel/reel-5.jpg b/public/reel/reel-5.jpgnew file mode 100644index 00000000..6b8cba83Binary files /dev/null and b/public/reel/reel-5.jpg differdiff --git a/public/reel/reel-6.jpg b/public/reel/reel-6.jpgnew file mode 100644index 00000000..2380bb88Binary files /dev/null and b/public/reel/reel-6.jpg differdiff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 99113023..95d161d0 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -102,6 +102,14 @@ import { whipPanConfig } from "@/registry/remocn/whip-pan/config";import { xFollowCardConfig } from "@/registry/remocn/x-follow-card/config";import { xFollowersOverviewConfig } from "@/registry/remocn/x-followers-overview/config";import { zoomBlurConfig } from "@/registry/remocn/zoom-blur/config";+import { asciiDissolveConfig } from "@/registry/remocn/ascii-dissolve/config";+import { caretWipeConfig } from "@/registry/remocn/caret-wipe/config";+import { iconScatterConfig } from "@/registry/remocn/icon-scatter/config";+import { reelConfig } from "@/registry/remocn/reel/config";+import { shaderCausticsConfig } from "@/registry/remocn/shader-caustics/config";+import { shaderGemSmokeConfig } from "@/registry/remocn/shader-gem-smoke/config";+import { shaderStrataConfig } from "@/registry/remocn/shader-strata/config";+import { shaderWeaveConfig } from "@/registry/remocn/shader-weave/config";import { iconActivityConfig } from "@/registry/remocn-icons/icon-activity/config";import { iconAlertTriangleConfig } from "@/registry/remocn-icons/icon-alert-triangle/config";import { iconArrowDownConfig } from "@/registry/remocn-icons/icon-arrow-down/config";@@ -1920,6 +1928,62 @@ const registry: Record<string, RegistryEntry> = {})),config: caretConfig,},+ "ascii-dissolve": {+ load: () =>+ import("@/components/docs/examples/ascii-dissolve-example").then((m) => ({+ default: m.AsciiDissolveExampleScene,+ })),+ config: asciiDissolveConfig,+ },+ "caret-wipe": {+ load: () =>+ import("@/components/docs/examples/caret-wipe-example").then((m) => ({+ default: m.CaretWipeExampleScene,+ })),+ config: caretWipeConfig,+ },+ "icon-scatter": {+ load: () =>+ import("@/components/docs/examples/icon-scatter-example").then((m) => ({+ default: m.IconScatterExampleScene,+ })),+ config: iconScatterConfig,+ },+ "shader-caustics": {+ load: () =>+ import("@/registry/remocn/shader-caustics").then((m) => ({+ default: m.ShaderCaustics,+ })),+ config: shaderCausticsConfig,+ },+ "shader-gem-smoke": {+ load: () =>+ import("@/registry/remocn/shader-gem-smoke").then((m) => ({+ default: m.ShaderGemSmoke,+ })),+ config: shaderGemSmokeConfig,+ },+ "shader-strata": {+ load: () =>+ import("@/registry/remocn/shader-strata").then((m) => ({+ default: m.ShaderStrata,+ })),+ config: shaderStrataConfig,+ },+ "shader-weave": {+ load: () =>+ import("@/registry/remocn/shader-weave").then((m) => ({+ default: m.ShaderWeave,+ })),+ config: shaderWeaveConfig,+ },+ reel: {+ load: () =>+ import("@/components/docs/examples/reel-example").then((m) => ({+ default: m.ReelExampleScene,+ })),+ config: reelConfig,+ },};// Append the shared controls (e.g. `speed`) to every component config sodiff --git a/registry/remocn/ascii-dissolve/config.ts b/registry/remocn/ascii-dissolve/config.tsnew file mode 100644index 00000000..4bbd26c7--- /dev/null+++ b/registry/remocn/ascii-dissolve/config.ts@@ -0,0 +1,25 @@+import { asciiDissolveExampleCode } from "@/components/docs/examples/ascii-dissolve-example";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";++export const asciiDissolveConfig: ComponentConfig = {+ componentName: "asciiDissolve",+ importPath: "@/components/remocn/ascii-dissolve",+ controls: {+ colorBack: { type: "color", default: "#0d0d10", label: "Background" },+ colorFront: { type: "color", default: "#f2f2f2", label: "Glyphs" },+ cellSize: {+ type: "number",+ default: 22,+ min: 10,+ max: 36,+ step: 2,+ label: "Cell size",+ },+ },+ durationInFrames: 100,+ fps: FPS,+ compositionWidth: W,+ compositionHeight: H,+ previewBackdrop: { type: "color", value: "#0d0d10" },+ snippet: asciiDissolveExampleCode,+};diff --git a/registry/remocn/ascii-dissolve/index.tsx b/registry/remocn/ascii-dissolve/index.tsxnew file mode 100644index 00000000..6d647fec--- /dev/null+++ b/registry/remocn/ascii-dissolve/index.tsx@@ -0,0 +1,493 @@+"use client";++import React from "react";+import {+ AbsoluteFill,+ Easing,+ continueRender,+ delayRender,+ interpolate,+ random,+ useVideoConfig,+} from "remotion";+import type {+ TransitionPresentation,+ TransitionPresentationComponentProps,+} from "@remotion/transitions";++const clampOpts = {+ extrapolateLeft: "clamp" as const,+ extrapolateRight: "clamp" as const,+};++// ---------------------------------------------------------------------------+// ascii-dissolve — the frame becomes plain text. The outgoing scene fades as+// a fullscreen field of monospace glyphs rises over it: a deterministic+// noise field drives each cell through a density ramp (" .:-=+*#%@"), so the+// cover reads as living ASCII. It holds fully opaque long enough to be READ+// as text, then the cells drop back down the ramp to space while the+// incoming scene resolves beneath.+//+// Text mode (enterText): the outgoing scene blurs out under the rising+// field; the incoming headline is never previewed as ascii — the field+// dissolves cell by cell (per-cell staggered, never a flat plane) while+// the real text fades in over it. `enterStyle` picks what happens AROUND+// the arriving text:+// "fade" — plain: staggered dissolve everywhere, text fades in.+// "clearing" — the dissolve order is biased by distance to the text:+// cells near the headline vanish first, the field opens a+// granular cavity around it.+// "halo" — a smooth radial attenuation grows around the text: near+// cells slide down the ramp into thin glyphs, a soft dark+// well forms behind the headline.+// "wave" — one density impulse rides outward from the text: cells+// on the wavefront jump up the ramp for a beat, then the+// front leaves cleared field behind it.+// "focus" — the field defocuses: it blurs and dims while the sharp+// text resolves — a depth-of-field handoff.+// "lime-echo" — on landing, a sparse ring of accent-colored glyphs+// flashes once around the headline and settles.+//+// Fully deterministic: per-cell jitter comes from remotion's seeded random,+// the flow from fixed sinusoids over progress, the letterform masks from a+// one-time offscreen-canvas sample of the loaded fonts.+// ---------------------------------------------------------------------------++export type AsciiTextSpec = {+ /** The incoming headline (used for timing and the zone styles). */+ text: string;+ /** Must match the scene's rendered text exactly. */+ fontSize: number;+ /** Concrete family list for canvas sampling (CSS vars won't resolve). */+ fontFamily: string;+ /** Default 400. */+ fontWeight?: number;+ /** Letter-spacing in em, if the scene's text carries one. Default 0. */+ letterSpacingEm?: number;+ /** Glyph color of the ASCII letterform. Default ink. */+ color?: string;+ /** Vertical offset from frame center, px. Default 0. */+ offsetY?: number;+};++export type AsciiEnterStyle =+ | "fade"+ | "clearing"+ | "halo"+ | "wave"+ | "focus"+ | "lime-echo";++export type AsciiDissolveProps = {+ /** Row height of one glyph cell in px. Default 22 (use ~14 in text mode). */+ cellSize?: number;+ /** Glyph color. Default translucent ink. */+ colorFront?: string;+ /** Canvas behind the glyphs during the hold. Default near-black. */+ colorBack?: string;+ /** Optional second color for a sparse scattering of accent cells. */+ accentColor?: string;+ /** Share of cells rendered in the accent color, 0..1. Default 0.05. */+ accentDensity?: number;+ /** Density ramp, lightest → densest. Default " .:-=+*#%@". */+ ramp?: string;+ /** Monospace stack for the field. */+ fontFamily?: string;+ /** Text mode: the incoming headline (used for timing and as the zone). */+ enterText?: AsciiTextSpec;+ /** What happens around the arriving text. Default "fade". */+ enterStyle?: AsciiEnterStyle;+ /** Progress window over which the outgoing scene fades out. */+ exitFade?: [number, number];+ /** Progress window over which the incoming scene resolves. */+ enterFade?: [number, number];+};++// Per-cell stagger: global window progress g plus jitter j → this cell's+// local progress. spread controls how far cells drift apart.+const stagger = (g: number, j: number, spread = 0.55) =>+ Math.max(0, Math.min(1, (g - j * spread) / (1 - spread)));++// The field's mono advance, measured at the size the <pre> renders.+const measureAdvance = (fontFamily: string, fontSize: number): number => {+ const fallback = fontSize * 0.6;+ if (typeof document === "undefined") return fallback;+ const ctx = document.createElement("canvas").getContext("2d");+ if (!ctx) return fallback;+ ctx.font = `400 ${fontSize}px ${fontFamily}`;+ const w = ctx.measureText("0").width;+ return w > 0 ? w : fallback;+};++// Sample the headline's letterforms: draw the text once on an offscreen+// canvas at 2× cell resolution and grade each cell by subsample coverage+// (0..4). Edge cells get mid-ramp glyphs, core cells the densest — the+// grading anti-aliases the letter contours, so strokes thinner than a cell+// still read as continuous letters.+const buildTextMask = (+ spec: AsciiTextSpec,+ width: number,+ height: number,+ cols: number,+ rows: number,+ advance: number,+ cellH: number,+): Uint8Array | null => {+ if (typeof document === "undefined") return null;+ const canvas = document.createElement("canvas");+ canvas.width = cols * 2;+ canvas.height = rows * 2;+ const ctx = canvas.getContext("2d", { willReadFrequently: true });+ if (!ctx) return null;+ ctx.setTransform(2 / advance, 0, 0, 2 / cellH, 0, 0);+ ctx.font = `${spec.fontWeight ?? 400} ${spec.fontSize}px ${spec.fontFamily}`;+ const spacing = (spec.letterSpacingEm ?? 0) * spec.fontSize;+ if (spacing !== 0) {+ (ctx as CanvasRenderingContext2D & { letterSpacing?: string }).letterSpacing = `${spacing}px`;+ }+ ctx.textAlign = "center";+ // Canvas "middle" baseline is computed from the em square and lands+ // visibly ABOVE where a flex-centered DOM span puts the same text. Rebuild+ // the DOM's math instead: a flex-centered span (line-height normal) puts+ // its baseline at H/2 + (ascent - descent)/2, with ascent/descent taken+ // from the font's own metrics.+ ctx.textBaseline = "alphabetic";+ ctx.fillStyle = "#fff";+ const metrics = ctx.measureText(spec.text);+ const ascent = metrics.fontBoundingBoxAscent ?? spec.fontSize * 0.8;+ const descent = metrics.fontBoundingBoxDescent ?? spec.fontSize * 0.2;+ const baselineY = height / 2 + (ascent - descent) / 2 + (spec.offsetY ?? 0);+ ctx.fillText(spec.text, width / 2, baselineY);+ const data = ctx.getImageData(0, 0, cols * 2, rows * 2).data;+ const mask = new Uint8Array(cols * rows);+ for (let y = 0; y < rows; y++) {+ for (let x = 0; x < cols; x++) {+ let hits = 0;+ if (data[((y * 2) * cols * 2 + x * 2) * 4 + 3] > 100) hits++;+ if (data[((y * 2) * cols * 2 + x * 2 + 1) * 4 + 3] > 100) hits++;+ if (data[((y * 2 + 1) * cols * 2 + x * 2) * 4 + 3] > 100) hits++;+ if (data[((y * 2 + 1) * cols * 2 + x * 2 + 1) * 4 + 3] > 100) hits++;+ mask[y * cols + x] = hits;+ }+ }+ return mask;+};++const AsciiDissolvePresentation: React.FC<+ TransitionPresentationComponentProps<AsciiDissolveProps>+> = ({ children, presentationProgress, presentationDirection, passedProps }) => {+ const {+ cellSize = 22,+ colorFront = "rgba(242,242,242,0.6)",+ colorBack = "#0d0d10",+ accentColor,+ accentDensity = 0.05,+ ramp = " .:-=+*#%@",+ fontFamily = "ui-monospace, SFMono-Regular, Menlo, monospace",+ enterText,+ enterStyle = "fade",+ exitFade,+ enterFade,+ } = passedProps;+ const { width, height } = useVideoConfig();+ const entering = presentationDirection === "entering";+ const p = presentationProgress;+ const textMode = enterText !== undefined;++ // The outgoing scene blurs out under the rising field.+ const exitWindow = exitFade ?? [0.14, 0.3];+ // The real text fades in while the field dissolves cell by cell.+ const enterWindow = enterFade ?? (textMode ? [0.6, 0.8] : [0.62, 0.8]);++ // The masks and the mono advance must be measured with the REAL webfonts.+ // The component can mount while they are still loading (a fallback font+ // would bake wrong metrics into the memoized masks and shift the letterform+ // off the scene's text) — so gate on document.fonts and hold the render.+ const [fontsReady, setFontsReady] = React.useState(+ () => typeof document === "undefined" || document.fonts.status === "loaded",+ );+ React.useEffect(() => {+ if (fontsReady || typeof document === "undefined") return;+ const handle = delayRender("ascii-dissolve: waiting for fonts");+ let alive = true;+ document.fonts.ready.then(() => {+ if (alive) setFontsReady(true);+ continueRender(handle);+ });+ return () => {+ alive = false;+ continueRender(handle);+ };+ }, [fontsReady]);++ const fontSize = cellSize * 0.86;+ const advance = React.useMemo(+ () => measureAdvance(fontFamily, fontSize),+ // eslint-disable-next-line react-hooks/exhaustive-deps+ [fontFamily, fontSize, fontsReady],+ );+ const cols = Math.ceil(width / advance);+ const rows = Math.ceil(height / cellSize) + 1;++ // The zone styles need to know where the incoming text sits — a capsule+ // around its center line, derived from the letterform mask's bounds. The+ // mask itself is never displayed.+ const zoneStyles: AsciiEnterStyle[] = ["clearing", "halo", "wave", "lime-echo"];+ const needZone = enterText !== undefined && zoneStyles.includes(enterStyle);+ const enterMask = React.useMemo(+ () =>+ enterText && needZone && fontsReady+ ? buildTextMask(enterText, width, height, cols, rows, advance, cellSize)+ : null,+ // eslint-disable-next-line react-hooks/exhaustive-deps+ [enterText, needZone, fontsReady, width, height, cols, rows, advance, cellSize],+ );+ const enterZone = React.useMemo(() => {+ if (enterMask === null) return null;+ let minX = Infinity;+ let maxX = -Infinity;+ let minY = Infinity;+ let maxY = -Infinity;+ for (let y = 0; y < rows; y++) {+ for (let x = 0; x < cols; x++) {+ if (enterMask[y * cols + x] > 0) {+ if (x < minX) minX = x;+ if (x > maxX) maxX = x;+ if (y < minY) minY = y;+ if (y > maxY) maxY = y;+ }+ }+ }+ if (maxX < minX) return null;+ return {+ x0: minX * advance,+ x1: (maxX + 1) * advance,+ cy: ((minY + maxY + 1) / 2) * cellSize,+ halfH: ((maxY - minY + 1) / 2) * cellSize,+ };+ }, [enterMask, cols, rows, advance, cellSize]);++ if (!entering) {+ const exitStyle: React.CSSProperties = {+ opacity: interpolate(p, exitWindow, [1, 0], clampOpts),+ filter: `blur(${interpolate(p, [exitWindow[0], exitWindow[1] + 0.06], [0, 8], clampOpts)}px)`,+ };+ return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;+ }++ // -------------------------------------------------------------------------+ // Envelopes.+ // -------------------------------------------------------------------------+ // Generic mode keeps the original flat envelopes; text mode staggers the+ // rise and the dissolve per cell instead, so nothing moves as one plane.+ const coverage = textMode+ ? 1+ : interpolate(p, [0.06, 0.28, 0.6, 0.9], [0, 1, 1, 0], clampOpts);+ const fieldOpacity = textMode+ ? 1+ : interpolate(p, [0.04, 0.2, 0.66, 0.94], [0, 1, 1, 0], clampOpts);+ const panelOpacity = textMode+ ? interpolate(p, [0.06, 0.24, 0.55, 0.75], [0, 1, 1, 0], clampOpts)+ : fieldOpacity;++ // Text-mode phase clocks. The outgoing scene blurs out as the field+ // rises; the field boils, then dissolves cell by cell while the real+ // text fades in.+ const riseG = interpolate(p, [0.04, 0.3], [0, 1], clampOpts);+ const dissolveG = interpolate(+ p,+ enterStyle === "clearing" ? [0.52, 0.85] : [0.5, 0.82],+ [0, 1],+ clampOpts,+ );++ // Style clocks for the arriving text's surroundings.+ const haloG = interpolate(p, [0.52, 0.74], [0, 1], clampOpts);+ const waveT = interpolate(p, [0.56, 0.94], [0, 1], {+ ...clampOpts,+ easing: Easing.out(Easing.quad),+ });+ const waveR = waveT * 860; // the impulse front, px from the text capsule+ const echoFlash = interpolate(p, [0.56, 0.64, 0.82], [0, 0.9, 0], clampOpts);+ const focusBlur = interpolate(p, [0.55, 0.9], [0, 4], clampOpts);+ const focusFade = interpolate(p, [0.62, 0.94], [1, 0], clampOpts);++ const cx = cols / 2;+ const cy = rows / 2;+ const t = p * 5;+ const rampLen = ramp.length;++ const mainRows: string[] = [];+ const accentRows: string[] = [];+ const echoRows: string[] = [];+ const fieldAlive = textMode ? p < 0.999 : fieldOpacity > 0.001;++ if (fieldAlive) {+ for (let y = 0; y < rows; y++) {+ let mainRow = "";+ let accentRow = "";+ let echoRow = "";+ for (let x = 0; x < cols; x++) {+ // A slow sinusoid flow plus per-cell jitter — organic, but textual.+ const base =+ 0.5 ++ (Math.sin(x * 0.33 + t * 1.7) ++ Math.sin(y * 0.51 - t * 1.2) ++ Math.sin((x * 0.5 + y) * 0.24 + t * 0.9) ++ Math.sin(Math.hypot(x - cx, (y - cy) * 1.8) * 0.42 - t * 2.1)) /+ 8;+ const jitter = random(`ascii-${x}-${y}`);++ // Distance to the incoming text's capsule, for the zone styles —+ // and the plain circular distance from its center, for the wave.+ let dist = Infinity;+ let distC = Infinity;+ let s = 0; // proximity, 1 at the text's center line → 0 far away+ if (enterZone !== null) {+ const px = (x + 0.5) * advance;+ const py = (y + 0.5) * cellSize;+ const nx = Math.min(Math.max(px, enterZone.x0), enterZone.x1);+ dist = Math.hypot(px - nx, py - enterZone.cy);+ distC = Math.hypot(px - (enterZone.x0 + enterZone.x1) / 2, py - enterZone.cy);+ s = Math.max(0, 1 - dist / (enterZone.halfH + 64));+ }++ let cellCoverage: number;+ if (!textMode) {+ cellCoverage = coverage;+ } else if (enterStyle === "clearing" && enterZone !== null) {+ // Dissolve order biased by proximity: cells near the headline+ // vanish first, a granular cavity opens outward.+ const order =+ (1 - s) * 0.6 + random(`ascii-d-${x}-${y}`) * 0.4;+ const gone = Math.max(+ 0,+ Math.min(1, (dissolveG * 1.35 - order) / 0.3),+ );+ cellCoverage = stagger(riseG, jitter) * (1 - gone);+ } else if (enterStyle === "wave" && enterZone !== null) {+ // The impulse front — a CIRCLE from the text's center — clears+ // the field behind it.+ const passed = Math.max(0, Math.min(1, (waveR - distC) / 55));+ cellCoverage = stagger(riseG, jitter) * (1 - passed);+ } else {+ cellCoverage =+ stagger(riseG, jitter) *+ (1 - stagger(dissolveG, random(`ascii-d-${x}-${y}`)));+ }++ let d = Math.max(+ 0,+ Math.min(0.999, (base * 0.72 + jitter * 0.28) * cellCoverage * 1.2 - 0.08),+ );+ if (enterStyle === "halo" && enterZone !== null) {+ // A smooth radial attenuation: near cells slide down the ramp.+ d *= 1 - haloG * s;+ }+ if (enterStyle === "wave" && enterZone !== null && waveT > 0) {+ // Cells on the circular wavefront jump up the ramp for a beat.+ const bump = Math.exp(-(((distC - waveR) / 55) ** 2));+ d = Math.min(0.999, d + bump * 0.5);+ }+ const ch = ramp[Math.floor(d * rampLen)] ?? " ";+ const isAccent =+ accentColor !== undefined && random(`ascii-a-${x}-${y}`) < accentDensity;+ mainRow += isAccent ? " " : ch;+ accentRow += isAccent ? ch : " ";++ // The lime echo: a sparse ring of accent glyphs around the headline.+ if (+ enterStyle === "lime-echo" &&+ enterZone !== null &&+ echoFlash > 0.01 &&+ dist > 8 &&+ dist < 84 &&+ ch !== " " &&+ random(`ascii-e-${x}-${y}`) < 0.5+ ) {+ echoRow += ch;+ } else {+ echoRow += " ";+ }+ }+ mainRows.push(mainRow);+ accentRows.push(accentRow);+ echoRows.push(echoRow);+ }+ }++ // The blur must hit exactly 0 by p = 1: the entering presentation stays+ // mounted at p = 1 for the whole scene, so any residue would soften the+ // incoming scene permanently. In text mode the incoming scene resolves+ // with NO transform at all — it must sit pixel-exact under the letterform.+ const enterBlur = textMode+ ? 0+ : interpolate(p, [enterWindow[0], Math.min(1, enterWindow[1] + 0.05)], [10, 0], clampOpts);+ const childStyle: React.CSSProperties = textMode+ ? { opacity: interpolate(p, enterWindow, [0, 1], clampOpts) }+ : {+ opacity: interpolate(p, enterWindow, [0, 1], clampOpts),+ transform: `scale(${interpolate(p, [enterWindow[0], 1], [1.04, 1], {+ ...clampOpts,+ easing: Easing.out(Easing.cubic),+ })})`,+ filter: enterBlur > 0.01 ? `blur(${enterBlur}px)` : undefined,+ };++ const preStyle: React.CSSProperties = {+ margin: 0,+ position: "absolute",+ inset: 0,+ overflow: "hidden",+ whiteSpace: "pre",+ fontFamily,+ fontSize,+ lineHeight: `${cellSize}px`,+ color: colorFront,+ };++ const renderLayer = (layerRows: string[], color: string, layerOpacity: number) =>+ layerOpacity > 0.001 ? (+ <pre style={{ ...preStyle, color, opacity: layerOpacity }}>+ {layerRows.join("\n")}+ </pre>+ ) : null;++ return (+ <AbsoluteFill>+ <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>+ {fieldAlive ? (+ <AbsoluteFill style={{ pointerEvents: "none" }}>+ <AbsoluteFill style={{ background: colorBack, opacity: panelOpacity }} />+ <AbsoluteFill+ style={+ enterStyle === "focus" && textMode+ ? {+ opacity: focusFade,+ filter: focusBlur > 0.01 ? `blur(${focusBlur}px)` : undefined,+ }+ : undefined+ }+ >+ {renderLayer(mainRows, colorFront, fieldOpacity)}+ {accentColor !== undefined+ ? renderLayer(accentRows, accentColor, fieldOpacity)+ : null}+ </AbsoluteFill>+ {enterStyle === "lime-echo"+ ? renderLayer(echoRows, accentColor ?? "#C3E88D", echoFlash)+ : null}+ </AbsoluteFill>+ ) : null}+ </AbsoluteFill>+ );+};++export function asciiDissolve(+ props: AsciiDissolveProps = {},+): TransitionPresentation<AsciiDissolveProps> {+ return {+ component: AsciiDissolvePresentation,+ props,+ };+}diff --git a/registry/remocn/caret-wipe/config.ts b/registry/remocn/caret-wipe/config.tsnew file mode 100644index 00000000..3e929379--- /dev/null+++ b/registry/remocn/caret-wipe/config.ts@@ -0,0 +1,30 @@+import { caretWipeExampleCode } from "@/components/docs/examples/caret-wipe-example";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";++export const caretWipeConfig: ComponentConfig = {+ componentName: "caretWipe",+ importPath: "@/components/remocn/caret-wipe",+ controls: {+ direction: {+ type: "select",+ default: "right",+ options: ["left", "right"],+ label: "Direction",+ },+ caretColor: { type: "color", default: "#C3E88D", label: "Caret" },+ caretWidth: {+ type: "number",+ default: 3,+ min: 1,+ max: 8,+ step: 1,+ label: "Caret width",+ },+ },+ durationInFrames: 100,+ fps: FPS,+ compositionWidth: W,+ compositionHeight: H,+ previewBackdrop: { type: "color", value: "#0d0d10" },+ snippet: caretWipeExampleCode,+};diff --git a/registry/remocn/caret-wipe/index.tsx b/registry/remocn/caret-wipe/index.tsxnew file mode 100644index 00000000..d71ff28c--- /dev/null+++ b/registry/remocn/caret-wipe/index.tsx@@ -0,0 +1,138 @@+"use client";++import type React from "react";+import { AbsoluteFill, Easing, interpolate } from "remotion";+import type {+ TransitionPresentation,+ TransitionPresentationComponentProps,+} from "@remotion/transitions";++const clampOpts = {+ extrapolateLeft: "clamp" as const,+ extrapolateRight: "clamp" as const,+};++export type CaretWipeProps = {+ /** Sweep direction. `right` types the screen left→right; `left` reverses it. */+ direction?: "left" | "right";+ /** The caret's color — the remocn lime by default. */+ caretColor?: string;+ /** Caret bar width in px. */+ caretWidth?: number;+ /** Caret bar height as a fraction of frame height (0–1), vertically centered. */+ caretHeight?: number;+};++// ---------------------------------------------------------------------------+// caret-wipe — a typographic scene transition.+//+// A single tall caret (the remocn text cursor) sweeps across the frame in one+// eased pass. The caret IS the wipe boundary: the region it has PASSED shows+// the incoming scene (freshly "typed in" — it settles down and un-blurs just+// behind the caret), while the region it has NOT reached still shows the+// outgoing scene (being "backspaced" — it lifts and blurs as it's consumed).+//+// Both scenes share whatever backdrop sits behind the TransitionSeries, so the+// complementary clips never expose a seam. Pure frame-driven interpolate — no+// CSS keyframes — so it seeks correctly and renders identically every time.+// ---------------------------------------------------------------------------+const CaretWipePresentation: React.FC<+ TransitionPresentationComponentProps<CaretWipeProps>+> = ({ children, presentationProgress, presentationDirection, passedProps }) => {+ const {+ direction = "right",+ caretColor = "#C3E88D",+ caretWidth = 3,+ caretHeight = 0.5,+ } = passedProps;++ const entering = presentationDirection === "entering";+ const p = presentationProgress;+ const goingRight = direction === "right";++ // Eased sweep so the caret decelerates as it lands the last column.+ const eased = interpolate(p, [0, 1], [0, 1], {+ ...clampOpts,+ easing: Easing.bezier(0.65, 0, 0.35, 1),+ });+ // Caret position as a percent of frame width; the wipe boundary.+ const caretX = goingRight ? eased * 100 : (1 - eased) * 100;++ if (!entering) {+ // Outgoing: keep only the column the caret hasn't reached yet, and let it+ // lift + blur as it's consumed (backspaced).+ const keep = goingRight+ ? `inset(0 0 0 ${caretX}%)` // keep the right band [caretX, 100]+ : `inset(0 ${100 - caretX}% 0 0)`; // keep the left band [0, caretX]+ return (+ <AbsoluteFill+ style={{+ clipPath: keep,+ WebkitClipPath: keep,+ transform: `translateY(${interpolate(p, [0, 1], [0, -6], clampOpts)}px)`,+ filter: `blur(${interpolate(p, [0.1, 1], [0, 4], clampOpts)}px)`,+ }}+ >+ {children}+ </AbsoluteFill>+ );+ }++ // Incoming: reveal only the column the caret has already passed, and let it+ // settle down + sharpen just behind the caret (typed in).+ const reveal = goingRight+ ? `inset(0 ${100 - caretX}% 0 0)` // reveal the left band [0, caretX]+ : `inset(0 0 0 ${caretX}%)`; // reveal the right band [caretX, 100]++ // The caret fades in at the very start and out at the very end so it never+ // pops on/off at the transition's frame edges.+ const caretOpacity = interpolate(+ p,+ [0, 0.08, 0.92, 1],+ [0, 1, 1, 0],+ clampOpts,+ );++ return (+ <AbsoluteFill>+ {/* Freshly typed content, clipped to the passed column. */}+ <AbsoluteFill+ style={{+ clipPath: reveal,+ WebkitClipPath: reveal,+ transform: `translateY(${interpolate(p, [0, 1], [3, 0], clampOpts)}px)`,+ filter: `blur(${interpolate(p, [0, 0.8], [2, 0], clampOpts)}px)`,+ }}+ >+ {children}+ </AbsoluteFill>++ {/* The caret — drawn on top, unclipped, only in the entering pass so it+ appears exactly once. */}+ <AbsoluteFill style={{ pointerEvents: "none", opacity: caretOpacity }}>+ <div+ style={{+ position: "absolute",+ left: `${caretX}%`,+ top: `${(1 - caretHeight) * 50}%`,+ height: `${caretHeight * 100}%`,+ width: caretWidth,+ transform: "translateX(-50%)",+ background: caretColor,+ borderRadius: caretWidth,+ boxShadow: `0 0 18px ${caretColor}, 0 0 6px ${caretColor}`,+ }}+ />+ </AbsoluteFill>+ </AbsoluteFill>+ );+};++export function caretWipe(+ props: CaretWipeProps = {},+): TransitionPresentation<CaretWipeProps> {+ return {+ component: CaretWipePresentation,+ props,+ };+}diff --git a/registry/remocn/icon-scatter/config.ts b/registry/remocn/icon-scatter/config.tsnew file mode 100644index 00000000..73241ef3--- /dev/null+++ b/registry/remocn/icon-scatter/config.ts@@ -0,0 +1,33 @@+import { iconScatterExampleCode } from "@/components/docs/examples/icon-scatter-example";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";++export const iconScatterConfig: ComponentConfig = {+ componentName: "iconScatter",+ importPath: "@/components/remocn/icon-scatter",+ controls: {+ count: {+ type: "number",+ default: 15,+ min: 4,+ max: 30,+ step: 1,+ label: "Icon count",+ },+ color: { type: "color", default: "#fafafa", label: "Icons" },+ coverColor: { type: "color", default: "#0a0a0a", label: "Cover" },+ flyDistance: {+ type: "number",+ default: 260,+ min: 80,+ max: 500,+ step: 10,+ label: "Fly distance",+ },+ },+ durationInFrames: 100,+ fps: FPS,+ compositionWidth: W,+ compositionHeight: H,+ previewBackdrop: { type: "color", value: "#0a0a0a" },+ snippet: iconScatterExampleCode,+};diff --git a/registry/remocn/icon-scatter/index.tsx b/registry/remocn/icon-scatter/index.tsxnew file mode 100644index 00000000..63df2ae8--- /dev/null+++ b/registry/remocn/icon-scatter/index.tsx@@ -0,0 +1,252 @@+"use client";++import type React from "react";+import { AbsoluteFill, Easing, interpolate, random } from "remotion";+import type {+ TransitionPresentation,+ TransitionPresentationComponentProps,+} from "@remotion/transitions";++// ===========================================================================+// icon-scatter — a scene change made of icons.+//+// The outgoing scene shatters into a deterministic field of line-icons that+// draw themselves on, spin, and scatter outward; at mid-transition the field+// is densest and covers the swap; then the icons fly off and draw away as the+// incoming scene resolves through them. Motion-forward and self-contained —+// the paths are inlined, the draw-on is CSS `pathLength` only, so the+// transition ships as one file with no icon dependencies.+//+// Pace it with `linearTiming`/`springTiming` like any presentation. Reads+// best over ~16–26 frames.+// ===========================================================================++const clampOpts = {+ extrapolateLeft: "clamp" as const,+ extrapolateRight: "clamp" as const,+};++// Single-path Lucide-style glyphs (viewBox 0 0 24 24) — each draws cleanly+// from one continuous stroke via a normalized dashoffset.+const ICON_PATHS: string[] = [+ // star+ "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",+ // heart+ "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",+ // zap+ "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",+ // sparkles+ "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",+ // moon+ "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",+ // play+ "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",+ // crown+ "M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",+ // circle+ "M12 2 A10 10 0 0 1 22 12 A10 10 0 0 1 12 22 A10 10 0 0 1 2 12 A10 10 0 0 1 12 2",+ // square (rounded)+ "M7 4h10a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3z",+ // triangle+ "M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3z",+ // plus+ "M12 5v14 M5 12h14",+];++export type IconScatterProps = {+ /** How many icons populate the field. Default 15. */+ count?: number;+ /** Icon stroke color. Default near-white ink. */+ color?: string;+ /** The fill that hides the swap at the field's peak. Default warm obsidian. */+ coverColor?: string;+ /** Peak opacity of the cover fill (0–1). Lower = more of the swap shows. */+ coverOpacity?: number;+ /** Stroke width of the icons, in their 24px viewBox units. Default 2. */+ strokeWidth?: number;+ /** How far icons fly on scatter, in px. Default 260. */+ flyDistance?: number;+ /** Seed so two scatters in one video can differ. Default "icon-scatter". */+ seed?: string;+};++type Placed = {+ path: string;+ xPct: number;+ yPct: number;+ size: number;+ spin: number; // degrees swept over the whole transition+ dir: number; // outward scatter angle offset+ strokeOpacity: number;+ pStart: number; // when this icon begins drawing (p-space)+ pOut: number; // when this icon begins flying out (p-space)+};++// Jittered grid so the field reads as scattered but never clumps or overlaps.+function placeIcons(count: number, seed: string): Placed[] {+ const cols = Math.ceil(Math.sqrt((count * 16) / 9));+ const rows = Math.ceil(count / cols);+ const out: Placed[] = [];+ for (let i = 0; i < count; i++) {+ const col = i % cols;+ const row = Math.floor(i / cols);+ const cellW = 100 / cols;+ const cellH = 100 / rows;+ const jx = (random(`${seed}-jx-${i}`) - 0.5) * cellW * 0.7;+ const jy = (random(`${seed}-jy-${i}`) - 0.5) * cellH * 0.7;+ out.push({+ path: ICON_PATHS[Math.floor(random(`${seed}-p-${i}`) * ICON_PATHS.length)],+ xPct: cellW * (col + 0.5) + jx,+ yPct: cellH * (row + 0.5) + jy,+ size: 34 + random(`${seed}-s-${i}`) * 40,+ spin: (random(`${seed}-r-${i}`) - 0.5) * 320,+ dir: (random(`${seed}-d-${i}`) - 0.5) * 1.2,+ strokeOpacity: 0.5 + random(`${seed}-o-${i}`) * 0.5,+ pStart: random(`${seed}-a-${i}`) * 0.16,+ pOut: 0.52 + random(`${seed}-b-${i}`) * 0.16,+ });+ }+ return out;+}++const IconField: React.FC<{+ p: number;+ placed: Placed[];+ color: string;+ strokeWidth: number;+ flyDistance: number;+}> = ({ p, placed, color, strokeWidth, flyDistance }) => (+ <AbsoluteFill style={{ pointerEvents: "none" }}>+ {placed.map((icon, i) => {+ // Draw on over ~0.34 of p from the icon's start, then fly out.+ const draw = interpolate(p, [icon.pStart, icon.pStart + 0.34], [0, 1], {+ ...clampOpts,+ easing: Easing.out(Easing.cubic),+ });+ const scaleIn = interpolate(p, [icon.pStart, icon.pStart + 0.3], [0.4, 1], {+ ...clampOpts,+ easing: Easing.out(Easing.back(1.6)),+ });+ const outP = interpolate(p, [icon.pOut, 1], [0, 1], {+ ...clampOpts,+ easing: Easing.in(Easing.cubic),+ });++ // Scatter outward from the frame center, along the icon's own radial.+ const cx = icon.xPct - 50;+ const cy = icon.yPct - 50;+ const angle = Math.atan2(cy, cx) + icon.dir;+ const fly = outP * flyDistance;+ const tx = Math.cos(angle) * fly;+ const ty = Math.sin(angle) * fly;++ const spin = icon.spin * interpolate(p, [icon.pStart, 1], [0, 1], clampOpts);+ const opacity = Math.min(draw, 1 - outP) * icon.strokeOpacity;+ if (opacity <= 0.001) return null;++ return (+ <svg+ key={i}+ width={icon.size}+ height={icon.size}+ viewBox="0 0 24 24"+ fill="none"+ stroke={color}+ strokeWidth={strokeWidth}+ strokeLinecap="round"+ strokeLinejoin="round"+ style={{+ position: "absolute",+ left: `${icon.xPct}%`,+ top: `${icon.yPct}%`,+ opacity,+ overflow: "visible",+ transform: `translate(-50%, -50%) translate(${tx}px, ${ty}px) scale(${+ scaleIn * (1 - outP * 0.3)+ }) rotate(${spin}deg)`,+ }}+ >+ <path+ d={icon.path}+ pathLength={1}+ strokeDasharray={1}+ strokeDashoffset={1 - draw}+ />+ </svg>+ );+ })}+ </AbsoluteFill>+);++const IconScatterPresentation: React.FC<+ TransitionPresentationComponentProps<IconScatterProps>+> = ({ children, presentationProgress, presentationDirection, passedProps }) => {+ const {+ count = 15,+ color = "#fafafa",+ coverColor = "#0a0a0a",+ coverOpacity = 0.92,+ strokeWidth = 2,+ flyDistance = 260,+ seed = "icon-scatter",+ } = passedProps;+ const entering = presentationDirection === "entering";+ const p = presentationProgress;++ if (!entering) {+ // The outgoing scene sinks back and blurs as the field rises over it.+ const exitStyle: React.CSSProperties = {+ opacity: interpolate(p, [0.28, 0.5], [1, 0], clampOpts),+ transform: `scale(${interpolate(p, [0, 0.5], [1, 0.94], {+ ...clampOpts,+ easing: Easing.in(Easing.cubic),+ })})`,+ filter: `blur(${interpolate(p, [0.1, 0.45], [0, 10], clampOpts)}px)`,+ };+ return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;+ }++ const placed = placeIcons(count, seed);++ // The incoming scene resolves once the field starts clearing.+ const childStyle: React.CSSProperties = {+ opacity: interpolate(p, [0.5, 0.68], [0, 1], clampOpts),+ transform: `scale(${interpolate(p, [0.5, 1], [1.06, 1], {+ ...clampOpts,+ easing: Easing.out(Easing.cubic),+ })})`,+ filter: `blur(${interpolate(p, [0.5, 0.72], [8, 0], clampOpts)}px)`,+ };++ // The cover fill hides the swap while the field is densest.+ const cover = interpolate(p, [0, 0.3, 0.62, 0.9], [0, 1, 1, 0], clampOpts);++ return (+ <AbsoluteFill>+ <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>+ <AbsoluteFill+ style={{+ background: coverColor,+ opacity: cover * coverOpacity,+ pointerEvents: "none",+ }}+ />+ <IconField+ p={p}+ placed={placed}+ color={color}+ strokeWidth={strokeWidth}+ flyDistance={flyDistance}+ />+ </AbsoluteFill>+ );+};++export function iconScatter(+ props: IconScatterProps = {},+): TransitionPresentation<IconScatterProps> {+ return {+ component: IconScatterPresentation,+ props,+ };+}diff --git a/registry/remocn/reel/config.ts b/registry/remocn/reel/config.tsnew file mode 100644index 00000000..4b8b2869--- /dev/null+++ b/registry/remocn/reel/config.ts@@ -0,0 +1,55 @@+import { reelExampleCode } from "@/components/docs/examples/reel-example";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";++export const reelConfig: ComponentConfig = {+ componentName: "Reel",+ importPath: "@/components/remocn/reel",+ controls: {+ width: {+ type: "number",+ default: 1180,+ min: 600,+ max: 1280,+ step: 20,+ label: "Card width",+ },+ height: {+ type: "number",+ default: 676,+ min: 360,+ max: 720,+ step: 4,+ label: "Card height",+ },+ radius: {+ type: "number",+ default: 16,+ min: 0,+ max: 40,+ step: 1,+ label: "Corner radius",+ },+ step: {+ type: "number",+ default: 20,+ min: 6,+ max: 40,+ step: 1,+ label: "Frames / image",+ },+ reveal: {+ type: "number",+ default: 13,+ min: 4,+ max: 30,+ step: 1,+ label: "Reveal frames",+ },+ },+ durationInFrames: 160,+ fps: FPS,+ compositionWidth: W,+ compositionHeight: H,+ previewBackdrop: { type: "color", value: "#0b0b0c" },+ snippet: reelExampleCode,+};diff --git a/registry/remocn/reel/index.tsx b/registry/remocn/reel/index.tsxnew file mode 100644index 00000000..8585e20e--- /dev/null+++ b/registry/remocn/reel/index.tsx@@ -0,0 +1,97 @@+"use client";++import {+ AbsoluteFill,+ Easing,+ Img,+ interpolate,+ useCurrentFrame,+ useVideoConfig,+} from "remotion";++const clamp = {+ extrapolateLeft: "clamp" as const,+ extrapolateRight: "clamp" as const,+};+const EASE_OUT = Easing.out(Easing.cubic);++export type ReelProps = {+ images: string[];+ width?: number;+ height?: number;+ radius?: number;+ step?: number;+ reveal?: number;+ objectPosition?: string;+ background?: string;+};++export function Reel({+ images,+ width = 1180,+ height = 676,+ radius = 16,+ step = 20,+ reveal = 13,+ objectPosition = "top",+ background = "#050506",+}: ReelProps) {+ const frame = useCurrentFrame();+ const { width: compWidth, height: compHeight } = useVideoConfig();+ const left = (compWidth - width) / 2;+ const top = (compHeight - height) / 2;++ return (+ <AbsoluteFill>+ {images.map((src, i) => {+ const p = interpolate(+ frame,+ [i * step, i * step + reveal],+ [0, 1],+ { ...clamp, easing: EASE_OUT },+ );+ if (p <= 0) return null;+ const inset = (1 - p) * 50;+ const imgScale = interpolate(p, [0, 1], [1.08, 1], clamp);+ return (+ <div+ key={i}+ style={{+ position: "absolute",+ left,+ top,+ width,+ height,+ zIndex: i,+ clipPath: `inset(${inset}% ${inset}% round ${radius}px)`,+ WebkitClipPath: `inset(${inset}% ${inset}% round ${radius}px)`,+ background,+ boxShadow: "0 30px 80px rgba(0,0,0,0.6)",+ willChange: "clip-path",+ }}+ >+ <Img+ src={src}+ style={{+ width: "100%",+ height: "100%",+ objectFit: "cover",+ objectPosition,+ transform: `scale(${imgScale})`,+ willChange: "transform",+ }}+ />+ <div+ style={{+ position: "absolute",+ inset: 0,+ borderRadius: radius,+ border: "1px solid rgba(255,255,255,0.08)",+ }}+ />+ </div>+ );+ })}+ </AbsoluteFill>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 6147a555..6dd74abf 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -1474,6 +1474,118 @@"target": "lib/remocn/stop-motion.ts"}]+ },+ {+ "name": "ascii-dissolve",+ "type": "registry:component",+ "title": "ASCII Dissolve",+ "description": "Dissolve one scene into the next through a drifting field of ASCII glyphs.",+ "dependencies": ["remotion", "@remotion/transitions"],+ "files": [+ {+ "path": "ascii-dissolve/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/ascii-dissolve.tsx"+ }+ ]+ },+ {+ "name": "caret-wipe",+ "type": "registry:component",+ "title": "Caret Wipe",+ "description": "Sweep a typing caret across the frame, wiping the outgoing scene into the next.",+ "dependencies": ["remotion", "@remotion/transitions"],+ "files": [+ {+ "path": "caret-wipe/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/caret-wipe.tsx"+ }+ ]+ },+ {+ "name": "icon-scatter",+ "type": "registry:component",+ "title": "Icon Scatter",+ "description": "Scatter a field of icons over the cut, hiding the scene swap at the field's peak.",+ "dependencies": ["remotion", "@remotion/transitions"],+ "files": [+ {+ "path": "icon-scatter/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-scatter.tsx"+ }+ ]+ },+ {+ "name": "shader-caustics",+ "type": "registry:component",+ "title": "Shader Caustics",+ "description": "A field of refracted light — the bright filaments light makes through a rippling surface.",+ "dependencies": ["remotion"],+ "files": [+ {+ "path": "shader-caustics/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/shader-caustics.tsx"+ }+ ]+ },+ {+ "name": "shader-gem-smoke",+ "type": "registry:component",+ "title": "Shader Gem Smoke",+ "description": "Paper's Gem Smoke shader driven by the frame — smoke flowing behind and inside a glassy logo.",+ "dependencies": ["@paper-design/shaders-react"],+ "files": [+ {+ "path": "shader-gem-smoke/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/shader-gem-smoke.tsx"+ }+ ]+ },+ {+ "name": "shader-strata",+ "type": "registry:component",+ "title": "Shader Strata",+ "description": "Fine horizontal sediment layers displaced by fbm noise, each drifting at its own depth.",+ "dependencies": ["remotion"],+ "files": [+ {+ "path": "shader-strata/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/shader-strata.tsx"+ }+ ]+ },+ {+ "name": "shader-weave",+ "type": "registry:component",+ "title": "Shader Weave",+ "description": "A woven substrate of warp and weft threads crossing on a domain-warped grid, with a travelling sheen.",+ "dependencies": ["remotion"],+ "files": [+ {+ "path": "shader-weave/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/shader-weave.tsx"+ }+ ]+ },+ {+ "name": "reel",+ "type": "registry:component",+ "title": "Reel",+ "description": "A fixed centered card where images stack on the z-axis and each blooms open over the last via a centre-out mask.",+ "dependencies": ["remotion"],+ "files": [+ {+ "path": "reel/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/reel.tsx"+ }+ ]}]}diff --git a/registry/remocn/shader-caustics/config.ts b/registry/remocn/shader-caustics/config.tsnew file mode 100644index 00000000..0450523c--- /dev/null+++ b/registry/remocn/shader-caustics/config.ts@@ -0,0 +1,45 @@+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";++export const shaderCausticsConfig: ComponentConfig = {+ componentName: "ShaderCaustics",+ importPath: "@/components/remocn/shader-caustics",+ controls: {+ speed: {+ type: "number",+ default: 1,+ min: 0,+ max: 3,+ step: 0.1,+ label: "Speed",+ },+ scale: {+ type: "number",+ default: 5.2,+ min: 1,+ max: 12,+ step: 0.1,+ label: "Scale",+ },+ intensity: {+ type: "number",+ default: 1,+ min: 0,+ max: 2,+ step: 0.1,+ label: "Intensity",+ },+ accent: { type: "color", default: "#7F57FF", label: "Accent" },+ accentAmount: {+ type: "number",+ default: 0,+ min: 0,+ max: 1,+ step: 0.05,+ label: "Accent amount",+ },+ },+ durationInFrames: 150,+ fps: FPS,+ compositionWidth: W,+ compositionHeight: H,+};diff --git a/registry/remocn/shader-caustics/index.tsx b/registry/remocn/shader-caustics/index.tsxnew file mode 100644index 00000000..75b1c8a0--- /dev/null+++ b/registry/remocn/shader-caustics/index.tsx@@ -0,0 +1,237 @@+"use client";++import { useEffect, useRef, useState } from "react";+import {+ continueRender,+ delayRender,+ useCurrentFrame,+ useVideoConfig,+} from "remotion";++// A field of refracted light — caustics. The web of bright filaments light+// makes when it passes through a surface and lands on the floor beneath.+// Written for the remocn registry as a custom WebGL shader (not a+// paper-design wrapper): frame-driven, deterministic, no wall-clock time.+//+// The filaments are slightly denser and brighter toward the bottom of the+// frame — the light lands on the base — which makes it a natural carrier for+// foundation stories. `accent` / `accentAmount` tint the filaments themselves+// (not the floor), so an undertone can arrive mid-video by animating+// `accentAmount` from the master timeline and stay in the light afterwards.++export interface ShaderCausticsProps {+ /** [floor color, filament light color]. */+ colors?: [string, string];+ /** Tint mixed into the bright filaments. */+ accent?: string;+ /** 0..1 — how much of the accent the filaments take. */+ accentAmount?: number;+ /** Spatial frequency of the light web. */+ scale?: number;+ /** Overall brightness of the filaments. */+ intensity?: number;+ /** Global time multiplier. */+ speed?: number;+ className?: string;+}++const VERT = `+attribute vec2 a_pos;+void main() {+ gl_Position = vec4(a_pos, 0.0, 1.0);+}+`;++const FRAG = `+precision highp float;++uniform vec2 u_res;+uniform float u_time;+uniform float u_scale;+uniform float u_intensity;+uniform vec3 u_floor;+uniform vec3 u_light;+uniform vec3 u_accent;+uniform float u_accentAmt;++float hash(vec2 p) {+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);+}++void main() {+ vec2 uv = gl_FragCoord.xy / u_res;+ float aspect = u_res.x / u_res.y;+ vec2 p = vec2(uv.x * aspect, uv.y) * u_scale;++ // Iterative trigonometric warp: each pass bends the sample point by the+ // previous pass, and the reciprocal distance to the warped axes+ // accumulates into the caustic web.+ float t = u_time * 0.35;+ vec2 i = p;+ float c = 0.0;+ for (int n = 0; n < 4; n++) {+ float phase = t * (1.0 - 3.2 / float(n + 2));+ i = p + vec2(+ cos(phase - i.x) + sin(phase + i.y),+ sin(phase - i.y) + cos(phase + i.x)+ );+ c += 1.0 / length(vec2(+ p.x / (sin(i.x + phase) * 90.0),+ p.y / (cos(i.y + phase) * 90.0)+ ));+ }+ c /= 4.0;+ c = 1.24 - pow(abs(c), 1.35);+ // |c| collapses to zero along thin branching veins — that zero-crossing+ // set IS the caustic web. Light the veins with an exponential falloff+ // (sharp core + a soft halo) and leave everything else near-black.+ float web = exp(-abs(c) * 0.5) + 0.22 * exp(-abs(c) * 0.12);+ web = web / (1.0 + 0.6 * web);++ // The light lands on the base: filaments read stronger low in the frame.+ float ground = mix(1.25, 0.55, uv.y);+ web *= ground * u_intensity;++ // Vignette keeps the corners quiet so type always wins.+ vec2 v = uv - 0.5;+ float vig = 1.0 - dot(v, v) * 1.1;+ web *= clamp(vig, 0.0, 1.0);++ vec3 filament = mix(u_light, u_accent, clamp(u_accentAmt, 0.0, 1.0));+ vec3 col = u_floor + filament * web;++ // A whisper of living grain, time-derived so it stays deterministic.+ col += (hash(gl_FragCoord.xy + floor(u_time * 9.0)) - 0.5) * 0.012;++ gl_FragColor = vec4(col, 1.0);+}+`;++const hexToRgb = (hex: string): [number, number, number] => {+ const h = hex.replace("#", "");+ const v =+ h.length === 3+ ? h+ .split("")+ .map((c) => c + c)+ .join("")+ : h;+ const n = parseInt(v, 16);+ return [((n >> 16) & 255) / 255, ((n >> 8) & 255) / 255, (n & 255) / 255];+};++type GlState = {+ gl: WebGLRenderingContext;+ uniforms: Record<string, WebGLUniformLocation | null>;+};++export function ShaderCaustics({+ colors = ["#0a0a0a", "#2e2e33"],+ accent = "#7F57FF",+ accentAmount = 0,+ scale = 5.2,+ intensity = 1,+ speed = 1,+ className,+}: ShaderCausticsProps) {+ const frame = useCurrentFrame();+ const { fps, width, height } = useVideoConfig();+ const canvasRef = useRef<HTMLCanvasElement>(null);+ const stateRef = useRef<GlState | null>(null);+ const [handle] = useState(() => delayRender("shader-caustics"));+ const continuedRef = useRef(false);++ useEffect(() => {+ const canvas = canvasRef.current;+ if (!canvas || stateRef.current) return;+ const gl = canvas.getContext("webgl", {+ antialias: false,+ preserveDrawingBuffer: true,+ });+ if (!gl) return;++ const compile = (type: number, src: string) => {+ const shader = gl.createShader(type)!;+ gl.shaderSource(shader, src);+ gl.compileShader(shader);+ return shader;+ };+ const program = gl.createProgram()!;+ gl.attachShader(program, compile(gl.VERTEX_SHADER, VERT));+ gl.attachShader(program, compile(gl.FRAGMENT_SHADER, FRAG));+ gl.linkProgram(program);+ gl.useProgram(program);++ const buf = gl.createBuffer();+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);+ gl.bufferData(+ gl.ARRAY_BUFFER,+ new Float32Array([-1, -1, 3, -1, -1, 3]),+ gl.STATIC_DRAW,+ );+ const loc = gl.getAttribLocation(program, "a_pos");+ gl.enableVertexAttribArray(loc);+ gl.vertexAttribPointer(loc, 2, gl.FLOAT, false, 0, 0);++ const uniforms: GlState["uniforms"] = {};+ for (const name of [+ "u_res",+ "u_time",+ "u_scale",+ "u_intensity",+ "u_floor",+ "u_light",+ "u_accent",+ "u_accentAmt",+ ]) {+ uniforms[name] = gl.getUniformLocation(program, name);+ }+ stateRef.current = { gl, uniforms };+ }, []);++ useEffect(() => {+ const state = stateRef.current;+ const canvas = canvasRef.current;+ if (!state || !canvas) return;+ const { gl, uniforms } = state;++ gl.viewport(0, 0, canvas.width, canvas.height);+ gl.uniform2f(uniforms.u_res, canvas.width, canvas.height);+ gl.uniform1f(uniforms.u_time, (frame / fps) * speed);+ gl.uniform1f(uniforms.u_scale, scale);+ gl.uniform1f(uniforms.u_intensity, intensity);+ gl.uniform3fv(uniforms.u_floor, hexToRgb(colors[0]));+ gl.uniform3fv(uniforms.u_light, hexToRgb(colors[1]));+ gl.uniform3fv(uniforms.u_accent, hexToRgb(accent));+ gl.uniform1f(uniforms.u_accentAmt, accentAmount);+ gl.drawArrays(gl.TRIANGLES, 0, 3);++ if (!continuedRef.current) {+ continuedRef.current = true;+ requestAnimationFrame(() =>+ requestAnimationFrame(() => continueRender(handle)),+ );+ }+ }, [+ frame,+ fps,+ speed,+ scale,+ intensity,+ colors,+ accent,+ accentAmount,+ handle,+ ]);++ return (+ <div className={className} style={{ position: "absolute", inset: 0 }}>+ <canvas+ ref={canvasRef}+ width={width}+ height={height}+ style={{ width: "100%", height: "100%", display: "block" }}+ />+ </div>+ );+}diff --git a/registry/remocn/shader-gem-smoke/config.ts b/registry/remocn/shader-gem-smoke/config.tsnew file mode 100644index 00000000..8494d202--- /dev/null+++ b/registry/remocn/shader-gem-smoke/config.ts@@ -0,0 +1,45 @@+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";++export const shaderGemSmokeConfig: ComponentConfig = {+ componentName: "ShaderGemSmoke",+ importPath: "@/components/remocn/shader-gem-smoke",+ controls: {+ speed: {+ type: "number",+ default: 1,+ min: 0,+ max: 3,+ step: 0.1,+ label: "Speed",+ },+ colorBack: { type: "color", default: "#0a0a10", label: "Background" },+ innerDistortion: {+ type: "number",+ default: 0.8,+ min: 0,+ max: 2,+ step: 0.05,+ label: "Inner distortion",+ },+ outerDistortion: {+ type: "number",+ default: 0.6,+ min: 0,+ max: 2,+ step: 0.05,+ label: "Outer distortion",+ },+ size: {+ type: "number",+ default: 0.8,+ min: 0.2,+ max: 1.5,+ step: 0.05,+ label: "Size",+ },+ },+ durationInFrames: 150,+ fps: FPS,+ compositionWidth: W,+ compositionHeight: H,+};diff --git a/registry/remocn/shader-gem-smoke/index.tsx b/registry/remocn/shader-gem-smoke/index.tsxnew file mode 100644index 00000000..61d5499d--- /dev/null+++ b/registry/remocn/shader-gem-smoke/index.tsx@@ -0,0 +1,79 @@+"use client";++import { GemSmoke, type GemSmokeProps } from "@paper-design/shaders-react";+import React, { useCallback, useState } from "react";+import {+ continueRender,+ delayRender,+ useCurrentFrame,+ useVideoConfig,+} from "remotion";++const NEUTRAL_COLORS = ["#3a3a5c", "#52527a"];++export interface ShaderGemSmokeProps extends Omit<+ GemSmokeProps,+ "frame" | "ref"+> {}++/**+ * Paper's Gem Smoke shader, driven deterministically by the current frame.+ *+ * Animated color fields placed over a logo shape — smoke lives behind (and+ * inside) the glassy silhouette. Feed it a brand mark via `image` (a URL,+ * e.g. staticFile('prisma/symbol-light.svg')); the shape is processed once+ * and cached, so every frame renders the same smoke at the same time.+ */+export function ShaderGemSmoke({+ speed = 1,+ colors = NEUTRAL_COLORS,+ colorBack = "#0a0a10",+ innerDistortion = 0.8,+ outerDistortion = 0.6,+ outerGlow = 0.55,+ innerGlow = 1,+ size = 0.8,+ className,+ ...rest+}: ShaderGemSmokeProps) {+ const frame = useCurrentFrame();+ const { fps, width, height } = useVideoConfig();++ const [handle] = useState(() => delayRender("shader-gem-smoke"));+ const gate = useCallback(+ (element: HTMLDivElement | null) => {+ if (!element) return;+ requestAnimationFrame(() =>+ requestAnimationFrame(() => continueRender(handle)),+ );+ },+ [handle],+ );++ return (+ <div+ ref={gate}+ className={className}+ style={{ position: "absolute", inset: 0 }}+ >+ <React.Suspense fallback={null}>+ <GemSmoke+ speed={0}+ frame={(frame / fps) * speed * 1000}+ colors={colors}+ colorBack={colorBack}+ innerDistortion={innerDistortion}+ outerDistortion={outerDistortion}+ outerGlow={outerGlow}+ innerGlow={innerGlow}+ size={size}+ fit="cover"+ width={width}+ height={height}+ suspendWhenProcessingImage+ {...rest}+ />+ </React.Suspense>+ </div>+ );+}diff --git a/registry/remocn/shader-strata/config.ts b/registry/remocn/shader-strata/config.tsnew file mode 100644index 00000000..8adcd174--- /dev/null+++ b/registry/remocn/shader-strata/config.ts@@ -0,0 +1,45 @@+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";++export const shaderStrataConfig: ComponentConfig = {+ componentName: "ShaderStrata",+ importPath: "@/components/remocn/shader-strata",+ controls: {+ speed: {+ type: "number",+ default: 1,+ min: 0,+ max: 3,+ step: 0.1,+ label: "Speed",+ },+ layers: {+ type: "number",+ default: 14,+ min: 4,+ max: 30,+ step: 1,+ label: "Layers",+ },+ amplitude: {+ type: "number",+ default: 0.16,+ min: 0,+ max: 0.5,+ step: 0.01,+ label: "Amplitude",+ },+ accent: { type: "color", default: "#6733FF", label: "Accent" },+ accentAmount: {+ type: "number",+ default: 0,+ min: 0,+ max: 1,+ step: 0.05,+ label: "Accent amount",+ },+ },+ durationInFrames: 150,+ fps: FPS,+ compositionWidth: W,+ compositionHeight: H,+};diff --git a/registry/remocn/shader-strata/index.tsx b/registry/remocn/shader-strata/index.tsxnew file mode 100644index 00000000..b6c41a42--- /dev/null+++ b/registry/remocn/shader-strata/index.tsx@@ -0,0 +1,242 @@+"use client";++import { useEffect, useRef, useState } from "react";+import {+ continueRender,+ delayRender,+ useCurrentFrame,+ useVideoConfig,+} from "remotion";++// A field of fine horizontal sediment layers — strata. Each layer's edge is+// displaced by fbm noise and drifts at its own depth speed, so the stack reads+// as a living foundation rather than a gradient. Written for the remocn+// registry as a custom WebGL shader (not a paper-design wrapper): frame-driven,+// deterministic, no wall-clock time anywhere.+//+// `accent` / `accentAmount` tint the DEEP strata (the bottom of the frame) —+// the layers everything else stands on — which is what makes it a natural+// carrier for "base" stories: the undertone can arrive mid-video by animating+// `accentAmount` with the master timeline.++export interface ShaderStrataProps {+ /** Palette from the deepest layer to the surface layer. Exactly 4 stops. */+ colors?: [string, string, string, string];+ /** Tint mixed into the deep strata. */+ accent?: string;+ /** 0..1 — how much of the accent the deep strata take. */+ accentAmount?: number;+ /** Number of strata bands across the frame height. */+ layers?: number;+ /** Edge waviness of each layer, in fractions of the frame height. */+ amplitude?: number;+ /** Global time multiplier. */+ speed?: number;+ className?: string;+}++const VERT = `+attribute vec2 a_pos;+void main() {+ gl_Position = vec4(a_pos, 0.0, 1.0);+}+`;++const FRAG = `+precision highp float;++uniform vec2 u_res;+uniform float u_time;+uniform float u_layers;+uniform float u_amp;+uniform vec3 u_c0;+uniform vec3 u_c1;+uniform vec3 u_c2;+uniform vec3 u_c3;+uniform vec3 u_accent;+uniform float u_accentAmt;++float hash(vec2 p) {+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);+}++float noise(vec2 p) {+ vec2 i = floor(p);+ vec2 f = fract(p);+ vec2 u = f * f * (3.0 - 2.0 * f);+ return mix(+ mix(hash(i), hash(i + vec2(1.0, 0.0)), u.x),+ mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), u.x),+ u.y+ );+}++float fbm(vec2 p) {+ float v = 0.0;+ float a = 0.5;+ for (int i = 0; i < 4; i++) {+ v += a * noise(p);+ p *= 2.03;+ a *= 0.5;+ }+ return v;+}++void main() {+ vec2 uv = gl_FragCoord.xy / u_res;+ float aspect = u_res.x / u_res.y;++ // Deeper layers drift faster — parallax without per-band recursion.+ float drift = u_time * (0.012 + 0.05 * (1.0 - uv.y));+ float w = fbm(vec2(uv.x * 2.6 * aspect + drift, uv.y * 2.2 - u_time * 0.01));++ float yd = uv.y + (w - 0.5) * u_amp;+ float band = yd * u_layers;+ float idx = floor(band);+ float f = fract(band);++ // Per-band value jitter + a soft sediment shadow at each band's lower edge.+ float j = hash(vec2(idx, 7.0));+ float edge = smoothstep(0.0, 0.4, f) * (1.0 - 0.3 * smoothstep(0.8, 1.0, f));++ float depth = clamp(idx / u_layers, 0.0, 1.0);+ vec3 col = mix(u_c0, u_c1, smoothstep(0.0, 0.4, depth));+ col = mix(col, u_c2, smoothstep(0.35, 0.75, depth));+ col = mix(col, u_c3, smoothstep(0.7, 1.0, depth));+ col *= 0.84 + 0.16 * j;+ col *= 0.92 + 0.08 * edge;++ // The accent rises from the deep strata and thins toward the surface.+ float mask = (1.0 - uv.y);+ mask *= mask;+ col = mix(col, u_accent, clamp(u_accentAmt, 0.0, 1.0) * mask * 0.38);++ // A whisper of living grain, time-derived so it stays deterministic.+ col += (hash(gl_FragCoord.xy + floor(u_time * 9.0)) - 0.5) * 0.012;++ gl_FragColor = vec4(col, 1.0);+}+`;++const hexToRgb = (hex: string): [number, number, number] => {+ const h = hex.replace("#", "");+ const v =+ h.length === 3+ ? h+ .split("")+ .map((c) => c + c)+ .join("")+ : h;+ const n = parseInt(v, 16);+ return [((n >> 16) & 255) / 255, ((n >> 8) & 255) / 255, (n & 255) / 255];+};++type GlState = {+ gl: WebGLRenderingContext;+ uniforms: Record<string, WebGLUniformLocation | null>;+};++export function ShaderStrata({+ colors = ["#050507", "#0a0a0d", "#111014", "#17161b"],+ accent = "#6733FF",+ accentAmount = 0,+ layers = 14,+ amplitude = 0.16,+ speed = 1,+ className,+}: ShaderStrataProps) {+ const frame = useCurrentFrame();+ const { fps, width, height } = useVideoConfig();+ const canvasRef = useRef<HTMLCanvasElement>(null);+ const stateRef = useRef<GlState | null>(null);+ const [handle] = useState(() => delayRender("shader-strata"));+ const continuedRef = useRef(false);++ useEffect(() => {+ const canvas = canvasRef.current;+ if (!canvas || stateRef.current) return;+ const gl = canvas.getContext("webgl", {+ antialias: false,+ preserveDrawingBuffer: true,+ });+ if (!gl) return;++ const compile = (type: number, src: string) => {+ const shader = gl.createShader(type)!;+ gl.shaderSource(shader, src);+ gl.compileShader(shader);+ return shader;+ };+ const program = gl.createProgram()!;+ gl.attachShader(program, compile(gl.VERTEX_SHADER, VERT));+ gl.attachShader(program, compile(gl.FRAGMENT_SHADER, FRAG));+ gl.linkProgram(program);+ gl.useProgram(program);++ const buf = gl.createBuffer();+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);+ gl.bufferData(+ gl.ARRAY_BUFFER,+ new Float32Array([-1, -1, 3, -1, -1, 3]),+ gl.STATIC_DRAW,+ );+ const loc = gl.getAttribLocation(program, "a_pos");+ gl.enableVertexAttribArray(loc);+ gl.vertexAttribPointer(loc, 2, gl.FLOAT, false, 0, 0);++ const uniforms: GlState["uniforms"] = {};+ for (const name of [+ "u_res",+ "u_time",+ "u_layers",+ "u_amp",+ "u_c0",+ "u_c1",+ "u_c2",+ "u_c3",+ "u_accent",+ "u_accentAmt",+ ]) {+ uniforms[name] = gl.getUniformLocation(program, name);+ }+ stateRef.current = { gl, uniforms };+ }, []);++ useEffect(() => {+ const state = stateRef.current;+ const canvas = canvasRef.current;+ if (!state || !canvas) return;+ const { gl, uniforms } = state;++ gl.viewport(0, 0, canvas.width, canvas.height);+ gl.uniform2f(uniforms.u_res, canvas.width, canvas.height);+ gl.uniform1f(uniforms.u_time, (frame / fps) * speed);+ gl.uniform1f(uniforms.u_layers, layers);+ gl.uniform1f(uniforms.u_amp, amplitude);+ gl.uniform3fv(uniforms.u_c0, hexToRgb(colors[0]));+ gl.uniform3fv(uniforms.u_c1, hexToRgb(colors[1]));+ gl.uniform3fv(uniforms.u_c2, hexToRgb(colors[2]));+ gl.uniform3fv(uniforms.u_c3, hexToRgb(colors[3]));+ gl.uniform3fv(uniforms.u_accent, hexToRgb(accent));+ gl.uniform1f(uniforms.u_accentAmt, accentAmount);+ gl.drawArrays(gl.TRIANGLES, 0, 3);++ if (!continuedRef.current) {+ continuedRef.current = true;+ requestAnimationFrame(() =>+ requestAnimationFrame(() => continueRender(handle)),+ );+ }+ }, [frame, fps, speed, layers, amplitude, colors, accent, accentAmount, handle]);++ return (+ <div className={className} style={{ position: "absolute", inset: 0 }}>+ <canvas+ ref={canvasRef}+ width={width}+ height={height}+ style={{ width: "100%", height: "100%", display: "block" }}+ />+ </div>+ );+}diff --git a/registry/remocn/shader-weave/config.ts b/registry/remocn/shader-weave/config.tsnew file mode 100644index 00000000..743b7b0a--- /dev/null+++ b/registry/remocn/shader-weave/config.ts@@ -0,0 +1,45 @@+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";++export const shaderWeaveConfig: ComponentConfig = {+ componentName: "ShaderWeave",+ importPath: "@/components/remocn/shader-weave",+ controls: {+ speed: {+ type: "number",+ default: 1,+ min: 0,+ max: 3,+ step: 0.1,+ label: "Speed",+ },+ scale: {+ type: "number",+ default: 22,+ min: 6,+ max: 48,+ step: 1,+ label: "Scale",+ },+ warp: {+ type: "number",+ default: 0.03,+ min: 0,+ max: 0.2,+ step: 0.01,+ label: "Warp",+ },+ accent: { type: "color", default: "#6733FF", label: "Accent" },+ accentAmount: {+ type: "number",+ default: 0,+ min: 0,+ max: 1,+ step: 0.05,+ label: "Accent amount",+ },+ },+ durationInFrames: 150,+ fps: FPS,+ compositionWidth: W,+ compositionHeight: H,+};diff --git a/registry/remocn/shader-weave/index.tsx b/registry/remocn/shader-weave/index.tsxnew file mode 100644index 00000000..5dd1aba8--- /dev/null+++ b/registry/remocn/shader-weave/index.tsx@@ -0,0 +1,260 @@+"use client";++import { useEffect, useRef, useState } from "react";+import {+ continueRender,+ delayRender,+ useCurrentFrame,+ useVideoConfig,+} from "remotion";++// A woven substrate — warp and weft threads crossing on a domain-warped grid,+// interlacing over/under like real cloth, with a slow sheen of light travelling+// across the fabric rather than the grid scrolling. The metaphor: the base a+// component is woven from. Written for the remocn registry as a custom WebGL+// shader (not a paper-design wrapper): frame-driven, deterministic, no+// wall-clock time anywhere.+//+// `accent` / `accentAmount` run a coloured thread through the weave — the tint+// lives mostly IN the threads, so raising `accentAmount` mid-video reads as a+// violet thread lighting up across the whole cloth (a natural carrier for a+// "new base" story). The grid itself never moves; only the light does.++export interface ShaderWeaveProps {+ /** Palette: fabric-shadow, fabric-mid, fabric-warm, thread-highlight. 4 stops. */+ colors?: [string, string, string, string];+ /** Tint carried by the threads. */+ accent?: string;+ /** 0..1 — how much accent the threads take. */+ accentAmount?: number;+ /** Thread density across the frame height. */+ scale?: number;+ /** Domain-warp amount — how hand-woven the threads bend (fractions of frame). */+ warp?: number;+ /** Global time multiplier (drives only the sheen, never the grid position). */+ speed?: number;+ className?: string;+}++const VERT = `+attribute vec2 a_pos;+void main() {+ gl_Position = vec4(a_pos, 0.0, 1.0);+}+`;++const FRAG = `+precision highp float;++uniform vec2 u_res;+uniform float u_time;+uniform float u_scale;+uniform float u_warp;+uniform vec3 u_c0;+uniform vec3 u_c1;+uniform vec3 u_c2;+uniform vec3 u_c3;+uniform vec3 u_accent;+uniform float u_accentAmt;++float hash(vec2 p) {+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);+}++float noise(vec2 p) {+ vec2 i = floor(p);+ vec2 f = fract(p);+ vec2 u = f * f * (3.0 - 2.0 * f);+ return mix(+ mix(hash(i), hash(i + vec2(1.0, 0.0)), u.x),+ mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), u.x),+ u.y+ );+}++float fbm(vec2 p) {+ float v = 0.0;+ float a = 0.5;+ for (int i = 0; i < 4; i++) {+ v += a * noise(p);+ p *= 2.03;+ a *= 0.5;+ }+ return v;+}++// A thin ridge line at every integer of x — the profile of one thread.+float thread(float x, float sharp) {+ float f = fract(x);+ float d = min(f, 1.0 - f);+ return smoothstep(sharp, 0.0, d);+}++void main() {+ vec2 uv = gl_FragCoord.xy / u_res;+ float aspect = u_res.x / u_res.y;++ // Domain warp — bend the weave so it reads hand-made, not a CSS grid. The+ // warp field drifts very slowly; the grid lattice itself stays put.+ vec2 q = uv + u_warp * vec2(+ fbm(uv * 3.0 + vec2(u_time * 0.03, 0.0)) - 0.5,+ fbm(uv * 3.0 + vec2(7.3, -u_time * 0.02)) - 0.5+ );++ float qx = q.x * u_scale * aspect;+ float qy = q.y * u_scale;++ float tw = thread(qx, 0.09); // warp (vertical threads)+ float tf = thread(qy, 0.09); // weft (horizontal threads)++ // Interlace: per cell, one direction sits over the other.+ float over = mod(floor(qx) + floor(qy), 2.0);+ float warpB = tw * (over < 0.5 ? 1.0 : 0.5);+ float weftB = tf * (over < 0.5 ? 0.5 : 1.0);+ float weave = max(warpB, weftB);++ // Sheen — light travelling across a still cloth (this is the only motion).+ float sheen = fbm(q * 1.7 + vec2(u_time * 0.05, u_time * 0.028));+ weave *= 0.3 + 0.95 * sheen;++ // Fabric ground: near-black, faintly breathing between the shadow stops.+ vec3 base = mix(u_c0, u_c1, smoothstep(0.15, 0.8, sheen));+ base = mix(base, u_c2, smoothstep(0.62, 1.0, sheen) * 0.5);++ // Threads sit a touch above the ground.+ vec3 col = mix(base, u_c3, clamp(weave, 0.0, 1.0) * 0.55);++ // The accent runs through the threads — a violet thread across the cloth.+ float amt = clamp(u_accentAmt, 0.0, 1.0);+ col = mix(col, u_accent, amt * (0.08 + 0.34 * weave));+ col += u_accent * amt * 0.015;++ // A whisper of living grain, time-derived so it stays deterministic.+ col += (hash(gl_FragCoord.xy + floor(u_time * 9.0)) - 0.5) * 0.012;++ gl_FragColor = vec4(col, 1.0);+}+`;++const hexToRgb = (hex: string): [number, number, number] => {+ const h = hex.replace("#", "");+ const v =+ h.length === 3+ ? h+ .split("")+ .map((c) => c + c)+ .join("")+ : h;+ const n = parseInt(v, 16);+ return [((n >> 16) & 255) / 255, ((n >> 8) & 255) / 255, (n & 255) / 255];+};++type GlState = {+ gl: WebGLRenderingContext;+ uniforms: Record<string, WebGLUniformLocation | null>;+};++export function ShaderWeave({+ colors = ["#050506", "#0a0a0c", "#111015", "#1b1a22"],+ accent = "#6733FF",+ accentAmount = 0,+ scale = 22,+ warp = 0.03,+ speed = 1,+ className,+}: ShaderWeaveProps) {+ const frame = useCurrentFrame();+ const { fps, width, height } = useVideoConfig();+ const canvasRef = useRef<HTMLCanvasElement>(null);+ const stateRef = useRef<GlState | null>(null);+ const [handle] = useState(() => delayRender("shader-weave"));+ const continuedRef = useRef(false);++ useEffect(() => {+ const canvas = canvasRef.current;+ if (!canvas || stateRef.current) return;+ const gl = canvas.getContext("webgl", {+ antialias: false,+ preserveDrawingBuffer: true,+ });+ if (!gl) return;++ const compile = (type: number, src: string) => {+ const shader = gl.createShader(type)!;+ gl.shaderSource(shader, src);+ gl.compileShader(shader);+ return shader;+ };+ const program = gl.createProgram()!;+ gl.attachShader(program, compile(gl.VERTEX_SHADER, VERT));+ gl.attachShader(program, compile(gl.FRAGMENT_SHADER, FRAG));+ gl.linkProgram(program);+ gl.useProgram(program);++ const buf = gl.createBuffer();+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);+ gl.bufferData(+ gl.ARRAY_BUFFER,+ new Float32Array([-1, -1, 3, -1, -1, 3]),+ gl.STATIC_DRAW,+ );+ const loc = gl.getAttribLocation(program, "a_pos");+ gl.enableVertexAttribArray(loc);+ gl.vertexAttribPointer(loc, 2, gl.FLOAT, false, 0, 0);++ const uniforms: GlState["uniforms"] = {};+ for (const name of [+ "u_res",+ "u_time",+ "u_scale",+ "u_warp",+ "u_c0",+ "u_c1",+ "u_c2",+ "u_c3",+ "u_accent",+ "u_accentAmt",+ ]) {+ uniforms[name] = gl.getUniformLocation(program, name);+ }+ stateRef.current = { gl, uniforms };+ }, []);++ useEffect(() => {+ const state = stateRef.current;+ const canvas = canvasRef.current;+ if (!state || !canvas) return;+ const { gl, uniforms } = state;++ gl.viewport(0, 0, canvas.width, canvas.height);+ gl.uniform2f(uniforms.u_res, canvas.width, canvas.height);+ gl.uniform1f(uniforms.u_time, (frame / fps) * speed);+ gl.uniform1f(uniforms.u_scale, scale);+ gl.uniform1f(uniforms.u_warp, warp);+ gl.uniform3fv(uniforms.u_c0, hexToRgb(colors[0]));+ gl.uniform3fv(uniforms.u_c1, hexToRgb(colors[1]));+ gl.uniform3fv(uniforms.u_c2, hexToRgb(colors[2]));+ gl.uniform3fv(uniforms.u_c3, hexToRgb(colors[3]));+ gl.uniform3fv(uniforms.u_accent, hexToRgb(accent));+ gl.uniform1f(uniforms.u_accentAmt, accentAmount);+ gl.drawArrays(gl.TRIANGLES, 0, 3);++ if (!continuedRef.current) {+ continuedRef.current = true;+ requestAnimationFrame(() =>+ requestAnimationFrame(() => continueRender(handle)),+ );+ }+ }, [frame, fps, speed, scale, warp, colors, accent, accentAmount, handle]);++ return (+ <div className={className} style={{ position: "absolute", inset: 0 }}>+ <canvas+ ref={canvasRef}+ width={width}+ height={height}+ style={{ width: "100%", height: "100%", display: "block" }}+ />+ </div>+ );+}diff --git a/tsconfig.json b/tsconfig.jsonindex 977a26bb..f3b7fd50 100644--- a/tsconfig.json+++ b/tsconfig.json@@ -134,6 +134,28 @@"@/components/remocn/shader-warp": ["./registry/remocn/shader-warp/index.tsx"],+ "@/components/remocn/ascii-dissolve": [+ "./registry/remocn/ascii-dissolve/index.tsx"+ ],+ "@/components/remocn/caret-wipe": [+ "./registry/remocn/caret-wipe/index.tsx"+ ],+ "@/components/remocn/icon-scatter": [+ "./registry/remocn/icon-scatter/index.tsx"+ ],+ "@/components/remocn/shader-caustics": [+ "./registry/remocn/shader-caustics/index.tsx"+ ],+ "@/components/remocn/shader-gem-smoke": [+ "./registry/remocn/shader-gem-smoke/index.tsx"+ ],+ "@/components/remocn/shader-strata": [+ "./registry/remocn/shader-strata/index.tsx"+ ],+ "@/components/remocn/shader-weave": [+ "./registry/remocn/shader-weave/index.tsx"+ ],+ "@/components/remocn/reel": ["./registry/remocn/reel/index.tsx"],"@/components/remocn/*": ["./registry/remocn-ui/*/index.tsx"],"@/*": ["./*"]}