balancing is hard
This commit is contained in:
parent
7e4902c38a
commit
8adcf6b85c
|
@ -43,7 +43,7 @@ class Void extends WebSocketEvents {
|
||||||
const area = TARGET_RADIUS ** 2 * Math.PI;
|
const area = TARGET_RADIUS ** 2 * Math.PI;
|
||||||
const online = webSockets.onlineCounter;
|
const online = webSockets.onlineCounter;
|
||||||
// require an average of 0.25 px / min / user
|
// require an average of 0.25 px / min / user
|
||||||
const requiredSpeed = Math.floor(online / 2);
|
const requiredSpeed = Math.floor(online / 1.5);
|
||||||
const ppm = Math.ceil(area / EVENT_DURATION_MIN + requiredSpeed);
|
const ppm = Math.ceil(area / EVENT_DURATION_MIN + requiredSpeed);
|
||||||
// timeout between pixels
|
// timeout between pixels
|
||||||
this.msTimeout = 60 * 1000 / ppm;
|
this.msTimeout = 60 * 1000 / ppm;
|
||||||
|
@ -152,7 +152,7 @@ class Void extends WebSocketEvents {
|
||||||
this.sendPixel(x, y, clr);
|
this.sendPixel(x, y, clr);
|
||||||
if (this.isUserSet(x, y)) {
|
if (this.isUserSet(x, y)) {
|
||||||
// if drawing on a user set pixel, wait longer
|
// if drawing on a user set pixel, wait longer
|
||||||
setTimeout(this.voidLoop, this.msTimeout * 4);
|
setTimeout(this.voidLoop, this.msTimeout * 3.5);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user