Register Node
Node?
This is where we define our node structure like input/output/properties, title, and description
Can be ported easily on different programming languages
That's mean we can't call specific language's API
Any interaction with specific language's API like input/output must be registered on Interface.
This supposed to run on NodeJS too, so don't control any HTML element directly inside this.
Don't declare or use variable outside of function context/scope.
Just think you want to create a compatible logic to be ported on Browser/Node.js/PHP/Python.
Just let this
node
control and communicate with your registeredinterface
.
Reserved handler property
node
here is the Blackprint flow handler from the example above.
Property | Description |
inputs | An array of input port registration |
outputs | An array of output port registration |
properties | An array of node property registration |
importing | A boolean indicating if this node is being imported/created |
Below are reserved property that filled with function/callback
Property | Arguments | Description |
init |
| Callback function to be run after current handle and all node was initialized |
request |
| Callback when other node's input port are requesting current node's output value |
update |
| Callback when current input value are updated from the other node's output port |
imported |
| This is a callback after node was created, imported options should be handled here |
For the detailed example you can see from this repository.
Node port registration
The port must be registered on the node
and Blackprint will create internal control with ScarletsFrame so the port can being used for sending or obtaining data from other node's port.
Last updated