From 41c30766de2d02e686400ac8bd660fab9f08bae9 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sun, 26 Nov 2017 23:39:19 +0100 Subject: [PATCH] Update: CC - Before Render - Moorcow (zo950m57cc.js) 289 bytes modified --- zo950m57cc.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/zo950m57cc.js b/zo950m57cc.js index a957697..ac0ced4 100644 --- a/zo950m57cc.js +++ b/zo950m57cc.js @@ -786,18 +786,26 @@ mesh.burnLife -= 0.1 * data.delta; if (mesh.burnLife < 0) { mesh.burnLife = 0; + } + + mesh.instance.material.color.setRGB( + mesh.burnLife, + mesh.burnLife, + mesh.burnLife + ); + + if (mesh.burnLife <= 0) { mesh.explodeLife -= 0.1 * data.delta; if (mesh.explodeLife < 0) { mesh.explodeLife = 0; } + mesh.instance.material.color.setRGB( + 1 - mesh.explodeLife, + 0, + 0 + ); } - mesh.instance.material.color.setRGB( - 1 - mesh.explodeLife, - mesh.burnLife, - mesh.burnLife - ); - if (mesh.explodeLife <= 0) { this.explode(mesh); }