Working with Models and Model Resources
495
Texture properties
Use these properties to work with textures:
Texture commands
The pixel height and width of the 2D images you use as textures should be powers of 2 (that is,
2, 4, 8, 16, 32, and so on). If not, the image will be resized to a dimension that is a power of 2.
The
scaleDown()
command allows you to retain manual control over this procedure at the
texture level.
Property
Access
Description
Default
name
Get and set
Name of texture.
None
type
Get
Possible values:
#fromfile
: bitmap defined as part of 3D
import
#castmember
: bitmap derived from Director
cast member
None
member
Get and set
If the type is
#castmember
, this property
identifies the source of the bitmap.
If the type if
#fromfile
, this property is
void
.
None
width
Get
Width, in pixels.
None
height
Get
Height, in pixels.
None
quality
Get and set
Property with the following possible values:
#low
: texture is not mipmapped
#medium
: mipmapping is at a low bilinear
setting (default)
#high
: the mipmapping is at a high trilinear
setting
For more information, see
quality
in the
Lingo Dictionary.
#medium
nearFiltering
Get and set
Determines whether bilinear filtering is used
when rendering a projected texture map that
covers more screen space than the original.
For more information, see
nearFiltering
in the Lingo Dictionary.
TRUE (1)
compressed
Get and set
The property can be
TRUE (1)
or
FALSE
(0)
:
TRUE (1)
: the texture is compressed
FALSE (0)
: the texture is not compressed
The value changes automatically from
TRUE
(1)
to
FALSE (0)
when the texture is to be
rendered.
The value can be set to
FALSE (0)
to
decompress or to
TRUE (1)
to remove the
decompressed representation from memory.
TRUE (1)
Command
Description
Returns
scaleDown()
Reduces the height of the texture to the next lowest power of
2. This is useful for dynamically resizing textures to fit on a
client machine.
Nothing
Summary of Contents for DIRECTOR MX-USING DIRECTOR MX
Page 1: ...Using Director MX Macromedia Director MX...
Page 12: ...Contents 12...
Page 156: ...Chapter 4 156...
Page 202: ...Chapter 6 202...
Page 244: ...Chapter 7 244...
Page 292: ...Chapter 10 292...
Page 330: ...Chapter 12 330...
Page 356: ...Chapter 13 356...
Page 372: ...Chapter 14 372...
Page 442: ...Chapter 16 442...
Page 472: ...Chapter 18 472...
Page 520: ...Chapter 19 520...
Page 536: ...Chapter 20 536...
Page 562: ...Chapter 23 562...
Page 566: ...Chapter 24 566...
Page 602: ...Chapter 27 602...