use nalgebra::DVector; use rustc_hash::FxHashSet; 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, pub constraints: FxHashSet } pub struct Constraint { pub args: (usize, usize), pub rep: f64 } // a complete, view-independent description of an assembly #[derive(Clone)] pub struct Assembly { pub elements: Signal>, pub constraints: Signal> }