Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MapViewAtmosphere

Class that provides MapView's atmospheric scattering effect.

Hierarchy

  • MapViewAtmosphere

Index

Constructors

constructor

  • new MapViewAtmosphere(m_mapAnchors: MapAnchors, m_sceneCamera: Camera, m_projection: Projection, m_rendererCapabilities: WebGLCapabilities, m_updateCallback?: undefined | (() => void), m_atmosphereVariant?: AtmosphereVariant, m_materialVariant?: AtmosphereShadingVariant): MapViewAtmosphere
  • Creates and adds Atmosphere effects to the scene.

    note

    Currently works only with globe projection.

    Parameters

    • m_mapAnchors: MapAnchors

      The MapAnchors instance where the effect will be added.

    • m_sceneCamera: Camera

      The camera used to render entire scene.

    • m_projection: Projection

      The geo-projection used to transform geo coordinates to cartesian space.

    • m_rendererCapabilities: WebGLCapabilities

      The capabilities of the WebGL renderer.

    • Optional m_updateCallback: undefined | (() => void)

      The optional callback to that should be called whenever atmosphere configuration changes, may be used to inform related components (MapView) to redraw.

    • Default value m_atmosphereVariant: AtmosphereVariant = AtmosphereVariant.SkyAndGround

      The optional atmosphere configuration variant enum [[AtmosphereVariant]], which denotes where the atmosphere scattering effect should be applied, it may be ground or sky atmosphere only or most realistic for both, which is chosen by default.

    • Default value m_materialVariant: AtmosphereShadingVariant = AtmosphereShadingVariant.ScatteringShader

      The optional material variant to be used, mainly for testing and tweaking purposes.

    Returns MapViewAtmosphere

Properties

Static GroundAtmosphereUserName

GroundAtmosphereUserName: string = "GroundAtmosphere"

User data name attribute assigned to created mesh.

Static SkyAtmosphereUserName

SkyAtmosphereUserName: string = "SkyAtmosphere"

User data name attribute assigned to created mesh.

Accessors

enabled

  • get enabled(): boolean
  • set enabled(enable: boolean): void
  • Returns the current atmosphere status, enabled or disabled.

    Use this method to change the setup in runtime without defining corresponding theme setup.

    Returns boolean

  • Allows to enable/disable the atmosphere effect, regardless of the theme settings.

    Use this method to change the setup in runtime without defining corresponding theme setup.

    Parameters

    • enable: boolean

      A boolean that specifies whether the atmosphere should be enabled or disabled.

    Returns void

groundMesh

  • get groundMesh(): Mesh | undefined

lightMode

skyMesh

  • get skyMesh(): Mesh | undefined

Methods

dispose

  • dispose(): void

reset

  • reset(theme: Theme): void
  • Sets the atmosphere depending on the {@link @here/harp-datasource-protocol#Theme} instance provided.

    This function is called when a theme is loaded. Atmosphere is added only if the theme contains a atmosphere definition with a:

    • color property, used to set the atmosphere color.

    Parameters

    • theme: Theme

      A {@link @here/harp-datasource-protocol#Theme} instance.

    Returns void

Static isPresent

Generated using TypeDoc