Shared implementation of the mask setter (push layer).
createjs clips with a mask only while its graphics is set (the Shape's
graphics setter keeps the Pixi mask in step with that), and never draws a
mask shape that is on no display list. The mask's node is kept in the
masked node's parent node, so that it is transformed in the same space as
createjs transforms the mask. When no masked node uses a mask any more and
the mask shape is on no createjs display list, its node is taken out of
the Pixi tree: Pixi makes a node drawable again when it stops being a mask.
Shared implementation of the mask setter (push layer).
createjs clips with a mask only while its
graphicsis set (the Shape's graphics setter keeps the Pixi mask in step with that), and never draws a mask shape that is on no display list. The mask's node is kept in the masked node's parent node, so that it is transformed in the same space as createjs transforms the mask. When no masked node uses a mask any more and the mask shape is on no createjs display list, its node is taken out of the Pixi tree: Pixi makes a node drawable again when it stops being a mask.