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

NodeProgramOptions

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

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”).

Properties

backdrop?

optional backdrop?: BackdropOptions

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

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.


label?

optional label?: LabelOptions

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

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


layers

layers: FragmentLayer[]

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

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


rotateWithCamera?

optional rotateWithCamera?: boolean

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

Whether nodes should rotate with the camera.

  • false (default): Nodes stay upright regardless of camera rotation
  • true: Nodes rotate along with the camera

shapes

shapes: SDFShape[]

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

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.