Inheritance: Loader →
A loader for the 3D Manufacturing Format (3MF) format.
The following features from the core specification are supported:
3MF Materials and Properties Extension are only partially supported.
const loader = new ThreeMFLoader();
const object = await loader.loadAsync( './models/3mf/truck.3mf' );
object.rotation.set( - Math.PI / 2, 0, 0 ); // z-up conversion
scene.add( object );
ThreeMFLoader is an addon, and must be imported explicitly, see Installation#Addons.
import { ThreeMFLoader } from 'three/addons/loaders/3MFLoader.js';
Constructs a new 3MF loader.
manager
The loading manager.
An array of available extensions.
Adds a 3MF extension.
extension
The extension to add.
Starts loading from the given URL and passes the loaded 3MF 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
Parses the given 3MF data and returns the resulting group.
data
The raw 3MF asset data as an array buffer.
Overrides: Loader#parse
Returns: A group representing the parsed asset.