-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tooltip Object Names - mouse 3d mesh hover events path #9
Comments
Hi @enrutador , the standard 'mousemove' event registration is here : smart_home_3d_webapp/src/three_mouse.js Line 48 in f34d24d
which simply calls : smart_home_3d_webapp/src/three_mouse.js Line 167 in f34d24d
The function that does all the magic to transform an X,Y coordinate to a Three object is here : smart_home_3d_webapp/src/three_mouse.js Line 82 in f34d24d
inside that function, the Three class that performs that computation is a raycaster, which is set from the smart_home_3d_webapp/src/three_mouse.js Line 72 in f34d24d
as you see that function requires a smart_home_3d_webapp/src/three_mouse.js Line 178 in f34d24d
that event is sent here : smart_home_3d_webapp/src/three_app.js Line 484 in f34d24d
and that's where the connection with Blender happens by checking the finally, if the raycaster tests hits a known object from the list the smart_home_3d_webapp/src/three_mouse.js Line 84 in f34d24d
to make things simpler so that you don't have to modify the module, and event is sent that you could listen to which is smart_home_3d_webapp/src/three_mouse.js Line 95 in f34d24d
I hope this helps you, set an abstracted way how you can deal with 3d mesh mouse events without modifying any javascript code for every new object, rather modify its Blender user data. As a hint, at the top of each file, I noted the sent events and used events that should help you get an overview about the event interaction between modules, I admit this event based approach offers an isolated API but require tracking the events flow. |
Hi wassfila |
Glad this helps you, |
Hi Wassfila
I modify index html and it inside a div:
With this i can see the event name property of the mesh: it's not very exciting ;-) , but run. When i create a new "render" to put message i lost all the interface. I need learn more about three.js |
Great, at least the mouse mesh identification part that I provided in my example is running :) I'm not sure how the tooltip work if it's a three js item or normal web element, so if that part still does not work, I suggest you check if there are similar issues on three.js forum |
Hi @enrutador , how's your progress on this ? If you're not working on this at the moment that's ok but in case you get stuck let me know. |
Hi wassfila |
Hi Wassfila
I'm doing tests without much success to apply the following code in the graphical interface:
http://jsfiddle.net/mmalex/ycnh0wze/
It would be very interesting to be able to show the names of the elements and show telemetry information associated with them.
Any advice ?
Thank you
The text was updated successfully, but these errors were encountered: