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