[name]
A loader for loading an [page:Material material].
Constructor
[name]([page:LoadingManager manager)
manager -- The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
Creates a new [name].
Methods
.load( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] ) [page:Image]
onLoad -- Will be called when load completes. The argument will be the loaded Imageloader.
onProgress -- Will be called while load progresses. The argument will be the progress event.
onError -- Will be called when load errors.
url — required
Begin loading from url and return the [page:Material material] object that will contain the data.
.setCrossOrigin([page:String value])
value -- The crossOrigin string.
The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
.parse([page:Object json]) {
json -- The json object containing the parameters of the Material.
Creates a new [page:Material material] of the type 'json.type' and with parameters defined in the json object.
Source
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]