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

Player-related code that should be improved #8616

Open
1 of 9 tasks
litetex opened this issue Jul 12, 2022 · 1 comment
Open
1 of 9 tasks

Player-related code that should be improved #8616

litetex opened this issue Jul 12, 2022 · 1 comment
Labels
codequality Improvements to the codebase to improve the code quality help wanted Help is wanted in fixing this issue player Issues related to any player (main, popup and background) rewrite Issues and PRs related to rewrite

Comments

@litetex
Copy link
Member

litetex commented Jul 12, 2022

I and Stypox noticed some strange things while reviewing/refactoring the player #8170 (which were also there before the refactoring):

Other things to do:

@litetex litetex added player Issues related to any player (main, popup and background) codequality Improvements to the codebase to improve the code quality labels Jul 12, 2022
@litetex litetex changed the title Player-related codethat should be improved Player-related code that should be improved Jul 12, 2022
@Stypox Stypox added the help wanted Help is wanted in fixing this issue label Jul 18, 2022
@J-Stutzmann
Copy link
Contributor

I think I have a decent explanation for what item 2 is/does:

  • For a given velocityX and velocityY of a popup:
  • if the Magnitude of either is greater than TOSS_FLING_VELOCITY:
  • for each that is greater, set the axial position of the popup (playerUi.popupLayoutParams.*) to the rounded Value of its co-axial velocity (velocity*)
  • clamp popup position into popupLayoutParams width/height

What this does, for a well chosen TOSS_FLING_VELOCITY that:

  • As a velocity is high, but attainable
  • As a position lies outside the popupLayoutParams width/height when either negative or positive

is to snap a flung popup to the edge of what popupLayoutParams says is the available space in the (approximate) direction it was sent.

@ShareASmile ShareASmile added the rewrite Issues and PRs related to rewrite label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codequality Improvements to the codebase to improve the code quality help wanted Help is wanted in fixing this issue player Issues related to any player (main, popup and background) rewrite Issues and PRs related to rewrite
Projects
None yet
Development

No branches or pull requests

4 participants