geo.viewport
9 functions / 26 types
Modules
| Module |
|---|
geo.viewport.camera |
Index
| Function | Description |
|---|---|
| GetAutoExposure | Read a viewport’s automatic exposure and what its last frame’s metering found. |
| GetRendering | Read the parts of the rendering a viewport draws. |
| GetSunlight | Read the light a viewport’s view is lit by and the rules it follows. |
| GetViewMode | Read whether a viewport shows the globe or the flat map. While a switch is under way, the view it heads for. |
| SetAutoExposure | Set a viewport’s exposure from the light on the ground it shows, every frame. |
| SetRendering | Turn parts of a viewport’s rendering of the maps on or off. Each field left out keeps its value. |
| SetSunlight | Light a viewport’s view of every map by sun rules, at an illuminance. |
| SetViewMode | Show the map as a globe in perspective, or straight down on the flat map. |
| ToggleViewMode | Switch viewports from the globe to the flat map, or back, the way geo.viewport.set_view_mode switches them. |
| Type | Description |
|---|---|
| AmbientLight | A light every map’s ground and air take evenly from all directions, the way the ground takes the sky’s light, whatever the sun does. It belongs to the viewport rather than to any one body. |
| AutoExposure | A viewport’s automatic exposure, as geo.viewport.get_auto_exposure reads it. |
| CameraSun | A light at angles off the camera’s view. Azimuth 0 and elevation 0 is straight behind the camera, a positive azimuth is to its left, and elevation 90 is the camera’s up: square to its view, on the side of the local up at the ground under the camera, so the angles never roll with the camera. A level camera’s up is the local up. It works the same on a flat map, where the local up is the plane’s normal. |
| CurvePoint | One point of an exposure curve: the light on level ground and how bright it should look. |
| Deadzone | How far the place a rule measures at may trail the place under the camera before it is dragged along: share of the view’s ground span, but at least least body radii. |
| ExposureCurve | How bright each amount of light on level ground should look. |
| ExposureMetering | What one frame’s metering found, as geo.viewport.get_auto_exposure reads it. |
| GetAutoExposure | Read a viewport’s automatic exposure and what its last frame’s metering found. |
| GetRendering | Read the parts of the rendering a viewport draws. |
| GetSunlight | Read the light a viewport’s view is lit by and the rules it follows. |
| GetViewMode | Read whether a viewport shows the globe or the flat map. While a switch is under way, the view it heads for. |
| GetViewModeResponse | |
| Rendering | The parts of the rendering a viewport draws, as geo.viewport.get_rendering reads them. |
| SceneSun | A light from one fixed direction. On a flat map it lights the whole map from that direction, so there is no day and night across it; a flat map is usually lit with camera or solar_time instead. |
| SetAutoExposure | Set a viewport’s exposure from the light on the ground it shows, every frame. |
| SetRendering | Turn parts of a viewport’s rendering of the maps on or off. Each field left out keeps its value. |
| SetSunlight | Light a viewport’s view of every map by sun rules, at an illuminance. |
| SetViewMode | Show the map as a globe in perspective, or straight down on the flat map. |
| SolarTimeSun | The sun as it stands at a set local solar time over the ground under the camera, for the declination of toward_sun over the equator of the camera’s body. |
| SpaceExposure | The exposure for open space, and the disc spans the view moves to it between. |
| SunBlend | A light share of the way from rule near’s light to rule far’s. |
| SunRule | One sun rule. Exactly one kind is set. |
| Sunlight | The light a viewport’s view is lit by, as geo.viewport.get_sunlight reads it. |
| SunlitExposureFloor | The floor sunlit ground in view puts under the exposure, so a sunlit crescent or disc does not burn out. |
| ToggleViewMode | Switch viewports from the globe to the flat map, or back, the way geo.viewport.set_view_mode switches them. |
| ViewMeasure | How a blend measures how much of the body the view shows. Both measure as if the camera looked straight down at the place under it. |
GetAutoExposure
RPC
GetAutoExposure(request: geo.viewport.GetAutoExposure) -> geo.viewport.AutoExposureRead a viewport’s automatic exposure and what its last frame’s metering found.
Fails with InvalidArgument unless exactly one viewport matches viewport.
Service method: spatialengine.v1.geo.viewport.GeoViewport.GetAutoExposure.
Returns geo.viewport.AutoExposure.
viewport optional : string
Label of the viewport to read. Absent, the only viewport.
GetRendering
RPC
GetRendering(request: geo.viewport.GetRendering) -> geo.viewport.RenderingRead the parts of the rendering a viewport draws.
Fails with InvalidArgument unless exactly one viewport matches viewport.
Service method: spatialengine.v1.geo.viewport.GeoViewport.GetRendering.
Returns geo.viewport.Rendering.
viewport optional : string
Label of the viewport to read. Absent, the only viewport.
GetSunlight
RPC
GetSunlight(request: geo.viewport.GetSunlight) -> geo.viewport.SunlightRead the light a viewport’s view is lit by and the rules it follows.
Fails with InvalidArgument unless exactly one viewport matches viewport.
Service method: spatialengine.v1.geo.viewport.GeoViewport.GetSunlight.
Returns geo.viewport.Sunlight.
viewport optional : string
Label of the viewport to read. Absent, the only viewport.
GetViewMode
RPC
GetViewMode(request: geo.viewport.GetViewMode) -> geo.viewport.GetViewModeResponseRead whether a viewport shows the globe or the flat map. While a switch is under way, the view it heads for.
Returns nothing when the viewport’s camera is not on the map yet. Fails unless exactly one
viewport matches viewport.
Service method: spatialengine.v1.geo.viewport.GeoViewport.GetViewMode.
Returns geo.viewport.GetViewModeResponse.
viewport optional : string
Label of the viewport to read. Absent, the only viewport is read.
SetAutoExposure
RPC
SetAutoExposure(request: geo.viewport.SetAutoExposure) -> google.protobuf.EmptySet a viewport’s exposure from the light on the ground it shows, every frame.
Each frame the engine measures the light on level ground at a reference point of each body in
view: under the camera close in, and toward the point the view looks at as the body’s disc
comes into view. The light is the sun’s through that body’s air, the sky’s and the viewport’s
ambient light, as the map draws the ground with them. curve says how bright that light should
look, and the exposure draws ground of albedo under it at that share of white. A body’s disc
shrinking toward space.space_span moves the exposure to space.ev100, and sunlit ground in
view keeps the exposure from going so low that it burns out. On the map the camera stands on,
the exposure moves to that ground’s own as the map flattens.
With the camera inside a body’s drawn air, the engine also measures the luminance of the sky
and of the haze over the ground across the view, and keeps the exposure from going so low that
the brightest twentieth of the view is drawn over brightest_sky_share of white. This only ever
darkens the view, such as a view toward a low sun or a twilight glow over darkening ground.
A change the view causes, a camera move or a flight, eases over ease_seconds. A change the
light causes, such as the clock moving the sun, lands on the frame it happens.
Each field left out keeps its value. A viewport starts with automatic exposure off, a curve
drawing every light at 18% of white, an albedo of 0.18, an ease of 0.3 seconds, exposures from
-6 to 20, open space at 1 between spans of 0.6 and 0.1, a sunlit floor from 0.2% of the screen
falling 2 stops a halving, and the sky left out, a brightest_sky_share of 0. While it is on,
viewport.set_exposure is overwritten on the next frame; turn it off for a fixed exposure.
Fails with InvalidArgument when no viewport matches viewport, the curve is empty, a point’s
lux or share is not a finite number above zero, the lux do not rise strictly, albedo,
ease_seconds or brightest_sky_share is negative or not finite, darkest_ev100 is above
brightest_ev100, or the spans are not finite with space_span above zero and under
body_span.
Service method: spatialengine.v1.geo.viewport.GeoViewport.SetAutoExposure.
Returns google.protobuf.Empty.
viewport optional : string
Label of the viewports to change. Absent, every viewport.
enabled optional : bool
Whether the exposure is set from the metering. Absent, it is turned on.
curve optional : geo.viewport.ExposureCurve
How bright each amount of light should look.
albedo optional : double
The albedo of the reference ground the curve’s shares are for.
ease_seconds optional : double
Seconds a change caused by the view takes to settle.
darkest_ev100 optional : double
The darkest exposure, as an EV100.
brightest_ev100 optional : double
The brightest exposure, as an EV100.
space optional : geo.viewport.SpaceExposure
Open space.
sunlit_floor optional : geo.viewport.SunlitExposureFloor
The floor sunlit ground in view puts under the exposure.
brightest_sky_share optional : double
The share of white, before tone mapping, the brightest twentieth of the sky and haze in view is drawn at most. 0 leaves the sky out.
SetRendering
RPC
SetRendering(request: geo.viewport.SetRendering) -> google.protobuf.EmptyTurn parts of a viewport’s rendering of the maps on or off. Each field left out keeps its value.
A viewport never set draws the atmosphere and the sun’s disc, and draws no terrain shadows, no eye dome lighting on the terrain, no unlit imagery and no ambient light.
Fails with InvalidArgument when no viewport matches viewport, or when the ambient light’s
illuminance is negative or not finite.
Service method: spatialengine.v1.geo.viewport.GeoViewport.SetRendering.
Returns google.protobuf.Empty.
viewport optional : string
Label of the viewports to change. Absent, every viewport.
atmosphere optional : bool
Draw the sky and the haze of each map’s air, and light the ground through the same air. Ignored for a body without air, and on a GPU that cannot draw it.
ground_shadows optional : bool
Let terrain shade the ground behind it from the light. Ignored on a GPU without compute shaders, such as WebGL2.
volumetric_shadows optional : bool
Let terrain cast volumetric shadows: shafts of shade in the air behind it.
sun_disc optional : bool
Draw the sun’s disc, the one each map’s air draws included.
terrain_eye_dome optional : bool
Shade the terrain with eye dome lighting as well as the meshes, point clouds and block models. Off, each model is outlined on its own edge where it meets the terrain. Ignored on a GPU that cannot keep a depth only models write, such as WebGL2, where it reads as on.
unlit_imagery optional : bool
Draw the ground in its imagery’s own colors, with no light, sky light, terrain shadows, haze of the air or camera exposure, so a viewport with no tone mapping shows the imagery’s own pixels. Lines drawn on the ground still draw over it. Models and the sky stay lit.
ambient optional : geo.viewport.AmbientLight
A light the ground and the air of every map the viewport shows take evenly from all directions, added to the sun and the sky, such as moonlight after dusk. The air scatters it evenly every way in its own color, so the night air and the ground share one tint. Models are not lit by it. With none, the air has no light once the sun and its twilight have gone.
SetSunlight
RPC
SetSunlight(request: geo.viewport.SetSunlight) -> google.protobuf.EmptyLight a viewport’s view of every map by sun rules, at an illuminance.
The engine evaluates the rules every frame from that frame’s camera, so the light follows the
camera with no round trip. rules[0] gives the light; a blend names two later rules by their
index. A camera that stands on no map keeps the light the rules last gave where they need the
ground under it.
A solar_time rule with no toward_sun lights from the sun node: each frame the engine
reads where the node and the map the camera stands on are in the scene, so moving the node
with scene.transform.set moves the light on the same frame, and the camera moving does not.
Where the node is despawned, the light keeps its last direction.
The light drives that viewport’s lighting of the ground, the sky, the haze and the scattering of each map’s air, terrain shadows, and the sun’s disc. Every map seen in one viewport is lit by that viewport’s light, and each viewport keeps its own. A viewport never given rules is lit from overhead along the scene’s up axis, z, at 130,000 lux.
Fails with InvalidArgument when rules is empty or holds more than 64 rules, a rule is out
of its domain, a rule needs the sun node and none is given, illuminance is negative or not
finite, transition_seconds is negative or not finite, or no viewport matches viewport, and
with WrongNodeKind when sun is not a scene node.
Service method: spatialengine.v1.geo.viewport.GeoViewport.SetSunlight.
Returns google.protobuf.Empty.
viewport optional : string
Label of the viewports to light. Absent, every viewport.
rules optional : list[geo.viewport.SunRule]
The rules, the first of which gives the light.
illuminance : double
Lux on a surface facing the light, before any air.
transition_seconds optional : double
Seconds the light takes to turn from the light shown to the new rules’ light. Absent or 0, the new light shows at once, unless a transition is under way, which keeps running toward the new rules.
sun optional : scene.Node
The node the sun stands at, such as one from scene.spawn.
SetViewMode
RPC
SetViewMode(request: geo.viewport.SetViewMode) -> google.protobuf.EmptyShow the map as a globe in perspective, or straight down on the flat map.
The camera swings between the two while the map morphs between the globe and the flat map, so the ground in the middle of the view stays there. A switch already running finishes first, and asking for the view already shown does nothing. The flat view only pans and zooms.
Service method: spatialengine.v1.geo.viewport.GeoViewport.SetViewMode.
Returns google.protobuf.Empty.
mode : geo.MapViewMode
duration_seconds optional : double
Transition duration in seconds. Absent, 1.2 seconds. Zero changes immediately.
viewport optional : string
Label of the viewports to change. Absent, exactly one viewport must exist.
ToggleViewMode
RPC
ToggleViewMode(request: geo.viewport.ToggleViewMode) -> google.protobuf.EmptySwitch viewports from the globe to the flat map, or back, the way
geo.viewport.set_view_mode switches them.
Service method: spatialengine.v1.geo.viewport.GeoViewport.ToggleViewMode.
Returns google.protobuf.Empty.
duration_seconds optional : double
Transition duration in seconds. Absent, 1.2 seconds. Zero changes immediately.
viewport optional : string
Label of the viewports to change. Absent, exactly one viewport must exist.
AmbientLight
Message
A light every map’s ground and air take evenly from all directions, the way the ground takes the sky’s light, whatever the sun does. It belongs to the viewport rather than to any one body.
color : color.ColorRgb
sRGB color with 8-bit channels (0 to 255). It tints the light and leaves its brightness to
illuminance.
illuminance : double
Lux on a surface from all directions together. 0 turns the light off.
AutoExposure
Message
A viewport’s automatic exposure, as geo.viewport.get_auto_exposure reads it.
enabled : bool
Whether the exposure is set from the metering.
curve optional : list[geo.viewport.CurvePoint]
How bright each amount of light should look, with the lux rising.
albedo : double
The albedo of the reference ground the curve’s shares are for.
ease_seconds : double
Seconds a change caused by the view takes to settle.
darkest_ev100 : double
The darkest exposure, as an EV100.
brightest_ev100 : double
The brightest exposure, as an EV100.
space : geo.viewport.SpaceExposure
Open space.
sunlit_floor : geo.viewport.SunlitExposureFloor
The floor sunlit ground in view puts under the exposure.
metering optional : geo.viewport.ExposureMetering
The last frame’s metering, absent before the first.
brightest_sky_share : double
The share of white the brightest twentieth of the sky and haze in view is drawn at most, or 0 with the sky left out.
CameraSun
Message
A light at angles off the camera’s view. Azimuth 0 and elevation 0 is straight behind the camera, a positive azimuth is to its left, and elevation 90 is the camera’s up: square to its view, on the side of the local up at the ground under the camera, so the angles never roll with the camera. A level camera’s up is the local up. It works the same on a flat map, where the local up is the plane’s normal.
azimuth : double
Degrees round from behind the camera, positive to its left.
elevation : double
Degrees from the back of the view toward the camera’s up, from -90 to 90.
deadzone optional : geo.viewport.Deadzone
Absent, the angles are measured at the place under the camera.
CurvePoint
Message
One point of an exposure curve: the light on level ground and how bright it should look.
lux : double
The light on level ground, in lux. Above zero.
share_of_white : double
The share of white, before tone mapping, ground of the reference albedo is drawn at under that light. Above zero.
Deadzone
Message
How far the place a rule measures at may trail the place under the camera before it is
dragged along: share of the view’s ground span, but at least least body radii.
share : double
The radius as a share of the view’s ground span.
least : double
The least radius, in body radii.
ExposureCurve
Message
How bright each amount of light on level ground should look.
points optional : list[geo.viewport.CurvePoint]
The points, with the lux rising strictly. The share is read in the log of both between points and held past either end.
ExposureMetering
Message
What one frame’s metering found, as geo.viewport.get_auto_exposure reads it.
lux : double
The light on the reference ground of the body the view takes its exposure from, in lux.
map optional : scene.Node
That body’s map.
sun_elevation : double
The sun’s elevation over the reference ground, in degrees.
share_of_white : double
The share of white the curve draws that light at.
target_ev100 : double
The exposure the view calls for, before the ease, as an EV100.
ev100 : double
The exposure shown, as an EV100.
sky_luminance : double
The luminance the brightest twentieth of the sky and haze in view shows, in cd/m2, or 0 with the camera out of any drawn air.
GetAutoExposure
Message
Read a viewport’s automatic exposure and what its last frame’s metering found.
Fails with InvalidArgument unless exactly one viewport matches viewport.
viewport optional : string
Label of the viewport to read. Absent, the only viewport.
GetRendering
Message
Read the parts of the rendering a viewport draws.
Fails with InvalidArgument unless exactly one viewport matches viewport.
viewport optional : string
Label of the viewport to read. Absent, the only viewport.
GetSunlight
Message
Read the light a viewport’s view is lit by and the rules it follows.
Fails with InvalidArgument unless exactly one viewport matches viewport.
viewport optional : string
Label of the viewport to read. Absent, the only viewport.
GetViewMode
Message
Read whether a viewport shows the globe or the flat map. While a switch is under way, the view it heads for.
Returns nothing when the viewport’s camera is not on the map yet. Fails unless exactly one
viewport matches viewport.
viewport optional : string
Label of the viewport to read. Absent, the only viewport is read.
GetViewModeResponse
Message
value optional : geo.MapViewMode
Rendering
Message
The parts of the rendering a viewport draws, as geo.viewport.get_rendering reads them.
atmosphere : bool
Whether the sky and the haze of each map’s air are drawn, and the ground lit through them.
ground_shadows : bool
Whether terrain shades the ground behind it from the light.
volumetric_shadows : bool
Whether terrain casts volumetric shadows: shafts of shade in the air behind it.
sun_disc : bool
Whether the sun’s disc is drawn.
terrain_eye_dome : bool
Whether eye dome lighting shades the terrain as well as the models.
unlit_imagery : bool
Whether the ground is drawn in its imagery’s own colors.
ambient : geo.viewport.AmbientLight
The light the ground and the air take evenly from all directions, whatever the sun does.
SceneSun
Message
A light from one fixed direction. On a flat map it lights the whole map from that direction,
so there is no day and night across it; a flat map is usually lit with camera or
solar_time instead.
direction : math.Vec3
The direction toward the light, in scene axes. Any length but zero.
SetAutoExposure
Message
Set a viewport’s exposure from the light on the ground it shows, every frame.
Each frame the engine measures the light on level ground at a reference point of each body in
view: under the camera close in, and toward the point the view looks at as the body’s disc
comes into view. The light is the sun’s through that body’s air, the sky’s and the viewport’s
ambient light, as the map draws the ground with them. curve says how bright that light should
look, and the exposure draws ground of albedo under it at that share of white. A body’s disc
shrinking toward space.space_span moves the exposure to space.ev100, and sunlit ground in
view keeps the exposure from going so low that it burns out. On the map the camera stands on,
the exposure moves to that ground’s own as the map flattens.
With the camera inside a body’s drawn air, the engine also measures the luminance of the sky
and of the haze over the ground across the view, and keeps the exposure from going so low that
the brightest twentieth of the view is drawn over brightest_sky_share of white. This only ever
darkens the view, such as a view toward a low sun or a twilight glow over darkening ground.
A change the view causes, a camera move or a flight, eases over ease_seconds. A change the
light causes, such as the clock moving the sun, lands on the frame it happens.
Each field left out keeps its value. A viewport starts with automatic exposure off, a curve
drawing every light at 18% of white, an albedo of 0.18, an ease of 0.3 seconds, exposures from
-6 to 20, open space at 1 between spans of 0.6 and 0.1, a sunlit floor from 0.2% of the screen
falling 2 stops a halving, and the sky left out, a brightest_sky_share of 0. While it is on,
viewport.set_exposure is overwritten on the next frame; turn it off for a fixed exposure.
Fails with InvalidArgument when no viewport matches viewport, the curve is empty, a point’s
lux or share is not a finite number above zero, the lux do not rise strictly, albedo,
ease_seconds or brightest_sky_share is negative or not finite, darkest_ev100 is above
brightest_ev100, or the spans are not finite with space_span above zero and under
body_span.
viewport optional : string
Label of the viewports to change. Absent, every viewport.
enabled optional : bool
Whether the exposure is set from the metering. Absent, it is turned on.
curve optional : geo.viewport.ExposureCurve
How bright each amount of light should look.
albedo optional : double
The albedo of the reference ground the curve’s shares are for.
ease_seconds optional : double
Seconds a change caused by the view takes to settle.
darkest_ev100 optional : double
The darkest exposure, as an EV100.
brightest_ev100 optional : double
The brightest exposure, as an EV100.
space optional : geo.viewport.SpaceExposure
Open space.
sunlit_floor optional : geo.viewport.SunlitExposureFloor
The floor sunlit ground in view puts under the exposure.
brightest_sky_share optional : double
The share of white, before tone mapping, the brightest twentieth of the sky and haze in view is drawn at most. 0 leaves the sky out.
SetRendering
Message
Turn parts of a viewport’s rendering of the maps on or off. Each field left out keeps its value.
A viewport never set draws the atmosphere and the sun’s disc, and draws no terrain shadows, no eye dome lighting on the terrain, no unlit imagery and no ambient light.
Fails with InvalidArgument when no viewport matches viewport, or when the ambient light’s
illuminance is negative or not finite.
viewport optional : string
Label of the viewports to change. Absent, every viewport.
atmosphere optional : bool
Draw the sky and the haze of each map’s air, and light the ground through the same air. Ignored for a body without air, and on a GPU that cannot draw it.
ground_shadows optional : bool
Let terrain shade the ground behind it from the light. Ignored on a GPU without compute shaders, such as WebGL2.
volumetric_shadows optional : bool
Let terrain cast volumetric shadows: shafts of shade in the air behind it.
sun_disc optional : bool
Draw the sun’s disc, the one each map’s air draws included.
terrain_eye_dome optional : bool
Shade the terrain with eye dome lighting as well as the meshes, point clouds and block models. Off, each model is outlined on its own edge where it meets the terrain. Ignored on a GPU that cannot keep a depth only models write, such as WebGL2, where it reads as on.
unlit_imagery optional : bool
Draw the ground in its imagery’s own colors, with no light, sky light, terrain shadows, haze of the air or camera exposure, so a viewport with no tone mapping shows the imagery’s own pixels. Lines drawn on the ground still draw over it. Models and the sky stay lit.
ambient optional : geo.viewport.AmbientLight
A light the ground and the air of every map the viewport shows take evenly from all directions, added to the sun and the sky, such as moonlight after dusk. The air scatters it evenly every way in its own color, so the night air and the ground share one tint. Models are not lit by it. With none, the air has no light once the sun and its twilight have gone.
SetSunlight
Message
Light a viewport’s view of every map by sun rules, at an illuminance.
The engine evaluates the rules every frame from that frame’s camera, so the light follows the
camera with no round trip. rules[0] gives the light; a blend names two later rules by their
index. A camera that stands on no map keeps the light the rules last gave where they need the
ground under it.
A solar_time rule with no toward_sun lights from the sun node: each frame the engine
reads where the node and the map the camera stands on are in the scene, so moving the node
with scene.transform.set moves the light on the same frame, and the camera moving does not.
Where the node is despawned, the light keeps its last direction.
The light drives that viewport’s lighting of the ground, the sky, the haze and the scattering of each map’s air, terrain shadows, and the sun’s disc. Every map seen in one viewport is lit by that viewport’s light, and each viewport keeps its own. A viewport never given rules is lit from overhead along the scene’s up axis, z, at 130,000 lux.
Fails with InvalidArgument when rules is empty or holds more than 64 rules, a rule is out
of its domain, a rule needs the sun node and none is given, illuminance is negative or not
finite, transition_seconds is negative or not finite, or no viewport matches viewport, and
with WrongNodeKind when sun is not a scene node.
viewport optional : string
Label of the viewports to light. Absent, every viewport.
rules optional : list[geo.viewport.SunRule]
The rules, the first of which gives the light.
illuminance : double
Lux on a surface facing the light, before any air.
transition_seconds optional : double
Seconds the light takes to turn from the light shown to the new rules’ light. Absent or 0, the new light shows at once, unless a transition is under way, which keeps running toward the new rules.
sun optional : scene.Node
The node the sun stands at, such as one from scene.spawn.
SetViewMode
Message
Show the map as a globe in perspective, or straight down on the flat map.
The camera swings between the two while the map morphs between the globe and the flat map, so the ground in the middle of the view stays there. A switch already running finishes first, and asking for the view already shown does nothing. The flat view only pans and zooms.
mode : geo.MapViewMode
duration_seconds optional : double
Transition duration in seconds. Absent, 1.2 seconds. Zero changes immediately.
viewport optional : string
Label of the viewports to change. Absent, exactly one viewport must exist.
SolarTimeSun
Message
The sun as it stands at a set local solar time over the ground under the camera, for the
declination of toward_sun over the equator of the camera’s body.
On the globe the sun is fixed to the body. On a flat map it keeps its east, north and up parts wherever the camera is. Between the two, the morph mixes them.
toward_sun optional : math.Vec3
The direction toward the sun, in scene axes. Any length but zero. Absent, the direction
from the center of the map the camera stands on toward the sunlight’s sun node, worked
out every frame.
hour_angle optional : double
Degrees from the local meridian, positive in the afternoon: 30 is two in the afternoon. Absent, the hour angle the sun has at that place, so on the globe the light points toward the sun wherever the camera moves.
least_elevation optional : double
Degrees above the horizon the sun never stands below; where it would, it keeps its azimuth at this elevation. Absent, -90.
deadzone optional : geo.viewport.Deadzone
Absent, the sun stands over the place under the camera.
SpaceExposure
Message
The exposure for open space, and the disc spans the view moves to it between.
ev100 : double
The exposure the view takes with no body large in it, as an EV100.
body_span : double
The share of the view’s height a body’s disc spans from which the view takes the body’s own exposure.
space_span : double
The share of the view’s height at which the view takes ev100. Under body_span.
SunBlend
Message
A light share of the way from rule near’s light to rule far’s.
The share rises from from to to in measure, on a log scale with eased ends for the spans
and in step with the morph for the morph. The light
turns about the spin axis of the camera’s body, its hour angle the way it turned last frame
and its declination evenly; on a flat map about the plane’s normal, its azimuth round and its
elevation evenly; and during the morph about the two mixed.
near : uint32
The index in rules of the light close in. It comes after this blend.
far : uint32
The index in rules of the light far out. It comes after this blend.
from : double
Where the blend starts, in measure’s units: wholly near’s light.
to : double
Where the blend ends: wholly far’s light.
measure : geo.viewport.ViewMeasure
SunRule
Message
One sun rule. Exactly one kind is set.
Choose one of: scene, camera, solar_time, blend.
scene optional : geo.viewport.SceneSun
A light from one fixed direction.
camera optional : geo.viewport.CameraSun
A light at angles off the camera’s view.
solar_time optional : geo.viewport.SolarTimeSun
The sun at a set local solar time over the ground under the camera.
blend optional : geo.viewport.SunBlend
A blend of two other rules by how much of the body the view shows, or by the morph.
Sunlight
Message
The light a viewport’s view is lit by, as geo.viewport.get_sunlight reads it.
direction : math.Vec3
The unit direction toward the light the rules gave on the last frame, in scene axes.
illuminance : double
Lux on a surface facing the light, before any air.
rules optional : list[geo.viewport.SunRule]
The rules the light follows. The first gives the light.
sun optional : scene.Node
The node the sun stands at.
SunlitExposureFloor
Message
The floor sunlit ground in view puts under the exposure, so a sunlit crescent or disc does not burn out.
share : double
The share of the screen sunlit ground covers, from 0 to 1, from which the floor is the exposure for the most steeply lit point in view.
stops_per_halving : double
How many stops the floor drops for each halving of the sunlit share under share.
ToggleViewMode
Message
Switch viewports from the globe to the flat map, or back, the way
geo.viewport.set_view_mode switches them.
duration_seconds optional : double
Transition duration in seconds. Absent, 1.2 seconds. Zero changes immediately.
viewport optional : string
Label of the viewports to change. Absent, exactly one viewport must exist.
ViewMeasure
Enum
How a blend measures how much of the body the view shows. Both measure as if the camera looked straight down at the place under it.
VIEW_MEASURE_GROUND_SPAN = 0
How much ground the view’s height covers, in body radii. On the globe, the arc of ground the view’s height covers, or the whole cap the camera sees once the disc fits in the view; on the flat map, the view’s height at the ground over the body’s radius.
VIEW_MEASURE_DISC_SPAN = 1
The share of the view’s height the body’s disc spans, above 1 where the disc overfills the
view. A flat map has no disc, so there the blend runs between the ground spans a flat map
shows from the heights at which the globe’s disc spans from and to.
VIEW_MEASURE_MORPH = 2
How far the map the camera stands on is from the globe, at 0, toward the flat map, at 1.
The share keeps step with the morph, with no easing, so the light turns with the surface
through a switch between the globe and the flat map. from and to lie from 0 to 1.