NodeOutput

An output port of a GraphNode.

Constructor

new L3D.NodeOutput()

Properties

connections Array

The list of NodeInputs connnected to from this output.

dataSource Node

A dataSource dynamically provides the data for the output, rather than it being computed by the node.

hasConnection bool

Does this output have any connections?

id String

The unique id of the output.

isClean bool

If true the output does not need to be recomputed.

isDirty bool

Does the data for this node need to be recomputed?

name String

The name of the output.

node Node

The node that owns the outptu.

type String

The data type of the output. If it's a dynamic type, then it will get the type from the node.

Methods

configure(info)

Configure the NodeOutput with the given data.

Parameters
info Object

disconnect(input, skipInputDisconnect)

Disconnect the given input from this output.

Parameters
input NodeInput
skipInputDisconnect bool

if true, then the input.disconnect will not be called. This is used to avoid cycles when it's called from NodeInput.disconnect.

disconnectAll()

Disconnect all connections from this node.

execute()

Calls executeEvent for all connected nodes.

get(context)

Get the value of an node output, which calls the nodes compute method if the data is invalid.

Parameters
context *

Optional context used for computing the value.

set(value)

Set the data stored by this output. This cached value will be used by subsequent calls to get.

Parameters
value *

setDirty(fromShaderUniform)

Mark the node output as dirty.

Parameters
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.