PIXI. AtlasLoader

new AtlasLoader(url, crossorigin)

The atlas file loader is used to load in Texture Atlas data and parse it. When loaded this class will dispatch a 'loaded' event. If loading fails this class will dispatch an 'error' event.

To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format.

It is highly recommended to use texture atlases (also know as 'sprite sheets') as it allowed sprites to be batched and drawn together for highly increased rendering speed. Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId()

Parameters:
Name Type Description
url String

The url of the JSON file

crossorigin Boolean

Whether requests should be treated as crossorigin

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

Methods

load()

Starts loading the JSON file

Source - pixi/loaders/AtlasLoader.js, line 32
Phaser Copyright © 2012-2014 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Thu Dec 04 2014 11:33:02 GMT-0000 (GMT) using the DocStrap template.