From f312f885c78e03935ebebbd269e1e2cdc3fb87ea Mon Sep 17 00:00:00 2001 From: Max Richter Date: Wed, 13 Mar 2024 19:41:52 +0100 Subject: [PATCH] wip: box selection --- .../src/lib/components/BoxSelection.svelte | 40 +++++++++++++++++++ frontend/src/lib/components/Camera.svelte | 3 +- .../src/lib/components/graph/Graph.svelte | 16 ++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 frontend/src/lib/components/BoxSelection.svelte diff --git a/frontend/src/lib/components/BoxSelection.svelte b/frontend/src/lib/components/BoxSelection.svelte new file mode 100644 index 0000000..1bf4b99 --- /dev/null +++ b/frontend/src/lib/components/BoxSelection.svelte @@ -0,0 +1,40 @@ + + + +
+ + + + + + + + + + + + diff --git a/frontend/src/lib/components/Camera.svelte b/frontend/src/lib/components/Camera.svelte index 1b8a475..a41c3b5 100644 --- a/frontend/src/lib/components/Camera.svelte +++ b/frontend/src/lib/components/Camera.svelte @@ -2,7 +2,7 @@ import { T } from "@threlte/core"; import { OrbitControls } from "@threlte/extras"; import { onMount } from "svelte"; - import { type OrthographicCamera } from "three"; + import { MOUSE, type OrthographicCamera } from "three"; export let camera: OrthographicCamera | undefined = undefined; export let maxZoom = 150; @@ -57,6 +57,7 @@ +{#if boxSelection && mouseDown} + +{/if} + {#if $status === "idle"} {#if $activeSocket}