Forum

User posts Alexander Romanov
13 February 2018 12:00
Answered here
Alexander (Blend4Web Team)
twitter
13 February 2018 11:34
May I ask….what is the trouble with "transform object"???? because my scene is all working awesome but I was going to write you about that:

"transform object" causes crash if it is called in "Define Function" subtree and uses variables as parameters.

The patch should be applied to src/intern/logic_nodes.js. Move the line tagged with "-" to the place tagged with "+".
Alexander (Blend4Web Team)
twitter
13 February 2018 11:24
I know iy might be a silly question but is there a tutorial that shows how do i declare a variable and then use that same variable in other trees??
It is not difficult, just enable "Global" flag and the variable will be available in all threads of current tree:
Alexander (Blend4Web Team)
twitter
13 February 2018 11:20
Why is the muting of entry points a good thing?
Because for disabling specific node or thread you should just press M. You don't need to break your tree.
Alexander (Blend4Web Team)
twitter
13 February 2018 11:07
You should use require inside register callback if you are using old-style:
"use strict"

// register the module
b4w.register("module1", function(exports, require) {

var m_logic_n   = require("logic_nodes");
exports.ChangeCam = function() {
    m_logic_n.run_entrypoint("Scene", "ChangeCam");
}
})


But Webplayer now uses ES6, so you should just do:
var m_logic_n = b4w.logic_nodes
Alexander (Blend4Web Team)
twitter
12 February 2018 16:22
But is there anyway I can use the preprogrammed webplayer interface and just add my buttons and using javascript functions?
No, you can't connect additional javascript code to the original WebPlayer application, but you can modify it just like a usual application by including script tag to the html-file.
Alexander (Blend4Web Team)
twitter
12 February 2018 15:51
First very important thing is that you should use Debug node. With this node you can print the output of your variables to the browser console, which usually can be opened with F12 key. also use "muting" to disable any of your nodes (e.g. Debug node or even Entry Point).
Try to mute some Entry points and debug the thread which is not working. Maybe some Threads can conflict if you are trying to move the same object or to modify the same variable, so try to check possible conflicts.
Without the source blend file the search for a solution similar to divination.
Alexander (Blend4Web Team)
twitter
12 February 2018 15:24
Try to use the "Define Function" and "Call Function" nodes.
When I was preparing the example, I found a bug in "Transform Object" node. So if you will be using this node, you should wait for the next release or apply the patch.
Alexander (Blend4Web Team)
twitter
12 February 2018 14:46
I'm not sure I got you. What should happen after clicking on exampleurl.com/example_scene.html?exportscenedata=123sceneid456&format=json ? The original Json should be downloaded? In this case this is not exporting, because there is no data convertion.

If you just want to save parameters, you can encode them in url like how it was implemented here

And just some info regarding data loading and its identification: you can load your data dynamically with load method. ID will be returned.
Alexander (Blend4Web Team)
twitter
12 February 2018 14:20
Сейчас того что есть хватает, но хотелось бы научиться работать с EMPTY объектами, хотя бы ради интереса, т.к. если один из них закрадется в список детей - то беда. Сейчас проверку на то что объект не EMPTY я не делал, пока лишнее.
В следующем релизе в API будет добавлен метод создания empty-объекта, а также копирование при помощи m_obj.copy empty-объекта будет работать.
Сейчас мы ведем работу по реорганизации внутреннего представления объектов и сцен, поэтому большинство ограничений, связанных с созданием/копированием/изменением объектов в процессе работы приложения должны уйти. Результаты появятся скорее всего не раньше чем через релиз.
Alexander (Blend4Web Team)
twitter