size(500, 500);
frameRate(10);
}
int limit=0; // set base value of limie of size
void draw() {
int count=0; //count for make value to out loop
int upSize=18; //upsize of circle
int r=0; //r is radiuse of circle
int colour=5; //for change colour
background(0);
strokeWeight(30);
draw_rect(20, 480);
limit++;
//set selection for constant or resize
if (mousePressed) {
while (count<=limit) {
fill(50);
stroke(255-(colour/4), colour, random(20, 200));
ellipse(250, 250, r, r);
// change value
r=r+upSize;
count++;
colour+=40;
draw_toradora(130, 250);
}
} else {
r=350;
fill(50);
stroke(255-(colour/4), colour, random(20, 200));
ellipse(250, 250, r, r);
draw_toradora(130, 250);
}
// SET Limit of size circle
if (limit==20) {
limit=0;
}
}
// function draw set rect
void draw_rect(int X, int Y) {
stroke(255);
rect(X, Y, 20, -random(20, 300));
rect(X+80, Y, 20, -random(20, 300));
rect(X+160, Y, 20, -random(20, 300));
rect(X+240, Y, 20, -random(20, 300));
rect(X+320, Y, 20, -random(20, 300));
rect(X+400, Y, 20, -random(20, 300));
rect(X+470, Y, 20, -random(20, 300));
fill(0);
}
//function draw text
void draw_toradora(int X, int Y) {
fill(255);
textSize(35);
text(" TORADORA ", X, Y);
fill(0);
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น