Skip to content

Instantly share code, notes, and snippets.

@tai-cha
Created June 12, 2019 13:27
Show Gist options
  • Save tai-cha/cbaba58fc6c2aa8cdfff49d347dec4b2 to your computer and use it in GitHub Desktop.
Save tai-cha/cbaba58fc6c2aa8cdfff49d347dec4b2 to your computer and use it in GitHub Desktop.
ちょっとだけしかく、そのあとまる
int count = 0; //カウント用変数
void setup(){
background(255,255,255);
size(480, 480);
stroke(0);
noFill();
}
void draw(){
count++; //drawが実行されるたびに+1する
background(255,255,255); //背景の再描画
if(count < 100){ //もしカウントが100よりも小さければ
rect(240,240,100,100); //(240,240)に幅100高さ100の長方形を描く
}else{
ellipse(240,240,200,200); //(240,240)に幅200高さ200の楕円を描く
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment