Stained glass

A stained glass window designer. Each window is a random three-level hierarchy: panels, the pieces of glass in each panel, and some pieces cut further. FoamTree's gaps between the groups are the lead that holds the glass together, thicker between the panels.

Move the pointer over the window to light it up. Click a piece of glass to change its color, Shift+click to repaint its whole panel. The mouse wheel zooms in, Esc zooms out.

Link to this window

What's in the code?