gs.options.ViewerOptions#

class genesis.options.ViewerOptions(*, res: tuple | None = None, run_in_thread: bool | None = None, refresh_rate: int = 60, max_FPS: int | None = 60, camera_pos: tuple = (3.5, 0.5, 2.5), camera_lookat: tuple = (0.0, 0.0, 0.5), camera_up: tuple = (0.0, 0.0, 1.0), camera_fov: float = 40, enable_interaction: bool = False)[source]#

Bases: Options

Options configuring preperties of the interactive viewer.

Note

The viewer’s camera uses the Rasterizer backend regardless of gs.renderers.* when creating the scene.

Parameters:
  • res (tuple, shape (2,), optional) – The resolution of the viewer. If not set, will auto-compute using resolution of the connected display.

  • run_in_thread (bool) – Whether to run the viewer in a background thread. This option is not supported on MacOS. True by default if available.

  • refresh_rate (int) – The refresh rate of the viewer.

  • max_FPS (int | None) – The FPS (frames per second) the viewer will be capped at. Note that this will also synchronize the simulation speed. If not set, the viewer will render at maximum speed.

  • camera_pos (tuple of float, shape (3,)) – The position of the viewer’s camera.

  • camera_lookat (tuple of float, shape (3,)) – The lookat position that the camera.

  • camera_up (tuple of float, shape (3,)) – The up vector of the camera’s extrinsic pose.

  • camera_fov (float) – The field of view (in degrees) of the camera.