diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 66162a9..2f58716 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -61,6 +61,15 @@ this.tint = 0xFFFFFF; /** + * The previous tint applied to the graphic shape. Used to compare to the current tint and check if theres change. + * + * @member {number} + * @private + * @default 0xFFFFFF + */ + this._prevTint = 0xFFFFFF; + + /** * The blend mode to be applied to the graphic shape. Apply a value of blendModes.NORMAL to reset the blend mode. * * @member {number} @@ -742,6 +751,12 @@ return; } + // if the tint has changed, set the graphics object to dirty. + if (this._prevTint !== this.tint) { + this.dirty = true; + this._prevTint = this.tint; + } + if (this._cacheAsBitmap) { if (this.dirty || this.cachedSpriteDirty)