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: the skill and its tool after the final review: a direct request from the user comes before the rules, an entry's blur amount becomes the gradient's fade width, easing works on properties CSS cannot transition by itself, physics keeps its equal steps, each part keeps one way to use it per kind of input, script-built controls are for plain HTML pages; make-skill skips a divider row anywhere in a Key parameters table, the skill test checks each line ends with its effect, and CLAUDE.md and CONTRIBUTING.md state the Key parameters contract
matin232652dc7f41
diff --git a/CLAUDE.md b/CLAUDE.mdindex 8f7a3524..8f0ca502 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -167,8 +167,9 @@ Every animation README has exactly these sections:The tests require What it is, When to use it, Key parameters and See also; the other two are required byconvention. The page loads **What it is** and **See also** from the README; What it is and Key parameterscontain no code. Each See also line is `- [Title](../slug/) — one plain phrase`, Title being the linked-page's `<h1>`. Key parameters has one row per setting in Try it, named as on the page (a page without Try it-lists the technique's own values). How it works matches the demo's code. Opened from disk (`file://`), the pages+page's `<h1>`. Key parameters is a `| Parameter | Default | Effect |` table with one row per setting in Try it, named as+on the page (a page without Try it lists the technique's own values), no empty cell, and each choice's demo value in+plain words in Effect ("slow is 500ms, normal 300ms and fast 180ms"): the AI skill copies each Effect next to its setting. How it works matches the demo's code. Opened from disk (`file://`), the pagesstill link to each other (the shared script points folder links at `index.html`), but What it is and Similaranimations need a server: a page shows a README link in place of What it is and hides Similar animations.@@ -227,7 +228,8 @@ inside an entry's "Production notes" section, never as their own entry.again from the home page. The home check needs no edit: it reads its totals from `CATS` and `PLACES`.8. Run `node tools/update-sitemap.mjs`: it writes every card into `sitemap.xml`, dated by the last commit to itsfolder (today for a folder with changes not yet committed). Run `node tools/make-skill.mjs` too: it writes every- page's prompt and settings into the AI skill (`skills/animation-handbook/`) and every card into `llms.txt`. Run the+ page's prompt and settings, with its README's Key parameters, into the AI skill (`skills/animation-handbook/`) and+ every card into `llms.txt`. Run thetests and the page check on the new folder and on every page you edited. Run the home page check (`home`) too: thenew card's Copy prompt is compared there.diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 3f577b5f..2331d24c 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -61,7 +61,10 @@ problem goes privately, as [SECURITY.md](SECURITY.md) describes, not into a publother two are required by convention. The page loads *What it is* and *See also* from thisfile, so write *What it is* and *Key parameters* in plain words with no code. Each *See also*line is `- [Title](../slug/) — one plain phrase`, where Title is the linked page's `<h1>`.- *Key parameters* has one row per setting in Try it, named exactly as on the page. Opened+ *Key parameters* is a `| Parameter | Default | Effect |` table with one row per setting in+ Try it, named exactly as on the page, no empty cell, and each choice's demo value in plain+ words in Effect ("slow is 500ms, normal 300ms and fast 180ms"): the AI skill copies each+ Effect next to its setting. Openedfrom disk (`file://`), the pages still link to each other (the shared script points folderlinks at `index.html`), but *What it is* and *Similar animations* need a server: a page showsa README link in place of *What it is* and hides *Similar animations*.@@ -97,7 +100,8 @@ problem goes privately, as [SECURITY.md](SECURITY.md) describes, not into a publthe home page. The home check needs no edit: it reads its totals from `CATS` and `PLACES`.7. Run `node tools/update-sitemap.mjs`: it writes every card into `sitemap.xml`, dated by thelast commit to its folder (today for a folder with changes not yet committed). Run- `node tools/make-skill.mjs` too: it writes every page's prompt and settings into the AI skill+ `node tools/make-skill.mjs` too: it writes every page's prompt and settings, with its README's+ Key parameters, into the AI skill(`skills/animation-handbook/`) and every card into `llms.txt`. Then run the tests and thepage check (see [Tests and the page check](#tests-and-the-page-check)) on the new page and onevery page you edited. Run the home page check (`home`) too: the new card's Copy prompt isdiff --git a/skills/animation-handbook/SKILL.md b/skills/animation-handbook/SKILL.mdindex 94b18997..8e591207 100644--- a/skills/animation-handbook/SKILL.md+++ b/skills/animation-handbook/SKILL.md@@ -13,23 +13,23 @@ license: MIT1. **Find the technique.** Search [references/catalog.md](references/catalog.md) for the effect the user describes and a synonym or two; read the whole file only when you cannot search, the user wants ideas or nothing fits (its By place index is at the end). Each line ends with its places, the parts of a page it suits (Buttons, Text, Images & cards, Backgrounds, Menus & forms, Loading & messages, Page intros, Scrolling, Page changes): match both what the user describes and where it goes. When two fit equally well, build one and mention the other; when none fits, say so and build what the user asked for with the rules below.2. **Read its entry.** It is in the category file named after the folder in its address (references/04-micro-interactions.md for an address under animations/04-micro-interactions/), from the heading with the technique's name to the next heading. If the user's place is on its Avoid on list, prefer a better fit; if they asked for this one by name, build it and say what may suit better.3. **Choose the settings.** Each setting lists its choices and what they do, with the demo's values. The choice in bold is where the demo starts, set to show the effect off in a small box: a starting point, not advice for every page. Take what the user asked for first ("a panel that slides in slowly from the left" picks the slow speed and the left side), then choose the rest for their page: its size, how many things move and what the effect is for. A speed that suits a small demo can feel rushed across a full-width hero, a delay that reads well between many small tiles can vanish between a few large cards, and colors come from the page, not from the demo. Ask only when a choice changes the result a lot and nothing points either way.-4. **Build what the user asked, no more and no less**, in their own stack, with their element in place of each [part in square brackets]. The prompt describes the whole technique as its demo shows it, with every option the demo offers. Take from it the look, the rules that make it look right and everything it says about accessibility, such as pausing a timer while someone reads or hovers it, and build only the parts the request needs, each with one plain way to use it: a single confirmation needs one message with a close button, not a stack of messages that also close on a tap or a swipe. Every extra gesture and option is more code that can break. "Match the settings listed below" means your choices from step 3.+4. **Build what the user asked, no more and no less**, in their own stack, with their element in place of each [part in square brackets]. The prompt describes the whole technique as its demo shows it, with every option the demo offers. Take from it the look, the rules that make it look right and everything it says about accessibility, such as pausing a timer while someone reads or hovers it, and build only the parts the request needs, each with one plain way to use it from each kind of input, plus what people expect, such as Escape to close: a single confirmation needs one message with a close button, not a stack of messages that also close on a tap or a swipe. Every extra gesture and option is more code that can break. "Match the settings listed below" means your choices from step 3.5. **Check it** against the rules below. Then tell the user, in a few lines, which technique you built, with its live demo address; the settings you chose, and why where they differ from the demo's; and the parts of the prompt you left out, which they can ask for.When the user only asks which animation to use, answer for their page: suggest one or two for each place they ask about, and for each say in concrete terms what moves, for how long and after what delay, and what visitors who ask for reduced motion see, with its live demo address. Give real values, not the demo setting names, which mean nothing to someone who has not seen the demo, and build once they choose. To improve an animation the project already has, find its closest technique the same way and change only what falls short of that prompt and the rules below, adding no part they did not ask for.## The rules for the user's page-Keep these even where a prompt does not say them, and follow them where a prompt differs: each prompt describes its technique as its demo shows it, in a box on a page about animation.+Keep these even where a prompt does not say them, and follow them where a prompt differs: each prompt describes its technique as its demo shows it, in a box on a page about animation. A direct request from the user comes first: if it goes against a rule, build what they asked and say in one line what the rule protects.-- **Keep the page whole without the animation.** Nothing in view waits for a scroll: whatever is on screen when the page loads, or after a jump to an anchor, plays its entrance right away, and anything the visitor can scroll to reaches its trigger, even at the very end of the page. A scroll trigger near the bottom of the screen does this on its own; one set higher, as in a demo box, leaves the bottom of a real screen empty. An effect that moves only as far as the visitor scrolls, such as a scrub, simply starts from its first frame. Hide content for an entrance only from a script, early enough that nothing flickers, and create controls that work only with a script, such as an accordion's buttons, from that script, so the page still shows everything if the script fails. Where the browser cannot run an effect, such as one that needs WebGL, show a still version in its place rather than an error.+- **Keep the page whole without the animation.** Nothing in view waits for a scroll: whatever is on screen when the page loads, or after a jump to an anchor, plays its entrance right away, and anything the visitor can scroll to reaches its trigger, even at the very end of the page. A scroll trigger near the bottom of the screen does this on its own; one set higher, as in a demo box, leaves the bottom of a real screen empty. An effect that moves only as far as the visitor scrolls, such as a scrub, simply starts from its first frame. Hide content for an entrance only from a script, early enough that nothing flickers, and on a plain HTML page create controls that work only with a script, such as an accordion's buttons, from that script, so the page still shows everything if the script fails. Where the browser cannot run an effect, such as one that needs WebGL, show a still version in its place rather than an error.- **Give keyboard users what mouse users get on what they can reach.** On a link, button or form control, or a card that holds one, a hover state such as a color, a lift or a revealed label also shows on keyboard focus, and an effect that starts on a press also starts when the keyboard presses it, from the middle of the control. An effect that follows the pointer has nothing to follow from the keyboard: leave the element its normal focus style. Do not make other content focusable for a decorative effect, and leave the arrow keys alone unless the element is a control that uses them, such as a slider, a carousel or a list you reorder: extra tab stops and captured keys cost keyboard users more than the effect gives them.- **Give touch what it needs.** When a hover reveals or does something people need, such as a menu, a tooltip, a hidden button or a pause to read moving text, a tap does it too, and a drag uses pointer events so that touch works. A purely decorative pointer effect, such as a tilt, a glow or a pull toward the pointer, stays still on touch screens, even where the prompt describes a touch version: a finger on a page is usually starting a scroll.- **Follow reduced motion.** When the device asks for it, decorative movement stops: show the end state or a short fade instead, start loops paused and keep pointer effects still. Where the movement itself tells the visitor something, such as a spinner, a progress bar or an effect tied to the scroll position, keep the calm version the prompt describes.- **Move with transform and fade with opacity.** Never animate width, height, top, left or box-shadow, which make the browser lay out or repaint the page on every frame; only a box that pushes the content below as it opens or closes, such as an accordion's answer, may animate its height. Where the effect is something else, such as a clip, a line that draws itself, a color change or a blur-in, the prompt says how to keep it smooth.-- **Make soft shapes from gradients.** A glow or a blob of color that only needs soft edges gets them from a gradient that fades to transparent, not from a large blur filter, which costs the browser a lot on every frame while the shape moves; a gradient is drawn once and then only moved. Keep the blur where it is the effect, as in a blur-in, depth of field, frosted glass, a gooey merge or the glow of a moving border.+- **Make soft shapes from gradients.** A glow or a blob of color that only needs soft edges gets them from a gradient that fades to transparent, not from a large blur filter, which costs the browser a lot on every frame while the shape moves; a gradient is drawn once and then only moved. Where an entry gives a blur amount, use it as the width of the gradient's fade. Keep the blur where it is the effect, as in a blur-in, depth of field, frosted glass, a gooey merge or the glow of a moving border.- **Stop what nobody can see.** A loop that keeps running, such as an ambient background, a canvas or a frame loop, pauses while it is scrolled out of view; a frame loop or timer also stops while the tab is hidden. A small CSS loop, such as a spinner, needs neither.-- **Keep pointer effects light.** A pointer handler only stores the latest position; one frame callback measures the element by its resting box, not its tilted or moved one, and writes CSS custom properties, and CSS transitions do the easing. Measure again when the page scrolls under a resting pointer. Write a frame loop of your own only for what CSS cannot do: it moves by the time since the last frame, capped at about 50 ms, never by a fixed amount per frame, so it runs at the same speed on 30, 60 and 120 Hz screens, and it stops when nothing moves.+- **Keep pointer effects light.** A pointer handler only stores the latest position; one frame callback measures the element by its resting box, not its tilted or moved one, and writes CSS custom properties, and CSS transitions do the easing, on the transform that uses them or on properties registered with @property. Measure again when the page scrolls under a resting pointer. Write a frame loop of your own only for what CSS cannot do: it moves by the time since the last frame, capped at about 50 ms, never by a fixed amount per frame, so it runs at the same speed on 30, 60 and 120 Hz screens, and it stops when nothing moves. Physics that needs equal steps takes them from that time, as its prompt says.- **Lighten heavy effects on phones**, up to 600 px wide or 500 px tall when held sideways: less blur, fewer particles, a simpler shader.- **Keep touch targets at least 44×44 px on phones**, buttons and handles drawn inside the animation included, and **text meant to be read at least 4.5:1 against its background.**- **Add no library the project does not already use.** Every prompt works with plain code; use GSAP, Framer Motion, Three.js or the like only where the project has it or the user asks for it.diff --git a/tests/skill.test.js b/tests/skill.test.jsindex 2d79c52b..343de2b6 100644--- a/tests/skill.test.js+++ b/tests/skill.test.js@@ -159,7 +159,7 @@ test('every page has one entry in its category file and one line in the catalog,// The line says what the setting does: the effect in the README's Key parameters row named like the setting on the page.const row = params.find(p => p.name === name);if (!row) problems.push(`${where}: the setting "${name}" has no row in its README's Key parameters`);- else if (!line.includes(clause(row.effect))) problems.push(`${where}: the line for "${label}" does not hold its README Key parameters effect: ${line}`);+ else if (!line.endsWith(`. ${clause(row.effect)}.`)) problems.push(`${where}: the line for "${label}" does not hold its README Key parameters effect: ${line}`);if (chosen === undefined) continue; // a text field starts with its text, not a choice// The one choice in bold is the one the page starts with (a name holding "·" is quoted).const bold = `**${chosen.includes('·') ? `"${chosen}"` : chosen}**`;@@ -168,7 +168,7 @@ test('every page has one entry in its category file and one line in the catalog,// A page without Try it lists the demo's own values instead: every Key parameters row, with its default and effect.if (!html.includes('<section class="hb-step hb-try"')) {for (const p of params) {- if (!entryLines.some(l => l.startsWith(`- ${p.name}: ${clause(p.start)}. `) && l.includes(clause(p.effect)))) problems.push(`${where}: its entry has no line for the Key parameter "${p.name}" with its default and effect`);+ if (!entryLines.includes(`- ${p.name}: ${clause(p.start)}. ${clause(p.effect)}.`)) problems.push(`${where}: its entry has no line for the Key parameter "${p.name}" with its default and effect`);}}}diff --git a/tools/make-skill.mjs b/tools/make-skill.mjsindex 48b465f2..e8048dff 100644--- a/tools/make-skill.mjs+++ b/tools/make-skill.mjs@@ -75,8 +75,8 @@ function decode(s, where) {});}-// A stand-in for the browser's DOM: just enough of Element and Document for the page script's readSettings and-// pageCopyText. Selectors are lists of compound selectors (a tag, .class, [attr], [attr=value] or [attr="value"]), the only+// A stand-in for the browser's DOM: just enough of Element and Document for the page script's readSettings.+// Selectors are lists of compound selectors (a tag, .class, [attr], [attr=value] or [attr="value"]), the only// kind that script uses.const SELECTORS = new Map();function compile(selector) {@@ -179,7 +179,8 @@ function keyParameters(root, folder, slug, DemoPage) {if (!existsSync(file)) throw new Error(`${where}: the page has no README.md`);const table = DemoPage.sections(readFileSync(file, 'utf8'))['Key parameters'];if (!table) throw new Error(`${where}: README.md has no Key parameters`);- const rows = table.split('\n').filter(line => /^\s*\|/.test(line)).slice(2).map(line => {+ // The header row goes, and a divider row (|---|---|---|) wherever it is, as tests/helpers/markdown.js reads a table.+ const rows = table.split('\n').filter(line => /^\s*\|/.test(line)).slice(1).filter(line => !/^[\s|:-]+$/.test(line)).map(line => {const cells = line.trim().replace(/^\|/, '').replace(/\|$/, '').split('|').map(squeeze);if (cells.length !== 3 || !cells.every(Boolean)) throw new Error(`${where}: a row of README.md's Key parameters is not name | default | effect: ${line.trim()}`);return { name: cells[0], start: cells[1], effect: cells[2] };@@ -310,23 +311,23 @@ const SKILL_BODY = ({ total, base, cats }) => `# Animation Handbook1. **Find the technique.** Search [references/catalog.md](references/catalog.md) for the effect the user describes and a synonym or two; read the whole file only when you cannot search, the user wants ideas or nothing fits (its By place index is at the end). Each line ends with its places, the parts of a page it suits (${cats.places}): match both what the user describes and where it goes. When two fit equally well, build one and mention the other; when none fits, say so and build what the user asked for with the rules below.2. **Read its entry.** It is in the category file named after the folder in its address (references/04-micro-interactions.md for an address under animations/04-micro-interactions/), from the heading with the technique's name to the next heading. If the user's place is on its Avoid on list, prefer a better fit; if they asked for this one by name, build it and say what may suit better.3. **Choose the settings.** Each setting lists its choices and what they do, with the demo's values. The choice in bold is where the demo starts, set to show the effect off in a small box: a starting point, not advice for every page. Take what the user asked for first ("a panel that slides in slowly from the left" picks the slow speed and the left side), then choose the rest for their page: its size, how many things move and what the effect is for. A speed that suits a small demo can feel rushed across a full-width hero, a delay that reads well between many small tiles can vanish between a few large cards, and colors come from the page, not from the demo. Ask only when a choice changes the result a lot and nothing points either way.-4. **Build what the user asked, no more and no less**, in their own stack, with their element in place of each [part in square brackets]. The prompt describes the whole technique as its demo shows it, with every option the demo offers. Take from it the look, the rules that make it look right and everything it says about accessibility, such as pausing a timer while someone reads or hovers it, and build only the parts the request needs, each with one plain way to use it: a single confirmation needs one message with a close button, not a stack of messages that also close on a tap or a swipe. Every extra gesture and option is more code that can break. "Match the settings listed below" means your choices from step 3.+4. **Build what the user asked, no more and no less**, in their own stack, with their element in place of each [part in square brackets]. The prompt describes the whole technique as its demo shows it, with every option the demo offers. Take from it the look, the rules that make it look right and everything it says about accessibility, such as pausing a timer while someone reads or hovers it, and build only the parts the request needs, each with one plain way to use it from each kind of input, plus what people expect, such as Escape to close: a single confirmation needs one message with a close button, not a stack of messages that also close on a tap or a swipe. Every extra gesture and option is more code that can break. "Match the settings listed below" means your choices from step 3.5. **Check it** against the rules below. Then tell the user, in a few lines, which technique you built, with its live demo address; the settings you chose, and why where they differ from the demo's; and the parts of the prompt you left out, which they can ask for.When the user only asks which animation to use, answer for their page: suggest one or two for each place they ask about, and for each say in concrete terms what moves, for how long and after what delay, and what visitors who ask for reduced motion see, with its live demo address. Give real values, not the demo setting names, which mean nothing to someone who has not seen the demo, and build once they choose. To improve an animation the project already has, find its closest technique the same way and change only what falls short of that prompt and the rules below, adding no part they did not ask for.## The rules for the user's page-Keep these even where a prompt does not say them, and follow them where a prompt differs: each prompt describes its technique as its demo shows it, in a box on a page about animation.+Keep these even where a prompt does not say them, and follow them where a prompt differs: each prompt describes its technique as its demo shows it, in a box on a page about animation. A direct request from the user comes first: if it goes against a rule, build what they asked and say in one line what the rule protects.-- **Keep the page whole without the animation.** Nothing in view waits for a scroll: whatever is on screen when the page loads, or after a jump to an anchor, plays its entrance right away, and anything the visitor can scroll to reaches its trigger, even at the very end of the page. A scroll trigger near the bottom of the screen does this on its own; one set higher, as in a demo box, leaves the bottom of a real screen empty. An effect that moves only as far as the visitor scrolls, such as a scrub, simply starts from its first frame. Hide content for an entrance only from a script, early enough that nothing flickers, and create controls that work only with a script, such as an accordion's buttons, from that script, so the page still shows everything if the script fails. Where the browser cannot run an effect, such as one that needs WebGL, show a still version in its place rather than an error.+- **Keep the page whole without the animation.** Nothing in view waits for a scroll: whatever is on screen when the page loads, or after a jump to an anchor, plays its entrance right away, and anything the visitor can scroll to reaches its trigger, even at the very end of the page. A scroll trigger near the bottom of the screen does this on its own; one set higher, as in a demo box, leaves the bottom of a real screen empty. An effect that moves only as far as the visitor scrolls, such as a scrub, simply starts from its first frame. Hide content for an entrance only from a script, early enough that nothing flickers, and on a plain HTML page create controls that work only with a script, such as an accordion's buttons, from that script, so the page still shows everything if the script fails. Where the browser cannot run an effect, such as one that needs WebGL, show a still version in its place rather than an error.- **Give keyboard users what mouse users get on what they can reach.** On a link, button or form control, or a card that holds one, a hover state such as a color, a lift or a revealed label also shows on keyboard focus, and an effect that starts on a press also starts when the keyboard presses it, from the middle of the control. An effect that follows the pointer has nothing to follow from the keyboard: leave the element its normal focus style. Do not make other content focusable for a decorative effect, and leave the arrow keys alone unless the element is a control that uses them, such as a slider, a carousel or a list you reorder: extra tab stops and captured keys cost keyboard users more than the effect gives them.- **Give touch what it needs.** When a hover reveals or does something people need, such as a menu, a tooltip, a hidden button or a pause to read moving text, a tap does it too, and a drag uses pointer events so that touch works. A purely decorative pointer effect, such as a tilt, a glow or a pull toward the pointer, stays still on touch screens, even where the prompt describes a touch version: a finger on a page is usually starting a scroll.- **Follow reduced motion.** When the device asks for it, decorative movement stops: show the end state or a short fade instead, start loops paused and keep pointer effects still. Where the movement itself tells the visitor something, such as a spinner, a progress bar or an effect tied to the scroll position, keep the calm version the prompt describes.- **Move with transform and fade with opacity.** Never animate width, height, top, left or box-shadow, which make the browser lay out or repaint the page on every frame; only a box that pushes the content below as it opens or closes, such as an accordion's answer, may animate its height. Where the effect is something else, such as a clip, a line that draws itself, a color change or a blur-in, the prompt says how to keep it smooth.-- **Make soft shapes from gradients.** A glow or a blob of color that only needs soft edges gets them from a gradient that fades to transparent, not from a large blur filter, which costs the browser a lot on every frame while the shape moves; a gradient is drawn once and then only moved. Keep the blur where it is the effect, as in a blur-in, depth of field, frosted glass, a gooey merge or the glow of a moving border.+- **Make soft shapes from gradients.** A glow or a blob of color that only needs soft edges gets them from a gradient that fades to transparent, not from a large blur filter, which costs the browser a lot on every frame while the shape moves; a gradient is drawn once and then only moved. Where an entry gives a blur amount, use it as the width of the gradient's fade. Keep the blur where it is the effect, as in a blur-in, depth of field, frosted glass, a gooey merge or the glow of a moving border.- **Stop what nobody can see.** A loop that keeps running, such as an ambient background, a canvas or a frame loop, pauses while it is scrolled out of view; a frame loop or timer also stops while the tab is hidden. A small CSS loop, such as a spinner, needs neither.-- **Keep pointer effects light.** A pointer handler only stores the latest position; one frame callback measures the element by its resting box, not its tilted or moved one, and writes CSS custom properties, and CSS transitions do the easing. Measure again when the page scrolls under a resting pointer. Write a frame loop of your own only for what CSS cannot do: it moves by the time since the last frame, capped at about 50 ms, never by a fixed amount per frame, so it runs at the same speed on 30, 60 and 120 Hz screens, and it stops when nothing moves.+- **Keep pointer effects light.** A pointer handler only stores the latest position; one frame callback measures the element by its resting box, not its tilted or moved one, and writes CSS custom properties, and CSS transitions do the easing, on the transform that uses them or on properties registered with @property. Measure again when the page scrolls under a resting pointer. Write a frame loop of your own only for what CSS cannot do: it moves by the time since the last frame, capped at about 50 ms, never by a fixed amount per frame, so it runs at the same speed on 30, 60 and 120 Hz screens, and it stops when nothing moves. Physics that needs equal steps takes them from that time, as its prompt says.- **Lighten heavy effects on phones**, up to 600 px wide or 500 px tall when held sideways: less blur, fewer particles, a simpler shader.- **Keep touch targets at least 44×44 px on phones**, buttons and handles drawn inside the animation included, and **text meant to be read at least 4.5:1 against its background.**- **Add no library the project does not already use.** Every prompt works with plain code; use GSAP, Framer Motion, Three.js or the like only where the project has it or the user asks for it.