Forum

hotlinks from clickable objects

27 December 2014 20:20
where do I find Scenes Module?
28 December 2014 18:44
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

The Founder | Twitter | Facebook | Linkedin
28 December 2014 21:33
What I am asking is where do I add lines such as

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


28 December 2014 23:28
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
29 December 2014 00:52
Thank you very much, your assistance is as excellent as your product.
29 December 2014 10:52
It is always our pleasure
The Founder | Twitter | Facebook | Linkedin
06 January 2015 02:13
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.
06 January 2015 13:04
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.
The Founder | Twitter | Facebook | Linkedin
06 January 2015 20:54
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
06 January 2015 22:18
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.
The Founder | Twitter | Facebook | Linkedin
 
Please register or log in to leave a reply.