Repository navigation
Speed up loading, harden the site and enrich the landscape - #58
Merged
Merged
Conversation
Loading: ship Rapier's WebAssembly as a streamed file instead of base64 JS, prefetch physics, weather and hashed terrain textures alongside world preparation, compress the OPFS world cache (96.7 MB to 30.1 MB) with guards, and show the profile immediately with a fade. Rendering: dynamic resolution with a pixel budget, cheaper depth of field, contrast overlay and sky probe, an even fish/lakebed schedule, fewer per-frame allocations, and a fix for reduced-motion visitors who never left the loader. Ambience: fog, snow with ground cover, a staged rainbow, smooth live weather refresh, seasons with autumn and winter foliage, dusk bats and daytime insects; audio follows temperature, fog, snow and wind and works in Firefox. Site and tooling: CSP and security headers verified against the build, SEO and social metadata, a CI e2e job, Renovate, knip, warnings as errors, a split landscape engine with shared math and noise helpers, and a short smoke e2e suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The three-second reveal showed the text over the loader. The profile now stays transparent (still in the accessibility tree, and shown on keyboard focus) until the scene is ready or fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pixel budget lowered the canvas pixel ratio itself, so the profile text and icons drawn on it by the contrast overlay were upscaled and soft. The canvas now keeps the display ratio (capped at 1.75, or 1.25 on low-power devices) and the budget only scales the scene's own render targets, like the dynamic resolution. The body is unselectable again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ouder sound - Shed leaves are light aerodynamic plates that flutter, tumble, land on the terrain and float on the live lake surface before fading. - The held ball keeps physics in water: buoyancy, drag, wake, splashes and collisions while grabbed. - Birds: four species (crow, black-headed gull, mallard, swift) with hinged wings, lit plumage, boids flocking and context-aware schedules. - Remove the drifting white foam flecks on the lake. - Sound: master +6 dB behind a gentle limiter. - Environment probe no longer stalls at the 200 ms interval (crown lighting pops). - Water impulses reject non-finite input and the solver heals NaN cells. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A stream runs down a carved channel from a spring to the waterfall's pool and spills over the lip; reaches the camera can't see cleanly are hidden rather than shown in slivers. World cache format bumped to 3. - Foliage cards are lit with per-vertex crown normals and less per-card colour jitter, so crowns no longer show pale/dark card patches that pop as the wind sways them. - The held ball lays a continuous wake along its path instead of a series of separate troughs. - Floating leaves sit visibly above the drawn water surface. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Crowns: per-card flutter cut to a quarter and the screen-space leaf relief removed. Thousands of alpha-tested card edges moving a pixel every frame crawled without multisampling; crowns still lean and toss as a whole. Strong per-pixel flicker on crowns drops from 8.9% to 0.9%. - Leaves: ground below the lake level counts as water, shallows included, so leaves landing near the shore float instead of sinking to the bed. - CI e2e runs the page journeys only; its software WebGPU adapter cannot load the full scene. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Held ball: no periodic spray while dragged, and bobbing on a wave no longer counts as tearing out and plunging back in (it must clear the surface by 8 cm), which threw a splash and a ring at every bob. - Floating leaves are drawn tilted toward the camera (up to about 26°, raised so their near edge stays dry): flat on the water they were seen edge-on from the bank and vanished as they landed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Averaged atlas mips left distant crowns full of sub-pixel holes that switched between leaf and bright sky as cards moved. Coverage now grows by 0.3 per mip level (alpha test with mip scaling), so only the crown's rim is cut out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A leaf falling from a crown is handed, as it touches open water, to a pool of Rapier leaf floaters (16 on desktop, 6 on phones) with its position, velocity, colour and drawn width. From there it floats on the same buoyancy as the ball, rides the waves and ripples, drifts with the wind and collides with the shore and the buoy. Floating leaves are drawn turned toward the camera so they stay visible from the bank. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tilt toward the camera reduced from about 26° to 12°, its compensating lift halved, and caught leaves drawn at most 3× their collider: steeper and larger, they looked perched above the water. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Six 40 cm bats a few pixels across, flapping high over the lake after sunset, read as stray leaves floating in the sky. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Flow streaks seen end-on from the bank turned into vertical stripes. The stream now rises at a gentle 10° (only the main fall is vertical), its head is closed by rising ground, and it shows soft drifting foam lit toward the viewer instead of mirroring dark trees. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…blend Desktop renders the view at 4x MSAA with alpha-to-coverage on foliage, then blends 60% of the previous frame clamped to the current 3x3 neighbourhood before the lens, so swaying cutout edges no longer flip between leaf and sky every frame. Pixels blinking on crowns drop by about 60-65% (75-90% for back-and-forth blinks) at about +1.4 ms GPU. The mip-scaled coverage that filled small-leaf cards into squares is removed. Low-power devices keep the plain alpha test. 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.
Summary
A full review of the site turned up slow loading (1.65 MB gzip of base64 Rapier, uncached textures), no security headers, Firefox sound failing outright, and reduced-motion visitors stuck on the loader. This PR fixes those, adds fog, snow, a rainbow, seasons and wildlife to the landscape, and restructures the scene code. The browser suite shrinks to a short smoke run, and the rest of the coverage moves to unit tests.
Changes
Loading
.wasmfile that compiles while it downloads, instead of base64 inside JavaScript: 40 kB of script plus 1.19 MB of wasm, against 1.67 MB of script before. The download starts next to world preparation, and physics is ready 3–4× sooner.Rendering
main.Ambience
?season=to force one): autumn colours, bare winter crowns.cancelAndHoldAtTime; iOS interruption recovery and music unlock; mute is remembered; crickets follow the temperature; rain, fog and snow shape the mix; a synthesized reverb; wind panning; thunder pre-rendered so it no longer stalls frames.Site and tooling
vercel.json. Their hashes are checked against the build (pnpm csp), andvite previewserves the same headers.Follow-up feedback
Validation
pnpm checkpasses: typecheck, lint with--deny-warnings, formatting, 641 unit tests, build, bundle budgets, CSP hashes and knip.pnpm e2ewith GPU Chromium: 7/7 passed in 40 s.🤖 Generated with Claude Code