Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • PixiImageManager

Implements

Index

Constructors

Methods

  • dispose(): void
  • getInvalidPIXITexture(): Texture<Resource>
  • getOrCreateDiskTexture(radius: number, pixiRenderer: Renderer): Texture<Resource>
  • getOrCreateRectangleTexture(width: number, height: number, pixiRenderer: Renderer): 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>

  • getOrCreateScaledTexture(imageResourceName: string, width: number, height: number, pixiRenderer: Renderer): 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>

  • getOrLoadPIXITexture(resourceName: string): 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.

  • getPIXITexture(resourceName: string): Texture<Resource>
  • 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.

  • getPIXIVideoTexture(resourceName: string): Texture<Resource>
  • 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>

  • getResourceKinds(): ResourceKind[]
  • getThreeMaterial(resourceName: string, options: { forceBasicMaterial: boolean; useTransparentTexture: boolean }): Material
  • Return the three.js material associated to the specified resource name.

    Parameters

    • resourceName: string

      The name of the resource

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

    Returns Material

    The requested material.

  • getThreeTexture(resourceName: string): Texture
  • 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.

  • loadResource(resourceName: string): Promise<void>
  • processResource(resourceName: string): Promise<void>

Generated using TypeDoc