xxxxxxxxxx
26
let n = 0.0;
let m = 0.0;
function setup() {
createCanvas(400, 400);
stroke(64, 64, 64, 50);
}
function draw() {
background(220);
translate(width * -0.5, 0)
for (let y=0; y<=height; y+=50){
fill(map(y, 0, height, 127, 255));
translate(map(mouseX, 0, width, width * -0.05, width * 0.05), 0);
beginShape();
curveVertex(0, height);
for (let x=0; x<=width*2; x+=50){
curveVertex(x, y + noise(y + (x / 100)) * (height - y));
}
curveVertex(width*2, height);
curveVertex(width*2, height);
curveVertex(0, height);
endShape(CLOSE);
}
n += 0.005;
}