{"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 * @memberof rendering\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":";AAMO,MAAM,iBACb,CAAA;AAAA,EAUI,WACA,GAAA;AANA;AAAA,IAAO,IAAA,CAAA,GAAA,mBAAqC,MAAA,CAAA,MAAA,CAAO,IAAI,CAAA,CAAA;AAOnD,IAAA,IAAA,CAAK,WAAW,EAAC,CAAA;AACjB,IAAA,IAAA,CAAK,KAAQ,GAAA,CAAA,CAAA;AAAA,GACjB;AAAA;AAAA,EAGO,KACP,GAAA;AACI,IAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,IAAA,CAAK,OAAO,CAChC,EAAA,EAAA;AACI,MAAM,MAAA,CAAA,GAAI,IAAK,CAAA,QAAA,CAAS,CAAC,CAAA,CAAA;AAEzB,MAAK,IAAA,CAAA,QAAA,CAAS,CAAC,CAAI,GAAA,IAAA,CAAA;AACnB,MAAK,IAAA,CAAA,GAAA,CAAI,CAAE,CAAA,GAAG,CAAI,GAAA,IAAA,CAAA;AAAA,KACtB;AAEA,IAAA,IAAA,CAAK,KAAQ,GAAA,CAAA,CAAA;AAAA,GACjB;AACJ;;;;"}