@threepipe/plugins-extra-importers
Exports several plugins to add support for various file types.
Example — Source Code — API Reference
bash
npm install @threepipe/plugins-extra-importers
This package exports several plugins to add support for several file types using the following plugins
- TDSLoadPlugin - Load 3DS Max (.3ds) files
- ThreeMFLoadPlugin - Load 3MF (.3mf) files
- ColladaLoadPlugin - Load Collada (.dae) files
- AMFLoadPlugin - Load AMF (.amf) files
- BVHLoadPlugin - Load BVH (.bvh) files
- VOXLoadPlugin - Load MagicaVoxel (.vox) files
- GCodeLoadPlugin - Load GCode (.gcode) files
- MDDLoadPlugin - Load MDD (.mdd) files
- PCDLoadPlugin - Load Point cloud data (.pcd) files
- TiltLoadPlugin - Load Tilt Brush (.tilt) files
- VRMLLoadPlugin - Load VRML (.wrl) files
- MPDLoadPlugin - Load LDraw (.mpd) files
- VTKLoadPlugin - Load VTK (.vtk) files
- XYZLoadPlugin - Load XYZ (.xyz) files
To add all the plugins at once use extraImporters
. This adds support for loading all the above file types.
typescript
import {ThreeViewer} from 'threepipe'
import {extraImporters} from '@threepipe/plugins-extra-importers'
const viewer = new ThreeViewer({...})
viewer.addPluginsSync(extraImporters)
// Now load any file as is.
const model = await viewer.load<IObject3D>('file.3mf')
// To load the file as a data url, use the correct mimetype
const model1 = await viewer.load<IObject3D>('data:model/3mf;base64,...')
Remove the <IObject3D>
if using javascript and not typescript.