/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
src/utils/logging/warn.ts
25 строк
591 B
Zyie
chore: documentation overhaul with typedoc (#11423)
19 май 2025, 11:44
Не верифицирован
19 май 2025, 11:44
34926f0
Код
Авторство
О чём код?
let warnCount = 0; const maxWarnings = 500; /** * Logs a PixiJS warning message to the console. Stops logging after 500 warnings have been logged. * @param args - The warning message(s) to log * @returns {void} * @category utils * @ignore */ export function warn(...args: any[]) { if (warnCount === maxWarnings) return; warnCount++; if (warnCount === maxWarnings) { console.warn('PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS.'); } else { console.warn('PixiJS Warning: ', ...args); } }