Contents

SKCropNode

A node that masks pixels drawn by its children so that only some pixels are seen.

Declaration

class SKCropNode

Mentioned in

Overview

SKCropNode is a container node that you use to crop other nodes in the scene. You add other nodes to a crop node and set the crop node’s maskNode property. For example, here are some ways you might specify a mask:

  • An untextured sprite that limits content to a rectangular portion of the scene.

  • A textured sprite that works as a precise per-pixel mask.

  • A collection of child nodes that form a unique shape.

You can animate the shape or contents of the mask to implement interesting effects such as hiding or revealing.

Topics

First Steps

Setting the Mask Filter

See Also

Nodes that Modify Drawing