xxxxxxxxxx
57
let t = 0;
function setup() {
createCanvas(600, 600);
colorMode(HSB, 360, 100, 100, 100);
background(360, 0, 100, 100);
// noLoop();
// createLoop({ duration: 5, gif: true });
}
function draw() {
let backcolor = color(179, 100, 70);
background(backcolor);
// fill(color(47, 32, 95));
fill(color(37, 86, 98));
noStroke();
let rSun = 200;
// circle(width/2, 0, rSun);
let i = 0;
for(let y = 120; y < height-120; y += 60) {
points = [];
points.push({ x: width, y: y });
points.push({ x: width, y: height});
points.push({ x: 0, y: height});
for(let x = 0; x < width; x += 30) {
let noiz = noise(x * 0.01, y * 0.01, t);
let vy = y + map(noiz, 0, 1, -50, 50);
points.push({ x: x, y: vy});
}
// fill(backcolor);
// beginShape();
// points.forEach(p => vertex(p.x, p.y));
// endShape();
i += 1;
let c = color(37, 86, 98);
c.setAlpha(i * 10);
fill(c);
beginShape();
points.forEach(p => vertex(p.x, p.y));
endShape();
if (i < 7) {
fill(color(47, 32, 95));
noStroke();
// circle(width/2 - 60, y+120, rSun);
}
}
// save("looking.jpg");
t += 0.01;
}