From 8c3fb4377fc35f11b61594c5fb0def0d73de3f66 Mon Sep 17 00:00:00 2001 From: Paul Mathieu Date: Sat, 25 Dec 2021 08:25:01 -0800 Subject: [PATCH] Remove try/catch block for timesup --- game.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/game.js b/game.js index 83595f5..85edc36 100644 --- a/game.js +++ b/game.js @@ -372,8 +372,8 @@ export function tick(time, gl, params) { const campos = params.camera.position; - // expensive stuff, can take several cycles - try { + // world generation / geometry update + { // frame time is typically 16.7ms, so this may lag a bit let timeLeft = 10; const start = performance.now(); @@ -382,11 +382,6 @@ export function tick(time, gl, params) { timeLeft -= performance.now() - start; updateWorldGeometry(gl, params.world, campos[2], campos[0], timeLeft); } - catch (ex) { - if (ex !== 'timesup') { - throw ex; - } - } const objects = getObjects(params.world, campos[2], campos[0], params.worldGl);