Class: Node

VVVV.Core. Node

new Node(id, nodename, parentPatch)

Parameters:
Name Type Argument Description
id Integer

the Node ID

nodename String

the Node Name

parentPatch VVVV.Core.Patch <optional>

the VVVV.Core.Patch the node is nested

Source:

Members

auto_evaluate

a flag indicating if this node should evaluate each frame, no matter if it's marked dirty or not

Source:

auto_nil

flag indicating if this node should automatically output nil on all output pins, if a nil value is on any input pin

Source:

dirty

a flag indicating if any of this node's input pins has changed

Source:

height

Node width (in a weird unit); use VVVV.Core.Node.getHeight() for pixel value

Source:

id

the node ID

Source:

isIOBox

flag indicating whether a node is an IOBox

Source:

isShader

flag indicating whether a node is a shader node

Source:

nodename

the nodename; might be e.g. a name in format NodeName (Category), SomeShader.fx or a path/to/a/subpatch.v4p

Source:

parentPatch

the patch containing this node

Source:

resourcesPending

the number of subsequent resources (subpatches, shaders, 3rd party libs, etc.) that are currently being loaded. Is 0 if nothing is pending

Source:

width

Node width (in a weird unit); use VVVV.Core.Node.getWidth() for pixel value

Source:

x

X position in pixels inside the parent patch

Source:

y

Y position in pixels inside the parent patch

Source:

Methods

addDefault(pinname, value)

saves a pin value coming from the patch XML for later use

Parameters:
Name Type Description
pinname String

the pin's name

value Array

the array of values (slices)

Source:

addInputPin(pinname, value, type) → {VVVV.Core.Pin}

Creates a new input pin and adds it to the node. If pin values from the XML have been registered through VVVV.Core.Node.addDefault, these values are assigned

Parameters:
Name Type Description
pinname String

the new pin's name

value Array

the default spread

type Object

see VVVV.PinTypes

Source:
Returns:

the new VVVV.Core.Pin

Type
VVVV.Core.Pin

addInvisiblePin(pinname, value, type) → {VVVV.Core.Pin}

Creates a new invisible/config pin and adds it to the node. If pin values from the XML have been registered through VVVV.Core.Node.addDefault, these values are assigned

Parameters:
Name Type Description
pinname String

the new pin's name

value Array

the default spread

type Object

see VVVV.PinTypes

Source:
Returns:

the new VVVV.Core.Pin

Type
VVVV.Core.Pin

addOutputPin(pinname, value, type) → {VVVV.Core.Pin}

Creates a new output pin and adds it to the node.

Parameters:
Name Type Description
pinname String

the new pin's name

value Array

the default spread

type Object

see VVVV.PinTypes

Source:
Returns:

the new VVVV.Core.Pin

Type
VVVV.Core.Pin

applyPinValuesFromXML(pinname)

Applies values from the patch XML to an input pin, if present

Parameters:
Name Type Description
pinname String

the name of the pin

Source:

<virtual> destroy()

Method called when a node is being deleted. Should be overwritten by any Node implementation to free resources and gracefully shut itself down

Source:

<virtual> evaluate()

Method called each frame, if a node is marked dirty or VVVV.Core.Node.auto_evaluate is true. This method should be overwritten by any Node implementation and usually holds the node's main logic.

Source:

findDownstreamNodes(name)

Finds all nodes with a certain name, the node's data eventually flows into.

Parameters:
Name Type Description
name String

the name of the node to search for

Source:

getDownstreamNodes() → {Array}

Returns all nodes which are connected to a node's output pins

Source:
Returns:

an Array of VVVV.Core.Node objects

Type
Array

getHeight() → {Integer}

Returns the node height in pixels, used for displaying the patch

Source:
Returns:

the node height in pixels

Type
Integer

getMaxInputSliceCount()

Returns the maximum number of slices of a node's input pins

Source:
Returns:

the maximum number of slices

getUpstreamNodes() → {Array}

Returns all nodes which are connected to a node's input pins

Source:
Returns:

an Array of VVVV.Core.Node objects

Type
Array

getWidth() → {Integer}

Returns the node with in pixels, used for displaying the patch

Source:
Returns:

the node width in pixels

Type
Integer

hasNilInputs()

Tells, if a node has any nil inputs

Source:
Returns:

true, if any of the input pins are true, false otherwise

<virtual> initialize()

Method called AFTER a node's pins have been created and populated with values from patch XML, and BEFORE node links are created. This method should be overwritten by any Node implementation and is useful for e.g. creating dynamic number of input pins and other initialising code which should run before first call of VVVV.Core.Node.evaluate.

Source:

IOBoxInputPin() → {VVVV.Core.Pin}

Returns the input pin of the IOBox which is represented by the IOBox label

Source:
Returns:

the pin represented by the IOBox label, see VVVV.Core.Pin

Type
VVVV.Core.Pin

IOBoxOutputPin() → {VVVV.Core.Pin}

Returns the output pin of the IOBox which is represented by the IOBox label

Source:
Returns:

the pin represented by the IOBox label, see VVVV.Core.Pin

Type
VVVV.Core.Pin

IOBoxRows() → {Integer}

Returns the number of visible rows of an IOBox. This is basically a convenience method for getting the value of the "Rows" pin

Source:
Returns:

the number of visible rows

Type
Integer

IOBoxType() → {String}

Helper to get the type of IOBox (e.g. Value Advanced, String, Color)

Source:
Returns:

the type of IOBox

Type
String

isComment() → {Boolean}

Tells, if a node is a comment node. Reverse engineering revealed that this is the case, if a String IOBox has no output pins. Maybe better ask someone who actually knows.

Source:
Returns:

true, if the node is a comment, false otherwise.

Type
Boolean

label() → {String}

Returns the text shown inside a node box in the editor. In case of an IOBox this is the result of VVVV.Core.Node.IOBoxInputPin; in case of a subpatch this is "|| SubPatchName" (the .v4p extension stripped); in case of a normal node, this is the node name.

Source:
Returns:

the node's representative label

Type
String

registerInterfacePin()

Called, if an IOBox's Descriptive Name inside a subpatch changes, this method creates and updates the subpatch's in and output pins. Subsequently triggers connection changed events for the IOBox's input and output pins.

Source:

removeInputPin(pinname)

deletes an input pin and all incoming links

Parameters:
Name Type Description
pinname

the name of the pin to delete

Source:

removeOutputPin(pinname)

deletes an output pin and all outgoing links

Parameters:
Name Type Description
pinname

the name of the pin to delete

Source:

serialize() → {String}

Creates the XML code representing the node and its pins. Called by VVVV.Core.Patch.toXML on serializing a patch and directly by the editor when nodes are being copied to clipboard

Source:
Returns:

the node's XML code

Type
String

setup()

Method called immediatly after node creation for setting up common node settings

Source:
VVVV.js Copyright © 2012-2013 The contributors to the VVVV.js project.
Documentation generated by JSDoc 3.3.0-alpha4 on Thu May 08 2014 13:12:35 GMT+0200 (Mitteleuropäische Sommerzeit) using the DocStrap template.