Merge pull request #118 from openscad/ochafik-export-stl-default

Export to STL by default
This commit is contained in:
Torsten Paul 2025-04-20 21:51:24 +02:00 committed by GitHub
commit e0282681d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -81,7 +81,7 @@ export async function readStateFromFragment(): Promise<State | null> {
// Source deserialization also handles legacy links (source + sourcePath)
sources: params?.sources ?? (params?.source ? [{path: params?.sourcePath, content: params?.source}] : undefined), // TODO: validate!
exportFormat2D: validateStringEnum(params?.exportFormat2D, Object.keys(VALID_EXPORT_FORMATS_2D), s => 'svg'),
exportFormat3D: validateStringEnum(params?.exportFormat3D, Object.keys(VALID_EXPORT_FORMATS_3D), s => 'glb'),
exportFormat3D: validateStringEnum(params?.exportFormat3D, Object.keys(VALID_EXPORT_FORMATS_3D), s => 'stl'),
extruderColors: validateArray(params?.extruderColors, validateString, () => undefined as any as []),
},
preview: preview ? {

View file

@ -37,7 +37,7 @@ export function createInitialState(state: State | null, source?: {content?: stri
sources: [{path: activePath, content, url}],
features: [],
exportFormat2D: 'svg',
exportFormat3D: 'glb',
exportFormat3D: 'stl',
},
view: {
layout: {