/// /// import { Resource } from '../createjs/extras/Resource'; import { BitmapFont } from '../display/BitmapFont'; import { Frame } from '../display/Frame'; import { GObject } from '../GObject'; import { IObjectFactoryType } from '../interface'; import { XmlNode } from '../utils/XMLParser'; import { PackageItem } from './PackageItem'; export declare type AssetTypes = createjs.SpriteSheetFrame | HTMLImageElement | BitmapFont | Frame[] | XmlNode | Resource | createjs.Sound; export declare class UIPackage { private $id; private $name; private $resKey; private $items; private $itemsById; private $itemsByName; private $resData; private $customId; private $atlasConfigs; /**@internal */ static $constructingObjects: number; private static $packageInstById; private static $packageInstByName; private static $bitmapFonts; private static $stringsSource; private static sep0; private static sep1; private static sep2; private static sep3; constructor(); static getById(id: string): UIPackage; static getByName(name: string): UIPackage; static addPackage(resKey: string): UIPackage; static removePackage(packageId: string): void; static createObject(pkgName: string, resName: string, userClass?: { new (): GObject; }): GObject; static createObjectFromURL(url: string, userClass?: { new (): GObject; }): GObject; static getItemURL(pkgName: string, resName: string): string; static getItemByURL(url: string): PackageItem; static getBitmapFontByURL(url: string): BitmapFont; static setStringsSource(source: string): void; /** * format the URL from old version to new version * @param url url with old version format */ static normalizeURL(url: string): string; private create; private loadPackage; private decompressPackage; /** * @param buf */ private decodeUncompressed; dispose(): void; get id(): string; get name(): string; get customId(): string; set customId(value: string); createObject(resName: string, userClass?: { new (): GObject; }): GObject; internalCreateObject(item: PackageItem, userClass?: { new (): GObject; }): GObject; getItemById(itemId: string): PackageItem; getItemByName(resName: string): PackageItem; getItemAssetByName(resName: string): AssetTypes; /** * todo */ private createSpriteTexture; getItemAsset(item: PackageItem): AssetTypes; private loadComponentChildren; private getResDescriptor; private loadComponentTranslation; private loadMovieClip; private loadFont; private loadAudio; } export declare let Decls: { UIObjectFactory?: IObjectFactoryType; };