40



float x =0;
float y =0;
float speedx = 2.6;
float speedy 1.2;
void setup(){
size(400,400);
stroke(0,55);
}

void draw(){
x += speedx;
if(x > width || x <0){
speedx = -speedx;
}
if(y > height || y <0){
speedy =- seedy;
}
}

コメント