Skip to content

feat: bubbles carried by a current field, calmer desktop pace - #14

Merged
kiaquila merged 2 commits into
mainfrom
claude/fathom-current-field
Sep 10, 2026
Merged

feat: bubbles carried by a current field, calmer desktop pace#14
kiaquila merged 2 commits into
mainfrom
claude/fathom-current-field

Conversation

@kiaquila

Copy link
Copy Markdown
Owner

Summary

  • What changed: the water now carries bubbles — variant v11 "Current field"
    of the bubble study, ported into website/src/index.html — and the school
    drifts 6 % slower on desktop-sized canvases.
  • Why: the water read empty between the fish; the bubbles give it depth
    without taking the school's place. On a wide desktop canvas the school
    also read a touch busy, so paceFor damps the pace there only.
  • Product surface affected: the artwork page (canvas), all three moods,
    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 sampled
once 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, central
differences) 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.fade with the mood; at midnight the
near ones catch a faint lighter halo scaled by st.fx.glow. Counts scale
with canvas area (80–140), sizes and speeds with the short side.

The desktop pace

paceFor keeps the small-screen liveliness curve and multiplies it by
lerp(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

  • Facts and copy are sourced or explicitly marked as assumptions — no copy changed.
  • Third-party assets, fonts, scripts, embeds, and trackers are licensed and justified — none added; the page stays dependency-free and same-origin.
  • Smallest/largest layouts, keyboard, reduced motion, and the critical path were checked — screenshots of the shipped website/dist page 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.
  • README, AGENTS, and durable product docs still match the implementation.

Safety and validation

  • No secrets, personal paths, generated output, or unrelated customer data are tracked.
  • npm run preflight — green (6 shipped-output tests, repository and project checks, budget).
  • Payload-budget result and any intentional budget change are explained below — no budget was changed.

Evidence

npm run preflight
Payload: 469427 B raw, 414884 B gzip; critical 27072 B gzip.
  • website/src/index.html is 80 012 B raw against the 102 400 B .html budget; the critical gzip figure is 27 072 B against 46 080 B.
  • Per-frame cost of the same field, measured in real-time headless Chrome over 260 frames on the gallery build of v11: 0.273 ms average, 0.6 ms peak — inside the 1.5 ms target. No canvas or gradient is created per frame (sprites are pre-rendered at setup and on resize), no timers, no DOM, no network.
  • Bubbles verified visible in all three moods and on the phone layout; a resize rescales positions and rebuilds sprites rather than appending.

kiaquila and others added 2 commits September 10, 2026 18:51
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>
@kiaquila

Copy link
Copy Markdown
Owner Author

@codex review b309cb0

@github-actions

Copy link
Copy Markdown

Codex review request recorded for b309cb0a80.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T21:53:55.364779Z b309cb0 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: b309cb0a80

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@kiaquila
kiaquila merged commit 5bcde48 into main Sep 10, 2026
7 of 9 checks passed
@kiaquila
kiaquila deleted the claude/fathom-current-field branch September 10, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant