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

small bugfix in roundPixels so it now also works smoothly with hires enabled #209

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stephanvermeire
Copy link
Contributor

Sprites now move really with one pixel at a time then roundPixels=true exabled.

@ekelokorpi
Copy link
Owner

Thanks for the PR! All pull requests should go to the develop branch: https://github.com/ekelokorpi/panda-engine/tree/develop

Could you explain your code changes a bit? I'm not sure if i understand it correctly.

For example this new line:
tx = Math.round(tx * game.scale)/game.scale;

Now if the game.scale value is 2, that line would not change the value at all, so it's doing the rounding for nothing?

Example:
Math.round(1.5 * 2) / 2 would result value 1.5

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.

None yet

2 participants