JSPM

three-3mf-exporter

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 122
  • Score
    100M100P100Q81426F
  • License MIT

3MF Exporter for Three.js

Package Exports

  • three-3mf-exporter

Readme

Three.js 3MF Exporter

Export 3D models to 3MF format in Three.js

npm docs sponsors

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 = url

With 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 = url

Sponsors

This project is made possible by all the sponsors supporting my work
You can join them at my sponsors profile: