RenderGraph
Static Method Summary
Static Public Methods | ||
public static |
getInputlessNodes(connections: *): * |
|
public static |
inputEdgesFor(node: *, connections: *): * |
|
public static |
outputEdgesFor(node: *, connections: *): * |
Constructor Summary
Public Constructor | ||
public |
Manages the rendering graph. |
Member Summary
Public Members | ||
public |
connections: *[] |
Method Summary
Public Methods | ||
public |
getInputsForNode(node: GraphNode): GraphNode[] Get a list of nodes which are connected as inputs to the given node. |
|
public |
getNamedInputsForNode(node: GraphNode): Object[] Get a list of nodes which are connected, by input name, to the given node. |
|
public |
getOutputsForNode(node: GraphNode): GraphNode[] Get a list of nodes which are connected to the output of the passed node. |
|
public |
getZIndexInputsForNode(node: GraphNode): Object[] Get a list of nodes which are connected, by z-index name, to the given node. |
|
public |
isInputAvailable(node: GraphNode, inputName: String): boolean Check if a named input on a node is available to connect too. |
|
public |
registerConnection(sourceNode: GraphNode, destinationNode: GraphNode, target: String | number): boolean Register a connection between two nodes. |
|
public |
unregisterConnection(sourceNode: GraphNode, destinationNode: GraphNode): boolean Remove a connection between two nodes. |
Static Public Methods
public static getInputlessNodes(connections: *): * source
Params:
Name | Type | Attribute | Description |
connections | * |
Return:
* |
public static inputEdgesFor(node: *, connections: *): * source
Params:
Name | Type | Attribute | Description |
node | * | ||
connections | * |
Return:
* |
public static outputEdgesFor(node: *, connections: *): * source
Params:
Name | Type | Attribute | Description |
node | * | ||
connections | * |
Return:
* |
Public Constructors
Public Members
public connections: *[] source
Public Methods
public getInputsForNode(node: GraphNode): GraphNode[] source
Get a list of nodes which are connected as inputs to the given node. The length of the return array is always equal to the number of inputs for the node, with undefined taking the place of any inputs not connected.
Params:
Name | Type | Attribute | Description |
node | GraphNode | the node to get the inputs for. |
public getNamedInputsForNode(node: GraphNode): Object[] source
Get a list of nodes which are connected, by input name, to the given node. Array contains objects of the form: {"source":sourceNode, "type":"name", "name":inputName, "destination":destinationNode}.
Params:
Name | Type | Attribute | Description |
node | GraphNode | the node to get the named inputs for. |
Return:
Object[] | An array of objects representing the nodes and connection type, which are connected to the named inputs for the node. |
public getOutputsForNode(node: GraphNode): GraphNode[] source
Get a list of nodes which are connected to the output of the passed node.
Params:
Name | Type | Attribute | Description |
node | GraphNode | the node to get the outputs for. |
public getZIndexInputsForNode(node: GraphNode): Object[] source
Get a list of nodes which are connected, by z-index name, to the given node. Array contains objects of the form: {"source":sourceNode, "type":"zIndex", "zIndex":0, "destination":destinationNode}.
Params:
Name | Type | Attribute | Description |
node | GraphNode | the node to get the z-index refernced inputs for. |
Return:
Object[] | An array of objects representing the nodes and connection type, which are connected by z-Index for the node. |
public isInputAvailable(node: GraphNode, inputName: String): boolean source
Check if a named input on a node is available to connect too.
public registerConnection(sourceNode: GraphNode, destinationNode: GraphNode, target: String | number): boolean source
Register a connection between two nodes.
Params:
Name | Type | Attribute | Description |
sourceNode | GraphNode | the node to connect from. |
|
destinationNode | GraphNode | the node to connect to. |
|
target | String | number |
|
the target port of the conenction, this could be a string to specfiy a specific named port, a number to specify a port by index, or undefined, in which case the next available port will be connected to. |