wip optimizing render
This commit is contained in:
@ -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;
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user