01Collision
The ball's AABB is dilated by its radius and tested against every live brick. Only the
nearest overlap resolves per frame; the axis comes from minimum penetration with a
previous-position tiebreak, so a corner hit can never occupy two bricks at once.
02Reflection
Velocity is renormalised to a constant magnitude after every bounce — 3.40 px/frame rising to
4.00 as the wall empties. The vertical component is floored at 30% so a rally can't flatten into an
endless horizontal loop.
03Paddle
Hit offset from centre maps to a ±60° exit angle and paddle motion is injected as spin. The box is
solid on all four faces — edges and corners deflect the ball rather than swallowing it — and the paddle
itself is clamped to 0…340 so nothing slips past a wall.
04Timestep
Simulation advances on a fixed 1/60 accumulator with a clamped catch-up, so 60 Hz laptops and
120 Hz phones play identically and the ball can never tunnel through a 20 px brick.
05Render
Background, brick sprite and both glows are pre-rendered offscreen and blitted; no shadowBlur
survives in the hot loop. Particles are capped and drawn additively, camera shake touches only the
play layer.