User Guide

Light properties 383
Light properties
Use these properties to work with lights:
Property Name Access Description Default
name
Get Unique name of this light.
If the light was exported from a 3D
modeling package, the name is the name
assigned there.
None
parent
Get and set The model, light, camera, or group that is
this light’s parent.
If the light has no parent, it cannot
contribute light.
Group
("World")
child.count
Get Number of immediate children (no
grandchildren) that the light has.
0
transform
Get and set Transform object representing light’s
position relative to its parent’s transform.
The
transform.position gives the
relative position;
transform.rotation
gives the relative rotation.
Whichever
transform is
required to
represent the
light's position
and orientation
in space.
userData
Get and set A property list associated with this light.
The list defaults to the properties
assigned in the 3D modeling tool, but
users can add or delete properties at any
time.
Properties
assigned in 3D
modeling tool
type
Get and set The kind of light this is. Must be one of
the following:
#ambient: applied to all sides of the
model
#directional: applied to those parts of
the light facing the light’s direction.
Distance to the light isn’t important.
#point: Like a bare light bulb,
omnidirectional and illuminating all parts
of the model facing the light
#spot: Like a spotlight, casting light on
model parts that face it, with brighter
illumination the closer the model is.
Similar to
#directional, except that the
apparent distance from the light is taken
into account.
None
color
Get and set Color object defining color and intensity.
Ranges from color(255,255,255),
which is pure white to color(0,0,0), which
is no light at all.
color(191,191,
191)