File: MaterialXLoader.md | Updated: 11/15/2025
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' );
MaterialXLoader is an addon, and must be imported explicitly, see Installation#Addons.
import { MaterialXLoader } from 'three/addons/loaders/MaterialXLoader.js';
Constructs a new MaterialX loader.
manager | The loading manager.
---|---
Starts loading from the given URL and passes the loaded MaterialX asset to the onLoad() callback.
url | The path/URL of the file to be loaded. This can also be a data URI.
---|---
onLoad | Executed when the loading process has been finished.
onProgress | Executed while the loading is in progress.
onError | Executed when errors occur.
Overrides: Loader#load
Returns: A reference to this loader.
Parses the given MaterialX data and returns the resulting materials.
Supported standard_surface inputs:
text | The raw MaterialX data as a string.
---|---
Overrides: Loader#parse
Returns: A dictionary holding the parse node materials.