Methods
# (static) clearRegisteredTypes()
Removes all previously registered node's types
- Source:
# (inner) getNodeType(type) → {Class}
Returns a registered node type with a given name
Parameters:
Name | Type | Description |
---|---|---|
type |
String | full name of the node class. p.e. "math/sin" |
- Source:
Returns:
the node class
- Type
- Class
# (inner) getNodeType(category) → {Array}
Returns a list of node types matching one category
Parameters:
Name | Type | Description |
---|---|---|
category |
String | category name |
- Source:
Returns:
array with all the node classes
- Type
- Array
# (inner) getNodeTypesCategories(filter) → {Array}
Returns a list with all the node type categories
Parameters:
Name | Type | Description |
---|---|---|
filter |
String | only nodes with ctor.filter equal can be shown |
- Source:
Returns:
array with all the names of the categories
- Type
- Array
# (inner) registerNodeType(type, baseClass)
Register a node class so it can be listed when the user wants to create a new one
Parameters:
Name | Type | Description |
---|---|---|
type |
LGraphNode | name of the node and path |
baseClass |
Class | class containing the structure of a node |
- Source:
# (inner) registerSearchboxExtra(nodeType, description, data) → {Boolean}
Register a string in the search box so when the user types it it will recommend this node
Parameters:
Name | Type | Description |
---|---|---|
nodeType |
String | the node recommended |
description |
String | text to show next to it |
data |
Object | it could contain info of how the node should be configured |
- Source:
Returns:
true if they can be connected
- Type
- Boolean
# (inner) unregisterNodeType(type)
removes a node type from the system
Parameters:
Name | Type | Description |
---|---|---|
type |
String | Object | name of the node or the node constructor itself |
- Source: