Remove try/catch block for timesup
This commit is contained in:
parent
b70ce12ec9
commit
8c3fb4377f
9
game.js
9
game.js
@ -372,8 +372,8 @@ export function tick(time, gl, params) {
|
|||||||
|
|
||||||
const campos = params.camera.position;
|
const campos = params.camera.position;
|
||||||
|
|
||||||
// expensive stuff, can take several cycles
|
// world generation / geometry update
|
||||||
try {
|
{
|
||||||
// frame time is typically 16.7ms, so this may lag a bit
|
// frame time is typically 16.7ms, so this may lag a bit
|
||||||
let timeLeft = 10;
|
let timeLeft = 10;
|
||||||
const start = performance.now();
|
const start = performance.now();
|
||||||
@ -382,11 +382,6 @@ export function tick(time, gl, params) {
|
|||||||
timeLeft -= performance.now() - start;
|
timeLeft -= performance.now() - start;
|
||||||
updateWorldGeometry(gl, params.world, campos[2], campos[0], timeLeft);
|
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);
|
const objects = getObjects(params.world, campos[2], campos[0], params.worldGl);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user