Skip to content

InstancedHighlight

Defined in: core/backend.ts:89

Shader-driven highlight state for an instanced layer (#162). Passed to Backend.styleInstancedLayer, it maps to vertex-shader uniforms so hover/selection restyle costs no geometry rebuild:

  • hoverGroup — the hovered node’s group id (matched against each instance’s groups); -1 = none.
  • dimActive / dimOpacity — fade every non-highlighted instance’s alpha by dimOpacity when active.
  • recolor — RGB (0..1) a highlighted instance is tinted toward, preserving luminance (so a weight- encoded link keeps its weight); null/absent ⇒ highlighted instances keep their colour (e.g. nodes).
  • selected — optional per-instance flag buffer (0/1) to upload in place (a selection change), instead of re-emitting the layer. Length must equal the layer’s instance count.

optional dimActive?: boolean

Defined in: core/backend.ts:91


optional dimOpacity?: number

Defined in: core/backend.ts:92


optional hoverGroup?: number

Defined in: core/backend.ts:90


optional recolor?: [number, number, number] | null

Defined in: core/backend.ts:93


optional selected?: Uint8Array<ArrayBufferLike>

Defined in: core/backend.ts:94