@image/packer
Version:
image packer
24 lines (23 loc) • 888 B
TypeScript
import { ICache, IImageProcessor, LoadingInformation, SpritesheetExportConfig } from './generator';
import { BinaryTreeBin } from './MultiBinPacker';
import AtlasGroup from './AtlasGroup';
export default class Spritesheet {
outputFilesize: number;
loadingInformation: LoadingInformation[];
cachedImagePath: string;
hash: string;
width: number;
height: number;
private bin;
private exportConfig;
private cache;
private imageProcessor;
constructor(atlasGroup: AtlasGroup, bin: BinaryTreeBin, exportConfig: SpritesheetExportConfig, cache: ICache, imageProcessor: IImageProcessor);
private createImage(cachedImagePath);
private createLoadingInformation();
private cacheMiss();
private cacheInterpret(data);
readonly basename: string;
private calculateHash(atlasGroup);
process(): Promise<this>;
}