From 4c20ea660092eda8507837f99805781243a48cd4 Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Tue, 6 Oct 2026 16:24:38 +0200 Subject: [PATCH] Add detailed debug logs --- assets/index.html | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/assets/index.html b/assets/index.html index f756d47..3c1fe56 100644 --- a/assets/index.html +++ b/assets/index.html @@ -263,21 +263,26 @@ const airplane = new Airplane(); addLog('Airplane created, vertices: ' + airplane.vertices.length); - - function animate() { +function animate() { try { - ctx.fillStyle = '#000'; - ctx.fillRect(0, 0, width, height); + addLog('FRAME start'); + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, width, height); - landscape.update(); - landscape.draw(); + addLog('before landscape.update'); + landscape.update(); + addLog('before landscape.draw'); + landscape.draw(); - airplane.update(); - airplane.render(); - } catch (err) { - addLog('ANIM ERR: ' + err.message + ' at line ' + (err.lineNumber || '?')); - return; - } + addLog('before airplane.update'); + airplane.update(); + addLog('before airplane.render'); + airplane.render(); + addLog('FRAME end'); + } catch (err) { + addLog('ANIM ERR: ' + err.message + ' at line ' + (err.lineNumber || '?') + ' stack: ' + (err.stack || '')); + return; + } requestAnimationFrame(animate); }