Namespace: b4w

b4w

Blend4Web global object.
Source:

Summary

Methods

Type Definitions

Detailed Description

Methods

get_namespace(mod_ns_require) → {string}

Get a namespace of the current module by it's require function.
Parameters:
Name Type Description
mod_ns_require RequireFunction Local require function
Returns:
Namespace.
Type
string
Source:

module_check(module_id) → {boolean}

Check if the module was registered.
Parameters:
Name Type Description
module_id string Module ID
Returns:
Check result
Type
boolean
Source:

register(module_id, fun)

Register the module.
Parameters:
Name Type Description
module_id string Module ID
fun ModuleFunction Function implementing the module
Source:

require(module_id, nsopt) → {Object3D}

Prepare and return the registered module.
Parameters:
Name Type Attributes Default Description
module_id string Module ID
ns string <optional>
"__b4w_default" Namespace for processed modules
Returns:
Module object
Type
Object3D
Source:

Type Definitions

ModuleFunction(exports, require)

Module implementation function.
Parameters:
Name Type Description
exports Object Object with exported symbols
require RequireFunction Local (module internal) require function
Source:

RequireFunction(module_id)

Local (module internal) require function. This function is passed to the module implementation function and can be used to import additional modules from the same namespace. If you need to import a module from the different namespace use b4w.require.
Parameters:
Name Type Description
module_id string Module ID
Source: