On this page

Class Sky

Methods mixed in to other classes for event capabilities.

Hierarchy (View Summary)

Index

Constructors

Properties

atmosphereMesh: Mesh | undefined
mesh: Mesh | undefined

This is used to cache the gl mesh for the sky, it should be initialized only once.

Methods

  • Currently fog is a very simple implementation, and should only used to create an atmosphere near the horizon. But because the fog is drawn from the far-clipping-plane to map-center, and because the fog does nothing know about the horizon, this method does a fadeout in respect of pitch. So, when the horizon gets out of view, which is at about pitch 70, this methods calculates the corresponding opacity values. Below pitch 60 the fog is completely invisible.

    Parameters

    • pitch: number

    Returns number

  • Parameters

    • event: string | Event
    • Optionalproperties: any

    Returns this

  • Returns boolean

  • Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.

    Parameters

    • type: string

      The event type

    Returns boolean

    true if there is at least one registered listener for specified event type, false otherwise

  • Removes a previously registered event listener.

    Parameters

    • type: string

      The event type to remove listeners for.

    • listener: Listener

      The listener function to remove.

    Returns this

  • Adds a listener to a specified event type.

    Parameters

    • type: string

      The event type to add a listen for.

    • listener: Listener

      The function to be called when the event is fired. The listener function is called with the data object passed to fire, extended with target and type properties.

    Returns Subscription

  • Adds a listener that will be called only once to a specified event type.

    The listener will be called first time the event fires after the listener is registered.

    Parameters

    • type: string

      The event type to listen for.

    • Optionallistener: Listener

      The function to be called when the event is fired the first time.

    Returns Promise<any> | Sky

    this or a promise if a listener is not provided

  • Bubble all events fired by this instance of Evented to this parent instance of Evented.

    Parameters

    • Optionalparent: Evented | null
    • Optionaldata: any

    Returns this

Was this helpful?
SDK JS
Reference
Sky