starling-framework
Version:
A fast, productive library for 2D cross-platform development.
47 lines • 1.54 kB
TypeScript
import TextureOptions from "../textures/TextureOptions";
declare namespace starling.assets {
/**
* The description of an asset to be created by an AssetFactory.
*/
export class AssetReference {
/**
* Creates a new instance with the given data, which is typically some kind of file
* * reference / URL or an instance of an asset class. If 'data' contains an URL, an
* * equivalent value will be assigned to the 'url' property.
*/
constructor(data: any);
/**
* The name with which the asset should be added to the AssetManager.
*/
get name(): string;
set name(value: string)
/**
* The url from which the asset needs to be / has been loaded.
*/
get url(): string;
set url(value: string)
/**
* The raw data of the asset. This property often contains an URL; when it's passed
* * to an AssetFactory, loading has already completed, and the property contains a
* * ByteArray with the loaded data.
*/
get data(): any;
set data(value: any)
/**
* The mime type of the asset, if loaded from a server.
*/
get mimeType(): string;
set mimeType(value: string)
/**
* The file extension of the asset, if the filename or URL contains one.
*/
get extension(): string;
set extension(value: string)
/**
* The TextureOptions describing how to create a texture, if the asset references one.
*/
get textureOptions(): TextureOptions;
set textureOptions(value: TextureOptions)
}
}
export default starling.assets.AssetReference;