
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
Содержание DIRECTOR MX 2004-USING DIRECTOR
Страница 1: ...DIRECTOR MX 2004 Using Director...
Страница 16: ...16 Chapter 1 Introduction...
Страница 82: ...82 Chapter 3 Sprites...
Страница 98: ...98 Chapter 4 Animation...
Страница 134: ...134 Chapter 5 Bitmaps...
Страница 242: ...242 Chapter 10 Sound and Synchronization...
Страница 274: ...274 Chapter 11 Using Digital Video...
Страница 290: ...290 Chapter 12 Behaviors...
Страница 302: ...302 Chapter 13 Navigation and User Interaction...
Страница 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Страница 392: ...392 Chapter 16 Working with Models and Model Resources...
Страница 418: ...418 Chapter 18 Movies in a Window...
Страница 446: ...446 Chapter 22 Managing and Testing Director Projects...