mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 09:00:05 +00:00
Merge branch 'master' of https://github.com/jagenjo/litegraph.js
This commit is contained in:
23
README.md
23
README.md
@@ -8,6 +8,8 @@ It can be integrated easily in any existing web applications and graphs can be r
|
||||
|
||||
## Installation
|
||||
|
||||
I recommend to download the build/litegraph.js file which is more updated than the npm package.
|
||||
|
||||
```
|
||||
npm install litegraph.js
|
||||
```
|
||||
@@ -76,6 +78,27 @@ LiteGraph.registerNodeType("basic/sum", MyAddNode );
|
||||
|
||||
```
|
||||
|
||||
## Server side
|
||||
|
||||
It also works server-side using Node although some nodes do not work in server (audio, graphics, input, etc).
|
||||
|
||||
```js
|
||||
var LiteGraph = require("./litegraph.js").LiteGraph;
|
||||
|
||||
var graph = new LiteGraph.LGraph();
|
||||
|
||||
var node_time = LiteGraph.createNode("basic/time");
|
||||
graph.add(node_time);
|
||||
|
||||
var node_console = LiteGraph.createNode("basic/console");
|
||||
node_console.mode = LiteGraph.ALWAYS;
|
||||
graph.add(node_console);
|
||||
|
||||
node_time.connect( 0, node_console, 1 );
|
||||
|
||||
graph.start()
|
||||
```
|
||||
|
||||
|
||||
## Projects using it
|
||||
|
||||
|
||||
Reference in New Issue
Block a user