/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
src/scene/container/utils/clearList.ts
25 строк
550 B
Zyie
chore: add standard/advanced tags to documentation (#11448)
03 июн 2025, 10:12
Не верифицирован
03 июн 2025, 10:12
7d91234
Код
Авторство
О чём код?
/** * nulls all slots in an array from a certain index. * assume that when a null item is hit, the rest are also null. * Which will be the case for where this is used! * @param list - the array to clean * @param index - the index to start from * @category utils * @internal */ export function clearList(list: Array<unknown>, index?: number) { index ||= 0; for (let j = index; j < list.length; j++) { if (list[j]) { list[j] = null; } else { break; } } }