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