dyna3/app-proto/sketch-outline/src/assembly.rs

18 lines
460 B
Rust
Raw Normal View History

2024-09-13 00:40:34 -07:00
use nalgebra::DVector;
use rustc_hash::FxHashMap;
2024-09-13 00:40:34 -07:00
use sycamore::reactive::Signal;
#[derive(Clone, PartialEq)]
pub struct Element {
pub id: String,
pub label: String,
pub color: [f32; 3],
pub rep: DVector<f64>
2024-09-13 00:40:34 -07:00
}
// a complete, view-independent description of an assembly
#[derive(Clone)]
2024-09-13 00:40:34 -07:00
pub struct Assembly {
// the order of the elements is arbitrary, and it could change at any time
pub elements: Signal<FxHashMap<String, Element>>
2024-09-13 00:40:34 -07:00
}