mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-28 11:48:12 +08:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user