Skip to content

createNodeLink#edgesBuffer

Summary

createNodeLink#edgesBuffer exposes the current GPU endpoint list. Each edge contains two zero-based node indices. The edge scalar and color channels use the same edge order.

Syntax

NodeLink.edgesBuffer: GPUBuffer | null
NodeLink.edgeScalarsBuffer: GPUBuffer | null
NodeLink.edgeColorsBuffer: GPUBuffer | null
const endpoints = graph.edgesBuffer;

Returns

GPUBuffer | null - The endpoint, scalar or color buffer, or null for unavailable storage. Endpoints are two consecutive u32 values per edge. Scalars use one f32 per edge and colors use four.

Notes

Use setEdges and the edge-channel setters to replace buffers with the required layout and preserve ownership and binding state. A managed upload can replace an existing handle.

See Also