forked from StudioInfinity/dyna3
App: store constraints
Draft listing of constraints in outline view.
This commit is contained in:
parent
147e275823
commit
050e2373a6
4 changed files with 89 additions and 51 deletions
|
@ -21,7 +21,8 @@ fn main() {
|
|||
sycamore::render(|| {
|
||||
let state = AppState {
|
||||
assembly: Assembly {
|
||||
elements: create_signal(Slab::new())
|
||||
elements: create_signal(Slab::new()),
|
||||
constraints: create_signal(Slab::new())
|
||||
},
|
||||
selection: create_signal(FxHashSet::default())
|
||||
};
|
||||
|
@ -31,7 +32,13 @@ fn main() {
|
|||
id: String::from("wing_a"),
|
||||
label: String::from("Wing A"),
|
||||
color: [1.00_f32, 0.25_f32, 0.00_f32],
|
||||
rep: DVector::<f64>::from_column_slice(&[0.5, 0.5, 0.0, 0.5, -0.25])
|
||||
rep: DVector::<f64>::from_column_slice(&[0.5, 0.5, 0.0, 0.5, -0.25]),
|
||||
constraints: {
|
||||
let mut set = FxHashSet::default();
|
||||
set.insert(1);
|
||||
set.insert(2);
|
||||
set
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
|
@ -41,7 +48,8 @@ fn main() {
|
|||
id: String::from("wing_b"),
|
||||
label: String::from("Wing B"),
|
||||
color: [0.00_f32, 0.25_f32, 1.00_f32],
|
||||
rep: DVector::<f64>::from_column_slice(&[-0.5, -0.5, 0.0, 0.5, -0.25])
|
||||
rep: DVector::<f64>::from_column_slice(&[-0.5, -0.5, 0.0, 0.5, -0.25]),
|
||||
constraints: FxHashSet::default()
|
||||
},
|
||||
)
|
||||
);
|
||||
|
@ -51,7 +59,8 @@ fn main() {
|
|||
id: String::from("central"),
|
||||
label: String::from("Central"),
|
||||
color: [0.75_f32, 0.75_f32, 0.75_f32],
|
||||
rep: DVector::<f64>::from_column_slice(&[0.0, 0.0, 0.0, 0.4, -0.625])
|
||||
rep: DVector::<f64>::from_column_slice(&[0.0, 0.0, 0.0, 0.4, -0.625]),
|
||||
constraints: FxHashSet::default()
|
||||
}
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue