[name]
A loader for loading an .obj resource.
Constructor
[name]([page:String baseUrl], [page:Object options], [page:String crossOrigin])
baseUrl — The base url from which to find subsequent resources.
options — Options passed to the created material (side, wrap, normalizeRGB, ignoreZeroRGBs, invertTransparency).
crossOrigin — The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
Creates a new [name].
Properties
Methods
.load( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )
url — required
onLoad — Will be called when load completes. The argument will be the loaded [page:MTLLoaderMaterialCreator MTLLoader.MaterialCreator] instance.
onProgress — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.
onError — Will be called when load errors.
Begin loading from url and return the loaded material.
.parse([page:String text])
text — The textual obj structure to parse.
Parse a mtl text structure and returns a [page:MTLLoaderMaterialCreator MTLLoader.MaterialCreator] instance.
Source
[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/[name].js examples/js/loaders/[name].js]