diff --git a/app/src/lib/graph-interface/graph-manager.ts b/app/src/lib/graph-interface/graph-manager.ts index 8ec6f40..92befcf 100644 --- a/app/src/lib/graph-interface/graph-manager.ts +++ b/app/src/lib/graph-interface/graph-manager.ts @@ -241,7 +241,7 @@ export class GraphManager extends EventEmitter<{ "save": Graph, "result": any, " let settingId = nodeType.inputs[key].setting; if (settingId) { settingTypes[settingId] = nodeType.inputs[key]; - if (settingValues[settingId] === undefined && "value" in type.inputs[key]) { + if (settingValues[settingId] === undefined && "value" in nodeType.inputs[key]) { settingValues[settingId] = nodeType.inputs[key].value; } } diff --git a/app/src/lib/result-viewer/Scene.svelte b/app/src/lib/result-viewer/Scene.svelte index d210b6e..59bd45f 100644 --- a/app/src/lib/result-viewer/Scene.svelte +++ b/app/src/lib/result-viewer/Scene.svelte @@ -1,11 +1,13 @@ diff --git a/app/src/lib/runtime-executor.ts b/app/src/lib/runtime-executor.ts index 6470a1a..c6dcee4 100644 --- a/app/src/lib/runtime-executor.ts +++ b/app/src/lib/runtime-executor.ts @@ -150,7 +150,12 @@ export class MemoryRuntimeExecutor implements RuntimeExecutor { } // if the input is not connected to another node, we use the value from the node itself - inputs[key] = node.props?.[key] ?? input?.value; + let value = node.props?.[key] ?? input?.value; + if (Array.isArray(value)) { + inputs[key] = [0, value.length + 1, ...value, 1, 1]; + } else { + inputs[key] = value; + } } @@ -191,10 +196,6 @@ export class MemoryRuntimeExecutor implements RuntimeExecutor { return encodeFloat(value as number); } - if (Array.isArray(value)) { - return encodeNestedArray(value); - } - return value; }); @@ -204,13 +205,14 @@ export class MemoryRuntimeExecutor implements RuntimeExecutor { // console.log(`${a2 - a1}ms TRANSFORMED_INPUTS`); - const encoded_inputs = encodeNestedArray(transformed_inputs); + const encoded_inputs = concatEncodedArrays(transformed_inputs); const a3 = performance.now(); console.groupCollapsed(`executing ${node_type.id || node.id}`); console.log(`Inputs:`, transformed_inputs); console.log(`Encoded Inputs:`, encoded_inputs); results[node.id] = node_type.execute(encoded_inputs); - console.log("Result:", decodeNestedArray(results[node.id])); + console.log("Result:", results[node.id]); + console.log("Result (decoded):", decodeNestedArray(results[node.id])); console.groupEnd(); const duration = performance.now() - a3; if (duration > 5) { diff --git a/app/src/lib/settings/Keymap.svelte b/app/src/lib/settings/Keymap.svelte index 95b22de..af0e2e4 100644 --- a/app/src/lib/settings/Keymap.svelte +++ b/app/src/lib/settings/Keymap.svelte @@ -14,7 +14,7 @@
{key.description}
@@ -69,4 +69,9 @@ display: flex; align-items: center; } + + span::after { + content: " +"; + opacity: 0.5; + } diff --git a/app/src/lib/settings/NestedSettings.svelte b/app/src/lib/settings/NestedSettings.svelte index 3026784..486b091 100644 --- a/app/src/lib/settings/NestedSettings.svelte +++ b/app/src/lib/settings/NestedSettings.svelte @@ -1,4 +1,5 @@