Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ILoaderResource

PixiJS' base Loader resource type. This is a superset of the resource-loader's Resource class and contains any mixins for extending.

memberof

PIXI

Hierarchy

  • ILoaderResource
  • Resource
    • ILoaderResource

Index

Properties

Optional bitmapFont

bitmapFont: BitmapFont

Readonly children

children: Resource[]

The child resources this resource owns.

readonly
member

{Resource[]}

crossOrigin

crossOrigin: string

Is this request cross-origin? If unset, determined automatically.

member

{string}

data

data: any

The data that was loaded by the resource.

member

{any}

Readonly error

error: Error

The error that occurred while loading (if any).

readonly
member

{Error}

Readonly extension

extension: string

The extension used to load this resource.

readonly
member

{string}

Readonly isComplete

isComplete: boolean

Describes if this resource has finished loading. Is true when the resource has completely loaded.

readonly
member

{boolean}

Readonly isDataUrl

isDataUrl: boolean

Stores whether or not this url is a data url.

readonly
member

{boolean}

Readonly isLoading

isLoading: boolean

Describes if this resource is currently loading. Is true when the resource starts loading, and is false again when complete.

readonly
member

{boolean}

loadType

loadType: LOAD_TYPE

The method of loading to use for this resource.

member

{Resource.LOAD_TYPE}

metadata

Data that can be added for loading resources.

Readonly name

name: string

The name of this resource.

readonly
member

{string}

onAfterMiddleware

onAfterMiddleware: any

Dispatched after this resource has had all the after middleware run on it.

The callback looks like {@link Resource.OnCompleteSignal}.

member

{Signal<Resource.OnCompleteSignal>}

onComplete

onComplete: any

Dispatched once this resource has loaded, if there was an error it will be in the error property.

The callback looks like {@link Resource.OnCompleteSignal}.

member

{Signal<Resource.OnCompleteSignal>}

onProgress

onProgress: any

Dispatched each time progress of this resource load updates. Not all resources types and loader systems can support this event so sometimes it may not be available. If the resource is being loaded on a modern browser, using XHR, and the remote server properly sets Content-Length headers, then this will be available.

The callback looks like {@link Resource.OnProgressSignal}.

member

{Signal<Resource.OnProgressSignal>}

onStart

onStart: any

Dispatched when the resource beings to load.

The callback looks like {@link Resource.OnStartSignal}.

member

{Signal<Resource.OnStartSignal>}

Readonly progressChunk

progressChunk: number

The progress chunk owned by this resource.

readonly
member

{number}

Optional spritesheet

spritesheet: Spritesheet

Reference to Spritesheet object created.

Optional texture

texture: Texture<Resource>

Texture reference for loading images and other textures.

Optional textures

textures: {}

Dictionary of textures from Spritesheet.

Type declaration

  • [name: string]: Texture

timeout

timeout: number

A timeout in milliseconds for the load. If the load takes longer than this time it is cancelled and the load is considered a failure. If this value is set to 0 then there is no explicit timeout.

member

{number}

Readonly type

type: TYPE

The resource type.

readonly
member

{Resource.TYPE}

Readonly url

url: string

The url used to load this resource.

readonly
member

{string}

Readonly xhr

xhr: XMLHttpRequest

The XHR object that was used to load this resource. This is only set when loadType is Resource.LOAD_TYPE.XHR.

readonly
member

{XMLHttpRequest}

xhrType

xhrType: string

The type used to load the resource via XHR. If unset, determined automatically.

member

{string}

Methods

abort

  • abort(message: string): void
  • Aborts the loading of this resource, with an optional message.

    Parameters

    • message: string

      The message to use for the error

    Returns void

complete

  • complete(): void
  • Marks the resource as complete.

    Returns void

load

  • load(cb?: OnCompleteSignal): void
  • Kicks off loading of this resource. This method is asynchronous.

    Parameters

    • Optional cb: OnCompleteSignal

    Returns void

Generated using TypeDoc