Сообщения, созданные пользователем Юрий Ковеленов
28 октября 2015 20:59
28 октября 2015 20:57
28 октября 2015 16:48
I'm 3D artist sculptor and I try to put my work with blender4web on my website and create more interactivity on my models,Your works are really nice!
I invite you to see my works Yuri:
www.voguart.fr
28 октября 2015 16:20
I have an error now : Uncaught TypeError: Cannot read property 'addEventListener' of undefined
This is because you put a wrong argument in the loaded callback, namely canvas_elem. That's why it is undefined.
https://www.blend4web.com/api_doc/module-data.html#~LoadedCallback
28 октября 2015 13:04
Hi,
You might take a look at the source code of this example:
https://www.blend4web.com/en/demo/tut_playroom/
Hope this helps!
I think it would be weird to add 10-100 listeners to my script and update it every time I add new textures.Yep, it is better to have some JSON config with all options available and automatically create HTML elements in runtime and attach event listeners to them in a loop. This config can be static text file or can be generated on the server.
Another thing I find weird about "addEventListener" is that it won't allow you to pass arguments to the function it calls (although I guess there must be a good reason for that).Instead, the callback function can perfectly accept arguments.
I tried usingThis code assumes there is a globally declared function in your JavaScript. It is better to use event listeners.
onmousedown="my_b4w_function()"
in html elements but I get a "my_b4w_function is not defined" error which I guess is because the function is inside my custom module and I am not accessing it correctly. As I was researching I also read that using onmousedown is not considered good practice for some reason.
You might take a look at the source code of this example:
https://www.blend4web.com/en/demo/tut_playroom/
Hope this helps!
27 октября 2015 20:22
27 октября 2015 20:21
Well I know I am not very good at it but how can I include javascript in order to make an action like onmousehover?Hi,
You can do this by using the m_mouse.enable_mouse_hover_outline() method.
See also this tut.
https://www.blend4web.com/en/article/95/
26 октября 2015 21:39
26 октября 2015 21:37
Hi, and welcome!
Please take a look at this example to do simple interactivity
https://www.blend4web.com/apps/webplayer/webplayer.html?load=../../assets/interactivity/node_play_anim.json
The source blend file is present in the SDK.
This video can be very helpful too:
https://www.youtube.com/watch?v=QFxyAgl98FU
Please take a look at this example to do simple interactivity
https://www.blend4web.com/apps/webplayer/webplayer.html?load=../../assets/interactivity/node_play_anim.json
The source blend file is present in the SDK.
This video can be very helpful too:
https://www.youtube.com/watch?v=QFxyAgl98FU
26 октября 2015 21:32
im doing the copying and translations using javascript. i want to create a generic object that has a annotation associated to it, when i copy and move that object i want to be able to access the anchor and change the name. My problem is i cant copy and translate an empty, and i cannot assign an anchor to an object. I have tried creating an object and an empty and parenting them together but this does not seem to work.Unfortunately, such APIs are not available now. You'll need to create a pool of empty objects with anchors in Blender, and then move them via JavaScript in your app.