/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
src/compressed-textures/ktx2/utils/gpuFormatToKTXBasisTranscoderFormat.ts
25 строк
642 B
Zyie
chore: documentation overhaul with typedoc (#11423)
19 май 2025, 11:44
Не верифицирован
19 май 2025, 11:44
34926f0
Код
Авторство
О чём код?
const gpuFormatToBasisTranscoderFormatMap: Record<string, string> = { 'bc3-rgba-unorm': 'BC3_RGBA', 'bc7-rgba-unorm': 'BC7_M5_RGBA', 'etc2-rgba8unorm': 'ETC2_RGBA', 'astc-4x4-unorm': 'ASTC_4x4_RGBA', // Uncompressed rgba8unorm: 'RGBA32', rg11b10ufloat: 'R11F_G11F_B10F', }; /** * @param transcoderFormat * @internal */ export function gpuFormatToKTXBasisTranscoderFormat(transcoderFormat: string): string { const format = gpuFormatToBasisTranscoderFormatMap[transcoderFormat]; if (format) { return format; } throw new Error(`Unsupported transcoderFormat: ${transcoderFormat}`); }