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 bounds calculation in getFrameBounds #7085

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jjcapellan
Copy link
Contributor

Please do not update the README or Change Log, we will do this when we merge your PR.

This PR (delete as applicable)

  • Fixes a bug

Describe the changes below:
The range of the loop in Texture#getFrameBounds has been adjusted to not include the last frame (__BASE), as it caused an incorrect calculation of the bounds (allways {x:0, y:0, w: textureWidth, h: textureHight}).
You can see the problem in this code: https://phaser.io/sandbox/tqnwvEda . If the texture comes from an atlas frame, the framebounds of the texture should be the same as the bounds of the atlas frame.

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.

1 participant