Skip to content

Commit

Permalink
Clarify that the object's mask must be in the subtree of its parent i…
Browse files Browse the repository at this point in the history
…n the docs (pixijs#8378)
  • Loading branch information
lazarljubenovic committed Jun 2, 2022
1 parent a804d7f commit 8042c00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/display/src/DisplayObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,9 @@ export abstract class DisplayObject extends EventEmitter
* Sets a mask for the displayObject. A mask is an object that limits the visibility of an
* object to the shape of the mask applied to it. In PixiJS a regular mask must be a
* {@link PIXI.Graphics} or a {@link PIXI.Sprite} object. This allows for much faster masking in canvas as it
* utilities shape clipping. To remove a mask, set this property to `null`.
* utilities shape clipping. Furthermore, a mask of an object must be in the subtree of its parent.
* Otherwise, `getLocalBounds` may calculate incorrect bounds, which makes the container's width and height wrong.
* To remove a mask, set this property to `null`.
*
* For sprite mask both alpha and red channel are used. Black mask is the same as transparent mask.
* @example
Expand Down

0 comments on commit 8042c00

Please sign in to comment.