@realsee/five
Version:
Realsee Renderer SDK
31 lines (30 loc) • 1.2 kB
TypeScript
/**
* Loader for KTX 2.0 GPU Texture containers.
*
* KTX 2.0 is a container format for various GPU texture formats. The loader
* supports Basis Universal GPU textures, which can be quickly transcoded to
* a wide variety of GPU texture compression formats. While KTX 2.0 also allows
* other hardware-specific formats, this loader does not yet parse them.
*
* References:
* - KTX: http://github.khronos.org/KTX-Specification/
* - DFD: https://www.khronos.org/registry/DataFormat/specs/1.3/dataformat.1.3.html#basicdescriptor
*/
import * as THREE from 'three';
export declare class KTX2 {
transcoderPath: string;
private workerPool;
private transcoderBinary;
private transcoderPending;
private workerSourceURL;
private workerConfig;
constructor();
setTranscoderPath(transcoderPath: string): void;
detectSupport(renderer: THREE.WebGLRenderer): this;
init(): Promise<void>;
parse(buffer: ArrayBuffer): Promise<THREE.CompressedTexture>;
_createTextureFrom(transcodeResult: any): Promise<THREE.CompressedTexture>;
_createTexture(buffers: ArrayBuffer[]): Promise<THREE.CompressedTexture>;
dispose(): this;
}
export declare const ktx2: KTX2;