xxxxxxxxxx
25
function setup() {
var myCanvas = createCanvas(400, 400);
pixelDensity(1);
}
function draw(){
background(255);
loadPixels();
for(var y = 0; y < height; y++) {
for(var x = 0; x < width; x++) {
var index = (x + y * width)*4;
// "pixellated" noise
pixels[index+0] = random(255);
// "cloudy" noise
// pixels[index+0] = noise(x/100.0, y/100.0) * 255;
pixels[index+1] = 0;
pixels[index+2] = 255;
pixels[index+3] = 255;
}
}
updatePixels();
}