AtlasManager loads atlas files with pixi loader, using the "atlas" resources registered in the game resources and process them to Pixi TextureAtlas.

Contrary to audio/fonts, text files are loaded asynchronously, when requested. You should properly handle errors, and give the developer/player a way to know that loading failed.

Implements

Constructors

Methods

  • Get the Pixi TextureAtlas for the given resource that is already loaded (preloaded or loaded with load). If the resource is not loaded, null will be returned.

    Parameters

    • resourceName: string

      The name of the atlas resource.

    Returns null | TextureAtlas

    the TextureAtlas of the atlas if loaded, null otherwise.

  • Returns promisified loaded atlas resource if it is available, loads it otherwise.

    Parameters

    • resourceName: string

      The name of resource to load.

    Returns Promise<TextureAtlas>

  • Check if the given atlas resource was loaded (preloaded or loaded with load).

    Parameters

    • resourceName: string

      The name of the atlas resource.

    Returns boolean

    true if the content of the atlas resource is loaded, false otherwise.