Protected
editorThis event is called as soon as a run is completed. The argument is the result of the calculation.
This event is called before a node is calculated. It is not preventable since this would break calculation.
This event will be called before all the nodes calculate
functions are called.
The argument is the calculationData that the nodes will receive
Protected
recalculateProtected
calculateUse the gatherCalculationData
hook to get the calculation data
Rest
...args: []The calculation arguments with which the engine's calculate method will be called (in addition to the calculationData
)
The calculation result
Check whether a connection can be created. A connection can not be created when it would result in a cyclic graph.
The interface from which the connection would start
The interface where the connection would end
Whether the connection can be created
Protected
executeOverwrite this method to perform the calculation
The data which is provided to each node's calculate
method
The calculation result
Gathers the values of all unconnected input interfaces in the graph
Map nodeInterface.id -> value
Protected
onThis method is called whenever the graph or values of node interfaces have been changed. You can overwrite this method to automatically trigger a calculation on change. Note: This method is only called when the engine is either idle or running.
Whether the change modified the graph itself, e. g. a connection or a node was added/removed
Run a non-root graph. This method can be used by nodes to calculate internal graphs (e. g. GraphNode). DO NOT use this method for calculation of the root graph! It won't emit any events.
The graph to execute
Map<NodeInterfaceId, value>
The data which is provided to each node's calculate
method
A promise that resolves to a map that maps rootNodes to their calculated value (what the calculation function of the node returned)
Calculate all nodes once. This will automatically calculate the node calculation order if necessary and transfer values between connected node interfaces.
The data which is provided to each node's calculate
method
Rest
...args: []A promise that resolves to either
Protected
validateValidate the result of a node's calculate
method. A result is valid if:
The node which produced the output data
The result of the node's calculate
method
This event is called after a node has been calculated.