videocontext
Version:
A WebGL & HTML5 graph based video composition library
1,338 lines (361 loc) • 16.9 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: RenderGraph</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: RenderGraph</h1>
<section>
<header>
<h2>RenderGraph</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="RenderGraph"><span class="type-signature"></span>new RenderGraph<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
<p>Manages the rendering graph.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="rendergraph.js.html">rendergraph.js</a>, <a href="rendergraph.js.html#line9">line 9</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="getInputsForNode"><span class="type-signature"></span>getInputsForNode<span class="signature">(node)</span><span class="type-signature"> → {Array.<<a href="GraphNode.html">GraphNode</a>>}</span></h4>
<div class="description">
<p>Get a list of nodes which are connected as inputs to the given node. The length of the return array is always equal to the number of inputs for the node, with undefined taking the place of any inputs not connected.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>node</code></td>
<td class="type">
<span class="param-type"><a href="GraphNode.html">GraphNode</a></span>
</td>
<td class="description last"><p>the node to get the inputs for.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="rendergraph.js.html">rendergraph.js</a>, <a href="rendergraph.js.html#line70">line 70</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>An array of GraphNodes which are connected to the node.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.<<a href="GraphNode.html">GraphNode</a>></span>
</dd>
</dl>
<h4 class="name" id="getNamedInputsForNode"><span class="type-signature"></span>getNamedInputsForNode<span class="signature">(node)</span><span class="type-signature"> → {Array.<Object>}</span></h4>
<div class="description">
<p>Get a list of nodes which are connected, by input name, to the given node. Array contains objects of the form: {"source":sourceNode, "type":"name", "name":inputName, "destination":destinationNode}.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>node</code></td>
<td class="type">
<span class="param-type"><a href="GraphNode.html">GraphNode</a></span>
</td>
<td class="description last"><p>the node to get the named inputs for.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="rendergraph.js.html">rendergraph.js</a>, <a href="rendergraph.js.html#line35">line 35</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>An array of objects representing the nodes and connection type, which are connected to the named inputs for the node.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.<Object></span>
</dd>
</dl>
<h4 class="name" id="getOutputsForNode"><span class="type-signature"></span>getOutputsForNode<span class="signature">(node)</span><span class="type-signature"> → {Array.<<a href="GraphNode.html">GraphNode</a>>}</span></h4>
<div class="description">
<p>Get a list of nodes which are connected to the output of the passed node.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>node</code></td>
<td class="type">
<span class="param-type"><a href="GraphNode.html">GraphNode</a></span>
</td>
<td class="description last"><p>the node to get the outputs for.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="rendergraph.js.html">rendergraph.js</a>, <a href="rendergraph.js.html#line19">line 19</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>An array of the nodes which are connected to the output.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.<<a href="GraphNode.html">GraphNode</a>></span>
</dd>
</dl>
<h4 class="name" id="getZIndexInputsForNode"><span class="type-signature"></span>getZIndexInputsForNode<span class="signature">(node)</span><span class="type-signature"> → {Array.<Object>}</span></h4>
<div class="description">
<p>Get a list of nodes which are connected, by z-index name, to the given node. Array contains objects of the form: {"source":sourceNode, "type":"zIndex", "zIndex":0, "destination":destinationNode}.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>node</code></td>
<td class="type">
<span class="param-type"><a href="GraphNode.html">GraphNode</a></span>
</td>
<td class="description last"><p>the node to get the z-index refernced inputs for.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="rendergraph.js.html">rendergraph.js</a>, <a href="rendergraph.js.html#line51">line 51</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>An array of objects representing the nodes and connection type, which are connected by z-Index for the node.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.<Object></span>
</dd>
</dl>
<h4 class="name" id="isInputAvailable"><span class="type-signature"></span>isInputAvailable<span class="signature">(node, inputName)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Check if a named input on a node is available to connect too.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>node</code></td>
<td class="type">
<span class="param-type"><a href="GraphNode.html">GraphNode</a></span>
</td>
<td class="description last"><p>the node to check.</p></td>
</tr>
<tr>
<td class="name"><code>inputName</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>the named input to check.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="rendergraph.js.html">rendergraph.js</a>, <a href="rendergraph.js.html#line108">line 108</a>
</li></ul></dd>
</dl>
<h4 class="name" id="registerConnection"><span class="type-signature"></span>registerConnection<span class="signature">(sourceNode, destinationNode, target<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
<p>Register a connection between two nodes.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>sourceNode</code></td>
<td class="type">
<span class="param-type"><a href="GraphNode.html">GraphNode</a></span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>the node to connect from.</p></td>
</tr>
<tr>
<td class="name"><code>destinationNode</code></td>
<td class="type">
<span class="param-type"><a href="GraphNode.html">GraphNode</a></span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>the node to connect to.</p></td>
</tr>
<tr>
<td class="name"><code>target</code></td>
<td class="type">
<span class="param-type">String</span>
|
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>the target port of the conenction, this could be a string to specfiy a specific named port, a number to specify a port by index, or undefined, in which case the next available port will be connected to.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="rendergraph.js.html">rendergraph.js</a>, <a href="rendergraph.js.html#line128">line 128</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Will return true if connection succeeds otherwise will throw a ConnectException.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="unregisterConnection"><span class="type-signature"></span>unregisterConnection<span class="signature">(sourceNode, destinationNode)</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
<p>Remove a connection between two nodes.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>sourceNode</code></td>
<td class="type">
<span class="param-type"><a href="GraphNode.html">GraphNode</a></span>
</td>
<td class="description last"><p>the node to unregsiter connection from.</p></td>
</tr>
<tr>
<td class="name"><code>destinationNode</code></td>
<td class="type">
<span class="param-type"><a href="GraphNode.html">GraphNode</a></span>
</td>
<td class="description last"><p>the node to register connection to.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="rendergraph.js.html">rendergraph.js</a>, <a href="rendergraph.js.html#line161">line 161</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Will return true if removing connection succeeds, or false if there was no connectionsction to remove.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-VideoContext.html">VideoContext</a></li></ul><h3>Classes</h3><ul><li><a href="CanvasNode.html">CanvasNode</a></li><li><a href="CompositingNode.html">CompositingNode</a></li><li><a href="DestinationNode.html">DestinationNode</a></li><li><a href="EffectNode.html">EffectNode</a></li><li><a href="GraphNode.html">GraphNode</a></li><li><a href="ImageNode.html">ImageNode</a></li><li><a href="module-VideoContext.html">VideoContext</a></li><li><a href="ProcessingNode.html">ProcessingNode</a></li><li><a href="RenderGraph.html">RenderGraph</a></li><li><a href="SourceNode.html">SourceNode</a></li><li><a href="TransitionNode.html">TransitionNode</a></li><li><a href="VideoNode.html">VideoNode</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>