dyna3/app-proto/src/main.rs

42 lines
749 B
Rust
Raw Normal View History

mod add_remove;
2024-09-13 00:40:34 -07:00
mod assembly;
2024-09-13 14:53:12 -07:00
mod display;
mod engine;
mod outline;
2024-09-13 00:40:34 -07:00
use rustc_hash::FxHashSet;
2024-09-13 00:40:34 -07:00
use sycamore::prelude::*;
use add_remove::AddRemove;
use assembly::Assembly;
2024-09-13 14:53:12 -07:00
use display::Display;
use outline::Outline;
#[derive(Clone)]
struct AppState {
assembly: Assembly,
selection: Signal<FxHashSet<usize>>
}
impl AppState {
fn new() -> AppState {
AppState {
assembly: Assembly::new(),
selection: create_signal(FxHashSet::default())
}
}
}
fn main() {
sycamore::render(|| {
provide_context(AppState::new());
view! {
div(id="sidebar") {
AddRemove {}
Outline {}
}
2024-09-13 14:53:12 -07:00
Display {}
}
});
}