function SpriteSheetTexture(source, framesHorizontal, framesVertical, totalFrames, mapping, type, anisotropy)
{
	Texture.call(this, source, mapping, RepeatWrapping, RepeatWrapping, LinearFilter, LinearFilter, RGBFormat, type, anisotropy);

	this.name = "animation";
	this.category = "SpriteSheet";
	this.disposed = false;
	this.format = this.source.hasTransparency() ? RGBAFormat : RGBFormat;
	this.repeat.set(1 / framesHorizontal, 1 / framesVertical);

	/**
	 * If true the animation plays in loop.
	 *
	 * @property loop
	 * @default true
	 * @type {boolean}
	 */
	this.loop = true;

	/**
	 * Animation speed in seconds.
	 *
	 * @property animationSpeed
	 * @default 0.1
	 * @type {number}
	 */
	this.animationSpeed = 0.1;

	this._totalFrames = totalFrames;
	this._beginFrame = 0;
	this._endFrame = 0;
	this._framesHorizontal = framesHorizontal;
	this._framesVertical = framesVertical;

	var self = this;

	Object.defineProperties(this,
		{
		/**
		 * Spritesheet number of frames horizontally.
		 *
		 * When this values is changed the totalFrames value is automatically updated to framesHorizontal * framesVertical.
		 *
		 * @property framesHorizontal
		 * @default 1.0
		 * @type {number}
		 */
			framesHorizontal:
		{
			get: function()
			{
				return this._framesHorizontal;
			},
			set: function(value)
			{
				this._framesHorizontal = value;
				this.repeat.x = 1 / value;
				this.totalFrames = this._framesHorizontal * this._framesVertical;
			}
		},

			/**
			 * Spritesheet number of frames vertically.
			 *
			 * When this values is changed the totalFrames value is automatically updated to framesHorizontal * framesVertical.
			 *
			 * @property framesVertical
			 * @default 1.0
			 * @type {number}
			 */
			framesVertical:
		{
			get: function()
			{
				return this._framesVertical;
			},
			set: function(value)
			{
				this._framesVertical = value;
				this.repeat.y = 1 / value;
				this.totalFrames = this._framesHorizontal * this._framesVertical;
			}
		},

			/**
			 * The offset frame can be ajusted to control in which frame the animation ends.
			 * 
			 * @property endFrame
			 * @type {number}
			 */
			endFrame:
		{
			get: function()
			{
				return this._endFrame;
			},
			set: function(value)
			{
				if (value > this._totalFrames)
				{
					value = this._totalFrames;
				}
				this._endFrame = value;
			}
		},

			/**
			 * The offset frame can be ajusted to control in which frame the animation starts.
			 * 
			 * @property beginFrame
			 * @default 0
			 * @type {number}
			 */
			beginFrame:
		{
			get: function()
			{
				return this._beginFrame;
			},
			set: function(value)
			{
				if (value < 0)
				{
					value = 0;
				}
				this.currentFrame = value;
				this._beginFrame = value;
			}
		},

			/**
			 * Total number of frames present in the texture.
			 * 
			 * Sometimes a NxM spritesheet does not have all spaces filled, this parameter is used to take care of those cases.
			 *
			 * @property totalFrames
			 * @default 1
			 * @type {number}
			 */
			totalFrames:
		{
			get: function()
			{
				return this._totalFrames;
			},
			set: function(value)
			{
				this._beginFrame = 0;
				this._endFrame = value;
				this._totalFrames = value;
			}
		}
		});

	/**
	 * Indicates the current frame of the animation.
	 *
	 * @property currentFrame
	 * @type {number}
	 */
	this.currentFrame = 0;

	function update()
	{
		if (!self.disposed)
		{
			self.step();
			setTimeout(update, self.animationSpeed * 1e3);
		}
	};

	update();
}
SpriteSheet texture, can be used load spritesheet animations as textures.

The images have to be aligned in a grid without overlapping if the spritesheet is not full the last rows or blocks should be empty.

Images are played row by row, changing every animationSpeed seconds.

@class SpriteSheetTexture
@extends {Texture}
@module Textures
@param {Image} image
@param {number} framesHorizontal
@param {number} framesVertical
@param {number} totalFrames
@param {number} mapping
@param {number} type
@param {number} anisotropy