class Texture (client-side)
Available since version: 0.3.8.0
This class represents a texture resource used by a material. Instances are obtained through Material.texture.
Properties
bool isAnimated (read-only)
Represents whether this texture contains animation frames.
bool hasAlpha (read-only)
Represents whether this texture has an alpha channel.
bool changingRealtime (read-only)
Represents whether this texture is changed by the realtime texture system.
bool isTextureTile (read-only)
Represents whether this texture is a texture tile.
int animationFrameCount (read-only)
Represents the number of animation frames in the first texture channel.
int animationFrame
Represents the currently displayed frame in the first texture channel.
Methods
getAnimationFrameCount
Returns the number of animation frames for a texture animation channel.
int getAnimationFrameCount(int channel)
Parameters:
intchannel: the texture animation channel.
Returns int:
getAnimationFrame
Returns the currently displayed frame for a texture animation channel.
int getAnimationFrame(int channel)
Parameters:
intchannel: the texture animation channel.
Returns int:
setAnimationFrame
Sets the currently displayed frame for a texture animation channel. The frame is clamped to the valid range of the selected channel.
bool setAnimationFrame(int channel, int frame)
Parameters:
intchannel: the texture animation channel.intframe: the requested animation frame.
Returns bool:
true when the channel contains animation frames.
Callbacks
No callbacks.