summaryrefslogtreecommitdiff
path: root/WebInterface/wasm/asm-paint/src/app.rs
blob: 005764d0abf82c92b9eef9e2eb99cbde7277c611 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use crate::site::Site;

pub struct App {
    site: Site,
}

impl App {
    pub fn new() -> Option<Self> {
        Some(Self {
            site: Site::from_current()?,
        })
    }

    pub fn run(&mut self) {
        let mut canvas = self.site.create_canvas().unwrap();
        canvas.init().unwrap();
        info!("canvas initialisation was succuessfull");
    }
}