feat: add array and sum node
This commit is contained in:
@ -27,7 +27,7 @@
|
||||
import { Color } from "three/src/math/Color.js";
|
||||
import { CubicBezierCurve } from "three/src/extras/curves/CubicBezierCurve.js";
|
||||
import { Vector2 } from "three/src/math/Vector2.js";
|
||||
import { createEdgeGeometry } from "./createEdgeGeometry";
|
||||
import { createEdgeGeometry } from "./createEdgeGeometry.js";
|
||||
|
||||
export let from: { x: number; y: number };
|
||||
export let to: { x: number; y: number };
|
||||
|
@ -36,8 +36,13 @@ export async function getNode(id: `${string}/${string}/${string}`) {
|
||||
const wrapper = await getNodeWasm(id);
|
||||
|
||||
const outputs = wrapper.get_outputs();
|
||||
const inputTypes = JSON.parse(wrapper.get_input_types());
|
||||
const rawInputs = wrapper.get_input_types();
|
||||
try {
|
||||
const inputTypes = JSON.parse(rawInputs);
|
||||
return { id, outputs, inputs: inputTypes }
|
||||
} catch (e) {
|
||||
console.log("Failed to parse input types for node", { id, rawInputs });
|
||||
}
|
||||
|
||||
return { id, outputs, inputs: inputTypes }
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user