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
Defined in
webgi/src/extras/asset_manager/importer/threejs/loaders/MTLLoader2.ts:24
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
Defined in
webgi/src/extras/asset_manager/importer/threejs/loaders/MTLLoader2.ts:43
setMaterialOptions
▸ setMaterialOptions(value
): MTLLoader2
Parameters
Name | Type |
---|---|
value | any |
Returns
Defined in
webgi/src/extras/asset_manager/importer/threejs/loaders/MTLLoader2.ts:79
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
Defined in
webgi/src/extras/asset_manager/importer/threejs/loaders/MTLLoader2.ts:97