Hit testCircle vs AABB — closest point on the brick clamped to the ball centre, then distance check against r = 3.
Side pickSmaller penetration axis wins: vertical overlap ⇒ flip dy, horizontal overlap ⇒ flip dx.
One per frameOnly the closest brick resolves per sub-step, so corners never eat two bricks or reverse twice.
De-penetrateBall is pushed out along the normal before the flip, so it can never be left inside a brick.
Constant speedVelocity is renormalised after every reflection: 3.4 px/f rising to 4.0 px/f as the wall thins.
Paddle angleHit offset maps to ±60°, plus 18 % of paddle momentum. Edges bounce off the sides, not through them.
Anti-grindMinimum vertical component held at 0.30 × speed — no infinite horizontal ping-pong.