[name]
Handles and keeps track of loaded and pending data.
var manager = new THREE.LoadingManager();
manager.onProgress = function ( item, loaded, total ) {
console.log( item, loaded, total );
};
var loader = new THREE.OBJLoader( manager );
loader.load( 'file.obj', function ( object ) {
//
} );
Constructor
[name]( [page:Function onLoad], [page:Function onProgress], [page:Function onError] )
[page:Function onLoad] — The function that needs to be called when all loaders are done.
[page:Function onProgress] — The function that needs to be called when an item is complete.
[page:Function onError] — The function that needs to be called when an item is errors.
Creates a [name].
Properties
[property:Function onLoad]
The function that needs to be called when all loaders are done.
[property:Function onProgress]
The function that needs to be called when an item is complete. The arguments are url(The url of the item just loaded),
loaded(the amount of items already loaded), total( The total amount of items to be loaded.)
[property:Function onError]
The function that needs to be called when an item errors.
Methods
[method:null itemStart]( [page:String url] )
[page:String url] — the url to load
This should be called by any loader used by the manager when the loader starts loading an url. These shouldn't be called outside a loader.
[method:null itemEnd]( [page:String url] )
[page:String url] — the loaded url
This should be called by any loader used by the manager when the loader ended loading an url. These shouldn't be called outside a loader.
Example
[example:webgl_loader_obj]
Source
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]