You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not having yet the time to reprocess the whole and make a good doc about, but essentially:
The basic is that nodes executes and produce outputs with their own code placed usually in onExecute.
LiteGraph.ACTION and LiteGraph.EVENT actually have the same values, and both represent an "action/event" slot type. The distinction is just to help understanding when it comes in or comes out.
onAction is called when an input slot of type "action/event" is triggered, that happens when a link connected to it fires the event. That is parallel to default node execution. Node execution happens every frame and calls onExecute on every (normal) node. Different node modes will generally allow to prevent the normal execution (onExecute) and leave it to be coded internally.
On trigger is a mode that has been created later on, that executes the node only when a specific "action" name "onTrigger" is triggered. That would be similar to other event-based visual coding system.
I don't really understand the difference between
LiteGraph.ON_EVENT
andLiteGraph.ON_TRIGGER
.For each link linked to the node
LiteGraph.ON_TRIGGER
when the trigger fires, does it callon_execute()
of linked nodes?LiteGraph.ON_EVENT
does this callon_action()
of linked nodes?In the documentation it is stated
To define slots for nodes you must use the type LiteGraph.ACTION for inputs, and LIteGraph.EVENT for outputs:
isn't there an error with
this.addInput("onFinish", LiteGraph.EVENT )
?It should not be
this.addOutput("onFinish", LiteGraph.EVENT );
?Can you explain and provide some examples?
For example how to use with the
Console
node - Console.prototype.onAction?The text was updated successfully, but these errors were encountered: