summaryrefslogtreecommitdiff
path: root/WebInterface/wasm/asm-paint/src/app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'WebInterface/wasm/asm-paint/src/app.rs')
-rw-r--r--WebInterface/wasm/asm-paint/src/app.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/WebInterface/wasm/asm-paint/src/app.rs b/WebInterface/wasm/asm-paint/src/app.rs
new file mode 100644
index 0000000..005764d
--- /dev/null
+++ b/WebInterface/wasm/asm-paint/src/app.rs
@@ -0,0 +1,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");
+ }
+}