Class: OutputSocket

OutputSocket(name, node, type, value, cachedopt)

This is a output value socket and represent an output value for the node. Output value socket can be connected to many peer input value sockets, because many socket would like to take the value from this.

Constructor

new OutputSocket(name, node, type, value, cachedopt)

Construct a new OutputSocket
Parameters:
Name Type Attributes Default Description
name string The name of the socket
node Node The parent node
type Type The type of the socket
value any 0 The default value of the socket
cached boolean <optional>
This socket is cached?
Source:

Classes

OutputSocket

Members

(private) cached

This flag indicates that the socket don't try to cal the process() method of its node upon the evaluation. Normally, functional nodes have output sockets not cached, so an evaluation of its values will result in a call of process() method
Source:

(private) peers

A list of input value connected sockets
Source:

Methods

clone()

Clone the socket
Source:

connect(socket)

Connects this socket to a input socket
Parameters:
Name Type Description
socket Socket Socket to connect to
Source:

disconnect(socket)

Disconnect this socket from a specific input peer
Parameters:
Name Type Description
socket Socket The socket to disconnect
Source:

(async) evaluate()

The evaluation of a OutputSocket depends from two factors: - The node of the socket is functional - The socket is market to be "cached" If the parent node is not functional, simply does nothing, because the value of this socket have to be unchanged from mthe last process call Otherwise, if the node is functional, we have to check if this particular socket is marked to be "cached", in that case, the value have to remain unchanged, otherwise the process() method have to be called again
Source: