You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.2 KiB
Java
51 lines
1.2 KiB
Java
//class SlowConcentrate{
|
|
//
|
|
// float speed;
|
|
// int centerX, centerY, red, green, blue, brushSize, t_init, t_last;
|
|
// boolean accumulate, centerComplete;
|
|
//
|
|
// void reset(){
|
|
// centerComplete = false;
|
|
// t_init = millis();
|
|
// }
|
|
//
|
|
// SlowConcentrate(int centerX, int centerY){
|
|
//
|
|
// this.centerX = centerX;
|
|
// this.centerY = centerY;
|
|
// this.speed = speedSet;
|
|
// this.red = rVal;
|
|
// this.green = gVal;
|
|
// this.blue = bVal;
|
|
// this.brushSize = penWidth;
|
|
//
|
|
// }
|
|
//
|
|
// void draw(){
|
|
//
|
|
// }
|
|
//}
|
|
|
|
int t_circ_shrink_last = 0;
|
|
int step = 0;
|
|
float radius;
|
|
|
|
void shrinkingCircle(float speed, int red, int green, int blue, int borderWidth){
|
|
clearDisplay();
|
|
radius = (screenWidth - menu.width)/calibrator.magx - step;
|
|
|
|
if (radius > 25){
|
|
if (millis() - t_circ_shrink_last > speed*1000){
|
|
step = step + 1;
|
|
|
|
noFill();
|
|
strokeWeight(borderWidth);
|
|
stroke(color(red, green, blue));
|
|
ellipseMode(CENTER);
|
|
ellipse(convertXCoord(centerX), convertYCoord(centerY), radius, radius);
|
|
|
|
t_circ_shrink_last = millis();
|
|
}
|
|
}
|
|
}
|