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:
-
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
setCrossOrigin
(
TextureLoader
-
url
Set cross origin path for the loader.
Parameters:
-
url
StringURL.
Returns:
TextureLoader:
Self for chaining.
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
setPath
(
TextureLoader
-
path
Set base path for texture loading.
Parameters:
-
path
StringPath
Returns:
TextureLoader:
Self for chaining.
setVideos
(
-
videos
Set list of videos to be used by this loader.
Parameters:
-
videos
Array