A loader for loading an .mtl resource, used internaly by OBJLoader.
The Material Template Library format (MTL) or .MTL File Format is a companion file format to .OBJ that describes surface shading (material) properties of objects within one or more .OBJ files.
loadingManager — LoadingManager to use. Defaults to DefaultLoadingManager
Creates a new MTLLoader.
url — A string containing the path/URL of the .mtl file.
onLoad — (optional) A function to be called after the loading is successfully completed. The function receives the loaded MTLLoader.MaterialCreator instance.
onProgress — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains total and loaded bytes.
onError — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.
Begin loading from url and return the loaded material.
path — required
Set base path for MTL file.
path — required
Set base path for additional resources like textures. If set, this path will be used as the base path.
value — required
If set, assigns the crossOrigin attribute of the image to the value of crossOrigin, prior to starting the load. Default is "anonymous".
options — required
Set of options on how to construct the materials
text — The textual mtl structure to parse. path — The path to the MTL file.
Parse a mtl text structure and return a MTLLoaderMaterialCreator instance.
For more info on how to obtain the source code of this module see this page.