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

createNodeProgram

createNodeProgram<N, E, G>(gl, pickingBuffer, renderer, options, antialias): NodeProgramBundle<N, E, G>

Defined in: packages/sigma/src/rendering/nodes/factory.ts:51

Builds a node program suite from SDF shape(s) and fragment layers. The suite is a flat bundle of instances: the node program plus the matching label, backdrop, and label-background programs, alongside the shape registry metadata sigma needs for multi-shape programs.

Supports two modes:

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

N extends Attributes = Attributes

E extends Attributes = Attributes

G extends Attributes = Attributes

WebGL2RenderingContext

WebGLFramebuffer | null

Sigma<N, E, G>

NodeProgramOptions

boolean

NodeProgramBundle<N, E, G>

{ nodeProgram, labelProgram, backdropProgram, labelBackgroundProgram, shapeSlug, shapeNameToIndex, shapeGlobalIds }