Follow-up to #01M5Z00VJ6215NFZ8F3KJ48FXA, whose fix is in main. That change made
the burst draw at all; this one makes it look like a celebration.
120 particles at scalar: 1 from one point read as a small puff on a full-width
page. The effect is now two of the library’s own published examples:
| settings | |
|---|---|
| opening burst — “realistic look” | particleCount: 500, spread: 180, ticks: 400, gravity: 0.5, decay: 0.92, startVelocity: 30, scalar: 1.2 |
| then — “fireworks” volley | angle: 60 at x: 0 and angle: 120 at x: 1, spread: 55, count tapering 30 * (timeLeft / 1200) every 250 ms |
scalar: 1.2 and the lower gravity are what fix “really small”.
One deliberate departure from the fireworks example: its volley runs for 15 seconds. This one runs for 1.2 s, because the page it lands on is a change request someone is about to read. Fifteen seconds of confetti over the discussion is hostile the second time you see it.
Measured
Real Firefox, real Merge click, 1360×682:
181 frames over 3000ms — median 17ms, p95 20ms, worst 23ms (~60fps in software rendering)
canvases 6s later: 0 (the volley's timer ends with the burst)
So the extra particles cost nothing measurable, and nothing lingers after the
effect finishes. disableForReducedMotion still applies to both bursts, the CSP
is untouched, and the instance is still created with useWorker: false.
Branch note
This was briefly a second commit on the branch of #01M5Z0119HMHGDXTTWGRH5SKXC,
which had already merged, so that request could not carry it. It now has its own
branch from the merged head, and the diff against main is exactly the two files
below.
Checks
gofmt, go vet ./..., go test ./..., vole workflow check, and
vole workflow run verify (7 steps, -race) all pass.
Closes #01M5Z0JYRKH8EV3Y85VDCRMGNS