Materials; Surfacetexture - Adobe ATMOSPHERE User Manual

Table of Contents

Advertisement

336
APPENDIX E

Materials

SurfaceTexture

A SurfaceTexture is a module used to represent the mapping between a texture image and a surface. It contains a
reference to a Texture module, that contains the image, along with parameters that control the location, size and
rotation angle of the texture relative to the surface. Texture "swapping" is enabled by changing the "texture" property
to reference to a different texture object. A form of texture animation may be achieved by referencing a different
texture object each time step.
Properties
type
The object's type. Returns "SurfaceTexture"
if (foo.type == 'SurfaceTexture') { ... }
hasTexture
A boolean fl ag that is true when the SurfaceTexture has an attached texture, and false if the surface uses a texture
color only. If there is no texture or surface color specifi ed in the Builder application, the "SurfaceTexture" object
will be undefi ned, and this property will not be useful. Additionally, this property should not be used as a test for
the presence of a texture object. Instead, test to see if "getFace(n).getSurfaceTexture()" is defi ned.
surfaceTextureType
The type of texturing scheme used on a particular face, either "Texture" or "AnchoredTexture".
texture
The texture object that is attached to the SurfaceTexture.
offsetU
The offset of the diffuse texture map in U. Default is 0.
offsetV
The offset of the diffuse texture map in V. Default is 0.
rotationAngleInDegrees
The angle to rotate the texture around it's origin.
sizeU
The size of a texture tile along U.
sizeV
The size of a texture tile along V.
wrapU
A boolean fl ag specifying whether the texture should wrap along U.
wrapV
A boolean fl ag specifying whether the texture should wrap along V.

Advertisement

Table of Contents
loading

Table of Contents