bevy-website
bevy-website copied to clipboard
Canvas scaling on the example pages breaks mouse click events
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:
- Disable canvas scaling for examples that care about absolute mouse position and go back to a fixed size canvas.
- Flag examples that care about absolute mouse position and add a warning to their page (maybe with a link to this issue).
- 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
Closing as fixed, although we may need to redeploy.
to use https://github.com/bevyengine/bevy/pull/4726 on the website we will need to update some things on this side