From eb6c9ac944b3255bd4eda6b002b92dc4874025c3 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Tue, 14 Nov 2017 09:13:38 +0100 Subject: [PATCH] Update: CC - Before Render - Moorcow (72d6a2a3kc.js) 241 bytes modified --- 72d6a2a3kc.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/72d6a2a3kc.js b/72d6a2a3kc.js index 7297161..d054d22 100644 --- a/72d6a2a3kc.js +++ b/72d6a2a3kc.js @@ -15,6 +15,7 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { this.raycaster = this.entityLoaded.raycaster; this.scene = this.entityLoaded.scene; this.toBlack = new THREE.Color(0.07, 0.07, 0.07); + this.toRed = new THREE.Color(0.07, 0, 0); this.bull.instance.visible = false; this.star.instance.visible = false; @@ -192,10 +193,16 @@ if (this.mouseIsDown) { mesh.instance.material.map( function(material) { material.color.sub(this.toBlack); + if (material.color.r <= 0) { + material.emissive.add(this.toRed); + } } ); } else { mesh.instance.material.color.sub(this.toBlack); + if (mesh.instance.material.color.r <= 0) { + mesh.instance.material.emissive.add(this.toRed); + } } }