dyna3/app-proto/sketch-outline/src/assembly.rs
Aaron Fenyes 147e275823 App: don't bother copying key into element
When we access an element, we always have its key, either because the
slab iterator yielded it along side the element or because we used it to
get the element from the slab.
2024-09-22 02:38:17 -07:00

17 lines
No EOL
357 B
Rust

use nalgebra::DVector;
use slab::Slab;
use sycamore::reactive::Signal;
#[derive(Clone, PartialEq)]
pub struct Element {
pub id: String,
pub label: String,
pub color: [f32; 3],
pub rep: DVector<f64>
}
// a complete, view-independent description of an assembly
#[derive(Clone)]
pub struct Assembly {
pub elements: Signal<Slab<Element>>
}