From 1da13523ea3fca20e9ee99213660d08c80809b2e Mon Sep 17 00:00:00 2001 From: Max Richter Date: Wed, 17 Apr 2024 16:39:56 +0200 Subject: [PATCH] feat: some stuff --- Cargo.lock | 7 +++ app/src/lib/viewer/Scene.svelte | 2 +- app/src/lib/viewer/Viewer.svelte | 32 ++++++------ nodes/max/plantarium/box/src/lib.rs | 38 +++++++------- packages/utils/Cargo.toml | 1 + .../utils/src/geometry/calculate_normals.rs | 50 +++++++++++++++++++ packages/utils/src/geometry/extrude_path.rs | 1 - packages/utils/src/geometry/mod.rs | 3 ++ packages/utils/src/lib.rs | 1 + 9 files changed, 99 insertions(+), 36 deletions(-) create mode 100644 packages/utils/src/geometry/calculate_normals.rs create mode 100644 packages/utils/src/geometry/mod.rs diff --git a/Cargo.lock b/Cargo.lock index adf7ed0..b533c80 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -85,6 +85,12 @@ dependencies = [ "rand", ] +[[package]] +name = "glam" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e05e7e6723e3455f4818c7b26e855439f7546cf617ef669d1adedb8669e5cb9" + [[package]] name = "itoa" version = "1.0.11" @@ -364,6 +370,7 @@ version = "0.1.0" dependencies = [ "console_error_panic_hook", "gl_matrix", + "glam", "serde", "serde_json", "wasm-bindgen", diff --git a/app/src/lib/viewer/Scene.svelte b/app/src/lib/viewer/Scene.svelte index ed66fc0..bce3062 100644 --- a/app/src/lib/viewer/Scene.svelte +++ b/app/src/lib/viewer/Scene.svelte @@ -34,7 +34,7 @@ - + {:else} diff --git a/app/src/lib/viewer/Viewer.svelte b/app/src/lib/viewer/Viewer.svelte index c950ed3..c829f8a 100644 --- a/app/src/lib/viewer/Viewer.svelte +++ b/app/src/lib/viewer/Viewer.svelte @@ -1,12 +1,7 @@