From 5f2b2f59beda44cb8de244707fdc25e82ef8c696 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Thu, 21 Mar 2024 16:31:17 +0100 Subject: [PATCH] feat: improve performance by cachine edges --- frontend/package.json | 4 +- frontend/src/lib/components/edges/Edge.svelte | 96 +++++++++-------- .../components/edges/createEdgeGeometry.ts | 100 ++++++++++++++++++ frontend/src/lib/components/edges/utils.ts | 34 ++++++ .../src/lib/components/graph/Graph.svelte | 4 +- .../lib/components/node/NodeParameter.svelte | 37 ++++--- frontend/src/lib/graph-manager.ts | 15 +-- frontend/src/lib/runtime-executor.ts | 1 - frontend/src/routes/+page.svelte | 2 +- pnpm-lock.yaml | 18 ++++ 10 files changed, 237 insertions(+), 74 deletions(-) create mode 100644 frontend/src/lib/components/edges/createEdgeGeometry.ts create mode 100644 frontend/src/lib/components/edges/utils.ts diff --git a/frontend/package.json b/frontend/package.json index e319639..cbd34c0 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -21,7 +21,9 @@ "@threlte/flex": "^1.0.1", "@types/three": "^0.159.0", "jsondiffpatch": "^0.6.0", - "three": "^0.159.0" + "meshline": "^3.2.0", + "three": "^0.159.0", + "three.meshline": "^1.4.0" }, "devDependencies": { "@histoire/plugin-svelte": "^0.17.9", diff --git a/frontend/src/lib/components/edges/Edge.svelte b/frontend/src/lib/components/edges/Edge.svelte index 75f94ef..f4ab8c9 100644 --- a/frontend/src/lib/components/edges/Edge.svelte +++ b/frontend/src/lib/components/edges/Edge.svelte @@ -1,4 +1,4 @@ -