- getColor
Color getColor()
- getEnergy
double getEnergy()
- getHeight
double getHeight()
- getItemCullMask
long getItemCullMask()
- getItemShadowCullMask
long getItemShadowCullMask()
- getLayerRangeMax
long getLayerRangeMax()
- getLayerRangeMin
long getLayerRangeMin()
- getMode
Light2D.Mode getMode()
- getShadowBufferSize
long getShadowBufferSize()
- getShadowColor
Color getShadowColor()
- getShadowFilter
Light2D.ShadowFilter getShadowFilter()
- getShadowGradientLength
double getShadowGradientLength()
- getShadowSmooth
double getShadowSmooth()
- getTexture
Ref!Texture getTexture()
- getTextureOffset
Vector2 getTextureOffset()
- getTextureScale
double getTextureScale()
- getZRangeMax
long getZRangeMax()
- getZRangeMin
long getZRangeMin()
- isEditorOnly
bool isEditorOnly()
- isEnabled
bool isEnabled()
- isShadowEnabled
bool isShadowEnabled()
- opAssign
typeof(null) opAssign(typeof(null) n)
- opEquals
bool opEquals(Light2D other)
- opEquals
bool opEquals(typeof(null) n)
- setColor
void setColor(Color color)
- setEditorOnly
void setEditorOnly(bool editor_only)
- setEnabled
void setEnabled(bool enabled)
- setEnergy
void setEnergy(double energy)
- setHeight
void setHeight(double height)
- setItemCullMask
void setItemCullMask(long item_cull_mask)
- setItemShadowCullMask
void setItemShadowCullMask(long item_shadow_cull_mask)
- setLayerRangeMax
void setLayerRangeMax(long layer)
- setLayerRangeMin
void setLayerRangeMin(long layer)
- setMode
void setMode(long mode)
- setShadowBufferSize
void setShadowBufferSize(long size)
- setShadowColor
void setShadowColor(Color shadow_color)
- setShadowEnabled
void setShadowEnabled(bool enabled)
- setShadowFilter
void setShadowFilter(long filter)
- setShadowGradientLength
void setShadowGradientLength(double multiplier)
- setShadowSmooth
void setShadowSmooth(double smooth)
- setTexture
void setTexture(Texture texture)
- setTextureOffset
void setTextureOffset(Vector2 texture_offset)
- setTextureScale
void setTextureScale(double texture_scale)
- setZRangeMax
void setZRangeMax(long z)
- setZRangeMin
void setZRangeMin(long z)
- toHash
size_t toHash()
- color
Color color [@property getter]
Color color [@property setter]
- editorOnly
bool editorOnly [@property getter]
bool editorOnly [@property setter]
If true, Light2D will only appear when editing the scene.
- enabled
bool enabled [@property getter]
bool enabled [@property setter]
If true, Light2D will emit light.
- energy
double energy [@property getter]
double energy [@property setter]
The Light2D's energy value. The larger the value, the stronger the light.
- mode
Light2D.Mode mode [@property getter]
long mode [@property setter]
The Light2D's mode. See mode constants for values.
- offset
Vector2 offset [@property getter]
Vector2 offset [@property setter]
The offset of the Light2D's texture.
- rangeHeight
double rangeHeight [@property getter]
double rangeHeight [@property setter]
The height of the Light2D. Used with 2D normal mapping.
- rangeItemCullMask
long rangeItemCullMask [@property getter]
long rangeItemCullMask [@property setter]
The layer mask. Only objects with a matching mask will be affected by the Light2D.
- rangeLayerMax
long rangeLayerMax [@property getter]
long rangeLayerMax [@property setter]
Maximum layer value of objects that are affected by the Light2D.
- rangeLayerMin
long rangeLayerMin [@property getter]
long rangeLayerMin [@property setter]
Minimum layer value of objects that are affected by the Light2D.
- rangeZMax
long rangeZMax [@property getter]
long rangeZMax [@property setter]
Maximum z value of objects that are affected by the Light2D.
- rangeZMin
long rangeZMin [@property getter]
long rangeZMin [@property setter]
Minimum z value of objects that are affected by the Light2D.
- shadowBufferSize
long shadowBufferSize [@property getter]
long shadowBufferSize [@property setter]
- shadowColor
Color shadowColor [@property getter]
Color shadowColor [@property setter]
Color of shadows cast by the Light2D.
- shadowEnabled
bool shadowEnabled [@property getter]
bool shadowEnabled [@property setter]
If true, the Light2D will cast shadows.
- shadowFilter
Light2D.ShadowFilter shadowFilter [@property getter]
long shadowFilter [@property setter]
Shadow filter type. See shadowfilter for possible values.
- shadowFilterSmooth
double shadowFilterSmooth [@property getter]
double shadowFilterSmooth [@property setter]
Smoothing value for shadows.
- shadowGradientLength
double shadowGradientLength [@property getter]
double shadowGradientLength [@property setter]
Smooth shadow gradient length.
- shadowItemCullMask
long shadowItemCullMask [@property getter]
long shadowItemCullMask [@property setter]
The shadow mask. Used with LightOccluder2D to cast shadows. Only occluders with a matching light mask will cast shadows.
- texture
Texture texture [@property getter]
Texture texture [@property setter]
Texture used for the Light2D's appearance.
- textureScale
double textureScale [@property getter]
double textureScale [@property setter]
The texture's scale factor.
Casts light in a 2D environment.
Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note: Light2D can also be used as a mask.