Kamino Launch
A DeFi launch film in seven sections: a chart chase into the dashboard, real-world assets, an orbit of tokens, the Earn/Borrow/Multiply carousel, four steps folding into one, and the wordmark outro.
Install using CLI
npx shadcn@latest add https://www.sycamore.to/r/kamino-launch.jsonDownload assets (fonts and images)
node sycamore-assets.mjs kamino-launchIt plays its soundtrack with @remotion/media. Install the version that matches your remotion package:
npm install @remotion/media@<your remotion version>Usage
import { KaminoLaunch } from "./sycamore/kamino-launch/kamino-launch/KaminoLaunch";
<Composition
id="KaminoLaunch"
component={KaminoLaunch}
durationInFrames={1431}
fps={30}
width={1920}
height={1080}
/>Install manually
Install dependencies
npm install lucide-reactCopy the source code into src/sycamore/kamino-launch/
// Kamino launch: a rebuild of the Kamino "The new Kamino is here." launch film,
// section by section from the reference. Each section is its own component inside a
// <Sequence>, so sections can be built and tuned in isolation.
import React from "react";
import { AbsoluteFill, Sequence, staticFile } from "remotion";
import { Audio } from "@remotion/media";
import { loadTourFonts } from "../product-tour/fonts";
import { S1Intro, S1_FRAMES } from "./S1Intro";
import { S2Assets, S2_FRAMES } from "./S2Assets";
import { S3Orbit, S3_FRAMES } from "./S3Orbit";
import { S4Multiply, S4_FRAMES } from "./S4Multiply";
import { S5OneStep, S5_FRAMES } from "./S5OneStep";
import { S6OnePlace, S6_FRAMES } from "./S6OnePlace";
import { S7Outro, S7_FRAMES } from "./S7Outro";
loadTourFonts();
export { KL_FPS, KL_WIDTH, KL_HEIGHT } from "./theme";
const SECTIONS: Array<{ id: string; frames: number; Comp: React.FC }> = [
{ id: "intro", frames: S1_FRAMES, Comp: S1Intro },
{ id: "assets", frames: S2_FRAMES, Comp: S2Assets },
{ id: "orbit", frames: S3_FRAMES, Comp: S3Orbit },
{ id: "multiply", frames: S4_FRAMES, Comp: S4Multiply },
{ id: "one-step", frames: S5_FRAMES, Comp: S5OneStep },
{ id: "one-place", frames: S6_FRAMES, Comp: S6OnePlace },
{ id: "outro", frames: S7_FRAMES, Comp: S7Outro },
];
export const KL_FRAMES = SECTIONS.reduce((n, s) => n + s.frames, 0);
export const KaminoLaunch: React.FC = () => {
let from = 0;
return (
<AbsoluteFill style={{ background: "#000" }}>
{/* Music + SFX: the reference's own mix (decoded to WAV so no AAC priming offset), which lines up 1:1 with
the rebuilt timing. Replace with a licensed track before publishing. */}
<Audio src={staticFile("kamino-launch/soundtrack.wav")} />
{SECTIONS.map(({ id, frames, Comp }) => {
const seq = (
<Sequence key={id} name={id} from={from} durationInFrames={frames}>
<Comp />
</Sequence>
);
from += frames;
return seq;
})}
</AbsoluteFill>
);
};Plus 15 files it imports. Copy them with the same folder layout:
›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/kamino-launch/S1Intro.tsx
engine/src/kamino-launch/S1Intro.tsx // Section 1 (0:00-0:08.5): dark dot field, typed "Opportunity favors a clear view", // "Here's yours" with a glowing portfolio line that the camera chases, a white light // wipe that refocuses on the light-theme chart, then a fast zoom-out to the dashboard. import React from "react"; import { AbsoluteFill, Easing, interpolate, random, useCurrentFrame } from "remotion"; import { DotField, type Light } from "./DotField"; import { DASH_H, DASH_W, CHART_BOX, Dashboard } from "./Dashboard"; import { C, FONT, chartPath, chartPoint, easeOut } from "./theme"; export const S1_FRAMES = 256; const LINE_1 = "Opportunity favors a clear view"; const LINE_2 = ["Here’s", "yours"]; const clamp = { extrapolateLeft: "clamp", extrapolateRight: "clamp" } as const; const lerp = (f: number, input: number[], output: number[], easing?: (t: number) => number) => interpolate(f, input, output, { ...clamp, easing }); // ---- lights (keyframed) ---------------------------------------------------------- const KEY_F = [0, 10, 30, 50, 75, 95, 120, 150, 180, 205]; const MAIN: Array<[number, number, number, number]> = [ [0, 0.05, 0.7, 0], [0, 0.05, 0.8, 0.35], [0, 0.1, 1.05, 0.8], [0.02, 0.08, 1.15, 0.95], [0.35, -0.08, 1.1, 0.9], [0.7, -0.1, 1.2, 1], [0.65, -0.12, 1.25, 1], [0.95, -0.02, 0.95, 0.9], [1, 0, 0.7, 0.6], [1.02, -0.02, 0.5, 0.55], ]; const lightsAt = (f: number): Light[] => { const pick = (k: number) => lerp(f, KEY_F, MAIN.map((m) => m[k])); return [ { x: pick(0), y: pick(1), r: pick(2), a: pick(3) }, { x: 0.95, y: 0.6, r: 0.45, a: lerp(f, [70, 95, 125, 150], [0, 0.45, 0.45, 0]) }, ]; }; // ---- typed line 1 ------------------------------------------------------------------ // "Opportunity favors" at ~2.2f/char from f26, a beat, then " a clear view" at 1f/char. const charTime = (i: number) => { const split = "Opportunity favors".length; return i < split ? 27 + i * 2.2 : 79 + (i - split); }; const Typed: React.FC<{ f: number }> = ({ f }) => { const words = LINE_1.split(" "); let idx = 0; return ( <div style={{ display: "flex", gap: "0.27em", whiteSpace: "pre" }}> {words.map((word, wi) => { const start = idx; idx += word.length + 1; // Words drop out in random order f128-f132. const out = 128 + random(`drop${wi}`) * 4; if (f >= out) return null; const chars = word.split("").map((ch, ci) => { const t = charTime(start + ci); if (f < t) return null; const k = lerp(f, [t, t + 7], [0, 1]); return ( <span key={ci} style={{ opacity: lerp(f, [t, t + 2], [0.3, 1]), color: `rgb(${180 + 75 * k},${235 + 20 * k},255)` }}> {ch} </span> ); }); if (chars.every((c) => c === null)) return null; return <span key={wi}>{chars}</span>; })} </div> ); }; // ---- dark chart (world coords: x -40..1920, y 180..900) ----------------------------- const DARK_BOX = { x: -40, y: 180, w: 1960, h: 720 }; const DarkChart: React.FC<{ progress: number; tipIn: number }> = ({ progress, tipIn }) => { if (progress <= 0) return null; const d = chartPath(DARK_BOX.w, DARK_BOX.h, progress); const tip = chartPoint(DARK_BOX.w, DARK_BOX.h, progress); return ( <svg width={DARK_BOX.w} height={DARK_BOX.h} style={{ position: "absolute", left: DARK_BOX.x, top: DARK_BOX.y, overflow: "visible" }} > <defs> <linearGradient id="s1-col" x1="0" y1="0" x2="0" y2="1"> <stop offset="0" stopColor="#7fa6e0" stopOpacity="0.1" /> <stop offset="1" stopColor="#7fa6e0" stopOpacity="0" /> </linearGradient> </defs> <rect x={tip.x - 60} y={tip.y} width={60} height={DARK_BOX.h + 400} fill="url(#s1-col)" opacity={tipIn} style={{ filter: "blur(8px)" }} /> <path d={d} fill="none" stroke="#4f86e0" strokeWidth={16} strokeLinejoin="round" opacity={0.28} style={{ filter: "blur(10px)" }} /> <path d={d} fill="none" stroke={C.line} strokeWidth={5} strokeLinejoin="round" strokeLinecap="round" /> <g opacity={tipIn} transform={`translate(${tip.x} ${tip.y}) scale(${0.4 + 0.6 * tipIn})`}> <circle r={22} fill="#5b93e8" opacity={0.25} style={{ filter: "blur(6px)" }} /> <circle r={13} fill="#4f86e0" stroke="#b3cdf5" strokeWidth={4} /> </g> </svg> ); }; // ---- light scene camera ---------------------------------------------------------------- // The card is placed so the chart tip (card coords) lands on P at zoom Z. const TIP = { x: CHART_BOX.x + CHART_BOX.w, y: CHART_BOX.y }; const lightCamera = (f: number) => { let Z: number; let px: number; let py: number; const z0 = 2.5; const p0 = { x: 1300, y: 480 }; // Card resting spots: full-bleed at f248, then eased in to 0.935 by the cut. const full = { Z: 1, x: 15 + TIP.x, y: 58 + TIP.y }; const rest = { Z: 0.935, x: 75 + 0.935 * TIP.x, y: 72 + 0.935 * TIP.y }; if (f < 244) { Z = lerp(f, [212, 244], [3.0, z0]); px = lerp(f, [212, 244], [1120, p0.x]); py = lerp(f, [212, 244], [480, p0.y]); } else if (f < 248) { // Near-instant pull-back. const t = lerp(f, [244, 248], [0, 1], Easing.bezier(0.2, 0.9, 0.3, 1)); Z = z0 + (full.Z - z0) * t; px = p0.x + (full.x - p0.x) * t; py = p0.y + (full.y - p0.y) * t; } else { const t = lerp(f, [248, 256], [0, 1], Easing.out(Easing.quad)); Z = full.Z + (rest.Z - full.Z) * t; px = full.x + (rest.x - full.x) * t; py = full.y + (rest.y - full.y) * t; } return { Z, x: px - Z * TIP.x, y: py - Z * TIP.y }; }; export const S1Intro: React.FC = () => { const f = useCurrentFrame(); // Dark scene. const threshold = lerp(f, [0, 6, 15, 30, 90], [1, 0.97, 0.8, 0.56, 0.5]); const camT = lerp(f, [162, 212], [0, 1], easeOut); const cam = { x: -870 * camT, y: 205 * camT }; const textScale = lerp(f, [26, 128], [1.1, 0.82]); const progress = lerp(f, [134, 150, 165, 180, 195, 210], [0, 0.54, 0.7, 0.82, 0.93, 1]); const tipIn = lerp(f, [166, 172], [0, 1]); const darkBlur = lerp(f, [208, 212], [0, 5]); // Wipe + light scene. const wipe = lerp(f, [206, 213], [-40, 95]); const wipeFade = lerp(f, [213, 224], [1, 0]); const lightIn = f >= 209; const lightBlur = f < 244 ? lerp(f, [210, 217], [6, 0]) : lerp(f, [244, 245, 248], [0, 3, 0]); const lc = lightCamera(f); const chrome = lerp(f, [244, 247], [0, 1]); return ( <AbsoluteFill style={{ background: C.night, fontFamily: FONT, overflow: "hidden" }}> {f < 212 ? ( <AbsoluteFill> <DotField lights={lightsAt(f)} threshold={threshold} zoom={lerp(f, [160, 210], [1, 1.9], easeOut)} pan={{ x: cam.x * 0.4, y: cam.y * 0.4 }} shade={lerp(f, [150, 200], [0, 1])} /> <AbsoluteFill style={{ transform: `translate(${cam.x}px, ${cam.y}px)`, filter: `blur(${darkBlur}px)` }}> <DarkChart progress={progress} tipIn={tipIn} /> {/* Line 1 */} {f < 133 && ( <div style={{ position: "absolute", left: 0, right: 0, top: 535, display: "flex", justifyContent: "center", transform: `translateY(-50%) scale(${textScale})`, fontSize: 88, fontWeight: 500, letterSpacing: -0.5, }} > <Typed f={f} /> </div> )} {/* Line 2 */} {f >= 133 && ( <div style={{ position: "absolute", left: 0, right: 0, top: 535, display: "flex", justifyContent: "center", transform: "translateY(-50%)", fontSize: 101, fontWeight: 500, letterSpacing: -1, color: "#fff", gap: "0.24em", }} > <span style={{ opacity: lerp(f, [133, 135], [0.4, 1]) }}>{LINE_2[0]}</span> <span style={{ opacity: f < 136 ? 0 : lerp(f, [136, 139], [0.5, 1]), transform: `translateX(${lerp(f, [136, 152], [-34, 0], easeOut)}px)`, }} > {LINE_2[1]} </span> </div> )} </AbsoluteFill> </AbsoluteFill> ) : null} {lightIn && ( <AbsoluteFill style={{ opacity: lerp(f, [209, 212], [0, 1]), background: "radial-gradient(70% 90% at 0% 0%, #c9f3fb 0%, #6fa6d3 35%, rgba(60,100,160,0) 70%), radial-gradient(80% 80% at 100% 0%, #0d1622 0%, #1b3354 55%, rgba(0,0,0,0) 100%), linear-gradient(180deg, #2c5a92 0%, #3e74b4 100%)", }} > <div style={{ position: "absolute", left: 0, top: 0, width: DASH_W, height: DASH_H, transformOrigin: "0 0", transform: `translate(${lc.x}px, ${lc.y}px) scale(${lc.Z})`, filter: lightBlur > 0.05 ? `blur(${lightBlur}px)` : undefined, }} > <Dashboard chrome={chrome} /> </div> </AbsoluteFill> )} {/* White light wipe from the top-right, then it lifts off the light chart. */} {f >= 202 && f < 224 && ( <AbsoluteFill style={{ opacity: wipeFade, background: `linear-gradient(225deg, rgba(255,255,255,0.92) ${wipe - 30}%, rgba(242,251,253,0.7) ${wipe - 10}%, rgba(170,228,242,0.6) ${wipe + 12}%, rgba(110,170,205,0.45) ${wipe + 35}%, rgba(80,130,180,0.25) ${wipe + 60}%)`, }} /> )} </AbsoluteFill> ); };›engine/src/kamino-launch/DotField.tsx
engine/src/kamino-launch/DotField.tsx // Dark backdrop for section 1: navy base, a moving cyan light, and a grid of round dots // that light up in blocky clusters. Everything is a pure function of the frame. // // Cells are grouped into BLOCK x BLOCK patches; each patch rerolls its own value every // few frames on its own clock (so the field shimmers without a global tick), and a cell // is on when patch value + a little per-cell noise clears `threshold`. Dots take their // brightness from the light, so they read bright under it and barely visible elsewhere. import React, { useLayoutEffect, useRef } from "react"; import { random, useCurrentFrame, useVideoConfig } from "remotion"; export type Light = { x: number; y: number; r: number; a: number }; // fractions of width / strength 0..1 const SPACING = 20.5; const BLOCK = 2; const lightAt = (lights: Light[], x: number, y: number, w: number) => { let v = 0; for (const l of lights) { const dx = x - l.x * w; const dy = y - l.y * w; const d = Math.sqrt(dx * dx + dy * dy) / (l.r * w); v += l.a * Math.max(0, 1 - d) ** 1.6; } return Math.min(1, v); }; export const DotField: React.FC<{ lights: Light[]; threshold: number; // 1 = no dots, ~0.4 = dense zoom?: number; // dot grid scale about the centre pan?: { x: number; y: number }; // px, applied to the grid only dotAlpha?: number; shade?: number; // 0..1 darkening from the bottom-left }> = ({ lights, threshold, zoom = 1, pan = { x: 0, y: 0 }, dotAlpha = 1, shade = 0 }) => { const frame = useCurrentFrame(); const { width: w, height: h } = useVideoConfig(); const ref = useRef<HTMLCanvasElement>(null); useLayoutEffect(() => { const ctx = ref.current?.getContext("2d"); if (!ctx) return; ctx.clearRect(0, 0, w, h); // Base: night, lifting toward steel blue near the lights. const base = ctx.createLinearGradient(0, 0, w * 0.4, h); base.addColorStop(0, "#2a3d55"); base.addColorStop(0.55, "#1b2636"); base.addColorStop(1, "#0f1317"); ctx.fillStyle = base; ctx.fillRect(0, 0, w, h); for (const l of lights) { if (l.a <= 0) continue; const g = ctx.createRadialGradient(l.x * w, l.y * w, 0, l.x * w, l.y * w, l.r * w); g.addColorStop(0, `rgba(214,247,252,${0.95 * l.a})`); g.addColorStop(0.18, `rgba(150,198,222,${0.85 * l.a})`); g.addColorStop(0.5, `rgba(70,104,142,${0.7 * l.a})`); g.addColorStop(1, "rgba(40,60,90,0)"); ctx.fillStyle = g; ctx.fillRect(0, 0, w, h); } // Dots. if (threshold < 1 && dotAlpha > 0) { const s = SPACING * zoom; const r = s * 0.29; const cx = w / 2 + pan.x; const cy = h / 2 + pan.y; const c0 = Math.floor(-cx / s) - 1; const c1 = Math.ceil((w - cx) / s) + 1; const r0 = Math.floor(-cy / s) - 1; const r1 = Math.ceil((h - cy) / s) + 1; for (let row = r0; row <= r1; row++) { for (let col = c0; col <= c1; col++) { const bx = Math.floor(col / BLOCK); const by = Math.floor(row / BLOCK); const period = 7 + Math.floor(random(`p${bx},${by}`) * 9); const phase = Math.floor(random(`o${bx},${by}`) * 40); const gen = Math.floor((frame + phase) / period); const patch = random(`v${bx},${by},${gen}`); const cell = random(`c${col},${row},${gen % 3}`); const v = patch * 0.5 + cell * 0.5; if (v < threshold) continue; const x = cx + col * s; const y = cy + row * s; const L = lightAt(lights, x, y, w); const sh = shade * Math.min(1, Math.max(0, (y / h) * 1.2 - (x / w) * 0.4)); // Lit: dots brighter than the ground. Dim: darker than it. const k = L - 0.22; const a = (k > 0 ? 0.18 + 0.8 * Math.min(1, k * 1.6) : 0.12 + 0.9 * Math.min(0.4, -k)) * dotAlpha * (1 - sh); if (a < 0.02) continue; ctx.fillStyle = k > 0 ? `rgba(${Math.round(170 + 60 * L)},${Math.round(205 + 45 * L)},${Math.round(225 + 30 * L)},${a})` : `rgba(160,190,220,${a * 0.6})`; ctx.beginPath(); ctx.arc(x, y, r, 0, Math.PI * 2); ctx.fill(); } } } // Shade: the bottom-left falls to night as the chart takes over. if (shade > 0) { const g = ctx.createLinearGradient(w * 0.7, 0, w * 0.2, h); g.addColorStop(0, "rgba(15,19,23,0)"); g.addColorStop(0.55, `rgba(15,19,23,${0.75 * shade})`); g.addColorStop(1, `rgba(12,15,19,${0.95 * shade})`); ctx.fillStyle = g; ctx.fillRect(0, 0, w, h); } }, [frame, w, h, lights, threshold, zoom, pan, dotAlpha, shade]); return <canvas ref={ref} width={w} height={h} style={{ position: "absolute", inset: 0 }} />; };›engine/src/kamino-launch/Dashboard.tsx
engine/src/kamino-launch/Dashboard.tsx // The Kamino home dashboard as a card (DASH_W x DASH_H), rebuilt from the reference: // sidebar, search, portfolio chart, swap panel, featured opportunities. // `chrome` (0..1) fades everything except the chart, so the card can grow out of the // chart during the zoom-out in section 1. CHART_BOX is where the chart sits in the card. import React from "react"; import { Img, staticFile } from "remotion"; import { ArrowUpDown, ChevronDown, CircleDot, EyeOff, FileText, Home, KeyRound, Landmark, Lock, MessageSquareText, Settings, Sparkles, Sun, Wallet, Layers, } from "lucide-react"; import { C, FONT, chartPath, chartPoint } from "./theme"; import { KaminoK } from "./Wordmark"; export const DASH_W = 1890; export const DASH_H = 965; export const CHART_BOX = { x: 221, y: 278, w: 993, h: 320 }; const MONO = "ui-monospace, SFMono-Regular, Menlo, monospace"; export const KaminoMark: React.FC<{ size: number; color?: string }> = ({ size, color = C.ink }) => ( <KaminoK height={size * 0.82} color={color} /> ); export const LightChart: React.FC<{ w: number; h: number; stroke?: number; dot?: number }> = ({ w, h, stroke = 2.2, dot = 7, }) => { const line = chartPath(w, h); const tip = chartPoint(w, h, 1); return ( <svg width={w} height={h} viewBox={`0 0 ${w} ${h}`} style={{ overflow: "visible", position: "absolute" }}> <defs> <pattern id="kl-dots" width="6" height="6" patternUnits="userSpaceOnUse"> <circle cx="3" cy="3" r="1.15" fill="#4f86e0" /> </pattern> <linearGradient id="kl-fade" x1="0" y1="0" x2="0" y2="1"> <stop offset="0" stopColor="#fff" stopOpacity="0.55" /> <stop offset="1" stopColor="#fff" stopOpacity="0" /> </linearGradient> <mask id="kl-mask"> <rect width={w} height={h * 1.3} fill="url(#kl-fade)" /> </mask> </defs> <path d={`${line}L${w},${h * 1.3}L0,${h * 1.3}Z`} fill="url(#kl-dots)" mask="url(#kl-mask)" opacity={0.45} /> <path d={line} fill="none" stroke={C.lineLight} strokeWidth={stroke} strokeLinejoin="round" /> <circle cx={tip.x} cy={tip.y} r={dot * 1.9} fill={C.lineLight} opacity={0.18} /> <circle cx={tip.x} cy={tip.y} r={dot} fill={C.lineLight} /> </svg> ); }; const Nav: React.FC<{ icon: React.ReactNode; label: string; active?: boolean }> = ({ icon, label, active }) => ( <div style={{ width: 90, height: 68, borderRadius: 8, background: active ? "#eceef3" : "transparent", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: 6, fontSize: 15, color: C.ink, }} > {icon} {label} </div> ); const Token: React.FC<{ src: string; label: string; dark?: boolean }> = ({ src, label, dark }) => ( <div style={{ display: "flex", alignItems: "center", gap: 8, padding: "7px 12px", background: "#fff", borderRadius: 8, boxShadow: "0 1px 3px rgba(0,0,0,0.08)", fontSize: 16, fontWeight: 500, }} > <div style={{ width: 22, height: 22, borderRadius: 11, background: dark ? "#111" : "transparent", display: "flex", alignItems: "center", justifyContent: "center", }} > <Img src={staticFile(src)} style={{ width: dark ? 12 : 22, height: dark ? 12 : 22 }} /> </div> {label} <ChevronDown size={16} /> </div> ); const SwapBox: React.FC<{ title: string; token: React.ReactNode; bal: string; extra?: boolean }> = ({ title, token, bal, extra, }) => ( <div style={{ background: "#f5f5f8", borderRadius: 12, padding: "22px 24px", height: 160, position: "relative" }}> <div style={{ color: C.muted, fontSize: 17 }}>{title}</div> <div style={{ position: "absolute", right: 22, top: 22 }}>{token}</div> <div style={{ fontFamily: MONO, fontSize: 34, color: "#9ca1ad", marginTop: 18 }}>0</div> <div style={{ position: "absolute", right: 24, top: 82, fontFamily: MONO, fontSize: 15 }}>$0.00 ⇅</div> <div style={{ fontFamily: MONO, fontSize: 15, color: C.muted, marginTop: 12 }}>⊟ {bal}</div> {extra && ( <div style={{ position: "absolute", right: 24, bottom: 22, display: "flex", gap: 24, fontSize: 15 }}> <span>Half</span> <span>Max</span> </div> )} </div> ); const Opp: React.FC<{ icon: React.ReactNode; title: string; sub: string }> = ({ icon, title, sub }) => ( <div style={{ width: 354, height: 168, borderRadius: 10, background: "linear-gradient(180deg,#eef3fb,#e8f0fb)", boxShadow: "0 1px 4px rgba(40,70,120,0.08)", padding: "22px 16px", position: "relative", display: "flex", flexDirection: "column", justifyContent: "space-between", }} > <div style={{ color: "#4a5160" }}>{icon}</div> <div> <div style={{ fontSize: 18, fontWeight: 500 }}>{title}</div> <div style={{ fontSize: 15, color: C.green, marginTop: 8 }}>{sub}</div> </div> </div> ); export const Dashboard: React.FC<{ chrome?: number }> = ({ chrome = 1 }) => { const ui: React.CSSProperties = { opacity: chrome }; return ( <div style={{ width: DASH_W, height: DASH_H, background: C.card, borderRadius: 44, position: "relative", overflow: "hidden", fontFamily: FONT, color: C.ink, boxShadow: `0 30px 80px rgba(10,30,60,${0.25 * chrome})`, }} > <div style={{ ...ui, position: "absolute", inset: 0 }}> {/* Sidebar */} <div style={{ position: "absolute", left: 0, top: 0, bottom: 0, width: 114, background: "#f4f4f7" }}> <div style={{ position: "absolute", left: 42, top: 30 }}> <KaminoMark size={36} /> </div> <div style={{ position: "absolute", left: 11, top: 256, display: "flex", flexDirection: "column", gap: 12 }}> <Nav icon={<Home size={20} fill={C.ink} />} label="Home" active /> <Nav icon={<CircleDot size={20} />} label="Earn" /> <Nav icon={<Wallet size={20} />} label="Borrow" /> <Nav icon={<Layers size={20} />} label="Multiply" /> </div> <FileText size={20} style={{ position: "absolute", left: 47, bottom: 112 }} /> <Sun size={20} style={{ position: "absolute", left: 47, bottom: 52 }} /> </div> {/* Search + wallet */} <div style={{ position: "absolute", left: 776, top: 26, width: 452, height: 44, borderRadius: 8, background: "#f4f4f7", display: "flex", alignItems: "center", gap: 12, padding: "0 16px", fontSize: 17, color: "#555b66", }} > <Sparkles size={18} color="#9aa0aa" /> Search vaults, markets, tokens... <span style={{ marginLeft: "auto", fontSize: 14, color: "#555b66" }}>⌘ K</span> </div> <div style={{ position: "absolute", right: 70, top: 24, height: 48, padding: "0 16px", borderRadius: 8, background: "#fff", boxShadow: "0 1px 4px rgba(0,0,0,0.1)", display: "flex", alignItems: "center", gap: 10, fontSize: 17, }} > <div style={{ width: 10, height: 10, borderRadius: 5, background: "#1fd66b" }} /> 6EoV...A92t <ChevronDown size={16} /> </div> {/* Tabs */} <div style={{ position: "absolute", left: 226, top: 104, display: "flex", gap: 28, fontSize: 18, color: C.muted }}> <span style={{ color: C.ink, fontWeight: 500, borderBottom: `2px solid ${C.ink}`, paddingBottom: 10 }}>Value</span> <span>Return</span> <span>Income</span> <span>Allocation</span> </div> <div style={{ position: "absolute", left: 1042, top: 104, display: "flex", gap: 24, fontSize: 17, color: C.muted }}> <span>1D</span> <span>1W</span> <span>1M</span> <span>1Y</span> <span style={{ color: C.ink, fontWeight: 600 }}>All</span> </div> {/* Portfolio value */} <div style={{ position: "absolute", left: 221, top: 178, fontSize: 16, color: "#4a5160" }}>Portfolio value</div> <div style={{ position: "absolute", left: 220, top: 204, display: "flex", alignItems: "center", gap: 20 }}> <span style={{ fontSize: 44, fontWeight: 500, letterSpacing: -1.5 }}> <span style={{ color: "#9ca1ad" }}>$</span>72,120.10 </span> <EyeOff size={18} color="#9ca1ad" /> </div> <div style={{ position: "absolute", left: 221, top: 264, fontSize: 16, color: "#4a5160" }}> Net return (All) <span style={{ color: C.green }}>+$8,200.10 (4.27%)</span> </div> {/* Axis labels */} {["$80K", "$40K", "$0"].map((t, i) => ( <div key={t} style={{ position: "absolute", left: 1218, top: 320 + i * 125, fontFamily: MONO, fontSize: 14, color: "#9ca1ad" }}> {t} </div> ))} {["01/01", "01/01", "01/01", "01/01", "01/15", "01/31"].map((t, i) => ( <div key={i} style={{ position: "absolute", left: 221 + i * 198.6, top: 610, fontFamily: MONO, fontSize: 13, color: "#9ca1ad" }}> {t} </div> ))} {/* Swap */} <div style={{ position: "absolute", left: 1300, top: 228, width: 510 }}> <div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 26 }}> <span style={{ fontSize: 22, fontWeight: 500 }}>Swap</span> <Settings size={20} /> </div> <SwapBox title="Sell" token={<Token src="kamino-launch/usdc.svg" label="USDC" />} bal="0.00 USDC" extra /> <div style={{ display: "flex", justifyContent: "center", height: 14, alignItems: "center", position: "relative", zIndex: 1 }}> <ArrowUpDown size={20} /> </div> <SwapBox title="Buy" token={<Token src="kamino-launch/sol.svg" label="SOL" dark />} bal="0.00 SOL" /> <div style={{ marginTop: 22, marginLeft: -36, width: 498, height: 42, borderRadius: 6, background: "#8e9097", color: "#fff", display: "flex", alignItems: "center", justifyContent: "center", fontSize: 17, fontWeight: 500, }} > Swap </div> </div> {/* Featured */} <div style={{ position: "absolute", left: 173, top: 700, fontSize: 22, fontWeight: 500 }}>Featured opportunities</div> <div style={{ position: "absolute", left: 173, top: 755, display: "flex", gap: 22 }}> <Opp icon={<KeyRound size={26} />} title="Earn interest on your cash" sub="~10.04% APY" /> <Opp icon={<Landmark size={26} />} title="Borrow against your holdings" sub="From ~5.64% APY" /> <Opp icon={<Lock size={26} />} title="Boost your yield with Multiply" sub="Up to 40.84% APY" /> </div> <div style={{ position: "absolute", right: 30, bottom: 30, padding: "10px 18px", borderRadius: 10, background: "#fff", boxShadow: "0 1px 4px rgba(0,0,0,0.1)", display: "flex", alignItems: "center", gap: 10, fontSize: 18, fontWeight: 500, }} > <MessageSquareText size={18} /> Give feedback </div> </div> {/* Chart stays visible through the zoom */} <div style={{ position: "absolute", left: CHART_BOX.x, top: CHART_BOX.y }}> <LightChart w={CHART_BOX.w} h={CHART_BOX.h} /> </div> </div> ); };›engine/src/kamino-launch/theme.ts
engine/src/kamino-launch/theme.ts // Shared look for the Kamino launch rebuild: colours, fonts, chart data, easing. import { Easing, random } from "remotion"; import { INTER } from "../product-tour/fonts"; export const KL_FPS = 30; export const KL_WIDTH = 1920; export const KL_HEIGHT = 1080; export const FONT = INTER; export const C = { night: "#0f1317", navy: "#1c2a3c", steel: "#3d5a7d", ice: "#cdf4fb", line: "#5b93e8", lineLight: "#3c74d6", ink: "#16181d", muted: "#7b8190", green: "#17a86b", card: "#fbfafd", }; // Expo-ish out, the dominant motion curve in the reference. export const easeOut = Easing.bezier(0.16, 1, 0.3, 1); export const easeInOut = Easing.bezier(0.65, 0, 0.35, 1); // Portfolio curve, 0..1 in both axes (x left->right, y bottom->top). Shape from the // reference: noisy flat, a dip, step up, plateau, step up, plateau, final spike. const N = 240; const KEYS: Array<[number, number]> = [ [0, 0.14], [0.12, 0.15], [0.196, 0.01], [0.25, 0.19], [0.378, 0.22], [0.439, 0.29], [0.5, 0.39], [0.536, 0.35], [0.643, 0.355], [0.679, 0.42], [0.719, 0.465], [0.786, 0.458], [0.801, 0.507], [0.821, 0.8], [0.837, 0.84], [0.883, 0.77], [0.923, 0.833], [0.959, 0.806], [0.974, 0.826], [1, 1], ]; const smooth = (t: number) => t * t * (3 - 2 * t); export const CHART: number[] = Array.from({ length: N }, (_, i) => { const x = i / (N - 1); let k = 0; while (k < KEYS.length - 2 && KEYS[k + 1][0] < x) k++; const [x0, y0] = KEYS[k]; const [x1, y1] = KEYS[k + 1]; const base = y0 + (y1 - y0) * smooth((x - x0) / (x1 - x0)); const wiggle = (random(`w${i}`) - 0.5) * 0.035 + Math.sin(i * 0.9) * 0.012 + Math.sin(i * 0.37 + 1) * 0.015; return i === N - 1 ? 1 : base + wiggle; }); // SVG path through CHART up to `progress` (0..1), mapped into a w x h box. export const chartPath = (w: number, h: number, progress = 1) => { const last = Math.max(1, progress * (N - 1)); const pts: string[] = []; const whole = Math.floor(last); for (let i = 0; i <= whole; i++) { pts.push(`${((i / (N - 1)) * w).toFixed(1)},${((1 - CHART[i]) * h).toFixed(1)}`); } const tip = chartPoint(w, h, progress); if (last > whole) pts.push(`${tip.x.toFixed(1)},${tip.y.toFixed(1)}`); return "M" + pts.join("L"); }; export const chartPoint = (w: number, h: number, progress: number) => { const f = Math.max(0, Math.min(1, progress)) * (N - 1); const i = Math.min(N - 2, Math.floor(f)); const t = f - i; const y = CHART[i] + (CHART[i + 1] - CHART[i]) * t; return { x: (f / (N - 1)) * w, y: (1 - y) * h }; };›engine/src/kamino-launch/Wordmark.tsx
engine/src/kamino-launch/Wordmark.tsx // Kamino wordmark, traced from the reference's closing frame (svgl.app has no Kamino // logo). Design box 436 x 100 (the i-dot top to the baseline); stroke ~20. // The "k" is a bar plus the left half of a ring, which `KaminoK` draws on its own. import React from "react"; export const KaminoWordmark: React.FC<{ height: number; color?: string }> = ({ height, color = "#fff" }) => ( <svg width={(height * 436) / 100} height={height} viewBox="0 0 436 100" fill={color} stroke={color} style={{ overflow: "visible" }}> <rect x={0} y={6} width={20} height={94} strokeWidth={0} /> <path d="M66 38 A26 26 0 0 0 66 90" fill="none" strokeWidth={18} /> {/* a */} <circle cx={98} cy={64} r={26.5} fill="none" strokeWidth={17} /> <rect x={113} y={30} width={20} height={70} strokeWidth={0} /> {/* m */} <path d="M151 100 V54 A24 15 0 0 1 199 54 V100 M199 54 A22 15 0 0 1 243 54 V100" fill="none" strokeWidth={20} /> {/* i */} <circle cx={272} cy={11} r={11} strokeWidth={0} /> <rect x={261} y={30} width={23} height={70} strokeWidth={0} /> {/* n */} <path d="M301 100 V54 A24.5 15 0 0 1 350 54 V100" fill="none" strokeWidth={20} /> {/* o */} <circle cx={400.5} cy={64.5} r={26.75} fill="none" strokeWidth={17.5} /> </svg> ); // Just the "k" (sidebar logo). export const KaminoK: React.FC<{ height: number; color?: string }> = ({ height, color = "#16181d" }) => ( <svg width={(height * 96) / 94} height={height} viewBox="0 6 96 94" fill={color} stroke={color}> <rect x={0} y={6} width={20} height={94} strokeWidth={0} /> <path d="M66 38 A26 26 0 0 0 66 90" fill="none" strokeWidth={18} /> </svg> );›engine/src/kamino-launch/S2Assets.tsx
engine/src/kamino-launch/S2Assets.tsx // Section 2 (0:08.5-0:16.1): "Discover, trade and utilize" over the dashboard card, // a 0 -> 100+ counter, "real-world assets" among floating tickers, the Assets page // flying in from the bottom-right, then a zoomed asset table scrolling with a // highlight that steps down the rows. import React from "react"; import { AbsoluteFill, Easing, interpolate, useCurrentFrame } from "remotion"; import { DASH_H, DASH_W, Dashboard } from "./Dashboard"; import { ASSETS, AssetRowView, AssetsPage } from "./AssetsPage"; import { FONT, easeOut } from "./theme"; export const S2_FRAMES = 228; const clamp = { extrapolateLeft: "clamp", extrapolateRight: "clamp" } as const; const lerp = (f: number, input: number[], output: number[], easing?: (t: number) => number) => interpolate(f, input, output, { ...clamp, easing }); // Cyan spotlight from the top on deep blue, dark corners. x/y in %. export const Spot: React.FC<{ x: number; y: number; spread?: number }> = ({ x, y, spread = 1 }) => ( <AbsoluteFill style={{ background: `radial-gradient(${70 * spread}% ${95 * spread}% at ${x}% ${y}%, #c3ecf9 0%, #86b9e2 18%, #4f82c0 40%, #2d5389 62%, #142846 82%, #05080e 100%)`, }} /> ); // Word-by-word fade from cyan, used for every headline here. const Words: React.FC<{ f: number; words: Array<[string, number]>; size: number; gap?: string }> = ({ f, words, size, gap = "0.26em", }) => ( <div style={{ display: "flex", gap, fontSize: size, fontWeight: 500, letterSpacing: -0.5, whiteSpace: "pre" }}> {words.map(([w, t], i) => { if (f < t) return <span key={i} style={{ opacity: 0 }}>{w}</span>; const k = lerp(f, [t, t + 7], [0, 1]); return ( <span key={i} style={{ opacity: lerp(f, [t, t + 3], [0.25, 1]), color: `rgb(${150 + 105 * k},${215 + 40 * k},255)`, filter: k < 0.5 ? `blur(${(0.5 - k) * 6}px)` : undefined, }} > {w} </span> ); })} </div> ); const Centered: React.FC<{ y: number; scale?: number; children: React.ReactNode; style?: React.CSSProperties }> = ({ y, scale = 1, children, style, }) => ( <div style={{ position: "absolute", left: 0, right: 0, top: y, display: "flex", justifyContent: "center", transform: `translateY(-50%) scale(${scale})`, color: "#fff", ...style, }} > {children} </div> ); // ---- A: Discover, trade and utilize (r0-r59) ----------------------------------------- const cardA = (f: number) => { if (f < 8) return { s: lerp(f, [0, 8], [0.935, 0.918]), x: lerp(f, [0, 8], [75, 90]), y: lerp(f, [0, 8], [72, 185]) }; if (f < 14) return { s: 0.918, x: 90, y: lerp(f, [8, 14], [185, 595], Easing.inOut(Easing.cubic)) }; return { s: lerp(f, [14, 59], [0.918, 0.965], Easing.out(Easing.quad)), x: lerp(f, [14, 59], [90, 35], Easing.out(Easing.quad)), y: lerp(f, [14, 59], [595, 720], Easing.out(Easing.quad)), }; }; const PartA: React.FC<{ f: number }> = ({ f }) => { const c = cardA(f); return ( <AbsoluteFill> <Spot x={lerp(f, [0, 59], [12, 48])} y={lerp(f, [0, 59], [-12, -6])} spread={1.15} /> <Centered y={lerp(f, [13, 59], [528, 545])}> <Words f={f} size={90} words={[ ["Discover,", 13], ["trade", 19], ["and", 28], ["utilize", 34], ]} /> </Centered> <div style={{ position: "absolute", left: 0, top: 0, width: DASH_W, height: DASH_H, transformOrigin: "0 0", transform: `translate(${c.x}px, ${c.y}px) scale(${c.s})`, filter: f >= 9 && f < 14 ? "blur(1.5px)" : undefined, }} > <Dashboard /> </div> </AbsoluteFill> ); }; // ---- B: counter (r59-r121) ------------------------------------------------------------- const COUNT_F = [59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95]; const COUNT_V = [0, 0.9, 1, 1.9, 2, 3, 4, 8, 19, 34, 59, 97, 100]; const PartB: React.FC<{ f: number }> = ({ f }) => { const v = Math.floor(lerp(f, COUNT_F, COUNT_V)); const out = lerp(f, [114, 121], [0, 1]); return ( <AbsoluteFill> <Spot x={50} y={-4} /> <Centered y={lerp(f, [59, 72], [400, 540], easeOut)} scale={lerp(f, [59, 95], [0.35, 1], Easing.out(Easing.quad)) * (1 - 0.15 * out)} style={{ opacity: 1 - out, filter: out > 0 ? `blur(${out * 8}px)` : undefined }} > <div style={{ fontSize: 168, fontWeight: 500, letterSpacing: -4, backgroundImage: "linear-gradient(90deg, #ffffff 0%, #ffffff 30%, #c9d8ff 60%, #e6eeff 100%)", WebkitBackgroundClip: "text", backgroundClip: "text", color: "transparent", }} > {v} {v >= 90 ? "+" : ""} </div> </Centered> </AbsoluteFill> ); }; // ---- C: real-world assets + tickers, D: Assets card (r119-r190) ------------------------ type Tick = { label: string; delta?: string; x: number; y: number; depth: number; t: number }; // depth 0 = in focus, 1 = far (blurred, faint). x/y at r128 in px. const TICKS: Tick[] = [ { label: "Gold", x: 530, y: 222, depth: 0, t: 119 }, { label: "Apple", delta: "+25.1%", x: 470, y: 150, depth: 0.9, t: 121 }, { label: "Commodities", x: 1225, y: 160, depth: 1, t: 123 }, { label: "Crypto", x: 1110, y: 250, depth: 0.2, t: 126 }, { label: "NVIDIA", delta: "+6.1%", x: 310, y: 418, depth: 0.8, t: 122 }, { label: "Equities", x: 733, y: 420, depth: 0, t: 120 }, { label: "NVIDIA", delta: "+5.1%", x: 1160, y: 435, depth: 0, t: 119 }, { label: "Apple", delta: "+25.1%", x: 575, y: 653, depth: 0, t: 119 }, { label: "S&P", delta: "+11.2%", x: 250, y: 672, depth: 0.85, t: 124 }, { label: "Fixed income", x: 1345, y: 658, depth: 0.15, t: 120 }, { label: "Commodities", x: 670, y: 880, depth: 0.35, t: 122 }, { label: "S&P", delta: "+7.4%", x: 1140, y: 882, depth: 0.4, t: 123 }, { label: "Treasuries", x: 520, y: 918, depth: 0.95, t: 125 }, { label: "Gold", delta: "+3.2%", x: 1500, y: 700, depth: 0.9, t: 126 }, { label: "Credit", x: 1640, y: 330, depth: 0.9, t: 124 }, ]; const Ticker: React.FC<{ tk: Tick; f: number }> = ({ tk, f }) => { // Drift outward from centre, nearer ones faster. const z = 1 + (f - 128) * (0.006 + 0.004 * (1 - tk.depth)); const x = 960 + (tk.x - 960) * z; const y = 540 + (tk.y - 540) * z; const a = lerp(f, [Math.max(121, tk.t), Math.max(121, tk.t) + 6], [0, 1]) * (1 - 0.65 * tk.depth); return ( <div style={{ position: "absolute", left: x, top: y, transform: `translate(-50%, -50%) scale(${(1 - 0.15 * tk.depth) * z})`, opacity: a, filter: `blur(${tk.depth * 5}px)`, fontSize: 27, fontWeight: 500, color: "#e3effa", whiteSpace: "nowrap", display: "flex", gap: 14, }} > {tk.label} {tk.delta && ( <> <span style={{ color: "#8fb2d8" }}>·</span> <span style={{ color: "#4d8cf5" }}>{tk.delta}</span> </> )} </div> ); }; // Assets card top-left / scale keys (measured from the reference). // Slow creep in from the bottom-right (r140-r164), a 2-frame snap, then a settle. const CARD_F = [140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 161, 162, 163, 164, 165, 166, 167, 168, 170, 178, 185, 189]; const CARD_X = [1520, 1385, 1287, 1229, 1200, 1166, 1142, 1131, 1108, 1079, 1044, 992, 963, 940, 837, 664, 190, 190, 156, 127, 118, 85, 35]; const CARD_Y = [1010, 894, 808, 750, 727, 698, 675, 652, 629, 594, 565, 548, 519, 450, 392, 260, 162, 127, 104, 115, 100, 80, 40]; const CARD_S = [2.05, 2.0, 1.95, 1.9, 1.85, 1.82, 1.8, 1.78, 1.76, 1.75, 1.75, 1.75, 1.74, 1.72, 1.7, 1.5, 0.95, 0.94, 0.93, 0.93, 0.93, 0.935, 0.99]; const PartCD: React.FC<{ f: number }> = ({ f }) => { const showCard = f >= 140; const x = lerp(f, CARD_F, CARD_X); const y = lerp(f, CARD_F, CARD_Y); const s = lerp(f, CARD_F, CARD_S); const speed = Math.abs(lerp(f + 1, CARD_F, CARD_X) - x); const textScale = lerp(f, [122, 165], [1, 1.07]); const bgShift = lerp(f, [158, 170], [0, 1], Easing.inOut(Easing.quad)); return ( <AbsoluteFill> <Spot x={lerp(f, [119, 160], [48, 40])} y={-6} /> {/* After the card lands, the backdrop brightens to an ice-blue sky. */} <AbsoluteFill style={{ opacity: bgShift, background: "linear-gradient(180deg, #c6f2fb 0%, #9fd2ec 35%, #5c8fc2 70%, #1f3a5d 100%)", }} /> {f < 170 && ( <AbsoluteFill style={{ opacity: 1 - bgShift }}> {TICKS.map((tk, i) => ( <Ticker key={i} tk={tk} f={f} /> ))} <Centered y={540} scale={textScale} style={{ filter: `blur(${lerp(f, [156, 164], [0, 3])}px)` }}> <Words f={f} size={78} gap="0" words={[ ["real-", 122], ["world", 125], [" assets", 134], ]} /> </Centered> </AbsoluteFill> )} {showCard && ( <div style={{ position: "absolute", left: 0, top: 0, transformOrigin: "0 0", transform: `translate(${x}px, ${y}px) scale(${s})`, filter: speed > 60 ? `blur(${Math.min(6, speed / 60)}px)` : undefined, }} > {/* Glassy rim */} <div style={{ position: "absolute", left: -12, top: -12, width: DASH_W + 24, height: DASH_H + 24, borderRadius: 52, background: "rgba(225,245,255,0.35)", boxShadow: "0 0 0 1.5px rgba(200,240,255,0.7), 0 30px 80px rgba(10,30,60,0.35)", }} /> <div style={{ position: "relative" }}> <AssetsPage /> {/* Cyan light sweep as the card snaps in */} <div style={{ position: "absolute", inset: 0, borderRadius: 40, opacity: lerp(f, [158, 163, 169], [0, 1, 0]), background: "linear-gradient(120deg, rgba(190,240,255,0) 20%, rgba(190,240,255,0.55) 55%, rgba(220,248,255,0.2) 80%)", }} /> </div> </div> )} </AbsoluteFill> ); }; // ---- E: zoomed table (r190-r227) -------------------------------------------------------- const ROW_H = 100; const HL_F = [190, 193, 196, 199, 205, 214, 223]; const HL_I = [0, 3, 4, 5, 6, 7, 8]; const PartE: React.FC<{ f: number }> = ({ f }) => { const top = 150 - 15 * (f - 190); const hl = Math.floor(lerp(f, HL_F, HL_I) + 1e-6); return ( <AbsoluteFill style={{ background: "#fbfbfd" }}> {ASSETS.map((row, i) => { const on = i === hl; return ( <div key={row.sym} style={{ position: "absolute", left: on ? 45 : 60, top: top + i * ROW_H - 46, transform: on ? "scale(1.01)" : undefined, transformOrigin: "0 50%", }} > <AssetRowView row={row} width={on ? 1900 : 1810} u={2.5} highlight={on} /> </div> ); })} </AbsoluteFill> ); }; export const S2Assets: React.FC = () => { const f = useCurrentFrame(); return ( <AbsoluteFill style={{ fontFamily: FONT, overflow: "hidden", background: "#05080e" }}> {f < 59 && <PartA f={f} />} {f >= 59 && f < 121 && <PartB f={f} />} {f >= 121 && f < 190 && <PartCD f={f} />} {f >= 190 && <PartE f={f} />} </AbsoluteFill> ); };›engine/src/kamino-launch/AssetsPage.tsx
engine/src/kamino-launch/AssetsPage.tsx // The Kamino "Assets" page as a card (same size as the dashboard), plus the asset table // row used both inside the card and in the zoomed, scrolling table shot. import React from "react"; import { Img, staticFile } from "remotion"; import { ArrowRightLeft, Boxes, ChevronDown, CircleDot, Coins, FileText, Filter, Home, Landmark, LayoutGrid, Layers, Link2, MessageSquareText, PieChart, Search, Sparkles, Sun, Wallet, Briefcase, } from "lucide-react"; import { DASH_H, DASH_W, KaminoMark } from "./Dashboard"; import { C, FONT } from "./theme"; const MONO = "ui-monospace, SFMono-Regular, Menlo, monospace"; type Icon = { bg: string; fg?: string; text?: string; img?: string; ring?: string }; export type AssetRow = { sym: string; name: string; icon: Icon; cls: string; sub: string; issuer: string; issuerIcon: Icon; yld: string; yoy: string; tvl: string; }; const BACKED: Icon = { bg: "#222", text: "◬", fg: "#fff" }; const JUPI: Icon = { bg: "conic-gradient(#c7f284,#00bef0,#1c2a3c,#c7f284)" }; const HASTRA: Icon = { bg: "#1b1f3b", text: "H", fg: "#fff" }; // Scroll order of the zoomed table (the card shows the TVL-sorted top three). export const ASSETS: AssetRow[] = [ { sym: "AAPLx", name: "Apple xStock", icon: { bg: "#111", img: "kamino-launch/apple_dark.svg" }, cls: "Equities", sub: "Stocks", issuer: "Backed Assets", issuerIcon: BACKED, yld: "–", yoy: "+25.1%", tvl: "–" }, { sym: "NVDAx", name: "NVIDIA xStock", icon: { bg: "#5fd35a", img: "kamino-launch/nvidia-icon-light.svg" }, cls: "Equities", sub: "Stocks", issuer: "Backed Assets", issuerIcon: BACKED, yld: "–", yoy: "-0.2%", tvl: "–" }, { sym: "SPYx", name: "SP500 xStock", icon: { bg: "#e0122b", text: "▬", fg: "#fff" }, cls: "Equities", sub: "Equity ETFs", issuer: "Backed Assets", issuerIcon: BACKED, yld: "–", yoy: "+10.3%", tvl: "–" }, { sym: "HYPE", name: "Hyperliquid", icon: { bg: "#fff", text: "∞", fg: "#5fd8c4" }, cls: "Crypto", sub: "Native tokens", issuer: "Hyperliquid", issuerIcon: { bg: "#fff", text: "∞", fg: "#5fd8c4" }, yld: "–", yoy: "–", tvl: "–" }, { sym: "BUIDL", name: "BlackRock USD Institutional Digital Liquidity Fund", icon: { bg: "#000", text: "BUIDL", fg: "#fff" }, cls: "Fixed income", sub: "Money market funds", issuer: "BlackRock", issuerIcon: { bg: "#000" }, yld: "3.76%", yoy: "+3.6%", tvl: "–" }, { sym: "JUP", name: "Jupiter", icon: JUPI, cls: "Crypto", sub: "Governance tokens", issuer: "Jupiter", issuerIcon: JUPI, yld: "–", yoy: "-33.2%", tvl: "–" }, { sym: "JLP", name: "Jupiter Perps Liquidity Provider", icon: { ...JUPI, text: "LP", fg: "#c7f284" }, cls: "Crypto", sub: "Liquidity pool tokens", issuer: "Jupiter", issuerIcon: JUPI, yld: "–", yoy: "-17.4%", tvl: "–" }, { sym: "USDY", name: "Ondo U.S. Dollar Yield", icon: { bg: "#fff", text: "S", fg: "#1a2a6c", ring: "#1a2a6c" }, cls: "Fixed income", sub: "Treasury-backed notes", issuer: "Ondo Stocks", issuerIcon: { bg: "#fff", text: "◎", fg: "#111" }, yld: "3.16%", yoy: "+3.6%", tvl: "–" }, { sym: "cbBTC", name: "Coinbase Wrapped BTC", icon: { bg: "#f7b733", img: "kamino-launch/btc.svg" }, cls: "Crypto", sub: "Wrapped assets", issuer: "Coinbase", issuerIcon: { bg: "#fff", img: "kamino-launch/coinbase.svg" }, yld: "–", yoy: "-30.7%", tvl: "–" }, { sym: "ONyc", name: "OnRe Tokenized Reinsurance", icon: { bg: "#f3c12e", text: "●", fg: "#111" }, cls: "Alternatives", sub: "Specialty finance › Reinsurance", issuer: "OnRe", issuerIcon: { bg: "#fff", text: "◉", fg: "#111" }, yld: "10.46%", yoy: "+11.3%", tvl: "–" }, { sym: "AUTO", name: "AUTO", icon: { bg: "linear-gradient(135deg,#7be38d,#22a35a)", text: "A", fg: "#0b3d1d" }, cls: "Fixed income", sub: "Private credit", issuer: "Hastra", issuerIcon: HASTRA, yld: "10.09%", yoy: "–", tvl: "$103.81M" }, { sym: "PRIME", name: "PRIME", icon: { bg: "linear-gradient(135deg,#c79bff,#7b3ff2)", text: "P", fg: "#fff" }, cls: "Fixed income", sub: "Private credit", issuer: "Hastra", issuerIcon: HASTRA, yld: "6.11%", yoy: "–", tvl: "$116.68M" }, { sym: "kiUSDC", name: "Kamino Institutional USDC", icon: { bg: "#fff", text: "$", fg: "#0d1b2a", ring: "#0d1b2a" }, cls: "Fixed income", sub: "Private credit", issuer: "Kamino Foundation", issuerIcon: { bg: "#13233a", text: "k", fg: "#fff" }, yld: "5.13%", yoy: "+5.1%", tvl: "$1.06B" }, { sym: "jitoSOL", name: "Jito Staked SOL", icon: { bg: "linear-gradient(135deg,#bff3c9,#3fcf86)", text: "≡", fg: "#fff" }, cls: "Crypto", sub: "Liquid staking", issuer: "Jito Foundation", issuerIcon: { bg: "#111", text: "✺", fg: "#fff" }, yld: "–", yoy: "-41.7%", tvl: "$2.14B" }, ]; const bySym = (s: string) => ASSETS.find((a) => a.sym === s)!; export const CARD_ROWS = [bySym("jitoSOL"), bySym("kiUSDC"), bySym("PRIME")]; export const TokenIcon: React.FC<{ icon: Icon; size: number }> = ({ icon, size }) => ( <div style={{ width: size, height: size, borderRadius: size / 2, background: icon.bg, border: icon.ring ? `${size * 0.07}px solid ${icon.ring}` : undefined, boxSizing: "border-box", display: "flex", alignItems: "center", justifyContent: "center", color: icon.fg, fontWeight: 700, fontSize: icon.text && icon.text.length > 2 ? size * 0.26 : size * 0.5, flexShrink: 0, overflow: "hidden", }} > {icon.img ? <Img src={staticFile(icon.img)} style={{ width: size * 0.6, height: size * 0.6 }} /> : icon.text} </div> ); const tone = (v: string) => (v.startsWith("+") ? C.green : v.startsWith("-") ? "#e2552e" : C.ink); // One table row, `u` = px per design unit (1 in the card, ~2.4 in the zoom shot). // Columns are fractions of `width`. export const AssetRowView: React.FC<{ row: AssetRow; width: number; u: number; highlight?: boolean }> = ({ row, width, u, highlight, }) => ( <div style={{ position: "relative", width, height: 40 * u, background: highlight ? "#e2f5fc" : "#fff", borderRadius: 4 * u, boxShadow: `0 ${0.6 * u}px ${1.5 * u}px rgba(20,40,70,0.06)`, fontFamily: FONT, color: C.ink, }} > <div style={{ position: "absolute", left: 0.012 * width, top: 9 * u }}> <TokenIcon icon={row.icon} size={22 * u} /> </div> <div style={{ position: "absolute", left: 0.042 * width, top: 6.5 * u, fontSize: 9 * u, fontWeight: 500 }}>{row.sym}</div> <div style={{ position: "absolute", left: 0.043 * width, top: 20.5 * u, fontSize: 7.4 * u, color: C.muted, whiteSpace: "nowrap" }}> {row.name} </div> <div style={{ position: "absolute", left: 0.285 * width, top: 6.5 * u, fontSize: 9 * u, fontWeight: 500 }}>{row.cls}</div> <div style={{ position: "absolute", left: 0.285 * width, top: 20.5 * u, fontSize: 8.4 * u, color: C.muted }}>{row.sub}</div> <div style={{ position: "absolute", left: 0.47 * width, top: 13 * u, fontSize: 9 * u, fontWeight: 500, display: "flex", alignItems: "center", gap: 3 * u }}> <TokenIcon icon={row.issuerIcon} size={9 * u} /> {row.issuer} </div> {( [ [row.yld, 0.78], [row.yoy, 0.87], [row.tvl, 0.985], ] as Array<[string, number]> ).map(([v, x], i) => ( <div key={i} style={{ position: "absolute", right: (1 - x) * width, top: 13 * u, fontSize: 9 * u, fontFamily: i > 0 && v !== "–" ? MONO : FONT, fontWeight: i === 2 ? 600 : 400, color: i === 1 ? tone(v) : C.ink, }} > {v} </div> ))} </div> ); const Nav: React.FC<{ icon: React.ReactNode; label: string; active?: boolean }> = ({ icon, label, active }) => ( <div style={{ width: 88, height: 70, borderRadius: 8, background: active ? "#e9eaef" : "transparent", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: 8, fontSize: 15, }} > {icon} {label} </div> ); export const AssetsPage: React.FC = () => ( <div style={{ width: DASH_W, height: DASH_H, background: C.card, borderRadius: 40, position: "relative", overflow: "hidden", fontFamily: FONT, color: C.ink, }} > {/* Sidebar */} <div style={{ position: "absolute", left: 0, top: 0, bottom: 0, width: 110, background: "#f3f3f6" }}> <div style={{ position: "absolute", left: 38, top: 30 }}> <KaminoMark size={34} /> </div> <div style={{ position: "absolute", left: 11, top: 236, display: "flex", flexDirection: "column", gap: 4 }}> <Nav icon={<Home size={20} fill={C.ink} />} label="Home" /> <Nav icon={<CircleDot size={20} />} label="Earn" /> <Nav icon={<Wallet size={20} />} label="Borrow" /> <Nav icon={<Layers size={20} />} label="Multiply" /> <Nav icon={<ArrowRightLeft size={20} />} label="Swap" /> <Nav icon={<Briefcase size={20} fill={C.ink} />} label="Assets" active /> </div> <FileText size={20} style={{ position: "absolute", left: 45, bottom: 100 }} /> <Sun size={20} style={{ position: "absolute", left: 45, bottom: 44 }} /> </div> {/* Search + wallet */} <div style={{ position: "absolute", left: 720, top: 22, width: 412, height: 44, borderRadius: 8, background: "#f3f3f6", display: "flex", alignItems: "center", gap: 12, padding: "0 16px", fontSize: 16, color: "#555b66", }} > <Sparkles size={17} color="#9aa0aa" /> Search vaults, markets, tokens... <span style={{ marginLeft: "auto", fontSize: 13 }}>⌘ K</span> </div> <div style={{ position: "absolute", right: 66, top: 28, height: 34, padding: "0 14px", borderRadius: 7, background: "#fff", boxShadow: "0 1px 4px rgba(0,0,0,0.1)", display: "flex", alignItems: "center", gap: 9, fontSize: 16, }} > <div style={{ width: 9, height: 9, borderRadius: 5, background: "#1fd66b" }} /> 6EoV...A92t <ChevronDown size={15} /> </div> {/* Banner */} <div style={{ position: "absolute", left: 194, top: 95, width: 1520, height: 358, borderRadius: 8, overflow: "hidden", background: "radial-gradient(60% 90% at 88% 10%, #cfeef8 0%, rgba(140,190,225,0.6) 30%, rgba(60,100,150,0) 70%), radial-gradient(60% 80% at 40% 110%, #0d1520 0%, rgba(13,21,32,0) 70%), linear-gradient(180deg,#5a83b4,#2c4f7b)", color: "#fff", }} > <div style={{ position: "absolute", left: 38, top: 34, fontSize: 60, fontWeight: 500, letterSpacing: -1 }}>Assets</div> <div style={{ position: "absolute", left: 37, top: 196, fontSize: 16, lineHeight: 1.45 }}> Explore crypto, equities, fixed income and commodities. <br /> Compare assets and invest directly on Kamino. </div> </div> {/* Explore */} <div style={{ position: "absolute", left: 194, top: 512, fontSize: 23, fontWeight: 500 }}>Explore assets</div> <div style={{ position: "absolute", left: 194, top: 556, fontSize: 17, color: "#5b6170" }}> Browse assets by class and refine your selection by subcategory. </div> <div style={{ position: "absolute", left: 194, top: 616, display: "flex", gap: 10, fontSize: 16, color: "#4a5160" }}> {( [ [<LayoutGrid key="a" size={16} />, "All assets"], [<Landmark key="b" size={16} />, "Fixed income"], [<PieChart key="c" size={16} />, "Equities"], [<Boxes key="d" size={16} />, "Commodities"], [<Link2 key="e" size={16} />, "Crypto"], [<Coins key="f" size={16} />, "Alternatives"], ] as Array<[React.ReactNode, string]> ).map(([ic, t], i) => ( <div key={t} style={{ display: "flex", alignItems: "center", gap: 8, padding: "7px 14px", borderRadius: 7, background: i === 0 ? "#e8f0fc" : "transparent", color: i === 0 ? "#3366cc" : undefined, }} > {ic} {t} </div> ))} <div style={{ display: "flex", alignItems: "center", gap: 6, padding: "7px 14px" }}> More <ChevronDown size={14} /> </div> </div> <div style={{ position: "absolute", left: 1310, top: 614, width: 228, height: 32, borderRadius: 6, border: "1px solid #e6e7ec", display: "flex", alignItems: "center", gap: 10, padding: "0 12px", fontSize: 15, color: "#7b8190", }} > <Search size={15} /> Search assets... </div> <div style={{ position: "absolute", left: 1552, top: 614, height: 32, padding: "0 12px", borderRadius: 6, border: "1px solid #e6e7ec", display: "flex", alignItems: "center", gap: 8, fontSize: 14, }} > <Filter size={14} /> Filters </div> {/* Table */} <div style={{ position: "absolute", left: 194, top: 660, width: 1520, height: 400, background: "#f6f6f9", borderRadius: 8 }}> <div style={{ position: "relative", height: 48, fontSize: 13.5, color: "#7b8190" }}> {( [ ["Asset", 0.016, "l"], ["Asset class", 0.29, "l"], ["Issuer", 0.47, "l"], ["Yield", 0.73, "r"], ["YoY", 0.825, "r"], ["TVL on Solana", 0.985, "r"], ] as Array<[string, number, string]> ).map(([t, x, a]) => ( <span key={t} style={{ position: "absolute", top: 17, ...(a === "l" ? { left: x * 1520 } : { right: (1 - x) * 1520 }) }}> {t} </span> ))} </div> <div style={{ display: "flex", flexDirection: "column", gap: 3, padding: "0 4px" }}> {CARD_ROWS.map((r) => ( <AssetRowView key={r.sym} row={r} width={1512} u={1.88} /> ))} </div> </div> <div style={{ position: "absolute", right: 26, bottom: 30, padding: "10px 16px", borderRadius: 10, background: "#fff", boxShadow: "0 1px 6px rgba(0,0,0,0.12)", display: "flex", alignItems: "center", gap: 10, fontSize: 17, fontWeight: 500, }} > <MessageSquareText size={17} /> Give feedback </div> </div> );›engine/src/kamino-launch/S3Orbit.tsx
engine/src/kamino-launch/S3Orbit.tsx // Section 3 (0:16.1-0:19.7): the "RWAs" pill pops in, a dotted orbit swings open around // it (keyframed ellipse size / flatness / angle fakes the 3D tilt) while stray dots fly // onto it, labels type in at the nodes, the orbit drifts, then it collapses onto the pill // and the camera punches through the pill into section 4. import React from "react"; import { AbsoluteFill, Easing, interpolate, useCurrentFrame } from "remotion"; import { Landmark } from "lucide-react"; import { FONT } from "./theme"; import { NODE_TRACKS, ORBIT, TRACK_NODE, TRACK_PHI45 } from "./orbitData"; export const S3_FRAMES = 107; const clamp = { extrapolateLeft: "clamp", extrapolateRight: "clamp" } as const; const lerp = (f: number, input: number[], output: number[], easing?: (t: number) => number) => interpolate(f, input, output, { ...clamp, easing }); // The ring and dots replay per-frame data measured from the reference (orbitData.ts): // an ellipse fitted to the dashes on every frame, and each dot tracked until it lands. // Index the tables with idx = section frame + 1 (the reference cuts one frame later). const NODES: Array<{ phi: number; label?: string; t: number }> = [ { phi: 150, label: "Commodity trade", t: 33 }, { phi: 212, label: "Home Loans", t: 35 }, { phi: 253, label: "Credit", t: 38 }, { phi: 288, t: 0 }, { phi: 330, label: "Reinsurance", t: 39 }, { phi: 32, label: "Gold", t: 40 }, { phi: 73, label: "Tokenized Stocks", t: 31 }, { phi: 108, t: 0 }, ]; const sample = <T extends number[]>(table: T[], idx: number): number[] => { const i = Math.max(0, Math.min(table.length - 1.001, idx)); const a = table[Math.floor(i)]; const b = table[Math.floor(i) + 1] ?? a; const t = i - Math.floor(i); return a.map((v, k) => v + (b[k] - v) * t); }; const orbitAt = (idx: number) => { const [R, r, th, cx, cy] = sample(ORBIT, idx); return { R, r, th, cx, cy }; }; const onOrbit = (o: ReturnType<typeof orbitAt>, phiDeg: number) => { const th = (o.th * Math.PI) / 180; const p = (phiDeg * Math.PI) / 180; const a = o.R * Math.cos(p); const b = o.r * Math.sin(p); return { x: o.cx + a * Math.cos(th) - b * Math.sin(th), y: o.cy + a * Math.sin(th) + b * Math.cos(th) }; }; // Node k (NODES order) in screen space at table index idx. const nodePos = (k: number, idx: number) => { const tr = TRACK_NODE.indexOf(k); const o = orbitAt(idx); // angle: measured at idx45, eased onto the fitted resting angle by idx63, then a slow creep const p45 = TRACK_PHI45[tr]; let target = NODES[k].phi; while (target - p45 > 180) target -= 360; while (target - p45 < -180) target += 360; const phi = idx <= 63 ? p45 + (target - p45) * interpolate(idx, [45, 63], [0, 1], { ...clamp, easing: Easing.inOut(Easing.sin) }) : target + (idx - 63) * 0.12; const ring = onOrbit(o, phi); if (idx >= 50) return ring; const tp = sample(NODE_TRACKS[tr], Math.min(45, idx)); const k2 = interpolate(idx, [44, 50], [0, 1], { ...clamp, easing: Easing.inOut(Easing.sin) }); return { x: tp[0] + (ring.x - tp[0]) * k2, y: tp[1] + (ring.y - tp[1]) * k2 }; }; // Pill centre y and width (px, incl. rim) measured per frame; scale = width / 314. const PILL_I = [1, 2, 3, 5, 7, 9, 12, 14, 16, 19, 22, 24, 27, 28, 30, 32, 34, 50, 84, 86, 90, 93, 97, 100, 103, 105, 106, 107, 108]; const PILL_Y = [716, 684, 644, 619, 592, 580, 576, 565, 559, 555, 551, 550, 546, 542, 544, 544, 543, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540]; const PILL_W = [390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 388, 386, 377, 361, 340, 332, 314, 315, 320, 336, 358, 400, 442, 493, 660, 850, 1100, 1900]; const Pill: React.FC<{ f: number }> = ({ f }) => { const content = lerp(f, [2, 6], [0, 1]); const dark = lerp(f, [104, 106], [0, 1]); // turns smoky as the camera punches through return ( <div style={{ width: 316, height: 112, borderRadius: 30, padding: 6, boxSizing: "border-box", background: `rgba(${210 - 150 * dark},${225 - 150 * dark},${240 - 140 * dark},${0.35 + 0.1 * dark})`, boxShadow: "0 0 0 1.5px rgba(210,230,250,0.35), 0 10px 30px rgba(0,0,0,0.25)", }} > <div style={{ width: "100%", height: "100%", borderRadius: 24, background: content < 1 ? `rgba(${188 + 27 * content},${215 + 10 * content},${246 - 6 * content},1)` : `linear-gradient(180deg, rgba(${226 - 170 * dark},${233 - 165 * dark},${241 - 150 * dark},${1 - 0.65 * dark}), rgba(${208 - 160 * dark},${220 - 160 * dark},${234 - 150 * dark},${1 - 0.65 * dark}))`, display: "flex", alignItems: "center", justifyContent: "center", gap: 26, color: "#4677bf", opacity: 1, }} > <div style={{ opacity: content, display: "flex", alignItems: "center", gap: 26 }}> <Landmark size={58} strokeWidth={2.2} /> <span style={{ fontSize: 54, fontWeight: 500, letterSpacing: -0.5 }}>RWAs</span> </div> </div> </div> ); }; export const S3Orbit: React.FC = () => { const f = useCurrentFrame(); const idx = f + 1; const o = orbitAt(idx); const collapse = lerp(idx, [103, 106], [0, 1], Easing.in(Easing.quad)); const pillY = lerp(idx, PILL_I, PILL_Y); const pillS = lerp(idx, PILL_I, PILL_W) / 314; const pillBlur = lerp(idx, [106, 108], [0, 8]); const ringIn = lerp(idx, [1, 3], [0, 1]); return ( <AbsoluteFill style={{ fontFamily: FONT, overflow: "hidden", background: "#0a1220" }}> {/* Backdrop: lights in the top-left and right, dark diagonal through the middle. */} <AbsoluteFill style={{ background: `radial-gradient(45% 60% at ${lerp(f, [0, 60], [0, 2])}% 0%, rgba(178,224,246,0.95) 0%, rgba(74,124,186,0.7) 40%, rgba(20,40,70,0) 80%), radial-gradient(55% 75% at 100% ${lerp(f, [25, 70], [100, 45])}%, rgba(178,230,250,0.95) 0%, rgba(84,140,204,0.8) 35%, rgba(30,60,100,0) 80%), linear-gradient(135deg, #2a4d7c 0%, #0c1626 45%, #060a12 70%, #1c3a64 100%)`, }} /> {idx < 107 && ( <svg width={1920} height={1080} style={{ position: "absolute", inset: 0, opacity: 1 - collapse * 0.6 }}> <ellipse cx={o.cx} cy={o.cy} rx={o.R} ry={o.r} transform={`rotate(${o.th} ${o.cx} ${o.cy})`} fill="none" stroke="#eef6ff" strokeWidth={lerp(idx, [1, 6], [4, 7])} strokeLinecap="round" // dash spacing tracks the ring's size so the dot count stays ~constant strokeDasharray={`0.1 ${Math.max(10, (Math.PI * (o.R + o.r)) / 62)}`} opacity={0.95 * ringIn} /> {NODES.map((_, k) => { const p = nodePos(k, idx); return <circle key={k} cx={p.x} cy={p.y} r={lerp(idx, [1, 9], [9, 15])} fill="#f2f8ff" opacity={lerp(idx, [1, 3], [0.4, 1])} />; })} </svg> )} {idx < 107 && NODES.map((n, k) => { if (!n.label || f < n.t) return null; const p = nodePos(k, idx); const chars = Math.min(n.label.length, Math.floor((f - n.t) * 1.4) + 1); return ( <div key={k} style={{ position: "absolute", left: p.x, top: p.y - 56, transform: `translate(-50%, -50%) scale(${1 - 0.5 * collapse})`, fontSize: 46, fontWeight: 500, color: "#f1f7ff", whiteSpace: "pre", opacity: 1 - collapse, textShadow: "0 0 12px rgba(160,210,255,0.35)", }} > <span>{n.label.slice(0, chars)}</span> <span style={{ opacity: 0 }}>{n.label.slice(chars)}</span> </div> ); })} <div style={{ position: "absolute", left: 960, top: pillY, transform: `translate(-50%, -50%) scale(${pillS})`, filter: pillBlur > 0 ? `blur(${pillBlur}px)` : undefined, opacity: lerp(idx, [107, 108], [1, 0.6]), }} > <Pill f={idx - 1} /> </div> </AbsoluteFill> ); };›engine/src/kamino-launch/orbitData.ts
engine/src/kamino-launch/orbitData.ts // Generated from the reference video: ellipse fitted to the orbit dashes on every // frame of section 3 (idx = section frame), and the 8 node dots tracked until they // land on the orbit (idx 0-45). Do not edit by hand. export const ORBIT: Array<[number, number, number, number, number]> = [ [95.2, 56.0, 31.9, 929.0, 537.0], [108.8, 64.0, 31.9, 929.0, 537.0], [122.4, 72.0, 31.9, 929.0, 537.0], [135.1, 79.0, 32.7, 929.0, 537.0], [146.7, 84.7, 33.8, 929.0, 537.0], [156.7, 89.0, 35.3, 929.0, 537.0], [166.0, 92.7, 36.2, 928.7, 537.0], [174.3, 96.0, 37.1, 928.3, 536.7], [182.0, 99.0, 37.9, 928.0, 536.3], [189.7, 101.7, 38.7, 928.0, 536.0], [196.7, 104.3, 39.5, 928.0, 536.0], [203.3, 106.7, 40.3, 928.0, 536.0], [208.7, 108.7, 41.0, 928.0, 535.7], [214.7, 110.3, 41.7, 928.3, 536.0], [220.0, 111.7, 42.3, 928.7, 536.0], [223.7, 113.0, 43.0, 928.3, 536.0], [225.7, 114.0, 43.8, 928.0, 535.3], [227.7, 115.3, 44.6, 928.0, 535.3], [230.0, 117.0, 45.6, 928.7, 535.3], [232.7, 119.0, 46.8, 929.0, 535.0], [236.0, 121.3, 48.1, 929.7, 535.0], [239.7, 123.7, 49.8, 930.0, 534.7], [244.0, 126.3, 51.7, 930.7, 534.7], [248.3, 129.3, 54.2, 931.0, 534.0], [254.3, 133.3, 57.0, 932.0, 534.0], [261.7, 138.3, 60.5, 933.3, 534.0], [271.0, 144.3, 64.8, 935.0, 534.3], [282.7, 151.7, 70.3, 937.3, 535.0], [298.0, 161.3, 77.4, 940.3, 536.3], [319.7, 174.0, 86.8, 944.0, 538.3], [347.3, 188.0, 96.8, 947.7, 540.3], [377.0, 201.0, 105.8, 951.0, 542.3], [403.0, 211.3, 112.5, 953.3, 543.7], [423.7, 219.7, 117.6, 955.3, 545.0], [440.0, 226.3, 121.6, 956.7, 546.0], [453.3, 232.0, 124.8, 958.0, 546.7], [464.7, 236.3, 127.5, 959.0, 547.3], [474.3, 240.3, 129.7, 960.0, 548.0], [482.7, 243.7, 131.6, 960.7, 548.7], [495.0, 246.3, 132.8, 963.3, 546.0], [504.6, 247.8, 133.7, 967.2, 542.2], [512.2, 249.6, 134.8, 970.6, 538.6], [519.0, 250.8, 135.9, 975.6, 533.4], [522.4, 252.4, 137.0, 979.6, 529.8], [528.0, 254.0, 138.1, 984.0, 525.4], [531.0, 254.8, 138.9, 987.0, 523.4], [534.2, 256.4, 139.6, 988.4, 521.6], [539.2, 257.0, 140.0, 989.6, 521.8], [543.2, 257.4, 140.5, 990.2, 522.8], [544.6, 257.6, 140.8, 990.4, 524.4], [549.6, 259.0, 140.9, 989.6, 525.4], [555.2, 258.4, 141.2, 990.2, 527.4], [558.2, 259.8, 141.3, 987.6, 530.4], [564.0, 260.8, 141.2, 984.8, 532.8], [566.8, 263.4, 141.4, 980.4, 536.0], [566.0, 265.6, 142.0, 976.2, 541.2], [564.2, 268.8, 142.6, 971.4, 545.6], [565.8, 271.6, 143.4, 966.4, 548.8], [564.2, 274.4, 143.9, 963.6, 551.2], [562.8, 275.8, 144.5, 962.4, 553.6], [565.8, 276.6, 144.6, 962.4, 553.4], [568.2, 277.8, 144.7, 962.8, 553.4], [569.2, 278.8, 144.8, 964.2, 553.6], [569.6, 279.8, 145.1, 964.8, 554.2], [572.0, 280.8, 145.2, 964.6, 554.2], [573.9, 282.3, 145.2, 964.6, 554.4], [576.2, 283.4, 145.3, 964.5, 554.5], [577.1, 284.3, 145.1, 965.4, 554.2], [579.6, 285.6, 145.2, 965.3, 554.3], [581.9, 286.9, 145.2, 965.4, 554.4], [584.1, 288.1, 145.2, 965.6, 554.6], [586.4, 289.4, 145.2, 965.7, 554.7], [588.7, 290.7, 145.3, 966.0, 554.5], [590.9, 291.9, 145.5, 966.3, 553.9], [593.1, 293.0, 145.7, 966.8, 553.0], [595.2, 294.1, 145.9, 967.4, 551.7], [597.4, 295.2, 146.2, 968.1, 550.1], [599.5, 296.2, 146.5, 968.8, 548.4], [601.6, 297.3, 146.9, 969.5, 546.8], [603.7, 298.4, 147.2, 970.2, 545.1], [605.8, 299.4, 147.5, 970.9, 543.5], [607.9, 300.5, 147.8, 971.6, 541.8], [610.1, 301.5, 148.1, 972.4, 540.2], [612.2, 302.6, 148.4, 973.1, 538.5], [614.3, 303.6, 148.7, 973.8, 536.9], [616.4, 304.7, 149.0, 974.5, 535.2], [618.5, 305.8, 149.4, 975.2, 533.6], [620.6, 306.8, 149.7, 975.9, 531.9], [622.8, 307.9, 150.0, 976.6, 530.3], [624.8, 307.6, 150.6, 975.8, 528.7], [626.6, 306.1, 151.5, 973.4, 527.1], [625.3, 303.1, 152.5, 969.3, 525.2], [621.9, 299.3, 154.1, 965.4, 523.3], [616.3, 294.0, 156.0, 962.3, 521.5], [608.6, 288.5, 158.0, 961.5, 519.8], [595.2, 282.9, 160.1, 962.5, 518.0], [584.0, 277.2, 162.3, 966.2, 516.7], [546.3, 271.3, 165.8, 948.7, 518.7], [492.7, 265.0, 169.4, 938.7, 518.7], [437.3, 258.0, 173.3, 927.7, 520.0], [398.3, 244.7, 179.1, 937.3, 521.0], [378.3, 234.0, 184.2, 938.0, 524.3], [369.0, 226.0, 188.2, 939.0, 527.0], [369.0, 226.0, 188.2, 939.0, 527.0], [369.0, 226.0, 188.2, 939.0, 527.0], [369.0, 226.0, 188.2, 939.0, 527.0], [369.0, 226.0, 188.2, 939.0, 527.0], [369.0, 226.0, 188.2, 939.0, 527.0], [369.0, 226.0, 188.2, 939.0, 527.0], ]; export const NODE_TRACKS: Array<Array<[number, number]>> = [ [[960, 700], [960, 700], [935, 687], [910, 674], [885, 661], [860, 648], [835, 635], [810, 622], [785, 609], [766, 602], [753, 599], [746, 603], [739, 605], [731, 608], [724, 611], [716, 614], [708, 617], [700, 619], [691, 623], [682, 625], [672, 629], [662, 631], [652, 635], [642, 637], [632, 639], [624, 640], [619, 638], [618, 632], [625, 617], [640, 588], [663, 547], [689, 503], [713, 465], [736, 433], [757, 407], [776, 385], [794, 367], [810, 351], [824, 338], [836, 327], [847, 317], [857, 309], [866, 302], [874, 296], [881, 291], [888, 286]], [[960, 700], [960, 700], [931, 638], [903, 576], [874, 514], [845, 452], [816, 390], [788, 328], [770, 283], [762, 256], [765, 246], [768, 236], [772, 227], [776, 218], [781, 209], [787, 201], [794, 193], [802, 186], [810, 178], [819, 169], [828, 159], [839, 148], [850, 136], [863, 123], [879, 110], [897, 97], [918, 85], [944, 76], [978, 73], [1023, 78], [1073, 91], [1124, 108], [1167, 127], [1203, 147], [1235, 168], [1262, 188], [1286, 208], [1306, 227], [1322, 244], [1336, 259], [1349, 272], [1361, 284], [1372, 296], [1381, 306], [1388, 315], [1394, 322]], [[960, 700], [960, 700], [958, 732], [956, 756], [953, 772], [949, 779], [943, 786], [935, 794], [925, 802], [913, 813], [899, 825], [882, 839], [864, 853], [846, 868], [826, 884], [805, 900], [784, 915], [763, 930], [742, 945], [720, 960], [699, 973], [678, 986], [659, 996], [641, 1003], [625, 1006], [614, 1003], [608, 990], [609, 965], [615, 925], [624, 873], [630, 817], [634, 765], [636, 724], [637, 689], [638, 659], [641, 633], [643, 610], [646, 590], [648, 572], [650, 556], [651, 543], [653, 532], [654, 522], [655, 513], [656, 505], [658, 498]], [[960, 700], [960, 700], [953, 657], [946, 614], [938, 570], [931, 527], [926, 497], [922, 480], [919, 476], [916, 472], [913, 468], [910, 464], [906, 461], [902, 458], [898, 455], [894, 453], [891, 450], [888, 447], [884, 444], [879, 441], [874, 437], [868, 432], [862, 426], [855, 419], [848, 410], [840, 399], [832, 387], [825, 371], [822, 349], [831, 320], [852, 287], [883, 255], [916, 228], [946, 210], [975, 197], [1001, 190], [1026, 183], [1050, 178], [1073, 174], [1092, 171], [1109, 169], [1123, 168], [1138, 167], [1151, 166], [1164, 166], [1176, 166]], [[960, 700], [960, 700], [938, 756], [925, 797], [919, 822], [921, 832], [922, 841], [922, 850], [921, 858], [920, 867], [919, 875], [917, 882], [915, 889], [913, 896], [911, 902], [909, 907], [906, 912], [902, 917], [899, 921], [895, 927], [893, 932], [889, 939], [887, 946], [883, 954], [881, 961], [878, 968], [876, 973], [873, 976], [865, 976], [845, 971], [814, 964], [776, 955], [740, 943], [707, 928], [679, 912], [654, 895], [633, 879], [614, 865], [600, 852], [586, 839], [574, 827], [564, 816], [554, 806], [547, 797], [540, 788], [534, 780]], [[960, 700], [960, 700], [954, 587], [952, 511], [954, 473], [959, 471], [964, 470], [968, 469], [972, 467], [976, 465], [980, 463], [984, 460], [988, 458], [993, 455], [997, 454], [1001, 452], [1005, 452], [1011, 450], [1017, 449], [1023, 448], [1031, 447], [1041, 447], [1053, 447], [1066, 449], [1082, 453], [1099, 458], [1118, 464], [1140, 479], [1166, 504], [1184, 542], [1190, 581], [1181, 618], [1169, 649], [1156, 676], [1143, 699], [1130, 718], [1118, 734], [1107, 748], [1096, 762], [1086, 773], [1076, 783], [1068, 792], [1061, 799], [1053, 806], [1046, 812], [1040, 818]], [[960, 700], [960, 700], [1009, 669], [1059, 638], [1092, 619], [1110, 613], [1111, 618], [1112, 624], [1113, 629], [1114, 633], [1112, 638], [1111, 642], [1108, 650], [1106, 656], [1103, 662], [1100, 667], [1097, 671], [1093, 675], [1088, 679], [1084, 683], [1079, 688], [1074, 694], [1070, 701], [1065, 709], [1060, 718], [1054, 729], [1048, 741], [1041, 755], [1033, 774], [1020, 799], [1004, 826], [986, 852], [967, 872], [948, 887], [928, 898], [907, 907], [886, 914], [867, 920], [849, 925], [832, 928], [816, 930], [801, 932], [787, 934], [774, 936], [761, 938], [748, 940]], [[960, 700], [960, 700], [996, 696], [1032, 692], [1069, 688], [1105, 684], [1128, 681], [1139, 679], [1138, 677], [1137, 677], [1136, 676], [1136, 676], [1136, 677], [1136, 677], [1136, 679], [1136, 680], [1137, 682], [1138, 684], [1140, 685], [1142, 686], [1144, 686], [1147, 685], [1150, 683], [1153, 679], [1156, 673], [1159, 663], [1162, 647], [1164, 623], [1167, 592], [1179, 556], [1197, 525], [1220, 502], [1237, 492], [1249, 491], [1257, 496], [1263, 503], [1268, 512], [1271, 522], [1272, 533], [1272, 545], [1272, 557], [1272, 569], [1272, 579], [1271, 589], [1270, 598], [1269, 606]], ]; // Which labelled node (index into NODES) each track becomes, and its angle at idx 45. export const TRACK_NODE = [7, 1, 6, 0, 5, 3, 4, 2]; export const TRACK_PHI45 = [99.1, -151.2, 64.7, 141.3, 23.1, -74.0, -35.8, -107.1];›engine/src/kamino-launch/S4Multiply.tsx
engine/src/kamino-launch/S4Multiply.tsx // Section 4 (0:19.7-0:29.3): "Do more with your assets", the Earn / Borrow / Multiply // carousel on a dotted arc, white dotted orbits around "Multiply", then the Open position // card zooming in. Motion curves are measured per frame off the reference (see the // tables below): arc reveal/erase angles, node rotation, title size/position, the white // orbit circles and side-node tracks, and the card's width / bottom edge. import React from "react"; import { AbsoluteFill, Easing, interpolate, random, useCurrentFrame } from "remotion"; import { ChevronDown, Info, ShieldCheck, ArrowUpDown } from "lucide-react"; import { FONT } from "./theme"; export const S4_FRAMES = 287; const clamp = { extrapolateLeft: "clamp", extrapolateRight: "clamp" } as const; const lerp = (f: number, input: number[], output: number[], easing?: (t: number) => number) => interpolate(f, input, output, { ...clamp, easing }); const MONO = "ui-monospace, SFMono-Regular, Menlo, monospace"; const INK = "#0f141c"; // ---- measured tables -------------------------------------------------------------------- // Carousel circle (fixed) and node spacing. const AC = { x: 950, y: 2132, R: 1382 }; const STEP = 31.4; // Node rotation: angle (deg from top, + = clockwise) of node 0 (Earn). const BASE_F = [62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, 80, 85, 90, 92, 94, 96, 98, 100, 102, 104, 107, 110, 115, 120, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 150, 155, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176]; const BASE_V = [44, 41.5, 38.5, 34.8, 30.2, 25, 19.5, 14.5, 10.2, 6.7, 5.2, 4.2, 2.9, 1.2, 0.2, -1.7, -3, -4.9, -7.5, -10.8, -15.4, -20.2, -23.3, -25.9, -27.6, -29.3, -30.9, -33.6, -35.4, -37.9, -41.6, -46.2, -51.3, -54.8, -57.2, -58.8, -59.5, -60, -60.9, -61.9, -62.7, -63.9, -65.1, -67, -69.7, -73.4, -79.2, -89, -103, -124]; // Arc reveal (leading edge) and erase (trailing edge), screen angle from top. const REV_F = [43, 46, 48, 50, 52, 54, 56, 58, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 76]; const REV_V = [41, 40.1, 39.1, 37.7, 35.6, 32.8, 29, 23.7, 16.7, 7.8, 2.6, -2.8, -8.3, -14, -20.6, -26.5, -31, -34.3, -36.5, -40, -44]; const ERA_F = [164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177]; const ERA_V = [44, 37.5, 36.6, 34.6, 32.2, 29.3, 25.6, 21.1, 15.2, 7.7, -2, -14.3, -29.1, -46]; // "Multiply" title: scale (width / 420), centre x, centre y. const TT_F = [150, 160, 165, 168, 170, 172, 174, 176, 178, 180, 185, 190, 195, 200, 204, 206, 208, 210, 212, 213]; const TT_S = [1, 0.995, 0.981, 0.962, 0.943, 0.919, 0.888, 0.867, 0.855, 0.845, 0.833, 0.821, 0.81, 0.79, 0.769, 0.752, 0.733, 0.7, 0.657, 0.624]; const TT_X = [975, 970, 969, 968, 967, 966, 964, 963, 962, 962, 962, 961, 961, 961, 961, 961, 961, 961, 961, 961]; const TT_Y = [476, 477, 480, 485, 491, 497, 507, 516, 520, 523, 527, 530, 531, 532, 532, 532, 532, 532, 532, 532]; // White orbits (two R=1385 circles, point-symmetric about P): direction phi and distance D. const WO_P = { x: 950, y: 549 }; const WO_F = [168, 172, 176, 180, 185, 190, 195, 200, 204, 206, 208, 210, 212, 214, 216, 218, 220]; const WO_PHI = [164, 160, 156.5, 154, 152.4, 152.8, 152.9, 152.7, 151.5, 150, 147.6, 143.2, 134.7, 127, 119, 111, 103]; const WO_D = [2600, 2350, 2130, 1990, 1900, 1839, 1815, 1809, 1795, 1788, 1770, 1748, 1705, 1680, 1650, 1625, 1600]; // After the card cut: side nodes (each sits on the inner-most point of its circle). const RN_F = [213, 216, 219, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 233, 235, 237, 239, 240, 241, 242, 243, 244, 245, 246, 248, 250, 256, 262, 266, 268, 270, 272, 273, 275, 276, 277, 279, 280, 281, 282, 283, 285, 286]; const RN_X = [2100, 2000, 1900, 1818, 1754, 1720, 1699, 1687, 1679, 1674, 1672, 1671, 1670, 1670, 1668, 1669, 1670, 1671, 1670, 1674, 1674, 1675, 1676, 1676, 1676, 1677, 1678, 1678, 1676, 1677, 1677, 1676, 1676, 1676, 1674, 1673, 1671, 1672, 1672, 1672, 1672, 1672, 1678, 1688]; const RN_Y = [-520, -330, -140, 56, 134, 196, 251, 292, 328, 360, 388, 410, 432, 451, 482, 510, 534, 560, 592, 619, 634, 648, 654, 658, 660, 663, 664, 674, 674, 670, 665, 658, 650, 644, 629, 620, 610, 584, 568, 548, 524, 494, 401, 321]; const LN_F = [213, 218, 221, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 243, 244, 245, 246, 248, 250, 256, 260, 264, 266, 268, 270, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286]; const LN_X = [-60, 40, 95, 128, 147, 161, 173, 181, 188, 194, 200, 205, 209, 212, 216, 219, 222, 226, 229, 234, 239, 242, 243, 243, 243, 243, 244, 244, 244, 245, 245, 246, 248, 250, 251, 250, 250, 250, 250, 251, 252, 252, 252, 251, 250, 244, 234]; const LN_Y = [1500, 1300, 1170, 1058, 1030, 1006, 984, 964, 946, 928, 914, 898, 885, 873, 855, 842, 828, 811, 793, 758, 736, 708, 702, 698, 696, 694, 693, 684, 683, 679, 676, 670, 662, 654, 647, 632, 622, 612, 600, 586, 568, 548, 523, 492, 451, 396, 314]; // Card: white width and bottom edge (px). Design size 984 x 1036, so scale = width / 984. const CD_F = [213, 216, 217, 218, 219, 220, 221, 222, 223, 224, 226, 228, 230, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 246, 248, 250, 252, 256, 260, 262, 264, 266, 268, 270, 272, 274, 276, 278, 279, 280, 281, 282, 283, 284, 285, 286]; const CD_W = [740, 732, 737, 742, 736, 724, 716, 708, 704, 701, 697, 694, 691, 690, 688, 687, 688, 687, 686, 684, 988, 987, 987, 986, 985, 985, 984, 984, 984, 984, 984, 984, 984, 984, 984, 984, 984, 984, 984, 984, 984, 984, 984, 984, 984, 984, 984, 984, 984]; const CD_B = [1000, 990, 965, 942, 930, 926, 918, 918, 914, 912, 912, 910, 904, 900, 898, 890, 884, 876, 864, 814, 963, 908, 872, 854, 844, 836, 828, 822, 818, 816, 813, 812, 810, 808, 804, 799, 792, 782, 772, 758, 744, 717, 700, 682, 655, 624, 583, 527, 445]; const CARD_W = 984; const CARD_H = 1036; // ---- shared bits --------------------------------------------------------------------------- const polar = (deg: number, R = AC.R) => { const a = (deg * Math.PI) / 180; return { x: AC.x + R * Math.sin(a), y: AC.y - R * Math.cos(a) }; }; // Per-letter swap, right to left (old letters leave from the right, new ones arrive from // the right), as in the reference. const SwapWord: React.FC<{ f: number; word: string; inAt: number; outAt?: number; size: number }> = ({ f, word, inAt, outAt, size, }) => { const n = word.length; return ( <span style={{ fontSize: size, fontWeight: 500, letterSpacing: -1.5, whiteSpace: "pre" }}> {word.split("").map((ch, i) => { const fromRight = n - 1 - i; const tIn = inAt + fromRight * 1.2; let a = lerp(f, [tIn, tIn + 5], [0, 1]); let blur = lerp(f, [tIn, tIn + 5], [6, 0]); if (outAt !== undefined) { const tOut = outAt + fromRight * 1.1; a *= lerp(f, [tOut, tOut + 4], [1, 0]); blur += lerp(f, [tOut, tOut + 4], [0, 6]); } const k = lerp(f, [tIn, tIn + 8], [0, 1]); return ( <span key={i} style={{ opacity: a, filter: blur > 0.2 ? `blur(${blur}px)` : undefined, color: `rgb(${Math.round(120 - 105 * k)},${Math.round(140 - 120 * k)},${Math.round(160 - 132 * k)})`, }} > {ch} </span> ); })} </span> ); }; // Carousel icons (stroke drawings matching the reference glyphs). const Icon: React.FC<{ k: number }> = ({ k }) => { const s = { fill: "none", stroke: "#0b0b0d", strokeWidth: 6 } as const; if (k === 0) return ( <svg width={72} height={72} viewBox="0 0 72 72"> <circle cx={36} cy={36} r={31} {...s} /> <path d="M36 22 L50 36 L36 50 L22 36 Z" {...s} /> </svg> ); if (k === 1) return ( <svg width={66} height={66} viewBox="0 0 66 66"> <rect x={4} y={4} width={58} height={58} {...s} /> <path d="M33 16 V46 M21 34 L33 46 L45 34" {...s} /> </svg> ); if (k === 2) return ( <svg width={64} height={56} viewBox="0 0 64 56"> <rect x={6} y={0} width={52} height={7} fill="#0b0b0d" /> <rect x={0} y={14} width={64} height={42} fill="#0b0b0d" /> </svg> ); return ( <svg width={72} height={72} viewBox="0 0 72 72"> <rect x={24} y={4} width={44} height={44} {...s} /> <rect x={4} y={24} width={44} height={44} {...s} /> <path d="M32 46 L40 38 M32 38 h8 v8" {...s} strokeWidth={5} /> </svg> ); }; const ICON_IN = [64, 94, 124, 136]; const TITLES: Array<{ word: string; inAt: number; outAt?: number }> = [ { word: "Earn", inAt: 68, outAt: 87 }, { word: "Borrow", inAt: 92, outAt: 120 }, { word: "Multiply", inAt: 124 }, ]; // ---- backdrops ------------------------------------------------------------------------------- const Sky: React.FC<{ f: number }> = ({ f }) => { // light cyan bowl; corners darken through the "Multiply" beat, then navy for the card const dark = lerp(f, [150, 176, 200, 213, 220], [0, 0.25, 0.2, 0.35, 0.6]); const card = lerp(f, [218, 228], [0, 1]); return ( <> <AbsoluteFill style={{ background: `radial-gradient(${80 - 18 * dark}% ${92 - 20 * dark}% at 52% ${lerp(f, [0, 150, 213], [62, 72, 55])}%, #dcf6fc 0%, #c9edf8 28%, #94c1e4 52%, #5d8ac0 72%, #2a4a78 88%, #0d1626 100%)`, }} /> <AbsoluteFill style={{ opacity: card, background: "radial-gradient(70% 60% at 50% 100%, #d4f4fb 0%, #94c7ea 30%, rgba(80,130,190,0) 70%), linear-gradient(180deg, #0f1c30 0%, #24446f 45%, #4b7fbd 75%, #8cc1e7 100%)", }} /> </> ); }; // ---- parts ------------------------------------------------------------------------------------- const PartA: React.FC<{ f: number }> = ({ f }) => { const words: Array<[string, number, number]> = [ ["Do", 1, 50], ["more", 5, 54], ["with", 10, 58], ["your", 13, 61], ["assets", 17, 63], ]; const spread = lerp(f, [46, 66], [0.26, 0.55], Easing.in(Easing.quad)); return ( <div style={{ position: "absolute", left: 0, right: 0, top: 534, transform: "translateY(-50%)", display: "flex", justifyContent: "center", gap: `${spread}em`, fontSize: 58, fontWeight: 500, letterSpacing: -0.5, }} > {words.map(([w, tin, tout]) => { const k = lerp(f, [tin, tin + 7], [0, 1]); const a = f < tin ? 0 : lerp(f, [tin, tin + 3], [0.2, 1]) * lerp(f, [tout, tout + 6], [1, 0]); return ( <span key={w} style={{ opacity: a, color: `rgb(${Math.round(80 - 64 * k)},${Math.round(130 - 110 * k)},${Math.round(200 - 172 * k)})`, filter: f > tout ? `blur(${lerp(f, [tout, tout + 6], [0, 5])}px)` : undefined, }} > {w} </span> ); })} </div> ); }; const Carousel: React.FC<{ f: number }> = ({ f }) => { if (f < 43 || f > 177) return null; const base = lerp(f, BASE_F, BASE_V); const lead = lerp(f, REV_F, REV_V); // visible from `lead` ... const tail = lerp(f, ERA_F, ERA_V); // ... to `tail` const from = Math.max(-62, lead); const to = Math.min(62, tail); if (to <= from) return null; // dotted arc: dashes fixed to the rotating ring (one per 0.76 deg, as measured) const dots: React.ReactNode[] = []; const stepDeg = 0.73; const phase = ((base % stepDeg) + stepDeg) % stepDeg; for (let a = Math.ceil((from - phase) / stepDeg) * stepDeg + phase; a <= to; a += stepDeg) { const p = polar(a); dots.push(<circle key={a.toFixed(2)} cx={p.x} cy={p.y} r={5.5} fill="#08080a" />); } const nodes = [0, 1, 2, 3].map((k) => { const ang = base + k * STEP; if (ang < from - 0.5 || ang > to + 0.5) return null; const p = polar(ang); const iconA = lerp(f, [ICON_IN[k], ICON_IN[k] + 6], [0, 1]); return ( <React.Fragment key={k}> <circle cx={p.x} cy={p.y} r={18} fill="#060608" /> <foreignObject x={p.x - 40} y={p.y - 132} width={80} height={80} opacity={iconA}> <div style={{ width: 80, height: 80, display: "flex", alignItems: "center", justifyContent: "center" }}> <Icon k={k} /> </div> </foreignObject> </React.Fragment> ); }); return ( <svg width={1920} height={1080} style={{ position: "absolute", inset: 0 }}> {dots} {nodes} </svg> ); }; const Title: React.FC<{ f: number }> = ({ f }) => { if (f < 68 || f >= 221) return null; const base = lerp(f, BASE_F, BASE_V); // before the exit the title rides slightly with the top node const topAng = base - Math.round(base / STEP) * STEP; const cx = f < 150 ? 950 + 0.65 * AC.R * Math.sin((topAng * Math.PI) / 180) : lerp(f, TT_F, TT_X); const cy = f < 150 ? 476 : lerp(f, TT_F, TT_Y); const s = f < 150 ? 1 : lerp(f, [...TT_F, 220], [...TT_S, 0.55]); const fadeOut = lerp(f, [213, 220], [1, 0]); return ( <div style={{ position: "absolute", left: cx, top: cy, transform: `translate(-50%, -50%) scale(${s})`, color: INK, opacity: fadeOut, }} > <div style={{ position: "relative", display: "flex", justifyContent: "center" }}> {TITLES.map((t) => f >= t.inAt - 1 && (t.outAt === undefined || f < t.outAt + t.word.length * 1.1 + 5) ? ( <div key={t.word} style={{ position: "absolute", left: "50%", transform: "translate(-50%, -50%)", whiteSpace: "pre" }}> <SwapWord f={f} word={t.word} inAt={t.inAt} outAt={t.outAt} size={120} /> </div> ) : null, )} </div> </div> ); }; // White dotted orbit circle through screen space. const DotCircle: React.FC<{ cx: number; cy: number; R?: number; spacing?: number }> = ({ cx, cy, R = 1385, spacing = 23 }) => ( <circle cx={cx} cy={cy} r={R} fill="none" stroke="#fff" strokeWidth={7.5} strokeLinecap="round" strokeDasharray={`0.1 ${spacing}`} /> ); const Orbits: React.FC<{ f: number }> = ({ f }) => { if (f < 168) return null; if (f < 221) { const phi = (lerp(f, WO_F, WO_PHI) * Math.PI) / 180; const D = lerp(f, WO_F, WO_D); const dx = D * Math.cos(phi); const dy = D * Math.sin(phi); return ( <svg width={1920} height={1080} style={{ position: "absolute", inset: 0 }}> <DotCircle cx={WO_P.x + dx} cy={WO_P.y + dy} /> <DotCircle cx={WO_P.x - dx} cy={WO_P.y - dy} /> </svg> ); } const r = { x: lerp(f, RN_F, RN_X), y: lerp(f, RN_F, RN_Y) }; const l = { x: lerp(f, LN_F, LN_X), y: lerp(f, LN_F, LN_Y) }; const card = cardBox(f); const conn = lerp(f, [224, 240], [0, 1], Easing.out(Easing.cubic)); const connector = (x0: number, x1: number, y: number) => { const out: React.ReactNode[] = []; const n = Math.floor(Math.abs(x1 - x0) / 27); const dir = Math.sign(x1 - x0); for (let i = 1; i <= n * conn; i++) out.push(<circle key={`${x0}-${i}`} cx={x0 + dir * i * 27} cy={y} r={5} fill="#fff" />); return out; }; return ( <svg width={1920} height={1080} style={{ position: "absolute", inset: 0 }}> <DotCircle cx={r.x + 1385} cy={r.y} /> <DotCircle cx={l.x - 1385} cy={l.y} /> {connector(l.x, card.x0 - 8, l.y)} {connector(r.x, card.x1 + 8, r.y)} <circle cx={l.x} cy={l.y} r={21} fill="#fff" /> <circle cx={r.x} cy={r.y} r={21} fill="#fff" /> </svg> ); }; // Halftone bloom behind "Multiply" as the white orbits arrive. const Halftone: React.FC<{ f: number }> = ({ f }) => { // A ring of white halftone dots bursts out from behind "Multiply" (r172-r186), clears // from the centre outward, then lingers in the corners until ~r200. Measured off the // reference: ~22px pitch, ~6px dots. const a = lerp(f, [171, 175, 188, 200], [0, 1, 0.85, 0]); if (a <= 0) return null; const outer = lerp(f, [171, 174, 177, 180, 186, 195], [120, 300, 520, 800, 1250, 1500], Easing.out(Easing.quad)); const inner = lerp(f, [174, 177, 180, 186, 195], [0, 120, 330, 650, 950]); const mask = `radial-gradient(ellipse ${outer * 1.15}px ${outer}px at 50% 48%, transparent ${(inner / outer) * 100 * 0.85}%, black ${Math.min(95, (inner / outer) * 100 + 18)}%, black 80%, transparent 100%)`; return ( <AbsoluteFill style={{ opacity: a, backgroundImage: "radial-gradient(circle, rgba(255,255,255,0.95) 2.9px, rgba(255,255,255,0) 3.4px)", backgroundSize: "21.5px 21.5px", backgroundPosition: "center", WebkitMaskImage: mask, maskImage: mask, }} /> ); }; // ---- card ---------------------------------------------------------------------------------------- const cardBox = (f: number) => { const w = lerp(f, CD_F, CD_W); const b = lerp(f, CD_F, CD_B); const s = w / CARD_W; return { s, x0: 960 - w / 2, x1: 960 + w / 2, top: b - CARD_H * s }; }; const Box: React.FC<{ style?: React.CSSProperties; children: React.ReactNode }> = ({ style, children }) => ( <div style={{ position: "absolute", left: 87, width: 800, background: "#f6f6f8", borderRadius: 14, ...style }}>{children}</div> ); const OpenPosition: React.FC<{ f: number }> = ({ f }) => { const amount = Math.round(lerp(f, [220, 222, 224, 226, 228, 230, 232], [0, 195, 448, 843, 962, 977, 980])); const pos = lerp(f, [230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250], [0, 0.006, 0.02, 0.05, 0.1, 0.235, 0.385, 0.445, 0.48, 0.488, 0.49]); const lev = 1.1 + 0.9 * (pos / 0.49); const levTxt = lev >= 1.995 ? "2x" : `${lev.toFixed(2).replace(/0$/, "")}x`; // distance from the button's centre (0 = middle, 1 = ends) of the blue band's edges const outer = lerp(f, [254, 256, 260, 264], [-0.2, 0.25, 0.9, 1.6]); const inner = lerp(f, [261, 264, 268, 272, 277], [-0.45, 0.02, 0.3, 0.55, 1.4]); const sweep = f >= 254 && f < 277; const stops: string[] = []; for (let i = 0; i <= 40; i++) { const x = i / 40; const d = Math.abs(x - 0.5) * 2; const soft = 0.45; const k = Math.max(0, Math.min(1, (outer - d) / soft)) * Math.max(0, Math.min(1, (d - inner) / soft)); const blue = [72, 128, 205]; const ink = [14, 14, 17]; const c = ink.map((v, j) => Math.round(v + (blue[j] - v) * k)); stops.push(`rgb(${c.join(",")}) ${(x * 100).toFixed(1)}%`); } return ( <div style={{ width: CARD_W, height: CARD_H, background: "#ffffff", borderRadius: 54, position: "relative", fontFamily: FONT, color: INK, boxShadow: "0 0 0 16px rgba(205,240,255,0.45), 0 30px 90px rgba(10,30,60,0.35)", }} > <div style={{ position: "absolute", left: 88, top: 82, fontSize: 30, fontWeight: 500, display: "flex", alignItems: "center", gap: 10 }}> Open position <Info size={22} color="#9aa0aa" /> </div> <Box style={{ top: 200, height: 263 }}> <div style={{ position: "absolute", left: 35, top: 36, fontSize: 30, color: "#9a9ea8", fontWeight: 500 }}>Deposit</div> <div style={{ position: "absolute", right: 36, top: 22, height: 58, padding: "0 22px", background: "#fff", borderRadius: 10, boxShadow: "0 1px 4px rgba(0,0,0,0.08)", display: "flex", alignItems: "center", gap: 14, fontSize: 28, fontWeight: 500, }} > <div style={{ width: 34, height: 34, borderRadius: 17, background: "#f3c12e", display: "flex", alignItems: "center", justifyContent: "center" }}> <div style={{ width: 16, height: 11, borderRadius: 6, background: "#111", boxShadow: "0 0 0 3px #f3c12e inset" }} /> </div> ONyc <ChevronDown size={22} /> </div> <div style={{ position: "absolute", left: 40, top: 92, fontFamily: MONO, fontSize: 76, letterSpacing: -2 }}>{amount}</div> <div style={{ position: "absolute", right: 38, top: 120, fontFamily: MONO, fontSize: 28, color: "#9a9ea8", display: "flex", alignItems: "center", gap: 6 }}> ${amount.toFixed(2)} <ArrowUpDown size={22} /> </div> <div style={{ position: "absolute", left: 35, top: 196, fontSize: 28, color: "#8a8e98" }}>Available: 1,000.00 ONyc</div> <div style={{ position: "absolute", right: 36, top: 188, display: "flex", gap: 22, fontSize: 28, fontWeight: 500 }}> <span style={{ background: "#fff", padding: "4px 12px", borderRadius: 6 }}>Half</span> <span style={{ background: "#fff", padding: "4px 12px", borderRadius: 6 }}>Max</span> </div> </Box> <div style={{ position: "absolute", left: 87, top: 508, fontSize: 31, color: "#8a8e98", fontWeight: 500 }}>Borrow asset</div> <Box style={{ top: 571, height: 89, display: "flex", alignItems: "center", padding: "0 36px", boxSizing: "border-box", gap: 18, fontSize: 32, fontWeight: 500 }}> <div style={{ width: 44, height: 44, borderRadius: 22, background: "radial-gradient(circle at 50% 50%, #c7ff5e 0%, #4caf2a 60%, #1e4d10 100%)", border: "3px solid #213a12", boxSizing: "border-box" }} /> USDG <span style={{ color: "#e2552e" }}>6.94%</span> <ChevronDown size={26} style={{ marginLeft: "auto" }} /> </Box> <div style={{ position: "absolute", left: 87, top: 704, fontSize: 31, color: "#8a8e98", fontWeight: 500 }}>Leverage</div> <div style={{ position: "absolute", right: 97, top: 702, padding: "6px 12px", background: "#f3f4f6", borderRadius: 8, display: "flex", alignItems: "center", gap: 10, fontSize: 27, fontWeight: 500, color: "#5b6170", }} > <ShieldCheck size={22} /> 0% </div> <div style={{ position: "absolute", left: 89, top: 772, width: 798, height: 12, borderRadius: 6, background: "#f1f2f5" }}> <div style={{ width: `${pos * 100}%`, height: "100%", borderRadius: 6, background: "#4a80d4" }} /> <div style={{ position: "absolute", left: `${pos * 100}%`, top: 6, width: 30, height: 30, borderRadius: 15, transform: "translate(-50%, -50%)", background: "#3f75cf", border: "2.5px solid #24345a", boxSizing: "border-box", }} /> </div> <div style={{ position: "absolute", left: 87, top: 806, fontSize: 28 }}>{levTxt}</div> <div style={{ position: "absolute", right: 97, top: 806, fontSize: 28, color: "#8a8e98" }}>2.79x</div> <div style={{ position: "absolute", left: 90, top: 878, width: 795, height: 74, borderRadius: 12, overflow: "hidden", background: "#0e0e11", color: "#fff", fontSize: 31, fontWeight: 500, display: "flex", alignItems: "center", justifyContent: "center", }} > <div style={{ position: "absolute", left: 0, top: 0, bottom: 0, width: "100%", opacity: sweep ? 1 : 0, background: `linear-gradient(90deg, ${stops.join(", ")})`, }} /> <span style={{ position: "relative" }}>Confirm</span> </div> </div> ); }; // The card materialises out of blue dither: a grid of cyan/blue pixels covers it and // clears from the bottom-right to the top-left (r215-r230), drawn on a canvas. const Dither: React.FC<{ p: number }> = ({ p }) => { const ref = React.useRef<HTMLCanvasElement>(null); React.useLayoutEffect(() => { const ctx = ref.current?.getContext("2d"); if (!ctx) return; ctx.clearRect(0, 0, CARD_W, CARD_H); const cell = 12; for (let y = 0; y < CARD_H; y += cell) for (let x = 0; x < CARD_W; x += cell) { const order = (1 - y / CARD_H) * 0.62 + (1 - x / CARD_W) * 0.12 + random(`dt${x},${y}`) * 0.26; if (order < p) continue; const l = 0.5 + 0.5 * Math.sin(x * 0.004 + y * 0.003); const big = order - p > 0.12; ctx.fillStyle = `rgba(${Math.round(70 + 140 * l)},${Math.round(130 + 100 * l)},${Math.round(205 + 45 * l)},${big ? 0.95 : 0.7})`; const sz = big ? cell * 0.72 : cell * 0.45; ctx.fillRect(x + (cell - sz) / 2, y + (cell - sz) / 2, sz, sz); } }, [p]); return <canvas ref={ref} width={CARD_W} height={CARD_H} style={{ position: "absolute", inset: 0, borderRadius: 54 }} />; }; const Card: React.FC<{ f: number }> = ({ f }) => { if (f < 215) return null; const c = cardBox(f); const p = lerp(f, [215, 230], [0, 1.05], Easing.out(Easing.quad)); const zoomBlur = f === 239 ? 5 : f === 240 ? 2 : 0; return ( <div style={{ position: "absolute", left: c.x0, top: c.top, transformOrigin: "0 0", transform: `scale(${c.s})`, filter: zoomBlur ? `blur(${zoomBlur}px)` : undefined, opacity: lerp(f, [215, 220], [0.5, 1]), }} > <OpenPosition f={f} /> {p < 1.05 && ( <div style={{ position: "absolute", inset: 0, borderRadius: 54, background: "linear-gradient(135deg, #3f78c8, #9fd2f0)", opacity: lerp(p, [0, 0.6, 1.05], [0.75, 0.35, 0]) }} /> )} {p < 1.05 && <Dither p={p} />} </div> ); }; export const S4Multiply: React.FC = () => { const f = useCurrentFrame(); return ( <AbsoluteFill style={{ fontFamily: FONT, overflow: "hidden", background: "#0d1626" }}> <Sky f={f} /> {/* leftover rims of the punched-through pill from section 3 */} {f < 6 && ( <AbsoluteFill style={{ opacity: lerp(f, [0, 6], [1, 0]), background: "linear-gradient(180deg, rgba(20,35,60,0.9) 0%, rgba(20,35,60,0) 6%, rgba(20,35,60,0) 92%, rgba(20,35,60,0.9) 100%), linear-gradient(90deg, rgba(10,18,32,0.85) 0%, rgba(10,18,32,0) 35%)", }} /> )} {f < 70 && <PartA f={f} />} <Halftone f={f} /> <Orbits f={f} /> <Carousel f={f} /> <Title f={f} /> <Card f={f} /> </AbsoluteFill> ); };›engine/src/kamino-launch/S5OneStep.tsx
engine/src/kamino-launch/S5OneStep.tsx // Section 5 (0:29.3-0:38.3): "What used to take four steps", a chain of glass step cards // (Deposit -> Borrow -> Swap -> Deposit) scrolling up, the chain collapsing into a deck, // "Now takes one" with the deck turning into the white Multiply glyph, the glyph settling // into a glass "Multiply" tile, which becomes the sidebar item of the Multiply page as the // camera pulls back to the full dashboard. // // The chain scroll (T0) is measured per frame off the reference: card edges on anchor // frames plus the frame-to-frame scroll profile between them. Card size/pitch, deck, // glyph, tile and dashboard boxes are measured too. import React from "react"; import { AbsoluteFill, Easing, interpolate, random, useCurrentFrame } from "remotion"; import { MultiplyPage, MP_H, MP_W, NAV_MULTIPLY } from "./MultiplyPage"; import { FONT } from "./theme"; export const S5_FRAMES = 270; const clamp = { extrapolateLeft: "clamp", extrapolateRight: "clamp" } as const; const lerp = (f: number, input: number[], output: number[], easing?: (t: number) => number) => interpolate(f, input, output, { ...clamp, easing }); // ---- measured -------------------------------------------------------------------------------- const CW = 440; const CH = 347; const PITCH = 607; // top edge of card 0 (y px) per frame, r58-r132 const T0_V = [409, 393, 380, 371, 364, 360, 358, 358, 359, 361, 363, 364, 364, 363, 362, 360, 358, 355, 352, 348, 343, 337, 330, 320, 307, 291, 271, 245, 206, 159, 104, 48, -5, -49, -81, -105, -126, -142, -156, -169, -180, -191, -202, -214, -228, -243, -263, -290, -327, -379, -438, -500, -561, -621, -672, -709, -737, -759, -776, -789, -798, -806, -813, -818, -822, -826, -829, -834, -839, -844, -848, -846, -844, -842, -844]; const T0 = (f: number) => { const i = Math.max(0, Math.min(T0_V.length - 1.001, f - 58)); const a = T0_V[Math.floor(i)]; const b = T0_V[Math.floor(i) + 1] ?? a; return a + (b - a) * (i - Math.floor(i)); }; const CARD_IN = [58, 84, 105, 127]; // dither reveal start per card const STEPS: Array<{ label: string; icon: number }> = [ { label: "Deposit", icon: 0 }, { label: "Borrow", icon: 1 }, { label: "Swap", icon: 2 }, { label: "Deposit", icon: 0 }, ]; // Deck collapse r132-r149: [frames], [top y], [scale] per card. const DECK: Array<{ f: number[]; y: number[]; s: number[] }> = [ { f: [132, 147], y: [-844, 321], s: [1, 0.936] }, { f: [132, 147], y: [-237, 346], s: [1, 0.936] }, { f: [132, 134, 142], y: [370, 370, 372], s: [1, 1, 0.936] }, { f: [132, 134, 136, 138, 140, 142, 145, 149], y: [931, 879, 783, 623, 459, 435, 421, 413], s: [1, 1, 1.02, 1.05, 1.08, 1.09, 1.09, 1.09] }, ]; // ---- glyphs -------------------------------------------------------------------------------- const StepIcon: React.FC<{ k: number; size: number; color: string }> = ({ k, size, color }) => { const s = { fill: "none", stroke: color, strokeWidth: 4 } as const; if (k === 0) return ( <svg width={size} height={size * 0.8} viewBox="0 0 50 40"> <rect x={2} y={2} width={46} height={36} {...s} /> <path d="M2 14 H17 L19 20 H31 L33 14 H48" {...s} /> </svg> ); if (k === 1) return ( <svg width={size * 0.85} height={size * 0.85} viewBox="0 0 40 40"> <rect x={2} y={2} width={36} height={36} {...s} /> <path d="M20 9 V29 M12 21 L20 29 L28 21" {...s} /> </svg> ); return ( <svg width={size * 0.85} height={size * 0.85} viewBox="0 0 40 40"> <rect x={14} y={2} width={24} height={24} {...s} /> <rect x={2} y={14} width={24} height={24} {...s} /> <path d="M17 23 L23 17 M17 17 h6 v6" {...s} strokeWidth={3} /> </svg> ); }; // Multiply glyph (bar over a box) in a w x h box. const MultiplyGlyph: React.FC<{ w: number; color?: string }> = ({ w, color = "#fff" }) => ( <div style={{ width: w, display: "flex", flexDirection: "column", alignItems: "center", gap: w * 0.096 }}> <div style={{ width: w * 0.82, height: w * 0.104, background: color }} /> <div style={{ width: w, height: w * 0.645, background: color }} /> </div> ); // Bright cyan dither the cards materialise from; `p` 0..1 clears it bottom-up / right-left. const Dither: React.FC<{ p: number; w: number; h: number; seed: string; fromTop?: boolean }> = ({ p, w, h, seed, fromTop }) => { const ref = React.useRef<HTMLCanvasElement>(null); React.useLayoutEffect(() => { const ctx = ref.current?.getContext("2d"); if (!ctx) return; ctx.clearRect(0, 0, w, h); const cell = 8; for (let y = 0; y < h; y += cell) for (let x = 0; x < w; x += cell) { const yy = fromTop ? y / h : 1 - y / h; const order = yy * 0.55 + (1 - x / w) * 0.2 + random(`${seed}${x},${y}`) * 0.25; if (order < p) continue; const k = Math.min(1, (order - p) * 3); ctx.fillStyle = `rgba(${Math.round(150 + 90 * k)},${Math.round(215 + 35 * k)},255,${0.6 + 0.4 * k})`; const sz = cell * (0.55 + 0.4 * k); ctx.fillRect(x + (cell - sz) / 2, y + (cell - sz) / 2, sz, sz); } }, [p, w, h, seed, fromTop]); return <canvas ref={ref} width={w} height={h} style={{ position: "absolute", inset: 0, borderRadius: 16 }} />; }; // Glass step card, design size CW x CH. const StepCard: React.FC<{ label: string; icon: number; reveal: number; seed: string; white?: number }> = ({ label, icon, reveal, seed, white = 0, }) => { const glow = 1 - reveal; // bright cyan flash while materialising return ( <div style={{ position: "relative", width: CW, height: CH, borderRadius: 16, background: `rgba(${226 + 29 * white},${236 + 19 * white},${246 + 9 * white},${0.22 + 0.25 * glow + 0.78 * white})`, boxShadow: `inset 0 0 0 1.5px rgba(235,245,255,0.75), 0 10px 40px rgba(10,25,50,0.18)`, backdropFilter: "blur(6px)", overflow: "hidden", fontFamily: FONT, }} > {/* cyan sheen while it forms */} <div style={{ position: "absolute", inset: 0, opacity: Math.min(1, glow * 1.4), background: "radial-gradient(70% 80% at 40% 35%, rgba(215,248,255,1), rgba(120,215,250,0.95) 35%, rgba(70,165,235,0.8) 70%, rgba(60,130,210,0.55))", }} /> <div style={{ position: "absolute", left: 26, top: 28, width: CW - 52, height: 228, borderRadius: 12, background: `rgba(210,222,236,${0.55 * (1 - white)})`, display: "flex", alignItems: "center", justifyContent: "center", opacity: 1 - white, }} > <StepIcon k={icon} size={50} color={glow > 0.5 ? "#3e78c8" : "#28334a"} /> </div> <div style={{ position: "absolute", left: 24, top: 276, fontSize: 30, fontWeight: 500, color: "#fff", opacity: (1 - white) * Math.min(1, reveal * 1.6) }}> {label} </div> {reveal < 1 && <Dither p={reveal} w={CW} h={CH} seed={seed} fromTop={seed === "c0"} />} </div> ); }; // ---- text ------------------------------------------------------------------------------------ const Typed: React.FC<{ f: number; text: string; start: number; perChar: number; y: number; size: number; out?: number; times?: number[] }> = ({ f, text, start, perChar, times, y, size, out, }) => { const fade = out === undefined ? 1 : lerp(f, [out, out + 8], [1, 0]); const blur = out === undefined ? 0 : lerp(f, [out, out + 8], [0, 6]); return ( <div style={{ position: "absolute", left: 0, right: 0, top: y, transform: "translateY(-50%)", display: "flex", justifyContent: "center", fontSize: size, fontWeight: 500, letterSpacing: -0.5, whiteSpace: "pre", opacity: fade, filter: blur ? `blur(${blur}px)` : undefined, }} > {text.split("").map((ch, i) => { const t = times ? times[i] : start + i * perChar; const k = lerp(f, [t, t + 6], [0, 1]); return ( <span key={i} style={{ opacity: f < t ? 0 : lerp(f, [t, t + 2], [0.3, 1]), color: `rgb(${Math.round(110 + 145 * k)},${Math.round(160 + 95 * k)},255)` }}> {ch} </span> ); })} </div> ); }; // ---- backdrop -------------------------------------------------------------------------------- const Backdrop: React.FC<{ f: number }> = ({ f }) => { // navy top-left, cyan bottom-right; the light swings across as the beats change const lx = lerp(f, [0, 60, 140, 190, 210, 236], [70, 78, 70, 92, 95, 50]); const ly = lerp(f, [0, 60, 140, 190, 210, 236], [80, 92, 105, 15, 10, -10]); const dash = lerp(f, [232, 238], [0, 1]); return ( <> <AbsoluteFill style={{ background: `radial-gradient(85% 100% at ${lx}% ${ly}%, #dcf7fc 0%, #b4dbeb 22%, #86a9c6 45%, #5a7899 66%, #3b5373 84%, #23324a 100%)`, }} /> {/* faint dot texture */} <AbsoluteFill style={{ opacity: 0.18 * (1 - dash), backgroundImage: "radial-gradient(circle, rgba(255,255,255,0.8) 1.3px, transparent 1.8px)", backgroundSize: "14px 14px", }} /> <AbsoluteFill style={{ opacity: dash, background: "radial-gradient(70% 55% at 50% 0%, #c8f2fb 0%, #9ccbe9 35%, rgba(70,110,170,0) 75%), linear-gradient(180deg, #8ec3e6 0%, #4f7fb8 55%, #2a4a78 100%)", }} /> </> ); }; // ---- parts ------------------------------------------------------------------------------------ const Chain: React.FC<{ f: number }> = ({ f }) => { if (f < 58 || f >= 162) return null; const t0 = T0(Math.min(f, 132)); const white = lerp(f, [152, 160], [0, 1]); const cards = STEPS.map((st, k) => { if (f < CARD_IN[k]) return null; let top = t0 + k * PITCH; let s = k === 0 ? lerp(f, [58, 62, 66, 68, 72], [1.2, 1.18, 1.1, 1.06, 1], Easing.out(Easing.quad)) : 1; if (f > 132) { top = lerp(f, DECK[k].f, DECK[k].y, Easing.out(Easing.cubic)); s = lerp(f, DECK[k].f, DECK[k].s); } const reveal = lerp(f, [CARD_IN[k], CARD_IN[k] + 14], [0, 1]); // the card builds up from its bottom edge const clipTop = lerp(f, [CARD_IN[k], CARD_IN[k] + 10], [100, 0], Easing.out(Easing.quad)); // new cards rise a little as they form const rise = lerp(f, [CARD_IN[k], CARD_IN[k] + 10], [24, 0], Easing.out(Easing.cubic)); if (top + CH * s < -20 || top > 1100) return null; return ( <div key={k} style={{ position: "absolute", left: 960 - (CW * s) / 2, top: top + rise - (k === 0 && f <= 132 ? (CH * (s - 1)) / 2 : 0), transformOrigin: "0 0", transform: `scale(${s})`, zIndex: k, clipPath: clipTop > 0 ? `inset(${clipTop}% -40px -40px -40px)` : undefined, opacity: f > 152 && k < 3 ? lerp(f, [152, 158], [1, 0]) : 1, }} > <StepCard label={st.label} icon={st.icon} reveal={reveal} seed={`c${k}`} white={k === 3 ? white : 0} /> </div> ); }); // connectors: a thin line drops from each card before the next one forms const lines = [0, 1, 2].map((k) => { if (f > 134) return null; const grow = lerp(f, [CARD_IN[k] + 12, CARD_IN[k + 1] + 2], [0, 1], Easing.inOut(Easing.quad)); if (grow <= 0) return null; const y0 = t0 + k * PITCH + CH; const len = (PITCH - CH) * grow; return ( <React.Fragment key={k}> <div style={{ position: "absolute", left: 959, top: y0, width: 2, height: len, background: "rgba(235,245,255,0.8)" }} /> {grow < 1 && <div style={{ position: "absolute", left: 955, top: y0 + len - 5, width: 10, height: 10, borderRadius: 5, background: "#eaf8ff", boxShadow: "0 0 14px 6px rgba(190,240,255,0.8)" }} />} </React.Fragment> ); }); return ( <> {lines} {cards} </> ); }; // Deck -> white glyph -> glass tile -> sidebar item. const GLYPH_F = [156, 160, 166, 172, 180, 186, 189, 192, 195, 198, 201, 204]; const GLYPH_W = [480, 420, 296, 280, 270, 252, 240, 160, 110, 84, 66, 60]; const GLYPH_Y = [602, 590, 548, 540, 532, 536, 540, 535, 528, 530, 520, 517]; const TILE_F = [190, 192, 195, 198, 204, 222, 226, 228, 230, 232, 233]; const TILE_W = [150, 214, 288, 306, 334, 334, 334, 320, 300, 286, 280]; const TILE_H = [110, 161, 219, 242, 231, 231, 231, 230, 232, 236, 240]; const Glyph: React.FC<{ f: number }> = ({ f }) => { if (f < 156 || f >= 228) return null; const w = lerp(f, GLYPH_F, GLYPH_W, Easing.inOut(Easing.quad)); const y = lerp(f, GLYPH_Y.map((_, i) => GLYPH_F[i]), GLYPH_Y); const a = lerp(f, [156, 160], [0, 1]) * lerp(f, [222, 227], [1, 0]); return ( <div style={{ position: "absolute", left: 960, top: y, transform: "translate(-50%, -50%)", opacity: a }}> <MultiplyGlyph w={w} /> </div> ); }; const Tile: React.FC<{ f: number }> = ({ f }) => { if (f < 190 || f >= 234) return null; const w = lerp(f, TILE_F, TILE_W, Easing.out(Easing.cubic)); const h = lerp(f, TILE_F, TILE_H, Easing.out(Easing.cubic)); const a = lerp(f, [190, 194], [0, 1]) * lerp(f, [226, 233], [1, 0.0]); const label = "Multiply"; return ( <div style={{ position: "absolute", left: 956, top: 558, width: w, height: h, transform: "translate(-50%, -50%)", borderRadius: 22, background: "rgba(200,215,235,0.28)", boxShadow: "inset 0 0 0 1px rgba(230,240,255,0.25)", opacity: a, fontFamily: FONT, }} > <div style={{ position: "absolute", left: 0, right: 0, top: h * 0.6, display: "flex", justifyContent: "center", fontSize: 40, fontWeight: 500, whiteSpace: "pre" }}> {label.split("").map((ch, i) => { const t = 201 + i * 1; const k = lerp(f, [t, t + 6], [0, 1]); return ( <span key={i} style={{ opacity: f < t ? 0 : 1, color: `rgb(${Math.round(110 + 145 * k)},${Math.round(160 + 95 * k)},255)` }}> {ch} </span> ); })} </div> </div> ); }; // Zoom from the sidebar item to the full Multiply page. // Final card box (measured r246-r251): left 144, top 86, width 1653. const FINAL = { x: 144, y: 86, s: 1653 / MP_W }; const ZOOM_F = [227, 233, 234, 235, 236, 238, 240, 243, 246, 251]; const ZOOM_S = [5.4, 5.0, 4.9, 4.7, 1.12, 1.05, 1.0, 1.0, 1.0, 1.0]; const ZOOM_Y = [17, 17, 17, 17, -12, 22, 40, 66, 86, 86]; // card top once zoomed out // measured page top r262-r269, then section 6 frames 0..30 (indices 270..) export const PAGE_DROP_F = [262, 264, 265, 266, 267, 268, 269, 270, 272, 274, 276, 278, 280, 284, 288, 292, 300]; export const PAGE_DROP_Y = [86, 96, 112, 133, 170, 225, 326, 464, 586, 617, 634, 645, 651, 657, 660, 662, 664]; export const PAGE_FINAL = FINAL; const Page: React.FC<{ f: number }> = ({ f }) => { if (f < 227) return null; const zs = lerp(f, ZOOM_F, ZOOM_S, Easing.out(Easing.cubic)) * FINAL.s; // anchor: until r234 the nav item sits on the tile centre; after, the card settles const zoomed = f < 236; const ax = 925; const ay = 558; let x = ax - NAV_MULTIPLY.x * zs; let y = ay - NAV_MULTIPLY.y * zs; if (!zoomed) { x = lerp(f, [236, 240, 246], [161, 144, FINAL.x]); y = lerp(f, ZOOM_F, ZOOM_Y); // the page starts dropping away at r263 (continues into section 6) if (f > 262) y = lerp(f, PAGE_DROP_F, PAGE_DROP_Y); } else if (f >= 234) { // the sidebar drifts left as the page brightens in, then a 1-frame cut out x -= lerp(f, [233, 235], [0, 160]); } const chrome = lerp(f, [233, 235.5], [0, 1]); // everything but the sidebar const appear = lerp(f, [227, 232], [0, 1]); const blur = f === 236 ? 3 : f < 236 ? lerp(f, [227, 233], [14, 2]) : 0; return ( <div style={{ position: "absolute", left: x, top: y, width: MP_W, height: MP_H, transformOrigin: "0 0", transform: `scale(${zs})`, filter: blur > 0.1 ? `blur(${blur / zs}px)` : undefined, opacity: appear, }} > <MultiplyPage f={f - 237} chrome={chrome} /> </div> ); }; export const S5OneStep: React.FC = () => { const f = useCurrentFrame(); return ( <AbsoluteFill style={{ fontFamily: FONT, overflow: "hidden", background: "#121a28" }}> <Backdrop f={f} /> {f < 66 && <Typed f={f} text="What used to take four steps" start={1} perChar={1.05} y={lerp(f, [0, 54, 58], [532, 515, 505])} size={84} out={54} />} <Chain f={f} /> {f >= 140 && f < 200 && ( <Typed f={f} text="Now takes one" start={140} perChar={1} times={[140, 141.5, 143, 159, 159, 160, 161, 162, 163, 165, 165.5, 167, 168.5]} y={lerp(f, [140, 156, 166, 172], [180, 182, 240, 256], Easing.inOut(Easing.quad))} size={78} out={189} /> )} <Glyph f={f} /> <Tile f={f} /> <Page f={f} /> {/* white bloom as the page snaps out */} <AbsoluteFill style={{ opacity: lerp(f, [234, 236, 241], [0, 0.65, 0]), background: "radial-gradient(45% 70% at 12% 45%, rgba(255,255,255,0.95), rgba(220,245,255,0.4) 50%, rgba(255,255,255,0) 80%)", }} /> </AbsoluteFill> ); };›engine/src/kamino-launch/MultiplyPage.tsx
engine/src/kamino-launch/MultiplyPage.tsx // The Kamino "Multiply" page as a card (MP_W x MP_H), laid out from the reference // (positions measured off the 0:37.7 frame and scaled to design units). // `f` = frames since the page landed: drives the net value count-up and the bar chart. // `chrome` (0..1) fades everything except the sidebar, for the zoom out of the nav item. import React from "react"; import { interpolate } from "remotion"; import { ChevronDown, Coins, FileText, Home, Info, Landmark, LayoutGrid, Search, Sun, Menu, CircleDollarSign, } from "lucide-react"; import { KaminoMark } from "./Dashboard"; import { C, FONT } from "./theme"; export const MP_W = 1700; export const MP_H = 978; // centre of the active "Multiply" nav item, design units export const NAV_MULTIPLY = { x: 45, y: 536 }; const MONO = "ui-monospace, SFMono-Regular, Menlo, monospace"; const clamp = { extrapolateLeft: "clamp", extrapolateRight: "clamp" } as const; const NV_F = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18, 22, 27, 33]; const NV_V = [710.15, 728.82, 749.71, 770.89, 791.69, 811.94, 831.63, 848.89, 862.74, 874.2, 883.88, 892.17, 899.34, 905.59, 911.05, 915.85, 926.4, 935.6, 940.9, 942.46]; const BARS = [73, 61, 73, 88, 73, 65, 77]; const Abs: React.FC<{ x: number; y: number; style?: React.CSSProperties; children: React.ReactNode }> = ({ x, y, style, children }) => ( <div style={{ position: "absolute", left: x, top: y, whiteSpace: "nowrap", ...style }}>{children}</div> ); const RAbs: React.FC<{ r: number; y: number; style?: React.CSSProperties; children: React.ReactNode }> = ({ r, y, style, children }) => ( <div style={{ position: "absolute", right: MP_W - r, top: y, whiteSpace: "nowrap", ...style }}>{children}</div> ); const Coin: React.FC<{ bg: string; fg?: string; t: string; size?: number }> = ({ bg, fg = "#fff", t, size = 30 }) => ( <div style={{ width: size, height: size, borderRadius: size / 2, background: bg, color: fg, fontSize: size * 0.5, fontWeight: 700, display: "flex", alignItems: "center", justifyContent: "center", }} > {t} </div> ); const ns = { fill: "none", stroke: "#16181d", strokeWidth: 1.6 } as const; const EarnIcon = () => ( <svg width={15} height={15} viewBox="0 0 16 16"> <circle cx={8} cy={8} r={6.6} {...ns} /> <path d="M8 4.8 L11.2 8 L8 11.2 L4.8 8 Z" {...ns} /> </svg> ); const BorrowIcon = () => ( <svg width={14} height={14} viewBox="0 0 16 16"> <rect x={1.5} y={1.5} width={13} height={13} {...ns} /> <path d="M8 4 V11 M5 8.3 L8 11 L11 8.3" {...ns} /> </svg> ); const MultIcon = () => ( <svg width={15} height={13} viewBox="0 0 16 14"> <rect x={2} y={0} width={12} height={2} fill="#16181d" /> <rect x={0} y={4} width={16} height={10} fill="#16181d" /> </svg> ); const SwapIcon = () => ( <svg width={14} height={14} viewBox="0 0 16 16"> <rect x={5.5} y={1} width={9.5} height={9.5} {...ns} /> <rect x={1} y={5.5} width={9.5} height={9.5} {...ns} /> </svg> ); const NavItem: React.FC<{ icon: React.ReactNode; label: string; y: number; active?: boolean }> = ({ icon, label, y, active }) => ( <div style={{ position: "absolute", left: 13, top: y - 24, width: 64, height: 48, borderRadius: 7, background: active ? "#e7e8ec" : "transparent", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: 3, fontSize: 10.5, color: C.ink, }} > {icon} {label} </div> ); const POS = [ ["$20.34", "+$0.35", "54.48%", "19.64%"], ["$3.10", "+$0.10", "72.47%", "30.42%"], ["$1.02", "+$0.02", "64.52%", "23.97%"], ]; const RWA: Array<[React.ReactNode, string, string, string, string, string, string, string]> = [ [<Coin key="o" bg="#f3c12e" fg="#111" t="●" />, "ONyc", "OnRe Tokenized Reinsurance", "17.53%", "2.79x", "$0.00", "$112.95M", "#8fa9e8"], [<Coin key="a" bg="linear-gradient(135deg,#7be38d,#22a35a)" fg="#0b3d1d" t="A" />, "AUTO", "Hastra AUTO", "35.11%", "4.31x", "$0.00", "$81.88M", "#b08be8"], [<Coin key="p" bg="linear-gradient(135deg,#c79bff,#7b3ff2)" t="P" />, "PRIME", "Hastra PRIME", "11.28%", "7.91x", "$81.74K", "$67.06M", "#7f8aa3"], ]; export const MultiplyPage: React.FC<{ f: number; chrome?: number }> = ({ f, chrome = 1 }) => { const nv = interpolate(f, NV_F, NV_V, clamp); const nvTxt = nv.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 }); const ret = nv - 696.76; return ( <div style={{ width: MP_W, height: MP_H, position: "relative", borderRadius: 38, overflow: "hidden", fontFamily: FONT, color: C.ink, background: `rgba(251,251,253,${chrome})`, boxShadow: chrome > 0.5 ? "0 0 0 14px rgba(200,236,252,0.5), 0 30px 80px rgba(10,30,60,0.3)" : undefined, }} > {/* sidebar (always visible) */} <div style={{ position: "absolute", left: 0, top: 0, bottom: 0, width: 90, background: `rgba(244,244,247,${chrome})` }}> <div style={{ position: "absolute", left: 32, top: 22, opacity: chrome }}> <KaminoMark size={26} /> </div> <NavItem icon={<Home size={15} />} label="Home" y={355} /> <NavItem icon={<EarnIcon />} label="Earn" y={416} /> <NavItem icon={<BorrowIcon />} label="Borrow" y={477} /> <NavItem icon={<MultIcon />} label="Multiply" y={NAV_MULTIPLY.y} active /> <NavItem icon={<SwapIcon />} label="Swap" y={597} /> <FileText size={15} style={{ position: "absolute", left: 37, top: 912, opacity: chrome }} /> <Sun size={15} style={{ position: "absolute", left: 37, top: 952, opacity: chrome }} /> </div> <div style={{ position: "absolute", inset: 0, opacity: chrome }}> {/* top bar */} <div style={{ position: "absolute", left: 727, top: 25, width: 330, height: 30, borderRadius: 6, background: "#f2f2f5", display: "flex", alignItems: "center", gap: 8, padding: "0 10px", boxSizing: "border-box", fontSize: 11.5, color: "#59606c", }} > <Search size={12} /> Search vaults, markets, tokens... <span style={{ marginLeft: "auto", fontSize: 10 }}>⌘ K</span> </div> <div style={{ position: "absolute", left: 1520, top: 27, height: 26, padding: "0 10px", borderRadius: 6, background: "#fff", boxShadow: "0 1px 3px rgba(0,0,0,0.1)", display: "flex", alignItems: "center", gap: 6, fontSize: 11.5, }} > <div style={{ width: 7, height: 7, borderRadius: 4, background: "#1fd66b" }} /> F5Si...Db6d <ChevronDown size={11} /> </div> {/* heading */} <Abs x={247} y={96} style={{ fontSize: 27, fontWeight: 600, letterSpacing: -0.5 }}> Multiply </Abs> <Abs x={247} y={136} style={{ fontSize: 13.5, color: "#5b6170" }}> Multiply your exposure to your favourite assets via one-click leverage vaults.{" "} <span style={{ color: "#3b6fd1" }}>Learn how multiply works</span> <Info size={11} style={{ verticalAlign: -1 }} /> </Abs> {/* summary panel */} <div style={{ position: "absolute", left: 247, top: 184, width: 1286, height: 324, borderRadius: 10, background: "#f6f7f9" }}> <Abs x={23} y={22} style={{ fontSize: 12.5, color: "#5b6170" }}> Net value </Abs> <Abs x={22} y={50} style={{ fontSize: 31, fontWeight: 500, letterSpacing: -0.8 }}> ${nvTxt} </Abs> <Abs x={23} y={108} style={{ fontSize: 11.5, color: "#5b6170" }}> Return (1W) </Abs> <Abs x={23} y={130} style={{ fontSize: 12.5, color: C.green, fontWeight: 500 }}> +${ret.toFixed(2)} </Abs> <div style={{ position: "absolute", left: 366, top: 120, display: "flex", gap: 24, fontSize: 11.5, color: "#7b8190" }}> <span style={{ color: C.ink, fontWeight: 600 }}>1W</span> <span>1M</span> <span>3M</span> <span>All</span> </div> {BARS.map((h, i) => { const g = interpolate(f, [i * 1.1 - 1.5, i * 1.1 + 3.5], [0, 1], { ...clamp, easing: (t) => 1 - (1 - t) ** 3 }); return ( <div key={i} style={{ position: "absolute", left: 46 + i * 63, top: 264 - h * g, width: 50, height: h * g, background: "#13a15e", borderRadius: 2, }} /> ); })} {/* positions */} <Abs x={537} y={30} style={{ fontSize: 13, fontWeight: 500 }}> Your positions <span style={{ color: "#9aa0aa", fontWeight: 400 }}>3</span> </Abs> <ChevronDown size={13} style={{ position: "absolute", right: 22, top: 31, transform: "rotate(180deg)" }} /> {( [ ["Position", 537, "l"], ["Net value", 884, "r"], ["PnL", 1033, "r"], ["LTV", 1142, "r"], ["Net APY", 1264, "r"], ] as Array<[string, number, string]> ).map(([t, x, a]) => a === "l" ? ( <Abs key={t} x={x} y={72} style={{ fontSize: 11, color: "#7b8190" }}> {t} </Abs> ) : ( <div key={t} style={{ position: "absolute", right: 1286 - x, top: 72, fontSize: 11, color: "#7b8190" }}> {t} </div> ), )} {POS.map((r, i) => ( <React.Fragment key={i}> <div style={{ position: "absolute", left: 540, top: 115 + i * 69 }}> <Coin bg="linear-gradient(135deg,#7be38d,#22a35a)" fg="#0b3d1d" t="A" size={34} /> </div> <Abs x={584} y={112 + i * 69} style={{ fontSize: 12.5, fontWeight: 600 }}> AUTO{" "} <span style={{ fontSize: 10.5, fontWeight: 400, color: "#3b6fd1", background: "#e9f0fc", padding: "2px 6px", borderRadius: 4, marginLeft: 4 }}> ◇ Fixed · 30d </span> </Abs> <Abs x={584} y={133 + i * 69} style={{ fontSize: 10.5, color: "#7b8190" }}> <span style={{ color: "#c2479a" }}>●</span> wYLDS debt </Abs> {r.map((v, j) => ( <div key={j} style={{ position: "absolute", right: 1286 - [884, 1033, 1142, 1264][j], top: 120 + i * 69, fontSize: 12, fontFamily: MONO, color: j === 1 || j === 3 ? C.green : j === 2 ? "#c2479a" : C.ink, }} > {v} {j === 2 ? " ▮" : ""} </div> ))} </React.Fragment> ))} </div> {/* explore */} <Abs x={247} y={572} style={{ fontSize: 18.5, fontWeight: 600 }}> Explore assets </Abs> <Abs x={247} y={606} style={{ fontSize: 12, color: "#5b6170" }}> Multiply your exposure to your favourite assets via one-click leverage vaults. </Abs> <div style={{ position: "absolute", left: 252, top: 650, display: "flex", gap: 8, fontSize: 12, color: "#4a5160" }}> {( [ [<LayoutGrid key="1" size={12} />, "Overview"], [<Landmark key="2" size={12} />, "RWAs"], [<Coins key="3" size={12} />, "Crypto"], [<Menu key="4" size={12} />, "SOL"], [<CircleDollarSign key="5" size={12} />, "USD"], ] as Array<[React.ReactNode, string]> ).map(([ic, t], i) => ( <div key={t} style={{ display: "flex", alignItems: "center", gap: 6, padding: "5px 10px", borderRadius: 6, background: i === 0 ? "#e8f0fc" : "transparent", color: i === 0 ? "#3366cc" : undefined, }} > {ic} {t} </div> ))} </div> <div style={{ position: "absolute", left: 1012, top: 650, width: 190, height: 26, borderRadius: 6, border: "1px solid #e6e7ec", display: "flex", alignItems: "center", gap: 8, padding: "0 10px", boxSizing: "border-box", fontSize: 11, color: "#7b8190", }} > <Search size={11} /> Search... </div> {["Pair collateral", "Pair debt", "Rate type"].map((t, i) => ( <div key={t} style={{ position: "absolute", left: [1218, 1344, 1430][i], top: 655, fontSize: 11, color: "#4a5160", display: "flex", alignItems: "center", gap: 4 }}> {t} <ChevronDown size={10} /> </div> ))} <Abs x={252} y={711} style={{ fontSize: 12, fontWeight: 600, display: "flex", alignItems: "center", gap: 8 }}> <Landmark size={13} /> Real world assets </Abs> <div style={{ position: "absolute", left: 247, top: 746, width: 1286, height: 260, borderRadius: 8, background: "#f6f7f9" }}> {( [ ["Asset", 14, "l"], ["Max Net APY", 482, "r"], ["Max leverage", 678, "r"], ["Liq. available", 883, "r"], ["Deposited", 1074, "r"], ["Borrow", 1261, "r"], ] as Array<[string, number, string]> ).map(([t, x, a]) => a === "l" ? ( <Abs key={t} x={x} y={12} style={{ fontSize: 10.5, color: "#7b8190" }}> {t} </Abs> ) : ( <div key={t} style={{ position: "absolute", right: 1286 - x, top: 12, fontSize: 10.5, color: "#7b8190" }}> {t} </div> ), )} {RWA.map(([ic, sym, name, apy, lev, liq, dep, col], i) => ( <div key={sym} style={{ position: "absolute", left: 4, top: 40 + i * 65, width: 1278, height: 60, background: "#fff", borderRadius: 6 }}> <div style={{ position: "absolute", left: 10, top: 15 }}>{ic}</div> <Abs x={50} y={13} style={{ fontSize: 12.5, fontWeight: 600 }}> {sym} </Abs> <Abs x={50} y={32} style={{ fontSize: 10.5, color: "#7b8190" }}> {name} </Abs> <RAbs r={1700 - (1286 - 478)} y={13} style={{ fontSize: 12, color: C.green, fontFamily: MONO }}> {apy} </RAbs> {i < 2 && ( <RAbs r={1700 - (1286 - 478)} y={33} style={{ fontSize: 9.5, color: "#7b8190" }}> ⊙ Fixed rates available </RAbs> )} {[lev, liq, dep].map((v, j) => ( <RAbs key={j} r={1700 - (1286 - [674, 879, 1070][j])} y={22} style={{ fontSize: 12, fontFamily: MONO }}> {v} </RAbs> ))} <div style={{ position: "absolute", right: 18, top: 22, display: "flex" }}> {[col, "#5f7bc8", "#3fbf8a"].map((c2, j) => ( <div key={j} style={{ width: 16, height: 16, borderRadius: 8, background: c2, marginLeft: j ? -6 : 0, border: "1.5px solid #fff" }} /> ))} </div> </div> ))} </div> <div style={{ position: "absolute", right: 22, bottom: 26, width: 26, height: 26, borderRadius: 6, background: "#fff", boxShadow: "0 1px 4px rgba(0,0,0,0.15)", display: "flex", alignItems: "center", justifyContent: "center" }}> <div style={{ width: 12, height: 9, background: C.ink, borderRadius: 2 }} /> </div> </div> </div> ); };›engine/src/kamino-launch/S6OnePlace.tsx
engine/src/kamino-launch/S6OnePlace.tsx // Section 6 (0:38.3-0:42.6): the Multiply page drops, "See it all" types in, then a // whip-pan right: the page accelerates off to the left while the app's pieces (opportunity // cards, asset pills, Swap, Assets and Multiply pages) slide in from the right and settle // around "in one place". Then the scene blurs, a Sign In card rises, and a cursor clicks // "Continue with Google". // // Measured off the reference: the page's drop and exit (PAGE_*), the shared slide-in curve // (SLIDE, from the Swap card), each element's resting box and slide distance, the Sign In // card's rise, and the cursor path. import React from "react"; import { AbsoluteFill, Easing, Img, interpolate, staticFile, useCurrentFrame } from "remotion"; import { ArrowUpDown, ChevronDown, CircleDollarSign, KeyRound, Landmark, Lock, Settings, FileText, Sun, Send } from "lucide-react"; import { MultiplyPage, MP_H, MP_W } from "./MultiplyPage"; import { PAGE_DROP_F, PAGE_DROP_Y, PAGE_FINAL } from "./S5OneStep"; import { ASSETS, TokenIcon } from "./AssetsPage"; import { C, FONT } from "./theme"; export const S6_FRAMES = 132; const clamp = { extrapolateLeft: "clamp", extrapolateRight: "clamp" } as const; const lerp = (f: number, input: number[], output: number[], easing?: (t: number) => number) => interpolate(f, input, output, { ...clamp, easing }); const MONO = "ui-monospace, SFMono-Regular, Menlo, monospace"; // ---- measured ---------------------------------------------------------------------------------- // Page exit: x shift relative to its resting x. const EXIT_F = [0, 14, 18, 22, 26, 30, 32, 34, 36, 38, 40, 42, 44, 46]; const EXIT_X = [0, -11, -22, -44, -82, -152, -206, -283, -396, -564, -822, -1206, -1711, -2300]; // Remaining fraction of the slide-in distance (Swap card), frames after r32. const SLIDE_F = [0, 2, 4, 6, 8, 10, 12, 16, 22, 28, 34, 44, 54, 99]; const SLIDE_V = [1, 0.968, 0.92, 0.853, 0.749, 0.591, 0.386, 0.189, 0.09, 0.042, 0.025, 0.012, 0, -0.035]; const slide = (f: number, D: number, lag = 0) => D * lerp(f - 32 - lag, SLIDE_F, SLIDE_V); // Sign In card top and cursor tip. const SI_F = [84, 86, 88, 90, 92, 94, 96, 98, 104, 110, 120, 124, 128, 130, 131]; const SI_Y = [1250, 1080, 950, 726, 430, 327, 301, 289, 276, 272, 262, 252, 226, 188, 165]; const CU_F = [92, 94, 96, 98, 100, 102, 104, 108, 112, 120, 122, 124, 126, 128, 131]; const CU_X = [1300, 1244, 1169, 1140, 1118, 1112, 1094, 1089, 1071, 1071, 1112, 1146, 1187, 1210, 1218]; const CU_Y = [930, 847, 766, 739, 718, 714, 702, 690, 674, 674, 691, 703, 708, 703, 708]; // ---- pieces ------------------------------------------------------------------------------------ const Glow: React.CSSProperties = { boxShadow: "0 0 0 5px rgba(170,215,250,0.55), 0 0 26px 6px rgba(150,205,250,0.45), 0 18px 40px rgba(10,30,60,0.25)", }; const DotStrip: React.FC<{ h: number }> = ({ h }) => ( <div style={{ position: "absolute", right: 18, top: 14, width: 34, height: h - 28, backgroundImage: "radial-gradient(circle, rgba(140,160,190,0.35) 2.2px, transparent 2.7px)", backgroundSize: "11px 11px", }} /> ); const OppCard: React.FC<{ w: number; h: number; icon: React.ReactNode; title: string; sub: string; size?: number; glow?: boolean }> = ({ w, h, icon, title, sub, size = 17, glow, }) => ( <div style={{ position: "relative", width: w, height: h, borderRadius: 12, background: "#eef3fb", ...(glow ? Glow : { boxShadow: "0 0 0 4px rgba(170,215,250,0.35), 0 14px 30px rgba(10,30,60,0.2)" }) }}> <div style={{ position: "absolute", left: 16, top: 18, color: "#4a5160" }}>{icon}</div> <DotStrip h={h} /> <div style={{ position: "absolute", left: 16, bottom: size * 1.9, fontSize: size, fontWeight: 500, color: C.ink, whiteSpace: "nowrap" }}>{title}</div> <div style={{ position: "absolute", left: 16, bottom: size * 0.55, fontSize: size * 0.85, color: C.green, fontWeight: 500 }}>{sub}</div> </div> ); const Pill: React.FC<{ label: string; size: number; icon?: React.ReactNode }> = ({ label, size, icon }) => ( <div style={{ display: "inline-flex", alignItems: "center", gap: size * 0.4, padding: `${size * 0.32}px ${size * 0.65}px`, borderRadius: size * 0.35, background: "#eaf1fc", color: "#3f72c7", fontSize: size, fontWeight: 500, boxShadow: "0 0 0 6px rgba(200,225,250,0.25), 0 10px 26px rgba(10,30,60,0.18)", whiteSpace: "nowrap", }} > {icon ?? <CircleDollarSign size={size * 1.15} strokeWidth={1.8} />} {label} </div> ); const SwapCard: React.FC = () => { const box = (title: string, token: React.ReactNode, amount: string, bal: string, extra?: boolean) => ( <div style={{ position: "relative", height: 98, background: "#f6f6f8", borderRadius: 8, marginBottom: 6 }}> <div style={{ position: "absolute", left: 12, top: 12, fontSize: 10.5, color: "#9aa0aa" }}>{title}</div> <div style={{ position: "absolute", right: 12, top: 9 }}>{token}</div> <div style={{ position: "absolute", left: 12, top: 36, fontFamily: MONO, fontSize: 21 }}>{amount}</div> <div style={{ position: "absolute", right: 12, top: 44, fontFamily: MONO, fontSize: 9.5, color: "#5b6170" }}>$180.00 ⇅</div> <div style={{ position: "absolute", left: 12, top: 70, fontFamily: MONO, fontSize: 9.5, color: "#9aa0aa" }}>⊟ {bal}</div> {extra && <div style={{ position: "absolute", right: 14, top: 66, fontSize: 9.5, display: "flex", gap: 18 }}><span>Half</span><span>Max</span></div>} </div> ); const tok = (src: string, label: string, dark?: boolean) => ( <div style={{ display: "flex", alignItems: "center", gap: 5, padding: "4px 7px", background: "#fff", borderRadius: 6, boxShadow: "0 1px 2px rgba(0,0,0,0.1)", fontSize: 9.5, fontWeight: 500 }}> <div style={{ width: 13, height: 13, borderRadius: 7, background: dark ? "#111" : "transparent", display: "flex", alignItems: "center", justifyContent: "center" }}> <Img src={staticFile(src)} style={{ width: dark ? 8 : 13, height: dark ? 8 : 13 }} /> </div> {label} <ChevronDown size={9} /> </div> ); return ( <div style={{ position: "relative", width: 376, height: 380, borderRadius: 16, background: "#fff", padding: "22px 24px", boxSizing: "border-box", fontFamily: FONT, color: C.ink, ...Glow }}> <div style={{ textAlign: "center", fontSize: 14.5, fontWeight: 500 }}>Swap</div> <div style={{ textAlign: "center", fontSize: 7.5, color: "#6b7280", marginTop: 8 }}> Swap any token on Solana, with zero platform fees. <span style={{ color: "#3b6fd1" }}>Learn more</span> </div> <div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", margin: "12px 0 8px", fontSize: 10.5, fontWeight: 500 }}> Swap <Settings size={11} /> </div> {box("Sell", tok("kamino-launch/usdc.svg", "USDC"), "180", "0.00 USDC", true)} <div style={{ position: "absolute", left: 182, top: 196 }}> <ArrowUpDown size={12} /> </div> {box("Buy", tok("kamino-launch/sol.svg", "SOL", true), "1.2000", "0.00 SOL")} <div style={{ marginTop: 12, height: 27, borderRadius: 4, background: "#0f141c", color: "#fff", fontSize: 10.5, display: "flex", alignItems: "center", justifyContent: "center" }}>Swap</div> </div> ); }; // Bottom slice of the Assets page: sidebar items + the asset table rows. 480 x 325. const AssetsSlice: React.FC = () => { const rows = ["jitoSOL", "kiUSDC", "PRIME", "AUTO", "ONyc", "cbBTC"].map((s) => ASSETS.find((a) => a.sym === s)!); return ( <div style={{ position: "relative", width: 620, height: 325, background: "#fff", borderRadius: "0 0 0 18px", fontFamily: FONT, color: C.ink, overflow: "hidden", ...Glow }}> <div style={{ position: "absolute", left: 0, top: 0, bottom: 0, width: 72, background: "#f5f5f8" }}> {( [ ["Borrow", 10, null], ["Multiply", 52, "m"], ["Swap", 102, "s"], ["Assets", 145, "a"], ] as Array<[string, number, string | null]> ).map(([t, y, k]) => ( <div key={t} style={{ position: "absolute", left: 4, top: y - (k ? 14 : 0), width: 62, height: k === "a" ? 42 : 30, borderRadius: 6, background: k === "a" ? "#e8e9ed" : "transparent", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "flex-end", fontSize: 8.5, gap: 2 }}> {k && <div style={{ width: 10, height: 8, border: k === "a" ? undefined : "1.3px solid #16181d", background: k === "a" ? "#16181d" : undefined }} />} {t} </div> ))} <FileText size={10} style={{ position: "absolute", left: 31, top: 248 }} /> <Sun size={10} style={{ position: "absolute", left: 31, top: 286 }} /> </div> <div style={{ position: "absolute", left: 122, top: 12, fontSize: 8.5, color: "#8a8e98" }}>Asset</div> <div style={{ position: "absolute", left: 392, top: 12, fontSize: 8.5, color: "#8a8e98" }}>Asset class</div> {rows.map((r, i) => ( <div key={r.sym} style={{ position: "absolute", left: 118, top: 36 + i * 53.5, width: 520, height: 50, background: "#fff", borderBottom: "1px solid #f0f1f4" }}> <div style={{ position: "absolute", left: 4, top: 12 }}> <TokenIcon icon={r.icon} size={26} /> </div> <div style={{ position: "absolute", left: 40, top: 9, fontSize: 10.5, fontWeight: 500 }}>{r.sym}</div> <div style={{ position: "absolute", left: 40, top: 27, fontSize: 8, color: "#8a8e98", whiteSpace: "nowrap" }}>{r.name}</div> <div style={{ position: "absolute", left: 274, top: 9, fontSize: 10.5, fontWeight: 500 }}>{r.cls}</div> <div style={{ position: "absolute", left: 274, top: 27, fontSize: 9.5, color: "#5b6170" }}>{r.sub}</div> </div> ))} </div> ); }; const SignIn: React.FC<{ f: number }> = ({ f }) => { const tint = lerp(f, [111, 114, 127, 131], [0, 1, 1, 0.4]); const sweep = lerp(f, [112, 130], [-0.3, 1.25]); const band = (x: number) => Math.max(0, 1 - Math.abs(x - sweep) / 0.35); const stops = Array.from({ length: 21 }, (_, i) => { const x = i / 20; const k = 0.25 + 0.75 * band(x); return `rgba(${Math.round(255 - 125 * k)},${Math.round(255 - 85 * k)},${Math.round(255 - 25 * k)},${tint}) ${x * 100}%`; }); const btn = (label: React.ReactNode, top: number, bg?: string): React.ReactNode => ( <div style={{ position: "absolute", left: 32, top, width: 598, height: 55, borderRadius: 8, border: "1.5px solid #ececf0", boxSizing: "border-box", background: bg ?? "#fff", display: "flex", alignItems: "center", justifyContent: "center", gap: 10, fontSize: 21, fontWeight: 500, }} > {label} </div> ); return ( <div style={{ position: "relative", width: 661, height: 501, borderRadius: 20, background: "#fff", fontFamily: FONT, color: C.ink, boxShadow: "0 0 0 2px rgba(225,235,250,0.8), 0 30px 70px rgba(10,30,60,0.3)" }}> <div style={{ position: "absolute", left: 0, right: 0, top: 56, textAlign: "center", fontSize: 35, fontWeight: 500 }}>Sign In</div> <div style={{ position: "absolute", left: 32, top: 150, width: 598, height: 55, borderRadius: 8, border: "1.5px solid #ececf0", boxSizing: "border-box", padding: "0 18px", display: "flex", alignItems: "center", fontSize: 21, color: "#6b7280" }}> name@email.com </div> <div style={{ position: "absolute", left: 32, top: 219, width: 598, height: 55, borderRadius: 8, background: "#1c1c1f", color: "#fff", display: "flex", alignItems: "center", justifyContent: "center", fontSize: 21, fontWeight: 500 }}> Add email </div> <div style={{ position: "absolute", left: 32, right: 32, top: 309, height: 1, background: "#e5e6ea" }} /> <div style={{ position: "absolute", left: 0, right: 0, top: 300, textAlign: "center" }}> <span style={{ background: "#fff", padding: "0 18px", fontSize: 14, color: "#8a8e98" }}>OR</span> </div> {btn( <> <svg width={22} height={22} viewBox="0 0 48 48"> <path fill="#FFC107" d="M43.6 20.5H42V20H24v8h11.3C33.7 32.7 29.2 36 24 36c-6.6 0-12-5.4-12-12s5.4-12 12-12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 12.9 4 4 12.9 4 24s8.9 20 20 20 20-8.9 20-20c0-1.3-.1-2.4-.4-3.5z" /> <path fill="#FF3D00" d="M6.3 14.7l6.6 4.8C14.7 15.1 19 12 24 12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 16.3 4 9.7 8.3 6.3 14.7z" /> <path fill="#4CAF50" d="M24 44c5.2 0 9.9-2 13.4-5.2l-6.2-5.2C29.2 35.1 26.7 36 24 36c-5.2 0-9.6-3.3-11.3-7.9l-6.5 5C9.5 39.6 16.2 44 24 44z" /> <path fill="#1976D2" d="M43.6 20.5H42V20H24v8h11.3c-.8 2.2-2.2 4.2-4.1 5.6l6.2 5.2C37 39.2 44 34 44 24c0-1.3-.1-2.4-.4-3.5z" /> </svg> Continue with Google </>, 346, tint > 0 ? `linear-gradient(90deg, ${stops.join(", ")})` : undefined, )} {btn( <> <Send size={21} fill="#4a5160" color="#4a5160" style={{ transform: "rotate(10deg)" }} /> Connect Telegram </>, 415, )} </div> ); }; const Cursor: React.FC = () => ( <svg width={70} height={70} viewBox="0 0 70 70" style={{ overflow: "visible" }}> <defs> <linearGradient id="cur" x1="0" y1="0" x2="1" y2="1"> <stop offset="0" stopColor="#8fc0f5" /> <stop offset="1" stopColor="#4a8ae0" /> </linearGradient> </defs> {/* tip at (0,0) */} <path d="M0 0 L62 22 L34 30 L24 60 Z" fill="url(#cur)" /> </svg> ); // ---- scene --------------------------------------------------------------------------------------- type El = { key: string; x: number; y: number; D: number; lag?: number; k?: number; node: React.ReactNode }; export const S6OnePlace: React.FC = () => { const f = useCurrentFrame(); const bgBlur = lerp(f, [89, 96], [0, 11], Easing.out(Easing.quad)); const els: El[] = [ { key: "assets", x: 1416, y: 0, D: 1150, lag: 6, node: <AssetsSlice /> }, { key: "mpage", x: 1534, y: 494, D: 2444, lag: 4, node: ( <div style={{ width: MP_W, height: MP_H, transformOrigin: "0 0", transform: "scale(0.94)" }}> <MultiplyPage f={60} /> </div> ), }, { key: "boost", x: 358, y: 168, D: 1050, lag: 3, k: 0.6, node: <OppCard w={456} h={236} icon={<Lock size={30} />} title="Boost your yield with Multiply" sub="Up to 43.84% APY" size={21} glow /> }, { key: "borrow", x: 130, y: 123, D: 621, lag: 0, k: 0.3, node: <OppCard w={300} h={145} icon={<Landmark size={24} />} title="Borrow against your holdings" sub="From ~5.64% APY" size={15} /> }, { key: "earn", x: 15, y: 360, D: 1800, lag: 1, node: <OppCard w={392} h={188} icon={<KeyRound size={26} />} title="Earn interest on your cash" sub="~10.04% APY" size={19} /> }, { key: "crypto", x: 1011, y: 158, D: 1000, lag: 1, node: <Pill label="Crypto" size={29} /> }, { key: "equities", x: 1205, y: 354, D: 1120, lag: 1, node: <Pill label="Equities" size={29} /> }, { key: "usd", x: 448, y: 690, D: 1040, lag: 2, k: 0.27, node: <Pill label="USD" size={29} /> }, { key: "rwas", x: 113, y: 877, D: 2100, lag: 0, node: <Pill label="RWAs" size={40} icon={<Landmark size={50} strokeWidth={1.8} />} /> }, { key: "swap", x: 1050, y: 625, D: 804, node: <SwapCard /> }, ]; // Multiply page from section 5: dropping, then whipping off to the left. const pageY = lerp(f + 270, PAGE_DROP_F, PAGE_DROP_Y); const pageX = PAGE_FINAL.x + lerp(f, EXIT_F, EXIT_X, undefined); const exitBlur = Math.min(10, Math.abs(lerp(f + 1, EXIT_F, EXIT_X) - lerp(f, EXIT_F, EXIT_X)) / 40); return ( <AbsoluteFill style={{ fontFamily: FONT, overflow: "hidden", background: "#22344e" }}> <AbsoluteFill style={{ background: `radial-gradient(70% 75% at ${lerp(f, [0, 40, 131], [55, 82, 88])}% ${lerp(f, [0, 40], [-5, 0])}%, #cdf4fb 0%, #a8daee 25%, #7aa5c8 50%, #4e6f95 72%, #2c4263 92%, #1d2c45 100%)`, }} /> <AbsoluteFill style={{ filter: bgBlur > 0.1 ? `blur(${bgBlur}px)` : undefined }}> {/* old page */} {f < 46 && ( <div style={{ position: "absolute", left: pageX, top: pageY, width: MP_W, height: MP_H, transformOrigin: "0 0", transform: `scale(${PAGE_FINAL.s})`, filter: exitBlur > 0.5 ? `blur(${exitBlur}px)` : undefined, }} > <MultiplyPage f={60} /> </div> )} {/* See it all */} {f >= 4 && f < 42 && ( <div style={{ position: "absolute", left: lerp(f, [4, 30], [985, 872]) + 0.85 * lerp(f, EXIT_F, EXIT_X), top: 507, transform: "translate(-50%, -50%)", fontSize: 80, fontWeight: 500, letterSpacing: -0.5, whiteSpace: "pre", opacity: lerp(f, [36, 41], [1, 0]), }} > {"See it all".split("").map((ch, i) => { const t = 3 + i * 0.85; const k = lerp(f, [t, t + 6], [0, 1]); return ( <span key={i} style={{ opacity: f < t ? 0 : 1, color: `rgb(${Math.round(110 + 145 * k)},${Math.round(160 + 95 * k)},255)` }}> {ch} </span> ); })} </div> )} {/* new pieces */} {f >= 30 && els.map((e) => { const dx = slide(f, e.D, e.lag); const x = e.x + dx; if (x > 1960) return null; const v = Math.abs(slide(f + 1, e.D, e.lag) - dx); return ( <div key={e.key} style={{ position: "absolute", left: x, top: e.y, transformOrigin: "0 0", transform: e.k ? `scale(${1 - e.k * Math.max(0, dx / e.D)})` : undefined, filter: v > 40 ? `blur(${Math.min(5, v / 40)}px)` : undefined, }} > {e.node} </div> ); })} {/* in one place */} {f >= 44 && ( <div style={{ position: "absolute", left: 1005 + slide(f, 900, 2), top: 540, transform: "translate(-50%, -50%)", fontSize: 81, fontWeight: 500, letterSpacing: -1, whiteSpace: "pre", opacity: lerp(f, [88, 93], [1, 0]), }} > {"in one place".split("").map((ch, i) => { const t = [44, 45, 46, 47.5, 48.5, 49.5, 50.5, 54, 55, 56, 57, 58][i]; const k = lerp(f, [t, t + 6], [0, 1]); return ( <span key={i} style={{ opacity: f < t ? 0 : 1, color: `rgb(${Math.round(110 + 145 * k)},${Math.round(160 + 95 * k)},255)` }}> {ch} </span> ); })} </div> )} </AbsoluteFill> {/* sign in + cursor */} {f >= 84 && ( <div style={{ position: "absolute", left: 629, top: lerp(f, SI_F, SI_Y, undefined), opacity: lerp(f, [84, 88], [0, 1]) }}> <SignIn f={f} /> </div> )} {f >= 92 && ( <div style={{ position: "absolute", left: lerp(f, CU_F, CU_X), top: lerp(f, CU_F, CU_Y), transform: `scale(${f >= 113 && f < 117 ? 0.88 : 1})`, transformOrigin: "0 0" }}> <Cursor /> </div> )} </AbsoluteFill> ); };›engine/src/kamino-launch/S7Outro.tsx
engine/src/kamino-launch/S7Outro.tsx // Section 7 (0:42.7-0:47.7): "The new Kamino is here." types in as the sky darkens, the // line lifts away, hard cut to black, the Kamino wordmark eases up into place, holds, and // fades out. All curves measured per frame off the reference. import React from "react"; import { AbsoluteFill, interpolate, useCurrentFrame } from "remotion"; import { KaminoWordmark } from "./Wordmark"; import { FONT } from "./theme"; export const S7_FRAMES = 151; const clamp = { extrapolateLeft: "clamp", extrapolateRight: "clamp" } as const; const lerp = (f: number, input: number[], output: number[]) => interpolate(f, input, output, clamp); const LINE = "The new Kamino is here."; // char appear times (section frames), per word as measured from the line's growing width const TIMES = [-1.5, -1, -0.5, 5, 6, 7.5, 9, 12, 12, 13, 14, 15, 16, 17.5, 24, 24.5, 25.5, 30, 30, 30.7, 31.3, 32, 32.6]; // left edge of the visible text (the line re-centres as words land) and its top edge const LEFT_F = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48]; const LEFT_X = [955, 905, 896, 869, 831, 811, 801, 726, 695, 679, 668, 660, 641, 626, 618, 612, 558, 540, 531, 525, 521, 518, 515, 513, 512]; const TOP_F = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 30, 36, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68]; const TOP_Y = [667, 592, 559, 544, 535, 529, 525, 522, 519, 517, 515, 514, 513, 512, 511, 510, 509, 508, 507, 505, 504, 502, 500, 498, 495, 490, 485, 477, 465, 445]; // wordmark top edge after the cut, and its brightness on the way out const LOGO_F = [69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 118]; const LOGO_Y = [548, 533, 520, 508, 500, 494, 490, 486, 484, 483, 482, 477]; const FADE_F = [130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150]; const FADE_V = [1, 0.985, 0.95, 0.88, 0.81, 0.745, 0.63, 0.505, 0.38, 0.255, 0.125]; // Inter cap height ~0.727em; text top (cap top) -> line box top offset const SIZE = 80; export const S7Outro: React.FC = () => { const f = useCurrentFrame(); if (f >= 69) { return ( <AbsoluteFill style={{ background: "#020203" }}> <div style={{ position: "absolute", left: 742, top: lerp(f, LOGO_F, LOGO_Y), opacity: lerp(f, FADE_F, FADE_V) }}> <KaminoWordmark height={100} /> </div> </AbsoluteFill> ); } // sky: pale cyan -> slate -> near black const mix = (a: number[], b: number[], t: number) => a.map((v, i) => Math.round(v + (b[i] - v) * t)); const stage = (s: number) => { const P = [ [[200, 248, 252], [175, 225, 240], [120, 150, 175]], [[150, 190, 210], [84, 112, 148], [45, 65, 98]], [[100, 135, 170], [58, 84, 120], [16, 24, 38]], [[56, 82, 118], [30, 44, 66], [4, 6, 10]], ]; const i = Math.min(2, Math.floor(s)); const k = s - i; return P[i].map((c, j) => mix(c, P[i + 1][j], k)); }; const [top, mid, bot] = stage(lerp(f, [0, 10, 48, 68], [0, 1, 2, 2.999])); const rgb = (c: number[]) => `rgb(${c.join(",")})`; return ( <AbsoluteFill style={{ fontFamily: FONT, background: `linear-gradient(180deg, ${rgb(top)} 0%, ${rgb(mid)} 52%, ${rgb(bot)} 100%)` }}> <div style={{ position: "absolute", left: lerp(f, LEFT_F, LEFT_X) - 3, top: lerp(f, TOP_F, TOP_Y) - SIZE * 0.2, fontSize: SIZE, fontWeight: 500, letterSpacing: -0.6, whiteSpace: "pre", lineHeight: 1, }} > {LINE.split("").map((ch, i) => { const t = TIMES[i]; const k = lerp(f, [t, t + 6], [0, 1]); return ( <span key={i} style={{ opacity: f < t ? 0 : lerp(f, [t, t + 2], [0.3, 1]), color: `rgb(${Math.round(90 + 165 * k)},${Math.round(140 + 115 * k)},${Math.round(225 + 30 * k)})` }}> {ch} </span> ); })} </div> </AbsoluteFill> ); };
Download assets (fonts and images)
curl -O https://www.sycamore.to/sycamore-assets.mjsnode sycamore-assets.mjs kamino-launch
Sycamore