Forum

hotlinks from clickable objects

27 December 2014 20:20 #862
where do I find Scenes Module?
http://www.trepaning.com
28 December 2014 18:44 #864
Hi,

You can link it with a require call, that is
var m_scenes = require("scenes");

See also API reference
We'll consider implementing such functionality in NLA Script, but that's not a promise

Development Lead | Twitter
28 December 2014 21:33 #865
What I am asking is where do I add lines such as

if (obj && m_scenes.get_object_name(obj) == "Cube"))


http://www.trepaning.com
28 December 2014 23:28 #866
In your example (given above) you should replace:

if (obj && obj.name == "Cube")

by

var m_scenes = require("scenes");
if (obj && m_scenes.get_object_name(obj) == "Cube"))

Not required but strongly advised to do so
Blend4Web Team
https://twitter.com/AlexKowel
29 December 2014 00:52 #867
Thank you very much, your assistance is as excellent as your product.
http://www.trepaning.com
29 December 2014 10:52 #870
It is always our pleasure
Development Lead | Twitter
06 January 2015 02:13 #953
Hijacking this request from another thread:

It would be awesome if this example
https://www.blend4web.com/media/uploads/365faa1d-f911-4e34-ad1c-6af3bacb44ad/B4W_interactive_link.zip
were to be updated to make the Cube glow, and then reposted.
http://www.trepaning.com
06 January 2015 13:04 #960
Add the following lines somewhere in the code:
var m_mouse = require("mouse");
m_mouse.enable_mouse_hover_glow();

All "selectable" objects will be outlined under the cursor, like in the xmas greeting card. Blend4Web 14.12 required.
Development Lead | Twitter
06 January 2015 20:54 #961
Okay, thanks, got that to work. Placed

var m_mouse = require("mouse");

outside functions, and placed

m_mouse.enable_mouse_hover_glow();

inside function main_canvas_click(e) {

Hover works once somewhere else on page has been clicked on.

Preference is now for a slight glow to all clickable objects that is always on so mobile users know there is something to click.

FYI: hover glow not working in IE 11
http://www.trepaning.com
06 January 2015 22:18 #964
Preference is now for a slight glow to all clickable objects that is always on so mobile users know there is something to click.
For persistent glow you need something like this:
var m_scenes = require("scenes");
var myobj = m_scenes.get_object_by_name("How your object is named in Blender");
m_scenes.apply_glow_anim(myobj, 1, 1, 0);

FYI: hover glow not working in IE 11
Yeah, being one of "fancy features" that require postprocessing, glow effect is not available in the low quality mode.
Development Lead | Twitter
 
Please register or log in to leave a reply.