Laser beam
Mirror
Glass block
This 2D companion runs the same laser-maze ray tracer as the 3D version — exact reflection off mirrors and Snell's-law refraction through glass, five fixed puzzle levels plus a free-build mode — but drawn with a plain 2D canvas context instead of a WebGL scene, and it adds two readouts the 3D version doesn't show: a live total-internal-reflection counter, separate from ordinary mirror bounces, and a critical-angle θc display that updates as you move the glass IOR slider so you can predict TIR before the beam hits the glass rather than only see it afterward.