Easily create invisible masks to clip sprites, 9 patch, text and other common objects.
The plugin uses blend modes to mask objects.
It automatically creates the sublayers at runtime, and sets up force own textures, moves objects to the correct layer and z order.
It sets blend modes depending on if you want the clipping inside the mask, or outside the mask.
It allow multiple masks on the same layer.
Super simple to use. Just add the sprite or 9 patch to a layer, set it as a mask, then set other sprites, 9 patch or text to be clipped. That's it!
+ System: On start of layout
// first place the easyMask object on the layer you wish to be the mask layer. It must be a new transparent layer.
The plugin will then generate sublayers on that layer at runtime. These are the mask layers. The plugin automatically sets up blend modes etc for you.
----+ (no conditions)
----// make the mask object. This can be a sprite or 9 slice. The object is then moved to the new correct sub layer for you.
-----> easyMask: Set mask shape to maskShape
----// now select a shape you want to be masked.
-----> easyMask: Mask objects Sprite
----// decide what mask you want. does the shape want to be clipped inside the mask shape or out side?
-----> easyMask: Set mask mode to Hole Punch (Erase inside)