
Shaders
319
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 cast member methods and properties can be used to perform basic
shader operations:
model(
name
1)
.
clone
Deep(
name
2)
Creates a copy of the model named
name1
and assigns it the name
name2
. The new
model uses a copy of the original model’s
model resource and shader; changes to the
original model’s model resource and shader
have no effect on the new model.
Returns the model named
name2
.
cloneModelFromCast
Member
(
name1
,
name2
,
member(
name3
)
)
Copies the model named
name2
(from the
member named
name3
) into the current
member. The new copy is named
name1
. This
is similar to the
cloneDeep()
method, but it
copies a model from one cast member to
another.
Returns the model named
name1
.
Method
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.
newShader
(
name,type
)
Creates a new shader and adds it to the
shader object list. The
type
can be
#standard
,
#painter
,
#engraver
, or
#newsprint
.
Returns a new shader object
with a unique name. If the
name isn’t unique, returns a
script error.
Method
Function
Returns
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...