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

Implements

Constructors

Methods

  • Return a texture containing a circle filled with white.

    Parameters

    • radius: number

      The circle radius

    • pixiRenderer: Renderer

      The renderer used to generate the texture

    Returns Texture<Resource>

  • Return a texture filled with white.

    Parameters

    • width: number

      The texture width

    • height: number

      The texture height

    • pixiRenderer: Renderer

      The renderer used to generate the texture

    Returns Texture<Resource>

  • Return a texture rescaled according to given dimensions.

    Parameters

    • imageResourceName: string
    • width: number

      The texture width

    • height: number

      The texture height

    • pixiRenderer: Renderer

      The renderer used to generate the texture

    Returns Texture<Resource>

  • Return the PIXI texture associated to the specified resource name. If not found in the loaded textures, this method will try to load it. Warning: this method should only be used in specific cases that cannot rely on the initial resources loading of the game, such as the splashscreen.

    Parameters

    • resourceName: string

      The name of the resource

    Returns Texture<Resource>

    The requested texture, or a placeholder if not valid.

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

    Parameters

    • resourceName: string

      The name of the resource

    Returns Texture<Resource>

    The requested texture, or a placeholder if not found.

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

    Parameters

    • resourceName: string

      The name of the resource to get.

    Returns Texture<Resource>

  • Return the three.js material associated to the specified resource name.

    Parameters

    • resourceName: string

      The name of the resource

    • options: {
          forceBasicMaterial: boolean;
          useTransparentTexture: boolean;
          vertexColors: boolean;
      }
      • forceBasicMaterial: boolean
      • useTransparentTexture: boolean
      • vertexColors: boolean

    Returns Material

    The requested material.

  • Return the three.js texture associated to the specified resource name. Returns a placeholder texture if not found.

    Parameters

    • resourceName: string

      The name of the resource

    Returns Texture

    The requested texture, or a placeholder if not found.