Skip to content

Viewer Controls

Functions for controlling the camera, navigation, and display settings.

configure_viewer

async def configure_viewer(reset_view: bool = False, center: list[float] | None = None, zoom: float | str | None = None, angles: list[float] | None = None, ndisplay: int | str | None = None, dims_axis: int | str | None = None, dims_value: int | str | None = None, grid: bool | str | None = None) -> dict[str, Any]

Configure viewer display: camera, dimensions, and grid.

All parameters are optional — set any combination in one call.

Parameters

reset_view : bool, default False If True, reset the camera to fit all data. center : list[float], optional Camera center position. zoom : float, optional Camera zoom factor (must be > 0). angles : list[float], optional Camera angles as [azimuth, elevation, roll] in degrees. ndisplay : int, optional Number of displayed dimensions (2 or 3). dims_axis : int, optional Axis index for slider position (use with dims_value). dims_value : int, optional Step value for the given axis. grid : bool, optional Enable or disable grid view.

Source: server.py:1135