diff --git a/72d6a2a3kc.js b/72d6a2a3kc.js index 4585ebc..a3f5ad3 100644 --- a/72d6a2a3kc.js +++ b/72d6a2a3kc.js @@ -6,6 +6,7 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { this.initialized = true; + this.fog = this.entityLoaded.fog; this.bull = this.entityLoaded.bull; this.star = this.entityLoaded.star; this.burger = this.entityLoaded.burger; @@ -169,6 +170,12 @@ this.spawnTime += data.delta; if (this.mouseIsDown) { + this.fog.color += 0.01; + if (this.fog.color.r > 1) { + this.fog.color.r = 1; + } + this.fog.updateInstance('color'); + this.renderer.clearColor.r += 0.01; if (this.renderer.clearColor.r > 1) { this.renderer.clearColor.r = 1; @@ -215,6 +222,12 @@ if (this.mouseIsDown) { this.renderer.clearColor.r = 0; } this.renderer.updateInstance('clearColor'); + + this.fog.color -= 0.01; + if (this.fog.color.r < 0) { + this.fog.color.r = 0; + } + this.fog.updateInstance('color'); } if (this.spawnTime > this.nextSpawnTime) {