A Claude Code skill that reverse-engineers any animation frame by frame, then proves the copy moves the same.
Add a video of the Vercel clones
NiazMorshed200751ce3fc17635
diff --git a/site/README.md b/site/README.mdindex 10e5bf0..88c8db2 100644--- a/site/README.md+++ b/site/README.md@@ -59,7 +59,7 @@ Then either:| `public/media/` | Comparisons and posters, one folder per example. `stripe-bento/` is the entrance at the top of the page. || `scripts/record-media.ts` | Records the examples' media and the README animations. || `marketing/launch.md` | Launch post drafts. |-| `video/` | The 47-second demo video, as a page drawn frame by frame from the time and rendered to mp4 ([`video/README.md`](video/README.md)). The site serves it at `/demo.mp4` (`public/demo.mp4`). |+| `video/` | The 47-second demo video, as a page drawn frame by frame from the time and rendered to mp4 ([`video/README.md`](video/README.md)). The site serves it at `/demo.mp4` (`public/demo.mp4`). `vercel.html` is a second one, of the Vercel clones. |## About the examplesdiff --git a/site/video/README.md b/site/video/README.mdindex 8152dc7..1c0966f 100644--- a/site/video/README.md+++ b/site/video/README.md@@ -23,6 +23,18 @@ bun video/scripts/publish.ts # public/demo.mp4 for the site, and the README's`render.ts` options: `--scale 2` draws at 3840x2160 and scales down (sharper, about 4x slower); `--size 3840x2160` keeps it; `--from 12 --to 29` renders a section; `--stills 1.5,13.2` writes PNGs of single moments to `video/out/stills/`. It needs Playwright's Chromium and `ffmpeg` on PATH. `publish.ts` makes a smaller copy that the site serves at `/demo.mp4` (the README links to it), and the README's preview: a few moments of the video, cross-faded into a 20-second loop. It needs `ffmpeg`, `cwebp` and `webpmux`.+## The Vercel video++`vercel.html` is a second video on the same stage and renderer: 37.6 s of the six Vercel clones (vercel.com, nextjs.org, turborepo.com), each next to its original, then all six at once and the install command. Its scenes are in `src/vercel/`; `shots.js` lists the shots, their timing and their numbers. The pairs are the site's own recordings, kept lined up by `record-media`:++```sh+bun run media --only vercel-previews,vercel-hero,vercel-fluid,vercel-workflow,turborepo-gauge,nextjs-rsc --keep <dir>+bun video/scripts/clips.ts --masters <dir> # each as <slug>-reference and <slug>-copy+bun video/scripts/render.ts --page vercel.html # video/out/vercel.mp4+```++The player is at `/video/vercel.html` on `serve.ts`.+## Edit it```shdiff --git a/site/video/assets/fonts/Geist-Variable.woff2 b/site/video/assets/fonts/Geist-Variable.woff2new file mode 100644index 0000000..9983e92Binary files /dev/null and b/site/video/assets/fonts/Geist-Variable.woff2 differdiff --git a/site/video/assets/fonts/GeistMono-Variable.woff2 b/site/video/assets/fonts/GeistMono-Variable.woff2new file mode 100644index 0000000..fb2f024Binary files /dev/null and b/site/video/assets/fonts/GeistMono-Variable.woff2 differdiff --git a/site/video/assets/fonts/OFL.txt b/site/video/assets/fonts/OFL.txtindex 5a965fb..a4a10eb 100644--- a/site/video/assets/fonts/OFL.txt+++ b/site/video/assets/fonts/OFL.txt@@ -3,6 +3,7 @@ The fonts here are licensed under the SIL Open Font License, Version 1.1, copied- Inter-opsz.woff2: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)- JetBrainsMono.woff2: Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)- InstrumentSerif-Italic.woff2: Copyright 2022 The Instrument Serif Project Authors (https://github.com/Instrument/instrument-serif)+- Geist-Variable.woff2, GeistMono-Variable.woff2: Copyright (c) 2023 Vercel, in collaboration with basement.studio (https://github.com/vercel/geist-font)-----------------------------------------------------------SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007diff --git a/site/video/scripts/clips.ts b/site/video/scripts/clips.tsindex 181ac90..4ffc233 100644--- a/site/video/scripts/clips.ts+++ b/site/video/scripts/clips.ts@@ -3,6 +3,7 @@// (full size), t/NNNN.jpg (small, for the helix) and video/clips/manifest.json.//// bun video/scripts/clips.ts [--only clerk-mfa,…] [--jobs 4]+// bun video/scripts/clips.ts --masters <dir> [--only vercel-hero,…] # the Vercel video's pairs (below)//// Also, for the "how it works" scene: films clerk.com's Session management card and its copy the same way,// and cuts the stripe.com Agentic commerce card and the resend.com cube, each with its copy, out of their@@ -13,7 +14,7 @@ import { join } from "node:path";import { parseArgs } from "node:util";import { SITE, serve } from "./serve";-const { values: args } = parseArgs({ options: { only: { type: "string" }, jobs: { type: "string", default: "4" }, port: { type: "string", default: "4701" } } });+const { values: args } = parseArgs({ options: { only: { type: "string" }, jobs: { type: "string", default: "4" }, port: { type: "string", default: "4701" }, masters: { type: "string" } } });const CAPTURE = join(SITE, "..", "skills", "reanimate", "scripts", "capture.ts");const OUT = join(SITE, "video", "clips");@@ -73,7 +74,7 @@ const CLIPS: Clip[] = [];const only = args.only?.split(",");-const todo = CLIPS.filter((c) => !only || only.includes(c.slug));+const todo = args.masters ? [] : CLIPS.filter((c) => !only || only.includes(c.slug));function run(cmd: string, argv: string[]) {const r = spawnSync(cmd, argv, { maxBuffer: 1 << 30 });@@ -132,6 +133,28 @@ const cutCompares = () => ({...cutCompare("resend-cube", "how-resend"),});+// For the Vercel video (vercel.html): each clone and its original as scripts/record-media.ts filmed them for+// the site, lined up the same way, cut from the takes it keeps with `--keep <dir>` (listed in masters.json+// there) into <slug>-reference and <slug>-copy, at 2x.+function cutMasters(dir: string) {+ type Take = { file: string; from: number };+ const masters: Record<string, { ms: number; reference: Take; clone: Take }> = JSON.parse(readFileSync(join(dir, "masters.json"), "utf8"));+ const out: Record<string, object> = {};+ for (const [slug, m] of Object.entries(masters)) {+ if (only && !only.includes(slug)) continue;+ for (const [side, take] of [["reference", m.reference], ["copy", m.clone]] as const) {+ const name = `${slug}-${side}`;+ rmSync(join(OUT, name), { recursive: true, force: true });+ mkdirSync(join(OUT, name, "f"), { recursive: true });+ run("ffmpeg", ["-v", "error", "-y", "-ss", (take.from / 1000).toFixed(3), "-t", (m.ms / 1000).toFixed(3), "-i", take.file, "-q:v", "2", join(OUT, name, "f", "%04d.jpg")]);+ const [w, h] = run("ffprobe", ["-v", "error", "-select_streams", "v:0", "-show_entries", "stream=width,height", "-of", "csv=p=0", take.file]).trim().split(",").map(Number);+ out[name] = { slug: name, fps: FPS, frames: readdirSync(join(OUT, name, "f")).length, width: w / 2, height: h / 2 };+ console.log(`${name}: ${(out[name] as { frames: number }).frames} frames`);+ }+ }+ return out;+}+const server = await serve(Number(args.port));const origin = `http://localhost:${args.port}`;const manifestFile = join(OUT, "manifest.json");@@ -150,7 +173,8 @@ await Promise.all(}}),);-if (!only || only.some((s) => s.startsWith("compare"))) Object.assign(manifest, cutCompares());+if (args.masters) Object.assign(manifest, cutMasters(args.masters));+else if (!only || only.some((s) => s.startsWith("compare"))) Object.assign(manifest, cutCompares());writeFileSync(manifestFile, JSON.stringify(manifest, null, 2) + "\n");server.closeAllConnections();server.close();diff --git a/site/video/src/vercel/end.js b/site/video/src/vercel/end.jsnew file mode 100644index 0000000..be97f9d--- /dev/null+++ b/site/video/src/vercel/end.js@@ -0,0 +1,40 @@+// The end card: "/reanimate", the install command typing itself in, and where to find it. Fades out at+// the very end.+import { DURATION, FRAME, END_AT } from "./shots.js";+import { ease, el, lerp, measure, presence, prog, put } from "../lib.js";++export const name = "end";+export const from = END_AT - 0.3;+export const to = DURATION + 1;++const CMD = "npx skills add NiazMorshed2007/reanimate -g";++let word, wordW, cmd, typed, caret, cmdW, links;++export function init(root) {+ word = el("div", "v-word", root, "/reanimate");+ wordW = measure("/reanimate", "v-word").w;+ cmd = el("div", "v-cmd", root, `<span>$</span>`);+ typed = el("b", "", cmd);+ typed.style.fontWeight = "400";+ caret = el("i", "", cmd);+ typed.textContent = CMD;+ cmdW = cmd.getBoundingClientRect().width;+ cmd.style.width = `${cmdW}px`;+ typed.textContent = "";+ links = el("p", "v-links", root, `reanimate.niazmorshed.dev<i>·</i>github.com/NiazMorshed2007/reanimate`);+}++export function render(t) {+ const end = 1 - ease.inOutSine(prog(t, DURATION - 0.5, DURATION - 0.05));+ const mid = (FRAME.top + FRAME.bottom) / 2;+ const w = presence(t, END_AT, 0.7);+ put(word, { o: w.v * end, x: 960 - wordW / 2, y: mid - 196 + (1 - w.a) * 24, blur: (1 - w.a) * 14, s: lerp(0.97, 1, w.a) });+ const c = presence(t, END_AT + 0.35, 0.6);+ put(cmd, { o: c.v * end, x: 960 - cmdW / 2, y: mid - 10 + (1 - c.a) * 20, blur: (1 - c.a) * 12 });+ const n = Math.round(CMD.length * prog(t, END_AT + 0.6, END_AT + 2.0));+ if (typed._n !== n) typed.textContent = CMD.slice(0, (typed._n = n));+ put(caret, { o: n < CMD.length || (t * 1.6) % 1 < 0.55 ? 1 : 0 });+ const l = presence(t, END_AT + 1.4, 0.6);+ put(links, { o: l.v * end, y: mid + 150 + (1 - l.a) * 12, blur: (1 - l.a) * 8 });+}diff --git a/site/video/src/vercel/frame.js b/site/video/src/vercel/frame.jsnew file mode 100644index 0000000..418ac01--- /dev/null+++ b/site/video/src/vercel/frame.js@@ -0,0 +1,33 @@+// The frame the whole video sits in: two rules across the stage and two down it, drawn in at the start, with+// a cross where they meet, and a counter of the shots in the bottom-right corner.+import { el, ease, prog, put } from "../lib.js";+import { DURATION, FRAME, GRID_AT, SHOTS } from "./shots.js";++export const name = "frame";+export const from = 0;+export const to = DURATION + 1;++let rules, crosses, count;++export function init(root) {+ rules = [+ ["h", 0, FRAME.top],+ ["h", 0, FRAME.bottom],+ ["v", FRAME.left, 0],+ ["v", FRAME.right, 0],+ ].map(([dir, x, y]) => Object.assign(el("div", `v-rule v-rule--${dir}`, root), { _x: x, _y: y, _dir: dir }));+ crosses = [FRAME.left, FRAME.right].flatMap((x) => [FRAME.top, FRAME.bottom].map((y) => Object.assign(el("div", "v-cross", root), { _x: x - 10, _y: y - 10 })));+ count = el("div", "v-source v-count", root);+}++export function render(t) {+ const end = 1 - ease.inOutSine(prog(t, DURATION - 0.5, DURATION - 0.05));+ // already there on the first frame, so the thumbnail isn't empty+ for (const r of rules) put(r, { o: end, x: r._x, y: r._y });+ for (const c of crosses) put(c, { o: end, x: c._x, y: c._y });+ // 01 / 06 while the shots play+ const k = SHOTS.findLastIndex((s) => t >= s.at - 0.1);+ const label = t < GRID_AT - 0.1 ? `${String(k + 1).padStart(2, "0")} / ${String(SHOTS.length).padStart(2, "0")}` : "";+ if (count._t !== label) count.textContent = count._t = label;+ put(count, { o: label ? end : 0, x: FRAME.right - 28 - 200, y: FRAME.bottom + 56 });+}diff --git a/site/video/src/vercel/grid.js b/site/video/src/vercel/grid.jsnew file mode 100644index 0000000..d9b6ea7--- /dev/null+++ b/site/video/src/vercel/grid.js@@ -0,0 +1,42 @@+// Every copy at once, in two rows (the second centred when it's shorter), each one looping its recording,+// with a line above saying what they are.+import { el, frameUrl, lerp, presence, put, setSrc } from "../lib.js";+import { END_AT, FRAME, GRID_AT, SHOTS } from "./shots.js";++export const name = "grid";+export const from = GRID_AT - 0.3;+export const to = END_AT + 0.5;++const COLS = Math.ceil(SHOTS.length / 2);+const GAP = 24;+const AREA = { x: FRAME.left + 40, y: FRAME.top + 40, w: FRAME.right - FRAME.left - 80, h: FRAME.bottom - FRAME.top - 80 };+const CW = (AREA.w - (COLS - 1) * GAP) / COLS;+const CH = (AREA.h - GAP) / 2;++let lede, cells;++export function init(root) {+ lede = el("div", "v-lede", root, `<b>${SHOTS.length} animations</b> from vercel.com, nextjs.org and turborepo.com, each rebuilt by its own agent`);+ cells = SHOTS.map((s, i) => {+ const c = el("div", "v-cell", root);+ Object.assign(c.style, { width: `${CW}px`, height: `${CH}px` });+ c._img = el("img", "", c);+ c._label = el("div", "v-cell-label", c, s.source);+ const row = Math.floor(i / COLS);+ const inRow = row ? SHOTS.length - COLS : COLS;+ const x0 = AREA.x + (AREA.w - (inRow * CW + (inRow - 1) * GAP)) / 2;+ Object.assign(c, { _x: x0 + (i % COLS) * (CW + GAP), _y: AREA.y + row * (CH + GAP), _s: s });+ return c;+ });+}++export function render(t) {+ const l = presence(t, GRID_AT + 0.1, 0.6, END_AT - 0.15, 0.35);+ put(lede, { o: l.v, y: 52 + (1 - l.a) * 12, blur: 10 * Math.max(1 - l.a, l.b) });+ cells.forEach((c, i) => {+ const p = presence(t, GRID_AT - 0.1 + i * 0.07, 0.6, END_AT - 0.2 + i * 0.02, 0.35);+ // each loops its copy from where its shot started+ setSrc(c._img, frameUrl(`${c._s.slug}-copy`, c._s.start + Math.max(0, t - GRID_AT), { loop: true }));+ put(c, { o: p.v, x: c._x, y: c._y + (1 - p.a) * 30, s: lerp(0.96, 1, p.a) * lerp(1, 0.98, p.b), blur: 12 * Math.max(1 - p.a, p.b) });+ });+}diff --git a/site/video/src/vercel/main.js b/site/video/src/vercel/main.jsnew file mode 100644index 0000000..37fda8a--- /dev/null+++ b/site/video/src/vercel/main.js@@ -0,0 +1,21 @@+// The Vercel video: six clones from vercel.com, nextjs.org and turborepo.com, each next to its original,+// then all six at once and the install command. Same stage and renderer as the demo video:+// bun video/scripts/render.ts --page vercel.html+// Scenes (times in shots.js):+// frame the rules and crosses everything sits in, and the shot counter+// pairs one shot per clone: the original and the copy side by side, or wiped across each other+// grid all six copies at once+// end "/reanimate" and the install command+import { start } from "../stage.js";+import { DURATION } from "./shots.js";+import * as frame from "./frame.js";+import * as pairs from "./pairs.js";+import * as grid from "./grid.js";+import * as end from "./end.js";++document.getElementById("stage").classList.add("v");+start({+ scenes: [frame, pairs, grid, end],+ duration: DURATION,+ fonts: ["560 46px Geist", "600 132px Geist", "400 20px 'Geist Mono'"],+});diff --git a/site/video/src/vercel/pairs.js b/site/video/src/vercel/pairs.jsnew file mode 100644index 0000000..ac6238b--- /dev/null+++ b/site/video/src/vercel/pairs.js@@ -0,0 +1,125 @@+// The clones, one shot each, next to their originals (shots.js). "pair": the original and the copy side by+// side (or one above the other, whichever shows them bigger), each under a tag. "wipe": the copy laid over+// the original, cut by a line that sweeps across, so whatever is left of the line is vercel.com and whatever+// is right of it is the copy. Both play the same recording time on every frame.+import { clamp, clipInfo, el, ease, frameUrl, lerp, measure, presence, put, setSrc, setStyle } from "../lib.js";+import { FRAME, GRID_AT, SHOTS } from "./shots.js";++export const name = "pairs";+export const from = 0;+export const to = GRID_AT + 0.6;++// where the recordings go, inside the frame+const AREA = { x: FRAME.left + 56, y: FRAME.top + 48, w: FRAME.right - FRAME.left - 112, h: FRAME.bottom - FRAME.top - 96 };+const GAP = 40; // between the two panels of a pair+const TAG_H = 40; // a pair's tags, above the panels+const MAX_ZOOM = 2; // the frames are 2x, so up to twice their CSS size stays sharp+const ARROWS = `<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M9 6l-5 6 5 6M15 6l5 6-5 6"/></svg>`;++const clip = (shot, side) => `${shot.slug}-${side}`;++function panel(parent, w, h) {+ const p = el("div", "v-panel", parent);+ Object.assign(p.style, { width: `${w}px`, height: `${h}px` });+ return p;+}++function layoutPair(shot, c) {+ // side by side, or stacked: whichever lets the recordings be bigger+ const side = Math.min((AREA.w - GAP) / 2 / c.width, (AREA.h - TAG_H) / c.height);+ const stack = Math.min(AREA.w / c.width, (AREA.h - GAP - 2 * TAG_H) / 2 / c.height);+ const across = side >= stack;+ const k = Math.min(MAX_ZOOM, Math.max(side, stack));+ const w = c.width * k, h = c.height * k;+ const total = across ? [2 * w + GAP, h + TAG_H] : [w, 2 * (h + TAG_H) + GAP];+ const x0 = AREA.x + (AREA.w - total[0]) / 2;+ const y0 = AREA.y + (AREA.h - total[1]) / 2;+ return ["reference", "copy"].map((s, i) => ({+ side: s,+ x: across ? x0 + i * (w + GAP) : x0,+ y: (across ? y0 : y0 + i * (h + TAG_H + GAP)) + TAG_H,+ w,+ h,+ }));+}++function build(root, shot) {+ const c = clipInfo(clip(shot, "copy"));+ const g = { shot, parts: [] };+ g.title = el("div", "v-title", root, shot.title);+ g.source = el("div", "v-source", root, shot.source);+ g.sourceW = measure(shot.source, "v-source").w;+ g.metric = el("div", "v-metric", root, `<i></i>${shot.metric[0]} <span>${shot.metric[1]}</span>`);+ if (shot.mode === "pair") {+ g.boxes = layoutPair(shot, c);+ for (const b of g.boxes) {+ b.el = panel(root, b.w, b.h);+ b.img = el("img", "", b.el);+ b.tag = el("div", `v-tag v-tag--${b.side}`, root, b.side === "reference" ? `<i></i><b>${shot.source}</b>` : `<i></i><b>the copy</b> built with /reanimate`);+ }+ } else {+ const k = Math.min(MAX_ZOOM, AREA.w / c.width, AREA.h / c.height);+ const w = c.width * k, h = c.height * k;+ g.box = { x: AREA.x + (AREA.w - w) / 2, y: AREA.y + (AREA.h - h) / 2, w, h };+ g.box.el = panel(root, w, h);+ g.ref = el("img", "", g.box.el);+ g.copy = el("img", "", g.box.el);+ g.line = el("div", "v-line", g.box.el);+ g.line.style.height = `${h}px`;+ g.knob = el("div", "v-knob", g.box.el, ARROWS);+ g.pillRef = el("div", "v-pill v-pill--ref", g.box.el, shot.source.split("/")[0]);+ g.pillCopy = el("div", "v-pill v-pill--copy", g.box.el, "copy");+ g.pillRefW = measure(shot.source.split("/")[0], "v-pill v-pill--ref").w;+ }+ return g;+}++let shots;++export function init(root) {+ shots = SHOTS.map((s) => build(root, s));+}++export function render(t) {+ shots.forEach((g, i) => {+ const { shot } = g;+ const next = i + 1 < SHOTS.length ? SHOTS[i + 1].at : GRID_AT;+ // the first shot is already there on frame 0, so the thumbnail shows it+ const inAt = i === 0 ? -1 : shot.at - 0.12;+ const p = presence(t, inAt, 0.55, next - 0.14, 0.32);+ if (p.v <= 0) {+ for (const e of [g.title, g.source, g.metric, ...(g.boxes ?? [g.box]).flatMap((b) => [b.el, b.tag].filter(Boolean))]) put(e, { o: 0 });+ return;+ }+ const lt = shot.start + Math.max(0, t - shot.at);+ const blur = 12 * Math.max(1 - p.a, p.b);++ put(g.title, { o: p.v, x: FRAME.left + 28, y: 44 + (1 - p.a) * 14 - p.b * 8, blur });+ put(g.source, { o: p.v, x: FRAME.right - 28 - g.sourceW, y: 60 + (1 - p.a) * 14 - p.b * 8, blur });+ const m = presence(t, inAt + 0.35, 0.55, next - 0.14, 0.32);+ put(g.metric, { o: shot.metric[0] ? m.v : 0, x: FRAME.left + 28, y: FRAME.bottom + 42 + (1 - m.a) * 12, blur: 10 * Math.max(1 - m.a, m.b) });++ const s = lerp(1.035, 1, p.a) * lerp(1, 0.985, p.b);+ if (g.boxes) {+ for (const [k, b] of g.boxes.entries()) {+ const q = presence(t, inAt + k * 0.08, 0.55, next - 0.14, 0.32);+ setSrc(b.img, frameUrl(clip(shot, b.side), lt));+ put(b.el, { o: q.v, x: b.x, y: b.y, s, blur: 12 * Math.max(1 - q.a, q.b) });+ put(b.tag, { o: q.v, x: b.x + 2, y: b.y - TAG_H + 4 + (1 - q.a) * 8, blur: 8 * Math.max(1 - q.a, q.b) });+ }+ return;+ }+ const b = g.box;+ setSrc(g.ref, frameUrl(clip(shot, "reference"), lt));+ setSrc(g.copy, frameUrl(clip(shot, "copy"), lt));+ put(b.el, { o: p.v, x: b.x, y: b.y, s, blur });+ // the line starts in the middle, sweeps left (more copy), right (more original) and back+ const u = clamp((t - shot.at) / shot.dur);+ const x = b.w * (0.5 - 0.3 * Math.sin(2 * Math.PI * ease.inOutSine(u)));+ setStyle(g.copy, "clip-path", `inset(0 0 0 ${x.toFixed(1)}px)`);+ put(g.line, { x, y: 0 });+ put(g.knob, { x, y: b.h / 2 });+ put(g.pillRef, { o: clamp((x - g.pillRefW - 24) / 40), x: x - 12 - g.pillRefW, y: 0 });+ put(g.pillCopy, { o: clamp((b.w - x - 110) / 40), x: x + 12, y: 0 });+ });+}diff --git a/site/video/src/vercel/shots.js b/site/video/src/vercel/shots.jsnew file mode 100644index 0000000..1ca0478--- /dev/null+++ b/site/video/src/vercel/shots.js@@ -0,0 +1,27 @@+// What the Vercel video shows, in order, and when. Each shot is one clone with its original, filmed the same+// way by scripts/record-media.ts and cut into frames by scripts/clips.ts --masters: clips <slug>-reference+// and <slug>-copy.+// mode "pair": the two side by side; "wipe": one over the other, a line sweeping between them+// start: where in the recordings the shot starts, s; dur: how long it stays, s+// metric: the number from the clone's last comparison, as on the site (src/examples.ts)++export const SHOTS = [+ { slug: "vercel-previews", mode: "pair", title: "Vercel Toolbar", source: "vercel.com/products/previews", metric: ["417 of 417", "frames identical"], start: 0.4, dur: 6.4 },+ { slug: "vercel-hero", mode: "wipe", title: "Drop to deploy", source: "vercel.com", metric: ["785 of 803", "frames byte-identical, the rest ≤ 1 level off"], start: 2.4, dur: 5.6 },+ { slug: "vercel-fluid", mode: "wipe", title: "Fluid ocean, in WebGPU", source: "vercel.com/fluid", metric: ["0 px", "differ, frame for frame"], start: 0, dur: 4 },+ { slug: "vercel-workflow", mode: "wipe", title: "Inspect every run", source: "vercel.com/workflow", metric: ["0 ms", "off, on every step"], start: 0, dur: 4.4 },+ { slug: "turborepo-gauge", mode: "wipe", title: "Speedometer", source: "turborepo.com", metric: ["0 px", "differ while hovering, light and dark"], start: 0.3, dur: 4.2 },+ { slug: "nextjs-rsc", mode: "wipe", title: "React Server Components", source: "nextjs.org", metric: ["17 of 17", "animated values identical, every frame"], start: 0.5, dur: 4.2 },+];++let t = 0;+for (const s of SHOTS) {+ s.at = t;+ t += s.dur;+}+export const GRID_AT = t; // every copy at once+export const END_AT = GRID_AT + 4.4; // the install command+export const DURATION = END_AT + 4.4;++// the frame every scene sits in: rules across the stage at these lines, a cross where they meet+export const FRAME = { top: 132, bottom: 948, left: 96, right: 1824 };diff --git a/site/video/src/vercel/vercel.css b/site/video/src/vercel/vercel.cssnew file mode 100644index 0000000..afe1abb--- /dev/null+++ b/site/video/src/vercel/vercel.css@@ -0,0 +1,71 @@+/* The Vercel video: Geist on vercel.com's off-white, hairline rules with crosses where they meet. */+@font-face { font-family: "Geist"; src: url("../../assets/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: block; }+@font-face { font-family: "Geist Mono"; src: url("../../assets/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: block; }++:root {+ --v-bg: #fafafa;+ --v-ink: #0a0a0a;+ --v-gray: #6b6b6b;+ --v-faint: #a1a1a1;+ --v-rule: #e8e8e8;+ --v-sans: "Geist", system-ui, sans-serif;+ --v-mono: "Geist Mono", ui-monospace, monospace;+}++#stage.v { background: var(--v-bg); color: var(--v-ink); font-family: var(--v-sans); font-feature-settings: normal; }+html[data-render] body:has(#stage.v) { background: var(--v-bg); }++/* ---------- the frame: rules across the stage, a cross where two meet ---------- */++.v-rule { background: var(--v-rule); }+.v-rule--h { width: 1920px; height: 1px; }+.v-rule--v { width: 1px; height: 1080px; }+.v-cross { width: 21px; height: 21px; }+.v-cross::before, .v-cross::after { content: ""; position: absolute; background: #c9c9c9; }+.v-cross::before { left: 10px; top: 0; width: 1px; height: 21px; }+.v-cross::after { left: 0; top: 10px; width: 21px; height: 1px; }++/* ---------- titles ---------- */++.v-title { font-size: 46px; line-height: 1.05; font-weight: 560; letter-spacing: -0.045em; white-space: nowrap; }+.v-source { font: 400 21px/1 var(--v-mono); color: var(--v-gray); white-space: nowrap; }+.v-lede { width: 1920px; text-align: center; font-size: 30px; line-height: 1.3; font-weight: 450; letter-spacing: -0.025em; color: var(--v-gray); white-space: nowrap; }+.v-lede b { font-weight: 560; color: var(--v-ink); }+.v-metric { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 14px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08), 0 8px 24px -12px rgb(0 0 0 / 0.18); font: 450 20px/1 var(--v-mono); color: var(--v-ink); white-space: nowrap; }+.v-metric i { width: 10px; height: 10px; border-radius: 50%; background: #0070f3; box-shadow: 0 0 0 4px rgb(0 112 243 / 0.14); }+.v-metric span { color: var(--v-gray); }++/* ---------- the recordings ---------- */++.v-panel { overflow: hidden; border-radius: 12px; background: #fff; transform-origin: 50% 50%;+ box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08), 0 2px 4px rgb(0 0 0 / 0.02), 0 30px 70px -30px rgb(0 0 0 / 0.25); }+.v-panel img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }+.v-tag { display: flex; align-items: center; gap: 10px; font: 450 19px/1 var(--v-mono); color: var(--v-gray); white-space: nowrap; }+.v-tag b { font-weight: 500; color: var(--v-ink); }+.v-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--v-ink); }+.v-tag--copy i { background: #0070f3; }++/* the wipe: the original left of the line, the copy right of it */+.v-line { position: absolute; top: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.6); } /* seen on light and dark recordings */+.v-knob { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--v-ink); display: grid; place-items: center; box-shadow: 0 0 0 4px rgb(255 255 255 / 0.9), 0 8px 20px rgb(0 0 0 / 0.25); }+.v-pill { position: absolute; top: 18px; padding: 9px 13px; border-radius: 8px; font: 500 17px/1 var(--v-mono); white-space: nowrap; }+.v-pill--ref { background: var(--v-ink); color: #fff; }+.v-pill--copy { background: #fff; color: var(--v-ink); box-shadow: 0 0 0 1px rgb(0 0 0 / 0.12); }+.v-pill--copy::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #0070f3; vertical-align: 1px; }++/* ---------- the grid of copies ---------- */++.v-cell { overflow: hidden; border-radius: 10px; background: var(--v-bg); box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08), 0 20px 50px -28px rgb(0 0 0 / 0.3); }+.v-cell img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: contain; } /* whole, on the pages' own off-white */+.v-cell-label { position: absolute; left: 12px; bottom: 12px; padding: 7px 10px; border-radius: 7px; background: rgb(255 255 255 / 0.92); box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08); font: 450 15px/1 var(--v-mono); color: var(--v-ink); white-space: nowrap; }++/* ---------- the end card ---------- */++.v-word { font-family: var(--v-sans); font-size: 132px; line-height: 1; font-weight: 600; letter-spacing: -0.06em; white-space: nowrap; }+.v-cmd { display: flex; align-items: center; gap: 18px; height: 92px; padding: 0 40px; border-radius: 16px; background: var(--v-ink); color: #ededed; font: 400 32px/1 var(--v-mono); white-space: nowrap;+ box-shadow: 0 30px 70px -28px rgb(0 0 0 / 0.5); }+.v-cmd span { color: #8f8f8f; }+.v-cmd i { display: block; width: 3px; height: 38px; margin-left: -12px; background: #ededed; }+.v-links { width: 1920px; text-align: center; font: 400 23px/1 var(--v-mono); color: var(--v-gray); }+.v-links i { font-style: normal; margin: 0 18px; color: #cfcfcf; }+.v-count { width: 200px; text-align: right; }diff --git a/site/video/vercel.html b/site/video/vercel.htmlnew file mode 100644index 0000000..daf6582--- /dev/null+++ b/site/video/vercel.html@@ -0,0 +1,25 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="viewport" content="width=device-width, initial-scale=1">+ <title>reanimate · vercel video</title>+ <meta name="robots" content="noindex">+ <link rel="preload" href="assets/fonts/Geist-Variable.woff2" as="font" type="font/woff2" crossorigin>+ <link rel="preload" href="assets/fonts/GeistMono-Variable.woff2" as="font" type="font/woff2" crossorigin>+ <link rel="stylesheet" href="src/demo.css">+ <link rel="stylesheet" href="src/vercel/vercel.css">+ <!-- ?render: the bare 1920x1080 stage for scripts/render.ts --page vercel.html. Otherwise a player:+ space plays and pauses, ←/→ step a frame (shift: a second), ?t=12.5 starts there. -->+ <script>if (new URLSearchParams(location.search).has("render")) document.documentElement.dataset.render = "";</script>+ <script type="module" src="src/vercel/main.js"></script>+</head>+<body>+ <div id="viewport"><div id="stage"></div></div>+ <div id="player">+ <button type="button" id="play" aria-label="Play">Play</button>+ <span id="time">0.00</span>+ <input id="scrub" type="range" min="0" max="1" step="0.001" value="0" aria-label="Time">+ </div>+</body>+</html>