xxxxxxxxxx
37
function setup() {
createCanvas(displayWidth/1.5, displayHeight/1.5);
background(80,150,180);
}
var x= 0;
var speed = 0;
var y = 0;
var speedy = y;
function draw() {
if (x > width) {
speed = -10
}
x = x + speed
if (x == 0) {
speed = 10
}
if (y > height) {
speedy = -7
}
y = y + speedy
if (y == 0) {
speedy = 7
}
// print(x)
noStroke();
fill(random(100,255),random(180,255),random(230,255));
circle(x, y ,100);
}