ProceduralSky

Type of Sky that is generated procedurally based on user input parameters.

ProceduralSky provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky. The ProceduralSky is updated on the CPU after the parameters change and stored in a texture and then displayed as a background in the scene. This makes it relatively unsuitable for realtime updates during gameplay. But with a small texture size it is still feasible to update relatively frequently because it is updated on a background thread when multi-threading is available.

@GodotBaseClass
struct ProceduralSky {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Constants
enum Constants
TextureSize
enum TextureSize

Functions

_threadDone
void _threadDone(Image image)
_updateSky
void _updateSky()
getGroundBottomColor
Color getGroundBottomColor()
getGroundCurve
double getGroundCurve()
getGroundEnergy
double getGroundEnergy()
getGroundHorizonColor
Color getGroundHorizonColor()
getSkyCurve
double getSkyCurve()
getSkyEnergy
double getSkyEnergy()
getSkyHorizonColor
Color getSkyHorizonColor()
getSkyTopColor
Color getSkyTopColor()
getSunAngleMax
double getSunAngleMax()
getSunAngleMin
double getSunAngleMin()
getSunColor
Color getSunColor()
getSunCurve
double getSunCurve()
getSunEnergy
double getSunEnergy()
getSunLatitude
double getSunLatitude()
getSunLongitude
double getSunLongitude()
getTextureSize
ProceduralSky.TextureSize getTextureSize()
opAssign
ProceduralSky opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(ProceduralSky other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
setGroundBottomColor
void setGroundBottomColor(Color color)
setGroundCurve
void setGroundCurve(double curve)
setGroundEnergy
void setGroundEnergy(double energy)
setGroundHorizonColor
void setGroundHorizonColor(Color color)
setSkyCurve
void setSkyCurve(double curve)
setSkyEnergy
void setSkyEnergy(double energy)
setSkyHorizonColor
void setSkyHorizonColor(Color color)
setSkyTopColor
void setSkyTopColor(Color color)
setSunAngleMax
void setSunAngleMax(double degrees)
setSunAngleMin
void setSunAngleMin(double degrees)
setSunColor
void setSunColor(Color color)
setSunCurve
void setSunCurve(double curve)
setSunEnergy
void setSunEnergy(double energy)
setSunLatitude
void setSunLatitude(double degrees)
setSunLongitude
void setSunLongitude(double degrees)
setTextureSize
void setTextureSize(long size)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

groundBottomColor
Color groundBottomColor [@property getter]
Color groundBottomColor [@property setter]

Color of the ground at the bottom.

groundCurve
double groundCurve [@property getter]
double groundCurve [@property setter]

How quickly the groundHorizonColor fades into the groundBottomColor.

groundEnergy
double groundEnergy [@property getter]
double groundEnergy [@property setter]

Amount of energy contribution from the ground.

groundHorizonColor
Color groundHorizonColor [@property getter]
Color groundHorizonColor [@property setter]

Color of the ground at the horizon.

skyCurve
double skyCurve [@property getter]
double skyCurve [@property setter]

How quickly the skyHorizonColor fades into the skyTopColor.

skyEnergy
double skyEnergy [@property getter]
double skyEnergy [@property setter]

Amount of energy contribution from the sky.

skyHorizonColor
Color skyHorizonColor [@property getter]
Color skyHorizonColor [@property setter]

Color of the sky at the horizon.

skyTopColor
Color skyTopColor [@property getter]
Color skyTopColor [@property setter]

Color of the sky at the top.

sunAngleMax
double sunAngleMax [@property getter]
double sunAngleMax [@property setter]

Distance from center of sun where it fades out completely.

sunAngleMin
double sunAngleMin [@property getter]
double sunAngleMin [@property setter]

Distance from sun where it goes from solid to starting to fade.

sunColor
Color sunColor [@property getter]
Color sunColor [@property setter]

Color of the sun.

sunCurve
double sunCurve [@property getter]
double sunCurve [@property setter]

How quickly the sun fades away between sunAngleMin and sunAngleMax

sunEnergy
double sunEnergy [@property getter]
double sunEnergy [@property setter]

Amount of energy contribution from the sun.

sunLatitude
double sunLatitude [@property getter]
double sunLatitude [@property setter]

The suns height using polar coordinates.

sunLongitude
double sunLongitude [@property getter]
double sunLongitude [@property setter]

The direction of the sun using polar coordinates.

textureSize
ProceduralSky.TextureSize textureSize [@property getter]
long textureSize [@property setter]

Size of Texture that the ProceduralSky will generate.

Static functions

_new
ProceduralSky _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta