For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Class Sky
Hierarchy (View Summary)
- Evented
- Sky
Constructors
constructor
-
Parameters
Optionalsky: SkySpecification
Returns Sky
Properties
atmosphereMesh
mesh
This is used to cache the gl mesh for the sky, it should be initialized only once.
properties
Methods
calculateFogBlendOpacity
-
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
fire
-
Parameters
- event: string | Event
Optionalproperties: any
Returns this
getSky
-
Returns SkySpecification
hasTransition
-
Returns boolean
listens
-
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
trueif there is at least one registered listener for specified event type,falseotherwise - type: string
off
-
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
- type: string
on
-
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 withtargetandtypeproperties.
Returns Subscription
- type: string
once
-
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: ListenerThe function to be called when the event is fired the first time.
Returns Promise<any> | Sky
thisor a promise if a listener is not provided - type: string
recalculate
-
Parameters
- parameters: EvaluationParameters
Returns void
setEventedParent
-
Bubble all events fired by this instance of Evented to this parent instance of Evented.
Parameters
Optionalparent: Evented | nullOptionaldata: any
Returns this
setSky
-
Parameters
Optionalsky: SkySpecificationOptionaloptions: StyleSetterOptions
Returns void
updateTransitions
-
Parameters
- parameters: TransitionParameters
Returns void
Methods mixed in to other classes for event capabilities.