Chapter 19
512
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
Lingo 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.
Identity transform
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
Lingo color object defining color and intensity.
Ranges from rgb(255,255,255), which is pure
white to rgb(0,0,0), which is no light at all.
rgb(191,191,
191)
spotAngle
Get and set
Angle of the light’s projection cone.
If type equals
#spot
, setting a value less than
the umbra causes a Lingo “property not found”
error.
90.0
attenuation
Get and set
A three-value vector controlling the constant,
linear, and quadratic attenuation factors for
spotlights.
vector
(1.0,0.0,0.0
)
specular
Get and set
TRUE (1)
/
FALSE (0)
value that controls
whether or not the light produces specular
effects on surfaces. The property is ignored for
ambient lights.
Although
TRUE (1)
is the default, switching
to
FALSE (0)
may improve performance.
TRUE (1)
Содержание DIRECTOR MX-USING DIRECTOR MX
Страница 1: ...Using Director MX Macromedia Director MX...
Страница 12: ...Contents 12...
Страница 156: ...Chapter 4 156...
Страница 202: ...Chapter 6 202...
Страница 244: ...Chapter 7 244...
Страница 292: ...Chapter 10 292...
Страница 330: ...Chapter 12 330...
Страница 356: ...Chapter 13 356...
Страница 372: ...Chapter 14 372...
Страница 442: ...Chapter 16 442...
Страница 472: ...Chapter 18 472...
Страница 520: ...Chapter 19 520...
Страница 536: ...Chapter 20 536...
Страница 562: ...Chapter 23 562...
Страница 566: ...Chapter 24 566...
Страница 602: ...Chapter 27 602...