geo.viewport
9 functions / 16 types
Modules
| Module |
|---|
geo.viewport.camera |
Index
| Function | Description |
|---|---|
| get_auto_exposure | Read a viewport’s automatic exposure and what its last frame’s metering found. |
| get_rendering | Read the parts of the rendering a viewport draws. |
| get_sunlight | Read the light a viewport’s view is lit by and the rules it follows. |
| get_view_mode | Read whether a viewport shows the globe or the flat map. While a switch is under way, the view it heads for. |
| set_auto_exposure | Set a viewport’s exposure from the light on the ground it shows, every frame. |
| set_rendering | Turn parts of a viewport’s rendering of the maps on or off. Each field left out keeps its value. |
| set_sunlight | Light a viewport’s view of every map by sun rules, at an illuminance. |
| set_view_mode | Show the map as a globe in perspective, or straight down on the flat map. |
| toggle_view_mode | 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. |
| 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. |
| 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. |
| 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. |
get_auto_exposure
def get_auto_exposure(
*,
viewport: str | None = None,
_transaction_id: str | None = None
) -> types.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.
Returns AutoExposure.
viewport optional : str | None
Label of the viewport to read. Absent, the only viewport. Defaults to None.
_transaction_id optional : str | None
Transaction to join. Omit to submit without an explicit transaction. Defaults to None.
get_rendering
def get_rendering(
*,
viewport: str | None = None,
_transaction_id: str | None = None
) -> types.geo.viewport.RenderingRead the parts of the rendering a viewport draws.
Fails with InvalidArgument unless exactly one viewport matches viewport.
Returns Rendering.
viewport optional : str | None
Label of the viewport to read. Absent, the only viewport. Defaults to None.
_transaction_id optional : str | None
Transaction to join. Omit to submit without an explicit transaction. Defaults to None.
get_sunlight
def get_sunlight(
*,
viewport: str | None = None,
_transaction_id: str | None = None
) -> types.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.
Returns Sunlight.
viewport optional : str | None
Label of the viewport to read. Absent, the only viewport. Defaults to None.
_transaction_id optional : str | None
Transaction to join. Omit to submit without an explicit transaction. Defaults to None.
get_view_mode
def get_view_mode(
*,
viewport: str | None = None,
_transaction_id: str | None = None
) -> types.geo.MapViewMode | NoneRead 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.
Returns MapViewMode | None.
viewport optional : str | None
Label of the viewport to read. Absent, the only viewport is read. Defaults to None.
_transaction_id optional : str | None
Transaction to join. Omit to submit without an explicit transaction. Defaults to None.
set_auto_exposure
def set_auto_exposure(
*,
viewport: str | None = None,
enabled: bool | None = None,
curve: types.geo.viewport.ExposureCurve | None = None,
albedo: float | None = None,
ease_seconds: float | None = None,
darkest_ev100: float | None = None,
brightest_ev100: float | None = None,
space: types.geo.viewport.SpaceExposure | None = None,
sunlit_floor: types.geo.viewport.SunlitExposureFloor | None = None,
brightest_sky_share: float | None = None,
_transaction_id: str | None = None
) -> NoneSet 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.
Returns None.
viewport optional : str | None
Label of the viewports to change. Absent, every viewport. Defaults to None.
enabled optional : bool | None
Whether the exposure is set from the metering. Absent, it is turned on. Defaults to None.
curve optional : ExposureCurve | None
How bright each amount of light should look. Defaults to None.
albedo optional : float | None
The albedo of the reference ground the curve’s shares are for. Defaults to None.
ease_seconds optional : float | None
Seconds a change caused by the view takes to settle. Defaults to None.
darkest_ev100 optional : float | None
The darkest exposure, as an EV100. Defaults to None.
brightest_ev100 optional : float | None
The brightest exposure, as an EV100. Defaults to None.
space optional : SpaceExposure | None
Open space. Defaults to None.
sunlit_floor optional : SunlitExposureFloor | None
The floor sunlit ground in view puts under the exposure. Defaults to None.
brightest_sky_share optional : float | None
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. Defaults to None.
_transaction_id optional : str | None
Transaction to join. Omit to submit without an explicit transaction. Defaults to None.
set_rendering
def set_rendering(
*,
viewport: str | None = None,
atmosphere: bool | None = None,
ground_shadows: bool | None = None,
volumetric_shadows: bool | None = None,
sun_disc: bool | None = None,
terrain_eye_dome: bool | None = None,
unlit_imagery: bool | None = None,
ambient: types.geo.viewport.AmbientLight | None = None,
_transaction_id: str | None = None
) -> NoneTurn 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.
Returns None.
viewport optional : str | None
Label of the viewports to change. Absent, every viewport. Defaults to None.
atmosphere optional : bool | None
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. Defaults to None.
ground_shadows optional : bool | None
Let terrain shade the ground behind it from the light. Ignored on a GPU without compute shaders, such as WebGL2. Defaults to None.
volumetric_shadows optional : bool | None
Let terrain cast volumetric shadows: shafts of shade in the air behind it. Defaults to None.
sun_disc optional : bool | None
Draw the sun’s disc, the one each map’s air draws included. Defaults to None.
terrain_eye_dome optional : bool | None
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. Defaults to None.
unlit_imagery optional : bool | None
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. Defaults to None.
ambient optional : AmbientLight | None
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. Defaults to None.
_transaction_id optional : str | None
Transaction to join. Omit to submit without an explicit transaction. Defaults to None.
set_sunlight
def set_sunlight(
*,
viewport: str | None = None,
rules: list[types.geo.viewport.SunRule] | None = None,
illuminance: float,
transition_seconds: float | None = None,
sun: types.scene.Node | None = None,
_transaction_id: str | None = None
) -> NoneLight 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.
Returns None.
viewport optional : str | None
Label of the viewports to light. Absent, every viewport. Defaults to None.
rules optional : list[SunRule] | None
The rules, the first of which gives the light. Defaults to None.
illuminance : float
Lux on a surface facing the light, before any air.
transition_seconds optional : float | None
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. Defaults to None.
sun optional : Node | None
The node the sun stands at, such as one from scene.spawn. Defaults to None.
_transaction_id optional : str | None
Transaction to join. Omit to submit without an explicit transaction. Defaults to None.
set_view_mode
def set_view_mode(
*,
mode: types.geo.MapViewMode,
duration_seconds: float | None = None,
viewport: str | None = None,
_transaction_id: str | None = None
) -> NoneShow 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.
Returns None.
mode : MapViewMode
duration_seconds optional : float | None
Transition duration in seconds. Absent, 1.2 seconds. Zero changes immediately. Defaults to None.
viewport optional : str | None
Label of the viewports to change. Absent, exactly one viewport must exist. Defaults to None.
_transaction_id optional : str | None
Transaction to join. Omit to submit without an explicit transaction. Defaults to None.
toggle_view_mode
def toggle_view_mode(
*,
duration_seconds: float | None = None,
viewport: str | None = None,
_transaction_id: str | None = None
) -> NoneSwitch viewports from the globe to the flat map, or back, the way
geo.viewport.set_view_mode switches them.
Returns None.
duration_seconds optional : float | None
Transition duration in seconds. Absent, 1.2 seconds. Zero changes immediately. Defaults to None.
viewport optional : str | None
Label of the viewports to change. Absent, exactly one viewport must exist. Defaults to None.
_transaction_id optional : str | None
Transaction to join. Omit to submit without an explicit transaction. Defaults to None.
AmbientLight
AmbientLight(*, color: types.color.ColorRgb, illuminance: float)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 : ColorRgb
sRGB color with 8-bit channels (0 to 255). It tints the light and leaves its brightness to illuminance.
illuminance : float
Lux on a surface from all directions together. 0 turns the light off.
AutoExposure
AutoExposure(
*,
enabled: bool,
curve: tuple[types.geo.viewport.CurvePoint, ...] = (),
albedo: float,
ease_seconds: float,
darkest_ev100: float,
brightest_ev100: float,
space: types.geo.viewport.SpaceExposure,
sunlit_floor: types.geo.viewport.SunlitExposureFloor,
metering: types.geo.viewport.ExposureMetering | None = None,
brightest_sky_share: float
)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 : tuple[CurvePoint, ...]
How bright each amount of light should look, with the lux rising. Defaults to ().
albedo : float
The albedo of the reference ground the curve’s shares are for.
ease_seconds : float
Seconds a change caused by the view takes to settle.
darkest_ev100 : float
The darkest exposure, as an EV100.
brightest_ev100 : float
The brightest exposure, as an EV100.
space : SpaceExposure
Open space.
sunlit_floor : SunlitExposureFloor
The floor sunlit ground in view puts under the exposure.
metering optional : ExposureMetering | None
The last frame’s metering, absent before the first. Defaults to None.
brightest_sky_share : float
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
CameraSun(
*,
azimuth: float,
elevation: float,
deadzone: types.geo.viewport.Deadzone | None = None
)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 : float
Degrees round from behind the camera, positive to its left.
elevation : float
Degrees from the back of the view toward the camera’s up, from -90 to 90.
deadzone optional : Deadzone | None
Absent, the angles are measured at the place under the camera. Defaults to None.
CurvePoint
CurvePoint(*, lux: float, share_of_white: float)One point of an exposure curve: the light on level ground and how bright it should look.
lux : float
The light on level ground, in lux. Above zero.
share_of_white : float
The share of white, before tone mapping, ground of the reference albedo is drawn at under that light. Above zero.
Deadzone
Deadzone(*, share: float, least: float)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 : float
The radius as a share of the view’s ground span.
least : float
The least radius, in body radii.
ExposureCurve
ExposureCurve(*, points: tuple[types.geo.viewport.CurvePoint, ...] = ())How bright each amount of light on level ground should look.
points optional : tuple[CurvePoint, ...]
The points, with the lux rising strictly. The share is read in the log of both between points and held past either end. Defaults to ().
ExposureMetering
ExposureMetering(
*,
lux: float,
map: types.scene.Node | None = None,
sun_elevation: float,
share_of_white: float,
target_ev100: float,
ev100: float,
sky_luminance: float
)What one frame’s metering found, as geo.viewport.get_auto_exposure reads it.
lux : float
The light on the reference ground of the body the view takes its exposure from, in lux.
map optional : Node | None
That body’s map. Defaults to None.
sun_elevation : float
The sun’s elevation over the reference ground, in degrees.
share_of_white : float
The share of white the curve draws that light at.
target_ev100 : float
The exposure the view calls for, before the ease, as an EV100.
ev100 : float
The exposure shown, as an EV100.
sky_luminance : float
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.
Rendering
Rendering(
*,
atmosphere: bool,
ground_shadows: bool,
volumetric_shadows: bool,
sun_disc: bool,
terrain_eye_dome: bool,
unlit_imagery: bool,
ambient: types.geo.viewport.AmbientLight
)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 : AmbientLight
The light the ground and the air take evenly from all directions, whatever the sun does.
SceneSun
SceneSun(*, direction: types.math.Vec3)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 : Vec3
The direction toward the light, in scene axes. Any length but zero.
SolarTimeSun
SolarTimeSun(
*,
toward_sun: types.math.Vec3 | None = None,
hour_angle: float | None = None,
least_elevation: float | None = None,
deadzone: types.geo.viewport.Deadzone | None = None
)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 : Vec3 | None
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. Defaults to None.
hour_angle optional : float | None
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. Defaults to None.
least_elevation optional : float | None
Degrees above the horizon the sun never stands below; where it would, it keeps its azimuth at this elevation. Absent, -90. Defaults to None.
deadzone optional : Deadzone | None
Absent, the sun stands over the place under the camera. Defaults to None.
SpaceExposure
SpaceExposure(*, ev100: float, body_span: float, space_span: float)The exposure for open space, and the disc spans the view moves to it between.
ev100 : float
The exposure the view takes with no body large in it, as an EV100.
body_span : float
The share of the view’s height a body’s disc spans from which the view takes the body’s own exposure.
space_span : float
The share of the view’s height at which the view takes ev100. Under body_span.
SunBlend
SunBlend(
*,
near: int,
far: int,
from_: float,
to: float,
measure: types.geo.viewport.ViewMeasure
)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 : int
The index in rules of the light close in. It comes after this blend.
far : int
The index in rules of the light far out. It comes after this blend.
from_ : float
Where the blend starts, in measure’s units: wholly near’s light.
to : float
Where the blend ends: wholly far’s light.
measure : ViewMeasure
SunRule
SunRule()One sun rule. Exactly one kind is set.
Construct one of the nested classes. Use isinstance to check its type.
SunRule.Scene
SunRule.Scene(value: types.geo.viewport.SceneSun)A light from one fixed direction.
value : SceneSun
SunRule.Camera
SunRule.Camera(value: types.geo.viewport.CameraSun)A light at angles off the camera’s view.
value : CameraSun
SunRule.SolarTime
SunRule.SolarTime(value: types.geo.viewport.SolarTimeSun)The sun at a set local solar time over the ground under the camera.
value : SolarTimeSun
SunRule.Blend
SunRule.Blend(value: types.geo.viewport.SunBlend)A blend of two other rules by how much of the body the view shows, or by the morph.
value : SunBlend
Sunlight
Sunlight(
*,
direction: types.math.Vec3,
illuminance: float,
rules: tuple[types.geo.viewport.SunRule, ...] = (),
sun: types.scene.Node | None = None
)The light a viewport’s view is lit by, as geo.viewport.get_sunlight reads it.
direction : Vec3
The unit direction toward the light the rules gave on the last frame, in scene axes.
illuminance : float
Lux on a surface facing the light, before any air.
rules optional : tuple[SunRule, ...]
The rules the light follows. The first gives the light. Defaults to ().
sun optional : Node | None
The node the sun stands at. Defaults to None.
SunlitExposureFloor
SunlitExposureFloor(*, share: float, stops_per_halving: float)The floor sunlit ground in view puts under the exposure, so a sunlit crescent or disc does not burn out.
share : float
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 : float
How many stops the floor drops for each halving of the sunlit share under share.
ViewMeasure
Enum
class ViewMeasure(IntEnum)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.
Values:
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.
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.
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.
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.
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.
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.