Skip to content
sigma.js sigma.js
v4.0.6 Docs Examples GitHub 12.2K

pathLoop

pathLoop(options?): EdgePath

Defined in: packages/sigma/src/rendering/edges/paths/loop.ts:41

Creates a loop edge path for self-referencing edges.

The shape is a cubic Bézier that exits the node at loopAngle - spread/2 and re-enters at loopAngle + spread/2, with both tangents orthogonal to the node surface. The bulge extends outward by loopRadius node-radii.

Per-edge attributes:

  • loopRadius: how far the loop extends (multiplier of node visual radius, default 4)
  • loopAngle: direction of the loop (radians, 0 = right, default π/4)
  • loopSpread: angular separation between exit and entry (radians, default ~80°)
  • loopFixedOrientation: when 1, compensates for camera rotation

LoopPathOptions

Path configuration

EdgePath

EdgePath definition for loop edges