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: 3D Carousel: American spelling in a code comment

matin72dd1967bf35
diff --git a/animations/06-3d-advanced/carousel-3d/index.html b/animations/06-3d-advanced/carousel-3d/index.html
index 728bb89a..a36f6089 100644
--- a/animations/06-3d-advanced/carousel-3d/index.html
+++ b/animations/06-3d-advanced/carousel-3d/index.html
@@ -290,7 +290,7 @@
}
// The shift (in the ring's own px) that puts an outline in the middle of the box, up and down
const middle=(o,D)=>{const ys=o.map(q=>q[1]);return-(Math.min(...ys)+Math.max(...ys))/2*(P+R+D)/P;};
- // Push the ring back until its outline is inside the box and clear of the four captions in the corners, then centre it
+ // Push the ring back until its outline is inside the box and clear of the four captions in the corners, then center it
function fitInside(){
const W=view.clientWidth,H=view.clientHeight,pad=6;
const boxes=caps.map((c,i)=>{const w=c.offsetWidth,h=c.offsetHeight,x=SPOT[i][0]?W-pad-w:pad,y=SPOT[i][1]?H-pad-h:pad;