texture()
563
texture()
Usage
member(
whichCastmember
).texture(
whichTexture
)
member(
whichCastmember
).texture[
index
]
member(
whichCastmember
).shader(
whichShader
).texture
member(
whichCastmember
).model(
whichModel
).shader.texture
member(
whichCastmember
).model(
whichModel
).shaderList.texture
member(
whichCastmember
).model(
whichModel
).shaderList[
index
].texture
member(
whichCastmember
).modelResource(
whichParticleSystemModel
\
Resource
).texture
Description
3D element and shader property; an image object used by a shader to define the appearance of the
surface of a model. The image is wrapped onto the geometry of the model by the shader.
The visible component of a shader is created with up to eight layers of textures. These eight
texture layers are either created from bitmap cast members or image objects within Director or
imported with models from 3D modeling programs.
Create and delete textures with the
newTexture()
and
deleteTexture()
commands.
Textures are stored in the texture palette of the 3D cast member. They can be referenced by name
(
whichTexture
) or palette index (
textureIndex
). A texture can be used by any number of
shaders. Changes to a texture will appear in all shaders which use that texture.
There are three types of textures:
#fromCastmember
; the texture is created from a bitmap cast member using the
newTexture()
command.
#fromImageObject
; the texture is created from a lingo image object using the
newTexture()
command.
#importedFromFile
; the texture is imported with a model from a 3D modeling program.
The texture of a particle system is a property of the model resource, whose type is
#particle
.
Example
This statement sets the
texture
property of the shader named WallSurface to the texture
named BluePaint:
member("Room").shader("WallSurface").texture = \
member("Room").texture("BluePaint")
See also
newTexture
,
deleteTexture
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...