chore: setup linting
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import type { Graph } from "@nodarium/types";
|
||||
import type { Graph } from '@nodarium/types';
|
||||
|
||||
export function grid(width: number, height: number) {
|
||||
|
||||
const graph: Graph = {
|
||||
id: Math.floor(Math.random() * 100000),
|
||||
edges: [],
|
||||
nodes: [],
|
||||
nodes: []
|
||||
};
|
||||
|
||||
const amount = width * height;
|
||||
@@ -18,19 +17,18 @@ export function grid(width: number, height: number) {
|
||||
id: i,
|
||||
position: [x * 30, y * 40],
|
||||
props: i == 0 ? { value: 0 } : { op_type: 0, a: 1, b: 0.05 },
|
||||
type: i == 0 ? "max/plantarium/float" : "max/plantarium/math",
|
||||
type: i == 0 ? 'max/plantarium/float' : 'max/plantarium/math'
|
||||
});
|
||||
|
||||
graph.edges.push([i, 0, i + 1, i === amount - 1 ? "input" : "a",]);
|
||||
graph.edges.push([i, 0, i + 1, i === amount - 1 ? 'input' : 'a']);
|
||||
}
|
||||
|
||||
graph.nodes.push({
|
||||
id: amount,
|
||||
position: [width * 30, (height - 1) * 40],
|
||||
type: "max/plantarium/output",
|
||||
props: {},
|
||||
type: 'max/plantarium/output',
|
||||
props: {}
|
||||
});
|
||||
|
||||
return graph;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user