Skip to content

Demo: Animation

This uses plot() and the browser's requestAnimationFrame() to spin a rotating cube. A graphics attribute is set at the start of every row on each frame to activate mosaic graphics for that row. Mosaic graphics use characters 0x20 to 0x3f and 0x60 to 0x7f in the G1 set. The cube code was AI-generated.

The graphic display options swtich between contiguous and separated mosaics. The third option is text, which removes the graphics attributes to show the corresponding character from the G0 set instead.