The 3D Cast Member, 3D Text, and 3D Behaviors
459
Textures
Textures are 2D images that are drawn on the surface of a 3D model. Textures can be assigned to
models in your 3D modeling software, or you can use any bitmap cast member in your movie.
The following commands and properties can be used to perform basic texture operations:
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 Lingo error.
deleteShader
(
name
)
Deletes the shader named
name
. Lingo references
to this shader persist but can do nothing.
TRUE (1)
if the shader named
name
exists.
FALSE (0)
if the
shader named
name
doesn’t exist.
deleteShader
(
index
)
Deletes the shader with the given index number.
Lingo references to this shader persist but can
do nothing.
TRUE (1)
if the shader with this
index number exists.
FALSE (0)
if
the shader with this index number
doesn’t exist.
Command
Function
Returns
texture.count
Returns the number of textures in the texture object
list of the cast member.
Integer.
texture
(
name
)
Returns the texture object named
name
.
Returns the texture object named
name
if it exists. Returns
void
if the
object does not exist.
texture
[
index
]
Returns the texture at the designated position in the
index.
The index number can change if textures are
added or deleted.
Returns the texture object at that
index number if it exists. Returns
void
if the object does not exist at
that index number.
newTexture
(
name
,
type
,
source
)
Creates a new texture named
name
.
The
type
can have the following values:
#fromCastmember
#fromImageObject
If
type
is
#from Castmember
,
source
is a cast
member reference. For example,
member(“concrete”) or member[2,3]
If
type
is
#from ImageObject
,
source
is a Lingo
image object.
Returns a new texture object with a
unique name. If the name isn’t
unique, returns a Lingo error.
deleteTexture
(
name
)
Deletes the texture named
name
. Lingo references
to this texture persist but can do nothing.
TRUE (1)
if the texture named
name
exists.
FALSE (0)
if the
texture named
name
doesn’t exist.
deleteTexture
(
index
)
Deletes the texture with the given index number.
Lingo references to this texture persist but can do
nothing.
TRUE (1)
if the texture with this
index number exists.
FALSE (0)
if
the texture with this index number
doesn’t exist.
Command
Function
Returns
Содержание 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...