layout

layout.getPosition

getPosition(nodeId: string): object

Return the current world-space position of a single node.

Reads directly from the position buffer via the store's positionProvider. Not undoable (read-only). Does not emit any event.

nodeIdstringId of the node whose position to retrieve.

Returns: object

Example

const pos = api.layout.getPosition("s1");
if (pos) console.log(pos.x, pos.y, pos.z);