Skip to content

Commit 0d7d828

Browse files
authored
Make Texture.add() firstFrame check more explicit
Fixes issue phaserjs#4088 where a SpriteSheet created from a trimmed texture atlas frame returns the second frame when the first frame is requested.
1 parent 2a1ea30 commit 0d7d828

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/textures/Texture.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ var Texture = new Class({
154154
// This is used to ensure we don't spam the display with entire
155155
// atlases of sprite sheets, but instead just the first frame of them
156156
// should the dev incorrectly specify the frame index
157-
if (this.frameTotal === 1)
157+
if (this.firstFrame === '__BASE')
158158
{
159159
this.firstFrame = name;
160160
}

0 commit comments

Comments
 (0)