Forum

Html button and logic make in blender.

20 June 2017 17:18
Is it possible to perform logic that you created in b4w logic editor by clicking an html button from html file?
I've attached a screenshot of a portion of the logic.
everything works fine in preview. By click on a specific component the the others moves.
I wanna know if it is possible tu create a web page button to do this logic.

Tankyou

Federico
21 June 2017 13:44
While you can use the JavaScript Callback node to execute a JavaScript function, I do not believe you can do the reverse.
In the Cartoon Interior project, there are HTML/CSS buttons that run JavaScript functions. So you can do anything with this code. JavaScript can do everything the nodes can do and much more. You can have both nodes and JavaScript. API for moving objects.
21 June 2017 20:27
Just looking at the API. I was wrong, there is a way to trigger a node from JavaScript. Have a look here:
https://www.blend4web.com/doc/en/logic_editor.html#entry-point
And…
https://www.blend4web.com/api_doc/module-logic_nodes.html#.run_entrypoint
 
Please register or log in to leave a reply.