switching to composition API
This commit is contained in:
@ -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];
|
||||
|
||||
Reference in New Issue
Block a user