PIXI. ImageLoader

new ImageLoader(url, crossorigin)

The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrame() and PIXI.Sprite.fromFrame() When loaded this class will dispatch a 'loaded' event

Parameters:
Name Type Description
url String

The url of the image

crossorigin Boolean

Whether requests should be treated as crossorigin

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

Members

<readonly> frames :Array

if the image is loaded with loadFramedSpriteSheet frames will contain the sprite sheet frames

Source - pixi/loaders/ImageLoader.js, line 26

texture :PIXI.Texture

The texture being loaded

Source - pixi/loaders/ImageLoader.js, line 18

Methods

load()

Loads image or takes it from cache

Source - pixi/loaders/ImageLoader.js, line 42

loadFramedSpriteSheet(frameWidth, frameHeight, textureName)

Loads image and split it to uniform sized frames

Parameters:
Name Type Description
frameWidth Number

width of each frame

frameHeight Number

height of each frame

textureName String

if given, the frames will be cached in <textureName>-<ord> format

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