PixiImageManager

PixiImageManager

PixiImageManager loads and stores textures that can be used by the Pixi.js renderers.

Constructor

new PixiImageManager(resources)

Parameters:
Name Type Description
resources

The resources data of the game.

Source:

Methods

getInvalidPIXITexture()

Return a PIXI texture which can be used as a placeholder when no suitable texture can be found.

Source:

getPIXITexture(resourceName)

Return the PIXI texture associated to the specified resource name. Returns a placeholder texture if not found.

Parameters:
Name Type Description
resourceName

The name of the resource

Returns:
Type Description

The requested texture, or a placeholder if not found.

Source:

getPIXIVideoTexture(resourceName)

Return the PIXI video texture associated to the specified resource name. Returns a placeholder texture if not found.

Parameters:
Name Type Description
resourceName

The name of the resource to get.

Source:

loadTextures(onProgress, onComplete)

Load the specified resources, so that textures are loaded and can then be used by calling getPIXITexture.

Parameters:
Name Type Description
onProgress

Callback called each time a new file is loaded.

onComplete

Callback called when loading is done.

Source:

setResources(resources)

Update the resources data of the game. Useful for hot-reloading, should not be used otherwise.

Parameters:
Name Type Description
resources

The resources data of the game.

Source: