@comfyOrg/ 书法
这是在 舒适 界面前端( U)。 。 。 .
这是原作的叉子 litegraph.js. 某些API可能没有改变,但与原始文件基本不符.
一些早期的要闻:
- 累计comfyUI自定义变化(2024-01~2024-05) (中文(简体) )https://github.com/Comfy-Org/litegraph.js/pull/1 (中文(简体) )(中文(简体) )
- ComfyUI 前端 TS 迁移的型式变换(https://github.com/Comfy-Org/litegraph.js/pull/3 互联网档案馆的存檔,存档日期2014-12-22(中文(简体) )
- 缩放修正( E)https://github.com/Comfy-Org/litegraph.js/pull/7 (中文(简体) )(中文(简体) )
- Emit 搜索框触发自定义事件( E)https://github.com/Comfy-Org/litegraph.js/pull/10 (英语)(中文(简体) )
- 流出组合部件文本( T)https://github.com/Comfy-Org/litegraph.js/pull/17 (中文(简体) )(中文(简体) )
- 根据图表序列化排序节点( I)https://github.com/Comfy-Org/litegraph.js/pull/21 (中文(简体) )(中文(简体) )
- 修复连接链接时未使用的空输入( F)https://github.com/Comfy-Org/litegraph.js/pull/24 互联网档案馆的存檔,存档日期2014-12-21(中文(简体) )
- 批量输出连接移动/ 断开连接( M)https://github.com/Comfy-Org/litegraph.js/pull/39 (中文(简体) )(中文(简体) )
- 现在还有上百人...
安装
npm i @comfyorg/litegraph
平面图.js
一个TypeScript库,用于在浏览器中创建类似于"不真实蓝图"的图表.
原始语法说明.js
一个Javascript中的库来在浏览器中创建类似于"不真实的蓝图"的图表. 节点可以很容易地编程,它包括一个编辑器来构造和测试图表.
它可以很容易地被集成到任何现有的网络应用中,图表可以运行而不需要编辑器.

特征
- 在 Canvas2D 上的渲染器( 插入/ 输出和平整区域, 易于渲染复杂的界面, 可在 WebGLTexture 内使用)
- 方便使用编辑器(搜索框,键盘快捷键,多选项,上下文菜单,.)
- 优化到每个图支持上百个节点(在编辑上,也在执行上)
- 自定义主题( 颜色、 形状、 背景)
- 召回将节点的每个动作/绘制/事件个性化
- 图表可以在节点JS中执行
- 高度自定义节点( 颜色、 形状、 部件、 自定义渲染)
- 容易融入任何JS应用程序(一个文件,没有依赖性)
- 字体支持
安装
您可以使用 npm 安装它
npm install @comfyorg/litegraph
如何编码新节点类型
以下是一个实例,说明如何建立一个汇集两种投入的节点:
import { LiteGraph, LGraphNode } from "./litegraph"
class MyAddNode extends LGraphNode {
// Name to show
title = "Sum"
constructor() {
this.addInput("A", "number")
this.addInput("B", "number")
this.addOutput("A+B", "number")
this.properties.precision = 1
}
// Function to call when the node is executed
onExecute() {
var A = this.getInputData(0)
if (A === undefined) A = 0
var B = this.getInputData(1)
if (B === undefined) B = 0
this.setOutputData(0, A + B)
}
}
// Register the node type
LiteGraph.registerNodeType("basic/sum", MyAddNode)
服务器侧
它也使用NodeJS在服务器侧面工作,尽管一些节点在服务器上不工作(音频,图形,输入等).
import { LiteGraph, LGraph } from "./litegraph.js"
const graph = new LGraph()
const firstNode = LiteGraph.createNode("basic/sum")
graph.add(firstNode)
const secondNode = LiteGraph.createNode("basic/sum")
graph.add(secondNode)
firstNode.connect(0, secondNode, 1)
graph.start()
使用它的项目
康菲乌伊

使用原始语法.js的项目
反馈
请 打开一个问题 在GitHub重播时.
发展
文学没有运行时间依赖性. 已测试了节点JS 20.18.x的构建工具
释放
使用 GitHub 动作发布普通版本 .
- 运行
Release a New Version动作,选择正文类型 - 合并结果 PR
- 合并时自动发布 GitHub 发布
释放前
动作直接翻译 Version increment type 到 npm 版本命令. Pre-release ID (suffix) 选项 --preid 参数.
例如,使用 prerelease 递增型可以自动撞出补丁版本并创建出预放出版本. 随后的发行会只更新发行前版本.
使用 patch 当准备去除预发后缀时.
贡献者
你可以找到那个 当前贡献者列表 (原始内容存档于2018-09-29). on GitHub.
贡献者(叉前)
- 阿特拉桑岛
- 克里夫语name
- 饶舌歌手
- 发明者Dev
- 内特·斯卡莱
- 编码救生
- 伊利亚布斯克
- 高斯州


