664
Examples
This statement shows the textureTransform of the third texture in the first shader used by the
model gbCyl3:
put member("scene").model("gbCyl3").shader.textureTransformList[3]
-- transform(1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, \
0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, \
0.0000, 1.0000)
The following statement halves the height and width of the fifth texture used by the shader
gbCyl3. If the
textureRepeatList[5]
value of gbCyl3 is set to
TRUE
, four copies of the texture will
be tiled across the shader.
member("scene").shader("gbCyl3").textureTransformList[5].scale = \
vector(0.5, 0.5, 1)
This statement rotates the fourth texture used by the shader gbCyl3 by 90° from vector(0, 0, 0):
member("scene").shader("gbCyl3").textureTransformList[4].rotation \
= vector(0, 0, 90)
These statements rotate the third texture used by the shader gbCyl3 by 90× around its center,
assuming that textureList[3] is a 128x128 sized texture:
s = member("scene").shader("gbCyl3")
s.textureTransformList[3].translate(-64,-64,0)
s.textureTransformList[3].rotate(0,0,90)
s.textureTransformList[3].translate(64,64,0)
textureType
Syntax
member(
whichCastmember
).textureType
Description
3D texture property; allows you to get or set the texture type for the default texture. Possible
values are as follows:
•
#none
specifies that there is no texture type.
•
#default
uses the texture from the original shader as the texture.
•
#member
uses the image from the specified cast member as the texture.
The default value for this property is
#default
. You must specify
#member
for this property in order
to use the
textureMember
property.
Example
The following statement sets the
textureType
property of the cast member Scene to
#member
.
member("Scene").textureType = #member
This makes it possible use a bitmap cast member as the source of the default texture by setting the
textureMember
property. The bitmap cast member is named “grass”.
member("Scene").textureMember = "grass"
See also
textureMember
Summary of Contents for DIRECTOR MX-LINGO DICTIONARY
Page 1: ...Lingo Dictionary Macromedia Director MX...
Page 756: ...Index 756...