Skip to content

Commit 9caa13e

Browse files
committed
Fixed TileSprite rendering issue.
1 parent 8a45ad2 commit 9caa13e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/pixi/extras/TilingSprite.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,8 @@ PIXI.TilingSprite.prototype.generateTilingTexture = function(forcePowerOfTwo)
404404
targetWidth = PIXI.getNextPowerOfTwo(frame.width);
405405
targetHeight = PIXI.getNextPowerOfTwo(frame.height);
406406

407-
if (frame.width !== targetWidth || frame.height !== targetHeight) newTextureRequired = true;
407+
// If the BaseTexture dimensions don't match the texture frame then we need a new texture anyway because it's part of a texture atlas
408+
if (frame.width !== targetWidth || frame.height !== targetHeight || texture.baseTexture.width !== targetWidth || texture.baseTexture.height || targetHeight) newTextureRequired = true;
408409
}
409410

410411
if (newTextureRequired)

0 commit comments

Comments
 (0)