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: pressing the chosen Number of particles on Canvas Particle Effect no longer scatters the dots again
matin145235a0c41c
diff --git a/animations/06-3d-advanced/canvas-particle-effect/index.html b/animations/06-3d-advanced/canvas-particle-effect/index.htmlindex 2aafd47f..8f5b04b4 100644--- a/animations/06-3d-advanced/canvas-particle-effect/index.html+++ b/animations/06-3d-advanced/canvas-particle-effect/index.html@@ -167,7 +167,7 @@ let W,H,particles=[],mouse={x:-999,y:-999};let paused=false,raf=null,last=null;let COUNT=500,level=1,DIST=100,SPD=0.8,FORCE=-0.5,COLOR='#58a6ff';let CONNECTIONS=true,TRAILS=false;-// Dots for Few, Medium and Many on wide screens, on screens up to 1024px, and on phones (up to 600px)+// Dots for Few, Medium and Many on wide screens, on screens up to 1024px, and on phones (up to 600px wide, or up to 500px tall)const COUNTS=[[250,500,800],[60,90,120],[30,45,60]];// Backing store is scaled by DPR (capped at 2) so 0.5px lines and 1px dots stay crisp@@ -295,7 +295,7 @@ function choices(id,pick){}));}choices('force-seg',d=>{FORCE=+d.force;});-choices('count-seg',d=>{level=+d.level;spawn();redraw();});+choices('count-seg',d=>{if(+d.level===level)return;level=+d.level;spawn();redraw();});choices('link-seg',d=>{CONNECTIONS=d.dist!=='0';if(CONNECTIONS)DIST=+d.dist;redraw();});choices('speed-seg',d=>{const n=+d.spd,k=n/SPD;SPD=n;particles.forEach(p=>{p.vx*=k;p.vy*=k;});});choices('color-sw',d=>{COLOR=d.color;redraw();});diff --git a/docs/superpowers/plans/2026-09-29-3d-content.md b/docs/superpowers/plans/2026-09-29-3d-content.mdindex 2378fc05..0ca58a2a 100644--- a/docs/superpowers/plans/2026-09-29-3d-content.md+++ b/docs/superpowers/plans/2026-09-29-3d-content.md@@ -377,7 +377,7 @@ None: leave out the `details.hb-options` block.| Setting | Control | Choices or range (value shown) | Default | Hint | Sets in the demo ||---|---|---|---|---|---|| Pointer effect | Choice buttons | Push · Pull · None | Push | What your pointer or finger does to nearby dots. | `FORCE`: −0.5 / 0.5 / 0 |-| Number of particles | Choice buttons | Few · Medium · Many | Medium | More dots make more links; phones and tablets draw fewer. | `COUNT`: 250 / 500 / 800 on screens wider than 1024px, 60 / 90 / 120 up to 1024px, 30 / 45 / 60 up to 600px wide or up to 500px tall (the size is checked at each `spawn()`), then `spawn()` |+| Number of particles | Choice buttons | Few · Medium · Many | Medium | More dots make more links; phones and tablets draw fewer. | `COUNT`: 250 / 500 / 800 on screens wider than 1024px, 60 / 90 / 120 up to 1024px, 30 / 45 / 60 up to 600px wide or up to 500px tall (the size is checked at each `spawn()`), then `spawn()`; pressing the number already chosen does nothing (it would scatter every dot again) || Link distance | Choice buttons | None · Short · Medium · Long | Medium | How close two dots must be to join with a line. | None: `CONNECTIONS` false; Short · Medium · Long: `CONNECTIONS` true and `DIST` 70 / 100 / 150 |**More options**