Module: logic_nodes

API methods to control the Logic Editor.

Summary

Methods

Detailed Description

Methods

append_custom_callback(cb_id, cb)

Register custom callback, used in logic editor.
Parameters:
Name Type Description
cb_id string Callback ID.
cb function Callback function.
Source:
Example
var m_log_nodes = require("logic_nodes");
var cb = function() {
    console.log("Blend4Web rules!");
}

m_log_nodes.append_custom_callback("cb_ID", cb);

remove_custom_callback(cb_id)

Remove registered custom callback by its ID.
Parameters:
Name Type Description
cb_id string Callback ID.
Source:
Example
var m_log_nodes = require("logic_nodes");

m_log_nodes.remove_custom_callback("cb_ID");

run_entrypoint(scene_name, ep_name)

Activate Entry Point node, used in logic editor.
Parameters:
Name Type Description
scene_name string Scene name.
ep_name string Entry Point node name.
Source:
Example
var m_log_nodes = require("logic_nodes");
m_log_nodes.run_entrypoint("Scene", "B4WLogicNode");