A visualization of elementary cellular automaton written in WebAssembly text format.
You may try out any of the 256 possible rules.
Board size is customizable, and you may also pan and zoom the generated image.
Initialization can be random, or it can happen from a single 1
value on the right side of the board.
There is a wikipedia article that explains what an elementary cellular automaton is.
The main functionality - rule generation and rendering - are written in WebAssembly text format.
WAST code is located in the main.wast file.
Pattern generation happens on the first board_width * board_height
bytes of memory, where each byte is either a 0 or a 1.
After these bytes, there are canvas_width * canvas_height * 4
bytes that are used to store the rendered image.
The rendered image is converted from binary to ImageData
and put to a canvas.