demo improved, editor included, graph canvas detached

This commit is contained in:
tamat
2014-03-21 19:56:50 +01:00
parent 84377376a9
commit c9c11e6c46
18 changed files with 6948 additions and 2113 deletions

View File

@@ -2,6 +2,7 @@ YUI.add("yuidoc-meta", function(Y) {
Y.YUIDoc = { meta: {
"classes": [
"LGraph",
"LGraphCanvas",
"LGraphNode",
"LiteGraph"
],

View File

@@ -43,6 +43,8 @@
<li><a href="../classes/LGraph.html">LGraph</a></li>
<li><a href="../classes/LGraphCanvas.html">LGraphCanvas</a></li>
<li><a href="../classes/LGraphNode.html">LGraphNode</a></li>
<li><a href="../classes/LiteGraph.html">LiteGraph</a></li>
@@ -94,7 +96,7 @@
<div class="foundat">
Defined in: <a href="../files/.._src_litegraph.js.html#l302"><code>..&#x2F;src&#x2F;litegraph.js:302</code></a>
Defined in: <a href="../files/.._src_litegraph.js.html#l299"><code>..&#x2F;src&#x2F;litegraph.js:299</code></a>
</div>
@@ -145,7 +147,7 @@
<a href="../files/.._src_litegraph.js.html#l302"><code>..&#x2F;src&#x2F;litegraph.js:302</code></a>
<a href="../files/.._src_litegraph.js.html#l299"><code>..&#x2F;src&#x2F;litegraph.js:299</code></a>
</p>
@@ -196,6 +198,13 @@
</li>
<li class="index-item method">
<a href="#method_attachCanvas">attachCanvas</a>
</li>
<li class="index-item method">
@@ -203,6 +212,20 @@
</li>
<li class="index-item method">
<a href="#method_configure">configure</a>
</li>
<li class="index-item method">
<a href="#method_detachCanvas">detachCanvas</a>
</li>
<li class="index-item method">
@@ -252,6 +275,13 @@
</li>
<li class="index-item method">
<a href="#method_isLive">isLive</a>
</li>
<li class="index-item method">
@@ -304,14 +334,7 @@
</li>
<li class="index-item method">
<a href="#method_stop">stop</a>
</li>
<li class="index-item method">
<a href="#method_unserialize">unserialize</a>
<a href="#method_stop execution">stop execution</a>
@@ -382,7 +405,7 @@
<a href="../files/.._src_litegraph.js.html#l602"><code>..&#x2F;src&#x2F;litegraph.js:602</code></a>
<a href="../files/.._src_litegraph.js.html#l645"><code>..&#x2F;src&#x2F;litegraph.js:645</code></a>
</p>
@@ -426,6 +449,94 @@
</div>
<div id="method_attachCanvas" class="method item">
<h3 class="name"><code>attachCanvas</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>graph_canvas</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>
Defined in
<a href="../files/.._src_litegraph.js.html#l361"><code>..&#x2F;src&#x2F;litegraph.js:361</code></a>
</p>
</div>
<div class="description">
<p>Attach Canvas to this graph</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">graph_canvas</code>
<span class="type">GraphCanvas</span>
<div class="param-description">
</div>
</li>
</ul>
</div>
</div>
@@ -461,7 +572,7 @@
<a href="../files/.._src_litegraph.js.html#l321"><code>..&#x2F;src&#x2F;litegraph.js:321</code></a>
<a href="../files/.._src_litegraph.js.html#l317"><code>..&#x2F;src&#x2F;litegraph.js:317</code></a>
</p>
@@ -481,6 +592,183 @@
</div>
<div id="method_configure" class="method item">
<h3 class="name"><code>configure</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>str</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>
Defined in
<a href="../files/.._src_litegraph.js.html#l920"><code>..&#x2F;src&#x2F;litegraph.js:920</code></a>
</p>
</div>
<div class="description">
<p>Configure a graph from a JSON string</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">str</code>
<span class="type">String</span>
<div class="param-description">
<p>configure a graph from a JSON string</p>
</div>
</li>
</ul>
</div>
</div>
<div id="method_detachCanvas" class="method item">
<h3 class="name"><code>detachCanvas</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>graph_canvas</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>
Defined in
<a href="../files/.._src_litegraph.js.html#l380"><code>..&#x2F;src&#x2F;litegraph.js:380</code></a>
</p>
</div>
<div class="description">
<p>Detach Canvas from this graph</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">graph_canvas</code>
<span class="type">GraphCanvas</span>
<div class="param-description">
</div>
</li>
</ul>
</div>
</div>
@@ -530,7 +818,7 @@
<a href="../files/.._src_litegraph.js.html#l737"><code>..&#x2F;src&#x2F;litegraph.js:737</code></a>
<a href="../files/.._src_litegraph.js.html#l780"><code>..&#x2F;src&#x2F;litegraph.js:780</code></a>
</p>
@@ -637,7 +925,7 @@
<a href="../files/.._src_litegraph.js.html#l721"><code>..&#x2F;src&#x2F;litegraph.js:721</code></a>
<a href="../files/.._src_litegraph.js.html#l764"><code>..&#x2F;src&#x2F;litegraph.js:764</code></a>
</p>
@@ -734,7 +1022,7 @@
<a href="../files/.._src_litegraph.js.html#l575"><code>..&#x2F;src&#x2F;litegraph.js:575</code></a>
<a href="../files/.._src_litegraph.js.html#l605"><code>..&#x2F;src&#x2F;litegraph.js:605</code></a>
</p>
@@ -808,7 +1096,7 @@ if the nodes are using graphical actions</p>
<a href="../files/.._src_litegraph.js.html#l564"><code>..&#x2F;src&#x2F;litegraph.js:564</code></a>
<a href="../files/.._src_litegraph.js.html#l594"><code>..&#x2F;src&#x2F;litegraph.js:594</code></a>
</p>
@@ -887,7 +1175,7 @@ if the nodes are using graphical actions</p>
<a href="../files/.._src_litegraph.js.html#l708"><code>..&#x2F;src&#x2F;litegraph.js:708</code></a>
<a href="../files/.._src_litegraph.js.html#l751"><code>..&#x2F;src&#x2F;litegraph.js:751</code></a>
</p>
@@ -991,7 +1279,7 @@ if the nodes are using graphical actions</p>
<a href="../files/.._src_litegraph.js.html#l753"><code>..&#x2F;src&#x2F;litegraph.js:753</code></a>
<a href="../files/.._src_litegraph.js.html#l796"><code>..&#x2F;src&#x2F;litegraph.js:796</code></a>
</p>
@@ -1120,7 +1408,7 @@ if the nodes are using graphical actions</p>
<a href="../files/.._src_litegraph.js.html#l553"><code>..&#x2F;src&#x2F;litegraph.js:553</code></a>
<a href="../files/.._src_litegraph.js.html#l583"><code>..&#x2F;src&#x2F;litegraph.js:583</code></a>
</p>
@@ -1154,6 +1442,61 @@ if the nodes are using graphical actions</p>
</div>
<div id="method_isLive" class="method item">
<h3 class="name"><code>isLive</code></h3>
<span class="paren">()</span>
<div class="meta">
<p>
Defined in
<a href="../files/.._src_litegraph.js.html#l869"><code>..&#x2F;src&#x2F;litegraph.js:869</code></a>
</p>
</div>
<div class="description">
<p>returns if the graph is in live mode</p>
</div>
</div>
@@ -1199,7 +1542,7 @@ if the nodes are using graphical actions</p>
<a href="../files/.._src_litegraph.js.html#l647"><code>..&#x2F;src&#x2F;litegraph.js:647</code></a>
<a href="../files/.._src_litegraph.js.html#l690"><code>..&#x2F;src&#x2F;litegraph.js:690</code></a>
</p>
@@ -1288,7 +1631,7 @@ if the nodes are using graphical actions</p>
<a href="../files/.._src_litegraph.js.html#l413"><code>..&#x2F;src&#x2F;litegraph.js:413</code></a>
<a href="../files/.._src_litegraph.js.html#l443"><code>..&#x2F;src&#x2F;litegraph.js:443</code></a>
</p>
@@ -1383,7 +1726,7 @@ if the nodes are using graphical actions</p>
<a href="../files/.._src_litegraph.js.html#l587"><code>..&#x2F;src&#x2F;litegraph.js:587</code></a>
<a href="../files/.._src_litegraph.js.html#l617"><code>..&#x2F;src&#x2F;litegraph.js:617</code></a>
</p>
@@ -1455,7 +1798,7 @@ if the nodes are using graphical actions</p>
<span class="returns-inline">
<span class="type">String</span>
<span class="type">Object</span>
</span>
@@ -1482,7 +1825,7 @@ if the nodes are using graphical actions</p>
<a href="../files/.._src_litegraph.js.html#l843"><code>..&#x2F;src&#x2F;litegraph.js:843</code></a>
<a href="../files/.._src_litegraph.js.html#l893"><code>..&#x2F;src&#x2F;litegraph.js:893</code></a>
</p>
@@ -1493,7 +1836,7 @@ if the nodes are using graphical actions</p>
</div>
<div class="description">
<p>Creates a JSON String containing all the info about this graph</p>
<p>Creates a Object containing all the info about this graph, it can be serialized</p>
</div>
@@ -1506,7 +1849,7 @@ if the nodes are using graphical actions</p>
<div class="returns-description">
<span class="type">String</span>:
<span class="type">Object</span>:
<p>value of the node</p>
@@ -1567,7 +1910,7 @@ if the nodes are using graphical actions</p>
<a href="../files/.._src_litegraph.js.html#l774"><code>..&#x2F;src&#x2F;litegraph.js:774</code></a>
<a href="../files/.._src_litegraph.js.html#l817"><code>..&#x2F;src&#x2F;litegraph.js:817</code></a>
</p>
@@ -1677,7 +2020,7 @@ can be easily accesed from the outside of the graph</p>
<a href="../files/.._src_litegraph.js.html#l789"><code>..&#x2F;src&#x2F;litegraph.js:789</code></a>
<a href="../files/.._src_litegraph.js.html#l832"><code>..&#x2F;src&#x2F;litegraph.js:832</code></a>
</p>
@@ -1780,7 +2123,7 @@ can be easily accesed from the outside of the graph</p>
<a href="../files/.._src_litegraph.js.html#l364"><code>..&#x2F;src&#x2F;litegraph.js:364</code></a>
<a href="../files/.._src_litegraph.js.html#l394"><code>..&#x2F;src&#x2F;litegraph.js:394</code></a>
</p>
@@ -1827,8 +2170,8 @@ can be easily accesed from the outside of the graph</p>
</div>
<div id="method_stop" class="method item">
<h3 class="name"><code>stop</code></h3>
<div id="method_stop execution" class="method item">
<h3 class="name"><code>stop execution</code></h3>
<span class="paren">()</span>
@@ -1859,7 +2202,7 @@ can be easily accesed from the outside of the graph</p>
<a href="../files/.._src_litegraph.js.html#l391"><code>..&#x2F;src&#x2F;litegraph.js:391</code></a>
<a href="../files/.._src_litegraph.js.html#l421"><code>..&#x2F;src&#x2F;litegraph.js:421</code></a>
</p>
@@ -1879,95 +2222,6 @@ can be easily accesed from the outside of the graph</p>
</div>
<div id="method_unserialize" class="method item">
<h3 class="name"><code>unserialize</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>str</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>
Defined in
<a href="../files/.._src_litegraph.js.html#l869"><code>..&#x2F;src&#x2F;litegraph.js:869</code></a>
</p>
</div>
<div class="description">
<p>Configure a graph from a JSON string</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">str</code>
<span class="type">String</span>
<div class="param-description">
<p>configure a graph from a JSON string</p>
</div>
</li>
</ul>
</div>
</div>
@@ -2003,7 +2257,7 @@ can be easily accesed from the outside of the graph</p>
<a href="../files/.._src_litegraph.js.html#l457"><code>..&#x2F;src&#x2F;litegraph.js:457</code></a>
<a href="../files/.._src_litegraph.js.html#l487"><code>..&#x2F;src&#x2F;litegraph.js:487</code></a>
</p>

View File

@@ -0,0 +1,277 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>LGraphCanvas</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
<script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="doc">
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="../assets/css/logo.png" title=""></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: </em>
</div>
</div>
<div id="bd" class="yui3-g">
<div class="yui3-u-1-4">
<div id="docs-sidebar" class="sidebar apidocs">
<div id="api-list">
<h2 class="off-left">APIs</h2>
<div id="api-tabview" class="tabview">
<ul class="tabs">
<li><a href="#api-classes">Classes</a></li>
<li><a href="#api-modules">Modules</a></li>
</ul>
<div id="api-tabview-filter">
<input type="search" id="api-filter" placeholder="Type to filter APIs">
</div>
<div id="api-tabview-panel">
<ul id="api-classes" class="apis classes">
<li><a href="../classes/LGraph.html">LGraph</a></li>
<li><a href="../classes/LGraphCanvas.html">LGraphCanvas</a></li>
<li><a href="../classes/LGraphNode.html">LGraphNode</a></li>
<li><a href="../classes/LiteGraph.html">LiteGraph</a></li>
</ul>
<ul id="api-modules" class="apis modules">
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="yui3-u-3-4">
<div id="api-options">
Show:
<label for="api-show-inherited">
<input type="checkbox" id="api-show-inherited" checked>
Inherited
</label>
<label for="api-show-protected">
<input type="checkbox" id="api-show-protected">
Protected
</label>
<label for="api-show-private">
<input type="checkbox" id="api-show-private">
Private
</label>
<label for="api-show-deprecated">
<input type="checkbox" id="api-show-deprecated">
Deprecated
</label>
</div>
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1>LGraphCanvas Class</h1>
<div class="box meta">
<div class="foundat">
Defined in: <a href="../files/.._src_litegraph.js.html#l1794"><code>..&#x2F;src&#x2F;litegraph.js:1794</code></a>
</div>
</div>
<div class="box intro">
<p>The Global Scope. It contains all the registered node classes.</p>
</div>
<div class="constructor">
<h2>Constructor</h2>
<div id="method_LGraphCanvas" class="method item">
<h3 class="name"><code>LGraphCanvas</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>canvas</code>
</li>
<li class="arg">
<code>graph</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>
Defined in
<a href="../files/.._src_litegraph.js.html#l1794"><code>..&#x2F;src&#x2F;litegraph.js:1794</code></a>
</p>
</div>
<div class="description">
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">canvas</code>
<span class="type">HTMLCanvas</span>
<div class="param-description">
<p>the canvas where you want to render (it accepts a selector in string format)</p>
</div>
</li>
<li class="param">
<code class="param-name">graph</code>
<span class="type"><a href="../classes/LGraph.html" class="crosslink">LGraph</a></span>
<div class="param-description">
</div>
</li>
</ul>
</div>
</div>
</div>
<div id="classdocs" class="tabview">
<ul class="api-class-tabs">
<li class="api-class-tab index"><a href="#index">Index</a></li>
</ul>
<div>
<div id="index" class="api-class-tabpanel index">
<h2 class="off-left">Item Index</h2>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -43,6 +43,8 @@
<li><a href="../classes/LGraph.html">LGraph</a></li>
<li><a href="../classes/LGraphCanvas.html">LGraphCanvas</a></li>
<li><a href="../classes/LGraphNode.html">LGraphNode</a></li>
<li><a href="../classes/LiteGraph.html">LiteGraph</a></li>

View File

@@ -7,7 +7,8 @@
"classes": {
"LiteGraph": 1,
"LGraph": 1,
"LGraphNode": 1
"LGraphNode": 1,
"LGraphCanvas": 1
},
"fors": {},
"namespaces": {}
@@ -37,7 +38,7 @@
"plugin_for": [],
"extension_for": [],
"file": "../src/litegraph.js",
"line": 302,
"line": 299,
"description": "LGraph is the class that contain a full graph. We instantiate one and add nodes to it, and then we can run the execution loop.",
"is_constructor": 1
},
@@ -50,7 +51,7 @@
"plugin_for": [],
"extension_for": [],
"file": "../src/litegraph.js",
"line": 947,
"line": 997,
"description": "Base Class for all the node type classes",
"params": [
{
@@ -59,6 +60,31 @@
"type": "String"
}
]
},
"LGraphCanvas": {
"name": "LGraphCanvas",
"shortname": "LGraphCanvas",
"classitems": [],
"plugins": [],
"extensions": [],
"plugin_for": [],
"extension_for": [],
"file": "../src/litegraph.js",
"line": 1794,
"description": "The Global Scope. It contains all the registered node classes.",
"is_constructor": 1,
"params": [
{
"name": "canvas",
"description": "the canvas where you want to render (it accepts a selector in string format)",
"type": "HTMLCanvas"
},
{
"name": "graph",
"description": "",
"type": "LGraph"
}
]
}
},
"classitems": [
@@ -159,7 +185,7 @@
},
{
"file": "../src/litegraph.js",
"line": 321,
"line": 317,
"description": "Removes all nodes from this graph",
"itemtype": "method",
"name": "clear",
@@ -167,7 +193,37 @@
},
{
"file": "../src/litegraph.js",
"line": 364,
"line": 361,
"description": "Attach Canvas to this graph",
"itemtype": "method",
"name": "attachCanvas",
"params": [
{
"name": "graph_canvas",
"description": "",
"type": "GraphCanvas"
}
],
"class": "LGraph"
},
{
"file": "../src/litegraph.js",
"line": 380,
"description": "Detach Canvas from this graph",
"itemtype": "method",
"name": "detachCanvas",
"params": [
{
"name": "graph_canvas",
"description": "",
"type": "GraphCanvas"
}
],
"class": "LGraph"
},
{
"file": "../src/litegraph.js",
"line": 394,
"description": "Starts running this graph every interval milliseconds.",
"itemtype": "method",
"name": "start",
@@ -182,15 +238,15 @@
},
{
"file": "../src/litegraph.js",
"line": 391,
"line": 421,
"description": "Stops the execution loop of the graph",
"itemtype": "method",
"name": "stop",
"name": "stop execution",
"class": "LGraph"
},
{
"file": "../src/litegraph.js",
"line": 413,
"line": 443,
"description": "Run N steps (cycles) of the graph",
"itemtype": "method",
"name": "runStep",
@@ -205,7 +261,7 @@
},
{
"file": "../src/litegraph.js",
"line": 457,
"line": 487,
"description": "Updates the graph execution order according to relevance of the nodes (nodes with only outputs have more relevance than\nnodes with only inputs.",
"itemtype": "method",
"name": "updateExecutionOrder",
@@ -213,7 +269,7 @@
},
{
"file": "../src/litegraph.js",
"line": 553,
"line": 583,
"description": "Returns the amount of time the graph has been running in milliseconds",
"itemtype": "method",
"name": "getTime",
@@ -225,7 +281,7 @@
},
{
"file": "../src/litegraph.js",
"line": 564,
"line": 594,
"description": "Returns the amount of time accumulated using the fixedtime_lapse var. This is used in context where the time increments should be constant",
"itemtype": "method",
"name": "getFixedTime",
@@ -237,7 +293,7 @@
},
{
"file": "../src/litegraph.js",
"line": 575,
"line": 605,
"description": "Returns the amount of time it took to compute the latest iteration. Take into account that this number could be not correct\nif the nodes are using graphical actions",
"itemtype": "method",
"name": "getElapsedTime",
@@ -249,7 +305,7 @@
},
{
"file": "../src/litegraph.js",
"line": 587,
"line": 617,
"description": "Sends an event to all the nodes, useful to trigger stuff",
"itemtype": "method",
"name": "sendEventToAllNodes",
@@ -269,7 +325,7 @@
},
{
"file": "../src/litegraph.js",
"line": 602,
"line": 645,
"description": "Adds a new node instasnce to this graph",
"itemtype": "method",
"name": "add",
@@ -284,7 +340,7 @@
},
{
"file": "../src/litegraph.js",
"line": 647,
"line": 690,
"description": "Removes a node from the graph",
"itemtype": "method",
"name": "remove",
@@ -299,7 +355,7 @@
},
{
"file": "../src/litegraph.js",
"line": 708,
"line": 751,
"description": "Returns a node by its id.",
"itemtype": "method",
"name": "getNodeById",
@@ -314,7 +370,7 @@
},
{
"file": "../src/litegraph.js",
"line": 721,
"line": 764,
"description": "Returns a list of nodes that matches a type",
"itemtype": "method",
"name": "findNodesByType",
@@ -333,7 +389,7 @@
},
{
"file": "../src/litegraph.js",
"line": 737,
"line": 780,
"description": "Returns a list of nodes that matches a name",
"itemtype": "method",
"name": "findNodesByName",
@@ -352,7 +408,7 @@
},
{
"file": "../src/litegraph.js",
"line": 753,
"line": 796,
"description": "Returns the top-most node in this position of the canvas",
"itemtype": "method",
"name": "getNodeOnPos",
@@ -381,7 +437,7 @@
},
{
"file": "../src/litegraph.js",
"line": 774,
"line": 817,
"description": "Assigns a value to all the nodes that matches this name. This is used to create global variables of the node that\ncan be easily accesed from the outside of the graph",
"itemtype": "method",
"name": "setInputData",
@@ -401,7 +457,7 @@
},
{
"file": "../src/litegraph.js",
"line": 789,
"line": 832,
"description": "Returns the value of the first node with this name. This is used to access global variables of the graph from the outside",
"itemtype": "method",
"name": "setInputData",
@@ -420,22 +476,30 @@
},
{
"file": "../src/litegraph.js",
"line": 843,
"description": "Creates a JSON String containing all the info about this graph",
"line": 869,
"description": "returns if the graph is in live mode",
"itemtype": "method",
"name": "isLive",
"class": "LGraph"
},
{
"file": "../src/litegraph.js",
"line": 893,
"description": "Creates a Object containing all the info about this graph, it can be serialized",
"itemtype": "method",
"name": "serialize",
"return": {
"description": "value of the node",
"type": "String"
"type": "Object"
},
"class": "LGraph"
},
{
"file": "../src/litegraph.js",
"line": 869,
"line": 920,
"description": "Configure a graph from a JSON string",
"itemtype": "method",
"name": "unserialize",
"name": "configure",
"params": [
{
"name": "str",
@@ -444,6 +508,441 @@
}
],
"class": "LGraph"
},
{
"file": "../src/litegraph.js",
"line": 1026,
"description": "configure a node from an object",
"itemtype": "method",
"name": "configure",
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1073,
"description": "serialize the content",
"itemtype": "method",
"name": "serialize",
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1132,
"description": "serialize and stringify",
"itemtype": "method",
"name": "toString",
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1145,
"description": "sets the output data",
"itemtype": "method",
"name": "setOutputData",
"params": [
{
"name": "slot",
"description": "",
"type": "Number"
},
{
"name": "data",
"description": "",
"type": "*"
}
],
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1161,
"description": "retrieves the input data from one slot",
"itemtype": "method",
"name": "getInputData",
"params": [
{
"name": "slot",
"description": "",
"type": "Number"
}
],
"return": {
"description": "data",
"type": "*"
},
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1175,
"description": "tells you if there is a connection in one input slot",
"itemtype": "method",
"name": "isInputConnected",
"params": [
{
"name": "slot",
"description": "",
"type": "Number"
}
],
"return": {
"description": "",
"type": "Boolean"
},
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1187,
"description": "tells you info about an input connection (which node, type, etc)",
"itemtype": "method",
"name": "getInputInfo",
"params": [
{
"name": "slot",
"description": "",
"type": "Number"
}
],
"return": {
"description": "",
"type": "Object"
},
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1202,
"description": "tells you info about an output connection (which node, type, etc)",
"itemtype": "method",
"name": "getOutputInfo",
"params": [
{
"name": "slot",
"description": "",
"type": "Number"
}
],
"return": {
"description": "",
"type": "Object"
},
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1217,
"description": "tells you if there is a connection in one output slot",
"itemtype": "method",
"name": "isOutputConnected",
"params": [
{
"name": "slot",
"description": "",
"type": "Number"
}
],
"return": {
"description": "",
"type": "Boolean"
},
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1229,
"description": "retrieves all the nodes connected to this output slot",
"itemtype": "method",
"name": "getOutputNodes",
"params": [
{
"name": "slot",
"description": "",
"type": "Number"
}
],
"return": {
"description": "",
"type": "Array"
},
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1258,
"description": "add a new output slot to use in this node",
"itemtype": "method",
"name": "addOutput",
"params": [
{
"name": "name",
"description": "",
"type": "String"
},
{
"name": "type",
"description": "string defining the output type (\"vec3\",\"number\",...)",
"type": "String"
},
{
"name": "extra_info",
"description": "this can be used to have special properties of an output (special color, position, etc)",
"type": "Object"
}
],
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1277,
"description": "remove an existing output slot",
"itemtype": "method",
"name": "removeOutput",
"params": [
{
"name": "slot",
"description": "",
"type": "Number"
}
],
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1289,
"description": "add a new input slot to use in this node",
"itemtype": "method",
"name": "addInput",
"params": [
{
"name": "name",
"description": "",
"type": "String"
},
{
"name": "type",
"description": "string defining the input type (\"vec3\",\"number\",...)",
"type": "String"
},
{
"name": "extra_info",
"description": "this can be used to have special properties of an input (special color, position, etc)",
"type": "Object"
}
],
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1308,
"description": "remove an existing input slot",
"itemtype": "method",
"name": "removeInput",
"params": [
{
"name": "slot",
"description": "",
"type": "Number"
}
],
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1320,
"description": "add an special connection to this node (used for special kinds of graphs)",
"itemtype": "method",
"name": "addConnection",
"params": [
{
"name": "name",
"description": "",
"type": "String"
},
{
"name": "type",
"description": "string defining the input type (\"vec3\",\"number\",...)",
"type": "String"
},
{
"name": "pos",
"description": "position of the connection inside the node",
"type": "[x,y]"
},
{
"name": "direction",
"description": "if is input or output",
"type": "String"
}
],
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1333,
"description": "computes the size of a node according to its inputs and output slots",
"itemtype": "method",
"name": "computeSize",
"params": [
{
"name": "minHeight",
"description": "",
"type": "Number"
}
],
"return": {
"description": "the total size",
"type": "Number"
},
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1351,
"description": "returns the bounding of the object, used for rendering purposes",
"itemtype": "method",
"name": "getBounding",
"return": {
"description": "the total size",
"type": "Float32Array[4]"
},
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1361,
"description": "checks if a point is inside the shape of a node",
"itemtype": "method",
"name": "isPointInsideNode",
"params": [
{
"name": "x",
"description": "",
"type": "Number"
},
{
"name": "y",
"description": "",
"type": "Number"
}
],
"return": {
"description": "",
"type": "Boolean"
},
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1401,
"description": "connect this node output to the input of another node",
"itemtype": "method",
"name": "connect",
"params": [
{
"name": "slot",
"description": "(could be the number of the slot or the string with the name of the slot)",
"type": "Number_or_string"
},
{
"name": "node",
"description": "the target node",
"type": "LGraphNode"
},
{
"name": "target_slot",
"description": "the input slot of the target node (could be the number of the slot or the string with the name of the slot)",
"type": "Number_or_string"
}
],
"return": {
"description": "if it was connected succesfully",
"type": "Boolean"
},
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1482,
"description": "disconnect one output to an specific node",
"itemtype": "method",
"name": "disconnectOutput",
"params": [
{
"name": "slot",
"description": "(could be the number of the slot or the string with the name of the slot)",
"type": "Number_or_string"
},
{
"name": "target_node",
"description": "the target node to which this slot is connected [Optional, if not target_node is specified all nodes will be disconnected]",
"type": "LGraphNode"
}
],
"return": {
"description": "if it was disconnected succesfully",
"type": "Boolean"
},
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1545,
"description": "disconnect one input",
"itemtype": "method",
"name": "disconnectInput",
"params": [
{
"name": "slot",
"description": "(could be the number of the slot or the string with the name of the slot)",
"type": "Number_or_string"
}
],
"return": {
"description": "if it was disconnected succesfully",
"type": "Boolean"
},
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1599,
"description": "returns the center of a connection point in canvas coords",
"itemtype": "method",
"name": "getConnectionPos",
"params": [
{
"name": "is_input",
"description": "true if if a input slot, false if it is an output",
"type": "Boolean"
},
{
"name": "slot",
"description": "(could be the number of the slot or the string with the name of the slot)",
"type": "Number_or_string"
}
],
"return": {
"description": "the position",
"type": "[x,y]"
},
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1756,
"description": "Collapse the node to make it smaller on the canvas",
"itemtype": "method",
"name": "collapse",
"class": "LGraphNode"
},
{
"file": "../src/litegraph.js",
"line": 1769,
"description": "Forces the node to do not move or realign on Z",
"itemtype": "method",
"name": "pin",
"class": "LGraphNode"
}
],
"warnings": []

File diff suppressed because it is too large Load Diff

View File

@@ -43,6 +43,8 @@
<li><a href="./classes/LGraph.html">LGraph</a></li>
<li><a href="./classes/LGraphCanvas.html">LGraphCanvas</a></li>
<li><a href="./classes/LGraphNode.html">LGraphNode</a></li>
<li><a href="./classes/LiteGraph.html">LiteGraph</a></li>