Capítulo 186 de 859
A loader for the MaterialX format.
The node materials loaded with this loader can only be used with WebGPURenderer.
const loader = new MaterialXLoader().setPath( SAMPLE_PATH );
const materials = await loader.loadAsync( 'standard_surface_brass_tiled.mtlx' );
Constructor
| Signature |
|---|
new MaterialXLoader( manager : LoadingManager ) |
Methods
| Method | Description |
|---|---|
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback ) : MaterialXLoader | Starts loading from the given URL and passes the loaded MaterialX asset to the onLoad() callback. |
.parse( text : string ) : Object.<string, NodeMaterial> | Parses the given MaterialX data and returns the resulting materials. |