feat: save/load settings — export, import & auto-save#18
Open
Avatarsia wants to merge 2 commits intoCNCKitchen:mainfrom
Open
feat: save/load settings — export, import & auto-save#18Avatarsia wants to merge 2 commits intoCNCKitchen:mainfrom
Avatarsia wants to merge 2 commits intoCNCKitchen:mainfrom
Conversation
Add preset export/import via .bumpmesh files (ZIP containing settings, optional model STL, optional custom texture PNG). Two icon buttons in the header open an export dialog with checkboxes and a file picker. - Export dialog lets users choose what to include (settings always, model and custom texture optionally) - Import via file picker or drag & drop of .bumpmesh files - Auto-save to localStorage on every settings change, restore on reload - Uses fflate (already bundled) for ZIP creation/extraction - Full i18n support (EN/DE) for all new UI elements
…filtering - Auto-save now triggers for non-preview sliders (maxTriangles, refineLength) and lockScale toggle that previously bypassed updatePreview() - Import loads model before applying settings so handleModelFile() resets get correctly overridden by the imported values - Filter useDisplacement from export and localStorage (transient UI state) - Add 500 MB size limit on .bumpmesh import to prevent zip bombs - Add boundaryFalloff to _syncUIFromSettings() for upstream compatibility - Move i18n keys for settings export/import to lazy-loaded en.js/de.js Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #15
Adds the ability to save and restore all BumpMesh settings, so you don't have to recreate them from scratch each time.
How it works
Export — click the download icon in the header. A small dropdown lets you choose what to include:
Everything gets packed into a single
.bumpmeshfile (ZIP under the hood, using the fflate library that's already in the project for 3MF support).Import — click the upload icon in the header, or just drag & drop a
.bumpmeshfile onto the viewport. Settings get restored, sliders update, and if a model or texture was included they get loaded too.Auto-save — settings are saved to localStorage whenever you change them and restored automatically when you reload the page. No button needed, it just works.
Details
Rebased onto upstream + hardening fixes
Rebased onto current upstream/main (perspective camera, boundary falloff, i18n lazy-loading, GPLv3).
i18n keys migrated from inline to lazy-loaded
js/i18n/en.js/js/i18n/de.js.Additional fixes in
ab86fb1:maxTriangles,refineLength) andlockScaletoggle now correctly trigger auto-save (previously bypassedupdatePreview()and missed the save call)handleModelFile()resets (scaleU, offsetU, etc.) get correctly overridden by the imported valuesuseDisplacement(transient UI state for 3D preview toggle) is excluded from export and localStorage serialization.bumpmeshimport to guard against oversized files_syncUIFromSettings()now includes theboundary-falloffslider for correct restore of upstream's new falloff feature