Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • PixiImageManager

Index

Constructors

Methods

  • getInvalidPIXITexture(): Texture<Resource>
  • Return a PIXI texture which can be used as a placeholder when no suitable texture can be found.

    Returns Texture<Resource>

  • 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>

  • getThreeMaterial(resourceName: string, options: { forceBasicMaterial: boolean; useTransparentTexture: boolean }): Material | MeshBasicMaterial | MeshStandardMaterial
  • 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 | MeshBasicMaterial | MeshStandardMaterial

    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.

  • loadTextures(onProgress: any, onComplete: any): any
  • Load the specified resources, so that textures are loaded and can then be used by calling getPIXITexture.

    Parameters

    • onProgress: any

      Callback called each time a new file is loaded.

    • onComplete: any

      Callback called when loading is done.

    Returns any

  • setResources(resources: ResourceData[]): void
  • Update the resources data of the game. Useful for hot-reloading, should not be used otherwise.

    Parameters

    • resources: ResourceData[]

      The resources data of the game.

    Returns void

Generated using TypeDoc