ImageLoader Class

Module: Loaders

ImageLoader can be used to load external image resources.

Item Index

Methods

loadJSON

(
  • url
  • onLoad
  • onProgress
  • onError
)

Load image resource from url.

Parameters:

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

parse

(
  • json
)
Image

Parse image json and return resource.

Parameters:

  • json Object

Returns:

Image:

Image resource

setCrossOrigin

(
  • url
)
ImageLoader

Set cross origin path for the loader.

Parameters:

  • url String

    URL.

Returns:

ImageLoader:

Self for chaining.

setPath

(
  • path
)
ImageLoader

Set base path for texture loading.

Parameters:

  • path String

    Path

Returns:

ImageLoader:

Self for chaining.