SketchBook

冬課題

function setup(){
createCanvas(700,700);
frameRate(30);
noStroke();
}

var x = 0;
var move = 0;
var move2 = 700;

function draw(){
background(255);
fill(-250+x,-50,100+x,150+x);

ellipse(350,350,x);
fill(-250+x,-100+x,150+x);
ellipse(move,350,x);
ellipse(move2,350,x);
ellipse(350,move,x);
ellipse(350,move2,x);
fill(-250+x,150+x,-50+x);
ellipse(move,move,x);
ellipse(move,move2,x);
ellipse(move2,move,x);
ellipse(move2,move2,x);


x = x + 10;
move = move + 10;
move2 = move2 - 10;

if(x>700){
x = 0;
}

if(move>700){
move = 0;
}

if(move2<0){
move2 = 700;
}
}