HoloMap.Sky (HoloMap v0.1.0)

Copy Markdown View Source

Atmosphere at the horizon, for tilted and 3D maps.

<HoloMap.Sky sky_color="#199EF3" horizon_color="#ffffff" fog_color="#0000ff" />

Like HoloMap.Terrain, the sky is a map-level property rather than a layer: the component's presence turns it on, its absence turns it off.

Props

PropTypeNotes
sky_colorcolorColour at the top of the sky
sky_horizon_blendnumber0-1. How far down the sky colour reaches
horizon_colorcolorColour at the horizon line
horizon_fog_blendnumber0-1. Blend between horizon and fog
fog_colorcolorColour of the fog over the ground
fog_ground_blendnumber0-1. How far up from the ground fog reaches
atmosphere_blendnumber0-1, or an expression. Overall opacity
propertiesmapAny further sky properties, merged last

Every prop accepts a MapLibre expression as well as a literal, which is how a sky follows the camera, fading the atmosphere in as the map tilts:

<HoloMap.Sky
  atmosphere_blend={["interpolate", ["linear"], ["zoom"], 0, 1, 12, 0]}
/>

Visibility

The sky is only drawn where the horizon is on screen, which means a pitched camera. On a top-down map it renders nothing at all, which is not a misconfiguration, there is simply no horizon in view.

Summary

Functions

Returns true to indicate that the callee module is a component module (has "use Hologram.Component" directive).

Returns the list of property definitions for the compiled component.

Functions

__is_hologram_component__()

@spec __is_hologram_component__() :: boolean()

Returns true to indicate that the callee module is a component module (has "use Hologram.Component" directive).

Examples

iex> __is_hologram_component__()
true

__props__()

@spec __props__() :: [{atom(), atom(), keyword()}]

Returns the list of property definitions for the compiled component.