TextureLoader Class
TextureLoader can be used to load external textures.
Methods
load
(
-
url -
onLoad -
onProgress -
onError
Load texture from URL.
Does the same as creating a new Texture object.
Parameters:
-
urlString -
onLoadFunction -
onProgressFunction -
onErrorFunction
loadJSON
(
-
url -
onLoad -
onProgress -
onError
Load texture object from JSON.
Parameters:
-
urlString -
onLoadFunction -
onProgressFunction -
onErrorFunction
parse
(
-
url -
onLoad
Parse a texture object JSON description.
Parameters:
-
urlString -
onLoadFunction
setCrossOrigin
(
TextureLoader
-
url
Set cross origin path for the loader.
Parameters:
-
urlStringURL.
Returns:
TextureLoader:
Self for chaining.
setFonts
(
-
fonts
Set list of fonts to be used by this loader.
Parameters:
-
fontsArray
setImages
(
-
images
Set list of images to be used by this loader.
Parameters:
-
imagesArray
setPath
(
TextureLoader
-
path
Set base path for texture loading.
Parameters:
-
pathStringPath
Returns:
TextureLoader:
Self for chaining.
setVideos
(
-
videos
Set list of videos to be used by this loader.
Parameters:
-
videosArray
