/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
src/utils/sayHello.ts
40 строк
1 KB
Zyie
chore: add standard/advanced tags to documentation (#11448)
03 июн 2025, 10:12
Не верифицирован
03 июн 2025, 10:12
7d91234
Код
Авторство
О чём код?
import { DOMAdapter } from '../environment/adapter'; import { VERSION } from './const'; let saidHello = false; /** * Prints out the version and renderer information for this running instance of PixiJS. * @param type - The name of the renderer this instance is using. * @returns {void} * @category utils * @advanced */ export function sayHello(type: string): void { if (saidHello) { return; } if (DOMAdapter.get().getNavigator().userAgent.toLowerCase().indexOf('chrome') > -1) { const args = [ `%c %c %c %c %c PixiJS %c v${VERSION} (${type}) http://www.pixijs.com/\n\n`, 'background: #E72264; padding:5px 0;', 'background: #6CA2EA; padding:5px 0;', 'background: #B5D33D; padding:5px 0;', 'background: #FED23F; padding:5px 0;', 'color: #FFFFFF; background: #E72264; padding:5px 0;', 'color: #E72264; background: #FFFFFF; padding:5px 0;', ]; globalThis.console.log(...args); } else if (globalThis.console) { globalThis.console.log(`PixiJS ${VERSION} - ${type} - http://www.pixijs.com/`); } saidHello = true; }