Rework the ToolState and integrate it into the Editor struct (#48)

* Rework the ToolState and integrate it into the Editor struct

* Add asset manager sources to docs outline
This commit is contained in:
TrueDoctor
2021-03-27 22:02:01 +01:00
committed by GitHub
parent 4035138044
commit 04dc05e575
5 changed files with 91 additions and 42 deletions
+5
View File
@@ -4,8 +4,13 @@ pub mod viewport;
pub mod window;
pub mod wrappers;
use graphite_editor_core::Editor;
use std::cell::RefCell;
use wasm_bindgen::prelude::*;
// the thread_local macro provides a way to initialize static variables with non-constant functions
thread_local! {pub static EDITOR_STATE: RefCell<Editor> = RefCell::new(Editor::new())}
#[wasm_bindgen(start)]
pub fn init() {
utils::set_panic_hook();