three-slicer 0.1.1 → 0.1.2
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/components/dist/SettingsPanel.js +112 -112
- package/components/styles.css +9 -9
- package/data/invalidation-map.json +1 -1
- package/engine/examples/headless.mjs +2 -2
- package/engine/index.js +2 -2
- package/engine/src/data.js +7 -7
- package/engine/src/settings.js +34 -34
- package/engine/src/slicer.worker.js +23 -21
- package/engine/src/toggle_eval.js +11 -11
- package/package.json +1 -1
- package/types/components.d.ts +5 -5
- package/types/data/config-schema.json.d.ts +6 -6
- package/types/data/invalidation-map.json.d.ts +5 -5
- package/types/data/toggle-rules.json.d.ts +5 -5
- package/types/data/ui-tree.json.d.ts +3 -3
- package/types/data.d.ts +6 -6
- package/types/gen_settings_types.mjs +10 -10
- package/types/settings-keys.d.ts +4 -4
- package/types/settings.d.ts +6 -6
- package/types/toggle.d.ts +6 -6
- package/types/viewer-loaders.d.ts +8 -8
- package/types/viewer-toolpath.d.ts +17 -17
- package/types/viewer.d.ts +3 -3
- package/types/wasm.d.ts +3 -3
- package/types/worker.d.ts +2 -2
- package/viewer/dist/Viewport.js +1760 -966
- package/viewer/dist/make_worker.js +6 -6
- package/viewer/dist/model_loaders.js +35 -35
- package/viewer/dist/toolpath_gpu.js +146 -147
- package/viewer/styles.css +25 -25
package/viewer/styles.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/* Shadow DOM
|
|
2
|
-
shadow root
|
|
1
|
+
/* Shadow DOM isolation (shadow_host.jsx) — this file is inlined into the bundle as a string via ?inline
|
|
2
|
+
and injected into the shadow root. Outside resets (*{box-sizing}, …) cannot reach it, so they are spelled out here. */
|
|
3
3
|
:host { display: contents; }
|
|
4
4
|
* { box-sizing: border-box; }
|
|
5
5
|
|
|
6
|
-
/* ===== 27
|
|
6
|
+
/* ===== Stage 27: desktop-style shell (top bar · left rail · center viewport · right sidebar) ===== */
|
|
7
7
|
.app-shell { position: absolute; inset: 0; display: flex; flex-direction: column; background: #0e1216; color: #cdd6dd;
|
|
8
8
|
font: 14px/1.5 -apple-system, "Segoe UI", sans-serif; }
|
|
9
9
|
.app-body { flex: 1 1 auto; display: flex; min-height: 0; }
|
|
10
10
|
|
|
11
|
-
/* S1
|
|
11
|
+
/* S1 top bar */
|
|
12
12
|
.topbar { flex: 0 0 44px; height: 44px; display: flex; align-items: center; padding: 0 12px; gap: 10px;
|
|
13
13
|
background: #161b21; border-bottom: 1px solid #262d35; }
|
|
14
14
|
.topbar .tb-left, .topbar .tb-right { flex: 1 1 0; display: flex; align-items: center; gap: 8px; }
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
.tb-tabs button:disabled { color: #5a6570; cursor: not-allowed; }
|
|
26
26
|
.tb-icon { width: 28px; height: 28px; border: 1px solid #2c353d; background: #20272f; color: #7d8b96; border-radius: 6px; font-size: 15px; cursor: not-allowed; }
|
|
27
27
|
|
|
28
|
-
/* S3
|
|
28
|
+
/* S3 left gizmo rail */
|
|
29
29
|
.left-rail { flex: 0 0 48px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 0;
|
|
30
30
|
background: #12171c; border-right: 1px solid #232a31; }
|
|
31
31
|
.left-rail button { width: 36px; height: 36px; border: 1px solid transparent; border-radius: 8px; background: transparent;
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
.left-rail button.on img { opacity: 1; filter: brightness(1.6); }
|
|
37
37
|
.rail-sep { width: 26px; height: 1px; background: #2a323a; margin: 3px 0; }
|
|
38
38
|
|
|
39
|
-
/*
|
|
39
|
+
/* Center viewport column */
|
|
40
40
|
.viewport-col { position: relative; flex: 1 1 auto; min-width: 0; background: #161a1e; }
|
|
41
41
|
.vp-top-toolbar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center;
|
|
42
42
|
gap: 3px; background: rgba(18,23,28,.85); padding: 4px; border-radius: 9px; border: 1px solid #2a323a; z-index: 3;
|
|
43
|
-
/* 33
|
|
44
|
-
|
|
43
|
+
/* Stage 33: more buttons. flex-wrap collapses the shrink-to-fit width of an absolutely positioned box (measured 848 -> 424px),
|
|
44
|
+
folding into two rows even when everything fits. Keep one row and let narrow viewports scroll horizontally instead. */
|
|
45
45
|
max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
|
|
46
46
|
.vp-top-toolbar::-webkit-scrollbar { display: none; }
|
|
47
47
|
.vp-top-toolbar > * { flex: 0 0 auto; }
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
.vp-top-toolbar button:disabled { opacity: .32; cursor: not-allowed; }
|
|
53
53
|
.vtt-sep { width: 1px; align-self: stretch; background: #333c45; margin: 3px 3px; }
|
|
54
54
|
|
|
55
|
-
/* 29
|
|
55
|
+
/* Stage 29-2: plate tab bar + slice dropdown */
|
|
56
56
|
.plate-bar { position: absolute; right: 14px; bottom: 30px; display: flex; align-items: center; gap: 4px; z-index: 3;
|
|
57
57
|
background: rgba(18,23,28,.85); border: 1px solid #2a323a; border-radius: 9px; padding: 4px; }
|
|
58
58
|
.plate-bar button { min-width: 26px; height: 26px; border: 1px solid #2c353d; background: #1a2027; color: #9fb3c0;
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
color: #24282e; cursor: pointer; font-size: 13px; }
|
|
69
69
|
.slice-menu button:hover { background: #eef7f1; }
|
|
70
70
|
|
|
71
|
-
/*
|
|
71
|
+
/* Floating painting panel */
|
|
72
72
|
.brush-panel { position: absolute; top: 58px; left: 14px; width: 214px; background: rgba(22,27,33,.95);
|
|
73
73
|
border: 1px solid #2c353d; border-radius: 10px; padding: 10px; z-index: 4; box-shadow: 0 3px 14px rgba(0,0,0,.45); }
|
|
74
74
|
.bp-title { font-weight: 600; margin-bottom: 6px; color: #cdd6dd; }
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
.bp-radius input { width: 100%; }
|
|
81
81
|
.bp-counts { margin-top: 6px; font-size: 11px; }
|
|
82
82
|
|
|
83
|
-
/* Preview
|
|
83
|
+
/* Preview stats card, bottom left */
|
|
84
84
|
.stats-card { position: absolute; left: 14px; bottom: 32px; background: rgba(22,27,33,.93); border: 1px solid #2c353d;
|
|
85
85
|
border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.7; z-index: 2; color: #cdd6dd; }
|
|
86
86
|
.stats-card b { color: #9fe3bd; }
|
|
87
87
|
|
|
88
|
-
/* S4
|
|
88
|
+
/* S4 right sidebar (light) */
|
|
89
89
|
.sidebar { flex: 0 0 384px; width: 384px; display: flex; flex-direction: column; background: #eef0f2; color: #24282e;
|
|
90
90
|
border-left: 1px solid #d5d8dd; min-height: 0; }
|
|
91
91
|
.sidebar-scroll { flex: 1 1 auto; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
|
|
@@ -114,12 +114,12 @@
|
|
|
114
114
|
.obj-del { border: 0; background: #fbe9ec; color: #d0435a; border-radius: 5px; cursor: pointer; padding: 0 6px; }
|
|
115
115
|
.side-card .slice-support { color: #444; font-size: 12px; margin: 5px 0 0; }
|
|
116
116
|
|
|
117
|
-
/*
|
|
117
|
+
/* Process card = embedded settings panel (light, full width) */
|
|
118
118
|
.process-card { padding: 8px; }
|
|
119
|
-
/*
|
|
120
|
-
(:host(.sp-embedded), components/styles.css) —
|
|
119
|
+
/* Width/border overrides for the embedded SettingsPanel now live in the panel's own shadow rules
|
|
120
|
+
(:host(.sp-embedded), components/styles.css) — they are across the boundary and unreachable from here. */
|
|
121
121
|
|
|
122
|
-
/* Preview
|
|
122
|
+
/* Preview control overrides (inside the light card) */
|
|
123
123
|
.side-card .view-type-row { color: #444; }
|
|
124
124
|
.side-card .view-type-row select, .side-card .obj-ext { background: #fff; color: #222; border: 1px solid #ccd0d5; }
|
|
125
125
|
.side-card .slice-layer label { color: #444; font-size: 12px; }
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
.side-card .layer-ctl button { background: #f1f2f4; color: #333; border: 1px solid #d3d6db; }
|
|
129
129
|
.side-card .layer-ctl button.on { background: #00ae42; color: #fff; border-color: #00ae42; }
|
|
130
130
|
|
|
131
|
-
/*
|
|
131
|
+
/* (5) Fixed bottom button bar */
|
|
132
132
|
.side-bottom { flex: 0 0 auto; display: flex; gap: 8px; padding: 10px; border-top: 1px solid #dcdfe3; background: #e6e9ec; }
|
|
133
133
|
.side-bottom .slice-btn { flex: 1.4; margin: 0; }
|
|
134
134
|
.auto-slice { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #444; cursor: pointer; white-space: nowrap; user-select: none; }
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
.vp-status { position: absolute; bottom: 8px; left: 12px; right: 12px; z-index: 1;
|
|
146
146
|
font-size: 11.5px; color: #9fe3bd; font-family: ui-monospace, monospace;
|
|
147
147
|
text-shadow: 0 1px 2px #000; pointer-events: none; }
|
|
148
|
-
/* ---- Slice
|
|
148
|
+
/* ---- Slice status display (viewport overlay) ---- */
|
|
149
149
|
.slice-warn { color: #f0c060; margin: 4px 0; }
|
|
150
150
|
.slice-btn { width: 100%; margin-top: 6px; padding: 7px; border: 0; border-radius: 7px;
|
|
151
151
|
background: #00ae42; color: #fff; font-weight: 700; cursor: pointer; }
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
.slice-layer input[type=range] { width: 100%; }
|
|
158
158
|
.slice-travel { color: #aebcc6; display: flex; align-items: center; gap: 4px; }
|
|
159
159
|
|
|
160
|
-
/* 25
|
|
160
|
+
/* Stage 25 S6: view type select · dual slider · gradient legend */
|
|
161
161
|
.view-type-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #aebcc6; }
|
|
162
162
|
.view-type-row select { flex: 1; background: #10141a; color: #eee; border: 1px solid #2c353d; border-radius: 4px; padding: 2px 4px; }
|
|
163
163
|
.dual-slider { position: relative; height: 22px; }
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
.role-item i { width: 10px; height: 6px; border-radius: 2px; display: inline-block; }
|
|
179
179
|
.role-item b { color: #cdd6dd; }
|
|
180
180
|
|
|
181
|
-
/* 26
|
|
181
|
+
/* Stage 26: empty scene hint + drag-and-drop overlay */
|
|
182
182
|
.vp-canvas.drag-over { outline: 3px dashed #00ae42; outline-offset: -6px; }
|
|
183
183
|
.empty-hint { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
184
184
|
gap: 8px; pointer-events: none; color: #9fb3c0; text-align: center; }
|
|
@@ -192,12 +192,12 @@
|
|
|
192
192
|
background: rgba(0,174,66,.14); color: #d7f7e3; font-size: 18px; font-weight: 700; pointer-events: none;
|
|
193
193
|
border: 3px dashed #00ae42; box-sizing: border-box; }
|
|
194
194
|
|
|
195
|
-
/*
|
|
195
|
+
/* Split objects button */
|
|
196
196
|
.obj-split { border: 0; background: transparent; cursor: pointer; padding: 0 3px; line-height: 0; }
|
|
197
197
|
.obj-split img { width: 13px; height: 13px; opacity: .6; }
|
|
198
198
|
.obj-split:hover img { opacity: 1; }
|
|
199
199
|
|
|
200
|
-
/*
|
|
200
|
+
/* Right-click context menu */
|
|
201
201
|
.ctx-scrim { position: absolute; inset: 0; z-index: 24; }
|
|
202
202
|
.ctx-menu { position: absolute; z-index: 25; min-width: 168px; padding: 4px;
|
|
203
203
|
background: #1b2027; border: 1px solid #2f3944; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
.ctx-menu hr { margin: 4px 6px; border: 0; border-top: 1px solid #2f3944; }
|
|
211
211
|
.ctx-key { color: #7d8b96; font-family: ui-monospace, monospace; font-size: 11px; }
|
|
212
212
|
|
|
213
|
-
/*
|
|
213
|
+
/* Keyboard shortcut help overlay ('?') */
|
|
214
214
|
.help-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
|
|
215
215
|
background: rgba(8,12,16,.72); z-index: 20; }
|
|
216
216
|
.help-card { background: #1b2027; color: #dfe6ee; border: 1px solid #2f3944; border-radius: 10px;
|
|
@@ -222,12 +222,12 @@
|
|
|
222
222
|
.help-card dt { color: #9fb0c2; font-family: ui-monospace, monospace; white-space: nowrap; }
|
|
223
223
|
.help-card dd { margin: 0; }
|
|
224
224
|
|
|
225
|
-
/*
|
|
225
|
+
/* Multi-object list / support toggle (stage 3) */
|
|
226
226
|
.slice-support { display: flex; align-items: center; gap: 5px; margin: 6px 0; color: #cdd6dd; font-size: 12px; }
|
|
227
227
|
|
|
228
228
|
.slice-support .muted { font-size: 10px; }
|
|
229
229
|
|
|
230
|
-
/*
|
|
230
|
+
/* Printer card — inline editing of bed width x depth */
|
|
231
231
|
.sc-bed { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #222; }
|
|
232
232
|
.sc-bed input { width: 54px; padding: 1px 4px; font-size: 12px; font-weight: 600; text-align: right;
|
|
233
233
|
border: 1px solid #ccd0d5; border-radius: 5px; background: #fff; color: #222; }
|