switching to composition API

This commit is contained in:
2022-12-21 23:45:22 +01:00
parent 9fe16c8406
commit 0396bd40af
11 changed files with 441 additions and 576 deletions

View File

@ -57,7 +57,7 @@ export function boardToPic(board, width, height, cellProperties) {
const img = new ImageData(width, height);
const colors = [hexToRGB(live), hexToRGB(dead)];
board.flat().reduce((acc, cell, index) => {
const color = colors[cell];
const color = cell === 1 ? colors[0] : colors[1];
const i = index * 4;
acc[i] = color[0];
acc[i + 1] = color[1];