This commit is contained in:
Baipyrus 2022-06-04 14:55:57 +02:00
commit 087976067a

View File

@ -2,7 +2,7 @@ final float timeout = 2.5;
ArrayList<Integer> bars = new ArrayList<Integer>();
ArrayList<Job> queue = new ArrayList<Job>();
int mQL = 1, aQL = 0, amount = 1000;
int mQL = 1, aQL = 0, amount;
float barWidth;
int sortedFrameCountCapture = -1;
@ -11,14 +11,14 @@ void setup() {
fullScreen(P3D);
// size(1280, 720);
// amount = floor(random(50, 500));
amount = floor(random(50, 500));
barWidth = (float)width / amount;
for (int i = 0; i < amount; i++) {
bars.add(round(random(height * 0.1, height * 0.9)));
}
queue.add(new Job(0, amount-1));
frameRate(1000);
frameRate(amount);
}
void draw() {
@ -42,7 +42,8 @@ void draw() {
}
}
// line(i, height, i, height-bars.get(i));
rect(i * barWidth, height, barWidth, -bars.get(i));
// rect(i * barWidth, height, barWidth, -bars.get(i));
ellipse(i * barWidth + barWidth / 2, height - bars.get(i), barWidth, barWidth);
}
/*if (queue.size() > 0) {
@ -58,7 +59,7 @@ void draw() {
} else if (frameCount-sortedFrameCountCapture>=round((amount/2)*timeout)) {
sortedFrameCountCapture = -1;
// amount = floor(random(50, 500));
amount = floor(random(50, 500));
barWidth = (float)width / amount;
bars = new ArrayList<Integer>();
for (int i = 0; i < amount; i++) {
@ -69,7 +70,7 @@ void draw() {
mQL = 1;
aQL = 0;
frameRate(1000);
frameRate(amount);
}
}