From cebb203c716c41874c29e3241aaab8e4520d5f70 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sat, 24 Mar 2018 17:35:30 +0100 Subject: [PATCH] Update: CC - Snake FS - Mouse Down (gzewp2awcf.js) 148 bytes modified --- gzewp2awcf.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gzewp2awcf.js b/gzewp2awcf.js index e7c0a5a..738a14a 100644 --- a/gzewp2awcf.js +++ b/gzewp2awcf.js @@ -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 \ No newline at end of file