Closed MasterJames closed 9 years ago
Okay it looks like I sent the Geometry but need the Mesh. I think the problem I'm having is with screen coordinates not being right when it's happening in a canvas that does not take full screen but is further down the page. When I scrolled down it found it. Actually I've figured it out now. Sorry to bother I'm not sure how to delete a post.
I'm new here (and to 3JS) and looking for the easiest webgl and event handling solution (within meteor atmosphere packages). I used threex.domevents (via https://atmospherejs.com/davidcittadini/threex-domevents ) I'm testing adding a 'click' event listener function to a geometry var geometry = new THREE.BoxGeometry(1, 1, 1); with domEvents.addEventListener(geometry, 'click', inlineFuncBlock, false);
Anyway it triggers an error in three.js at line 7153 (current version also tested) in intersectObject at object.raycast which is undefined at the time Uncaught TypeError: undefined is not a function
What do you think is where the problem lies? I figure a fault tolerant test would be nice there but then one wouldn't know there was a problem with it being undefined (if it otherwise failed silently).
I've avoided the error by passing cube a Mesh instead of Geometry but no intersection occurs?
[I know it's a bit convoluted with all the odd version dependencies with meteor and atmosphere package wrappers of extra 3rd party extensions but since the error is in three.js I thought I'd post this here.]