User Guide
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