Fix for Tiling Sprites that use trimmed frames. Before they would use the trimmed frame size, rather than the actual frame size. This updates generateTilingTexture to resolve it.

This commit is contained in:
photonstorm 2014-02-13 22:51:05 +00:00
parent 49c2ce1ca0
commit 661c5bc137

View file

@ -371,8 +371,16 @@ PIXI.TilingSprite.prototype.generateTilingTexture = function(forcePowerOfTwo)
{
if(isFrame)
{
targetWidth = frame.width;
targetHeight = frame.height;
if (texture.trim)
{
targetWidth = texture.trim.width;
targetHeight = texture.trim.height;
}
else
{
targetWidth = frame.width;
targetHeight = frame.height;
}
newTextureRequired = true;
}