import { TextureObject } from '../classes/textureobject'; export declare function getTextureExtensionFromUrl(url: string): string | undefined; /** * Creates a texture filename from a texture entry object. * The filename is in following pattern: * `{materialId}___{mapping}_{mmWidth}x{mmHeight}_tileable.{extension}` * E.g. wood___RGB_500x500_tileable.png * @param textureEntry Texture entry object as it comes from the RAPI (includes material (= material's combined id) or id, mmWidth, mmHeight, mapping, tileable, image (= url)) * @param options * if !includeId, the externalId before ___ is omitted -> RGB_500x500_tileable.png * if onlyMapping, only the mapping is included (e.g. RGB), all other properties are omitted -> RGB.png * @returns */ export declare function createTextureFileName(textureEntry: TextureObject | any, options?: { includeId?: boolean; onlyMapping?: boolean; }): string; /** * Inverse function to the createTextureFileName function. * Gets information about the texture from the filename in the pattern: * `{materialId}___{mapping}_{mmWidth}x{mmHeight}_tileable.{extension}` * If this comes from an unreliable source (e.g. user input), the result should be handled with care and checked for meaningfulness. * @param fileName * @returns * object with properties: * id - externalId part before ___, might be undefined if not present * mapping, * mmWidth, mmHeight, if \d+x\d+ part is present and valid numbers * extension - the last part after the last dot, if it is a valid image extension * these properties might be undefined if not present in the filename * tileable is either true if the word is present, or false if the word is not present * undefined if the filename cannot be parsed (e.g. more than one ___ present) or if at least id, size or tileable information is not present */ export declare function parseTextureFileName(fileName: string): { id?: string; mapping?: string; mmWidth?: number; mmHeight?: number; tileable?: boolean; extension?: string; } | undefined;