feat(registry): cocoa powder dissolving in milk, with an optional maths view - #4352
Closed
miguel-heygen wants to merge 7 commits into
Closed
miguel-heygen wants to merge 7 commits into
miguel-heygen wants to merge 7 commits into
Conversation
…me and crack warp
…ollows the live phase
…e on an empty value
jrusso1020
approved these changes
Sep 23, 2026
jrusso1020
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed at d1594c3. Source only: powder-dissolve.html and registry-item.json. Approving.
Checked against the body
- Frames depend only on time:
draw(t)depends ontand on values fixed at init: the clump layout frommulberry32(SEED), the variables, and hash-based noise in the shader. Nothing carries over from one frame to the next, and nothing callsMath.random,Dateorperformance.now. Repainting hangs off the tweeneddriver.tsetter, sotl.seek()repaints as well (same pattern asspiral-galaxy).preserveDrawingBuffer: truecovers captures taken after a seek. - Review fixes are in:
clampNumusesparseFloat, sonull,""and booleans fall back to the 8 s default instead of reading as 0.hexRgbaccepts#rgband#rrggbband falls back to the declared default. There's no web-font<link>, and the panel only asks for EB Garamond and Inter. - Variables: the four declarations in
data-composition-variablesmatchregistry-item.jsonfield for field. Defaults are read from the root attribute only, so there's a single source. - Maths panel
innerHTML: it only ever gets the staticEQSstrings. The live values that depend on variables go throughtextContent, so no variable value reaches HTML. - Shader: loop bounds are constant, and indexing
uBatchSpread[b]with the loop index is valid in GLSL ES 1.0.log/poware guarded (max(uPowder, 0.02)), andatan(m.y, m.x)only runs whenalong > 0, so it never sees the zero vector. - Catalog files: leaving the generated files to #4337 matches how it works now (#4337 merged 16:09Z today).
Nits, non-blocking
MATHS = vars.maths === trueonly accepts a real boolean. Anything that hands the string"true"(the untyped--varspath the body defers) silently shows no panel. The siblings are more forgiving:halftone-field.html:99acceptstrue|1|on|yesandcuboid-carousel.html:122accepts"true"/"false". Matching one of them would make the flag work from the CLI today, whatever happens in the follow-up.- The preview
.mp4/.pngpoint at CDN paths that aren't uploaded yet, so the catalog card shows no preview until someone uploads them. The body already says so; this is a note to track it, not a change request.
— Rames
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 this adds
A new catalog block,
powder-dissolve: a spoonful of cocoa lands on milk seen from above, floats dry and pale, wets through from its edges and along cracks in the crust, then its colour reaches out in dark fingers and blooms into marbled clouds until the milk is one even chocolate tint. The motion slows to near stillness, so it works as a calm background.What you can change:
Why every frame renders on its own
Every frame is a pure function of time: the clump layout comes from a fixed seed, grain and noise from position hashes, and the spreading colour from the closed-form solution of diffusion (a Gaussian convolved with a Gaussian stays a Gaussian), so frame N never reads frame N-1.
Checked on a Linux box with the repo CLI (
--format png-sequence, 1 worker vs 4 workers, byte for byte):Math.random()injected: 20 of 20 frames differ, so the check can fail.lint-registry-items: 0 errors.hyperframes lint: 0 errors, 1 warning (file length).oxfmt --check: clean.The maths panel uses only fonts the renderer supplies itself (EB Garamond and Inter), with no web-font link: a link declared after the renderer's own font faces can override them whenever it loads in time, which made early frames differ between workers. Every character in the panel was checked against the font files the renderer actually embeds.
Source files only
This PR adds only
registry/blocks/powder-dissolve/{powder-dissolve.html, registry-item.json}. The generated catalog files (registry index, search vectors, payload, docs page) are left to the catalog automation in #4337. The preview video and poster use the standard CDN paths and still need uploading; the preview should be the maths version.Pattern: raw WebGL1 full-screen fragment shader like
registry/blocks/domain-warp-dissolve, with the repaint on a GSAP-tweened property setter likeregistry/blocks/spiral-galaxy, so seeking repaints too.Before
Searching the catalog for "powder dissolve" finds only unrelated dissolve transitions:
After
Default look (0.3 s landing, 1.2 s floating, 2.5 s wetting and cracks, 3.5 s fingers, 4.5 s bloom, 9 s even tint):
after-clean.mp4
Maths on:
after-maths.mp4
Review
An independent adversarial review ran against this branch. Findings and their fixes:
null) was read as 0 and clamped to 3 s instead of the default 8 s.hyperframes add --varsare not checked for boolean, colour or string variables. Follow-up in its own PR.