1.
void setup(){
size(600,600);
}
void draw(){
fill(255,255,100);
rect(100,100,100,100);
fill(255,100,255);
ellipse(mouseX,mouseY,100,100);
}
2.
void setup(){
size(600,600);
frameRate(15);
}
int x=100,y=100;
void draw(){
background(0,0,0);
fill(255,255,100);
ellipse(mouseX,mouseY,100,100);
fill(255,100,255);
ellipse(x,y,20,20);
x=(x+mouseX)/2;
y=(y+mouseY)/2;
}
3.
心得:
每個禮拜都有簡單的程式驚奇的功能,很有趣
80
回覆刪除