Class: Patch

VVVV.Core. Patch

new Patch(ressource, success_handler, error_handler, parentPatch, id)

Parameters:
Name Type Argument Description
ressource String

either a path/to/some/patch.v4p or VVVV XML code

success_handler function

called after the patch (and all sub components) has completely loaded and is ready

error_handler function

called if an error occured, most likey because the .v4p file was not found

parentPatch VVVV.Core.Patch <optional>

the parent patch, if it's a subpatch

id Integer

the patch's ID in the parent patch, if it's a subpatch

Source:

Members

boundingBox

the diameter of the patch / the maximum X and Y coordinates of all nodes in a patch

Source:

an array containing all links inside a patch

Source:

mainloop

The VVVV.MainLoop Object running this patch

Source:

nodeList

an array containing all nodes inside a patch

Source:

nodeMap

a hash table containing all nodes inside a patch, indexed with the node ID

Source:

pinMap

a hash table containing the pins of all nodes inside a patch, indexed with [nodeid][in|out|inv]_[pinname]

Source:

windowHeight

Source:

windowWidth

Source:

Methods

<virtual> afterEvaluate()

Called always after the patch has been evaluated

Source:

<virtual> afterUpdate()

Called always after the patch has been modified using VVVV.Core.Patch.doLoad

Source:

destroy()

Called when a patch is deleted. Deletes all containing nodes.

Source:

doLoad(xml, ready_callback)

Takes a patch XML string, parses it, and applies it to the patch. This method is called once by the constructor, passing the complete patch code, and frequently by an editor, passing in XML snippets. This is the only method you should use to manipulate a patch.

Parameters:
Name Type Description
xml String

VVVV Patch XML

ready_callback function

called after the XML code has been completely processed, and the patch is fully loaded and ready again

Source:

evaluate()

Evaluates the patch once. Is called by the patch's VVVV.Core.MainLoop each frame, and should not be called directly

Source:

getAbsolutePath() → {String}

Returns the patch's absolute path, usable for the browser

Source:
Returns:

the absolute path

Type
String

getRelativePath() → {String}

Returns a patch's relative path, as it is specified in the paret patch

Source:
Returns:

the patch's path relative to its parent patch

Type
String

getSubPatches() → {Array}

Recursively fetches and returns all subpatches inside a patch

Source:
Returns:

an array of VVVV.Core.Patch objects

Type
Array

setMainloop(ml)

Sets the VVVV.Core.MainLoop object of the patch and all containing subpatches

Parameters:
Name Type Description
ml VVVV.Core.MainLoop
Source:

toXML() → {String}

Returns the VVVV XML string representing the patch, ready to be saved

Source:
Returns:
Type
String

<inner> splitValues(v)

Creates an array of slices out of pin value string coming from a patch XML

Parameters:
Name Type Description
v String

the pin value string from the XML

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.