176 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.
HTML ai-promptsanimationcss-animationsfrontendgithub-pagesjavascriptmicrointeractionsmotion-designno-dependenciesreferencescroll-animationui-animationweb-animationweb-developmentwebgl
fix: give Dissolve Transition a lighter Small grid on phones
matin345ca2d86cfb
diff --git a/animations/03-page-transitions/dissolve/README.md b/animations/03-page-transitions/dissolve/README.mdindex eb7e6973..f926ae6a 100644--- a/animations/03-page-transitions/dissolve/README.md+++ b/animations/03-page-transitions/dissolve/README.md@@ -39,7 +39,7 @@ Each tile's inline style bakes the normalized delay into a real transition: `tra| Parameter | Default | Effect ||-----------|---------|--------|| Pattern | Random | The order the tiles appear in: random looks like grain, diagonal sweeps from one corner, and from the middle spreads out in rings |-| Tile size | Medium | How big the tiles are: small is a 16 by 16 grid, medium 8 by 8 and large 4 by 4; small tiles come close to a smooth fade |+| Tile size | Medium | How big the tiles are: small is a 16 by 16 grid (10 by 10 on phones), medium 8 by 8 and large 4 by 4; small tiles come close to a smooth fade || Speed | Normal | How long the tiles take: slow is 1300ms, normal 800ms and fast 500ms; the page swaps at 60% of it, under the tiles || Dissolves both ways | off | Also fades the tiles away in the same pattern to reveal the new page, instead of removing them at once |diff --git a/animations/03-page-transitions/dissolve/index.html b/animations/03-page-transitions/dissolve/index.htmlindex f6c596e0..b73d093d 100644--- a/animations/03-page-transitions/dissolve/index.html+++ b/animations/03-page-transitions/dissolve/index.html@@ -262,10 +262,11 @@}function doDissolve(prev,next){- // Everything a run needs is read now, so a setting changed mid-way cannot desync the tiles.- // d is the whole dissolve in ms (three times as long in slow motion).+ // Everything a run needs is read now, so a setting changed mid-way cannot desync the tiles. d is the whole dissolve in ms+ // (three times as long in slow motion); n is the grid's side, at most 10 on phones (256 tiles freeze the first frame there).const d=dur*(slowTog.checked?3:1),both=biTog.checked;- const delays=buildTiles(gran,PAGES[prev].bg,d,pattern);+ const n=window.matchMedia('(max-width:600px),(max-height:500px)').matches?Math.min(gran,10):gran;+ const delays=buildTiles(n,PAGES[prev].bg,d,pattern);const tiles=[...overlay.children];void overlay.offsetWidth; // commit the transparent tiles before they are switched on// Tiles appear over the old page (dissolving it)diff --git a/docs/superpowers/plans/2026-09-29-transitions-content.md b/docs/superpowers/plans/2026-09-29-transitions-content.mdindex 8e3ca855..e324760d 100644--- a/docs/superpowers/plans/2026-09-29-transitions-content.md+++ b/docs/superpowers/plans/2026-09-29-transitions-content.md@@ -882,6 +882,7 @@ Live-spring damping, measured with the demo's own spring loop. The loop takes on- `hb:input` cancels the way back.- **Reset:** yes. Home at once, with the tile overlay emptied.- **Slow motion:** multiplies `dur` by 3, which stretches the tiles' fades and delays, the swap point, and the clean-up timer.+- **Phones:** the 256 tiles of Small make the frame that starts a dissolve take 50 to 120ms of the page's own work at 4× CPU on a 375px phone, a freeze of about nine frames, so CLAUDE.md's reduced-quality fallback applies. On a phone (the lane's rule: a viewport up to 600px wide or up to 500px tall, a sideways phone included) Small draws a 10 by 10 grid; Medium and Large stay as they are, and computers and tablets keep 16 by 16. `doDissolve()` reads it when the dissolve starts: `const n=matchMedia('(max-width:600px),(max-height:500px)').matches?Math.min(gran,10):gran;`, and passes `n` to `buildTiles()`.- **Reduced motion:** the demo's rule `.page{transition:opacity 300ms linear}.dtile{transition:none!important}` and its `motionOk` branch stay: the pages cross in a plain 300ms fade, with no tiles. Show me fades to Work and back.- **Stage font:** site font.- **Stage:**@@ -896,7 +897,7 @@ Live-spring damping, measured with the demo's own spring loop. The loop takes on| Setting | Control | Choices or range (value shown) | Default | Hint | Sets in the demo ||---|---|---|---|---|---|| Pattern | Choice buttons | Random · Diagonal · From the middle | Random | The order in which the tiles appear. | `pattern`: `'random'` / `'diagonal'` / `'radial'` (read by `getDelays()` in place of `styleSel.value`) |-| Tile size | Choice buttons | Small · Medium · Large | Medium | Small tiles look like grain; large ones like blocks. | `gran`: 16 / 8 / 4 (tiles on each side) |+| Tile size | Choice buttons | Small · Medium · Large | Medium | Small tiles look like grain; large ones like blocks. | `gran`: 16 / 8 / 4 (tiles on each side); on a phone Small draws 10 (see Phones), read as `n` when a dissolve starts || Speed | Choice buttons | Slow · Normal · Fast | Normal | How long the tiles take to cover the page. | `dur`: 1300 / 800 / 500 (ms) |**More options**@@ -928,7 +929,7 @@ Live-spring damping, measured with the demo's own spring loop. The loop takes on| Parameter | Default | Effect ||-----------|---------|--------|| Pattern | Random | The order the tiles appear in: random looks like grain, diagonal sweeps from one corner, and from the middle spreads out in rings |- | Tile size | Medium | How big the tiles are: small is a 16 by 16 grid, medium 8 by 8 and large 4 by 4; small tiles come close to a smooth fade |+ | Tile size | Medium | How big the tiles are: small is a 16 by 16 grid (10 by 10 on phones), medium 8 by 8 and large 4 by 4; small tiles come close to a smooth fade || Speed | Normal | How long the tiles take: slow is 1300ms, normal 800ms and fast 500ms; the page swaps at 60% of it, under the tiles || Dissolves both ways | off | Also fades the tiles away in the same pattern to reveal the new page, instead of removing them at once |