import { ITree } from '../../Bulldog'; import { Processor } from '../../Processor'; import { Process } from '../Process'; export interface IResolutionOptions { /** * A prefix template for denoting the resolution of the images. */ prefixTemplate?: string; /** * An object containing the resolutions that the images will be resized to. */ resolutions?: { [x: string]: number; }; /** * A resolution used if the fixed tag is applied. Resolution must match one found in resolutions. */ fixedResolution?: string; /** * the maximum size a sprite sheet can be before its split out * default is 4096 */ maximumTextureSize?: number; } export declare const defaultResolutionOptions: IResolutionOptions; /** * This class will take a raw image and resize it based on the resolutions provided * The highest resolution image will be assumed to be the original image. * * ```ts * new MipImage({ * prefixTemplate:'@%%x', * resolutions:{ high: 2, default: 1, low: 0.5 }, * }) * ``` * * an image: * * 'myImage.png' * * becomes ===\> * * myImage\@2x.png \<-- 100% of original image size * myImage.png \<--- 50% of original image size * myImage\@0.5.png \<--- 25% of original image size * * Pixi automatically can figure out the resolution based on this prefix. * The resolutionNames are assigned as the transformId which will be used for the manifest generation. * Example of manifest below: * * ```ts * "image": { * "myImage.png": { * "high": "myImage@2x.png", * "default": "myImage.png", * "low": "myImage@0.5x.png" * } * ``` */ export declare class MipImage extends Process { /** * A prefix template for denoting the resolution of the images * @defaultValue '\@%xx' */ prefixTemplate: string; /** * An object containing the resolutions that the images will be resized to. * @defaultValue \{ high: 2, default: 1, low: 0.5 \} */ resolutionHash: { [x: string]: number; }; /** * If the fixed tag is applied then only this resolution will be generated. * @defaultValue = \{ default: 1 \} */ resolutionFixedHash: { [x: string]: number; }; /** * The largest resolution to be created. */ biggestResolution: number; /** * @param options - Options to customise the MipImage plugin */ constructor(options?: IResolutionOptions); /** * Checks the paths file extension for the following: 'png', 'jpg', 'jpeg' * @override */ test(tree: ITree): boolean; /** * Generates mipped images with the resolutions defined in the options. * @override */ transform(tree: ITree, processor: Processor): Promise; } //# sourceMappingURL=MipImage.d.ts.map