/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
src/compressed-textures/basis/utils/gpuFormatToBasisTranscoderFormat.ts
25 строк
671 B
Zyie
chore: documentation overhaul with typedoc (#11423)
19 май 2025, 11:44
Не верифицирован
19 май 2025, 11:44
34926f0
Код
Авторство
О чём код?
const gpuFormatToBasisTranscoderFormatMap: Record<string, number> = { 'bc3-rgba-unorm': 3, // cTFBC3_RGBA 'bc7-rgba-unorm': 6, // cTFBC7_RGBA, 'etc2-rgba8unorm': 1, // cTFETC2_RGBA, 'astc-4x4-unorm': 10, // cTFASTC_4x4_RGBA, // Uncompressed rgba8unorm: 13, // cTFRGBA32, rgba4unorm: 16, // cTFRGBA4444, }; /** * @param transcoderFormat * @internal */ export function gpuFormatToBasisTranscoderFormat(transcoderFormat: string): number { const format = gpuFormatToBasisTranscoderFormatMap[transcoderFormat]; if (format) { return format; } throw new Error(`Unsupported transcoderFormat: ${transcoderFormat}`); }