Skip to content

createNodeLink#nodePositionsBuffer

Summary

createNodeLink#nodePositionsBuffer exposes the packed positions used to draw nodes and resolve edge endpoints. The other node-channel handles expose the matching scalar, color and radius records for those same node indices.

Syntax

NodeLink.nodePositionsBuffer: GPUBuffer | null
NodeLink.nodeScalarsBuffer: GPUBuffer | null
NodeLink.nodeColorsBuffer: GPUBuffer | null
NodeLink.nodeRadiiBuffer: GPUBuffer | null
const positions = graph.nodePositionsBuffer;

Returns

GPUBuffer | null - Each handle is the current GPU buffer or null if that channel has no GPU storage. Positions, colors and radii use four f32 lanes per node. Scalars use one f32 per node.

Notes

Use the grouped node source setters to replace these handles, set counts and choose ownership. Re-read stored handles after a source replacement or an upload that grows managed storage.

See Also