Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix example canvas growing on resize #640

Merged
merged 2 commits into from
May 19, 2023

Conversation

tim-blackbird
Copy link
Contributor

Prevent the fit_canvas_to_parent setting from growing the canvas by locking the aspect ratio to that of the initial resolution of the bevy Window.

Fixes #432.

@mockersf
Copy link
Member

Could you also do this fix on https://github.com/bevyengine/bevy-website/blob/main/templates/example-webgpu.html?

Use single quotes instead to match existing code.
Move progress bar variable declarations.
@tim-blackbird
Copy link
Contributor Author

Done. Might deduplicate this later since we have a templating system already.

@cart cart added this pull request to the merge queue May 19, 2023
Merged via the queue into bevyengine:main with commit 9695ac0 May 19, 2023
@mockersf
Copy link
Member

Done. Might deduplicate this later since we have a templating system already.

Definitely! After the 0.11 release. The WebGL2 example should become closer to the WebGPU page, list every example with wasm = true, use screenshots, ... Right now it would be cheating as the screenshots used for WebGPU are from the 0.11. And the script is not yet available on the latest branch anyway.

@tim-blackbird tim-blackbird deleted the fix-growing-example-canvas branch July 8, 2023 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Example canvas now grows on each resize
3 participants