Chapter 18
458
Models
The models in a cast member are the actual visible objects that are seen in the 3D cast member.
Models move according to the motions you assign to them in your 3D modeling software. Their
movement results from repositioning and reorienting their geometries in 3D space.
The following commands and properties can be used to perform basic model operations:
Shaders
A shader defines the basic appearance of a model’s surface. You apply textures to shaders. The
standard shader is photorealistic. The following list describes some of the other available shaders:
•
#painter
, which looks like a painted surface
•
#engraver
, which looks like an engraved surface
•
#newsprint
, which looks like a newspaper photograph
The following commands and properties can be used to perform basic shader operations:
Command
Function
Returns
model.count
Returns the number of model objects included in
the cast member.
Integer.
model
(
name
)
Returns the model named
name
.
Returns the model object named
name
if it exists. Returns
void
if the
object does not exist.
model
[
index
]
Returns the model at the designated position in the
index. The index number can change if models
lower in the list are deleted.
Returns the model object at that
index number if it exists. Returns
void
if the object does not exist at
that index number.
newModel
(
name
,
modelResource
)
Creates a new model named
name
and adds it to
the world. Fails if a model by that name already
exists. The
modelResource
argument is optional
and can be set at a later time. If supplied, this
second argument must be an existing model
resource object.
Returns a new model with a unique
name. If the name isn’t unique,
returns a Lingo error.
deleteModel
(
name
)
Deletes the model named
name
. Lingo references
to this model persist but can do nothing. Children of
the model aren’t deleted but are re-parented to the
world group.
TRUE (1)
if the model named
name
exists.
FALSE (0)
if the
model named
name
doesn’t exist.
deleteModel
(
index
)
Deletes the model with the given index number.
Lingo references to this model persist but can
do nothing.
TRUE (1)
if the model with this
index number exists.
FALSE (0)
if
the model with this index number
doesn’t exist.
Command
Function
Returns
shader.count
Returns the number of shader objects included in
the cast member.
Integer.
shader
(
name
)
Returns the shader named
name
.
Returns the shader object named
name
if it exists. Returns
void
if the
object does not exist.
shader
[
index
]
Returns the shader at the designated position in the
index. The index number can change if shaders are
added or deleted.
Returns the shader object at that
index number if it exists. Returns
void
if the object does not exist at
that index number.
Summary of Contents for DIRECTOR MX-USING DIRECTOR MX
Page 1: ...Using Director MX Macromedia Director MX...
Page 12: ...Contents 12...
Page 156: ...Chapter 4 156...
Page 202: ...Chapter 6 202...
Page 244: ...Chapter 7 244...
Page 292: ...Chapter 10 292...
Page 330: ...Chapter 12 330...
Page 356: ...Chapter 13 356...
Page 372: ...Chapter 14 372...
Page 442: ...Chapter 16 442...
Page 472: ...Chapter 18 472...
Page 520: ...Chapter 19 520...
Page 536: ...Chapter 20 536...
Page 562: ...Chapter 23 562...
Page 566: ...Chapter 24 566...
Page 602: ...Chapter 27 602...