WebGLBook icon indicating copy to clipboard operation
WebGLBook copied to clipboard

Update sim.js

Open paveldk opened this issue 13 years ago • 1 comments

There were some updates on three.js and SIM.js is not working properly. The main problem is comming form the intersectScene which is now replaced with intersectObjects and some slight modifications are required

paveldk avatar Dec 06 '12 14:12 paveldk

More on that here - http://stackoverflow.com/questions/15211171/typeerror-objectobject-object-has-no-method-subself-typeerror-objectobject-o

... answer doesn't seem to be obvious, something like

// var intersects = ray.intersectScene( this.scene ); // old var raycaster = new THREE.Raycaster(camera.position, vector.sub(camera.position).normalize()); var intersects = raycaster.intersectObjects( this.scene );

seems to work

danbri avatar Feb 02 '14 00:02 danbri