import React from "react" import { AbsoluteFill, Easing, interpolate, useCurrentFrame, useVideoConfig } from "remotion" import { days, launchIndex, glmWeekTokensT, segments } from "./data" // stats.opencode.ai design tokens (light theme) const c = { bg: "#ffffff", ink: "#161616", muted: "#5c5c5c", faint: "#808080", line: "#e6e6e6", dot: "#ededed", accent: "#3b5cf6", accentHi: "#5b78ff", } const MONO = '"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace' const W = 1080 const DOT_MASK = "url(\"data:image/svg+xml,%3Csvg viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0H2V2H0V0Z' fill='black'/%3E%3C/svg%3E\")" const field = segments.filter((s) => !s.hero) const glmColor = segments.find((s) => s.hero)!.color const clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v)) // the correct opencode "DATA" wordmark (from stats.opencode.ai header) function DataWordmark({ height = 30, color = c.ink }: { height?: number; color?: string }) { return ( ) } export function GLM52Rise() { const frame = useCurrentFrame() const { fps } = useVideoConfig() // ---------- virtual camera ---------- // open zoomed-in on the field, pan right while the blue fills, then pull back to reveal. const K = [0, 32, 150, 206, 240] const ease = Easing.inOut(Easing.cubic) const opt = { extrapolateLeft: "clamp" as const, extrapolateRight: "clamp" as const, easing: ease } const s = interpolate(frame, K, [1.82, 1.72, 1.72, 1.0, 1.0], opt) let fx = interpolate(frame, K, [420, 438, 760, 540, 540], opt) let fy = interpolate(frame, K, [664, 664, 664, 540, 540], opt) // keep the framing inside the 1080 canvas so edges never reveal black fx = clamp(fx, 540 / s, W - 540 / s) fy = clamp(fy, 540 / s, W - 540 / s) const camera = `translate(${540 - fx * s}px, ${540 - fy * s}px) scale(${s})` // ---------- blue sweep (synced to the pan) ---------- const p = interpolate(frame, [32, 150], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp", easing: ease }) const revealAmount = p * (days.length - launchIndex) + 0.35 const fillOf = (i: number) => clamp(revealAmount - (i - launchIndex), 0, 1) // token number climbs as the camera pulls back and the headline re-enters frame const tokensT = glmWeekTokensT * interpolate(frame, [150, 202], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp", easing: Easing.out(Easing.cubic), }) // chart geometry const chartH = 440 const chartW = 936 const gap = 14 const EXAGGERATE = 2.876 // broken y-axis: GLM-5.2 magnified ~2.9x for emphasis return (
{/* header */}
JUN 12–25, 2026
{/* headline (static) */}
GLM-5.2 broke out
From 0 to {tokensT.toFixed(2)}T tokens in a week.
{/* stacked chart */}
{/* faint dotted backdrop */}
{/* columns */}
{days.map((d, i) => { const glmShare = d.glm / d.total const blueH = Math.round(glmShare * EXAGGERATE * chartH) const filled = Math.round(blueH * fillOf(i)) const slotGap = filled > 2 ? 5 : 0 const fieldH = chartH - filled - slotGap const fieldTotal = d.dsf + d.dsp + d.mm + d.others return (
{/* gray field of other models (already in place) */}
{field.map((seg) => (
))}
{/* GLM-5.2, animates in */} {filled > 2 && (
)}
) })}
{/* day axis */}
{days.map((d, i) => (
{i === 0 || i === launchIndex || i === days.length - 1 ? d.date : ""}
))}
{/* footer */}
GLM-5.2
opencode.ai/data
) }