From 8dced5896cabe6fd8a9ee28cb68beba113389656 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 17 Jul 2020 11:05:57 +0200 Subject: [PATCH] rename egui_wasm to egui_web --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- README.md | 2 +- build_wasm.sh => build_web.sh | 0 {egui_wasm => egui_web}/Cargo.toml | 2 +- {egui_wasm => egui_web}/src/lib.rs | 0 {egui_wasm => egui_web}/src/webgl.rs | 0 example_wasm/Cargo.toml | 2 +- example_wasm/src/lib.rs | 10 +++++----- 9 files changed, 11 insertions(+), 11 deletions(-) rename build_wasm.sh => build_web.sh (100%) rename {egui_wasm => egui_web}/Cargo.toml (96%) rename {egui_wasm => egui_web}/src/lib.rs (100%) rename {egui_wasm => egui_web}/src/webgl.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 423ef801..016f841c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -386,7 +386,7 @@ dependencies = [ ] [[package]] -name = "egui_wasm" +name = "egui_web" version = "0.1.0" dependencies = [ "egui 0.1.2", @@ -418,7 +418,7 @@ name = "example_wasm" version = "0.1.0" dependencies = [ "egui 0.1.2", - "egui_wasm 0.1.0", + "egui_web 0.1.0", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index c51c0bf3..42aeabf7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ members = [ "egui", "egui_glium", - "egui_wasm", + "egui_web", "example_glium", "example_wasm", ] diff --git a/README.md b/README.md index 27fecc08..64bf5c58 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Loop: ## Available backends: Wherever you can render textured triangles you can use Egui. -* WebAssembly (`egui_wasm`) for making a web app. [Click to run](https://emilk.github.io/emigui/index.html). +* WebAssembly (`egui_web`) for making a web app. [Click to run](https://emilk.github.io/emigui/index.html). * [Glium](https://github.com/glium/glium) for native apps (see example_glium). * [miniquad](https://github.com/not-fl3/emigui-miniquad) [web demo](https://not-fl3.github.io/miniquad-samples/emigui.html) [demo source](https://github.com/not-fl3/good-web-game/blob/master/examples/emigui.rs) diff --git a/build_wasm.sh b/build_web.sh similarity index 100% rename from build_wasm.sh rename to build_web.sh diff --git a/egui_wasm/Cargo.toml b/egui_web/Cargo.toml similarity index 96% rename from egui_wasm/Cargo.toml rename to egui_web/Cargo.toml index c461020f..f497fe5c 100644 --- a/egui_wasm/Cargo.toml +++ b/egui_web/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "egui_wasm" +name = "egui_web" version = "0.1.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" diff --git a/egui_wasm/src/lib.rs b/egui_web/src/lib.rs similarity index 100% rename from egui_wasm/src/lib.rs rename to egui_web/src/lib.rs diff --git a/egui_wasm/src/webgl.rs b/egui_web/src/webgl.rs similarity index 100% rename from egui_wasm/src/webgl.rs rename to egui_web/src/webgl.rs diff --git a/example_wasm/Cargo.toml b/example_wasm/Cargo.toml index 21899d9e..a81dd12b 100644 --- a/example_wasm/Cargo.toml +++ b/example_wasm/Cargo.toml @@ -14,4 +14,4 @@ serde_json = "1" wasm-bindgen = "0.2" egui = { path = "../egui" } -egui_wasm = { path = "../egui_wasm" } +egui_web = { path = "../egui_web" } diff --git a/example_wasm/src/lib.rs b/example_wasm/src/lib.rs index f1fd7663..8fbb4d6d 100644 --- a/example_wasm/src/lib.rs +++ b/example_wasm/src/lib.rs @@ -8,7 +8,7 @@ use { color::srgba, examples::ExampleApp, label, widgets::Separator, Align, RawInput, TextStyle, *, }, - egui_wasm::now_sec, + egui_web::now_sec, }; use wasm_bindgen::prelude::*; @@ -32,7 +32,7 @@ pub struct Web { pub struct State { example_app: ExampleApp, ctx: Arc, - webgl_painter: egui_wasm::webgl::Painter, + webgl_painter: egui_web::webgl::Painter, frame_times: egui::MovementTracker, } @@ -40,11 +40,11 @@ pub struct State { impl State { fn new(canvas_id: &str) -> Result { let ctx = Context::new(); - egui_wasm::load_memory(&ctx); + egui_web::load_memory(&ctx); Ok(State { example_app: Default::default(), ctx, - webgl_painter: egui_wasm::webgl::Painter::new(canvas_id)?, + webgl_painter: egui_web::webgl::Painter::new(canvas_id)?, frame_times: egui::MovementTracker::new(1000, 1.0), }) } @@ -102,7 +102,7 @@ impl State { self.ctx.pixels_per_point(), )?; - egui_wasm::save_memory(&self.ctx); // TODO: don't save every frame + egui_web::save_memory(&self.ctx); // TODO: don't save every frame Ok(output) }