import { AssetPromise, Engine, EngineConfiguration, LoadItem, Loader, ResourceManager, Texture2D, TextureCube } from "@galacean/engine-core"; import { KTX2Container } from "./KTX2Container"; import { KTX2TargetFormat } from "./KTX2TargetFormat"; import { TranscodeResult } from "./transcoder/AbstractTranscoder"; export declare class KTX2Loader extends Loader { private static _binomialLLCTranscoder; private static _priorityFormats; private static _capabilityMap; /** * Release ktx2 transcoder worker. * @remarks If use loader after releasing, we should release again. */ static release(): void; /** @internal */ static _parseBuffer(buffer: Uint8Array, engine: Engine, params?: KTX2Params): Promise<{ ktx2Container: KTX2Container; engine: Engine; result: TranscodeResult; targetFormat: KTX2TargetFormat; params: Uint8Array; }>; /** @internal */ static _createTextureByBuffer(engine: Engine, isSRGB: boolean, transcodeResult: TranscodeResult, targetFormat: KTX2TargetFormat, params?: Uint8Array, restoredTexture?: Texture2D | TextureCube): Texture2D | TextureCube; private static _decideTargetFormat; private static _detectSupportedFormat; private static _getBinomialLLCTranscoder; private static _getEngineTextureFormat; initialize(_: Engine, configuration: EngineConfiguration): Promise; /** * @internal */ load(item: LoadItem & { params?: KTX2Params; }, resourceManager: ResourceManager): AssetPromise; } /** * KTX2 loader params interface. */ export interface KTX2Params { /** Priority transcoding format queue which is preferred options, default is BC7/ASTC/BC3_BC1/ETC/PVRTC/R8G8B8A8. */ /** @deprecated */ priorityFormats: KTX2TargetFormat[]; } declare module "@galacean/engine-core" { interface EngineConfiguration { /** KTX2 loader options. If set this option and workCount is great than 0, workers will be created. */ ktx2Loader?: { /** Worker count for transcoder, default is 4. */ workerCount?: number; /** Global transcoding format queue which will be used if not specified in per-instance param, default is BC7/ASTC/BC3_BC1/ETC/PVRTC/R8G8B8A8. */ /** @deprecated */ priorityFormats?: KTX2TargetFormat[]; }; } }