From eacd6a6ab0b6c44a98fd8e9f2467bd725a6fe9a0 Mon Sep 17 00:00:00 2001 From: Paul Mathieu Date: Fri, 17 Dec 2021 15:31:21 -0800 Subject: [PATCH] Allow a few skipped frames when needed --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 47889ac..5f8aa63 100644 --- a/index.js +++ b/index.js @@ -235,7 +235,8 @@ function tick(time, gl, params) { // expensive stuff, can take several cycles try { - let timeLeft = 10; + // frame time is typically 16.7ms, so this may lag a bit + let timeLeft = 30; const start = performance.now(); generateMissingChunks(params.world, campos[2], campos[0], timeLeft);