chore: setup linting

This commit is contained in:
Max Richter
2026-02-02 16:22:14 +01:00
parent 137425b31b
commit 30e897468a
174 changed files with 6043 additions and 5107 deletions

View File

@@ -1,28 +1,26 @@
import type { Graph, SerializedNode } from "@nodarium/types";
import type { Graph, SerializedNode } from '@nodarium/types';
export function tree(depth: number): Graph {
const nodes: SerializedNode[] = [
{
id: 0,
type: "max/plantarium/output",
type: 'max/plantarium/output',
position: [0, 0]
},
{
id: 1,
type: "max/plantarium/math",
type: 'max/plantarium/math',
position: [-40, -10]
}
]
];
const edges: [number, number, number, string][] = [
[1, 0, 0, "input"]
[1, 0, 0, 'input']
];
for (let d = 0; d < depth; d++) {
const amount = Math.pow(2, d);
for (let i = 0; i < amount; i++) {
const id0 = amount * 2 + i * 2;
const id1 = amount * 2 + i * 2 + 1;
@@ -33,24 +31,22 @@ export function tree(depth: number): Graph {
nodes.push({
id: id0,
type: "max/plantarium/math",
position: [x, y],
type: 'max/plantarium/math',
position: [x, y]
});
edges.push([id0, 0, parent, "a"]);
edges.push([id0, 0, parent, 'a']);
nodes.push({
id: id1,
type: "max/plantarium/math",
position: [x, y + 35],
type: 'max/plantarium/math',
position: [x, y + 35]
});
edges.push([id1, 0, parent, "b"]);
edges.push([id1, 0, parent, 'b']);
}
}
return {
id: Math.floor(Math.random() * 100000),
nodes,
edges
};
}