Plush

MaskRect2D#

PlushEngine · Type index

Namespace: PlushEngine

A Mask 2D component: a sprite whose alpha, stretched over a Width × Height rectangle centred on the object, shapes everything the object and its descendants draw (a minimap disc, a torn-paper edge, a fade). Where the alpha is 0 nothing shows; outside the rectangle nothing shows. A soft, arbitrary-shape counterpart of Clip 2D, sampled in the shader rather than through a stencil.

public sealed record MaskRect2D(SpritePixels? Sprite, float Width, float Height)

Record properties#

PropertyTypeAccessConstructor default
SpriteSpritePixels?get; init;required
Widthfloatget; init;required
Heightfloatget; init;required

SpritePixels

Source#