Manages loading image sources into webgl textures, a unique id is associated with all sources

Hierarchy

  • TextureLoader

Constructors

Properties

filtering: ImageFiltering = ImageFiltering.Blended

Sets the default filtering for the Excalibur texture loader, default ImageFiltering.Blended

Methods

  • Loads a graphic into webgl and returns it's texture info, a webgl context must be previously registered

    Parameters

    • image: HTMLImageSource

      Source graphic

    • Optional filtering: ImageFiltering

      {ImageFiltering} The ImageFiltering mode to apply to the loaded texture

    • forceUpdate: boolean = false

      Optionally force a texture to be reloaded, useful if the source graphic has changed

    Returns WebGLTexture