sdfSquare
sdfSquare(
options?):SDFShape
Defined in: packages/sigma/src/rendering/nodes/shapes/square.ts:45
Creates a square/rounded rectangle SDF shape.
Parameters
Section titled “Parameters”options?
Section titled “options?”Configuration options for the square
Returns
Section titled “Returns”Square SDF shape definition
Example
Section titled “Example”// Sharp squareconst square = sdfSquare();
// Rounded squareconst rounded = sdfSquare({ cornerRadius: 0.2 });
// Rotated square (45 degrees)const diamond = sdfSquare({ rotation: Math.PI / 4 });