add maxLength to chat input field

make void a tiny bit faster again
This commit is contained in:
HF 2020-05-25 19:43:09 +02:00
parent e6ebc08e26
commit f01db742af
2 changed files with 2 additions and 1 deletions

View File

@ -109,6 +109,7 @@ const Chat = ({
value={inputMessage}
onChange={(e) => setInputMessage(e.target.value)}
ref={inputRef}
maxLength="200"
type="text"
placeholder="Chat here"
/>

View File

@ -43,7 +43,7 @@ class Void extends WebSocketEvents {
const area = TARGET_RADIUS ** 2 * Math.PI;
const online = webSockets.onlineCounter;
// require an average of 0.25 px / min / user
const requiredSpeed = Math.floor(online / 10);
const requiredSpeed = Math.floor(online / 6);
const ppm = Math.ceil(area / EVENT_DURATION_MIN + requiredSpeed);
// timeout between pixels
this.msTimeout = 60 * 1000 / ppm;