Socket
Book a DemoInstallSign in
Socket

three-3mf-exporter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

three-3mf-exporter

3MF Exporter for Three.js

0.0.4
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Three.js 3MF Exporter

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

npm docs sponsors

While developing Bekuto3D, I discovered that Three.js lacked support for the 3MF format, which is essential for modern 3D printing workflows. Unlike STL, 3MF supports colors, materials, and print settings metadata. This exporter bridges the gap between web development and 3D printing, making it easier for Three.js developers to create 3D printable models with rich features.

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 { exportTo3MF } from 'three-3mf-exporter'

// Parse the three.js object and generate the 3MF encoded output
const blob = await exportTo3MF(mesh)

// 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(meshOrGroup, {
  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:

Why 3MF?

The 3MF format offers significant advantages over alternatives like STL for 3D printing:

  • Color & Material Support: Export models with multiple colors and materials
  • Print Settings: Embed printer-specific configurations directly in the file
  • Modern Standard: An open, industry-supported format designed specifically for 3D printing
  • Slicer Compatibility: Works directly with popular slicers like BambuStudio without conversion

This exporter was created to enable web developers to easily bridge the gap between Three.js projects and physical 3D printing.

Keywords

3mf

FAQs

Package last updated on 14 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.