Update: CC - Before Render - Moorcow (zo950m57cc.js) 289 bytes modified

beta.r3js.org
-=yb4f310 2017-11-26 23:39:19 +01:00
parent 85657e9c8f
commit 41c30766de
1 changed files with 14 additions and 6 deletions

View File

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