From 19190c6351d1e7851c8348e4ec39e49485340174 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Tue, 14 Nov 2017 09:19:57 +0100 Subject: [PATCH] Update: CC - Before Render - Moorcow (72d6a2a3kc.js) 271 bytes modified --- 72d6a2a3kc.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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) {