mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-27 02:04:09 +00:00
added method to create nodes from functions, wrapFunctionAsNode
This commit is contained in:
@@ -363,6 +363,24 @@ Watch.prototype.onDrawBackground = function(ctx)
|
||||
|
||||
LiteGraph.registerNodeType("basic/watch", Watch);
|
||||
|
||||
//Watch a value in the editor
|
||||
function Pass()
|
||||
{
|
||||
this.addInput("in",0);
|
||||
this.addOutput("out",0);
|
||||
this.size = [40,20];
|
||||
}
|
||||
|
||||
Pass.title = "Pass";
|
||||
Pass.desc = "Allows to connect different types";
|
||||
|
||||
Pass.prototype.onExecute = function()
|
||||
{
|
||||
this.setOutputData( 0, this.getInputData(0) );
|
||||
}
|
||||
|
||||
LiteGraph.registerNodeType("basic/pass", Pass);
|
||||
|
||||
|
||||
//Show value inside the debug console
|
||||
function Console()
|
||||
|
||||
Reference in New Issue
Block a user