Skip to content

Commit 3c38926

Browse files
authored
Update README.md
1 parent 98684e4 commit 3c38926

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

guides/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,19 @@ function MyNode()
217217
}
218218
```
219219

220+
# Execution Flow
221+
To execute a graph you must call ```graph.runStep()```.
222+
223+
This function will call the method ```node.onExecute()``` for every node in the graph.
224+
225+
The order of execution is determined by the system according to the morphology of the graph (nodes without inputs are considered level 0, then nodes connected to nodes of level 0 are level 1, and so on). This order is computed only when the graph morphology changes (new nodes are created, connections change).
226+
227+
It is up to the developer to decide how to handle inputs and outputs from inside the node.
228+
229+
The data send through outputs using ```this.setOutputData(0,data)``` is stored in the link, so if the node connected through that link does ```this.getInputData(0)``` it will receive the same data sent.
230+
231+
For rendering, the nodes are executed according to their order in the ```graph._nodes``` array, which changes when the user interact with the GraphCanvas (clicked nodes are moved to the back of the array so they are rendered the last).
232+
220233

221234
## Integration
222235

0 commit comments

Comments
 (0)