zigzagBands
A mask of chevron (zigzag) stripes that scroll with the layer's clock.
zigzagBands(slots: {
count: PropRef
angle: PropRef
balance: PropRef
softness: PropRef
offset: PropRef
}): PatternPaint
Import patterns from shaders/std and use patterns.zigzagBands.
count is the number of stripe pairs across the canvas. angle is in degrees. balance 0–1 is how much of each pair is the 0 side. softness 0–1 blurs the edges. offset shifts the phase; 1 is one whole pair. Declare animatedTime: {speed: 'speed'} on the definition.
Parameters
| Name | Type | Notes |
|---|---|---|
slots | `{ |
count: PropRef
angle: PropRef
balance: PropRef
softness: PropRef
offset: PropRef
}` | |
Example
const bands = zigzagBands({count: p('count'), angle: p('angle'), balance: p('balance'), softness: p('softness'), offset: p('offset')})
Tip. Reuse one
bandsvalue for both the color mix and an alpha mix. It is evaluated once.
See also
stripeBands— A mask of straight parallel stripes that scroll with the layer's clock.checkerCells— A checkerboard mask: 1 on one set of squares, 0 on the other, with clean edges at any size.