xxxxxxxxxx
59
let t = 0;
function setup() {
createCanvas(600, 600);
// colorMode(HSB, 360, 100, 100, 100);
background("#f2e1a5");
// noLoop();
frameRate(1);
createLoop({ duration: 1, gif: true });
}
function draw() {
// let backcolor = color(179, 100, 70);
background("#f2e1a5");
// 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) {
let y = height/2;
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();
noFill();
stroke(1);
strokeWeight(3);
beginShape();
points.forEach(p => vertex(p.x, p.y));
endShape(CLOSE);
if (i < 7) {
fill(color(47, 32, 95));
noStroke();
// circle(width/2 - 60, y+120, rSun);
}
// }
// save("looking.jpg");
t += 0.01;
}