viewer

Exposes viewer properties common to both the legacy and modern runtimes.

mode: enum

The display mode of the viewer. You can use this to render your games and simulations in fullscreen mode, fullscreen mode without buttons, or the standard mode. The standard mode includes a sidebar with your output and parameters, as well as buttons to control project execution.

Values:

  • STANDARD

  • FULLSCREEN

  • FULLSCREEN_NO_BUTTONS

safeArea: table

A UIEdgeInsets object with the current safe area insets of the viewer, which can be accessed using viewer.safeArea.top, viewer.safeArea.bottom, viewer.safeArea.left, and viewer.safeArea.right

Parameters:
  • top (number) – The top inset of the safe area.

  • bottom (number) – The bottom inset of the safe area.

  • left (number) – The left inset of the safe area.

  • right (number) – The right inset of the safe area.