UNPKG

@loaders.gl/textures

Version:

Framework-independent loaders for compressed and super compressed (basis) textures

24 lines 1.18 kB
import type { TextureFormat, TextureLevel } from '@loaders.gl/schema'; import type { GLTextureFormat } from "../gl-types.js"; export type CompressedTextureExtractOptions = { mipMapLevels: number; width: number; height: number; sizeFunction: Function; internalFormat?: GLTextureFormat; /** Canonical loaders.gl texture format for the mip levels being extracted. */ textureFormat?: TextureFormat; }; /** * Extract mipmap images from compressed texture buffer * @param data - binary data of compressed texture or Array of level objects * @param options.mipMapLevels - number of mipmap level inside image * @param options.width - width of 0 - level * @param options.height - height of 0 - level * @param options.sizeFunction - format-related function to calculate level size in bytes * @param options.internalFormat - WebGL compatible format code * @param options.textureFormat - canonical loaders.gl texture format * @returns Array of the texture levels */ export declare function extractMipmapImages(data: Uint8Array | object[], options: CompressedTextureExtractOptions): TextureLevel[]; //# sourceMappingURL=extract-mipmap-images.d.ts.map