Class: MTLLoader2
Asset-Management.MTLLoader2
Loads a Wavefront .mtl file specifying materials
Hierarchy
Loader↳
MTLLoader2
Constructors
constructor
• new MTLLoader2(manager)
Parameters
| Name | Type |
|---|---|
manager | any |
Overrides
Loader.constructor
Methods
load
▸ load(url, onLoad, onProgress, onError): void
Loads and parses a MTL asset from a URL.
see setPath setResourcePath
note In order for relative texture references to resolve correctly
you must call setResourcePath() explicitly prior to load.
Parameters
| Name | Type | Description |
|---|---|---|
url | any | URL to the MTL file. |
onLoad | any | - |
onProgress | any | - |
onError | any | - |
Returns
void
Overrides
Loader.load
setMaterialOptions
▸ setMaterialOptions(value): MTLLoader2
Parameters
| Name | Type |
|---|---|
value | any |
Returns
parse
▸ parse(text, path): MaterialCreator
Parses a MTL file.
see setPath setResourcePath
note In order for relative texture references to resolve correctly
you must call setResourcePath() explicitly prior to parse.
Parameters
| Name | Type | Description |
|---|---|---|
text | any | Content of MTL file |
path | any | - |
Returns
MaterialCreator