Class: ImageLoadStack

ImageLoadStack(images, finished, started, loaded, total, id)

new ImageLoadStack(images, finished, started, loaded, total, id)

An object used to load a series/collection of images all at once and give progress statistics and has an onload function once all images are loaded. Specify all images to be loaded with the addImage function and then initiate loading with the start function
Parameters:
Name Type Description
images Array An array of all the images that this ImageLoadStack loaded
finished Boolean Tells if all of the images are loaded or not.
started Boolean Tells if the ImageLoadStack has started loading images yet or not. (Start loading by calling the start() function)
loaded Integer The number of images that are loaded
total Integer The number of images that are loaded or not loaded.
id Integer The id of this ImageLoadStack
Source:

Methods

(static) addImage(src, width, height) → {Integer}

Use this function to add images to the loading que before starting loading.
Parameters:
Name Type Description
src String The URI of the image to be loaded
width Integer The width in pixels of the image
height Integer The height in pixels of the image
Source:
Returns:
The index of the image in the images array
Type
Integer

(protected, static) imageLoaded(imgId)

An event handler that is called when an image is done loading. Really no reason for developers to touch this function.
Parameters:
Name Type Description
imgId Integer
Source:

(static) start()

Call this function once all images are in the que to start loading them. Will set this.started to True.
Source:

Type Definitions

onload

Meant to be overrided, called once all of the images have loaded.
Source: