xxxxxxxxxx
33
function setup() {
createCanvas(400, 500);
}
function draw() {
blendMode(BLEND);
background(0);
blendMode(LIGHTEST);
for (i = 0; i < width; i++) {
var x = i;
var y = height * noise(millis() / 1800.0 + x / 1500);
stroke(0);
line(x, 0, x, y);
stroke("red");
line(x, 0, x, y + 100);
stroke("blue");
line(x, 0, x, y + 200);
}
var y = height * noise(millis() / 1800.0 + 150 / 1500);
push();
noStroke();
translate(150-300, y - 70);
triangle(300, 150, 230, 240, 300, 240);
triangle(300, 150, 360, 240, 300, 240);
triangle(180, 150, 370, 240, 230, 240);
triangle(400, 150, 230, 240, 370, 240);
pop();
}