bug: wasm32 initsl window size

This commit is contained in:
djmil 2024-08-31 20:12:35 +02:00
parent 7ef3ef775f
commit 292dfb8ee3

View File

@ -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 {