/** * Resource handler for the `texture` asset type. Loads 2D and 3D {@link Texture} resources from * any image format the browser decodes, such as PNG, JPEG, WebP and AVIF, and from DDS, KTX, * KTX2, Basis and HDR files. * * @category Asset */ export class TextureHandler extends ResourceHandler { /** * Create a new TextureHandler instance. * * @param {AppBase} app - The running {@link AppBase}. * @ignore */ constructor(app: AppBase); _device: import("../../index.js").GraphicsDevice; imgParser: ImgParser; set crossOrigin(value: string); get crossOrigin(): string; _getTextureOptions(asset: any): { profilerHint: number; }; open(url: any, data: any, asset: any): any; patch(asset: any, assets: any): void; } /** * Returns whether the texture of a texture asset is sRGB, and its type, which together decide how * a shader decodes the texture. These are known before the asset loads: its data specifies them, * unless its per-load texture options override them. * * A few files decide these themselves, and are only known once loaded: a KTX file storing an sRGB * format when the asset data does not specify srgb, a basis normal map which the transcoder * unswizzles, and a DXT5 normal map. * * @param {Asset} asset - The texture asset. * @returns {{srgb: boolean, type: string}} Whether the texture is sRGB, and its type. * @ignore */ export function getTextureAssetEncoding(asset: Asset): { srgb: boolean; type: string; }; import { ResourceHandler } from './handler.js'; import { ImgParser } from '../parsers/texture/img.js'; import type { AppBase } from '../app-base.js'; import type { Asset } from '../asset/asset.js';