From 3abe39613bcae04f157b3158795f8b91eaf5ab2b Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Tue, 14 Nov 2017 09:34:33 +0100 Subject: [PATCH] Update: CC - Before Render - Moorcow (72d6a2a3kc.js) 17 bytes modified --- 72d6a2a3kc.js | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/72d6a2a3kc.js b/72d6a2a3kc.js index fc7c2dc..af6a7b7 100644 --- a/72d6a2a3kc.js +++ b/72d6a2a3kc.js @@ -168,6 +168,24 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { this.totalTime += data.delta; this.spawnTime += data.delta; +this.scene.meshes.map( + function(mesh) { + if (mesh.instance.material instanceof Array) { + mesh.instance.material.map( + function(material) { + if (material.emissive) { + material.emissive.sub(this.toRed); + } + } + ); + } else { + if (mesh.instance.material.emissive) { + mesh.instance.material.emissive.sub(this.toRed); + } + } + }.bind(this) +); + if (this.mouseIsDown) { this.fog.color.r += 0.01; @@ -219,25 +237,7 @@ if (this.mouseIsDown) { ); } else { - - this.scene.meshes.map( - function(mesh) { - if (mesh.instance.material instanceof Array) { - mesh.instance.material.map( - function(material) { - if (material.emissive) { - material.emissive.sub(this.toRed); - } - } - ); - } else { - if (mesh.instance.material.emissive) { - mesh.instance.material.emissive.sub(this.toRed); - } - } - }.bind(this) - ); - + this.renderer.clearColor.r -= 0.01; if (this.renderer.clearColor.r < 0) { this.renderer.clearColor.r = 0;