feat: bubbles carried by a current field, calmer desktop pace - #14
Merged
Conversation
The water now carries bubbles. A scalar potential (fbm of position and a
slow time drift) is sampled once per frame on a coarse ~24x16 grid; its
curl gives a divergence-free flow, so the bubbles ride slow curving sheets
instead of gathering into knots. Each bubble adds buoyancy weighted by its
size, so the small ones follow the current and the big ones mostly rise.
The small dim ones are drawn behind the school and the bigger brighter ones
in front, sprites are pre-rendered per mood, depth and size bucket and
cross-fade with the mood, and at midnight the near ones catch a faint halo.
Counts scale with canvas area and speeds with the short side, the still
frame under reduced motion is seeded across the whole canvas, and a resize
rescales positions and rebuilds the sprites.
This is variant v11 ("Current field") of the bubble study, chosen from the
twenty variants reviewed in the local gallery.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
paceFor now damps the fish pace by 6 % once the canvas short side reaches 680px, ramping in from 520px. Desktop water reads calmer at a glance; a phone in either orientation keeps the pace it has today, because its short side stays below the ramp. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Owner
Author
|
Codex review request recorded for |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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
of the bubble study, ported into
website/src/index.html— and the schooldrifts 6 % slower on desktop-sized canvases.
without taking the school's place. On a wide desktop canvas the school
also read a touch busy, so
paceFordamps the pace there only.every viewport; no assets, requests, dependencies or markup added.
How the bubbles work
A scalar potential
psi = fbm(x·2.5/S.min, y·2.5/S.min + t·0.05)is sampledonce per frame on a coarse grid (about 24×16 cells at desktop size, with one
ring of padding nodes); its curl (
vx = dpsi/dy,vy = -dpsi/dx, centraldifferences) is a divergence-free flow, so bubbles drift in slow curving
sheets and never gather into knots. Each bubble adds buoyancy weighted by its
size — small ones ride the current, big ones mostly rise straight — sampled
bilinearly from the grid. The small dim ones are drawn behind the school, the
bigger brighter ones in front. Sprites are pre-rendered per mood × depth ×
size bucket and cross-fade through
st.fadewith the mood; at midnight thenear ones catch a faint
lighterhalo scaled byst.fx.glow. Counts scalewith canvas area (80–140), sizes and speeds with the short side.
The desktop pace
paceForkeeps the small-screen liveliness curve and multiplies it bylerp(1, 0.94, smooth(520, 680, S.min)): no change below a 520px short side,the full 6 % from 680px up. A 390×844 phone (and the same phone in landscape)
is unchanged at 1.451; a 1120×700 desktop goes 1.155 → 1.085.
Content and design evidence
website/distpage at 1120×700 (day, dusk, midnight), 1600×900, 390×844, and?motion=reduce; the still frame is seeded across the whole canvas, so reduced motion shows a settled scene rather than an empty column. Controls, focus and keyboard behaviour are untouched.Safety and validation
npm run preflight— green (6 shipped-output tests, repository and project checks, budget).Evidence
website/src/index.htmlis 80 012 B raw against the 102 400 B.htmlbudget; the critical gzip figure is 27 072 B against 46 080 B.