Package Exports
- three-3mf-exporter
Readme
Three.js 3MF Exporter
Export 3D models to 3MF format in Three.js
Features
- Export Three.js models to 3MF format
- BambuStudio compatible
- Support for multiple materials and colors
- Automatic model centering on print bed
- Customizable print settings
- Preserves model names and hierarchy
Usage
Basic usage
import type { Group } from 'three'
import { exportTo3MF } from 'three-3mf-exporter'
const modelGroup = new Group() // Your Three.js model group
const blob = await exportTo3MF(modelGroup)
// Download the file
const url = URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = urlWith custom print settings (BambuStudio compatible)
const blob = await exportTo3MF(modelGroup, {
printer_name: 'Bambu Lab A1',
filament: 'Bambu PLA Basic @BBL A1',
printableWidth: 256,
printableDepth: 256,
printableHeight: 256,
printerSettingsId: 'Bambu Lab A1 0.4 nozzle',
printSettingsId: '0.20mm Standard @BBL A1',
})
// Download the file
const url = URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = urlSponsors
This project is made possible by all the sponsors supporting my work
You can join them at my sponsors profile: