mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 05:10:03 -04:00
Control the maximum egui web canvas size with App::max_size_points
This commit is contained in:
@@ -97,6 +97,12 @@ pub trait App {
|
||||
true
|
||||
}
|
||||
|
||||
/// The size limit of the web app canvas
|
||||
fn max_size_points(&self) -> egui::Vec2 {
|
||||
// Some browsers get slow with huge WebGL canvases, so we limit the size:
|
||||
egui::Vec2::new(1024.0, 2048.0)
|
||||
}
|
||||
|
||||
/// Background color for the app, e.g. what is sent to `gl.clearColor`.
|
||||
/// This is the background of your windows if you don't set a central panel.
|
||||
fn clear_color(&self) -> egui::Rgba {
|
||||
|
||||
Reference in New Issue
Block a user