import type { BaseTexture } from '@pixi/core';
/**
* Used by the batcher to build texture batches.
* Holds list of textures and their respective locations.
*
* @class
* @memberof PIXI
*/
export class BatchTextureArray
{
public elements: BaseTexture[];
public ids: number[];
public count: number;
constructor()
{
/**
* inside textures array
* @member {PIXI.BaseTexture[]}
*/
this.elements = [];
/**
* Respective locations for textures
* @member {number[]}
*/
this.ids = [];
/**
* number of filled elements
* @member {number}
*/
this.count = 0;
}
clear(): void
{
for (let i = 0; i < this.count; i++)
{
this.elements[i] = null;
}
this.count = 0;
}
}