feat: add STL and OBJ export formats (#175)
Extend the export manager to support STL and OBJ formats in addition to the existing GLB export. Uses Three.js built-in STLExporter and OBJExporter - no new dependencies. STL is the standard format for 3D printing. OBJ is widely used in rendering pipelines and supports basic materials. Both are requested in the community discussion on #145. Changes: - export-manager.tsx: add STLExporter and OBJExporter, accept format param - settings-panel: three format-specific export buttons (GLB, STL, OBJ) - use-viewer store: update exportScene type to accept optional format The format parameter defaults to 'glb', so existing callers (command palette) continue to work without changes. Relates to #145 Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Matt Van Horn
Claude Opus 4.6
parent
7d4c8b6bd4
commit
a5378da020
@@ -61,8 +61,8 @@ type ViewerState = {
|
||||
outliner: Outliner // No setter as we will manipulate directly the arrays
|
||||
|
||||
// Export functionality
|
||||
exportScene: (() => Promise<void>) | null
|
||||
setExportScene: (fn: (() => Promise<void>) | null) => void
|
||||
exportScene: ((format?: 'glb' | 'stl' | 'obj') => Promise<void>) | null
|
||||
setExportScene: (fn: ((format?: 'glb' | 'stl' | 'obj') => Promise<void>) | null) => void
|
||||
|
||||
debugColors: boolean
|
||||
setDebugColors: (enabled: boolean) => void
|
||||
|
||||
Reference in New Issue
Block a user