class Sky (client-side)
Available since version: 0.3.0
Static sky controller for local and synchronized sky settings.
Properties
number weatherType
Current local weather type. Use requestTimeAndSkySync to pull the authoritative value from the server. For more
information, see Weather Constants.
table rainStartTime
Rain start time: {hour = number, minute = number}
table rainStopTime
Rain stop time: {hour = number, minute = number}
number windScale
Wind scale used during precipitation.
boolean precipitationEnabled
Toggles local rain and snow rendering.
Methods
setFogColor
Sets one local fog color entry to the supplied RGB color.
void setFogColor(number id, table value)
Parameters:
numberid: Fog entry or sky planet id.tablevalue: RGB table {r, g, b}.
setCloudsColor
Sets the local cloud RGB color.
void setCloudsColor(table value)
Parameters:
tablevalue: RGB table {r, g, b}.
setPlanetSize
Sets the size of one sky planet.
void setPlanetSize(number id, number size)
Parameters:
numberid: Fog entry or sky planet id.numbersize: Planet size.
setPlanetColor
Sets one sky planet RGBA color.
void setPlanetColor(number id, table value)
Parameters:
numberid: Fog entry or sky planet id.tablevalue: RGBA table {r, g, b, a}.
setPlanetTexture
Sets the texture file of one sky planet.
void setPlanetTexture(number id, string file)
Parameters:
numberid: Fog entry or sky planet id.stringfile: Texture file name.
setLightingColor
Sets the local sky lighting RGB color.
void setLightingColor(table value)
Parameters:
tablevalue: RGB table {r, g, b}.
requestTimeAndSkySync
Requests authoritative time and sky settings; they are applied asynchronously when the reply arrives.
boolean requestTimeAndSkySync()
Returns boolean:
Whether the request was sent; completion is asynchronous.
Callbacks
No callbacks.