WIP
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { Edge, Graph, Node, NodeInput, NodeRegistry, Socket, } from "@nodes/types";
|
||||
import { fastHashString } from "@nodes/utils";
|
||||
import { get, writable, type Writable } from "svelte/store";
|
||||
import { writable, type Writable } from "svelte/store";
|
||||
import EventEmitter from "./helpers/EventEmitter.js";
|
||||
import { createLogger } from "./helpers/index.js";
|
||||
import throttle from "./helpers/throttle.js";
|
||||
@@ -42,7 +42,6 @@ export class GraphManager extends EventEmitter<{ "save": Graph, "result": any, "
|
||||
|
||||
history: HistoryManager = new HistoryManager();
|
||||
execute = throttle(() => {
|
||||
console.log("Props", get(this.nodes).values().find(n => n.type === "max/plantarium/gravity")?.props);
|
||||
if (this.loaded === false) return;
|
||||
this.emit("result", this.serialize());
|
||||
}, 10);
|
||||
|
@@ -48,7 +48,7 @@
|
||||
$effect(() => {
|
||||
if (graphState.activeNodeId !== -1) {
|
||||
activeNode = manager.getNode(graphState.activeNodeId);
|
||||
} else {
|
||||
} else if (activeNode) {
|
||||
activeNode = undefined;
|
||||
}
|
||||
});
|
||||
@@ -64,7 +64,7 @@
|
||||
});
|
||||
|
||||
manager.on("settings", (_settings) => {
|
||||
settingTypes = _settings.types;
|
||||
settingTypes = { ...settingTypes, ..._settings.types };
|
||||
settings = _settings.values;
|
||||
});
|
||||
|
||||
|
@@ -31,7 +31,7 @@
|
||||
}
|
||||
|
||||
let value = $state(getDefaultValue());
|
||||
$inspect({ nodeId: node.type, id, value });
|
||||
|
||||
$effect(() => {
|
||||
if (value !== undefined && node?.props?.[id] !== value) {
|
||||
node.props = { ...node.props, [id]: value };
|
||||
|
Reference in New Issue
Block a user