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

Make Texture.add() firstFrame check more explicit (Fix issue #4088) #4089

Merged
merged 1 commit into from Apr 8, 2019
Merged

Make Texture.add() firstFrame check more explicit (Fix issue #4088) #4089

merged 1 commit into from Apr 8, 2019

Conversation

Cirras
Copy link
Contributor

@Cirras Cirras commented Oct 4, 2018

Fixes issue #4088 where a SpriteSheet created from a trimmed texture atlas frame returns the second frame when the first frame is requested.

This PR

  • Fixes a bug

Describe the changes below:
-Made simple change to Texture.add() that will prevent the second frame from being selected as the firstFrame in the event that __BASE texture does not exist.

Fixes issue #4088 where a SpriteSheet created from a trimmed texture atlas frame returns the second frame when the first frame is requested.
@photonstorm
Copy link
Collaborator

This is now fixed (albeit indirectly) because the sprite sheet parser now automatically creates a __BASE entry, where it didn't before. However, I like this checking approach better anyway, so am going to merge it anyway.

@photonstorm photonstorm merged commit 56babb5 into phaserjs:master Apr 8, 2019
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