From a7fccfb19d8e96b5c8bf454d26151b5d2e369959 Mon Sep 17 00:00:00 2001 From: Mal Date: Sun, 18 May 2025 12:25:53 +0200 Subject: [PATCH] Fullscreen effects are rendered behind the terrain now --- js/Game.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/js/Game.js b/js/Game.js index 49fea07..72f0e7a 100644 --- a/js/Game.js +++ b/js/Game.js @@ -68,16 +68,17 @@ export class Game } this.context.clearRect(0, 0, window.innerWidth, window.innerHeight); + + for (const effect of this.level.fullscreenEffects) { + effect.update(timestamp); + effect.render(this.context, this.camera); + } + this.architecture.draw(this.context, this.camera); this.gisela.draw(this.context, this.camera); this.mrCroc.draw(this.context, this.camera); - for (const effect of this.level.fullscreenEffects) { - effect.update(timestamp); - effect.render(this.context, this.camera); - } - - this.userInterface.draw(this.context); + this.userInterface.draw(this.context); this.lastRendered = timestamp; }