Product Tour
A 35-second Linear-style website showreel: 15 sections cut back to back, from a pixel-field intro to testimonials.
Install using CLI
npx shadcn@latest add https://www.sycamore.to/r/product-tour.jsonDownload assets (fonts and images)
node sycamore-assets.mjs product-tourUsage
import { ProductTour } from "./sycamore/product-tour/ProductTour";
<Composition
id="ProductTour"
component={ProductTour}
durationInFrames={2128}
fps={60}
width={1920}
height={1080}
/>Install manually
Copy the source code into src/sycamore/product-tour/
// Product Tour: a showreel of website sections cut to the beat, rebuilt
// section by section from a reference (see SECTIONS). Each section is its own
// component inside a <Sequence>, so sections can be built and tuned in isolation.
//
// All on-screen text lives in COPY so it can be swapped in one place.
import React from "react";
import { AbsoluteFill, Sequence } from "remotion";
import { PixelField } from "./PixelField";
import { DarkHero } from "./DarkHero";
import { AgentFlow } from "./AgentFlow";
import { IssueList } from "./IssueList";
import { ReviewDiff } from "./ReviewDiff";
import { AgentsHand } from "./AgentsHand";
import { EclipseHero } from "./EclipseHero";
import { StartCoding } from "./StartCoding";
import { AppEditor } from "./AppEditor";
import { MeetingNotes } from "./MeetingNotes";
import { Changelog } from "./Changelog";
import { ChangeBetter } from "./ChangeBetter";
import { ThinkDiff } from "./ThinkDiff";
import { SyncLayers } from "./SyncLayers";
import { Testimonials } from "./Testimonials";
import { loadTourFonts } from "./fonts";
loadTourFonts();
export const TOUR_FPS = 60;
export const TOUR_WIDTH = 1920;
export const TOUR_HEIGHT = 1080;
export const COPY = {
darkHero: {
headline: ["Issue tracking is dead.", "Join what’s next."] as [string, string],
primary: "Get started",
secondary: "Contact sales",
},
agentFlow: {
lead: "No local setup required.",
body: ["The Linear agent works on its own", "branch in an isolated cloud environment."] as [string, string],
inputs: ["FIX LOGIN REDIRECT", "IMPROVE VEHICLE SYNC", "ADD EMPTY STATES"] as [string, string, string],
outputs: ["FIX AUTH REDIRECT LOOP", "IMPROVE VEHICLE SYNC", "ADD LIST EMPTY STATES"] as [string, string, string],
},
reviewDiff: {
eyebrow: "Linear Reviews",
title: "Review, refine, release",
body: ["See what needs review, leave feedback, and stay synced", "with GitHub without breaking your rhythm."] as [string, string],
},
agentsHand: {
title: "Create your own agents",
body: ["Build your own AI teammates with the Linear API.", "Keep them private or share with the Linear community."] as [string, string],
primary: "Start building",
secondary: "Read guidelines",
},
eclipseHero: {
brand: "Linear",
nav: ["Product", "Resources", "Customers", "Pricing", "Now", "Contact"],
docs: "Docs",
navCta: "Open app",
title: "Linear for Startups",
body: ["A shared system for planning, building, and reviewing", "product work as your team grows."] as [string, string],
primary: "Get started",
secondary: "Become a Partner",
},
startCoding: {
headline: ["Start a coding", "session today"] as [string, string],
primary: "Open app",
secondary: "Download",
},
appEditor: {
groups: [
{
name: "In Review",
tone: "review" as const,
rows: [
["ENG-2498", "Replace isFullySynced with a sync status"],
["ENG-2380", "Show a stale data banner while syncing"],
["ENG-2039", "Pass sync status to the dashboard"],
] as Array<[string, string]>,
},
{
name: "In Progress",
tone: "progress" as const,
rows: [
["ENG-2076", "Reduce ETA jitter"],
["ENG-2108", "Handle GPS dropouts gracefully"],
["ENG-2143", "Optimize map tile loading on initial app open"],
["ENG-2187", "Prevent duplicate ride requests on poor network"],
] as Array<[string, string]>,
},
{
name: "Todo",
tone: "todo" as const,
rows: [
["ENG-2254", "Reduce unnecessary map re-rendering on home"],
["ENG-2291", "Clean up deprecated APIs used by the rider app"],
["ENG-2327", "Speed up CI pipelines for mobile builds"],
["ENG-2358", "Reduce flakiness in mobile UI tests"],
] as Array<[string, string]>,
},
],
path: "kinetic-ios/src/screens/Home/HomeScreen.tsx",
theme: "Linear",
themes: ["Linear", "GitHub Dark", "Dracula", "Nord", "Tokyo Night", "Ros\u00e9 Pine", "Catppuccin", "One Dark"],
features: "Features",
links: [
["Issues", "Guided reviews", "Diffs"],
["Git automations", "Cycles", "Releases"],
] as [string[], string[]],
},
meetingNotes: {
features: [
["COLLABORATIVE EDITING", "WORK TOGETHER ON PRDS AND SPECS IN A", "REALTIME, MULTIPLAYER EDITOR"],
["INLINE COMMENTS", "DISCUSS IDEAS DIRECTLY IN CONTEXT WITH", "INLINE COMMENTS"],
["TEXT-TO-ISSUE COMMANDS", "SEAMLESSLY TURN BULLET POINT LISTS INTO", "ACTIONABLE ISSUES"],
["SUBSCRIBE FOR UPDATES", "GET NOTIFIED WHEN DOCUMENTS CHANGE, WITH", "CLEAR DIFFS AND NEW COMMENTS"],
] as Array<[string, string, string]>,
crumbs: ["UI Refresh", "Meeting notes"] as [string, string],
title: "Meeting notes",
meta: "Feb 3, 2026 \u00b7 @paul @meg @julian",
body: [
"We reviewed the latest UI refresh designs for the rider app, focusing on",
"core screens and perceived performance. The direction is solid, but several",
"areas need iteration before implementation, with Android-specific",
"constraints currently posing the biggest risk to timeline.",
] as [string, string, string, string],
highlight: "need iteration",
actions: "Action items",
items: [
["ENG-2108", "Finalize loading and empty states"],
["ENG-2109", "Update android layouts"],
["ENG-2110", "Audit navigation for performance issues"],
] as Array<[string, string]>,
closing: ["With the public holiday next Wednesday, we\u2019ll regroup the week after to", "continue the review."] as [string, string],
comment: {
author: "kenneth",
when: "just now",
text: ["Which parts need iteration before we can", "move forward?"] as [string, string],
reply: "Reply...",
},
},
changelog: {
title: "Changelog",
entries: [
{
title: "Team owners",
body: ["We are introducing a new team owner", "role to give teams more control over", "their team settings. Alongside this..."] as [string, string, string],
date: "DEC 17, 2025",
},
{
title: "Linear agent for Intercom",
body: ["The Linear agent can take on the", "tedious work of turning customer", "conversations into actionable issues"] as [string, string, string],
date: "DEC 11, 2025",
},
],
},
changeBetter: {
title: "Change for the better",
body: [
"You don\u2019t have to change what you\u2019re building to change how you build it.",
"Introducing a purpose-built system for teams ready to move forward.",
] as [string, string],
},
thinkDiff: {
word: "Think diff.",
repo: "orbit/control-plane#1337",
title: "iPhone Duo Compatibility",
tabs: ["Overview", "Guide", "Diffs"] as [string, string, string],
added: "+1,293",
removed: "-938",
file: "ButtonTransition.swift",
filePath: "mobile-ios/Components",
fileAdded: "+22",
caption: "Linear Diffs are coming to mobile",
body: ["Review code, collaborate with agents,", "and merge changes on the go."] as [string, string],
cta: "Request beta access",
},
syncLayers: {
title: "Built for speed, still synced with GitHub",
body: ["Reviews in Linear sync bidirectionally with GitHub, so", "comments, approvals, and PR status are always up to date."] as [string, string],
},
testimonials: {
cards: [
{
brand: "scale",
quote: ["My advice for anyone curious", "about Linear is to do a pilot.", "The product sells itself.\u201d"],
name: "Joshua Hall",
role: "Head of Customer Engineering",
},
{
brand: "OpenAI",
quote: ["You just have to use it and you", "will see, you will just feel it.\u201d"],
name: "Gabriel Peal",
role: "Engineer",
},
{
brand: "oscar",
quote: ["The rip-and-replace fear is", "overblown, it was a breeze to", "move everyone over to Linear.\u201d"],
name: "Pete Zalewski",
role: "Staff Software Engineer",
},
] as [
{ brand: string; quote: [string, string, string?]; name: string; role: string },
{ brand: string; quote: [string, string, string?]; name: string; role: string },
{ brand: string; quote: [string, string, string?]; name: string; role: string },
],
},
};
// Timeline. The reference recording had long freezes and cut-off animations
// from a bad conversion, so sections are retimed: each runs for `len` frames
// (60fps), back to back, ending on a short beat once its animation settles,
// and `skip` drops frames at the start of a section's own animation.
type Section = { len: number; skip?: number; render: () => React.ReactNode };
const TIMELINE: Array<[string, Section]> = [
["pixelField", { len: 184, render: () => <PixelField cursor={{ x: 966, y: 619 }} /> }], // 1
["darkHero", { len: 189, render: () => <DarkHero copy={COPY.darkHero} /> }], // 2
["agentFlow", { len: 312, render: () => <AgentFlow copy={COPY.agentFlow} /> }], // 3
["issueList", { len: 72, render: () => <IssueList /> }], // 4
["reviewDiff", { len: 100, skip: 10, render: () => <ReviewDiff copy={COPY.reviewDiff} /> }], // 5
["agentsHand", { len: 130, render: () => <AgentsHand copy={COPY.agentsHand} /> }], // 6
["eclipseHero", { len: 108, skip: 40, render: () => <EclipseHero copy={COPY.eclipseHero} /> }], // 7
["startCoding", { len: 151, render: () => <StartCoding copy={COPY.startCoding} /> }], // 8
["appEditor", { len: 112, render: () => <AppEditor copy={COPY.appEditor} /> }], // 9
["meetingNotes", { len: 108, render: () => <MeetingNotes copy={COPY.meetingNotes} /> }], // 10
["changelog", { len: 56, render: () => <Changelog copy={COPY.changelog} /> }], // 11
["changeBetter", { len: 138, render: () => <ChangeBetter copy={COPY.changeBetter} /> }], // 12
["thinkDiff", { len: 184, render: () => <ThinkDiff copy={COPY.thinkDiff} /> }], // 13
["syncLayers", { len: 100, render: () => <SyncLayers copy={COPY.syncLayers} /> }], // 14
["testimonials", { len: 184, skip: 12, render: () => <Testimonials copy={COPY.testimonials} /> }], // 15
];
// Start/end frame of each section, laid out back to back.
export const SECTIONS: Record<string, Section & { from: number; to: number }> = {};
{
let at = 0;
for (const [key, s] of TIMELINE) {
SECTIONS[key] = { ...s, from: at, to: at + s.len };
at += s.len;
}
}
export const TOUR_FRAMES = TIMELINE.reduce((sum, [, s]) => sum + s.len, 0);
export const ProductTour: React.FC = () => {
return (
<AbsoluteFill
style={{
backgroundColor: "#000",
}}
>
{Object.entries(SECTIONS).map(([key, s]) => (
<Sequence key={key} name={key} from={s.from} durationInFrames={s.len}>
{/* a negative inner offset skips the section's first `skip` frames */}
<Sequence from={-(s.skip ?? 0)} layout="none">
{s.render()}
</Sequence>
</Sequence>
))}
</AbsoluteFill>
);
};Plus 20 files it imports. Copy them with the same folder layout:
›engine/src/product-tour/PixelField.tsx
engine/src/product-tour/PixelField.tsx // Section 1: white dot grid with clusters of dark dots that flicker and morph // on their own clocks (no global tick), drawn to a canvas from the frame. // // Each cluster is a small blocky patch (a mostly filled 2-6 x 2-6 rectangle, // seeded from its id + life). Every `period` frames a few of its cells toggle, // so the block shimmers in place; after `steps` steps it respawns somewhere // else. Everything is a pure function of the frame. import React, { useLayoutEffect, useMemo, useRef } from "react"; import { random, useCurrentFrame, useVideoConfig } from "remotion"; const SPACING = 11.5; // px between dots (reference: ~20px at 3442 wide) const DOT = 2.6; // dot size, square const PALE = "#d9d9d9"; const DARK = "#1c1c1c"; const BG = "#ffffff"; const PATCH = 6; const CLUSTERS = 270; type Cluster = { id: number; period: number; steps: number; phase: number }; // Cells of cluster `c` in its `gen`-th life after `step` steps, plus its origin. const clusterCells = (c: Cluster, gen: number, step: number, cols: number, rows: number) => { const key = `${c.id}-${gen}`; const ox = Math.floor(random(`x${key}`) * (cols - PATCH)); const oy = Math.floor(random(`y${key}`) * (rows - PATCH)); // Mostly small blocks; a few single lines and specks. const w = 1 + Math.floor(random(`w${key}`) * PATCH); const h = 1 + Math.floor(random(`h${key}`) * PATCH); const density = 0.55 + random(`d${key}`) * 0.4; const g = new Uint8Array(PATCH * PATCH); for (let y = 0; y < h; y++) { for (let x = 0; x < w; x++) { let on = random(`s${key}-${x}-${y}`) < density; // Each step toggles ~18% of the cells, deterministically per step. for (let i = 1; i <= step; i++) { if (random(`t${key}-${x}-${y}-${i}`) < 0.18) on = !on; } g[y * PATCH + x] = on ? 1 : 0; } } return { ox, oy, g }; }; export const PixelField: React.FC<{ cursor?: { x: number; y: number } }> = ({ cursor }) => { const frame = useCurrentFrame(); const { width, height } = useVideoConfig(); const ref = useRef<HTMLCanvasElement>(null); const cols = Math.ceil(width / SPACING) + 1; const rows = Math.ceil(height / SPACING) + 1; const clusters = useMemo<Cluster[]>( () => Array.from({ length: CLUSTERS }, (_, id) => ({ id, period: 4 + Math.floor(random(`p${id}`) * 8), // 4-11 frames per step steps: 3 + Math.floor(random(`n${id}`) * 6), // 3-8 steps per life phase: Math.floor(random(`o${id}`) * 200), })), [], ); useLayoutEffect(() => { const canvas = ref.current; if (!canvas) return; const ctx = canvas.getContext("2d"); if (!ctx) return; ctx.fillStyle = BG; ctx.fillRect(0, 0, width, height); const dark = new Uint8Array(cols * rows); for (const c of clusters) { const t = Math.floor((frame + c.phase) / c.period); const gen = Math.floor(t / c.steps); const step = t % c.steps; const { ox, oy, g } = clusterCells(c, gen, step, cols, rows); for (let y = 0; y < PATCH; y++) { for (let x = 0; x < PATCH; x++) { if (g[y * PATCH + x]) dark[(oy + y) * cols + ox + x] = 1; } } } const off = (SPACING - DOT) / 2; ctx.fillStyle = PALE; for (let y = 0; y < rows; y++) { for (let x = 0; x < cols; x++) { if (!dark[y * cols + x]) ctx.fillRect(x * SPACING + off, y * SPACING + off, DOT, DOT); } } ctx.fillStyle = DARK; for (let y = 0; y < rows; y++) { for (let x = 0; x < cols; x++) { if (dark[y * cols + x]) ctx.fillRect(x * SPACING + off, y * SPACING + off, DOT, DOT); } } }, [frame, width, height, cols, rows, clusters]); return ( <> <canvas ref={ref} width={width} height={height} style={{ position: "absolute", inset: 0 }} /> {cursor ? <Cursor x={cursor.x} y={cursor.y} /> : null} </> ); }; // macOS-style arrow pointer, tip at (x, y). export const Cursor: React.FC<{ x: number; y: number; scale?: number; color?: "black" | "white" }> = ({ x, y, scale = 0.75, color = "black", }) => { const fill = color === "black" ? "#000" : "#fff"; const stroke = color === "black" ? "#fff" : "#000"; return ( <svg width={22 * scale} height={32 * scale} viewBox="0 0 22 32" style={{ position: "absolute", left: x - 2 * scale, top: y - 2 * scale, overflow: "visible" }} > <path d="M2 2 L2 25 L7.5 19.5 L11.5 29 L15 27.5 L11 18.5 L18.5 18.5 Z" fill={fill} stroke={stroke} strokeWidth={1.6} strokeLinejoin="round" /> </svg> ); };›engine/src/product-tour/DarkHero.tsx
engine/src/product-tour/DarkHero.tsx // Section 2: hard cut to a near-black hero. Two-line headline, two buttons, // a faint dot grid with soft brightness variation, and a cursor that scrubs // around above the headline leaving a short-lived trail of lit dots. // // The cursor path is tracked from the reference (heroCursorPath.ts). The trail // is a pure function of the frame: each dot's glow is the strongest of its // distances to the cursor over the last TRAIL frames, faded by age. import React from "react"; import { useCurrentFrame } from "remotion"; import { Cursor } from "./PixelField"; import { HERO_CURSOR_PATH } from "./heroCursorPath"; import { INTER } from "./fonts"; import { cursorOnPath, DotTrail, settlePath, smoothstep } from "./DotTrail"; const PATH = settlePath(HERO_CURSOR_PATH, 24); const BG = "#08070a"; const GRID_TOP = 250; // dots fade in/out over these bands const GRID_BOTTOM = 900; const heroMask = (_x: number, y: number) => smoothstep(GRID_TOP, GRID_TOP + 140, y) * (1 - smoothstep(GRID_BOTTOM - 160, GRID_BOTTOM, y)); export type DarkHeroCopy = { headline: [string, string]; primary: string; secondary: string }; export const DarkHero: React.FC<{ copy: DarkHeroCopy }> = ({ copy }) => { const frame = useCurrentFrame(); const [cx, cy] = cursorOnPath(PATH, frame); return ( <> <DotTrail path={PATH} spacing={9} dot={3.2} mask={heroMask} bg={BG} /> <div style={{ position: "absolute", left: 0, right: 0, top: 412, display: "flex", flexDirection: "column", alignItems: "center", fontFamily: INTER, color: "#f7f8f8", }} > <div style={{ fontSize: 80, lineHeight: "79px", fontWeight: 510, letterSpacing: "-0.025em", fontVariationSettings: '"opsz" 32', textAlign: "center", }} > {copy.headline[0]} <br /> {copy.headline[1]} </div> <div style={{ display: "flex", gap: 12, marginTop: 50 }}> <Button label={copy.primary} variant="light" /> <Button label={copy.secondary} variant="dark" /> </div> </div> <Cursor x={cx} y={cy} scale={0.58} color="white" /> </> ); }; const Button: React.FC<{ label: string; variant: "light" | "dark" }> = ({ label, variant }) => ( <div style={{ height: 43, padding: "0 17px", display: "flex", alignItems: "center", borderRadius: 5, fontSize: 17, fontWeight: 500, letterSpacing: "-0.01em", backgroundColor: variant === "light" ? "#e0dfe2" : "#212024", color: variant === "light" ? "#08070a" : "#f7f8f8", boxShadow: variant === "dark" ? "inset 0 0 0 1px rgba(255,255,255,0.05)" : undefined, }} > {label} </div> );›engine/src/product-tour/heroCursorPath.ts
engine/src/product-tour/heroCursorPath.ts // Cursor tip per frame for section 2, tracked from the reference (60fps, // frames 184-348), in 1920x1080 output pixels. Frames where the cursor was // hidden behind the headline are interpolated. export const HERO_CURSOR_PATH: ReadonlyArray<readonly [number, number]> = [ [1417.9, 485.3], [1417.9, 485.3], [1404.0, 477.5], [1385.0, 472.4], [1355.5, 468.0], [1355.5, 468.0], [1294.9, 480.8], [1234.4, 493.6], [1173.9, 506.5], [1113.4, 519.3], [1052.8, 532.1], [992.3, 544.9], [931.8, 557.8], [871.3, 570.6], [813.8, 570.6], [753.6, 576.7], [685.0, 580.1], [642.0, 580.1], [606.9, 575.6], [581.8, 568.9], [566.2, 560.0], [557.2, 553.9], [548.9, 544.9], [543.3, 532.7], [541.6, 520.4], [543.9, 506.5], [555.0, 488.6], [585.7, 455.7], [585.7, 455.7], [626.7, 428.1], [667.7, 400.5], [714.0, 373.1], [764.2, 349.2], [818.3, 324.6], [867.9, 304.5], [910.9, 289.5], [940.5, 279.4], [976.7, 268.3], [1004.0, 262.1], [1021.9, 257.7], [1033.0, 256.6], [1037.5, 255.4], [1036.4, 257.7], [1021.9, 272.7], [990.1, 300.6], [947.1, 338.0], [907.5, 370.9], [877.4, 394.9], [860.1, 407.2], [849.0, 415.5], [843.4, 419.4], [841.2, 420.6], [841.2, 421.7], [845.6, 411.6], [865.7, 389.3], [898.6, 355.3], [940.5, 314.6], [968.9, 290.6], [989.0, 275.0], [1001.8, 265.5], [1001.8, 265.5], [1010.7, 261.6], [1011.8, 261.6], [1009.6, 276.1], [996.8, 297.3], [977.8, 328.0], [955.0, 363.1], [943.1, 371.1], [931.2, 379.1], [919.3, 387.1], [925.2, 396.9], [931.2, 406.8], [937.1, 416.7], [978.4, 381.0], [1019.7, 345.3], [1047.0, 321.3], [1069.3, 304.0], [1081.0, 296.2], [1087.7, 292.8], [1089.9, 292.8], [1091.1, 295.0], [1079.9, 311.8], [1055.9, 341.3], [1021.9, 378.7], [997.9, 402.7], [995.8, 402.4], [993.8, 402.1], [991.7, 401.7], [989.6, 401.4], [987.5, 401.1], [985.5, 400.8], [983.4, 400.5], [1001.0, 375.7], [1018.5, 350.8], [1029.7, 336.9], [1040.3, 321.3], [1045.9, 314.0], [1048.1, 310.1], [1048.1, 310.1], [1038.6, 317.9], [1002.9, 351.4], [975.6, 377.0], [967.7, 383.1], [959.8, 389.2], [951.9, 395.2], [944.0, 401.3], [936.1, 407.3], [928.3, 413.4], [920.4, 419.4], [952.4, 372.6], [984.5, 325.7], [984.5, 325.7], [1010.7, 292.3], [1020.8, 279.4], [1025.2, 275.0], [1025.2, 273.9], [1024.1, 275.0], [1010.7, 288.4], [983.4, 314.6], [944.9, 353.1], [918.1, 377.6], [903.1, 390.4], [890.8, 400.5], [887.5, 402.7], [888.6, 399.4], [899.7, 381.5], [928.2, 343.0], [961.1, 299.5], [983.4, 270.5], [995.7, 256.6], [1005.2, 243.2], [1010.7, 236.5], [1011.8, 235.4], [1006.3, 239.8], [984.5, 261.0], [952.7, 295.0], [952.7, 295.0], [894.2, 354.2], [873.5, 373.1], [857.9, 386.0], [851.2, 390.4], [851.2, 390.4], [852.3, 383.7], [869.1, 357.5], [889.7, 328.0], [917.6, 290.6], [941.6, 259.4], [957.2, 240.9], [965.6, 229.8], [968.9, 225.3], [970.0, 225.3], [958.9, 235.9], [906.4, 289.5], [857.9, 337.4], [822.8, 370.4], [794.3, 396.0], [779.8, 408.3], [773.1, 412.7], [772.0, 413.3], [770.9, 412.7], [777.6, 398.2], [797.1, 368.7], [821.6, 332.4], [843.4, 302.9], [843.4, 302.9], ];›engine/src/product-tour/fonts.ts
engine/src/product-tour/fonts.ts // Fonts served from public/ so renders never depend on Google Fonts. // Inter is variable (weight + optical size; set opsz per use with // font-variation-settings). Geist Mono 400 for the monospace UI labels. // Source Serif 4 (variable, opsz) for "Think diff." import { cancelRender, continueRender, delayRender, staticFile } from "remotion"; export const INTER = "TourInter"; export const MONO = "TourGeistMono"; export const SERIF = "TourSourceSerif"; const FILES: Array<[family: string, file: string, weight: string]> = [ [INTER, "inter-latin-opsz-normal.woff2", "100 900"], [MONO, "geist-mono-400.woff2", "400"], [SERIF, "source-serif-4-latin-opsz-normal.woff2", "200 900"], ]; let loaded = false; export const loadTourFonts = () => { if (loaded || typeof FontFace === "undefined") return; loaded = true; for (const [family, file, weight] of FILES) { const handle = delayRender(`font ${family}`); const font = new FontFace(family, `url(${staticFile(`product-tour/fonts/${file}`)}) format("woff2")`, { weight }); font .load() .then(() => { document.fonts.add(font); continueRender(handle); }) .catch((err) => cancelRender(err)); } };›engine/src/product-tour/DotTrail.tsx
engine/src/product-tour/DotTrail.tsx // A dim dot grid drawn to a canvas, with a sparse trail of lit dots following a // cursor path (one [x, y] per frame). Shared by the dark hero (section 2) and // "Start a coding session" (section 8). // // Pure function of the frame: each dot's glow is the strongest of its distances // to the cursor over the last `trail` frames, faded by age. import React, { useLayoutEffect, useMemo, useRef } from "react"; import { random, useCurrentFrame, useVideoConfig } from "remotion"; export const smoothstep = (e0: number, e1: number, x: number) => { const t = Math.min(1, Math.max(0, (x - e0) / (e1 - e0))); return t * t * (3 - 2 * t); }; // Low-frequency value noise so the ambient grid has soft brighter patches. export const valueNoise = (x: number, y: number, cell: number, seed: string) => { const gx = Math.floor(x / cell); const gy = Math.floor(y / cell); const fx = smoothstep(0, 1, x / cell - gx); const fy = smoothstep(0, 1, y / cell - gy); const r = (i: number, j: number) => random(`${seed}-${i}-${j}`); const a = r(gx, gy) * (1 - fx) + r(gx + 1, gy) * fx; const b = r(gx, gy + 1) * (1 - fx) + r(gx + 1, gy + 1) * fx; return a * (1 - fy) + b * fy; }; export type DotTrailProps = { path: ReadonlyArray<readonly [number, number]>; spacing: number; dot: number; /** 0-1 visibility of the ambient grid at a point. */ mask: (x: number, y: number) => number; bg: string; ambientGain?: number; // brightness added to bg by a fully visible ambient dot glowGain?: number; // brightness added by a fully lit trail dot radius?: number; trail?: number; litShare?: number; seed?: string; base?: number; // bg grey level the gains add to }; /** Extends a tracked path by `frames`, carrying on its last velocity and * decaying it to rest, so a section can end on a still cursor. */ export const settlePath = ( path: ReadonlyArray<readonly [number, number]>, frames: number, ): ReadonlyArray<readonly [number, number]> => { const out = [...path]; const n = path.length; let [x, y] = path[n - 1]; let vx = (path[n - 1][0] - path[n - 4][0]) / 3; let vy = (path[n - 1][1] - path[n - 4][1]) / 3; for (let i = 0; i < frames; i++) { vx *= 0.82; vy *= 0.82; x += vx; y += vy; out.push([x, y] as const); } return out; }; export const cursorOnPath = (path: DotTrailProps["path"], f: number) => path[Math.max(0, Math.min(path.length - 1, f))]; export const DotTrail: React.FC<DotTrailProps> = ({ path, spacing, dot, mask, bg, ambientGain = 16, glowGain = 120, radius = 46, trail = 30, litShare = 0.4, seed = "amb", base = 8, }) => { const frame = useCurrentFrame(); const { width, height } = useVideoConfig(); const ref = useRef<HTMLCanvasElement>(null); const cols = Math.ceil(width / spacing); const rows = Math.ceil(height / spacing); const ambient = useMemo(() => { const amb = new Float32Array(cols * rows); const lit = new Uint8Array(cols * rows); for (let y = 0; y < rows; y++) { for (let x = 0; x < cols; x++) { const px = x * spacing; const py = y * spacing; const n = valueNoise(px, py, 180, seed); amb[y * cols + x] = mask(px, py) * (0.25 + 0.75 * n * n); lit[y * cols + x] = random(`lit-${seed}-${x}-${y}`) < litShare ? 1 : 0; } } return { amb, lit }; // mask is a stable module-level function per use // eslint-disable-next-line react-hooks/exhaustive-deps }, [cols, rows, spacing, seed, litShare]); useLayoutEffect(() => { const ctx = ref.current?.getContext("2d"); if (!ctx) return; ctx.fillStyle = bg; ctx.fillRect(0, 0, width, height); const glow = new Float32Array(cols * rows); for (let k = 0; k < trail; k++) { const f = frame - k; if (f < 0) break; const [cx, cy] = cursorOnPath(path, f); const age = 1 - k / trail; const x0 = Math.max(0, Math.floor((cx - radius) / spacing)); const x1 = Math.min(cols - 1, Math.ceil((cx + radius) / spacing)); const y0 = Math.max(0, Math.floor((cy - radius) / spacing)); const y1 = Math.min(rows - 1, Math.ceil((cy + radius) / spacing)); for (let y = y0; y <= y1; y++) { for (let x = x0; x <= x1; x++) { const d = Math.hypot(x * spacing - cx, y * spacing - cy) / radius; if (d >= 1) continue; const g = (1 - d) * age * age; const i = y * cols + x; if (g > glow[i]) glow[i] = g; } } } const off = (spacing - dot) / 2; for (let y = 0; y < rows; y++) { for (let x = 0; x < cols; x++) { const i = y * cols + x; const g = ambient.lit[i] ? glow[i] : 0; const v = base + ambient.amb[i] * ambientGain + g * glowGain; if (v < base + 1) continue; const c = Math.round(v); ctx.fillStyle = `rgb(${c},${c - 1},${c + 2})`; ctx.fillRect(x * spacing + off, y * spacing + off, dot, dot); } } }, [frame, width, height, cols, rows, ambient, path, spacing, dot, bg, ambientGain, glowGain, radius, trail, base]); return <canvas ref={ref} width={width} height={height} style={{ position: "absolute", inset: 0 }} />; };›engine/src/product-tour/AgentFlow.tsx
engine/src/product-tour/AgentFlow.tsx // Section 3: agent flow diagram. A caption on top; a panel of three input tasks // on the left, curved connectors into three dashed "sandbox" nodes, and // connectors out to a panel of three branches on the right. // // Story (local frames; rows stagger by STAGGER): sparks finish travelling into // the nodes (the section opens mid-flight, as in the reference) while the lit // inputs dim; each node's dot-matrix glyph wakes up and cycles patterns; then // the glyphs fade, sparks travel out, and each output row lights with a green // branch icon. All layout numbers are measured from the reference at 1920x1080. import React, { useMemo } from "react"; import { Easing, interpolate, interpolateColors, useCurrentFrame } from "remotion"; import { INTER, MONO } from "./fonts"; const BG = "#060609"; const PANEL = "#0f0f11"; const PANEL_BORDER = "#1a1a1c"; const LINE = "#222224"; const DOT = "#5b5b60"; const TEXT_DIM = "#59595b"; const TEXT_LIT = "#e0e0e2"; const GREEN = "#4cc36b"; const STAGGER = 9; const ROWS = [632, 671, 710]; // panel row centres (y) const NODES = [507, 670, 834]; // node centres (y) const NODE_X = 961; // Timeline (local frames), per row i: value + i * STAGGER. // LEAD restores the start the reference cut off: sparks leave the inputs at ~f12. const LEAD = 88; const T = { inArrive: 3 + LEAD, // spark reaches the node arrow inTravel: 80, // frames for a spark to cross a connector inputDim: 4 + LEAD, // input text starts dimming glyphOn: 3 + LEAD, glyphOff: 140 + LEAD, // glyph fades + spark leaves the node outArrive: 179 + LEAD, // spark reaches the output arrow; row lights up }; export type AgentFlowCopy = { lead: string; body: [string, string]; inputs: [string, string, string]; outputs: [string, string, string]; }; // ---- geometry ------------------------------------------------------------- type Pt = { x: number; y: number }; type Path = { pts: Pt[]; len: number[]; total: number; d: string }; // Horizontal lead-in, an S-shaped cubic, horizontal lead-out. const connector = (x0: number, y0: number, x1: number, y1: number, lead: number): Path => { const a = { x: x0 + lead, y: y0 }; const b = { x: x1 - lead, y: y1 }; const k = (b.x - a.x) * 0.5; const pts: Pt[] = [{ x: x0, y: y0 }]; const N = 120; for (let i = 0; i <= N; i++) { const t = i / N; const u = 1 - t; pts.push({ x: u * u * u * a.x + 3 * u * u * t * (a.x + k) + 3 * u * t * t * (b.x - k) + t * t * t * b.x, y: u * u * u * a.y + 3 * u * u * t * a.y + 3 * u * t * t * b.y + t * t * t * b.y, }); } pts.push({ x: x1, y: y1 }); const len = [0]; for (let i = 1; i < pts.length; i++) { len.push(len[i - 1] + Math.hypot(pts[i].x - pts[i - 1].x, pts[i].y - pts[i - 1].y)); } const d = `M ${x0} ${y0} H ${a.x} C ${a.x + k} ${a.y} ${b.x - k} ${b.y} ${b.x} ${b.y} H ${x1}`; return { pts, len, total: len[len.length - 1], d }; }; const pointAt = (p: Path, s: number): Pt => { const L = Math.max(0, Math.min(p.total, s)); let i = 1; while (i < p.len.length - 1 && p.len[i] < L) i++; const t = (L - p.len[i - 1]) / Math.max(1e-6, p.len[i] - p.len[i - 1]); return { x: p.pts[i - 1].x + (p.pts[i].x - p.pts[i - 1].x) * t, y: p.pts[i - 1].y + (p.pts[i].y - p.pts[i - 1].y) * t }; }; // A bright comet whose head is at arc length `head`, fading over `length` behind. const Streak: React.FC<{ path: Path; head: number; length: number }> = ({ path, head, length }) => { const h = Math.min(head, path.total); const tail = head - length; if (tail >= path.total || h <= 0) return null; const SEG = 14; const segs = []; for (let i = 0; i < SEG; i++) { const s0 = tail + (length * i) / SEG; const s1 = tail + (length * (i + 1)) / SEG; if (s1 <= 0 || s0 >= h) continue; const p0 = pointAt(path, Math.max(0, s0)); const p1 = pointAt(path, Math.min(h, s1)); const o = Math.pow((i + 1) / SEG, 1.6); segs.push( <line key={i} x1={p0.x} y1={p0.y} x2={p1.x} y2={p1.y} stroke="#fff" strokeOpacity={o} strokeWidth={1.6} strokeLinecap="round" />, ); } return <g>{segs}</g>; }; const Arrow: React.FC<{ x: number; y: number; color?: string }> = ({ x, y, color = DOT }) => ( <path d={`M ${x - 7} ${y - 4} L ${x} ${y} L ${x - 7} ${y + 4} Z`} fill={color} /> ); // ---- node glyph ------------------------------------------------------------- const PATTERNS = [ ".###.|#...#|..#..|#...#|.###.", "..#..|.###.|#####|.###.|..#..", "#...#|.#.#.|..#..|.#.#.|#...#", "#.#.#|.#.#.|#.#.#|.#.#.|#.#.#", ".###.|.#.#.|#####|.#.#.|.###.", "..#..|..#..|#####|..#..|..#..", "##.##|#...#|.....|#...#|##.##", "#####|#...#|#.#.#|#...#|#####", ".#.#.|#####|.#.#.|#####|.#.#.", "#...#|.....|..#..|.....|#...#", ].map((p) => p.split("|").map((row) => row.split("").map((c) => (c === "#" ? 1 : 0)))); const GLYPH_STEP = 8; // frames per pattern const Glyph: React.FC<{ x: number; y: number; on: number; frame: number; seed: number }> = ({ x, y, on, frame, seed }) => { const t = frame / GLYPH_STEP + seed * 3.3; const a = PATTERNS[Math.floor(t) % PATTERNS.length]; const b = PATTERNS[(Math.floor(t) + 1) % PATTERNS.length]; const mix = Math.min(1, Math.max(0, ((t % 1) - 0.65) / 0.35)); // hold, then quick cross-fade const dots = []; for (let r = 0; r < 5; r++) { for (let c = 0; c < 5; c++) { const lit = (a[r][c] * (1 - mix) + b[r][c] * mix) * on; dots.push( <rect key={`${r}-${c}`} x={x + c * 4.8} y={y + r * 4.8} width={2.6} height={2.6} rx={1.3} fill={interpolateColors(lit, [0, 1], ["#262628", "#dedee0"])} />, ); } } return <g>{dots}</g>; }; // ---- icons ------------------------------------------------------------------ // Rounded square with a pointer in its lower-right corner ("delegated" task). const TaskIcon: React.FC<{ x: number; y: number; color: string }> = ({ x, y, color }) => ( <g transform={`translate(${x} ${y})`} fill="none" stroke={color} strokeWidth={1.7} strokeLinecap="round" strokeLinejoin="round"> <path d="M 9 18 H 4.5 A 3 3 0 0 1 1.5 15 V 4.5 A 3 3 0 0 1 4.5 1.5 H 15 A 3 3 0 0 1 18 4.5 V 9" /> <path d="M 9.5 9.5 L 19 12.5 L 15 14.5 L 13 18.8 Z" fill={color} /> </g> ); // Three-node git branch. const BranchIcon: React.FC<{ x: number; y: number; color: string }> = ({ x, y, color }) => ( <g transform={`translate(${x} ${y})`} fill="none" stroke={color} strokeWidth={1.7} strokeLinecap="round"> <circle cx={4} cy={3.5} r={2.4} /> <circle cx={14} cy={3.5} r={2.4} /> <circle cx={4} cy={17} r={2.4} /> <path d="M 4 6 V 14.5" /> <path d="M 14 6 C 14 11 6 10 4.6 14.6" /> </g> ); // ---- section -------------------------------------------------------------- const clamp = { extrapolateLeft: "clamp", extrapolateRight: "clamp" } as const; export const AgentFlow: React.FC<{ copy: AgentFlowCopy }> = ({ copy }) => { const frame = useCurrentFrame(); const paths = useMemo(() => { const inP = ROWS.map((ry, i) => connector(522, ry, 871, NODES[i], 58)); const outP = NODES.map((ny, i) => connector(1052, ny, 1398, ROWS[i], 58)); return { inP, outP }; }, []); return ( <div style={{ position: "absolute", inset: 0, backgroundColor: BG }}> {/* Caption */} <div style={{ position: "absolute", left: 474, top: 184, width: 920, fontFamily: INTER, fontSize: 34.1, lineHeight: "45px", fontWeight: 420, letterSpacing: "-0.006em", fontVariationSettings: '"opsz" 28', color: "#888890", }} > <span style={{ color: "#fcfcfe" }}>{copy.lead}</span> {copy.body[0]} <br /> {copy.body[1]} </div> <svg width={1920} height={1080} style={{ position: "absolute", inset: 0 }}> {/* Panels */} <rect x={217.5} y={600.5} width={281} height={142} rx={8} fill={PANEL} stroke={PANEL_BORDER} /> <rect x={1425.5} y={600.5} width={280} height={142} rx={8} fill={PANEL} stroke={PANEL_BORDER} /> {/* Connectors */} {[...paths.inP, ...paths.outP].map((p, i) => ( <path key={i} d={p.d} fill="none" stroke={LINE} strokeWidth={1.2} /> ))} {ROWS.map((ry, i) => ( <g key={i}> <circle cx={521} cy={ry} r={2.6} fill={DOT} /> <Arrow x={1399} y={ry} /> </g> ))} {/* Nodes */} {NODES.map((ny, i) => { const on = interpolate(frame, [T.glyphOn + i * STAGGER, T.glyphOn + i * STAGGER + 22], [0, 1], clamp) - interpolate(frame, [T.glyphOff + i * STAGGER, T.glyphOff + i * STAGGER + 25], [0, 1], clamp); const dash = interpolateColors(on, [0, 1], ["#2c2c2e", "#545456"]); return ( <g key={i}> <rect x={NODE_X - 67.5} y={ny - 67.5} width={135} height={135} rx={15} fill="none" stroke={dash} strokeWidth={1.3} strokeDasharray="6 4.5" /> <rect x={NODE_X - 50} y={ny - 50.5} width={101} height={101} rx={6} fill="#0e0e10" stroke="#1d1d20" /> <Glyph x={922} y={ny - 39} on={on} frame={frame} seed={i} /> <Arrow x={872} y={ny} /> <circle cx={1052} cy={ny} r={2.6} fill={DOT} /> </g> ); })} {/* Sparks in, then out */} {paths.inP.map((p, i) => { const arrive = T.inArrive + i * STAGGER; const head = interpolate(frame, [arrive - T.inTravel, arrive], [0, p.total], { extrapolateRight: "extend" }); return <Streak key={`in${i}`} path={p} head={head} length={90} />; })} {paths.outP.map((p, i) => { const leave = T.glyphOff + i * STAGGER; const arrive = T.outArrive + i * STAGGER; if (frame < leave) return null; const head = interpolate(frame, [leave, arrive], [0, p.total], { extrapolateRight: "extend", easing: Easing.inOut(Easing.quad), }); return <Streak key={`out${i}`} path={p} head={frame > arrive ? p.total + (frame - arrive) * (p.total / (arrive - leave)) : head} length={90} />; })} {/* Panel rows */} {copy.inputs.map((label, i) => { const dim = interpolate(frame, [T.inputDim + i * STAGGER, T.inputDim + i * STAGGER + 16], [0, 1], clamp); const c = interpolateColors(dim, [0, 1], [TEXT_LIT, TEXT_DIM]); return ( <g key={`i${i}`}> <TaskIcon x={241} y={ROWS[i] - 11} color={c} /> <Label x={280} y={ROWS[i]} color={c} text={label} /> </g> ); })} {copy.outputs.map((label, i) => { const lit = interpolate(frame, [T.outArrive + i * STAGGER, T.outArrive + i * STAGGER + 16], [0, 1], clamp); return ( <g key={`o${i}`}> <BranchIcon x={1452} y={ROWS[i] - 10} color={interpolateColors(lit, [0, 1], [TEXT_DIM, GREEN])} /> <Label x={1488} y={ROWS[i]} color={interpolateColors(lit, [0, 1], [TEXT_DIM, TEXT_LIT])} text={label} /> </g> ); })} </svg> </div> ); }; const Label: React.FC<{ x: number; y: number; color: string; text: string }> = ({ x, y, color, text }) => ( <text x={x} y={y + 5} fill={color} fontFamily={MONO} fontSize={14} letterSpacing={0.85}> {text} </text> );›engine/src/product-tour/IssueList.tsx
engine/src/product-tour/IssueList.tsx // Section 4: a close-up of an issue list. Right-aligned rows of pills (PR // number, label, "Working..." agent status), avatars and dates on a dark panel, // with two empty highlighted rows, a divider and a lit side pane on the right. // The layout holds still; the "Working..." labels get a light sweep. import React from "react"; import { Img, interpolate, staticFile, useCurrentFrame } from "remotion"; import { inter } from "./ui"; const PANEL = "#141417"; const HILITE = "#1a1a1c"; const PILL_BORDER = "#2a2a2e"; const TEXT = "#e2e3e6"; const DATE = "#a3a5ab"; const PILL_H = 64; const RIGHT = 1080; // right edge of the pill group when an avatar follows const ROW_GAP = 23; type Pill = | { kind: "pr"; num: string; merged?: boolean } | { kind: "label"; text: string; color: string } | { kind: "working"; agent: "openai" | "copilot"; with: "orb" | string }; type Row = { y: number; pills: Pill[]; avatar?: string; date: string }; const RED = "#e64259"; const BLUE = "#676dd1"; const GREEN = "#31c448"; const CREAM = "#fbedcc"; const ROWS: Row[] = [ { y: 175, pills: [ { kind: "pr", num: "#55209", merged: true }, { kind: "label", text: "Bug", color: RED }, { kind: "label", text: "Reliability", color: BLUE }, ], avatar: "a1.jpg", date: "Oct 8", }, { y: 380, pills: [ { kind: "pr", num: "#55423" }, { kind: "label", text: "Performance", color: GREEN }, { kind: "working", agent: "openai", with: "orb" }, ], date: "Oct 6", }, { y: 488, pills: [ { kind: "pr", num: "#55409" }, { kind: "label", text: "Maps", color: CREAM }, { kind: "working", agent: "openai", with: "orb" }, ], date: "Oct 2", }, { y: 596, pills: [{ kind: "label", text: "Maps", color: CREAM }], avatar: "a2.jpg", date: "Oct 7" }, { y: 704, pills: [ { kind: "label", text: "Bug", color: RED }, { kind: "working", agent: "copilot", with: "a5.jpg" }, ], date: "Oct 5", }, { y: 910, pills: [{ kind: "label", text: "Maps", color: CREAM }], avatar: "a4.jpg", date: "Oct 10" }, ]; const PrIcon: React.FC<{ merged?: boolean }> = ({ merged }) => ( <svg width={34} height={34} viewBox="0 0 24 24" fill="none" stroke={merged ? "#3fbf5a" : "#6c6d73"} strokeWidth={2} strokeLinecap="round" strokeLinejoin="round"> <circle cx={6} cy={5} r={2.6} /> <path d="M6 7.6V21" /> <circle cx={18} cy={18.5} r={2.6} /> {merged ? ( <path d="M11.5 5H15a3 3 0 0 1 3 3v7.9" /> ) : ( <> <path d="M18 4v1.5" /> <path d="M18 9.5v2" /> <path d="M11 6.5 9 9l2 2.5" /> <path d="M14 13l-2 2.5 2 2.5" /> </> )} </svg> ); const Avatar: React.FC<{ src: string; size?: number; ring?: boolean }> = ({ src, size = 44, ring }) => ( <Img src={staticFile(`product-tour/avatars/${src}`)} style={{ width: size, height: size, borderRadius: size / 2, objectFit: "cover", filter: "grayscale(0.55) contrast(1.05)", boxShadow: ring ? `0 0 0 2.5px ${PANEL}` : undefined, }} /> ); const AgentBadge: React.FC<{ agent: "openai" | "copilot" }> = ({ agent }) => ( <div style={{ width: 42, height: 42, borderRadius: 21, backgroundColor: "#f4f4f5", display: "flex", alignItems: "center", justifyContent: "center", boxShadow: `0 0 0 2.5px ${PANEL}`, zIndex: 1, }} > <Img src={staticFile(`product-tour/logos/${agent === "openai" ? "openai.svg" : "copilot.svg"}`)} style={{ width: 36, height: 36 }} /> </div> ); const Orb: React.FC = () => ( <div style={{ width: 42, height: 42, borderRadius: 21, background: "radial-gradient(circle at 35% 30%, #e9f6ff 0%, #a9d8fb 45%, #7fb6f0 80%, #8a9ff0 100%)", boxShadow: `0 0 0 2.5px ${PANEL}`, }} /> ); const PillBox: React.FC<{ children: React.ReactNode; padL: number; padR: number }> = ({ children, padL, padR }) => ( <div style={{ height: PILL_H, borderRadius: PILL_H / 2, boxShadow: `inset 0 0 0 1.5px ${PILL_BORDER}`, padding: `0 ${padR}px 0 ${padL}px`, display: "flex", alignItems: "center", gap: 14, ...inter(36, 450, { color: TEXT, letterSpacing: "-0.01em", whiteSpace: "nowrap" }), }} > {children} </div> ); const Working: React.FC<{ frame: number }> = ({ frame }) => { // A soft highlight sweeping across the text. const sweep = (from: number) => interpolate(frame, [from, from + 45], [-40, 140], { extrapolateLeft: "clamp", extrapolateRight: "clamp" }); const pos = sweep(6); return ( <span style={{ backgroundImage: `linear-gradient(90deg, #6c6d73 ${pos - 30}%, #d8d9dc ${pos}%, #6c6d73 ${pos + 30}%)`, WebkitBackgroundClip: "text", backgroundClip: "text", color: "transparent", }} > Working... </span> ); }; const renderPill = (p: Pill, frame: number, key: number) => { if (p.kind === "pr") { return ( <PillBox key={key} padL={18} padR={23}> <PrIcon merged={p.merged} /> <span style={{ color: p.merged ? TEXT : "#b9bbc0", marginLeft: -2 }}>{p.num}</span> </PillBox> ); } if (p.kind === "label") { return ( <PillBox key={key} padL={24} padR={22}> <div style={{ width: 24, height: 24, borderRadius: 12, backgroundColor: p.color, marginRight: 6 }} /> {p.text} </PillBox> ); } return ( <PillBox key={key} padL={24} padR={12}> <Working frame={frame} /> <div style={{ display: "flex", marginLeft: 2 }}> <AgentBadge agent={p.agent} /> <div style={{ marginLeft: -12 }}>{p.with === "orb" ? <Orb /> : <Avatar src={p.with} size={42} ring />}</div> </div> </PillBox> ); }; export const IssueList: React.FC = () => { const frame = useCurrentFrame(); return ( <div style={{ position: "absolute", inset: 0, backgroundColor: "#060609" }}> {/* Panel, divider and side pane */} <div style={{ position: "absolute", left: 177, top: 113, width: 1220, height: 853, backgroundColor: PANEL }} /> <div style={{ position: "absolute", left: 1397, top: 113, width: 21, height: 853, backgroundColor: "#121213", borderLeft: "1px solid #1d1d20", borderRight: "1px solid #1d1d20" }} /> <div style={{ position: "absolute", left: 1418, top: 113, width: 324, height: 853, background: "radial-gradient(ellipse 120% 90% at 100% 100%, #33363a 0%, #26282a 40%, #151617 75%, #121413 100%)", }} /> {/* Empty highlighted rows */} {[229, 759].map((y) => ( <div key={y} style={{ position: "absolute", left: 177, top: y, width: 1196, height: 97, backgroundColor: HILITE, borderRadius: "0 16px 16px 0" }} /> ))} {/* Rows */} {ROWS.map((r, i) => { const hasWorking = r.pills.some((p) => p.kind === "working"); return ( <React.Fragment key={i}> <div style={{ position: "absolute", right: 1920 - (hasWorking ? 1167 : RIGHT), top: r.y - PILL_H / 2, display: "flex", gap: ROW_GAP, }} > {r.pills.map((p, j) => renderPill(p, frame, j))} </div> {r.avatar ? ( <div style={{ position: "absolute", left: 1113, top: r.y - 22 }}> <Avatar src={r.avatar} /> </div> ) : null} <div style={{ position: "absolute", right: 1920 - 1297, top: r.y - 21, ...inter(36, 450, { color: DATE, lineHeight: "42px", letterSpacing: "-0.01em" }) }}> {r.date} </div> </React.Fragment> ); })} </div> ); };›engine/src/product-tour/ui.tsx
engine/src/product-tour/ui.tsx // Shared pieces for the tour sections: the blur-in reveal used on titles, // pill buttons, and text style shortcuts. import React from "react"; import { Easing, interpolate } from "remotion"; import { INTER } from "./fonts"; export const clamp = { extrapolateLeft: "clamp", extrapolateRight: "clamp" } as const; /** Blur + fade + small rise reveal starting at `start`, lasting `dur` frames. */ export const blurIn = (frame: number, start: number, dur = 30, blur = 18, rise = 0): React.CSSProperties => { const t = interpolate(frame, [start, start + dur], [0, 1], { ...clamp, easing: Easing.out(Easing.cubic) }); return { opacity: t, filter: t < 1 ? `blur(${(1 - t) * blur}px)` : undefined, transform: rise ? `translateY(${(1 - t) * rise}px)` : undefined, }; }; export const inter = (size: number, weight = 400, extra: React.CSSProperties = {}): React.CSSProperties => ({ fontFamily: INTER, fontSize: size, fontWeight: weight, fontVariationSettings: `"opsz" ${Math.min(32, Math.max(14, size))}`, ...extra, }); export const PillButton: React.FC<{ label: string; variant: "light" | "dark"; height: number; fontSize: number; padX: number; radius?: number; style?: React.CSSProperties; }> = ({ label, variant, height, fontSize, padX, radius, style }) => ( <div style={{ height, padding: `0 ${padX}px`, display: "flex", alignItems: "center", borderRadius: radius ?? height / 2, backgroundColor: variant === "light" ? "#e6e6e8" : "#151517", color: variant === "light" ? "#08090a" : "#f7f8f8", boxShadow: variant === "dark" ? "inset 0 0 0 1px rgba(255,255,255,0.07)" : undefined, whiteSpace: "nowrap", ...inter(fontSize, 500, { letterSpacing: "-0.01em" }), ...style, }} > {label} </div> );›engine/src/product-tour/ReviewDiff.tsx
engine/src/product-tour/ReviewDiff.tsx // Section 5: "Review, refine, release". The title block blurs in, then two // code panes (before / after) fade up, the changed lines get red / green // bands, and finally the changed words get stronger highlights. // // The panes sit on a slight slant in the reference (rows spread out and the // left pane drifts left going down), reproduced per row from measurements. import React from "react"; import { interpolate, useCurrentFrame } from "remotion"; import { MONO } from "./fonts"; import { blurIn, clamp, inter } from "./ui"; export type ReviewDiffCopy = { eyebrow: string; title: string; body: [string, string] }; // Token: [text, kind]. kinds: p plain, c comment, n name, t tag, x punctuation, h highlighted word. type Tok = [string, "p" | "c" | "n" | "t" | "x" | "h"]; type Line = { num: string; indent: number; toks: Tok[]; band?: boolean }; const COLORS = { p: "#6e7076", c: "#6e7474", n: "#8584d6", t: "#7a7ad0", x: "#74767a", h: "#ffffff" }; const before: Line[] = [ { num: "01", indent: 0, toks: [["/**", "c"]] }, { num: "02", indent: 1, band: true, toks: [["* A ", "c"], ["slow", "h"], [" and ", "c"], ["fragmented", "h"], [" code review", "c"]] }, { num: "", indent: 0, band: true, toks: [["experience.", "c"]] }, { num: "03", indent: 1, toks: [["*/", "c"]] }, { num: "04", indent: 0, toks: [["export const ", "p"], ["CodeReview", "n"], [" = () => {", "x"]] }, { num: "05", indent: 2, toks: [["<", "x"], ["Diff.Provider", "t"], [">", "x"]] }, { num: "06", indent: 4, band: true, toks: [["<", "x"], ["Slow", "h"], [" />", "x"]] }, { num: "07", indent: 4, band: true, toks: [["<", "x"], ["Fragmented", "h"], [" />", "x"]] }, { num: "08", indent: 4, toks: [["<", "x"], ["Confusing", "t"], [" />", "x"]] }, { num: "09", indent: 2, toks: [["</", "x"], ["Diff.Provider", "t"], [">", "x"]] }, { num: "10", indent: 0, toks: [["};", "x"]] }, { num: "11", indent: 0, toks: [] }, ]; const after: Line[] = [ { num: "01", indent: 0, toks: [["/**", "c"]] }, { num: "02", indent: 1, band: true, toks: [["* A ", "c"], ["fast", "h"], [" and ", "c"], ["connected", "h"], [" code review", "c"]] }, { num: "", indent: 0, band: true, toks: [["experience ", "c"], ["for humans and agents alike.", "h"]] }, { num: "03", indent: 1, toks: [["*/", "c"]] }, { num: "04", indent: 0, toks: [["export const ", "p"], ["CodeReview", "n"], [" = () => {", "x"]] }, { num: "05", indent: 2, toks: [["<", "x"], ["Diff.Provider", "t"], [">", "x"]] }, { num: "06", indent: 4, band: true, toks: [["<", "x"], ["Performant", "h"], [" />", "x"]] }, { num: "07", indent: 4, band: true, toks: [["<", "x"], ["Integrated", "h"], [" />", "x"]] }, { num: "08", indent: 4, toks: [["<", "x"], ["Confusing", "t"], [" />", "x"]] }, { num: "09", indent: 2, toks: [["</", "x"], ["Diff.Provider", "t"], [">", "x"]] }, { num: "10", indent: 0, toks: [["};", "x"]] }, { num: "11", indent: 0, toks: [] }, ]; // Per-row baseline y (measured; rows spread out going down) and fade. const ROW_Y = [505, 530, 555, 580, 607, 634, 662, 690, 718, 747, 777, 808]; const ROW_FADE = [1, 1, 1, 1, 1, 1, 1, 1, 0.85, 0.7, 0.45, 0.25]; const CHAR = 10.7; const Pane: React.FC<{ lines: Line[]; numX: number; codeX: number; drift: number; // px per row the pane shifts left going down tone: "red" | "green"; bands: number; words: number; lineBandWidth: number[]; }> = ({ lines, numX, codeX, drift, tone, bands, words, lineBandWidth }) => { const band = tone === "red" ? "#2a1116" : "#14271c"; const word = tone === "red" ? "#4a1a22" : "#235238"; const hText = tone === "red" ? "#d3a7b0" : "#bfe0d2"; return ( <> {lines.map((l, i) => { const dx = -drift * i; const s = 1 + i * 0.012; const y = ROW_Y[i]; const x0 = codeX + dx + l.indent * CHAR; return ( <div key={i} style={{ position: "absolute", left: 0, top: 0, width: 1920, height: 1080, opacity: ROW_FADE[i] }}> {l.band ? ( <div style={{ position: "absolute", left: x0 - 8, top: y - 17, width: lineBandWidth[i], height: 27 * s, backgroundColor: band, opacity: bands, }} /> ) : null} <div style={{ position: "absolute", right: 1920 - (numX + dx), top: y - 13, fontFamily: MONO, fontSize: 17 * s, color: "#535358", fontStyle: "italic", }} > {l.num} </div> <div style={{ position: "absolute", left: x0, top: y - 13, fontFamily: MONO, fontSize: 17 * s, letterSpacing: 0.5, whiteSpace: "pre", display: "flex", }} > {l.toks.map(([t, k], j) => { const isH = k === "h"; return ( <span key={j} style={{ color: isH ? interpolateHex(words, COLORS.c, hText) : COLORS[k], backgroundColor: isH ? `rgba(${hexToRgb(word)},${words})` : undefined, }} > {t} </span> ); })} </div> </div> ); })} </> ); }; const hexToRgb = (h: string) => { const n = parseInt(h.slice(1), 16); return `${(n >> 16) & 255},${(n >> 8) & 255},${n & 255}`; }; const interpolateHex = (t: number, a: string, b: string) => { const pa = hexToRgb(a).split(",").map(Number); const pb = hexToRgb(b).split(",").map(Number); return `rgb(${pa.map((v, i) => Math.round(v + (pb[i] - v) * t)).join(",")})`; }; export const ReviewDiff: React.FC<{ copy: ReviewDiffCopy }> = ({ copy }) => { const frame = useCurrentFrame(); const code = interpolate(frame, [22, 48], [0, 1], clamp); const bands = interpolate(frame, [52, 70], [0, 1], clamp); const words = interpolate(frame, [74, 92], [0, 1], clamp); return ( <div style={{ position: "absolute", inset: 0, backgroundColor: "#060609" }}> <div style={{ position: "absolute", left: 0, right: 0, top: 220, textAlign: "center" }}> <div style={{ ...inter(15, 500, { color: "#838388" }), ...blurIn(frame, 10, 28, 10) }}>{copy.eyebrow}</div> <div style={{ ...inter(74, 510, { color: "#fbfbfd", letterSpacing: "-0.03em", lineHeight: "80px", marginTop: 16 }), ...blurIn(frame, 0, 34, 22), }} > {copy.title} </div> <div style={{ ...inter(20, 400, { color: "#83828b", lineHeight: "31px", marginTop: 26 }), ...blurIn(frame, 12, 30, 14) }}> {copy.body[0]} <br /> {copy.body[1]} </div> </div> <div style={{ position: "absolute", inset: 0, opacity: code, filter: code < 1 ? `blur(${(1 - code) * 6}px)` : undefined, transform: `translateY(${(1 - code) * 10}px)` }}> <Pane lines={before} numX={446} codeX={480} drift={4.2} tone="red" bands={bands} words={words} lineBandWidth={[0, 470, 470, 0, 0, 0, 152, 216, 0, 0, 0, 0]} /> <Pane lines={after} numX={1001} codeX={1035} drift={-0.3} tone="green" bands={bands} words={words} lineBandWidth={[0, 470, 470, 0, 0, 0, 216, 216, 0, 0, 0, 0]} /> </div> </div> ); };›engine/src/product-tour/AgentsHand.tsx
engine/src/product-tour/AgentsHand.tsx // Section 6: "Create your own agents". Title, subtitle and two pill buttons // over a sculpted arm (generated image) reaching in from the right toward a // flock of pointing-hand cursors. The arm sways a little and a small spark // drops from the fingertip. import React from "react"; import { Img, interpolate, staticFile, useCurrentFrame } from "remotion"; import { clamp, inter, PillButton } from "./ui"; export type AgentsHandCopy = { title: string; body: [string, string]; primary: string; secondary: string }; // Cursor centres measured from the reference. const FLOCK: Array<[number, number]> = [ [180, 523], [384, 528], [290, 581], [73, 613], [508, 593], [627, 604], [229, 686], [449, 673], [528, 702], [634, 713], [720, 660], [796, 638], [857, 675], [783, 705], [689, 742], [323, 738], [426, 784], [574, 778], [165, 822], ]; // macOS-style pointing hand (finger up), drawn white with a black outline. const POINTER = "M11 3.5c0-1.1.9-2 2-2s2 .9 2 2V12h.5v-1.5c0-1 .8-1.8 1.8-1.8s1.8.8 1.8 1.8V13h.4v-1.2c0-1 .8-1.7 1.7-1.7s1.7.8 1.7 1.7V14h.3v-.6c0-.9.8-1.6 1.6-1.6s1.6.7 1.6 1.6V21c0 4-2.8 7-6.8 7h-2.5c-2.5 0-4-1-5.3-3L6.4 19.6c-.7-1-.5-2.3.4-3 .9-.6 2.1-.4 2.8.4L11 18.5Z"; export const PointingHand: React.FC<{ x: number; y: number; size?: number; rot?: number }> = ({ x, y, size = 46, rot = 90 }) => ( <svg width={size} height={size} viewBox="0 0 32 32" style={{ position: "absolute", left: x - size / 2, top: y - size / 2, transform: `rotate(${rot}deg)` }} > <path d={POINTER} fill="#fff" stroke="#000" strokeWidth={1.5} strokeLinejoin="round" /> <path d="M15.5 13v5M18.8 13.5v4.5M22 14.5v3.5" stroke="#000" strokeWidth={1.1} strokeLinecap="round" /> </svg> ); export const AgentsHand: React.FC<{ copy: AgentsHandCopy }> = ({ copy }) => { const frame = useCurrentFrame(); const sway = Math.sin((frame / 70) * Math.PI * 2) * 12; const spark = interpolate(frame, [12, 44], [0, 1], clamp); const sparkFade = interpolate(frame, [40, 52], [1, 0], clamp); return ( <div style={{ position: "absolute", inset: 0, backgroundColor: "#060609", overflow: "hidden" }}> {/* page frame */} <div style={{ position: "absolute", left: 10, right: 10, top: 64, bottom: 64, boxShadow: "inset 1px 0 0 #121214, inset -1px 0 0 #121214" }} /> <div style={{ position: "absolute", left: 10, right: 10, top: 0, bottom: 0, overflow: "hidden" }}> <Img src={staticFile("product-tour/images/hand.jpg")} style={{ position: "absolute", left: 571 + sway, top: 184, width: 1500, mixBlendMode: "lighten", // pivot on the fingertip (image px 403,406 of 1344 wide) and raise the arm transformOrigin: "450px 453px", transform: "rotate(-7deg)", }} /> </div> {spark > 0 && sparkFade > 0 ? ( <div style={{ position: "absolute", left: 1010 + sway - spark * 45, top: 632 + spark * 70, width: 9, height: 9, borderRadius: 5, backgroundColor: "#fff", opacity: sparkFade, }} /> ) : null} {FLOCK.map(([x, y], i) => ( <PointingHand key={i} x={x} y={y + Math.sin(frame / 22 + i * 1.7) * 2} /> ))} <div style={{ position: "absolute", left: 0, right: 0, top: 224, display: "flex", flexDirection: "column", alignItems: "center" }}> <div style={inter(53, 510, { color: "#f7f8f8", letterSpacing: "-0.025em", lineHeight: "70px" })}>{copy.title}</div> <div style={inter(19, 400, { color: "#8a8f98", lineHeight: "27px", textAlign: "center", marginTop: 8 })}> {copy.body[0]} <br /> {copy.body[1]} </div> <div style={{ display: "flex", gap: 10, marginTop: 34 }}> <PillButton label={copy.primary} variant="light" height={44} fontSize={17} padX={19} /> <PillButton label={copy.secondary} variant="dark" height={44} fontSize={17} padX={18} /> </div> </div> </div> ); };›engine/src/product-tour/EclipseHero.tsx
engine/src/product-tour/EclipseHero.tsx // Section 7: "Linear for Startups". A site nav on top; a dark planet whose rim // catches the light and brightens; then the title, subtitle and buttons blur // in, and a row of customer logos fades up along the bottom. import React from "react"; import { Img, interpolate, staticFile, useCurrentFrame } from "remotion"; import { blurIn, clamp, inter, PillButton } from "./ui"; export type EclipseHeroCopy = { brand: string; nav: string[]; docs: string; navCta: string; title: string; body: [string, string]; primary: string; secondary: string; }; const CX = 960; const CY = 482; const R = 165; type Logo = { x: number; w: number; src?: string; text?: string; icon?: string; h?: number }; const LOGOS: Logo[] = [ { x: 257, w: 90, text: "OpenAI" }, { x: 445, w: 125, src: "perplexity_wordmark_dark.svg" }, { x: 670, w: 121, src: "replit-wordmark-dark.svg" }, { x: 890, w: 113, src: "cursor_wordmark_dark.svg", icon: "cursor_dark.svg", h: 16 }, { x: 1101, w: 96, text: "ramp" }, { x: 1297, w: 147, src: "supabase_wordmark_dark.svg" }, { x: 1543, w: 120, src: "cohere_wordmark.svg" }, ]; const Eclipse: React.FC<{ light: number }> = ({ light }) => ( <svg width={1920} height={1080} style={{ position: "absolute", inset: 0 }}> <defs> <radialGradient id="ecl-halo" cx={1130} cy={360} r={420} gradientUnits="userSpaceOnUse"> <stop offset="0" stopColor="#ffffff" stopOpacity={0.09} /> <stop offset="0.5" stopColor="#ffffff" stopOpacity={0.035} /> <stop offset="1" stopColor="#ffffff" stopOpacity={0} /> </radialGradient> {/* Lit from the top right: only that arc of the rim catches light. */} <linearGradient id="ecl-rim" x1={CX - R * 0.6} y1={CY + R * 0.8} x2={CX + R * 0.6} y2={CY - R * 0.8} gradientUnits="userSpaceOnUse"> <stop offset="0" stopColor="#fff" stopOpacity={0} /> <stop offset="0.47" stopColor="#fff" stopOpacity={0} /> <stop offset="0.62" stopColor="#fff" stopOpacity={0.35} /> <stop offset="0.85" stopColor="#fff" stopOpacity={0.95} /> <stop offset="1" stopColor="#fff" stopOpacity={1} /> </linearGradient> <radialGradient id="ecl-body" cx={CX + 60} cy={CY - 70} r={R * 1.3} gradientUnits="userSpaceOnUse"> <stop offset="0" stopColor="#1a1a1d" /> <stop offset="1" stopColor="#060609" /> </radialGradient> <filter id="ecl-blur" x="-50%" y="-50%" width="200%" height="200%"> <feGaussianBlur stdDeviation={10} /> </filter> <clipPath id="ecl-clip"> <circle cx={CX} cy={CY} r={R - 2} /> </clipPath> </defs> <rect x={0} y={0} width={1920} height={1080} fill="url(#ecl-halo)" opacity={0.3 + 0.7 * light} /> <circle cx={CX} cy={CY} r={R} fill="url(#ecl-body)" /> {/* Linear mark's stripes inside the planet, lower left */} <g clipPath="url(#ecl-clip)" opacity={0.25 + 0.5 * light} fill="none" stroke="#3a3a3e" strokeWidth={2}> {[0, 1, 2].map((i) => ( <path key={i} d={`M ${CX - 160 + i * 0} ${CY - 70 + i * 34} l 170 170`} strokeWidth={14} stroke="#0d0d10" /> ))} {[0, 1, 2].map((i) => ( <path key={`o${i}`} d={`M ${CX - 166} ${CY - 78 + i * 34} l 178 178`} /> ))} </g> <circle cx={CX} cy={CY} r={R} fill="none" stroke="url(#ecl-rim)" strokeWidth={10} filter="url(#ecl-blur)" opacity={light} /> <circle cx={CX} cy={CY} r={R} fill="none" stroke="url(#ecl-rim)" strokeWidth={2.4} opacity={0.15 + 0.85 * light} /> </svg> ); export const EclipseHero: React.FC<{ copy: EclipseHeroCopy }> = ({ copy }) => { const frame = useCurrentFrame(); const light = interpolate(frame, [0, 70], [0.05, 1], clamp); const logos = interpolate(frame, [118, 136], [0, 1], clamp); const navX = [997, 1076, 1174, 1273, 1347, 1404]; return ( <div style={{ position: "absolute", inset: 0, backgroundColor: "#060609" }}> <div style={{ position: "absolute", left: 10, right: 10, top: 0, bottom: 0, boxShadow: "inset 1px 0 0 #121214, inset -1px 0 0 #121214" }} /> <Eclipse light={light} /> {/* Nav */} <div style={{ position: "absolute", left: 10, right: 10, top: 71, height: 1, backgroundColor: "#161618" }} /> <Img src={staticFile("product-tour/logos/linear.svg")} style={{ position: "absolute", left: 255, top: 19, width: 24, height: 24, filter: "brightness(0) invert(1)" }} /> <div style={{ position: "absolute", left: 289, top: 17, ...inter(22, 560, { color: "#f7f8f8", letterSpacing: "-0.02em" }) }}>{copy.brand}</div> {copy.nav.map((n, i) => ( <div key={n} style={{ position: "absolute", left: navX[i], top: 22, ...inter(15, 400, { color: "#8a8f98" }) }}> {n} </div> ))} <div style={{ position: "absolute", left: 1486, top: 24, width: 1, height: 15, backgroundColor: "#2a2a2e" }} /> <div style={{ position: "absolute", left: 1514, top: 22, ...inter(15, 400, { color: "#8a8f98" }) }}>{copy.docs}</div> <div style={{ position: "absolute", left: 1571, top: 14 }}> <PillButton label={copy.navCta} variant="light" height={35} fontSize={15} padX={14} /> </div> {/* Title block */} <div style={{ position: "absolute", left: 0, right: 0, top: 552, display: "flex", flexDirection: "column", alignItems: "center" }}> <div style={{ ...inter(72.5, 510, { color: "#f7f8f8", letterSpacing: "-0.03em", lineHeight: "86px" }), ...blurIn(frame, 66, 34, 22) }}> {copy.title} </div> <div style={{ ...inter(17.5, 400, { color: "#8a8f98", lineHeight: "27px", textAlign: "center", marginTop: 14 }), ...blurIn(frame, 80, 30, 14) }}> {copy.body[0]} <br /> {copy.body[1]} </div> <div style={{ display: "flex", gap: 14, marginTop: 36, ...blurIn(frame, 88, 30, 14) }}> <PillButton label={copy.primary} variant="light" height={43} fontSize={15} padX={16} /> <PillButton label={copy.secondary} variant="dark" height={43} fontSize={15} padX={15} /> </div> </div> {/* Logos */} {LOGOS.map((l, i) => ( <div key={i} style={{ position: "absolute", left: l.x, top: 998, width: l.w, height: 34, display: "flex", alignItems: "center", opacity: logos, filter: logos < 1 ? `blur(${(1 - logos) * 6}px)` : undefined, }} > {l.src ? ( <div style={{ display: "flex", alignItems: "center", gap: 6, filter: "brightness(0) invert(0.97)" }}> {l.icon ? <Img src={staticFile(`product-tour/logos/${l.icon}`)} style={{ height: 23 }} /> : null} <Img src={staticFile(`product-tour/logos/${l.src}`)} style={l.h ? { height: l.h } : { width: l.w, maxHeight: 34, objectFit: "contain" }} /> </div> ) : l.text === "OpenAI" ? ( <div style={inter(27, 600, { color: "#f7f8f8", letterSpacing: "-0.02em" })}>{l.text}</div> ) : ( <div style={{ display: "flex", alignItems: "center", gap: 8, ...inter(27, 560, { color: "#f7f8f8", letterSpacing: "-0.02em" }) }}> {l.text} <svg width={24} height={20} viewBox="0 0 24 20"> <path d="M3 17 C 9 16, 14 12, 17 3 M17 3 L 21 9" stroke="#f7f8f8" strokeWidth={2.6} fill="none" strokeLinecap="round" /> </svg> </div> )} </div> ))} </div> ); };›engine/src/product-tour/StartCoding.tsx
engine/src/product-tour/StartCoding.tsx // Section 8: "Start a coding session today". Big two-line headline and two // pill buttons over a dome of dim dots; the cursor wanders below, lighting a // trail of dots (shared DotTrail, path tracked from the reference). import React from "react"; import { useCurrentFrame } from "remotion"; import { Cursor } from "./PixelField"; import { CODING_CURSOR_PATH } from "./codingCursorPath"; import { cursorOnPath, DotTrail, settlePath, smoothstep } from "./DotTrail"; const PATH = settlePath(CODING_CURSOR_PATH, 24); import { inter, PillButton } from "./ui"; export type StartCodingCopy = { headline: [string, string]; primary: string; secondary: string }; // Elliptical dome centred low on the frame. const domeMask = (x: number, y: number) => { const d = Math.hypot((x - 960) / 600, (y - 1060) / 480); return (1 - smoothstep(0.6, 1, d)) * smoothstep(600, 720, y); }; export const StartCoding: React.FC<{ copy: StartCodingCopy }> = ({ copy }) => { const frame = useCurrentFrame(); const [cx, cy] = cursorOnPath(PATH, frame); return ( <div style={{ position: "absolute", inset: 0 }}> <DotTrail path={PATH} spacing={13.1} dot={4.5} mask={domeMask} bg="#060609" base={7} ambientGain={26} glowGain={70} radius={60} seed="code" /> <div style={{ position: "absolute", left: 0, right: 0, top: 344, display: "flex", flexDirection: "column", alignItems: "center" }}> <div style={{ ...inter(119, 510, { letterSpacing: "-0.035em", lineHeight: "116px", textAlign: "center" }), backgroundImage: "linear-gradient(170deg, #ffffff 30%, #d5d6d9 100%)", WebkitBackgroundClip: "text", backgroundClip: "text", color: "transparent", }} > {copy.headline[0]} <br /> {copy.headline[1]} </div> <div style={{ display: "flex", gap: 21, marginTop: 66 }}> <PillButton label={copy.primary} variant="light" height={69} fontSize={26} padX={33} /> <PillButton label={copy.secondary} variant="dark" height={69} fontSize={26} padX={31} /> </div> </div> <Cursor x={cx} y={cy} scale={0.95} color="white" /> </div> ); };›engine/src/product-tour/codingCursorPath.ts
engine/src/product-tour/codingCursorPath.ts // Cursor tip per frame for section 8 (start a coding session), tracked from the // reference (60fps, frames 1115-1245), in 1920x1080 output pixels. export const CODING_CURSOR_PATH: ReadonlyArray<readonly [number, number]> = [ [981.0, 790.0], [981.0, 790.0], [981.0, 790.0], [981.0, 790.0], [981.0, 790.0], [981.0, 790.0], [981.0, 790.0], [981.0, 790.0], [981.0, 790.0], [981.0, 790.0], [981.0, 790.0], [981.0, 790.0], [981.0, 790.0], [981.0, 790.0], [984.0, 795.0], [995.0, 806.0], [1006.0, 819.0], [1021.0, 834.0], [1037.0, 850.0], [1053.0, 866.0], [1069.0, 880.0], [1079.0, 888.0], [1087.0, 895.0], [1087.0, 895.0], [1095.0, 901.0], [1098.0, 904.0], [1100.0, 906.0], [1101.0, 907.0], [1103.0, 909.0], [1104.0, 911.0], [1104.0, 912.0], [1104.0, 915.0], [1104.0, 920.0], [1104.0, 928.0], [1104.0, 936.0], [1104.0, 938.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1104.0, 939.0], [1109.0, 944.0], [1119.0, 954.0], [1128.0, 960.0], [1143.0, 973.0], [1153.0, 980.0], [1164.0, 986.0], [1172.0, 992.0], [1180.0, 996.0], [1185.0, 999.0], [1191.0, 1002.0], [1197.0, 1004.0], [1201.0, 1005.0], [1204.0, 1007.0], [1206.0, 1008.0], [1209.0, 1008.0], [1210.0, 1010.0], [1214.0, 1012.0], [1215.0, 1011.0], [1217.0, 1013.0], [1217.0, 1013.0], [1217.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1218.0, 1013.0], [1222.0, 1007.0], [1228.0, 997.0], [1236.0, 988.0], [1244.0, 970.0], [1258.0, 944.0], [1265.0, 931.0], [1271.0, 919.0], [1278.0, 911.0], [1286.0, 898.0], [1291.0, 890.0], [1295.0, 882.0], [1300.0, 874.0], [1303.0, 867.0], [1307.0, 863.0], [1310.0, 859.0], [1311.0, 855.0], [1315.0, 851.0], ];›engine/src/product-tour/AppEditor.tsx
engine/src/product-tour/AppEditor.tsx // Section 9: app UI close-up. An issue list on the left, a diff editor with // changed lines on top of it, and a theme dropdown the cursor runs down // (hovered option highlights as it passes). Footer feature links below. import React from "react"; import { interpolate, useCurrentFrame } from "remotion"; import { MONO } from "./fonts"; import { Cursor } from "./PixelField"; import { inter } from "./ui"; export type AppEditorCopy = { groups: Array<{ name: string; tone: "review" | "progress" | "todo"; rows: Array<[string, string]> }>; path: string; theme: string; themes: string[]; features: string; links: [string[], string[]]; }; type Tok = [string, "k" | "p" | "s" | "f" | "a"]; const C = { k: "#9a9ca3", p: "#d0d1d4", s: "#d6b97c", f: "#8fcfa6", a: "#8ab4d8" }; const CODE: Tok[][] = [ [["import ", "k"], ["React ", "p"], ["from ", "k"], ["'react'", "s"]], [["import ", "k"], ["{ View, ActivityIndicator } ", "p"], ["from ", "k"], ["'react-native'", "s"]], [["import ", "k"], ["{ useVehicleState } ", "p"], ["from ", "k"], ["'@hooks/useVehicleState'", "s"]], [["import ", "k"], ["{ Dashboard } ", "p"], ["from ", "k"], ["'@components/Dashboard'", "s"]], [], [["export const ", "k"], ["HomeScreen", "f"], [" = () => {", "p"]], [[" const ", "k"], ["{ vehicleState, isFullySynced } = ", "p"], ["useVehicleState", "f"], ["()", "p"]], [], [[" if ", "k"], ["(!isFullySynced) {", "p"]], [[" return ", "k"], ["<", "p"], ["ActivityIndicator ", "f"], ["size", "a"], ["=", "p"], ['"large"', "s"], [" />", "p"]], [[" }", "p"]], [], [[" return ", "k"], ["(", "p"]], [[" <", "p"], ["View", "f"], [">", "p"]], [[" <", "p"], ["Dashboard ", "f"], ["state", "a"], ["={vehicleState} />", "p"]], [[" </", "p"], ["View", "f"], [">", "p"]], [[" )", "p"]], [["}", "p"]], ]; const CHANGED = new Set([2, 6, 8, 14]); const ROW0 = 249; const ROW_H = 28.6; // Cursor tip keyframes (local frame -> x, y), traced from the reference. const CURSOR_KEYS: Array<[number, number, number]> = [ [0, 1640, 90], [10, 1630, 110], [20, 1620, 126], [30, 1596, 240], [40, 1581, 294], [50, 1569, 345], [60, 1554, 394], [70, 1557, 430], [80, 1551, 472], [92, 1551, 490], [104, 1551, 495], ]; const OPT0 = 209; const OPT_H = 38; const StatusIcon: React.FC<{ tone: "review" | "progress" | "todo"; size?: number }> = ({ tone, size = 17 }) => { if (tone === "todo") return <div style={{ width: size - 2, height: size - 2, borderRadius: size, border: "1.6px solid #8a8f98" }} />; const color = tone === "review" ? "#3fbf5a" : "#e2b93b"; return ( <svg width={size} height={size} viewBox="0 0 16 16"> <circle cx={8} cy={8} r={6.6} fill="none" stroke={color} strokeWidth={1.6} /> {tone === "review" ? <path d="M5 8.2l2 2 4-4.2" fill="none" stroke={color} strokeWidth={1.6} /> : <path d="M8 4a4 4 0 0 1 0 8Z" fill={color} />} </svg> ); }; const Bars: React.FC<{ dim?: boolean }> = ({ dim }) => dim ? ( <div style={{ width: 16, color: "#55575c", ...inter(14, 400) }}>···</div> ) : ( <svg width={16} height={16} viewBox="0 0 16 16"> {[0, 1, 2].map((i) => ( <rect key={i} x={1 + i * 5} y={10 - i * 4} width={3} height={5 + i * 4} rx={0.8} fill="#8a8f98" /> ))} </svg> ); export const AppEditor: React.FC<{ copy: AppEditorCopy }> = ({ copy }) => { const frame = useCurrentFrame(); const ks = CURSOR_KEYS.map((k) => k[0]); const cx = interpolate(frame, ks, CURSOR_KEYS.map((k) => k[1]), { extrapolateRight: "clamp" }); const cy = interpolate(frame, ks, CURSOR_KEYS.map((k) => k[2]), { extrapolateRight: "clamp" }); const hover = Math.round((cy - OPT0) / OPT_H); let y = 194; const listRows: React.ReactNode[] = []; copy.groups.forEach((g, gi) => { listRows.push( <div key={`g${gi}`} style={{ position: "absolute", left: 186, top: y - 12, display: "flex", alignItems: "center", gap: 10, ...inter(16, 500, { color: "#e2e3e6" }) }}> <span style={{ color: "#6b6d72", fontSize: 10, width: 14 }}>▼</span> <StatusIcon tone={g.tone} /> {g.name} <span style={{ color: "#8a8f98", fontWeight: 400 }}>{g.rows.length}</span> </div>, ); y += 45; g.rows.forEach(([id, title], ri) => { const fade = interpolate(y, [640, 810], [1, 0.12], { extrapolateLeft: "clamp", extrapolateRight: "clamp" }); listRows.push( <div key={`r${gi}-${ri}`} style={{ position: "absolute", left: 213, top: y - 12, display: "flex", alignItems: "center", gap: 10, opacity: fade, whiteSpace: "nowrap", ...inter(16, 400) }}> <Bars dim={ri === g.rows.length - 1 && gi < 2} /> <span style={{ color: "#8a8f98", width: 94 }}>{id}</span> <StatusIcon tone={g.tone} /> <span style={{ color: "#e2e3e6", fontWeight: 500 }}>{title}</span> </div>, ); y += 47.5; }); }); return ( <div style={{ position: "absolute", inset: 0, backgroundColor: "#060609", overflow: "hidden" }}> {/* Issue list panel */} <div style={{ position: "absolute", left: 160, top: 160, width: 600, height: 680, borderRadius: 14, background: "linear-gradient(180deg, #0f0f11 60%, #060609 100%)", boxShadow: "inset 0 0 0 1px #18181b" }} /> <div style={{ position: "absolute", left: 160, top: 160, width: 523, height: 680, overflow: "hidden", opacity: 0.85 }}> <div style={{ position: "absolute", left: -160, top: -160, width: 1920, height: 1080 }}>{listRows}</div> </div> {/* Editor */} <div style={{ position: "absolute", left: 683, top: 125, width: 1047, height: 665, borderRadius: 12, background: "linear-gradient(180deg, #0d0d0f 0%, #0a0a0c 100%)", boxShadow: "inset 0 0 0 1px #18181b, -30px 0 60px rgba(0,0,0,0.6)", overflow: "hidden", }} > <div style={{ position: "absolute", left: 0, right: 0, top: 70, height: 1, backgroundColor: "#18181b" }} /> <div style={{ position: "absolute", left: 666, top: 72, bottom: 0, width: 1, backgroundColor: "#1a1a1d" }} /> </div> <svg width={20} height={22} viewBox="0 0 20 22" style={{ position: "absolute", left: 721, top: 150 }}> <path d="M3 2h9l5 5v13H3Z" fill="none" stroke="#8a8f98" strokeWidth={1.6} strokeLinejoin="round" /> <path d="M12 2v5h5" fill="none" stroke="#8a8f98" strokeWidth={1.6} /> </svg> <div style={{ position: "absolute", left: 778, top: 150, fontFamily: MONO, fontSize: 17, letterSpacing: 0.6, color: "#6e7076" }}>{copy.path}</div> <div style={{ position: "absolute", left: 1626, top: 150, ...inter(16, 400, { color: "#8a8f98" }) }}>{copy.theme} ⌃</div> {/* Code, left (before) and right (after) */} {CODE.map((toks, i) => { const yy = ROW0 + i * ROW_H; const ch = CHANGED.has(i); const fade = interpolate(i, [12, 17], [1, 0.45], { extrapolateLeft: "clamp", extrapolateRight: "clamp" }); return ( <React.Fragment key={i}> {ch ? ( <div style={{ position: "absolute", left: 684, top: yy - 14, width: 665, height: 28, backgroundColor: "#22101a", borderLeft: "2px solid #c9364d" }} /> ) : null} <div style={{ position: "absolute", left: 1348, top: yy - 14, width: 2, height: 28, backgroundColor: ch ? "#2f8a55" : "transparent" }} /> {[ { nx: 742, cx: 759, op: fade }, { nx: 1408, cx: 1425, op: fade * 0.55 }, ].map((p, pi) => ( <React.Fragment key={pi}> <div style={{ position: "absolute", right: 1920 - p.nx, top: yy - 12, fontFamily: MONO, fontSize: 17, color: ch ? (pi === 0 ? "#e5484d" : "#4cc36b") : "#55575c", opacity: p.op, }} > {String(i + 1).padStart(2, "0")} </div> <div style={{ position: "absolute", left: p.cx, top: yy - 12, fontFamily: MONO, fontSize: 17.5, whiteSpace: "pre", opacity: p.op * (pi === 0 && ch && i === 14 ? 0.6 : 1) }}> {toks.map(([t, k], j) => ( <span key={j} style={{ color: C[k] }}> {t} </span> ))} </div> </React.Fragment> ))} </React.Fragment> ); })} {/* right-hand side of the editor fades out */} <div style={{ position: "absolute", left: 1383, top: 197, width: 347, height: 593, background: "linear-gradient(90deg, rgba(10,10,12,0.15) 0%, rgba(10,10,12,0.88) 40%)" }} /> {/* Theme dropdown */} <div style={{ position: "absolute", left: 1522, top: 186, width: 188, height: 312, borderRadius: 9, backgroundColor: "#151517", boxShadow: "inset 0 0 0 1px #26262a, 0 12px 30px rgba(0,0,0,0.5)" }} /> {copy.themes.map((t, i) => ( <React.Fragment key={t}> {hover === i ? <div style={{ position: "absolute", left: 1528, top: OPT0 + i * OPT_H - 18, width: 176, height: 36, borderRadius: 6, backgroundColor: "#232326" }} /> : null} <div style={{ position: "absolute", left: 1538, top: OPT0 + i * OPT_H - 11, ...inter(16, 400, { color: "#e2e3e6" }) }}>{t}</div> {i === 0 ? <div style={{ position: "absolute", left: 1676, top: OPT0 - 12, ...inter(15, 500, { color: "#e2e3e6" }) }}>✓</div> : null} </React.Fragment> ))} {/* Footer */} <div style={{ position: "absolute", left: 188, top: 876, ...inter(18, 400, { color: "#8a8f98" }) }}>{copy.features}</div> <div style={{ position: "absolute", left: 1349, top: 872, width: 1, height: 98, backgroundColor: "#1a1a1d" }} /> {copy.links.map((col, ci) => col.map((l, li) => ( <div key={`${ci}-${li}`} style={{ position: "absolute", left: ci === 0 ? 987 : 1387, top: 876 + li * 33.5, ...inter(18, 400, { color: "#a3a5ab" }) }}> {l} <span style={{ color: "#6b6d72", marginLeft: 6 }}>+</span> </div> )), )} <Cursor x={cx} y={cy} scale={0.9} color="white" /> </div> ); };›engine/src/product-tour/MeetingNotes.tsx
engine/src/product-tour/MeetingNotes.tsx // Section 10: a doc panel ("Meeting notes") beside a list of features. It // opens on an inline comment thread; then the cursor moves to "Text-to-issue // commands", the comment closes and the bullet list turns into issue chips // one by one. import React from "react"; import { Easing, interpolate, useCurrentFrame } from "remotion"; import { MONO } from "./fonts"; import { Cursor } from "./PixelField"; import { blurIn, clamp, inter } from "./ui"; export type MeetingNotesCopy = { features: Array<[string, string, string]>; crumbs: [string, string]; title: string; meta: string; body: [string, string, string, string]; highlight: string; actions: string; items: Array<[string, string]>; closing: [string, string]; comment: { author: string; when: string; text: [string, string]; reply: string }; }; const FEAT_Y = [320, 451, 581, 712]; const Mono: React.FC<{ y: number; color: string; children: React.ReactNode }> = ({ y, color, children }) => ( <div style={{ position: "absolute", left: 397, top: y - 10, fontFamily: MONO, fontSize: 12.6, letterSpacing: 0.4, color, whiteSpace: "nowrap" }}>{children}</div> ); export const MeetingNotes: React.FC<{ copy: MeetingNotesCopy }> = ({ copy }) => { const LEAD = 30; // comment pops in and is read before the cursor moves on const raw = useCurrentFrame(); const frame = raw - LEAD; const popIn = interpolate(raw, [4, 16], [0, 1], { ...clamp, easing: Easing.out(Easing.cubic) }); const swap = interpolate(frame, [30, 40], [0, 1], clamp); // comment -> issues const cx = interpolate(frame, [0, 14], [485, 524], clamp); const cy = interpolate(frame, [0, 14], [546, 626], clamp); const hlY = interpolate(frame, [26, 36], [FEAT_Y[1] - 32, FEAT_Y[2] - 32], clamp); const [l1, l2, l3, l4] = copy.body; const hi = l3.indexOf(copy.highlight); return ( <div style={{ position: "absolute", inset: 0, backgroundColor: "#060609" }}> <div style={{ position: "absolute", left: 247, top: 95, width: 1428, height: 890, backgroundColor: "#0f0f11" }} /> {/* Features */} <div style={{ position: "absolute", left: 362, top: hlY, width: 383, height: 112, borderRadius: 10, backgroundColor: "#151517" }} /> {copy.features.map(([h, a, b], i) => ( <React.Fragment key={h}> <Mono y={FEAT_Y[i]} color="#e2e3e6"> {h} </Mono> <Mono y={FEAT_Y[i] + 26} color="#8a8f98"> {a} </Mono> <Mono y={FEAT_Y[i] + 47} color="#8a8f98"> {b} </Mono> </React.Fragment> ))} {/* Doc card */} <div style={{ position: "absolute", left: 841, top: 155, width: 718, height: 770, borderRadius: 14, boxShadow: "inset 0 0 0 1.5px #1d1d20" }} /> <div style={{ position: "absolute", left: 842, top: 215, width: 716, height: 1, backgroundColor: "#1d1d20" }} /> <div style={{ position: "absolute", left: 880, top: 175, display: "flex", alignItems: "center", gap: 10, ...inter(15, 400, { color: "#8a8f98" }) }}> <span style={{ fontSize: 15 }}>✕</span> {copy.crumbs[0]} <span style={{ color: "#55575c" }}>›</span> {copy.crumbs[1]} <span>☆</span> <span>···</span> </div> <div style={{ position: "absolute", left: 1486, top: 175, ...inter(15, 400, { color: "#8a8f98" }) }}>🔔︎ 🔗︎</div> <div style={{ position: "absolute", left: 915, top: 268, width: 42, height: 42, borderRadius: 8, boxShadow: "inset 0 0 0 1px #26262a", display: "flex", alignItems: "center", justifyContent: "center" }}> <svg width={20} height={20} viewBox="0 0 20 20"> <rect x={2.5} y={2.5} width={15} height={15} rx={3} fill="none" stroke="#e2e3e6" strokeWidth={1.6} /> <path d="M6 7.5h8M6 10.5h8M6 13.5h5" stroke="#e2e3e6" strokeWidth={1.6} /> </svg> </div> <div style={{ position: "absolute", left: 915, top: 344, ...inter(22, 600, { color: "#e2e3e6", letterSpacing: "-0.01em" }) }}>{copy.title}</div> <div style={{ position: "absolute", left: 915, top: 410, ...inter(17, 400, { color: "#a3a5ab" }) }}>{copy.meta}</div> <div style={{ position: "absolute", left: 915, top: 456, ...inter(16.2, 400, { color: "#80838b", lineHeight: "25.7px", whiteSpace: "pre" }) }}> {l1} <br /> {l2} <br /> {hi >= 0 ? ( <> {l3.slice(0, hi)} <span style={{ backgroundColor: `rgba(214,185,80,${0.22 * (1 - swap) * popIn})`, color: swap < 1 ? "#d9c58a" : undefined }}>{copy.highlight}</span> {l3.slice(hi + copy.highlight.length)} </> ) : ( l3 )} <br /> {l4} </div> <div style={{ position: "absolute", left: 915, top: 581, ...inter(17, 600, { color: "#a3a5ab" }) }}>{copy.actions}</div> {/* Bullets (before) */} <div style={{ position: "absolute", left: 921, top: 627, opacity: 1 - swap, ...inter(16, 400, { color: "#a3a5ab", lineHeight: "28px" }) }}> {copy.items.map(([, t]) => ( <div key={t}>• {t}</div> ))} </div> {/* Issue chips (after) */} {copy.items.map(([id, t], i) => ( <div key={id} style={{ position: "absolute", left: 915, top: 626 + i * 36.5, height: 32, padding: "0 14px 0 8px", display: "flex", alignItems: "center", gap: 8, borderRadius: 6, backgroundColor: "#151517", boxShadow: "inset 0 0 0 1px #232326", whiteSpace: "nowrap", ...inter(15, 500, { color: "#e2e3e6" }), ...blurIn(frame, 40 + i * 6, 14, 8), }} > {i < 2 ? ( <svg width={18} height={18} viewBox="0 0 18 18"> <circle cx={9} cy={9} r={7} fill="none" stroke="#8a8f98" strokeWidth={1.6} strokeDasharray="2.2 2.2" /> </svg> ) : ( <svg width={18} height={18} viewBox="0 0 16 16"> <circle cx={8} cy={8} r={6.6} fill="none" stroke="#e2b93b" strokeWidth={1.6} /> <path d="M8 4a4 4 0 0 1 0 8Z" fill="#e2b93b" /> </svg> )} <span style={{ color: "#8a8f98", fontWeight: 400 }}>{id}</span> {t} </div> ))} <div style={{ position: "absolute", left: 915, top: 753, ...inter(16.2, 400, { color: "#80838b", lineHeight: "25.7px" }) }}> {copy.closing[0]} <br /> {copy.closing[1]} </div> {/* Comment popover */} {swap < 1 ? ( <div style={{ position: "absolute", left: 960, top: 545, width: 330, borderRadius: 10, backgroundColor: "#1a1a1d", boxShadow: "inset 0 0 0 1px #2a2a2e, 0 16px 40px rgba(0,0,0,0.55)", padding: "12px 14px", opacity: (1 - swap) * popIn, transform: `translateY(${(1 - popIn) * 8}px) scale(${0.97 + 0.03 * popIn})`, }} > <div style={{ display: "flex", alignItems: "center", gap: 8, ...inter(14, 500, { color: "#e2e3e6" }) }}> <div style={{ width: 18, height: 18, borderRadius: 9, background: "linear-gradient(135deg,#c9a27c,#7a5a40)" }} /> {copy.comment.author} <span style={{ color: "#6b6d72", fontWeight: 400 }}>{copy.comment.when}</span> <span style={{ marginLeft: "auto", color: "#8a8f98" }}>✓ ☺ ···</span> </div> <div style={{ marginTop: 10, ...inter(14.5, 400, { color: "#d0d1d4", lineHeight: "22px" }) }}> {copy.comment.text[0]} <br /> {copy.comment.text[1]} </div> <div style={{ marginTop: 10, display: "flex", alignItems: "center", gap: 8, ...inter(13.5, 400, { color: "#6b6d72" }) }}> <div style={{ width: 16, height: 16, borderRadius: 8, background: "linear-gradient(135deg,#8a8f98,#4a4d52)" }} /> {copy.comment.reply} <span style={{ marginLeft: "auto" }}>↑</span> </div> </div> ) : null} <Cursor x={cx} y={cy} scale={0.9} color="white" /> </div> ); };›engine/src/product-tour/Changelog.tsx
engine/src/product-tour/Changelog.tsx // Section 11: "Changelog". A big title over a horizontal timeline; the latest // entry's orange dot pulses, the next entry runs off the right edge. import React from "react"; import { useCurrentFrame } from "remotion"; import { MONO } from "./fonts"; import { inter } from "./ui"; export type ChangelogCopy = { title: string; entries: Array<{ title: string; body: [string, string, string]; date: string }>; }; const ENTRY_X = [945, 1619]; export const Changelog: React.FC<{ copy: ChangelogCopy }> = ({ copy }) => { const frame = useCurrentFrame(); const pulse = 0.5 + 0.5 * Math.sin((frame / 50) * Math.PI * 2); return ( <div style={{ position: "absolute", inset: 0, backgroundColor: "#060609", overflow: "hidden" }}> <div style={{ position: "absolute", left: 938, top: 232, ...inter(100, 510, { color: "#f7f8f8", letterSpacing: "-0.035em", lineHeight: "120px" }) }}> {copy.title} </div> <div style={{ position: "absolute", left: 430, right: 0, top: 517, height: 1.5, background: "linear-gradient(90deg, rgba(36,36,40,0) 0%, #242428 25%)" }} /> {/* dots */} <div style={{ position: "absolute", left: 952 - 21, top: 517 - 21, width: 42, height: 42, borderRadius: 21, backgroundColor: `rgba(240,90,40,${0.14 + 0.1 * pulse})`, boxShadow: `0 0 ${10 + 10 * pulse}px rgba(240,90,40,${0.15 + 0.15 * pulse})` }} /> <div style={{ position: "absolute", left: 952 - 8, top: 517 - 8, width: 16, height: 16, borderRadius: 8, backgroundColor: "#f0603a" }} /> <div style={{ position: "absolute", left: 1627 - 21, top: 517 - 21, width: 42, height: 42, borderRadius: 21, backgroundColor: "#18181b" }} /> <div style={{ position: "absolute", left: 1627 - 8, top: 517 - 8, width: 16, height: 16, borderRadius: 8, backgroundColor: "#6b6b70" }} /> {copy.entries.map((e, i) => ( <div key={e.title} style={{ position: "absolute", left: ENTRY_X[i], top: 652, whiteSpace: "nowrap" }}> <div style={inter(30.5, 500, { color: "#e2e3e6", letterSpacing: "-0.005em" })}>{e.title}</div> <div style={{ marginTop: 22, ...inter(30.8, 400, { color: "#8a8f98", lineHeight: "49px" }) }}> {e.body[0]} <br /> {e.body[1]} <br /> {e.body[2]} </div> <div style={{ marginTop: 40, fontFamily: MONO, fontSize: 21, letterSpacing: 2.4, color: "#55575c" }}>{e.date}</div> </div> ))} </div> ); };›engine/src/product-tour/ChangeBetter.tsx
engine/src/product-tour/ChangeBetter.tsx // Section 12: "Change for the better" on a light page. Vintage computers // (generated images) swap every ~13 frames with a quick RGB-split cross-fade // and faint scanlines, under a bold title. import React from "react"; import { Img, staticFile, useCurrentFrame } from "remotion"; import { PointingHand } from "./AgentsHand"; import { inter } from "./ui"; export type ChangeBetterCopy = { title: string; body: [string, string] }; const BG = "#efefef"; // Order seen in the reference: terminal, compact, mainframe desk, workstation. const ORDER = [2, 3, 1, 4]; const STEP = 13.3; // frames per computer const FADE = 7; // cross-fade length const OFFSET = -FADE; // opens just as a computer has settled const IMG_W = 950; const IMG_X = (1920 - IMG_W) / 2; const IMG_Y = 432; // Chromatic split that keeps white white: one layer carries only the red // channel (G, B forced to 1), the other only green + blue (R forced to 1); // multiplied together they rebuild the image, and offsetting them splits it. const SplitFilters: React.FC = () => ( <svg width={0} height={0} style={{ position: "absolute" }}> <filter id="cb-red" colorInterpolationFilters="sRGB"> <feColorMatrix type="matrix" values="1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0" /> </filter> <filter id="cb-cyan" colorInterpolationFilters="sRGB"> <feColorMatrix type="matrix" values="0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0" /> </filter> </svg> ); const Computer: React.FC<{ n: number; opacity: number; split: number }> = ({ n, opacity, split }) => { if (opacity <= 0) return null; const src = staticFile(`product-tour/images/computer${n}.jpg`); const mask = "radial-gradient(ellipse 50% 50% at 50% 50%, #000 72%, rgba(0,0,0,0) 100%)"; const base: React.CSSProperties = { position: "absolute", top: IMG_Y, width: IMG_W, mixBlendMode: "multiply", opacity, WebkitMaskImage: mask, maskImage: mask }; return ( <> <Img src={src} style={{ ...base, left: IMG_X + 8 * split, filter: "url(#cb-red)" }} /> <Img src={src} style={{ ...base, left: IMG_X - 8 * split, filter: "url(#cb-cyan)" }} /> </> ); }; export const ChangeBetter: React.FC<{ copy: ChangeBetterCopy }> = ({ copy }) => { const frame = useCurrentFrame(); const t = (frame - OFFSET) / STEP; const i = Math.floor(t); const into = (t - i) * STEP; // frames since this computer started const mix = Math.min(1, into / FADE); // 0 -> 1 while fading in const cur = ORDER[((i % ORDER.length) + ORDER.length) % ORDER.length]; const prev = ORDER[(((i - 1) % ORDER.length) + ORDER.length) % ORDER.length]; const split = mix < 1 ? Math.sin(mix * Math.PI) : 0; return ( <div style={{ position: "absolute", inset: 0, backgroundColor: BG, overflow: "hidden" }}> <SplitFilters /> <div style={{ position: "absolute", left: 0, right: 0, top: 70, textAlign: "center", ...inter(102, 700, { color: "#101012", letterSpacing: "-0.035em", lineHeight: "120px" }) }}> {copy.title} </div> <div style={{ position: "absolute", left: 0, right: 0, top: 205, textAlign: "center", ...inter(21, 400, { color: "#28282b", lineHeight: "33px" }) }}> {copy.body[0]} <br /> {copy.body[1]} </div> <Computer n={prev} opacity={1 - mix} split={split} /> <Computer n={cur} opacity={mix} split={split} /> {/* scanlines over the image area */} <div style={{ position: "absolute", left: IMG_X, top: IMG_Y, width: IMG_W, height: 543, backgroundImage: "repeating-linear-gradient(0deg, rgba(255,255,255,0.12) 0px, rgba(255,255,255,0.12) 1px, rgba(0,0,0,0) 1px, rgba(0,0,0,0) 3px)", opacity: 0.4 + 0.6 * split, }} /> <PointingHand x={890} y={800} size={30} rot={0} /> </div> ); };›engine/src/product-tour/ThinkDiff.tsx
engine/src/product-tour/ThinkDiff.tsx // Section 13: "Think diff." in a big serif. A frosted phone rises through the // middle of the word (blurring what's behind it), its diff screen fades in, // then the caption, body and button blur in below. import React from "react"; import { Easing, interpolate, useCurrentFrame } from "remotion"; import { MONO, SERIF } from "./fonts"; import { blurIn, clamp, inter, PillButton } from "./ui"; export type ThinkDiffCopy = { word: string; repo: string; title: string; tabs: [string, string, string]; added: string; removed: string; file: string; filePath: string; fileAdded: string; caption: string; body: [string, string]; cta: string; }; type Tok = [string, "k" | "p" | "r"]; const CODE: Tok[][] = [ [ ["import ", "k"], ["LinearSymbols", "p"], ], [ ["import ", "k"], ["SwiftUI", "p"], ], [], [ ["extension ", "k"], ["AnyTransition {", "p"], ], [ [" static var ", "k"], ["btnTransition: ", "p"], ["Self", "k"], [" {", "p"], ], [[" .modifier(", "p"]], [ [" active: ", "p"], ["btnTransitionModifier", "r"], ["(isId:", "p"], ], [ [" identity: ", "p"], ["btnTransitionModifier", "r"], ["(isId", "p"], ], [[" )", "p"]], [[" }", "p"]], [["}", "p"]], [], ]; const C = { k: "#c25a6a", p: "#c8cacd", r: "#a8485a" }; const PHONE_X = 722; const PHONE_W = 476; const Word: React.FC<{ text: string; solid?: boolean }> = ({ text, solid }) => ( <div style={{ position: "absolute", left: 0, right: 0, top: 292, textAlign: "center", fontFamily: SERIF, fontSize: 213, fontWeight: 540, fontVariationSettings: '"opsz" 60', letterSpacing: "-0.03em", lineHeight: "300px", ...(solid ? { color: "#e8e8ea" } : { backgroundImage: "linear-gradient(100deg, #ffffff 35%, #bfc0c4 95%)", WebkitBackgroundClip: "text", backgroundClip: "text", color: "transparent", }), }} > {text} </div> ); export const ThinkDiff: React.FC<{ copy: ThinkDiffCopy }> = ({ copy }) => { const frame = useCurrentFrame(); const top = interpolate(frame, [0, 90], [566, 102], { ...clamp, easing: Easing.out(Easing.quad), }); const screen = interpolate(frame, [88, 125], [0, 1], clamp); const at = (y: number) => top + (y - 102); // y measured with the phone at rest // Fade the phone out at a fixed height on screen (640-790px), as in the reference. const phoneMask = `linear-gradient(180deg, #000 ${640 - top}px, rgba(0,0,0,0) ${790 - top}px)`; return ( <div style={{ position: "absolute", inset: 0, backgroundColor: "#060609", overflow: "hidden", }} > <Word text={copy.word} /> {/* Phone: frosted glass over the word (a blurred copy of the word drawn inside it), fading out at a fixed height on screen, as in the reference. */} <div> <div style={{ position: "absolute", left: PHONE_X, top, width: PHONE_W, height: 700, borderRadius: "84px 84px 0 0", WebkitMaskImage: phoneMask, maskImage: phoneMask, overflow: "hidden", backgroundColor: "#060609", }} > <div style={{ position: "absolute", left: -PHONE_X, top: -top, width: 1920, height: 1080, filter: "blur(12px)", opacity: 0.9, }} > <Word text={copy.word} solid /> </div> <div style={{ position: "absolute", inset: 0, borderRadius: "84px 84px 0 0", backgroundColor: `rgba(10,10,12,${0.35 + 0.5 * screen})`, boxShadow: "inset 0 0 0 2px #1f1f22", }} /> <div style={{ position: "absolute", inset: 0, opacity: screen }}> {/* top bar */} <div style={{ position: "absolute", left: 33, top: 80, width: 50, height: 50, borderRadius: 25, backgroundColor: "#18181b", display: "flex", alignItems: "center", justifyContent: "center", ...inter(26, 300, { color: "#e2e3e6" }), }} > ‹ </div> <div style={{ position: "absolute", left: 340, top: 80, width: 102, height: 50, borderRadius: 25, backgroundColor: "#18181b", display: "flex", alignItems: "center", justifyContent: "space-around", ...inter(18, 600, { color: "#e2e3e6" }), }} > <span>⌕</span> <span>···</span> </div> <div style={{ position: "absolute", left: 39, top: 159, ...inter(14, 400, { color: "#8a8f98" }), }} > {copy.repo} </div> <div style={{ position: "absolute", left: 38, top: 180, ...inter(26, 600, { color: "#f0f0f2", letterSpacing: "-0.01em", }), }} > {copy.title} </div> <div style={{ position: "absolute", left: 39, top: 246, display: "flex", alignItems: "center", gap: 37, ...inter(16, 400, { color: "#8a8f98" }), }} > <span>{copy.tabs[0]}</span> <span>{copy.tabs[1]}</span> </div> <div style={{ position: "absolute", left: 216, top: 238, height: 38, padding: "0 14px", borderRadius: 19, backgroundColor: "#18181b", display: "flex", alignItems: "center", gap: 10, ...inter(16, 500, { color: "#e2e3e6" }), }} > {copy.tabs[2]} <span style={{ fontFamily: MONO, fontSize: 15, color: "#4cc36b" }} > {copy.added} </span> <span style={{ fontFamily: MONO, fontSize: 15, color: "#e5484d", marginLeft: -4, }} > {copy.removed} </span> <span style={{ color: "#8a8f98" }}>≡</span> </div> {/* file header */} <div style={{ position: "absolute", left: 11, top: 303, width: 454, height: 47, backgroundColor: "#141416", display: "flex", alignItems: "center", gap: 10, padding: "0 28px", ...inter(16, 500, { color: "#e2e3e6", whiteSpace: "nowrap" }), }} > {copy.file} <span style={{ color: "#3e3f44", fontWeight: 400 }}> {copy.filePath} </span> <span style={{ marginLeft: "auto", color: "#4cc36b", fontFamily: MONO, fontSize: 15, }} > {copy.fileAdded} </span> <span style={{ width: 18, height: 18, borderRadius: 4, boxShadow: "inset 0 0 0 1.5px #3e3f44", }} /> </div> {/* code */} <div style={{ position: "absolute", left: 11, top: 353, width: 454, height: 320, background: "linear-gradient(180deg, rgba(30,90,50,0.35), rgba(30,90,50,0.05))", borderLeft: "2px solid #2f8a55", }} /> {CODE.map((toks, i) => ( <div key={i} style={{ position: "absolute", left: 40, top: 366 + i * 22.7, fontFamily: MONO, fontSize: 16, whiteSpace: "pre", opacity: interpolate(i, [4, 11], [1, 0.25], clamp), }} > <span style={{ color: "#2f8a55", display: "inline-block", width: 30, }} > {i + 1} </span> {toks.map(([t, k], j) => ( <span key={j} style={{ color: C[k] }}> {t} </span> ))} </div> ))} </div> </div> </div> {/* caption */} <div style={{ position: "absolute", left: 0, right: 0, top: Math.max(808, at(808)), display: "flex", flexDirection: "column", alignItems: "center", }} > <div style={{ ...inter(29, 600, { color: "#f2f3f5", letterSpacing: "-0.015em" }), ...blurIn(frame, 128, 28, 14), }} > {copy.caption} </div> <div style={{ marginTop: 18, textAlign: "center", ...inter(19, 400, { color: "#8a8f98", lineHeight: "29px" }), ...blurIn(frame, 136, 28, 12), }} > {copy.body[0]} <br /> {copy.body[1]} </div> <div style={{ marginTop: 30, ...blurIn(frame, 144, 28, 12) }}> <PillButton label={copy.cta} variant="light" height={47} fontSize={17} padX={20} /> </div> </div> </div> ); };›engine/src/product-tour/SyncLayers.tsx
engine/src/product-tour/SyncLayers.tsx // Section 14: "Built for speed, still synced with GitHub". Two isometric slabs // (Linear mark above, GitHub mark below) inside a card frame; yellow chevrons // between them pulse down on the left and up on the right. import React from "react"; import { Img, staticFile, useCurrentFrame } from "remotion"; import { inter } from "./ui"; export type SyncLayersCopy = { title: string; body: [string, string] }; const LINE = "#18181b"; const EDGE = "#1f1f23"; // Diamond slab with its top face's left corner at (x, y). const Slab: React.FC<{ x: number; y: number; children?: React.ReactNode; id: string }> = ({ x, y, children, id }) => { const W = 250; // half width const H = 122; // half height const T = 28; // thickness const top = `${x},${y} ${x + W},${y - H} ${x + 2 * W},${y} ${x + W},${y + H}`; return ( <g> <defs> <linearGradient id={`fade-${id}`} x1={x} x2={x + 2 * W} y1={0} y2={0} gradientUnits="userSpaceOnUse"> <stop offset="0" stopColor={EDGE} /> <stop offset="0.75" stopColor={EDGE} /> <stop offset="1" stopColor={EDGE} stopOpacity={0} /> </linearGradient> </defs> <polygon points={`${x},${y} ${x + W},${y + H} ${x + W},${y + H + T} ${x},${y + T}`} fill="#08080a" stroke={`url(#fade-${id})`} strokeWidth={1.2} /> <polygon points={`${x + W},${y + H} ${x + 2 * W},${y} ${x + 2 * W},${y + T} ${x + W},${y + H + T}`} fill="#08080a" stroke={`url(#fade-${id})`} strokeWidth={1.2} /> <polygon points={top} fill="#0a0a0c" stroke={`url(#fade-${id})`} strokeWidth={1.2} /> {/* map a 100x100 square onto the top face */} <g transform={`matrix(${W / 100} ${-H / 100} ${W / 100} ${H / 100} ${x} ${y})`}>{children}</g> </g> ); }; const Chevron: React.FC<{ x: number; y: number; up?: boolean; on: number }> = ({ x, y, up, on }) => ( <path d={up ? `M ${x - 14} ${y + 7} L ${x} ${y - 7} L ${x + 14} ${y + 7}` : `M ${x - 12} ${y - 6} L ${x} ${y + 6} L ${x + 12} ${y - 6}`} fill="none" stroke="#d4a72c" strokeWidth={3} strokeLinecap="round" strokeLinejoin="round" opacity={0.25 + 0.75 * on} /> ); // An image laid onto an isometric face centred at (cx, cy): rotate 45deg, // then squash vertically to the face's height/width ratio. const FlatMark: React.FC<{ src: string; cx: number; cy: number; size: number; turn?: number }> = ({ src, cx, cy, size, turn = -45 }) => ( <div style={{ position: "absolute", left: cx - size / 2, top: cy - size / 2, width: size, height: size, transform: "scaleY(0.488) rotate(45deg)", opacity: 0.05, }} > <Img src={staticFile(`product-tour/logos/${src}`)} style={{ width: size, height: size, transform: `rotate(${turn}deg)`, filter: "brightness(0) invert(1)" }} /> </div> ); export const SyncLayers: React.FC<{ copy: SyncLayersCopy }> = ({ copy }) => { const frame = useCurrentFrame(); const pulse = (k: number, n: number) => { const p = ((frame / 24 - k / n) % 1 + 1) % 1; return Math.max(0, 1 - p * 2.5); }; return ( <div style={{ position: "absolute", inset: 0, backgroundColor: "#060609" }}> <svg width={1920} height={1080} style={{ position: "absolute", inset: 0 }}> <defs> <radialGradient id="sync-glow" cx={830} cy={430} r={60} gradientUnits="userSpaceOnUse"> <stop offset="0" stopColor="#d4a72c" stopOpacity={0.2} /> <stop offset="1" stopColor="#d4a72c" stopOpacity={0} /> </radialGradient> </defs> {/* card frame */} <path d="M 495 170.5 H 1328 a 10 10 0 0 1 10 10 V 920" fill="none" stroke={LINE} strokeWidth={1.5} /> <path d="M 548.5 170 V 920" stroke={LINE} strokeWidth={1.5} /> <path d="M 495 870.5 H 1338" stroke={LINE} strokeWidth={1.5} /> <Slab x={693} y={547} id="b"> <circle cx={50} cy={50} r={30} fill="none" stroke={EDGE} strokeWidth={1.2} /> </Slab> <Slab x={693} y={342} id="a"> </Slab> <rect x={0} y={0} width={1920} height={1080} fill="url(#sync-glow)" /> <Chevron x={828} y={468} on={pulse(0, 2)} /> <Chevron x={828} y={498} on={pulse(1, 2)} /> <Chevron x={1034} y={550} up on={pulse(0, 3)} /> <Chevron x={1034} y={511} up on={pulse(1, 3)} /> <Chevron x={1034} y={472} up on={pulse(2, 3)} /> </svg> {/* Marks laid flat on the slabs (Linear above, GitHub below) */} <FlatMark src="linear.svg" cx={943} cy={342} size={230} turn={-90} /> <FlatMark src="github_dark.svg" cx={943} cy={547} size={150} /> <div style={{ position: "absolute", left: 587, top: 744, ...inter(18, 600, { color: "#f2f3f5" }) }}>{copy.title}</div> <div style={{ position: "absolute", left: 587, top: 776, ...inter(18, 400, { color: "#8a8f98", lineHeight: "28px" }) }}> {copy.body[0]} <br /> {copy.body[1]} </div> </div> ); };›engine/src/product-tour/Testimonials.tsx
engine/src/product-tour/Testimonials.tsx // Section 15: testimonial carousel. One card that cross-fades between three // customers (white, lavender gradient with a big logo watermark, blue), with // pagination dots below and a hand cursor resting on the card. import React from "react"; import { Img, interpolate, staticFile, useCurrentFrame } from "remotion"; import { PointingHand } from "./AgentsHand"; import { clamp, inter } from "./ui"; export type Testimonial = { brand: string; quote: [string, string, string?]; name: string; role: string }; export type TestimonialsCopy = { cards: [Testimonial, Testimonial, Testimonial] }; const CARD = { x: 616, y: 62, w: 667, h: 888 }; type Look = { bg: string; ink: string; sub: string; brand: React.CSSProperties; mark?: boolean }; const LOOKS: Look[] = [ { bg: "#f4f4f4", ink: "#111113", sub: "#6b6d72", brand: inter(40, 300, { letterSpacing: "0.01em" }) }, { bg: "linear-gradient(180deg, #c9dcfa 0%, #d9daf6 55%, #e1d9f4 100%)", ink: "#111113", sub: "#55575c", brand: inter(37, 650, { letterSpacing: "-0.02em" }), mark: true, }, { bg: "#4438ec", ink: "#ffffff", sub: "#b9b5fb", brand: inter(37, 600, { letterSpacing: "-0.03em" }) }, ]; const Card: React.FC<{ t: Testimonial; look: Look; opacity: number }> = ({ t, look, opacity }) => ( <div style={{ position: "absolute", left: CARD.x, top: CARD.y, width: CARD.w, height: CARD.h, borderRadius: 8, background: look.bg, overflow: "hidden", opacity, }} > {look.mark ? ( <Img src={staticFile("product-tour/logos/openai.svg")} style={{ position: "absolute", left: 135, top: -150, width: 1250, height: 1250, opacity: 0.35, filter: "brightness(0) invert(1)" }} /> ) : null} <div style={{ position: "absolute", left: 44, top: 38, color: look.ink, ...look.brand }}>{t.brand}</div> <div style={{ position: "absolute", left: 28, top: t.quote[2] ? 637 : 686, color: look.ink, ...inter(41.5, 400, { letterSpacing: "-0.025em", lineHeight: "49px" }) }}> <span style={{ display: "inline-block", width: 16 }}>“</span> {t.quote[0]} <br /> <span style={{ marginLeft: 16 }}>{t.quote[1]}</span> {t.quote[2] ? ( <> <br /> <span style={{ marginLeft: 16 }}>{t.quote[2]}</span> </> ) : null} </div> <div style={{ position: "absolute", left: 44, top: 819, ...inter(19, 500, { color: look.ink }) }}> {t.name} <span style={{ color: look.sub, fontWeight: 400 }}>· {t.role}</span> </div> </div> ); export const Testimonials: React.FC<{ copy: TestimonialsCopy }> = ({ copy }) => { const frame = useCurrentFrame(); const toOpenAI = interpolate(frame, [34, 64], [0, 1], clamp); const toOscar = interpolate(frame, [92, 140], [0, 1], clamp); const active = frame < 49 ? 0 : frame < 116 ? 1 : 2; const cx = interpolate(frame, [0, 60, 120, 222], [1482, 1202, 1000, 960], clamp); const cy = interpolate(frame, [0, 60, 120, 222], [393, 635, 650, 680], clamp); return ( <div style={{ position: "absolute", inset: 0, backgroundColor: "#060609" }}> <Card t={copy.cards[0]} look={LOOKS[0]} opacity={1} /> <Card t={copy.cards[1]} look={LOOKS[1]} opacity={toOpenAI} /> <Card t={copy.cards[2]} look={LOOKS[2]} opacity={toOscar} /> <div style={{ position: "absolute", left: 0, right: 0, top: 982, display: "flex", justifyContent: "center", gap: 10, paddingRight: 20 }}> {[0, 1, 2, 3].map((i) => ( <div key={i} style={{ width: i === active ? 32 : 11, height: 11, borderRadius: 6, backgroundColor: i === active ? "#8a8f98" : "#3a3b40" }} /> ))} </div> <PointingHand x={cx} y={cy} size={32} rot={0} /> </div> ); };
Download assets (fonts and images)
curl -O https://www.sycamore.to/sycamore-assets.mjsnode sycamore-assets.mjs product-tour
Sycamore