From 0d7d8283113fd9c33a99529eaeafa5b5eb8a169d Mon Sep 17 00:00:00 2001 From: Cirras Date: Fri, 5 Oct 2018 04:29:17 +1000 Subject: [PATCH] Make Texture.add() firstFrame check more explicit Fixes issue #4088 where a SpriteSheet created from a trimmed texture atlas frame returns the second frame when the first frame is requested. --- src/textures/Texture.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textures/Texture.js b/src/textures/Texture.js index 8d8d5f56d..efb04f7ca 100644 --- a/src/textures/Texture.js +++ b/src/textures/Texture.js @@ -154,7 +154,7 @@ var Texture = new Class({ // This is used to ensure we don't spam the display with entire // atlases of sprite sheets, but instead just the first frame of them // should the dev incorrectly specify the frame index - if (this.frameTotal === 1) + if (this.firstFrame === '__BASE') { this.firstFrame = name; }