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

f32 scale factor #8900

Closed
ickshonpe opened this issue Jun 20, 2023 · 2 comments
Closed

f32 scale factor #8900

ickshonpe opened this issue Jun 20, 2023 · 2 comments
Labels
A-Rendering Drawing game state to the screen A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change D-Trivial Nice and easy! A great choice to get started with Bevy M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide

Comments

@ickshonpe
Copy link
Contributor

What problem does this solve or what need does it fill?

UiScale and Window scale_factor are represented by f64s but it doesn't seem we get any tangible benefits from the extra precision.

What solution would you like?

Use f32s instead.

The conversions when we multiply by scale factor aren't a major source of complexity but Bevy UI has had a lot of bugs to do with scale factor and they've been reintroduced repeatedly. Any little thing that can be done to simplify how scale factor is used and reduce the confusion is worthwhile I think.

@ickshonpe ickshonpe added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Jun 20, 2023
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change D-Trivial Nice and easy! A great choice to get started with Bevy M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide and removed C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Jun 21, 2023
@thmsgntz
Copy link
Contributor

Hi :)
If it's okay, I would like to give it a try on this one for my first contribution!

thmsgntz added a commit to thmsgntz/bevy that referenced this issue Jun 24, 2023
thmsgntz added a commit to thmsgntz/bevy that referenced this issue Jun 30, 2023
tygyh pushed a commit to tygyh/bevy that referenced this issue Dec 6, 2023
@james7132
Copy link
Member

This was finished in #10897, but we forgot to close it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change D-Trivial Nice and easy! A great choice to get started with Bevy M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants