createNodeLink#nodeColorMode¶
Summary¶
Set nodeColorMode and edgeColorMode independently. Nodes default to "scalar" and edges to "solid". Use rgba when you already have per-node or per-edge RGBA data, scalar when you want scale-transform plus colormap mapping, and solid when one uniform color per component is enough.
Syntax¶
NodeLink.nodeColorMode: "rgba" | "scalar" | "solid"
NodeLink.edgeColorMode: "rgba" | "scalar" | "solid"
const nodeMode = nodeLink.nodeColorMode;
nodeLink.edgeColorMode = "solid";
Returns¶
Reading these properties returns the current node and edge color modes for this nodelink.
Type Details¶
rgba: reads packed RGBA float colors from node or edge color data.scalar: reads node or edge scalar values, then applies the matching scale transform and colormap.solid: usesNodeLink.nodeSolidColororNodeLink.edgeSolidColor.
Notes¶
Changing either mode marks uniforms dirty and emits a "visual" event.