Class: wcNodeLibrary

wcNodeLibrary


new wcNodeLibrary()

Contains a library of node types. Accessible via wcPlay#nodeLibrary. This is used by the editor tool to determine what nodes a user is allowed to use within a script. By default, this contains all nodes loaded by the browser. After updating this library, you will need to re-load the script within the editor to update the palette.

Source:

Methods


function add(nodeName) -> boolean

Adds a node of a given class name to the library.

Parameters:
Name Type Description
nodeName string The node to add.
Source:
Returns:
- True if the node was added.
Type
boolean

function all()

Adds all node types to the library.

Source:

function clear()

Clears all nodes from the library.

Source:

function get() -> Array.<wcNode>

Retrieves the library list of nodes.

Source:
Returns:
- The node list.
Type
Array.<wcNode>

function remove(nodeName) -> boolean

Remove a node of a given class name from the library

Parameters:
Name Type Description
nodeName string The node to remove.
Source:
Returns:
- True if the node was removed.
Type
boolean