How to change cursor into "pointer" or "move" style?
07 December 2015 17:25
07 December 2015 17:29
07 December 2015 17:50
Hi.
1)
2)
You can set up Rendering Properties > Do Not Render and Selection and Outlining > Selectable
1)
Ответ на сообщение пользователя superbirdsYou can use pick_object function to detect object and set up cursor style.
Is it possible to show the "pointer" or "move" cursor when user is over a specific 3d object in js?
2)
Ответ на сообщение пользователя superbirds
I also try to create invisible button with transparent selectable 3d plane object, but it seems not working when the object is fully transparent? Any way to do this?
You can set up Rendering Properties > Do Not Render and Selection and Outlining > Selectable
Blend4Web Team
kirill@blend4web.com
kirill@blend4web.com
07 December 2015 18:01
07 December 2015 18:06
09 December 2015 16:44
Thank you Kirill,
for the moment i target my b4w container when i detect my object and it works :
Is it a better way to style directly a 3D object?
for the moment i target my b4w container when i detect my object and it works :
var x = m_mouse.get_coords_x(e);
var y = m_mouse.get_coords_y(e);
_my_xy[0] = x;
_my_xy[1] = y;
var obj = m_scenes.pick_object(x, y);
if(m_scenes.get_object_name(obj) === "my_object"){
document.getElementById("main_canvas_container").style.cursor = "pointer";
}
Is it a better way to style directly a 3D object?
09 December 2015 19:08
Ответ на сообщение пользователя superbirdsHi, superbirds.
Is it a better way to style directly a 3D object?
I think it is a good solution.
But you need apply client_to_canvas_coords function to X, Y (if you create non-FullScreen application). See part 3 of creating non-FullScreen web apps.
Blend4Web Team
kirill@blend4web.com
kirill@blend4web.com
09 December 2015 19:49
09 December 2015 20:26