xxxxxxxxxx
16
function setup() {
createCanvas(400, 400);
pixelDensity(1);
}
function draw() {
loadPixels();
for (let i = 0; i < pixels.length; i += 4) {
pixels[i] = 255;
pixels[i + 1] = 0;
pixels[i + 2] = 0;
pixels[i + 3] = 255;
}
updatePixels();
}