Fixed bug where mask was not being applied to tilingSprite in canvas renderer
This commit is contained in:
parent
b0a3ff9447
commit
2e0b26d765
3 changed files with 21 additions and 1 deletions
|
@ -8050,6 +8050,11 @@ PIXI.TilingSprite.prototype._renderCanvas = function(renderSession)
|
|||
|
||||
var context = renderSession.context;
|
||||
|
||||
if(this._mask)
|
||||
{
|
||||
renderSession.maskManager.pushMask(this._mask, context);
|
||||
}
|
||||
|
||||
context.globalAlpha = this.worldAlpha;
|
||||
|
||||
|
||||
|
@ -8094,6 +8099,11 @@ PIXI.TilingSprite.prototype._renderCanvas = function(renderSession)
|
|||
context.translate(-tilePosition.x, -tilePosition.y);
|
||||
|
||||
context.closePath();
|
||||
|
||||
if(this._mask)
|
||||
{
|
||||
renderSession.maskManager.popMask(renderSession.context);
|
||||
}
|
||||
};
|
||||
|
||||
PIXI.TilingSprite.prototype.getBounds = function()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue