Update: CC - Mouse Move - Moorcow (8a0m30eevi.js) 783 bytes modified

beta.r3js.org
-=yb4f310 2017-11-14 09:07:50 +01:00
parent c2a718d78c
commit f040d8c447
1 changed files with 1 additions and 30 deletions

View File

@ -3,7 +3,6 @@ if (!this.entityLoaded) {
}
if (!this.initialized) {
this.mouseIsDown = false; //gets set from MouseDown
this.mouse = this.entityLoaded.mouse;
this.raycaster = this.entityLoaded.raycaster;
this.camera = this.entityLoaded.camera;
@ -11,7 +10,6 @@ if (!this.initialized) {
this.cursor = this.entityLoaded.cursor;
this.thrower = this.entityLoaded.thrower;
this.throwerParticleEngine = this.entityLoaded.throwerParticleEngine;
this.toBlack = new THREE.Color(0.05, 0.05, 0.05);
this.initialized = true;
}
@ -71,33 +69,6 @@ this.scene.meshes.map(
);
*/
var intersects = this.raycaster.getIntersectedObjects(this.scene.meshes);
intersects.map(
function(intersect) {
var mesh = intersect.mesh;
if (
mesh.id !== 'ykfzwmaw9j' && //crosshair
mesh.id !== 't3uije6lwm' && //floor
mesh.id !== 'x4rhvbj8cn' && //flamethrower
mesh.id !== 'xztyfgwq7i' && //skybox
mesh.name.indexOf('Stone') === -1 //stones
) {
if (this.mouseIsDown) {
if (mesh.instance.material instanceof Array) {
mesh.instance.material.map(
function(material) {
material.color.sub(this.toBlack);
}
);
} else {
mesh.instance.material.color.sub(this.toBlack);
}
}
}
}.bind(this)
);
//@ sourceURL=mouseMove.js