Skip to content
This is the alpha v4 version website. Looking for the v3 documentation?

EdgeExtremity

Defined in: packages/sigma/src/rendering/edges/types.ts:203

EdgeExtremity - defines head or tail decorations for edges.

Extremities are rendered using SDF (Signed Distance Field) functions in the fragment shader, allowing smooth anti-aliased rendering.

Properties

attributes

attributes: AttributeSpecification[]

Defined in: packages/sigma/src/rendering/edges/types.ts:269

Additional per-edge attributes required by this extremity.


baseRatio?

optional baseRatio?: number

Defined in: packages/sigma/src/rendering/edges/types.ts:259

Ratio of the extremity length (from base toward tip) where the body SDF union is applied for seamless anti-aliasing at the junction.

  • 0: No union (may cause gap at junction)
  • 0.5: Union for first 50% of extremity (default)
  • 1: Union for entire extremity (may affect tip shape)

Default: 0.5


glsl

glsl: string

Defined in: packages/sigma/src/rendering/edges/types.ts:222

GLSL code defining the extremity SDF function.

Function signature: float extremity_{name}(vec2 uv, …)

where uv is the local coordinate relative to the extremity center, normalized so the edge thickness corresponds to [-0.5, 0.5] in the perpendicular direction.

Returns: signed distance (negative inside, positive outside)


length

length: ValueSource<number>

Defined in: packages/sigma/src/rendering/edges/types.ts:231

Length of the extremity beyond the edge body, relative to edge thickness. Can be a constant or read from a per-edge attribute.

For example, an arrow with lengthRatio=2.5 extends 2.5 * thickness beyond where the edge body ends.


margin?

optional margin?: ValueSource<number>

Defined in: packages/sigma/src/rendering/edges/types.ts:247

Margin from node boundary in pixels. The edge (including extremity) stops this many pixels away from the node. Can be a constant or read from a per-edge attribute.


name

name: string

Defined in: packages/sigma/src/rendering/edges/types.ts:208

Unique identifier for this extremity type (e.g., “none”, “arrow”, “diamond”). Used to generate GLSL function names: extremity_{name}


uniforms

uniforms: UniformSpecification[]

Defined in: packages/sigma/src/rendering/edges/types.ts:264

Additional uniforms required by this extremity.


widthFactor

widthFactor: number

Defined in: packages/sigma/src/rendering/edges/types.ts:240

Width factor of the extremity relative to edge thickness. Used to allocate vertex space for the extremity.

For example, an arrow with widthFactor=2.0 needs 2x the edge thickness in the perpendicular direction.