You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/display/mask/GeometryMask.js
+23-4Lines changed: 23 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@ var Class = require('../../utils/Class');
9
9
/**
10
10
* @classdesc
11
11
* A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect a visible pixel from the geometry mask. The mask is essentially a clipping path which can only make a masked pixel fully visible or fully invisible without changing its alpha (opacity).
12
-
*
12
+
*
13
13
* A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s) should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and alpha of the pixel from the Geometry Mask do not matter.
14
-
*
14
+
*
15
15
* The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects. Moving or transforming the underlying Graphics object will change the mask (and affect the visibility of any masked objects), whereas moving or transforming a masked object will not affect the mask. You can think of the Geometry Mask (or rather, of the its Graphics object) as an invisible curtain placed in front of all masked objects which has its own visual properties and, naturally, respects the camera's visual properties, but isn't affected by and doesn't follow the masked objects by itself.
16
16
*
17
17
* @class GeometryMask
@@ -36,6 +36,16 @@ var GeometryMask = new Class({
36
36
* @since 3.0.0
37
37
*/
38
38
this.geometryMask=graphicsGeometry;
39
+
40
+
/**
41
+
* Similiar to the BitmapMasks invertAlpha setting this to true will then hide all pixels
0 commit comments