[name]
Base class for implementing loaders.
Constructor
[name]([page:Boolean showStatus])
showStatus -- Show the status of loading div.
Creates a new [name]. This should be called as base class.
Properties
[property:Boolean showStatus]
If true, show loading status in the statusDomElement.
[property:DOMElement statusDomElement]
This is the recipient of status messages.
[property:Function onLoadStart]
Will be called when load starts.
The default is a function with empty body.
[property:Function onLoadProgress]
Will be called while load progresses.
The default is a function with empty body.
[property:Function onLoadComplete]
Will be called when load completes.
The default is a function with empty body.
[property:string crossOrigin]
The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
Methods
[method:Boolean needsTangents]([page:Array materials])
materials -- an array of [page:Material]
Checks if the loaded object needs tangents based on its materials.
[method:todo updateProgress]([page:object progress])
progress -- an object containing loaded(contains the amount of bytes loaded) and optionally total (containing the total amount of bytes).
Updates the DOM object with the progress made.
[method:Material createMaterial]([page:object m], [page:string texturePath])
m -- The parameters to create the material.
texturePath -- The base path of the textures.
Creates the Material based on the parameters m.
[method:Array initMaterials]([page:Array materials], [page:string texturePath])
materials -- an array of parameters to create materials.
texturePath -- The base path of the textures.
Creates an array of [page:Material] based on the array of parameters m. The index of the parameters decide the correct index of the materials.
[method:todo extractUrlBase]([page:string url])
url -- The url to extract the base url from.
Extract the base from the URL.
[method:DOMElement addStatusElement]()
Add a DOM element to indicate the progress and returns the DOMElement
Source
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]