Run Iris examples on desktop and Android

This commit is contained in:
iris committed 2026-09-11 11:33:04 -04:00
1 parent 37f956707e
commit b5666cdef9
25 files changed
+577 -205

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
use iris::prelude::*;
use winit::{dpi::LogicalSize, window::WindowAttributes};
#[path = "lib.rs"]
mod app;
use app::*;
#[derive(DesktopUiState)]
struct State {
ui_state: DesktopUiState,
}
impl DesktopAppState for State {
fn window_attributes() -> WindowAttributes {
WindowAttributes::default().with_inner_size(LogicalSize::new(420.0, 900.0))
}
fn new(mut ui_state: DesktopUiState, rsc: &mut StdRsc<Self>, _: Proxy<Self::Event>) -> Self {
build(rsc, &mut ui_state);
Self { ui_state }
}
}
fn main() {
DesktopApp::<State>::run();
}