type
string: The class type of the object. A light will either have this be "pointLight"
or "spotLight"
.range
number: How far the light will be visible.hasShadows
bool: Whether shadows are enabled or disabled for the light.angle
number: The angular range of the light.color
vector3: The color of the light.light
object is done by passing in a node
object and an array.
LGE.Light(
{
-- In addition to the options supported in "LGE.Node"...
color = myColor, [vector3] -- Optional, defaulted to (1, 1, 1)
range = myRange, [number] -- Optional, defaulted to 15
angle = myAngle, [number] -- Optional, defaulted to 30
type = myType, [string] -- Optional, can either be "spotLight" or "pointLight", defaulted to "pointLight"
hasShadows = shadowsEnabled [bool] -- Optional, defaulted to false
}
)
Light:setAngle(number [number])
number
.
Light:getAngle()
Light:setShadows(bool [bool])
vector3
that the light is rotated toward.
Light:getTarget()
globalTransform
information of the Light.localTransform
is not updated since it is always set manually.
Light:update()
Light:drawDebug(pass, [lovr pass] color [optional vector3 or vector4])