layout.getPosition
getPosition(nodeId: string): objectReturn 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.
nodeId | string | Id 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);