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

bindWebGLLayer

bindWebGLLayer<P>(depth, renderer, ProgramClass, id?): () => void

Defined in: packages/layer-webgl/src/bind-webgl-layer.ts:20

Binds a custom WebGL layer program to a Sigma instance.

  • depth is the depth layer to render at; it must be one of the renderer’s declared depthLayers. Several layers may share the same depth.
  • id optionally identifies the layer. When omitted, a unique id is generated. Pass an explicit id to make repeated calls replace the layer instead of stacking new ones (e.g. when re-binding on every data change).

Returns a cleanup function that removes this layer.

P extends PrimitivesDeclaration

ExtractDepthLayersFromPrimitives<P>

Sigma<any, any, any, any, any, any, P>

WebGLLayerProgramType

string = ...

() => void