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: Holographic Card and Depth-Map Photo tell screen readers the arrow keys do what the pointer does, which holds under reduced motion too, and the 2.5D README says focus alone shows the ring
matin35186e970ba3
diff --git a/animations/06-3d-advanced/2-5d-pseudo-3d/README.md b/animations/06-3d-advanced/2-5d-pseudo-3d/README.mdindex def94219..cdffde37 100644--- a/animations/06-3d-advanced/2-5d-pseudo-3d/README.md+++ b/animations/06-3d-advanced/2-5d-pseudo-3d/README.md@@ -54,7 +54,7 @@ function sweep(now) { // start = performance.now() when ShThe demo also blends in the camera's starting position, so a second press, or a run that a real pointer stopped, carries on from where the camera is instead of jumping. Reset puts the camera back in the middle.-The scene also takes keyboard focus, and the keys stand in for the pointer: each press of an arrow key moves the camera 6% of the way across the stage (a key held down repeats) and shows the ring where a pointer would be. Escape or moving focus away hides the ring and leaves the camera where it is, as the pointer leaving does.+The scene also takes keyboard focus, and the keys stand in for the pointer: keyboard focus shows the ring where the camera is, and each press of an arrow key moves the camera 6% of the way across the stage (a key held down repeats). Escape or moving focus away hides the ring and leaves the camera where it is, as the pointer leaving does.## Key parameters| Parameter | Default | Effect |diff --git a/animations/06-3d-advanced/depth-map-photo/index.html b/animations/06-3d-advanced/depth-map-photo/index.htmlindex 6aad103d..a1aa66e7 100644--- a/animations/06-3d-advanced/depth-map-photo/index.html+++ b/animations/06-3d-advanced/depth-map-photo/index.html@@ -51,7 +51,7 @@<div><h2 id="hb-watch-title">Hover it</h2><p>Move your pointer over the picture, drag a finger across it (or Tab to it and use the arrow keys), or press Show me.</p></div></div><div class="stage" id="stage">- <canvas id="cvs" role="img" tabindex="0" aria-label="A drawn sunset landscape: a low sun, far mountains, hills, a meadow, and a tree and a rock in front. As the pointer moves, the near parts shift more than the far ones. Press the arrow keys to move the view."></canvas>+ <canvas id="cvs" role="img" tabindex="0" aria-label="A drawn sunset landscape: a low sun, far mountains, hills, a meadow, and a tree and a rock in front. As the pointer moves, the near parts shift more than the far ones. The arrow keys do what the pointer does."></canvas></div><div class="hb-player"><button class="hb-play" type="button" id="btn-demo" data-hb-demo><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"/></svg>Show me</button>@@ -293,8 +293,8 @@ function choices(id,pick){choices('str-seg',d=>{STR=+d.str;if(!raf)draw();});document.getElementById('map-tog').addEventListener('change',e=>{MAP=e.target.checked?1:0;if(!raf)draw();- cvs.setAttribute('aria-label',MAP?'The depth map of the landscape in gray: the sky is black, and the mountains, hills, meadow, tree and ground get lighter the nearer they are. Press the arrow keys to move the view.':- 'A drawn sunset landscape: a low sun, far mountains, hills, a meadow, and a tree and a rock in front. As the pointer moves, the near parts shift more than the far ones. Press the arrow keys to move the view.');+ cvs.setAttribute('aria-label',MAP?'The depth map of the landscape in gray: the sky is black, and the mountains, hills, meadow, tree and ground get lighter the nearer they are. The arrow keys do what the pointer does.':+ 'A drawn sunset landscape: a low sun, far mountains, hills, a meadow, and a tree and a rock in front. As the pointer moves, the near parts shift more than the far ones. The arrow keys do what the pointer does.');});if(!initGL())init2d();diff --git a/animations/06-3d-advanced/holographic-card/index.html b/animations/06-3d-advanced/holographic-card/index.htmlindex e78d9034..ce36a517 100644--- a/animations/06-3d-advanced/holographic-card/index.html+++ b/animations/06-3d-advanced/holographic-card/index.html@@ -83,7 +83,7 @@<div><h2 id="hb-watch-title">Hover it</h2><p>Move your pointer over the card, drag a finger across it (or Tab to it and use the arrow keys), or press Show me.</p></div></div><div class="stage" id="stage">- <div class="card" id="card" data-foil="smooth" role="img" tabindex="0" aria-label="A holographic trading card named Aurora Prism: a glowing crystal over dark mountains under a night sky. As the card tilts toward the pointer, rainbow foil slides across it and a glare follows the pointer. Press the arrow keys to tilt it.">+ <div class="card" id="card" data-foil="smooth" role="img" tabindex="0" aria-label="A holographic trading card named Aurora Prism: a glowing crystal over dark mountains under a night sky. As the card tilts toward the pointer, rainbow foil slides across it and a glare follows the pointer. The arrow keys do what the pointer does."><div class="ly art"><svg viewBox="0 0 100 140" aria-hidden="true"><defs><linearGradient id="hc-frame" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#efeaff"/><stop offset=".3" stop-color="#a191ee"/><stop offset=".55" stop-color="#4a3aa8"/><stop offset=".8" stop-color="#b8aaf5"/><stop offset="1" stop-color="#ece6ff"/></linearGradient>