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

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.

Type Parameters

P

P extends PrimitivesDeclaration

Parameters

depth

ExtractDepthLayersFromPrimitives<P>

renderer

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

ProgramClass

WebGLLayerProgramType

id?

string = ...

Returns

() => void