xxxxxxxxxx
43
var x = 1;
var e;
cloud = 5;
windspeed = 9;
function setup() {
createCanvas(windowWidth, windowHeight);
e = random(0, height / 3);
}
function draw() {
background(0);
noStroke();
//if (x > width) {
// x = -width/5;
//}
//if (x >= -width/5) {
// x += windspeed;
//}
//if (x == -width/5) {
// cloudhight();
//}
setInterval(drawcloud, 1000);
//cloud
}
function drawcloud() {
e = random(0, height / 3);
for (x = -width / 5; x < width; x += windspeed) {
console.log(x);
ellipse(x, e + width / 8, width / 8);
ellipse(x - width / 10, e + width / 8, width / 8);
ellipse(x - width / 7, e + width / 8, width / 10);
ellipse(x - width / 9, e + width / 11, width / 10);
ellipse(x - width / 16, e + width / 11, width / 10);
ellipse(x - width / 16, e + width / 7, width / 9);
}
}
//function cloudhight() {
//e = random(0, height / 3);
//}