Update: CC - Snake FS - Mouse Down (gzewp2awcf.js) 148 bytes modified
parent
273ed8d24b
commit
cebb203c71
|
@ -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
|
Loading…
Reference in New Issue