Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AssetReference

The description of an asset to be created by an AssetFactory.

Hierarchy

  • AssetReference

Index

Constructors

constructor

  • 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.

    Parameters

    • data: any

    Returns AssetReference

Properties

data

data: any

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.

extension

extension: string

The file extension of the asset, if the filename or URL contains one.

mimeType

mimeType: string

The mime type of the asset, if loaded from a server.

name

name: string

The name with which the asset should be added to the AssetManager.

textureOptions

textureOptions: TextureOptions

The TextureOptions describing how to create a texture, if the asset references one.

url

url: string

The url from which the asset needs to be / has been loaded.

Methods

Protected get_data

  • get_data(): any

Protected get_extension

  • get_extension(): string

Protected get_mimeType

  • get_mimeType(): string

Protected get_name

  • get_name(): string

Protected get_textureOptions

Protected get_url

  • get_url(): string

Protected set_data

  • set_data(value: any): any

Protected set_extension

  • set_extension(value: string): string

Protected set_mimeType

  • set_mimeType(value: string): string

Protected set_name

  • set_name(value: string): string

Protected set_textureOptions

Protected set_url

  • set_url(value: string): string

Generated using TypeDoc