bug: wasm32 initsl window size
This commit is contained in:
parent
7ef3ef775f
commit
292dfb8ee3
@ -55,6 +55,12 @@ impl Circle {
|
|||||||
|
|
||||||
debug!("bb: {}..{} {}..{}",bb.left(), bb.right(), bb.top(), bb.bottom() );
|
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 {
|
Self {
|
||||||
r: rand::thread_rng().gen_range(20.0..50.0),
|
r: rand::thread_rng().gen_range(20.0..50.0),
|
||||||
c: Pos2 {
|
c: Pos2 {
|
||||||
|
Loading…
Reference in New Issue
Block a user