ImageManager

A class that manages loading of images.

new ImageManager()

Methods

getImage(path, localPosArr) → {arc.Image}

Returns Image object from its list of loaded images.

Parameters:
Name Type Description
path String A url of the image
localPosArr Array An array of local position and size of the image in a format like [x, y, width, height]. If the parameter is specified, it returns a clipped Image object.(Optional)
Returns:
arc.Image A loaded Image object
Example
var img = loader.getImage('a.png', [10, 10, 100, 100]);

getLoaded() → {Number}

Returns a number of total loaded images.

Returns:
Number A number of total loaded images

getTotal() → {Number}

Returns a number of total images.

Returns:
Number A number of total images

load(srcArr)

Starts to load the images.

Parameters:
Name Type Description
srcArr Array An array that holds urls of the images