mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
Rename Egui to egui
Also update iamges in README.md
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
name = "egui_web"
|
||||
version = "0.7.0"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
description = "Bindings for compiling Egui code to WASM for a web page"
|
||||
description = "Bindings for compiling egui code to WASM for a web page"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
homepage = "https://github.com/emilk/egui"
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
|
||||
# egui_web
|
||||
|
||||
This crates allows you to compile GUI code written with [Egui](https://crates.io/crates/egui) to [WASM](https://en.wikipedia.org/wiki/WebAssembly) to run on a web page.
|
||||
This crates allows you to compile GUI code written with [egui](https://crates.io/crates/egui) to [WASM](https://en.wikipedia.org/wiki/WebAssembly) to run on a web page.
|
||||
|
||||
Check out [egui_template](https://github.com/emilk/egui_template) for an example of how to set it up.
|
||||
|
||||
@@ -456,7 +456,7 @@ fn install_document_events(runner_ref: &AppRunnerRef) -> Result<(), JsValue> {
|
||||
|
||||
let prevent_default = if matches!(event.key().as_str(), "Tab") {
|
||||
// Always prevent moving cursor to url bar.
|
||||
// Egui wants to use tab to move to the next text field.
|
||||
// egui wants to use tab to move to the next text field.
|
||||
true
|
||||
} else if egui_wants_keyboard {
|
||||
matches!(
|
||||
|
||||
@@ -39,7 +39,7 @@ const VERTEX_SHADER_SOURCE: &str = r#"
|
||||
1.0 - 2.0 * a_pos.y / u_screen_size.y,
|
||||
0.0,
|
||||
1.0);
|
||||
// Egui encodes vertex colors in gamma spaces, so we must decode the colors here:
|
||||
// egui encodes vertex colors in gamma spaces, so we must decode the colors here:
|
||||
v_rgba = linear_from_srgba(a_srgba);
|
||||
v_tc = a_tc;
|
||||
}
|
||||
@@ -484,7 +484,7 @@ impl crate::Painter for WebGlPainter {
|
||||
let gl = &self.gl;
|
||||
|
||||
gl.enable(Gl::SCISSOR_TEST);
|
||||
gl.disable(Gl::CULL_FACE); // Egui is not strict about winding order.
|
||||
gl.disable(Gl::CULL_FACE); // egui is not strict about winding order.
|
||||
gl.enable(Gl::BLEND);
|
||||
gl.blend_func(Gl::ONE, Gl::ONE_MINUS_SRC_ALPHA); // premultiplied alpha
|
||||
gl.use_program(Some(&self.program));
|
||||
|
||||
@@ -41,7 +41,7 @@ const VERTEX_SHADER_SOURCE: &str = r#"
|
||||
1.0 - 2.0 * a_pos.y / u_screen_size.y,
|
||||
0.0,
|
||||
1.0);
|
||||
// Egui encodes vertex colors in gamma spaces, so we must decode the colors here:
|
||||
// egui encodes vertex colors in gamma spaces, so we must decode the colors here:
|
||||
v_rgba = linear_from_srgba(a_srgba);
|
||||
v_tc = a_tc;
|
||||
}
|
||||
@@ -473,7 +473,7 @@ impl crate::Painter for WebGl2Painter {
|
||||
let gl = &self.gl;
|
||||
|
||||
gl.enable(Gl::SCISSOR_TEST);
|
||||
gl.disable(Gl::CULL_FACE); // Egui is not strict about winding order.
|
||||
gl.disable(Gl::CULL_FACE); // egui is not strict about winding order.
|
||||
gl.enable(Gl::BLEND);
|
||||
gl.blend_func(Gl::ONE, Gl::ONE_MINUS_SRC_ALPHA); // premultiplied alpha
|
||||
gl.use_program(Some(&self.program));
|
||||
|
||||
Reference in New Issue
Block a user