layout

layout.sphere

sphere(nodeIds?: string[], options?: SphereLayoutOptions): Promise<void>

Distribute nodes uniformly on the surface of a sphere.

Recorded in history as "SetPositions" or "DragPositions". Emits "layout:start" and "layout:end".

nodeIdsstring[]Subset of nodes to lay out; defaults to all nodes.
optionsSphereLayoutOptionsRadius and distribution parameters.

Returns: Promise<void>

Example

await api.layout.sphere();
await api.camera.flyToAll();