Classes
Members
(private) currentNode
The instruction pointer equivalent :)
- Source:
(private) enter
The Enter node
- Source:
events
The event emitter connected to the program
- Source:
(private) exit
The Exit node
- Source:
(private) nodes
The nodes in this program
- Source:
(private) vars
The variable global space
- Source:
version
Engine version
- Source:
Methods
(static) cloneNodes(nodes)
This method clone a group of nodes, by reconstructing the
connections from sockets too. All connections involvong nodes
outside this set will be not reconstructed.
Parameters:
Name | Type | Description |
---|---|---|
nodes |
Array.<Node> | Nodes (and) connections to clone |
- Source:
addNode(node)
Add a new node to this program
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | The node to add |
- Source:
clone(factory)
Clone this node
Parameters:
Name | Type | Description |
---|---|---|
factory |
function | The factory class function |
- Source:
(async) process()
The process method will start from the Enter node and
cycle over nexts returned by the process functions of nodes.
The Program node couldn't be a top-level program, but a sub-nod
of another program. For that reason, the process() method copy the
value of the only input in the Program node to the only one
output of the "Enter" node.
This is a limitation: The Program node can be actually only 1 input
and only 1 output. At the same, Enter and Exit nodes will have only
1 output and 1 input respectively.
At the end, the process() methos of the Program node, will copy the
value of the Exit's intput to the unique output of the Program node
- Source:
(async) processFrom(node)
Execute a program useng node as starting point
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | Starting point node |
- Source:
removeNode(node)
Removes a node from this program, disconnect all sockets
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | The node to remove |
- Source: