updated graph rendering to be more efficient. added smooth scrolling, added color type, mmb drag for cutting

This commit is contained in:
2026-03-21 06:57:26 +11:00
parent 1f5da03474
commit ae374db9fb
54 changed files with 9147 additions and 138 deletions

View File

@@ -0,0 +1,26 @@
import { createNodeModule } from "../nodeTypes.js";
/**
* Constant color literal.
*/
export const colorLiteralNode = createNodeModule(
{
id: "color_literal",
title: "Color",
category: "Values",
description: "Constant color literal (0-15).",
searchTags: ["color", "literal", "constant", "value"],
inputs: [],
outputs: [
{ id: "value", name: "Value", direction: "output", kind: "color" },
],
properties: [
{ key: "value", label: "Color", type: "number", defaultValue: 7 },
],
},
{
evaluateValue: ({ node, formatLiteral }) => {
return formatLiteral("number", node.properties.value ?? 7);
},
}
);