The slot list comes from the project file, which is sometimes wrong and sometimes not what you intend to print. "Edit slots" turns it into fields: material and colour per slot, with slots you can add or drop. Saved slots are marked as yours and shown with a "your list" badge, and "Use the project's list" throws the override away and re-reads the 3MF. Edits have to outlive the background reader, which is the part that would fail silently: the reader only picks up models with no status, and reread() now skips 'edited' rather than nulling everything. Verified on a real model — the edit survived a reread plus a full worker pass, and the revert restored the project's own four slots exactly. Input cleaning moved out of the route into lib/filaments.js so it can be tested: a slot with no material is dropped, and a colour that isn't a proper hex becomes "any colour of that material" rather than being rejected. Not verified: none of this has been seen rendered — the local preview browser has no session. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app.js | ||
| favicon.svg | ||
| index.html | ||
| styles.css | ||
| viewer.js | ||