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: Shatter Effect (02.14): the README says the Loop, not every play, builds no copies out of view

matin09b771dba9fd
diff --git a/animations/02-entrance-and-exit/shatter-effect/README.md b/animations/02-entrance-and-exit/shatter-effect/README.md
index 295faca4..8588b200 100644
--- a/animations/02-entrance-and-exit/shatter-effect/README.md
+++ b/animations/02-entrance-and-exit/shatter-effect/README.md
@@ -45,7 +45,7 @@ for(let k=0;k<=12;k++){
el.animate(frames,{duration:T,delay:start+wave*d/far,fill:'both'});
```
-Each piece waits until the break (`start`, the time the cracks take), then a little longer the farther it is from the impact, so the break spreads outward; a short flash marks the impact. With the cracks shown, the crack lines are first drawn in an SVG over the card, ring by ring, while the card gives a small jolt. They are a soft dark line under a light one, so they show on both the picture and the caption, and every copy carries the same lines along its own edges: nothing changes at the break, and each piece keeps a light edge where it broke (lines this soft and wide stay clean when a piece tilts; a thin, sharp pair breaks up into a sawtooth). The next card fades in from 45% of the flight. When the last piece has faded, the pieces are removed; Replay or a setting change cancels everything still running (`getAnimations({subtree:true})`) and starts the same break over. Under reduced motion the next card simply fades in over the old one, with no pieces. Slow motion makes the play three times longer; the hold between plays while Loop is on stays the same. If the stage changes size during a play (a resized window, a phone turned sideways), the play ends at once on the next card, because its pieces were placed for the old size; reduced motion switched on during a play ends it the same way. While Loop is on and the stage is scrolled out of view, the next play waits until the stage is back in view (an `IntersectionObserver`), so no copies are built while nobody can see them.
+Each piece waits until the break (`start`, the time the cracks take), then a little longer the farther it is from the impact, so the break spreads outward; a short flash marks the impact. With the cracks shown, the crack lines are first drawn in an SVG over the card, ring by ring, while the card gives a small jolt. They are a soft dark line under a light one, so they show on both the picture and the caption, and every copy carries the same lines along its own edges: nothing changes at the break, and each piece keeps a light edge where it broke (lines this soft and wide stay clean when a piece tilts; a thin, sharp pair breaks up into a sawtooth). The next card fades in from 45% of the flight. When the last piece has faded, the pieces are removed; Replay or a setting change cancels everything still running (`getAnimations({subtree:true})`) and starts the same break over. Under reduced motion the next card simply fades in over the old one, with no pieces. Slow motion makes the play three times longer; the hold between plays while Loop is on stays the same. If the stage changes size during a play (a resized window, a phone turned sideways), the play ends at once on the next card, because its pieces were placed for the old size; reduced motion switched on during a play ends it the same way. While Loop is on and the stage is scrolled out of view, the next play waits until the stage is back in view (an `IntersectionObserver`), so the Loop builds no copies while nobody can see them.
## Key parameters