crispStroke
A clean outline of a shape, or a drawn curve, of a given width.
crispStroke(opts: {distance: Expr; width: Expr | number; footprint: Expr | number}): Expr
Import mask from shaders/std and use mask.crispStroke.
distance is a signed distance to the shape's edge or to the curve. The stroke is centered on the edge and width wide, in the distance's units. footprint blends the stroke's own edges, as in crispFill.
Parameters
| Name | Type | Notes |
|---|---|---|
opts | {distance: Expr; width: Expr | number; footprint: Expr | number} |
Example
const outline = mask.crispStroke({distance: shape.circle(x, y, radius), width: params.uniforms.lineWidth, footprint: px})
See also
crispFill— A clean fill of a shape: 1 inside, 0 outside.