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

NodeProgramOptions

Defined in: packages/sigma/src/rendering/nodes/types.ts:432

Options for creating a node program via createNodeProgram().

Supports two modes:

  • Single shape: Use shape for a program that renders one shape type
  • Multi-shape: Use shapes for a program that can render different shapes per node

When using multi-shape mode, each node can specify which shape to use via the shape attribute in its display data (e.g., “circle”, “square”).

optional backdrop?: BackdropOptions

Defined in: packages/sigma/src/rendering/nodes/types.ts:458

Backdrop configuration for hover effects. Controls the backdrop style rendered behind hovered nodes. When using constant values, they’re baked into the shader (no per-node storage). When using attribute bindings, per-node values are stored in vertex buffers.


optional label?: LabelOptions

Defined in: packages/sigma/src/rendering/nodes/types.ts:450

Label configuration options. The LabelProgram is automatically generated from the shape and these options.


optional labelAttachments?: Record<string, LabelAttachmentRenderer>

Defined in: packages/sigma/src/rendering/nodes/types.ts:464

Declared label attachments. Only their presence matters here: when none are declared, no attachment program is built (see createNodeProgram).


layers: FragmentLayer[]

Defined in: packages/sigma/src/rendering/nodes/types.ts:444

Array of fragment layers to apply, in order. Layers are applied sequentially, each receiving the output of the previous layer.


shapes: SDFShape[]

Defined in: packages/sigma/src/rendering/nodes/types.ts:438

Array of SDF shape definitions. Nodes can select their shape via the shape attribute in display data. The first shape is used as the default when no shape is specified.