cells = {
const data = new Uint8ClampedArray(width * height).fill(0);
data[Math.floor(width / 2)] = 1;
let i = 0, j = width;
for (let y = 1; y < height; y++) {
for (let x = 0; x < width; x++) {
const n = (x == 0 ? 0 : data[i-1] << 2) | (data[i] << 1) | (x == width - 1 ? 0 : data[i+1]);
i++;
data[j++] = bits[n];
}
}
return data;
}