Update: CC - Before Render - Moorcow (72d6a2a3kc.js) 434 bytes modified
parent
55e52a2d03
commit
1c47297f86
|
@ -208,15 +208,36 @@ if (this.mouseIsDown) {
|
||||||
} else {
|
} else {
|
||||||
mesh.instance.material.color.sub(this.toBlack);
|
mesh.instance.material.color.sub(this.toBlack);
|
||||||
if (mesh.instance.material.color.r <= 0) {
|
if (mesh.instance.material.color.r <= 0) {
|
||||||
|
if (mesh.instance.material.emissive) {
|
||||||
mesh.instance.material.emissive.add(this.toRed);
|
mesh.instance.material.emissive.add(this.toRed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
} else {
|
} 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
this.renderer.clearColor.r -= 0.01;
|
this.renderer.clearColor.r -= 0.01;
|
||||||
if (this.renderer.clearColor.r < 0) {
|
if (this.renderer.clearColor.r < 0) {
|
||||||
this.renderer.clearColor.r = 0;
|
this.renderer.clearColor.r = 0;
|
||||||
|
|
Loading…
Reference in New Issue