Update: CC - Snake FS - Mouse Down (gzewp2awcf.js) 148 bytes modified

beta.r3js.org
-=yb4f310 2018-03-24 17:35:30 +01:00
parent 273ed8d24b
commit cebb203c71
1 changed files with 9 additions and 3 deletions

View File

@ -11,13 +11,19 @@ if (!this.initialized) {
this.initialized = true;
}
var mouse = {
x : (data.event.offsetX / data.event.target.width ) * 2 - 1,
y : -(data.event.offsetY / data.event.target.height) * 2 + 1
}
console.log(mouse);
this.raycaster.setFromCamera(
mouse,
this.camera
);
this.raycaster.getIntersectedObjects(this.buttons).map(
function(intersect) {
console.log(intersect.name);
}
);
//@ sourceURL=mouseDown.js