Class: PixiImageManager

PixiImageManager

new gdjs.PixiImageManager(resources)

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

Name Type Description
resources Object

The resources data of the game.

Methods

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

getPIXITexture(resourceName){PIXI.Texture}

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

Name Type Description
resourceName string

The name of the resource

Returns:
Type Description
PIXI.Texture The requested texture, or a placeholder if not found.

getPIXIVideoTexture(resourceName)

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

Name Type Description
resourceName string

The name of the resource to get.

loadTextures(onProgress, onComplete, resources)

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

Name Type Description
onProgress

Callback called each time a new file is loaded.

onComplete

Callback called when loading is done.

resources

The resources to be loaded. If not specified, will load the resources specified in the PixiImageManager constructor.