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.
Methods
-
function add(nodeName) -> boolean -
Adds a node of a given class name to the library.
Parameters:
Name Type Description nodeNamestring The node to add. Returns:
- True if the node was added.- Type
- boolean
-
function all() -
Adds all node types to the library.
-
function clear() -
Clears all nodes from the library.
-
function get() -> Array.<wcNode> -
Retrieves the library list of nodes.
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 nodeNamestring The node to remove. Returns:
- True if the node was removed.- Type
- boolean