#![allow(dead_code)]
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
mod app;
mod breakout;
mod config;
mod connection;
mod force;
mod matrix;
mod model;
mod recording;
mod render;
mod resources;
mod serial_core;
mod style;
mod texture;
mod ui;
mod utils;
use app::EskinDesktopApp;
use eframe::egui;

fn main() -> eframe::Result<()> {
    env_logger::init();

    let window_icon = eframe::icon_data::from_png_bytes(include_bytes!("../res/128x128@2x.png"))
        .expect("load window icon failed");
    let options = eframe::NativeOptions {
        renderer: eframe::Renderer::Wgpu,
        viewport: egui::ViewportBuilder::default()
            .with_inner_size([1920.0, 1080.0])
            .with_min_inner_size([1280.0, 720.0])
            .with_decorations(false)
            .with_icon(window_icon),
        ..Default::default()
    };

    eframe::run_native(
        "Eskin 模型播放器",
        options,
        Box::new(|cc| Ok(Box::new(EskinDesktopApp::new(cc)))),
    )
}
