Repository navigation
feat: ambient animated background behind every page - #42
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
A worker that lost its context reported the same failure as one that could never draw, so the page rebuilt the scene on the main thread. The worker now reports lost separately and the page gives up, as decision 7 of the plan asks. Adds the ambient canvas tests the plan named, covering the worker, the main thread fallback and both losses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The budget was chosen once at mount, so a window resized across 768px kept the density it started with. A resize now rechooses the budget and rebuilds the scene when its geometry changes, and only resizes the canvas otherwise, picking up a new pixel ratio. Rebuilding disposes a live scene, whose deliberate context release was reported as a loss; dispose now drops that listener first, and a callback from a replaced scene is ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The still frame ignores the pointer, so each move only woke the worker to drop it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page terminates the worker, which releases its context with it, so nothing ever sent dispose. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plan asked for the still frame beside the tokens. AmbientCanvas takes a still flag that only /showcase passes, which draws the reduced motion frame whatever the visitor's setting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The colour module imported its own value types from the renderer; the renderer now takes them from colors.ts instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The budget and colour schemas restated their types by hand, so a new field could be missed. Each is now typed as the shape it validates and fails the type check when it falls behind; the pixel ratio check is written once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lens and clip planes were written twice, the parallax and panel opacities were bare numbers, and the panel instance layout lived in three places. The layout is now one list the renderer derives its offsets from, checked against the shader's declarations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every exported type and constant now says why it is shaped the way it is, and the pointer comment gives its reason rather than its mechanics. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AC-10 asks muted text to keep 4.5:1 over the brightest background pixel. Measured, additive wave points stacking at the horizon reached 1.8:1 and the panel outlines about 3.8:1. Each shader now caps its fragment under the luminance --muted-foreground allows, and layers blend with MAX so overlaps cannot add past it. The worst pixel over 20 frames now measures 5.0:1; everywhere layers do not overlap the scene looks as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plan now records the CSS vignette, the client created canvas, the -z-10 layering, sRGB colours, the worker replies without dispose, the breakpoint rebuild, the lost context rule, the AC-10 measurement and cap, and the tests that exist. components/AGENTS.md notes the lost context and the contrast cap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
This PR adds the animated background from the Claude Design file
BeStats Background.dc.htmlbehind every page. It has a point wave, drifting outlined "screens", dust, a slight tilt that follows the pointer, and a vignette. It is lit in the personal score cyan (--color-score-personal), the colour of the selected tab and your own rating. The plan is in prompts/ambient-background.md.How it stays cheap
OffscreenCanvas). Otherwise the same renderer runs on the main thread. Without WebGL2, or after a lost GPU context, only the static vignette shows.Other details
globals.css. This PR adds--color-backdrop-wave,--color-backdrop-dustand thebackdrop-vignetteutility, and the renderer reads the tokens when it starts.zod/mini.aria-hidden, ignores the pointer and sits at-z-10.#07080band Space Grotesk.components/AGENTS.mdrecords the new client boundary and the second deliberate use of the personal cyan./showcasehas an Ambient background entry.Verification
pnpm typecheckpasses, andpnpm linthas no errors (the 3 informational notes are older, inwatchlist-show-controls.test.tsx).pnpm test: 2210 tests in 136 files pass. The new tests cover the budgets, the camera maths, colour parsing, the worker protocol, the clock (hidden tab, reduced motion, easing, dispose), the component's idle mount and cleanup, and the layout position.pnpm buildsucceeds./shows,/moviesand/movies/[id]are still partial prerender (◐)./showscontains the scene code./shows, the 404,/privacyand/sign-in.text-muted-foreground. The original design measured 3.59:1.Needs attention
components/AGENTS.md.🤖 Generated with Claude Code