camera

camera.flyToAll

flyToAll(options?: FlyToOptions): Promise<void>

Animate the camera to frame all nodes currently in the graph.

Iterates over the flat Float32Array of positions obtained from the bound CameraPositionSource, computes the overall bounding box, and animates cloudScene to center and fit the entire graph with 1.5× padding.

Returns immediately if the interaction manager or layout runtime are not yet bound, or if no positions are available.

Not undoable. Does not emit any event.

optionsFlyToOptionsOptional animation duration, scale, and z-offset overrides.

Returns: Promise<void>

Example

await api.camera.flyToAll({ duration: 800 });