bevyengine / bevy_github_ci_template

Apache License 2.0
202 stars 45 forks source link

Large canvas not downsized properly when running wasm build in mobile on itch.io #69

Open claudijo opened 1 month ago

claudijo commented 1 month ago

I'm having trouble with the canvas overflowing when using this template targeting mobile devices and publishing on itch.io.

I'm quite sure the change in this PR https://github.com/bevyengine/bevy_github_ci_template/pull/44 previously fixed the issue and properly resized the canvas to fit smaller screens, by adding the css

 <style>
    html, body {margin:0;height:100%;}
  </style>

and configuring the window plugin to use fit_canvas_to_parent: true.

But something has changed 🤔 and this does not seem to help anymore as a canvas/window with dimensions larger then the target device will overflow and only show a cropped center part of the canvas/window content, when running on mobile on itch.io.

Anyone having the same issue (with itch.io in particular) and have found a workaround / fix?