cross

A plus-shaped cross with four equal arms.

cross(x: Val, y: Val, size: Val, thickness: Val, rounding: Val): Expr

Import shape from shaders/std and use shape.cross.

size is the arm half-length (centre to an arm's end), thickness the arm half-width, both in uv. rounding rounds the corners. Rotate it 45° for an X.

Parameters

NameTypeNotes
xVal
yVal
sizeVal
thicknessVal
roundingVal

Example

shape: {distance: ({x, y}, u) => cross(x, y, u('radius'), u('thickness'), u('rounding')), …}

See also

Used by

Cross