wip optimizing render

This commit is contained in:
2022-12-19 16:00:38 +01:00
parent e03f7db3ba
commit 2a42746e1c
7 changed files with 119 additions and 86 deletions

View File

@ -31,7 +31,7 @@ export function picToBoard(pixels, width, height) {
if (index % 4 == 0) {
const count = pixels[index] + pixels[index + 1] + pixels[index + 2];
const value = count >= 255 ? 1 : 0;
acc.push(value);
acc[index] = value;
}
return acc;
}, []);