bevy-website icon indicating copy to clipboard operation
bevy-website copied to clipboard

Canvas scaling on the example pages breaks mouse click events

Open cart opened this issue 2 years ago • 2 comments

In retrospect, this makes sense given that we're working around winit by scaling the canvas directly. I don't think we should revert canvas scaling, as it makes the examples visible on mobile / smaller screens and that feels worth it to me.

This seems like it would properly fix our problem, if merged: https://github.com/rust-windowing/winit/pull/2074

In the interim, we should consider "mitigating quality perception damage". Some ideas:

  1. Disable canvas scaling for examples that care about absolute mouse position and go back to a fixed size canvas.
  2. Flag examples that care about absolute mouse position and add a warning to their page (maybe with a link to this issue).
  3. Just remove examples that care about absolute mouse position until we have a fix.

https://user-images.githubusercontent.com/2694663/167921270-7483febf-cf9b-4bf8-9d47-62e87a5ed35b.mp4

cart avatar May 11 '22 18:05 cart

Closing as fixed, although we may need to redeploy.

alice-i-cecile avatar Jun 08 '22 19:06 alice-i-cecile

to use https://github.com/bevyengine/bevy/pull/4726 on the website we will need to update some things on this side

mockersf avatar Jun 08 '22 21:06 mockersf