TextureLoader Class

Module: Loaders

TextureLoader can be used to load external textures.

Constructor

TextureLoader

(
  • manager
)

Parameters:

  • manager Object

Methods

load

(
  • url
  • onLoad
  • onProgress
  • onError
)

Load texture from URL.

Does the same as creating a new Texture object.

Parameters:

  • url String
  • onLoad Function
  • onProgress Function
  • onError Function

loadJSON

(
  • url
  • onLoad
  • onProgress
  • onError
)

Load texture object from JSON.

Parameters:

  • url String
  • onLoad Function
  • onProgress Function
  • onError Function

parse

(
  • url
  • onLoad
)

Parse a texture object JSON description.

Parameters:

  • url String
  • onLoad Function

setFonts

(
  • fonts
)

Set list of fonts to be used by this loader.

Parameters:

  • fonts Array

setImages

(
  • images
)

Set list of images to be used by this loader.

Parameters:

  • images Array

setVideos

(
  • videos
)

Set list of videos to be used by this loader.

Parameters:

  • videos Array