three-slicer 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -8
- package/components/README.md +1 -1
- package/components/dist/SettingsPanel.js +12 -12
- package/data/README.md +39 -2
- package/data/config-schema.json +164 -0
- package/data/filaments.js +2 -0
- package/data/processes.js +1 -1
- package/data/ui-tree.json +21 -2
- package/engine/README.md +56 -4
- package/engine/src/data.js +2 -0
- package/engine/src/settings.js +133 -6
- package/engine/src/slicer.worker.js +142 -5
- package/engine/src/slicer_core.js +0 -0
- package/engine/src/slicer_core.mt.js +0 -0
- package/package.json +15 -2
- package/types/data/filaments.js.d.ts +27 -0
- package/types/data.d.ts +7 -0
- package/types/settings-keys.d.ts +35 -1
- package/types/settings.d.ts +30 -0
- package/types/viewer-gcode.d.ts +29 -0
- package/types/viewer-toolpath.d.ts +9 -1
- package/types/viewer.d.ts +53 -0
- package/viewer/README.md +48 -2
- package/viewer/dist/Viewport.js +2484 -1521
- package/viewer/dist/gcode_parse.js +190 -0
- package/viewer/dist/toolpath_gpu.js +162 -137
- package/viewer/styles.css +50 -2
package/viewer/styles.css
CHANGED
|
@@ -76,14 +76,31 @@
|
|
|
76
76
|
.bp-modes button { padding: 3px 9px; border: 1px solid #2c353d; background: #1a2027; color: #cdd6dd; border-radius: 5px; cursor: pointer; font-size: 12px; }
|
|
77
77
|
.bp-modes button.enf.on { background: #2b6cff; color: #fff; border-color: #2b6cff; }
|
|
78
78
|
.bp-modes button.blk.on { background: #e23b3b; color: #fff; border-color: #e23b3b; }
|
|
79
|
+
/* Tool row (brush / smart / bucket / triangle + the brush's cursor shape). Its own selected style rather than
|
|
80
|
+
.bp-chip's white outline: a chip carries the filament colour and needs a border that reads on any of them,
|
|
81
|
+
while a tool button only has to look pressed. */
|
|
82
|
+
.bp-tools { margin-top: 6px; }
|
|
83
|
+
.bp-tool.on { background: #2c353d; color: #fff; border-color: #46525c; }
|
|
79
84
|
.bp-radius { display: block; font-size: 12px; color: #aebcc6; margin-top: 8px; }
|
|
80
85
|
.bp-radius input { width: 100%; }
|
|
81
86
|
.bp-counts { margin-top: 6px; font-size: 11px; }
|
|
87
|
+
/* Material brush: the chip IS the filament colour, so its background is inline and only the framing is here.
|
|
88
|
+
The active ring is drawn outside the box (outline, not border) — a border would resize the chip on selection. */
|
|
89
|
+
.bp-chip { min-width: 30px; font-weight: 700; border-color: rgba(0,0,0,.35) !important; }
|
|
90
|
+
.bp-chip.on { outline: 2px solid #fff; outline-offset: 1px; }
|
|
91
|
+
.bp-eraser { background: #1a2027 !important; color: #cdd6dd !important; font-weight: 400; }
|
|
92
|
+
.bp-actions { margin-top: 6px; }
|
|
93
|
+
.bp-note { margin-top: 6px; font-size: 10.5px; line-height: 1.35; color: #8b98a2; }
|
|
82
94
|
|
|
83
95
|
/* Preview stats card, bottom left */
|
|
84
96
|
.stats-card { position: absolute; left: 14px; bottom: 32px; background: rgba(22,27,33,.93); border: 1px solid #2c353d;
|
|
85
97
|
border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.7; z-index: 2; color: #cdd6dd; }
|
|
86
98
|
.stats-card b { color: #9fe3bd; }
|
|
99
|
+
/* Per-extruder filament breakdown under the total — indented so it reads as a detail of the line above. */
|
|
100
|
+
.stat-tool { display: flex; align-items: center; gap: 5px; font-size: 12px; margin-left: 10px; }
|
|
101
|
+
.stat-swatch { width: 9px; height: 9px; border-radius: 2px; border: 1px solid rgba(255,255,255,.28); flex: 0 0 auto; }
|
|
102
|
+
/* Purge belongs to no extruder, so it gets hatching rather than a colour that would read as a fifth tool. */
|
|
103
|
+
.stat-swatch-purge { background: repeating-linear-gradient(45deg, #6d7780 0 2px, #39424a 2px 4px); }
|
|
87
104
|
|
|
88
105
|
/* S4 right sidebar (light) */
|
|
89
106
|
.sidebar { flex: 0 0 384px; width: 384px; display: flex; flex-direction: column; background: #eef0f2; color: #24282e;
|
|
@@ -95,15 +112,29 @@
|
|
|
95
112
|
.sc-head-btns { margin-left: auto; display: flex; gap: 4px; }
|
|
96
113
|
.sc-head-btns button { width: 22px; height: 22px; border: 1px solid #d3d6db; background: #f6f7f8; border-radius: 5px; cursor: pointer; font-size: 14px; line-height: 1; color: #333; }
|
|
97
114
|
.sc-head-btns button:disabled { opacity: .4; cursor: not-allowed; }
|
|
115
|
+
/* Preset actions carry a label, so they override the 22px square the +/− icon buttons above are sized to. */
|
|
116
|
+
.sc-preset-btns button { width: auto; padding: 0 8px; font-size: 11px; white-space: nowrap; }
|
|
117
|
+
.sc-dirty { color: #c47f00; font-weight: 600; }
|
|
98
118
|
.sc-info { display: flex; justify-content: space-between; font-size: 12px; color: #5a6069; padding: 2px 0; }
|
|
99
119
|
.sc-info b { color: #24282e; }
|
|
100
120
|
.side-warn { margin: 0 2px; font-size: 12px; }
|
|
101
121
|
|
|
102
122
|
.filament-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
|
|
103
123
|
.filament-row input[type=color] { width: 28px; height: 22px; border: 1px solid #ccc; border-radius: 5px; padding: 0; cursor: pointer; background: none; }
|
|
124
|
+
/* One row per extruder, and the row is the selector for which extruder the pickers below edit. */
|
|
125
|
+
.filament-row { cursor: pointer; border-radius: 5px; padding-left: 4px; }
|
|
126
|
+
.filament-row.fil-active { background: #eef6f0; box-shadow: inset 2px 0 0 #00ae42; }
|
|
127
|
+
.fil-mat { font-size: 11.5px; color: #5a6069; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
128
|
+
.sc-note { color: #8a9099; font-size: 11px; font-style: italic; }
|
|
104
129
|
.fil-t { font-weight: 700; font-size: 12px; width: 20px; }
|
|
105
|
-
|
|
106
|
-
.fil-
|
|
130
|
+
/* The material name is the row's flexible column, so the paint controls are pinned to the right of it. */
|
|
131
|
+
.fil-mat { flex: 1; min-width: 0; } /* min-width:0 is what lets a flex item actually ellipsis instead of overflowing */
|
|
132
|
+
.fil-badge { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
|
|
133
|
+
color: #5a6069; background: #eceef1; border-radius: 7px; padding: 1px 5px; white-space: nowrap; }
|
|
134
|
+
.fil-count { font-size: 10px; font-weight: 700; color: #fff; background: #2b6cff; border-radius: 7px; padding: 0 5px; }
|
|
135
|
+
.fil-paint { border: 1px solid #d3d6db; background: #f6f7f8; border-radius: 5px; cursor: pointer;
|
|
136
|
+
font-size: 11px; line-height: 1; padding: 3px 5px; }
|
|
137
|
+
.fil-paint.on { background: #2b6cff; border-color: #2b6cff; }
|
|
107
138
|
|
|
108
139
|
.obj-list2 { list-style: none; margin: 0 0 6px; padding: 0; }
|
|
109
140
|
.obj-list2 li { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 12px; }
|
|
@@ -112,6 +143,8 @@
|
|
|
112
143
|
.obj-list2 .obj-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #24282e; }
|
|
113
144
|
.obj-list2 .obj-ext { border: 1px solid #d0d3d8; border-radius: 5px; font-size: 11px; padding: 1px 3px; background: #fff; }
|
|
114
145
|
.obj-del { border: 0; background: #fbe9ec; color: #d0435a; border-radius: 5px; cursor: pointer; padding: 0 6px; }
|
|
146
|
+
/* Marks a row whose object carries material paint — the extruder select next to it then covers only the rest of it. */
|
|
147
|
+
.obj-painted { font-size: 10px; line-height: 1; background: #e6efff; border-radius: 6px; padding: 2px 4px; }
|
|
115
148
|
.side-card .slice-support { color: #444; font-size: 12px; margin: 5px 0 0; }
|
|
116
149
|
|
|
117
150
|
/* Process card = embedded settings panel (light, full width) */
|
|
@@ -168,6 +201,8 @@
|
|
|
168
201
|
background: #fff; color: #24282e; cursor: pointer; white-space: nowrap; }
|
|
169
202
|
.sup-paint.on { background: #2b6cff; border-color: #2b6cff; color: #fff; }
|
|
170
203
|
.sup-paint:disabled { opacity: .45; cursor: not-allowed; }
|
|
204
|
+
/* Sits in the light sidebar, so it cannot borrow .slice-warn's colour (tuned for the dark viewport overlay). */
|
|
205
|
+
.sup-filament-warn { margin: 2px 0 2px 22px; font-size: 11px; line-height: 1.35; color: #a06a00; }
|
|
171
206
|
.slice-btn { width: 100%; margin-top: 6px; padding: 7px; border: 0; border-radius: 7px;
|
|
172
207
|
background: #00ae42; color: #fff; font-weight: 700; cursor: pointer; }
|
|
173
208
|
.slice-btn:disabled { background: #3a4650; color: #8b98a2; cursor: not-allowed; }
|
|
@@ -252,3 +287,16 @@
|
|
|
252
287
|
.sc-bed { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #222; }
|
|
253
288
|
.sc-bed input { width: 54px; padding: 1px 4px; font-size: 12px; font-weight: 600; text-align: right;
|
|
254
289
|
border: 1px solid #ccd0d5; border-radius: 5px; background: #fff; color: #222; }
|
|
290
|
+
/* Model/Tower breakdown inside a filament row — secondary to the total it qualifies, so it reads as an aside. */
|
|
291
|
+
.stat-split { color: #8b98a2; font-size: 11px; }
|
|
292
|
+
/* Material name next to the tool number in the filament legend — a label, so it sits quieter than the amount. */
|
|
293
|
+
.stat-type { margin-left: 4px; padding: 0 4px; border-radius: 3px; background: #2c353d; color: #aebcc6; font-size: 10.5px; }
|
|
294
|
+
/* Purge matrix: one row/column per filament, so it has to stay legible at 3-4 columns inside a 300px card. */
|
|
295
|
+
.purge-grid { width: 100%; border-collapse: collapse; font-size: 11px; }
|
|
296
|
+
.purge-grid th { font-weight: 600; color: #aebcc6; padding: 2px 3px; white-space: nowrap; }
|
|
297
|
+
.purge-grid th .stat-swatch { margin-right: 3px; vertical-align: middle; }
|
|
298
|
+
.purge-grid td { padding: 1px 2px; text-align: center; }
|
|
299
|
+
.purge-grid input { width: 100%; min-width: 42px; background: #1a2027; border: 1px solid #2c353d; color: #cdd6dd;
|
|
300
|
+
border-radius: 4px; padding: 2px 3px; font-size: 11px; }
|
|
301
|
+
.sc-num input { width: 62px; background: #1a2027; border: 1px solid #2c353d; color: #cdd6dd; border-radius: 4px;
|
|
302
|
+
padding: 2px 5px; font-size: 12px; margin-left: 4px; }
|