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
docs: clarify how loop pages pause, slow down and reach the player controls
matinda5297f91146
diff --git a/docs/superpowers/plans/2026-09-28-demo-page-rollout-text-typography.md b/docs/superpowers/plans/2026-09-28-demo-page-rollout-text-typography.mdindex 08fd6813..24d879d3 100644--- a/docs/superpowers/plans/2026-09-28-demo-page-rollout-text-typography.md+++ b/docs/superpowers/plans/2026-09-28-demo-page-rollout-text-typography.md@@ -558,8 +558,9 @@ Each of Tasks 4–10 converts two pages. For each page, follow its section of th5. **Script:** rewrite the page's script so that:- **plays once:** the Replay button (`id="btn-play"`, `data-hb-replay`) plays from the start and keeps looping when Loop is on; switching Loop off lets the current cycle finish with the text shown (Rotate In's `cycle()`/`play()` pattern); Slow motion multiplies the sheet's durations and the timers that wait for them by 3 (not the pauses), taking effect on the next play; every play restarts the animated pieces themselves (rebuild or reset them hidden, `void el.offsetWidth`, then show them). The shared script replays after every setting change and turns Loop on at arrival; the page's script must not do either itself.- **loop, Pause "css":** the looping CSS animations run from page load with no Replay, Loop or autoplay code. If the page also has timers (for example random glitches), it stops them on `document`'s `hb:pause` event when `e.detail.paused` is true and starts them again when it is false.- - **loop, Pause "page":** the page starts its loop at load and listens for `hb:pause`: paused → clear its timers or cancel its animation frame; not paused → carry on from where it is. With Slow motion "page", every duration and timer of the loop is multiplied by 3 while the switch is on, and a `change` on the switch takes effect from the next step at the latest.- - **every loop:** changing a setting while paused shows the new setting without starting the loop again (for "css" pages the shared class already holds new animations).+ - **loop, Pause "page":** the page starts its loop at load and listens for `hb:pause`: paused → clear its timers or cancel its animation frame; not paused → carry on from where it is. With Slow motion "page", the durations of movements and the timers that wait for a movement to finish are multiplied by 3 while the switch is on; holds between movements keep their length, as on plays-once pages. A `change` on the switch takes effect from the next step at the latest.+ - **every loop:** changing a setting while paused shows the new setting without starting the loop again (for "css" pages the shared class already holds new animations). Register the `hb:pause` listener at the top level of the page's inline script: the shared script runs after it and may pause the loop on arrival, so a listener added later (for example in a `DOMContentLoaded` handler) would miss that.+ - **every page:** the page's script reaches the player controls by their ids (`btn-play`, `loop-tog`, `slow-tog`, `btn-pause`), never by their `data-hb-*` attributes: the page checks count those attribute names anywhere in the file.- every setting sets what its "Sets in the demo" column says; choice buttons toggle `.on` and `aria-pressed` (Rotate In's `choices()` helper); sliders update their `output.hb-value` with the plain value; swatches toggle `aria-pressed`; typed text is added with `textContent` or `createTextNode`, never as HTML, and text split into letters keeps each word's letters in one `span` that cannot break (Task 1's `.unit-word` pattern, with one normal space between words);- nothing remains of the old controls, readouts, Restart or Apply buttons, or `data-hb-reset`/`data-hb-skip` markers.6. **README:** What it is as the sheet says (no code); replace the Key parameters table with the sheet's rows; bring How it works in line with the new code; See also lines as in the sheet. Leave When to use it and Production notes as they are unless they name a removed control or the sheet says otherwise.