Constructor
new L3D.NodeInput(name, type, defaultValue, node, o)
name |
String | The name of the input, must be unique within the node. |
type |
String | The type of the input. |
defaultValue |
* | The default value of the input. |
node |
GraphNode | The node this input belongs to. |
o |
Object | Optional configuration for the input. |
Properties
The NodeOutput, or array of NodeOutputs, this input is connected from, if any.
The number of connections to this input.
The data stored by this input
A dataSource is used to dynamically provide the data of the input via dataSource.getInput and dataSource.setInput methods.
The initial value of the input, used to restore the data if the input is disconnected.
The type of the input without trying to resolve dynamic types.
Does this input have multiple connections?
Does this input have a connection
The unique identifier of the input.
If true, the input is part of the node class. If false, it was dynamically added to the node.
The name of the input, which must be unique within the node.
The type of the input. Dynamic types "*" will attempt to be resolved by the type of data connected to it.
Methods
canConnectFrom(output) → bool
Determines if this node can be connected from the given output.
output |
NodeOutput |
- bool
configure(info)
Configure the node with the given data.
info |
Object |
connectFrom(output, index)
Connect to this input from a given output.
output |
NodeOutput | |
index |
int | The specific index of an array to connect to. |
disconnect(from)
Disconnect any connections to this input.
from |
NodeOutput | Optional output to disconnect from. If null, then all connections will be disconnected. |
get(context) → *
Get the value of the input.
context |
* |
- *
getConnection(index) → nullable NodeOutput
Returns the output this input is connected from. If it's an array connection, then it returns the connection at the given index.
index |
int |
isConnectedTo(from, index) → bool
Check to see if this input is connected to the given output.
from |
NodeOutput | The NodeOutput to check. |
index |
int | If set, check for a connection with a specific array index |
- bool
True if this input is connected to the given output.
set(value)
Set the value of the input.
value |
* |
setDirty(fromShaderUniform)
Marking the input as dirty will dirty the node and propogate the dirty state up the graph.
fromShaderUniform |
bool | If the dirty propagation was originated from a shader uniform output. This is used by Material nodes to avoid invalidating shader data unnecessarily causing shaders to be regenerated when a uniform value changes. |