{"version":3,"file":"BatchTextureArray.mjs","sources":["../../../../src/rendering/batcher/shared/BatchTextureArray.ts"],"sourcesContent":["import type { TextureSource } from '../../renderers/shared/texture/sources/TextureSource';\n\n/**\n * Used by the batcher to build texture batches. Holds list of textures and their respective locations.\n * @category rendering\n * @advanced\n */\nexport class BatchTextureArray\n{\n    /** Inside textures array. */\n    public textures: TextureSource[];\n\n    /** Respective locations for textures. */\n    public ids: Record<number, number> = Object.create(null);\n\n    /** Number of filled elements. */\n    public count: number;\n\n    constructor()\n    {\n        this.textures = [];\n        this.count = 0;\n    }\n\n    /** Clear the textures and their locations. */\n    public clear(): void\n    {\n        for (let i = 0; i < this.count; i++)\n        {\n            const t = this.textures[i];\n\n            this.textures[i] = null;\n            this.ids[t.uid] = null;\n        }\n\n        this.count = 0;\n    }\n}\n"],"names":[],"mappings":";AAOO,MAAM,iBAAA,CACb;AAAA,EAUI,WAAA,GACA;AANA;AAAA,IAAA,IAAA,CAAO,GAAA,mBAA8B,MAAA,CAAO,MAAA,CAAO,IAAI,CAAA;AAOnD,IAAA,IAAA,CAAK,WAAW,EAAC;AACjB,IAAA,IAAA,CAAK,KAAA,GAAQ,CAAA;AAAA,EACjB;AAAA;AAAA,EAGO,KAAA,GACP;AACI,IAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,IAAA,CAAK,OAAO,CAAA,EAAA,EAChC;AACI,MAAA,MAAM,CAAA,GAAI,IAAA,CAAK,QAAA,CAAS,CAAC,CAAA;AAEzB,MAAA,IAAA,CAAK,QAAA,CAAS,CAAC,CAAA,GAAI,IAAA;AACnB,MAAA,IAAA,CAAK,GAAA,CAAI,CAAA,CAAE,GAAG,CAAA,GAAI,IAAA;AAAA,IACtB;AAEA,IAAA,IAAA,CAAK,KAAA,GAAQ,CAAA;AAAA,EACjB;AACJ;;;;"}