mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
fixes
This commit is contained in:
@@ -7087,7 +7087,7 @@ if(typeof(LiteGraph) != "undefined")
|
||||
return gl.textures;
|
||||
}
|
||||
|
||||
//process the loading of a texture (overwrite if you have a Resources Manager)
|
||||
//process the loading of a texture (overwrite it if you have a Resources Manager)
|
||||
LGraphTexture.loadTexture = function(name, options)
|
||||
{
|
||||
options = options || {};
|
||||
@@ -7930,7 +7930,7 @@ if(typeof(LiteGraph) != "undefined")
|
||||
this.addInput("LUT","Texture");
|
||||
this.addInput("Intensity","number");
|
||||
this.addOutput("","Texture");
|
||||
this.properties = { intensity: 1, precision: LGraphTexture.DEFAULT };
|
||||
this.properties = { intensity: 1, precision: LGraphTexture.DEFAULT, texture: null };
|
||||
|
||||
if(!LGraphTextureLUT._shader)
|
||||
LGraphTextureLUT._shader = new GL.Shader( Shader.SCREEN_VERTEX_SHADER, LGraphTextureLUT.pixel_shader );
|
||||
@@ -7942,6 +7942,7 @@ if(typeof(LiteGraph) != "undefined")
|
||||
|
||||
LGraphTextureLUT.title = "LUT";
|
||||
LGraphTextureLUT.desc = "Apply LUT to Texture";
|
||||
LGraphTextureLUT.widgets_info = {"texture": { widget:"texture"} };
|
||||
|
||||
LGraphTextureLUT.prototype.onExecute = function()
|
||||
{
|
||||
@@ -7956,11 +7957,16 @@ if(typeof(LiteGraph) != "undefined")
|
||||
if(!tex) return;
|
||||
|
||||
var lut_tex = this.getInputData(1);
|
||||
|
||||
if(!lut_tex)
|
||||
lut_tex = LGraphTexture.getTexture( this.properties.texture );
|
||||
|
||||
if(!lut_tex)
|
||||
{
|
||||
this.setOutputData(0,tex);
|
||||
return;
|
||||
}
|
||||
|
||||
lut_tex.bind(0);
|
||||
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR );
|
||||
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE );
|
||||
|
||||
6
build/litegraph.min.js
vendored
6
build/litegraph.min.js
vendored
@@ -232,9 +232,9 @@ LGraphTextureAverage.desc="Compute the total average of a texture and stores it
|
||||
c=this.properties.low_precision?gl.UNSIGNED_BYTE:a.type;b&&b.type==c||(this._temp_texture=new GL.Texture(1,1,{type:c,format:gl.RGBA,filter:gl.NEAREST}));var d=LGraphTextureAverage._shader;this._temp_texture.drawTo(function(){a.toViewport(d,{u_texture:0})});this.setOutputData(0,this._temp_texture)}};LGraphTextureAverage.pixel_shader="precision highp float;\n\t\t\tprecision highp float;\n\t\t\tuniform mat4 u_samples_a;\n\t\t\tuniform mat4 u_samples_b;\n\t\t\tuniform sampler2D u_texture;\n\t\t\tvarying vec2 v_coord;\n\t\t\t\n\t\t\tvoid main() {\n\t\t\t\tvec4 color = vec4(0.0);\n\t\t\t\tfor(int i = 0; i < 4; ++i)\n\t\t\t\t\tfor(int j = 0; j < 4; ++j)\n\t\t\t\t\t{\n\t\t\t\t\t\tcolor += texture2D(u_texture, vec2( u_samples_a[i][j], u_samples_b[i][j] ) );\n\t\t\t\t\t\tcolor += texture2D(u_texture, vec2( 1.0 - u_samples_a[i][j], u_samples_b[i][j] ) );\n\t\t\t\t\t}\n\t\t\t gl_FragColor = color * 0.03125;\n\t\t\t}\n\t\t\t";
|
||||
LiteGraph.registerNodeType("texture/average",LGraphTextureAverage);var LGraphImageToTexture=function(){this.addInput("Image","image");this.addOutput("","Texture");this.properties={}};LGraphImageToTexture.title="Image to Texture";LGraphImageToTexture.desc="Uploads an image to the GPU";LGraphImageToTexture.prototype.onExecute=function(){var a=this.getInputData(0);if(a){var b=a.videoWidth||a.width,c=a.videoHeight||a.height;if(a.gltexture)this.setOutputData(0,a.gltexture);else{var d=this._temp_texture;
|
||||
d&&d.width==b&&d.height==c||(this._temp_texture=new GL.Texture(b,c,{format:gl.RGBA,filter:gl.LINEAR}));try{this._temp_texture.uploadImage(a)}catch(e){console.error("image comes from an unsafe location, cannot be uploaded to webgl");return}this.setOutputData(0,this._temp_texture)}}};LiteGraph.registerNodeType("texture/imageToTexture",LGraphImageToTexture);var LGraphTextureLUT=function(){this.addInput("Texture","Texture");this.addInput("LUT","Texture");this.addInput("Intensity","number");this.addOutput("",
|
||||
"Texture");this.properties={intensity:1,precision:LGraphTexture.DEFAULT};LGraphTextureLUT._shader||(LGraphTextureLUT._shader=new GL.Shader(Shader.SCREEN_VERTEX_SHADER,LGraphTextureLUT.pixel_shader))};LGraphTextureLUT.widgets_info={precision:{widget:"combo",values:LGraphTexture.MODE_VALUES}};LGraphTextureLUT.title="LUT";LGraphTextureLUT.desc="Apply LUT to Texture";LGraphTextureLUT.prototype.onExecute=function(){var a=this.getInputData(0);if(this.properties.precision===LGraphTexture.PASS_THROUGH)this.setOutputData(0,
|
||||
a);else if(a){var b=this.getInputData(1);if(b){b.bind(0);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.LINEAR);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);gl.bindTexture(gl.TEXTURE_2D,null);var c=this.properties.intensity;this.isInputConnected(2)&&(this.properties.intensity=c=this.getInputData(2));this._tex=LGraphTexture.getTargetTexture(a,this._tex,this.properties.precision);this._tex.drawTo(function(){b.bind(1);
|
||||
a.toViewport(LGraphTextureLUT._shader,{u_texture:0,u_textureB:1,u_amount:c})});this.setOutputData(0,this._tex)}else this.setOutputData(0,a)}};LGraphTextureLUT.pixel_shader="precision highp float;\n\t\t\tprecision highp float;\n\t\t\tvarying vec2 v_coord;\n\t\t\tuniform sampler2D u_texture;\n\t\t\tuniform sampler2D u_textureB;\n\t\t\tuniform float u_amount;\n\t\t\t\n\t\t\tvoid main() {\n\t\t\t\t lowp vec4 textureColor = clamp( texture2D(u_texture, v_coord), vec4(0.0), vec4(1.0) );\n\t\t\t\t mediump float blueColor = textureColor.b * 63.0;\n\t\t\t\t mediump vec2 quad1;\n\t\t\t\t quad1.y = floor(floor(blueColor) / 8.0);\n\t\t\t\t quad1.x = floor(blueColor) - (quad1.y * 8.0);\n\t\t\t\t mediump vec2 quad2;\n\t\t\t\t quad2.y = floor(ceil(blueColor) / 8.0);\n\t\t\t\t quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n\t\t\t\t highp vec2 texPos1;\n\t\t\t\t texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.r);\n\t\t\t\t texPos1.y = 1.0 - ((quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.g));\n\t\t\t\t highp vec2 texPos2;\n\t\t\t\t texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.r);\n\t\t\t\t texPos2.y = 1.0 - ((quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.g));\n\t\t\t\t lowp vec4 newColor1 = texture2D(u_textureB, texPos1);\n\t\t\t\t lowp vec4 newColor2 = texture2D(u_textureB, texPos2);\n\t\t\t\t lowp vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n\t\t\t\t gl_FragColor = vec4( mix( textureColor.rgb, newColor.rgb, u_amount), textureColor.w);\n\t\t\t}\n\t\t\t";
|
||||
"Texture");this.properties={intensity:1,precision:LGraphTexture.DEFAULT,texture:null};LGraphTextureLUT._shader||(LGraphTextureLUT._shader=new GL.Shader(Shader.SCREEN_VERTEX_SHADER,LGraphTextureLUT.pixel_shader))};LGraphTextureLUT.widgets_info={precision:{widget:"combo",values:LGraphTexture.MODE_VALUES}};LGraphTextureLUT.title="LUT";LGraphTextureLUT.desc="Apply LUT to Texture";LGraphTextureLUT.widgets_info={texture:{widget:"texture"}};LGraphTextureLUT.prototype.onExecute=function(){var a=this.getInputData(0);
|
||||
if(this.properties.precision===LGraphTexture.PASS_THROUGH)this.setOutputData(0,a);else if(a){var b=this.getInputData(1);b||(b=LGraphTexture.getTexture(this.properties.texture));if(b){b.bind(0);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.LINEAR);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);gl.bindTexture(gl.TEXTURE_2D,null);var c=this.properties.intensity;this.isInputConnected(2)&&(this.properties.intensity=
|
||||
c=this.getInputData(2));this._tex=LGraphTexture.getTargetTexture(a,this._tex,this.properties.precision);this._tex.drawTo(function(){b.bind(1);a.toViewport(LGraphTextureLUT._shader,{u_texture:0,u_textureB:1,u_amount:c})});this.setOutputData(0,this._tex)}else this.setOutputData(0,a)}};LGraphTextureLUT.pixel_shader="precision highp float;\n\t\t\tprecision highp float;\n\t\t\tvarying vec2 v_coord;\n\t\t\tuniform sampler2D u_texture;\n\t\t\tuniform sampler2D u_textureB;\n\t\t\tuniform float u_amount;\n\t\t\t\n\t\t\tvoid main() {\n\t\t\t\t lowp vec4 textureColor = clamp( texture2D(u_texture, v_coord), vec4(0.0), vec4(1.0) );\n\t\t\t\t mediump float blueColor = textureColor.b * 63.0;\n\t\t\t\t mediump vec2 quad1;\n\t\t\t\t quad1.y = floor(floor(blueColor) / 8.0);\n\t\t\t\t quad1.x = floor(blueColor) - (quad1.y * 8.0);\n\t\t\t\t mediump vec2 quad2;\n\t\t\t\t quad2.y = floor(ceil(blueColor) / 8.0);\n\t\t\t\t quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n\t\t\t\t highp vec2 texPos1;\n\t\t\t\t texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.r);\n\t\t\t\t texPos1.y = 1.0 - ((quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.g));\n\t\t\t\t highp vec2 texPos2;\n\t\t\t\t texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.r);\n\t\t\t\t texPos2.y = 1.0 - ((quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.g));\n\t\t\t\t lowp vec4 newColor1 = texture2D(u_textureB, texPos1);\n\t\t\t\t lowp vec4 newColor2 = texture2D(u_textureB, texPos2);\n\t\t\t\t lowp vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n\t\t\t\t gl_FragColor = vec4( mix( textureColor.rgb, newColor.rgb, u_amount), textureColor.w);\n\t\t\t}\n\t\t\t";
|
||||
LiteGraph.registerNodeType("texture/LUT",LGraphTextureLUT);var LGraphTextureChannels=function(){this.addInput("Texture","Texture");this.addOutput("R","Texture");this.addOutput("G","Texture");this.addOutput("B","Texture");this.addOutput("A","Texture");this.properties={};LGraphTextureChannels._shader||(LGraphTextureChannels._shader=new GL.Shader(Shader.SCREEN_VERTEX_SHADER,LGraphTextureChannels.pixel_shader))};LGraphTextureChannels.title="Texture to Channels";LGraphTextureChannels.desc="Split texture channels";
|
||||
LGraphTextureChannels.prototype.onExecute=function(){var a=this.getInputData(0);if(a){this._channels||(this._channels=Array(4));for(var b=0,c=0;4>c;c++)this.isOutputConnected(c)?(this._channels[c]&&this._channels[c].width==a.width&&this._channels[c].height==a.height&&this._channels[c].type==a.type||(this._channels[c]=new GL.Texture(a.width,a.height,{type:a.type,format:gl.RGBA,filter:gl.LINEAR})),b++):this._channels[c]=null;if(b){gl.disable(gl.BLEND);gl.disable(gl.DEPTH_TEST);for(var d=Mesh.getScreenQuad(),
|
||||
e=LGraphTextureChannels._shader,f=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],c=0;4>c;c++)this._channels[c]&&(this._channels[c].drawTo(function(){a.bind(0);e.uniforms({u_texture:0,u_mask:f[c]}).draw(d)}),this.setOutputData(c,this._channels[c]))}}};LGraphTextureChannels.pixel_shader="precision highp float;\n\t\t\tprecision highp float;\n\t\t\tvarying vec2 v_coord;\n\t\t\tuniform sampler2D u_texture;\n\t\t\tuniform vec4 u_mask;\n\t\t\t\n\t\t\tvoid main() {\n\t\t\t gl_FragColor = vec4( vec3( length( texture2D(u_texture, v_coord) * u_mask )), 1.0 );\n\t\t\t}\n\t\t\t";
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/.._src_litegraph.js.html#l231"><code>../src/litegraph.js:231</code></a>
|
||||
Defined in: <a href="../files/.._src_litegraph.js.html#l234"><code>../src/litegraph.js:234</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l231"><code>../src/litegraph.js:231</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l234"><code>../src/litegraph.js:234</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -226,6 +226,13 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_findNodesByClass">findNodesByClass</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
@@ -405,7 +412,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l593"><code>../src/litegraph.js:593</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l596"><code>../src/litegraph.js:596</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -494,7 +501,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l300"><code>../src/litegraph.js:300</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l303"><code>../src/litegraph.js:303</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -572,7 +579,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l255"><code>../src/litegraph.js:255</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l258"><code>../src/litegraph.js:258</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -637,7 +644,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1058"><code>../src/litegraph.js:1058</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1076"><code>../src/litegraph.js:1076</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -726,7 +733,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l319"><code>../src/litegraph.js:319</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l322"><code>../src/litegraph.js:322</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -769,6 +776,113 @@
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_findNodesByClass" class="method item">
|
||||
<h3 class="name"><code>findNodesByClass</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>classObject</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<span class="returns-inline">
|
||||
<span class="type">Array</span>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l723"><code>../src/litegraph.js:723</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Returns a list of nodes that matches a class</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">classObject</code>
|
||||
<span class="type">Class</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the class itself (not an string)</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="returns">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<div class="returns-description">
|
||||
|
||||
|
||||
<span class="type">Array</span>:
|
||||
|
||||
<p>a list with all the nodes of this type</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -818,7 +932,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l737"><code>../src/litegraph.js:737</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l755"><code>../src/litegraph.js:755</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -925,7 +1039,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l721"><code>../src/litegraph.js:721</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l739"><code>../src/litegraph.js:739</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1022,7 +1136,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l546"><code>../src/litegraph.js:546</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l549"><code>../src/litegraph.js:549</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1096,7 +1210,7 @@ if the nodes are using graphical actions</p>
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l535"><code>../src/litegraph.js:535</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l538"><code>../src/litegraph.js:538</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1175,7 +1289,7 @@ if the nodes are using graphical actions</p>
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l708"><code>../src/litegraph.js:708</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l711"><code>../src/litegraph.js:711</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1279,7 +1393,7 @@ if the nodes are using graphical actions</p>
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l753"><code>../src/litegraph.js:753</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l771"><code>../src/litegraph.js:771</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1408,7 +1522,7 @@ if the nodes are using graphical actions</p>
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l524"><code>../src/litegraph.js:524</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l527"><code>../src/litegraph.js:527</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1477,7 +1591,7 @@ if the nodes are using graphical actions</p>
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l992"><code>../src/litegraph.js:992</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1010"><code>../src/litegraph.js:1010</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1542,7 +1656,7 @@ if the nodes are using graphical actions</p>
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l642"><code>../src/litegraph.js:642</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l645"><code>../src/litegraph.js:645</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1631,7 +1745,7 @@ if the nodes are using graphical actions</p>
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l382"><code>../src/litegraph.js:382</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l385"><code>../src/litegraph.js:385</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1726,7 +1840,7 @@ if the nodes are using graphical actions</p>
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l558"><code>../src/litegraph.js:558</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l561"><code>../src/litegraph.js:561</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1825,7 +1939,7 @@ if the nodes are using graphical actions</p>
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1025"><code>../src/litegraph.js:1025</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1043"><code>../src/litegraph.js:1043</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1910,7 +2024,7 @@ if the nodes are using graphical actions</p>
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l940"><code>../src/litegraph.js:940</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l958"><code>../src/litegraph.js:958</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2020,7 +2134,7 @@ can be easily accesed from the outside of the graph</p>
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l955"><code>../src/litegraph.js:955</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l973"><code>../src/litegraph.js:973</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2123,7 +2237,7 @@ can be easily accesed from the outside of the graph</p>
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l333"><code>../src/litegraph.js:333</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l336"><code>../src/litegraph.js:336</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2202,7 +2316,7 @@ can be easily accesed from the outside of the graph</p>
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l360"><code>../src/litegraph.js:360</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l363"><code>../src/litegraph.js:363</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2257,7 +2371,7 @@ can be easily accesed from the outside of the graph</p>
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l426"><code>../src/litegraph.js:426</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l429"><code>../src/litegraph.js:429</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/.._src_litegraph.js.html#l2374"><code>../src/litegraph.js:2374</code></a>
|
||||
Defined in: <a href="../files/.._src_litegraph.js.html#l2397"><code>../src/litegraph.js:2397</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l2374"><code>../src/litegraph.js:2374</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l2397"><code>../src/litegraph.js:2397</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -353,7 +353,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l2052"><code>../src/litegraph.js:2052</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l2075"><code>../src/litegraph.js:2075</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -418,7 +418,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l2161"><code>../src/litegraph.js:2161</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l2184"><code>../src/litegraph.js:2184</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -501,7 +501,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l2390"><code>../src/litegraph.js:2390</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l2413"><code>../src/litegraph.js:2413</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -580,7 +580,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l2134"><code>../src/litegraph.js:2134</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l2157"><code>../src/litegraph.js:2157</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -668,7 +668,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l2176"><code>../src/litegraph.js:2176</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l2199"><code>../src/litegraph.js:2199</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -757,7 +757,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l2106"><code>../src/litegraph.js:2106</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l2129"><code>../src/litegraph.js:2129</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -835,7 +835,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l2402"><code>../src/litegraph.js:2402</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l2425"><code>../src/litegraph.js:2425</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -890,7 +890,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l2425"><code>../src/litegraph.js:2425</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l2448"><code>../src/litegraph.js:2448</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/.._src_litegraph.js.html#l1137"><code>../src/litegraph.js:1137</code></a>
|
||||
Defined in: <a href="../files/.._src_litegraph.js.html#l1155"><code>../src/litegraph.js:1155</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -415,7 +415,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1546"><code>../src/litegraph.js:1546</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1569"><code>../src/litegraph.js:1569</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -563,7 +563,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1486"><code>../src/litegraph.js:1486</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1508"><code>../src/litegraph.js:1508</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -608,7 +608,7 @@
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>string defining the input type ("vec3","number",...)</p>
|
||||
<p>string defining the input type ("vec3","number",...), it its a generic one use 0</p>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -683,7 +683,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1507"><code>../src/litegraph.js:1507</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1530"><code>../src/litegraph.js:1530</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -784,7 +784,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1426"><code>../src/litegraph.js:1426</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1448"><code>../src/litegraph.js:1448</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -845,7 +845,7 @@
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>this can be used to have special properties of an output (special color, position, etc)</p>
|
||||
<p>this can be used to have special properties of an output (label, special color, position, etc)</p>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -904,7 +904,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1447"><code>../src/litegraph.js:1447</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1469"><code>../src/litegraph.js:1469</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -983,7 +983,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1978"><code>../src/litegraph.js:1978</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l2001"><code>../src/litegraph.js:2001</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1052,7 +1052,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1559"><code>../src/litegraph.js:1559</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1582"><code>../src/litegraph.js:1582</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1144,7 +1144,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1172"><code>../src/litegraph.js:1172</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1190"><code>../src/litegraph.js:1190</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1225,7 +1225,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1639"><code>../src/litegraph.js:1639</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1662"><code>../src/litegraph.js:1662</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1364,7 +1364,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1789"><code>../src/litegraph.js:1789</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1812"><code>../src/litegraph.js:1812</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1477,7 +1477,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1722"><code>../src/litegraph.js:1722</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1745"><code>../src/litegraph.js:1745</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1600,7 +1600,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1609"><code>../src/litegraph.js:1609</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1632"><code>../src/litegraph.js:1632</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1707,7 +1707,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1624"><code>../src/litegraph.js:1624</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1647"><code>../src/litegraph.js:1647</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1804,7 +1804,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1577"><code>../src/litegraph.js:1577</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1600"><code>../src/litegraph.js:1600</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -1893,7 +1893,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1846"><code>../src/litegraph.js:1846</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1869"><code>../src/litegraph.js:1869</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2016,7 +2016,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1329"><code>../src/litegraph.js:1329</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1349"><code>../src/litegraph.js:1349</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2027,7 +2027,7 @@
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>retrieves the input data from one slot</p>
|
||||
<p>retrieves the input data (data traveling through the connection) from one slot</p>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -2122,7 +2122,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1355"><code>../src/litegraph.js:1355</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1377"><code>../src/litegraph.js:1377</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2226,7 +2226,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1370"><code>../src/litegraph.js:1370</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1392"><code>../src/litegraph.js:1392</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2330,7 +2330,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1397"><code>../src/litegraph.js:1397</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1419"><code>../src/litegraph.js:1419</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2420,7 +2420,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1297"><code>../src/litegraph.js:1297</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1315"><code>../src/litegraph.js:1315</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2489,7 +2489,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1343"><code>../src/litegraph.js:1343</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1364"><code>../src/litegraph.js:1364</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2593,7 +2593,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1385"><code>../src/litegraph.js:1385</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1407"><code>../src/litegraph.js:1407</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2703,7 +2703,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1587"><code>../src/litegraph.js:1587</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1610"><code>../src/litegraph.js:1610</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2808,7 +2808,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1991"><code>../src/litegraph.js:1991</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l2014"><code>../src/litegraph.js:2014</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2873,7 +2873,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1532"><code>../src/litegraph.js:1532</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1555"><code>../src/litegraph.js:1555</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -2961,7 +2961,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1472"><code>../src/litegraph.js:1472</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1494"><code>../src/litegraph.js:1494</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -3039,7 +3039,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1231"><code>../src/litegraph.js:1231</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1249"><code>../src/litegraph.js:1249</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -3110,7 +3110,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1310"><code>../src/litegraph.js:1310</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1328"><code>../src/litegraph.js:1328</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -3203,7 +3203,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l1285"><code>../src/litegraph.js:1285</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l1303"><code>../src/litegraph.js:1303</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l68"><code>../src/litegraph.js:68</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l71"><code>../src/litegraph.js:71</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -423,7 +423,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l109"><code>../src/litegraph.js:109</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l112"><code>../src/litegraph.js:112</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -530,7 +530,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l122"><code>../src/litegraph.js:122</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l125"><code>../src/litegraph.js:125</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -627,7 +627,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l144"><code>../src/litegraph.js:144</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l147"><code>../src/litegraph.js:147</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
@@ -712,7 +712,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../files/.._src_litegraph.js.html#l37"><code>../src/litegraph.js:37</code></a>
|
||||
<a href="../files/.._src_litegraph.js.html#l38"><code>../src/litegraph.js:38</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
159
doc/data.json
159
doc/data.json
@@ -38,7 +38,7 @@
|
||||
"plugin_for": [],
|
||||
"extension_for": [],
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 231,
|
||||
"line": 234,
|
||||
"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
|
||||
},
|
||||
@@ -51,7 +51,7 @@
|
||||
"plugin_for": [],
|
||||
"extension_for": [],
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1137,
|
||||
"line": 1155,
|
||||
"description": "Base Class for all the node type classes",
|
||||
"params": [
|
||||
{
|
||||
@@ -70,7 +70,7 @@
|
||||
"plugin_for": [],
|
||||
"extension_for": [],
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 2374,
|
||||
"line": 2397,
|
||||
"description": "marks as dirty the canvas, this way it will be rendered again",
|
||||
"is_constructor": 1,
|
||||
"params": [
|
||||
@@ -91,7 +91,7 @@
|
||||
"classitems": [
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 37,
|
||||
"line": 38,
|
||||
"description": "Register a node class so it can be listed when the user wants to create a new one",
|
||||
"itemtype": "method",
|
||||
"name": "registerNodeType",
|
||||
@@ -111,7 +111,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 68,
|
||||
"line": 71,
|
||||
"description": "Create a node of a given type with a name. The node is not attached to any graph yet.",
|
||||
"itemtype": "method",
|
||||
"name": "createNode",
|
||||
@@ -136,7 +136,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 109,
|
||||
"line": 112,
|
||||
"description": "Returns a registered node type with a given name",
|
||||
"itemtype": "method",
|
||||
"name": "getNodeType",
|
||||
@@ -155,7 +155,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 122,
|
||||
"line": 125,
|
||||
"description": "Returns a list of node types matching one category",
|
||||
"itemtype": "method",
|
||||
"name": "getNodeType",
|
||||
@@ -174,7 +174,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 144,
|
||||
"line": 147,
|
||||
"description": "Returns a list with all the node type categories",
|
||||
"itemtype": "method",
|
||||
"name": "getNodeTypesCategories",
|
||||
@@ -186,7 +186,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 255,
|
||||
"line": 258,
|
||||
"description": "Removes all nodes from this graph",
|
||||
"itemtype": "method",
|
||||
"name": "clear",
|
||||
@@ -194,7 +194,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 300,
|
||||
"line": 303,
|
||||
"description": "Attach Canvas to this graph",
|
||||
"itemtype": "method",
|
||||
"name": "attachCanvas",
|
||||
@@ -209,7 +209,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 319,
|
||||
"line": 322,
|
||||
"description": "Detach Canvas from this graph",
|
||||
"itemtype": "method",
|
||||
"name": "detachCanvas",
|
||||
@@ -224,7 +224,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 333,
|
||||
"line": 336,
|
||||
"description": "Starts running this graph every interval milliseconds.",
|
||||
"itemtype": "method",
|
||||
"name": "start",
|
||||
@@ -239,7 +239,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 360,
|
||||
"line": 363,
|
||||
"description": "Stops the execution loop of the graph",
|
||||
"itemtype": "method",
|
||||
"name": "stop execution",
|
||||
@@ -247,7 +247,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 382,
|
||||
"line": 385,
|
||||
"description": "Run N steps (cycles) of the graph",
|
||||
"itemtype": "method",
|
||||
"name": "runStep",
|
||||
@@ -262,7 +262,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 426,
|
||||
"line": 429,
|
||||
"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",
|
||||
@@ -270,7 +270,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 524,
|
||||
"line": 527,
|
||||
"description": "Returns the amount of time the graph has been running in milliseconds",
|
||||
"itemtype": "method",
|
||||
"name": "getTime",
|
||||
@@ -282,7 +282,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 535,
|
||||
"line": 538,
|
||||
"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",
|
||||
@@ -294,7 +294,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 546,
|
||||
"line": 549,
|
||||
"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",
|
||||
@@ -306,7 +306,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 558,
|
||||
"line": 561,
|
||||
"description": "Sends an event to all the nodes, useful to trigger stuff",
|
||||
"itemtype": "method",
|
||||
"name": "sendEventToAllNodes",
|
||||
@@ -326,7 +326,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 593,
|
||||
"line": 596,
|
||||
"description": "Adds a new node instasnce to this graph",
|
||||
"itemtype": "method",
|
||||
"name": "add",
|
||||
@@ -341,7 +341,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 642,
|
||||
"line": 645,
|
||||
"description": "Removes a node from the graph",
|
||||
"itemtype": "method",
|
||||
"name": "remove",
|
||||
@@ -356,7 +356,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 708,
|
||||
"line": 711,
|
||||
"description": "Returns a node by its id.",
|
||||
"itemtype": "method",
|
||||
"name": "getNodeById",
|
||||
@@ -371,7 +371,26 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 721,
|
||||
"line": 723,
|
||||
"description": "Returns a list of nodes that matches a class",
|
||||
"itemtype": "method",
|
||||
"name": "findNodesByClass",
|
||||
"params": [
|
||||
{
|
||||
"name": "classObject",
|
||||
"description": "the class itself (not an string)",
|
||||
"type": "Class"
|
||||
}
|
||||
],
|
||||
"return": {
|
||||
"description": "a list with all the nodes of this type",
|
||||
"type": "Array"
|
||||
},
|
||||
"class": "LGraph"
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 739,
|
||||
"description": "Returns a list of nodes that matches a type",
|
||||
"itemtype": "method",
|
||||
"name": "findNodesByType",
|
||||
@@ -390,7 +409,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 737,
|
||||
"line": 755,
|
||||
"description": "Returns a list of nodes that matches a name",
|
||||
"itemtype": "method",
|
||||
"name": "findNodesByName",
|
||||
@@ -409,7 +428,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 753,
|
||||
"line": 771,
|
||||
"description": "Returns the top-most node in this position of the canvas",
|
||||
"itemtype": "method",
|
||||
"name": "getNodeOnPos",
|
||||
@@ -438,7 +457,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 940,
|
||||
"line": 958,
|
||||
"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",
|
||||
@@ -458,7 +477,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 955,
|
||||
"line": 973,
|
||||
"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",
|
||||
@@ -477,7 +496,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 992,
|
||||
"line": 1010,
|
||||
"description": "returns if the graph is in live mode",
|
||||
"itemtype": "method",
|
||||
"name": "isLive",
|
||||
@@ -485,7 +504,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1025,
|
||||
"line": 1043,
|
||||
"description": "Creates a Object containing all the info about this graph, it can be serialized",
|
||||
"itemtype": "method",
|
||||
"name": "serialize",
|
||||
@@ -497,7 +516,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1058,
|
||||
"line": 1076,
|
||||
"description": "Configure a graph from a JSON string",
|
||||
"itemtype": "method",
|
||||
"name": "configure",
|
||||
@@ -512,7 +531,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1172,
|
||||
"line": 1190,
|
||||
"description": "configure a node from an object containing the serialized info",
|
||||
"itemtype": "method",
|
||||
"name": "configure",
|
||||
@@ -520,7 +539,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1231,
|
||||
"line": 1249,
|
||||
"description": "serialize the content",
|
||||
"itemtype": "method",
|
||||
"name": "serialize",
|
||||
@@ -528,7 +547,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1285,
|
||||
"line": 1303,
|
||||
"description": "serialize and stringify",
|
||||
"itemtype": "method",
|
||||
"name": "toString",
|
||||
@@ -536,7 +555,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1297,
|
||||
"line": 1315,
|
||||
"description": "get the title string",
|
||||
"itemtype": "method",
|
||||
"name": "getTitle",
|
||||
@@ -544,7 +563,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1310,
|
||||
"line": 1328,
|
||||
"description": "sets the output data",
|
||||
"itemtype": "method",
|
||||
"name": "setOutputData",
|
||||
@@ -564,8 +583,8 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1329,
|
||||
"description": "retrieves the input data from one slot",
|
||||
"line": 1349,
|
||||
"description": "retrieves the input data (data traveling through the connection) from one slot",
|
||||
"itemtype": "method",
|
||||
"name": "getInputData",
|
||||
"params": [
|
||||
@@ -583,7 +602,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1343,
|
||||
"line": 1364,
|
||||
"description": "tells you if there is a connection in one input slot",
|
||||
"itemtype": "method",
|
||||
"name": "isInputConnected",
|
||||
@@ -602,7 +621,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1355,
|
||||
"line": 1377,
|
||||
"description": "tells you info about an input connection (which node, type, etc)",
|
||||
"itemtype": "method",
|
||||
"name": "getInputInfo",
|
||||
@@ -621,7 +640,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1370,
|
||||
"line": 1392,
|
||||
"description": "tells you info about an output connection (which node, type, etc)",
|
||||
"itemtype": "method",
|
||||
"name": "getOutputInfo",
|
||||
@@ -640,7 +659,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1385,
|
||||
"line": 1407,
|
||||
"description": "tells you if there is a connection in one output slot",
|
||||
"itemtype": "method",
|
||||
"name": "isOutputConnected",
|
||||
@@ -659,7 +678,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1397,
|
||||
"line": 1419,
|
||||
"description": "retrieves all the nodes connected to this output slot",
|
||||
"itemtype": "method",
|
||||
"name": "getOutputNodes",
|
||||
@@ -678,7 +697,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1426,
|
||||
"line": 1448,
|
||||
"description": "add a new output slot to use in this node",
|
||||
"itemtype": "method",
|
||||
"name": "addOutput",
|
||||
@@ -695,7 +714,7 @@
|
||||
},
|
||||
{
|
||||
"name": "extra_info",
|
||||
"description": "this can be used to have special properties of an output (special color, position, etc)",
|
||||
"description": "this can be used to have special properties of an output (label, special color, position, etc)",
|
||||
"type": "Object"
|
||||
}
|
||||
],
|
||||
@@ -703,7 +722,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1447,
|
||||
"line": 1469,
|
||||
"description": "add a new output slot to use in this node",
|
||||
"itemtype": "method",
|
||||
"name": "addOutputs",
|
||||
@@ -718,7 +737,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1472,
|
||||
"line": 1494,
|
||||
"description": "remove an existing output slot",
|
||||
"itemtype": "method",
|
||||
"name": "removeOutput",
|
||||
@@ -733,7 +752,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1486,
|
||||
"line": 1508,
|
||||
"description": "add a new input slot to use in this node",
|
||||
"itemtype": "method",
|
||||
"name": "addInput",
|
||||
@@ -745,7 +764,7 @@
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"description": "string defining the input type (\"vec3\",\"number\",...)",
|
||||
"description": "string defining the input type (\"vec3\",\"number\",...), it its a generic one use 0",
|
||||
"type": "String"
|
||||
},
|
||||
{
|
||||
@@ -758,7 +777,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1507,
|
||||
"line": 1530,
|
||||
"description": "add several new input slots in this node",
|
||||
"itemtype": "method",
|
||||
"name": "addInputs",
|
||||
@@ -773,7 +792,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1532,
|
||||
"line": 1555,
|
||||
"description": "remove an existing input slot",
|
||||
"itemtype": "method",
|
||||
"name": "removeInput",
|
||||
@@ -788,7 +807,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1546,
|
||||
"line": 1569,
|
||||
"description": "add an special connection to this node (used for special kinds of graphs)",
|
||||
"itemtype": "method",
|
||||
"name": "addConnection",
|
||||
@@ -818,7 +837,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1559,
|
||||
"line": 1582,
|
||||
"description": "computes the size of a node according to its inputs and output slots",
|
||||
"itemtype": "method",
|
||||
"name": "computeSize",
|
||||
@@ -837,7 +856,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1577,
|
||||
"line": 1600,
|
||||
"description": "returns the bounding of the object, used for rendering purposes",
|
||||
"itemtype": "method",
|
||||
"name": "getBounding",
|
||||
@@ -849,7 +868,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1587,
|
||||
"line": 1610,
|
||||
"description": "checks if a point is inside the shape of a node",
|
||||
"itemtype": "method",
|
||||
"name": "isPointInsideNode",
|
||||
@@ -873,7 +892,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1609,
|
||||
"line": 1632,
|
||||
"description": "returns the input slot with a given name (used for dynamic slots), -1 if not found",
|
||||
"itemtype": "method",
|
||||
"name": "findInputSlot",
|
||||
@@ -892,7 +911,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1624,
|
||||
"line": 1647,
|
||||
"description": "returns the output slot with a given name (used for dynamic slots), -1 if not found",
|
||||
"itemtype": "method",
|
||||
"name": "findOutputSlot",
|
||||
@@ -911,7 +930,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1639,
|
||||
"line": 1662,
|
||||
"description": "connect this node output to the input of another node",
|
||||
"itemtype": "method",
|
||||
"name": "connect",
|
||||
@@ -940,7 +959,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1722,
|
||||
"line": 1745,
|
||||
"description": "disconnect one output to an specific node",
|
||||
"itemtype": "method",
|
||||
"name": "disconnectOutput",
|
||||
@@ -964,7 +983,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1789,
|
||||
"line": 1812,
|
||||
"description": "disconnect one input",
|
||||
"itemtype": "method",
|
||||
"name": "disconnectInput",
|
||||
@@ -983,7 +1002,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1846,
|
||||
"line": 1869,
|
||||
"description": "returns the center of a connection point in canvas coords",
|
||||
"itemtype": "method",
|
||||
"name": "getConnectionPos",
|
||||
@@ -1007,7 +1026,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1978,
|
||||
"line": 2001,
|
||||
"description": "Collapse the node to make it smaller on the canvas",
|
||||
"itemtype": "method",
|
||||
"name": "collapse",
|
||||
@@ -1015,7 +1034,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 1991,
|
||||
"line": 2014,
|
||||
"description": "Forces the node to do not move or realign on Z",
|
||||
"itemtype": "method",
|
||||
"name": "pin",
|
||||
@@ -1023,7 +1042,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 2052,
|
||||
"line": 2075,
|
||||
"description": "clears all the data inside",
|
||||
"itemtype": "method",
|
||||
"name": "clear",
|
||||
@@ -1031,7 +1050,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 2106,
|
||||
"line": 2129,
|
||||
"description": "assigns a graph, you can reasign graphs to the same canvas",
|
||||
"itemtype": "method",
|
||||
"name": "setGraph",
|
||||
@@ -1046,7 +1065,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 2134,
|
||||
"line": 2157,
|
||||
"description": "opens a graph contained inside a node in the current graph",
|
||||
"itemtype": "method",
|
||||
"name": "openSubgraph",
|
||||
@@ -1061,7 +1080,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 2161,
|
||||
"line": 2184,
|
||||
"description": "closes a subgraph contained inside a node",
|
||||
"itemtype": "method",
|
||||
"name": "closeSubgraph",
|
||||
@@ -1076,7 +1095,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 2176,
|
||||
"line": 2199,
|
||||
"description": "assigns a canvas",
|
||||
"itemtype": "method",
|
||||
"name": "setCanvas",
|
||||
@@ -1091,7 +1110,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 2390,
|
||||
"line": 2413,
|
||||
"description": "Used to attach the canvas in a popup",
|
||||
"itemtype": "method",
|
||||
"name": "getCanvasWindow",
|
||||
@@ -1103,7 +1122,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 2402,
|
||||
"line": 2425,
|
||||
"description": "starts rendering the content of the canvas when needed",
|
||||
"itemtype": "method",
|
||||
"name": "startRendering",
|
||||
@@ -1111,7 +1130,7 @@
|
||||
},
|
||||
{
|
||||
"file": "../src/litegraph.js",
|
||||
"line": 2425,
|
||||
"line": 2448,
|
||||
"description": "stops rendering the content of the canvas (to save resources)",
|
||||
"itemtype": "method",
|
||||
"name": "stopRendering",
|
||||
|
||||
@@ -127,6 +127,7 @@ var LiteGraph = {
|
||||
debug: false,
|
||||
throw_errors: true,
|
||||
registered_node_types: {},
|
||||
Nodes: {},
|
||||
|
||||
/**
|
||||
* Register a node class so it can be listed when the user wants to create a new one
|
||||
@@ -157,6 +158,8 @@ var LiteGraph = {
|
||||
base_class.prototype[i] = LGraphNode.prototype[i];
|
||||
|
||||
this.registered_node_types[ type ] = base_class;
|
||||
if(base_class.constructor.name)
|
||||
this.Nodes[ base_class.constructor.name ] = base_class;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -811,6 +814,21 @@ LGraph.prototype.getNodeById = function(id)
|
||||
return this._nodes_by_id[id];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of nodes that matches a class
|
||||
* @method findNodesByClass
|
||||
* @param {Class} classObject the class itself (not an string)
|
||||
* @return {Array} a list with all the nodes of this type
|
||||
*/
|
||||
|
||||
LGraph.prototype.findNodesByClass = function(classObject)
|
||||
{
|
||||
var r = [];
|
||||
for(var i in this._nodes)
|
||||
if(this._nodes[i].constructor === classObject)
|
||||
r.push(this._nodes[i]);
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of nodes that matches a type
|
||||
@@ -1409,7 +1427,9 @@ LGraphNode.prototype.getTitle = function()
|
||||
*/
|
||||
LGraphNode.prototype.setOutputData = function(slot,data)
|
||||
{
|
||||
if(!this.outputs) return;
|
||||
if(!this.outputs)
|
||||
return;
|
||||
|
||||
if(slot > -1 && slot < this.outputs.length && this.outputs[slot] && this.outputs[slot].links != null)
|
||||
{
|
||||
for(var i = 0; i < this.outputs[slot].links.length; i++)
|
||||
@@ -1421,17 +1441,18 @@ LGraphNode.prototype.setOutputData = function(slot,data)
|
||||
}
|
||||
|
||||
/**
|
||||
* retrieves the input data from one slot
|
||||
* retrieves the input data (data traveling through the connection) from one slot
|
||||
* @method getInputData
|
||||
* @param {number} slot
|
||||
* @return {*} data
|
||||
*/
|
||||
LGraphNode.prototype.getInputData = function(slot)
|
||||
{
|
||||
if(!this.inputs) return null;
|
||||
if(!this.inputs)
|
||||
return; //undefined;
|
||||
if(slot < this.inputs.length && this.inputs[slot].link != null)
|
||||
return this.graph.links[ this.inputs[slot].link ].data;
|
||||
return null;
|
||||
return; //undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1442,7 +1463,8 @@ LGraphNode.prototype.getInputData = function(slot)
|
||||
*/
|
||||
LGraphNode.prototype.isInputConnected = function(slot)
|
||||
{
|
||||
if(!this.inputs) return null;
|
||||
if(!this.inputs)
|
||||
return false;
|
||||
return (slot < this.inputs.length && this.inputs[slot].link != null);
|
||||
}
|
||||
|
||||
@@ -1522,7 +1544,7 @@ LGraphNode.prototype.triggerOutput = function(slot,param)
|
||||
* @method addOutput
|
||||
* @param {string} name
|
||||
* @param {string} type string defining the output type ("vec3","number",...)
|
||||
* @param {Object} extra_info this can be used to have special properties of an output (special color, position, etc)
|
||||
* @param {Object} extra_info this can be used to have special properties of an output (label, special color, position, etc)
|
||||
*/
|
||||
LGraphNode.prototype.addOutput = function(name,type,extra_info)
|
||||
{
|
||||
@@ -1581,11 +1603,12 @@ LGraphNode.prototype.removeOutput = function(slot)
|
||||
* add a new input slot to use in this node
|
||||
* @method addInput
|
||||
* @param {string} name
|
||||
* @param {string} type string defining the input type ("vec3","number",...)
|
||||
* @param {string} type string defining the input type ("vec3","number",...), it its a generic one use 0
|
||||
* @param {Object} extra_info this can be used to have special properties of an input (label, color, position, etc)
|
||||
*/
|
||||
LGraphNode.prototype.addInput = function(name,type,extra_info)
|
||||
{
|
||||
type = type || 0;
|
||||
var o = {name:name,type:type,link:null};
|
||||
if(extra_info)
|
||||
for(var i in extra_info)
|
||||
@@ -2603,7 +2626,7 @@ LGraphCanvas.prototype.processMouseDown = function(e)
|
||||
var link_pos = n.getConnectionPos(true,i);
|
||||
if( isInsideRectangle(e.canvasX, e.canvasY, link_pos[0] - 10, link_pos[1] - 5, 20,10) )
|
||||
{
|
||||
if(input.link)
|
||||
if(input.link !== null)
|
||||
{
|
||||
n.disconnectInput(i);
|
||||
this.dirty_bgcanvas = true;
|
||||
@@ -2981,6 +3004,7 @@ LGraphCanvas.prototype.processKeyDown = function(e)
|
||||
if(e.keyCode == 46 || e.keyCode == 8)
|
||||
{
|
||||
this.deleteSelectedNodes();
|
||||
block_default = true;
|
||||
}
|
||||
|
||||
//collapse
|
||||
@@ -3277,8 +3301,8 @@ LGraphCanvas.prototype.drawFrontCanvas = function()
|
||||
if(!ctx) //maybe is using webgl...
|
||||
return;
|
||||
|
||||
if(ctx.start)
|
||||
ctx.start();
|
||||
if(ctx.start2D)
|
||||
ctx.start2D();
|
||||
|
||||
var canvas = this.canvas;
|
||||
|
||||
@@ -3392,8 +3416,8 @@ LGraphCanvas.prototype.drawFrontCanvas = function()
|
||||
//this.dirty_area = null;
|
||||
}
|
||||
|
||||
if(ctx.finish) //this is a function I use in webgl renderer
|
||||
ctx.finish();
|
||||
if(ctx.finish2D) //this is a function I use in webgl renderer
|
||||
ctx.finish2D();
|
||||
|
||||
this.dirty_canvas = false;
|
||||
}
|
||||
@@ -4151,11 +4175,11 @@ LGraphCanvas.onMenuNodeInputs = function(node, e, prev_menu)
|
||||
var entries = [];
|
||||
for (var i in options)
|
||||
{
|
||||
var option = options[i];
|
||||
var label = option[0];
|
||||
if(option[2] && option[2].label)
|
||||
label = option[2].label;
|
||||
entries.push({content: label, value: option});
|
||||
var entry = options[i];
|
||||
var label = entry[0];
|
||||
if(entry[2] && entry[2].label)
|
||||
label = entry[2].label;
|
||||
entries.push({content: label, value: entry});
|
||||
}
|
||||
var menu = LiteGraph.createContextualMenu(entries, {event: e, callback: inner_clicked, from: prev_menu});
|
||||
}
|
||||
@@ -4181,9 +4205,13 @@ LGraphCanvas.onMenuNodeOutputs = function(node, e, prev_menu)
|
||||
var entries = [];
|
||||
for (var i in options)
|
||||
{
|
||||
if(node.findOutputSlot(options[i][0]) != -1)
|
||||
var entry = options[i];
|
||||
if(node.findOutputSlot(entry[0]) != -1)
|
||||
continue; //skip the ones already on
|
||||
entries.push({content: options[i][0], value: options[i]});
|
||||
var label = entry[0];
|
||||
if(entry[2] && entry[2].label)
|
||||
label = entry[2].label;
|
||||
entries.push({content: label, value: entry});
|
||||
}
|
||||
if(entries.length)
|
||||
var menu = LiteGraph.createContextualMenu(entries, {event: e, callback: inner_clicked, from: prev_menu});
|
||||
@@ -4191,7 +4219,8 @@ LGraphCanvas.onMenuNodeOutputs = function(node, e, prev_menu)
|
||||
|
||||
function inner_clicked(v)
|
||||
{
|
||||
if(!node) return;
|
||||
if(!node)
|
||||
return;
|
||||
|
||||
var value = v.value[1];
|
||||
|
||||
@@ -4204,7 +4233,7 @@ LGraphCanvas.onMenuNodeOutputs = function(node, e, prev_menu)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
node.addOutput(v.value[0],v.value[1]);
|
||||
node.addOutput(v.value[0], v.value[1], v.value[2]);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -4517,7 +4546,7 @@ LiteGraph.createContextualMenu = function(values,options, ref_window)
|
||||
LiteGraph.closeAllContextualMenus();
|
||||
|
||||
var root = ref_window.document.createElement("div");
|
||||
root.className = "litecontextualmenu litemenubar-panel";
|
||||
root.className = "graphcontextualmenu graphmenubar-panel";
|
||||
this.root = root;
|
||||
var style = root.style;
|
||||
|
||||
@@ -4539,11 +4568,11 @@ LiteGraph.createContextualMenu = function(values,options, ref_window)
|
||||
{
|
||||
var item = values[i];
|
||||
var element = ref_window.document.createElement("div");
|
||||
element.className = "litemenu-entry";
|
||||
element.className = "graphmenu-entry";
|
||||
|
||||
if(item == null)
|
||||
{
|
||||
element.className = "litemenu-entry separator";
|
||||
element.className = "graphmenu-entry separator";
|
||||
root.appendChild(element);
|
||||
continue;
|
||||
}
|
||||
@@ -4626,7 +4655,7 @@ LiteGraph.createContextualMenu = function(values,options, ref_window)
|
||||
if(options.callback)
|
||||
{
|
||||
var ret = options.callback.call(root, this.data, e );
|
||||
if( ret != undefined ) close = ret;
|
||||
if( ret !== undefined ) close = ret;
|
||||
}
|
||||
|
||||
if(close)
|
||||
@@ -4651,7 +4680,7 @@ LiteGraph.createContextualMenu = function(values,options, ref_window)
|
||||
|
||||
LiteGraph.closeAllContextualMenus = function()
|
||||
{
|
||||
var elements = document.querySelectorAll(".litecontextualmenu");
|
||||
var elements = document.querySelectorAll(".graphcontextualmenu");
|
||||
if(!elements.length) return;
|
||||
|
||||
var result = [];
|
||||
|
||||
@@ -39,7 +39,7 @@ if(typeof(LiteGraph) != "undefined")
|
||||
return gl.textures;
|
||||
}
|
||||
|
||||
//process the loading of a texture (overwrite if you have a Resources Manager)
|
||||
//process the loading of a texture (overwrite it if you have a Resources Manager)
|
||||
LGraphTexture.loadTexture = function(name, options)
|
||||
{
|
||||
options = options || {};
|
||||
@@ -882,7 +882,7 @@ if(typeof(LiteGraph) != "undefined")
|
||||
this.addInput("LUT","Texture");
|
||||
this.addInput("Intensity","number");
|
||||
this.addOutput("","Texture");
|
||||
this.properties = { intensity: 1, precision: LGraphTexture.DEFAULT };
|
||||
this.properties = { intensity: 1, precision: LGraphTexture.DEFAULT, texture: null };
|
||||
|
||||
if(!LGraphTextureLUT._shader)
|
||||
LGraphTextureLUT._shader = new GL.Shader( Shader.SCREEN_VERTEX_SHADER, LGraphTextureLUT.pixel_shader );
|
||||
@@ -894,6 +894,7 @@ if(typeof(LiteGraph) != "undefined")
|
||||
|
||||
LGraphTextureLUT.title = "LUT";
|
||||
LGraphTextureLUT.desc = "Apply LUT to Texture";
|
||||
LGraphTextureLUT.widgets_info = {"texture": { widget:"texture"} };
|
||||
|
||||
LGraphTextureLUT.prototype.onExecute = function()
|
||||
{
|
||||
@@ -908,11 +909,16 @@ if(typeof(LiteGraph) != "undefined")
|
||||
if(!tex) return;
|
||||
|
||||
var lut_tex = this.getInputData(1);
|
||||
|
||||
if(!lut_tex)
|
||||
lut_tex = LGraphTexture.getTexture( this.properties.texture );
|
||||
|
||||
if(!lut_tex)
|
||||
{
|
||||
this.setOutputData(0,tex);
|
||||
return;
|
||||
}
|
||||
|
||||
lut_tex.bind(0);
|
||||
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR );
|
||||
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE );
|
||||
|
||||
Reference in New Issue
Block a user