diff --git a/src/circle.rs b/src/circle.rs index 91da5c4..71cde03 100644 --- a/src/circle.rs +++ b/src/circle.rs @@ -55,6 +55,12 @@ impl Circle { debug!("bb: {}..{} {}..{}",bb.left(), bb.right(), bb.top(), bb.bottom() ); + if bb.width() > 2048.0 || bb.height() > 2048.0 { + // BUG: intial window size for wasm32 target tends to be significantly + // wider than in reality + return Circle::default() + } + Self { r: rand::thread_rng().gen_range(20.0..50.0), c: Pos2 {