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); }