checkerCells
A checkerboard mask: 1 on one set of squares, 0 on the other, with clean edges at any size.
checkerCells(slots: {cells: PropRef; softness: PropRef}): PatternPaint
Import patterns from shaders/std and use patterns.checkerCells.
cells counts squares along the canvas height (squares stay square as the canvas resizes). softness 0–1 blurs the edges; 0 is crisp. Color it with strokeOver.
Parameters
| Name | Type | Notes |
|---|---|---|
slots | {cells: PropRef; softness: PropRef} |
Example
paint: strokeOver({fill: p('colorA'), stroke: p('colorB'), mask: checkerCells({cells: p('cells'), softness: p('softness')}), space: p('colorSpace')})
Tip. Stays sharp inside a distortion, which makes it a good test pattern for warps.
See also
stripeBands— A mask of straight parallel stripes that scroll with the layer's clock.gridLines— Square grid lines drawn in acellFrame, plus a per-cell shade for the fill.strokeOver— Two colors mixed through a mask:fillwhere the mask is 0,strokewhere it is 1.