Lua API
0.4.0
Game Engine
|
Functions | |
getLightColor (object) | |
Returns the color of the given light source. More... | |
getLightRadius (object) | |
Returns the radius of the given light source. More... | |
getLightIntensity (object) | |
Returns the intensity of the given light source. More... | |
getLightShadowQuality (object) | |
Returns the shadow quality of the given light source. More... | |
getLightShadowBias (object) | |
Returns the bias of the given light source. More... | |
getLightShadowBlur (object) | |
Returns the blur factor of the given light source. More... | |
getLightSpotAngle (object) | |
Returns the spot angle of the given light source. More... | |
getLightSpotExponent (object) | |
Returns the spot exponent of the given light source. More... | |
setLightColor (object, color) | |
Changes the color of the given light source. More... | |
setLightRadius (object, radius) | |
Changes the radius of the given light source. More... | |
setLightIntensity (object, intensity) | |
Changes the intensity of the given light source. More... | |
setLightShadowQuality (object, quality) | |
Changes the shadow quality of the given light source. More... | |
setLightShadowBias (object, bias) | |
Changes the shadow bias of the given light source. More... | |
setLightShadowBlur (object, blur) | |
Changes the shadow blur of the given light source. More... | |
setLightSpotAngle (object, spotAngle) | |
Changes the spot angle of the given light source. More... | |
setLightSpotExponent (object, exponent) | |
Changes the spot exponent of the given light source. More... | |
getLightColor | ( | object | ) |
Returns the color of the given light source.
The color is encoded as a vec3.
object | The light source. |
getLightIntensity | ( | object | ) |
Returns the intensity of the given light source.
object | The light source. |
getLightRadius | ( | object | ) |
Returns the radius of the given light source.
object | The light source. |
getLightShadowBias | ( | object | ) |
Returns the bias of the given light source.
object | The light source. |
getLightShadowBlur | ( | object | ) |
Returns the blur factor of the given light source.
object | The light source. |
getLightShadowQuality | ( | object | ) |
Returns the shadow quality of the given light source.
object | The light source. |
getLightSpotAngle | ( | object | ) |
Returns the spot angle of the given light source.
object | The light source. |
getLightSpotExponent | ( | object | ) |
Returns the spot exponent of the given light source.
object | The light source. |
setLightColor | ( | object | , |
color | |||
) |
Changes the color of the given light source.
object | The light source. |
color | A vec3 containing the RGB values. |
setLightIntensity | ( | object | , |
intensity | |||
) |
Changes the intensity of the given light source.
object | The light source. |
intensity | A number. |
setLightRadius | ( | object | , |
radius | |||
) |
Changes the radius of the given light source.
object | The light source. |
radius | A number. |
setLightShadowBias | ( | object | , |
bias | |||
) |
Changes the shadow bias of the given light source.
object | The light source. |
bias | A number. |
setLightShadowBlur | ( | object | , |
blur | |||
) |
Changes the shadow blur of the given light source.
The shadow blur describes the number of passes the GLSL shader uses to blur the shadow edge. Bigger values might slow down your game!
object | The light source. |
blur | A number. Keep this as small as possible! |
setLightShadowQuality | ( | object | , |
quality | |||
) |
Changes the shadow quality of the given light source.
The shadow quality is basically the resolution of the texture the depth data will be rendered to. The resolution looks like "quality x quality" and works best if quality is a power of two like 1024 or 2048.
object | The light source. |
quality | A number. Works best with a power of two. |
setLightSpotAngle | ( | object | , |
spotAngle | |||
) |
Changes the spot angle of the given light source.
The spot angle describes the angle a spot light is able to illuminate. A point light has an angle > 180° and can be turned into a spot light by setting a smaller spot angle.
object | The light source. |
spotAngle | A number. |
setLightSpotExponent | ( | object | , |
exponent | |||
) |
Changes the spot exponent of the given light source.
The spot exponent describes the strength of blending out the illuminated area of the spot light on the edges.
object | The light source. |
exponent | A number. |