PIXI. AssetLoader

new AssetLoader(assetURLs, crossorigin)

A Class that loads a bunch of images / sprite sheet / bitmap font files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromImage() and PIXI.Sprite.fromImage() When all items have been loaded this class will dispatch a 'onLoaded' event As each individual item is loaded this class will dispatch a 'onProgress' event

Parameters:
Name Type Description
assetURLs Array.<String>

An array of image/sprite sheet urls that you would like loaded supported. Supported image formats include 'jpeg', 'jpg', 'png', 'gif'. Supported sprite sheet data formats only include 'JSON' at this time. Supported bitmap font data formats include 'xml' and 'fnt'.

crossorigin Boolean

Whether requests should be treated as crossorigin

Source - pixi/loaders/AssetLoader.js, line 5

Members

assetURLs :Array.<String>

The array of asset URLs that are going to be loaded

Type:
  • Array.<String>
Source - pixi/loaders/AssetLoader.js, line 23

crossorigin :Boolean

Whether the requests should be treated as cross origin

Source - pixi/loaders/AssetLoader.js, line 31

loadersByType :Object

Maps file extension to loader types

Source - pixi/loaders/AssetLoader.js, line 39

Methods

_getDataType(str)

Given a filename, returns its extension.

Parameters:
Name Type Description
str String

the name of the asset

Source - pixi/loaders/AssetLoader.js, line 74

load()

Starts loading the assets sequentially

Source - pixi/loaders/AssetLoader.js, line 107
Phaser Copyright © 2012-2014 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Tue Jan 06 2015 06:32:28 GMT-0000 (GMT) using the DocStrap template.