MaskRect2D#
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#
| Property | Type | Access | Constructor default |
|---|---|---|---|
Sprite | SpritePixels? | get; init; | required |
Width | float | get; init; | required |
Height | float | get; init; | required |
Related types#
Source#
- RuntimeWorld.cs