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: