/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
src/rendering/batcher/shared/BatchTextureArray.ts
38 строк
897 B
Zyie
chore: add standard/advanced tags to documentation (#11448)
03 июн 2025, 10:12
Не верифицирован
03 июн 2025, 10:12
7d91234
Код
Авторство
О чём код?
import type { TextureSource } from '../../renderers/shared/texture/sources/TextureSource'; /** * Used by the batcher to build texture batches. Holds list of textures and their respective locations. * @category rendering * @advanced */ export class BatchTextureArray { /** Inside textures array. */ public textures: TextureSource[]; /** Respective locations for textures. */ public ids: Record<number, number> = Object.create(null); /** Number of filled elements. */ public count: number; constructor() { this.textures = []; this.count = 0; } /** Clear the textures and their locations. */ public clear(): void { for (let i = 0; i < this.count; i++) { const t = this.textures[i]; this.textures[i] = null; this.ids[t.uid] = null; } this.count = 0; } }