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: word the loop comment of Starfield plainly

matin91981225403d
diff --git a/animations/07-ambient-background/starfield/index.html b/animations/07-ambient-background/starfield/index.html
index 56948d95..c507142a 100644
--- a/animations/07-ambient-background/starfield/index.html
+++ b/animations/07-ambient-background/starfield/index.html
@@ -255,8 +255,8 @@
function still(){if(paused)paint(false);}
// loop() keeps exactly one frame requested in raf; Pause cancels it and Play starts one loop again. At most one frame per
- // 16 ms, and each stands for the time since the last one (in 60ths of a second, at most 50 ms's worth, so a background
- // tab does not leap). The first frame after a start has nothing to measure from, so it leaves the picture as it is.
+ // 16 ms, and each stands for the time since the last one in 60ths of a second, never more than 50 ms (a background tab
+ // does not leap). The first frame after a start has nothing to measure from, so it leaves the picture as it is.
function loop(ts){
raf=requestAnimationFrame(loop);
if(lastT!==null&&ts-lastT<16)return;