Allow a few skipped frames when needed

This commit is contained in:
Paul Mathieu 2021-12-17 15:31:21 -08:00
parent d43d888194
commit eacd6a6ab0

View File

@ -235,7 +235,8 @@ function tick(time, gl, params) {
// expensive stuff, can take several cycles // expensive stuff, can take several cycles
try { try {
let timeLeft = 10; // frame time is typically 16.7ms, so this may lag a bit
let timeLeft = 30;
const start = performance.now(); const start = performance.now();
generateMissingChunks(params.world, campos[2], campos[0], timeLeft); generateMissingChunks(params.world, campos[2], campos[0], timeLeft);