Skip to content

viewport

Camera controls and viewport settings.

5 functions / 7 types

Modules

Index

FunctionDescription
GetExposureThe exposure one viewport camera draws at, as an EV100.
GetSkyboxVisibleRead whether a viewport shows the scene’s skybox.
SetExposureSet how much light viewport cameras let in, as an EV100.
SetSkyboxVisibleShow or hide the scene’s skybox in a viewport. A viewport never set shows it.
SetViewCubeModelSet a custom glTF binary model for the view cube in every viewport.
TypeDescription
GetExposureThe exposure one viewport camera draws at, as an EV100.
GetExposureResponse
GetSkyboxVisibleRead whether a viewport shows the scene’s skybox.
GetSkyboxVisibleResponse
SetExposureSet how much light viewport cameras let in, as an EV100.
SetSkyboxVisibleShow or hide the scene’s skybox in a viewport. A viewport never set shows it.
SetViewCubeModelSet a custom glTF binary model for the view cube in every viewport.

GetExposure

RPC

GetExposure(request: viewport.GetExposure) -> viewport.GetExposureResponse

The exposure one viewport camera draws at, as an EV100.

Reads the exposure reached so far while a change eases. A camera never given an exposure reads as 9.7, the exposure it draws at.

Fails unless exactly one viewport camera matches viewport.

Service method: spatialengine.v1.viewport.Viewport.GetExposure.

Returns viewport.GetExposureResponse.

viewport optional : string

Label of the viewport to read. Absent, the only viewport is read.

GetSkyboxVisible

RPC

GetSkyboxVisible(request: viewport.GetSkyboxVisible) -> viewport.GetSkyboxVisibleResponse

Read whether a viewport shows the scene’s skybox.

Fails with InvalidArgument unless exactly one viewport matches viewport.

Service method: spatialengine.v1.viewport.Viewport.GetSkyboxVisible.

Returns viewport.GetSkyboxVisibleResponse.

viewport optional : string

Label of the viewport to read. Absent, the only viewport.

SetExposure

RPC

SetExposure(request: viewport.SetExposure) -> google.protobuf.Empty

Set how much light viewport cameras let in, as an EV100.

Acts on every viewport camera whose label is viewport, or on all of them when it is absent. Lower is brighter, and each step of one halves or doubles the light let in. A scene lit by sunlight in lux suits about 14. A camera never given an exposure draws at 9.7.

Fails without changing anything when ev100 is not a finite number.

Service method: spatialengine.v1.viewport.Viewport.SetExposure.

Returns google.protobuf.Empty.

ev100 : double

The exposure as an EV100.

viewport optional : string

Label of the viewports to change. Absent, every viewport changes.

duration_seconds optional : double

Seconds to ease from the current exposure to ev100, in even steps of EV100 with a gentle start and end. Absent, zero, negative or non-finite sets it at once. A new call stops an easing in progress and starts from the exposure that easing had reached.

SetSkyboxVisible

RPC

SetSkyboxVisible(request: viewport.SetSkyboxVisible) -> google.protobuf.Empty

Show or hide the scene’s skybox in a viewport. A viewport never set shows it.

Fails with InvalidArgument when no viewport matches viewport.

Service method: spatialengine.v1.viewport.Viewport.SetSkyboxVisible.

Returns google.protobuf.Empty.

viewport optional : string

Label of the viewports to change. Absent, every viewport.

visible : bool

Show the skybox, or draw black behind the scene.

SetViewCubeModel

RPC

SetViewCubeModel(request: viewport.SetViewCubeModel) -> google.protobuf.Empty

Set a custom glTF binary model for the view cube in every viewport.

Node names define camera targets: face_+x for a face, edge_+x+y for an edge, and corner_+x+y+z for a corner. Nodes with other names are visible but do not respond to clicks.

The model is rendered unlit.

Service method: spatialengine.v1.viewport.Viewport.SetViewCubeModel.

Returns google.protobuf.Empty.

model optional : string

Base64-encoded glTF binary. Omit to restore the built-in cube.

GetExposure

Message

The exposure one viewport camera draws at, as an EV100.

Reads the exposure reached so far while a change eases. A camera never given an exposure reads as 9.7, the exposure it draws at.

Fails unless exactly one viewport camera matches viewport.

viewport optional : string

Label of the viewport to read. Absent, the only viewport is read.

GetExposureResponse

Message

value optional : double

GetSkyboxVisible

Message

Read whether a viewport shows the scene’s skybox.

Fails with InvalidArgument unless exactly one viewport matches viewport.

viewport optional : string

Label of the viewport to read. Absent, the only viewport.

GetSkyboxVisibleResponse

Message

value optional : bool

SetExposure

Message

Set how much light viewport cameras let in, as an EV100.

Acts on every viewport camera whose label is viewport, or on all of them when it is absent. Lower is brighter, and each step of one halves or doubles the light let in. A scene lit by sunlight in lux suits about 14. A camera never given an exposure draws at 9.7.

Fails without changing anything when ev100 is not a finite number.

ev100 : double

The exposure as an EV100.

viewport optional : string

Label of the viewports to change. Absent, every viewport changes.

duration_seconds optional : double

Seconds to ease from the current exposure to ev100, in even steps of EV100 with a gentle start and end. Absent, zero, negative or non-finite sets it at once. A new call stops an easing in progress and starts from the exposure that easing had reached.

SetSkyboxVisible

Message

Show or hide the scene’s skybox in a viewport. A viewport never set shows it.

Fails with InvalidArgument when no viewport matches viewport.

viewport optional : string

Label of the viewports to change. Absent, every viewport.

visible : bool

Show the skybox, or draw black behind the scene.

SetViewCubeModel

Message

Set a custom glTF binary model for the view cube in every viewport.

Node names define camera targets: face_+x for a face, edge_+x+y for an edge, and corner_+x+y+z for a corner. Nodes with other names are visible but do not respond to clicks.

The model is rendered unlit.

model optional : string

Base64-encoded glTF binary. Omit to restore the built-in cube.