javascript - How do I create a name tag that appears upon clicking a model in a 3-D viewer? -
i loaded individual stl structures 3-d viewer using three.js , want able click on individual structures in 3-d viewer , name tag appears onmouseclick or onmouseover specific structure.
i think has coordinate point of specific object or maybe total surface area of object , utilize onmouseclick eventhandler create window i'm not sure.
is there sample or open source code can take at?
thanks!!
check of collision detection examples in examples folder. webgl_interactive_cubes.html you're after: http://mrdoob.github.com/three.js/examples/webgl_interactive_cubes.html
this show how find element behind mouse.
i wrote tutorial on picking objects three.js if want know bit more how thing works internally: http://soledadpenades.com/articles/three-js-tutorials/object-picking/
then --you know mouse mousemove or mouseclick event-- create span or similar, , place in position css's left , top properties, example
javascript three.js webgl
No comments:
Post a Comment