Skip to content

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.

fix: Game of Life (07.23): the prompt keeps cells from getting too small on phones, as the demo does

matin40f89a2d4282
diff --git a/animations/07-ambient-background/game-of-life/index.html b/animations/07-ambient-background/game-of-life/index.html
index 6e2de246..e1b5e829 100644
--- a/animations/07-ambient-background/game-of-life/index.html
+++ b/animations/07-ambient-background/game-of-life/index.html
@@ -122,7 +122,7 @@
<div><h2 id="hb-prompt-title">Copy the prompt</h2><p>Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.</p></div>
</div>
<div class="hb-card">
- <p class="hb-prompt">Add a Game of Life background to [the section you want it behind]. Split a canvas into a grid of square cells, each alive or dead, and at a steady pace work out the next generation from each cell's eight neighbors: a dead cell with exactly three live neighbors is born, a live cell with two or three stays alive, and every other cell dies. Time the generations by elapsed time, not by frames, and when the settings include trails, let dying cells fade out. Let the visitor click, drag or touch to draw cells, and start again when the world settles. Use larger cells on phones. If the visitor has reduced motion turned on, show one still frame. Match the settings listed below.</p>
+ <p class="hb-prompt">Add a Game of Life background to [the section you want it behind]. Split a canvas into a grid of square cells, each alive or dead, and at a steady pace work out the next generation from each cell's eight neighbors: a dead cell with exactly three live neighbors is born, a live cell with two or three stays alive, and every other cell dies. Time the generations by elapsed time, not by frames, and when the settings include trails, let dying cells fade out. Let the visitor click, drag or touch to draw cells, and start again when the world settles. Keep the cells from getting too small on phones. If the visitor has reduced motion turned on, show one still frame. Match the settings listed below.</p>
<div class="hb-chips-box" hidden>
<p class="hb-chips-title">Your settings</p>
<ul class="hb-chips"></ul>