refactor: move view logic inside graph.svelte

This commit is contained in:
2024-03-12 18:47:50 +01:00
parent af24b5cffe
commit 9241700ada
16 changed files with 465 additions and 384 deletions

View File

@ -10,26 +10,26 @@
const graph = GraphManager.createEmptyGraph({ width: 12, height: 12 });
graph.load();
onMount(async () => {
try {
const res = await invoke("greet", { name: "Dude" });
console.log({ res });
} catch (error) {
console.log(error);
}
try {
const res2 = await invoke("run_nodes", {});
console.log({ res2 });
} catch (error) {
console.log(error);
}
});
// onMount(async () => {
// try {
// const res = await invoke("greet", { name: "Dude" });
// console.log({ res });
// } catch (error) {
// console.log(error);
// }
//
// try {
// const res2 = await invoke("run_nodes", {});
// console.log({ res2 });
// } catch (error) {
// console.log(error);
// }
// });
</script>
<div>
<Canvas shadows={false} renderMode="on-demand">
<PerfMonitor />
<Canvas shadows={false} renderMode="on-demand" autoRender={true}>
<!-- <PerfMonitor /> -->
<Graph {graph} />
</Canvas>
</div>

View File

@ -23,3 +23,7 @@
:root {
font-family: 'Fira Code', monospace;
}
body {
overflow: hidden;
}