xxxxxxxxxx
33
let n, m, v;
let noiseScale;
function setup() {
createCanvas(400, 400);
pixelDensity(1);
}
function draw() {
background(0);
let noiseY = random(0.01);
noiseScale = random(0.01)
loadPixels();
for (let y = 0; y < height; y++) {
let noiseX = 0;
for (let x = 0; x < width; x++) {
let index = (x + y * width) * 4;
let rand = noise(noiseX, noiseY) * 255;
pixels[index + 0] = rand;
pixels[index + 1] = rand;
pixels[index + 2] = rand;
pixels[index + 3] = 255;
noiseX += noiseScale;
}
noiseY += noiseScale;
}
updatePixels();
}