three-slicer 0.1.4 → 0.1.6
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 +4 -1
- package/components/README.md +2 -2
- package/data/README.md +2 -2
- package/engine/README.md +2 -2
- package/engine/src/settings.js +126 -3
- package/engine/src/slicer.worker.js +29 -0
- package/engine/src/slicer_core.js +0 -0
- package/engine/src/slicer_core.mt.js +0 -0
- package/package.json +1 -1
- package/types/settings.d.ts +20 -1
- package/viewer/README.md +7 -2
- package/viewer/dist/Viewport.js +3239 -2124
- package/viewer/dist/make_worker.js +7 -0
- package/viewer/dist/model_loaders.js +139 -211
- package/viewer/dist/parse_3mf-8oCnCJNK.js +216 -0
- package/viewer/dist/parse_3mf.worker.js +10 -0
- package/viewer/styles.css +32 -3
package/viewer/styles.css
CHANGED
|
@@ -18,12 +18,25 @@
|
|
|
18
18
|
.tb-btn { display: inline-flex; align-items: center; gap: 5px; background: #20272f; border: 1px solid #2c353d;
|
|
19
19
|
color: #cdd6dd; border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 12px; }
|
|
20
20
|
.tb-btn img { width: 15px; height: 15px; }
|
|
21
|
-
.tb-btn:hover { background: #28313a; }
|
|
21
|
+
.tb-btn:hover:not(:disabled) { background: #28313a; }
|
|
22
|
+
.tb-btn:disabled { color: #5a6570; cursor: not-allowed; opacity: .6; }
|
|
23
|
+
/* The button that is mid-export. It is disabled too, so it must override the greyed-out look — the running action
|
|
24
|
+
is the one thing on screen that should not look inert. The animation is CSS so it keeps running while the main
|
|
25
|
+
thread is inside the synchronous half of the write; it stalls only for that stretch, which is the honest signal. */
|
|
26
|
+
.tb-btn.tb-busy:disabled { color: #cdd6dd; opacity: 1; cursor: progress; border-color: #00ae42; animation: tb-pulse 1s ease-in-out infinite; }
|
|
27
|
+
@keyframes tb-pulse { 0%, 100% { background: #20272f; } 50% { background: #23402c; } }
|
|
22
28
|
.tb-tabs { display: flex; border: 1px solid #2c353d; border-radius: 8px; overflow: hidden; flex: 0 0 auto; }
|
|
23
29
|
.tb-tabs button { padding: 6px 24px; border: 0; background: #1a2027; color: #9fb3c0; font-weight: 600; font-size: 13px; cursor: pointer; }
|
|
24
30
|
.tb-tabs button.on { background: #00ae42; color: #fff; }
|
|
25
31
|
.tb-tabs button:disabled { color: #5a6570; cursor: not-allowed; }
|
|
26
|
-
.
|
|
32
|
+
/* Undo/redo. Written while these two were permanent placeholders, so the BASE rule carried the disabled look —
|
|
33
|
+
dim text and cursor:not-allowed — and there was no enabled, hover or pressed state at all. Now that they work,
|
|
34
|
+
the base is the live look and :disabled carries the dim one, the same split .tb-btn above uses. */
|
|
35
|
+
.tb-icon { width: 28px; height: 28px; border: 1px solid #2c353d; background: #20272f; color: #cdd6dd;
|
|
36
|
+
border-radius: 6px; font-size: 15px; cursor: pointer; }
|
|
37
|
+
.tb-icon:hover:not(:disabled) { background: #28313a; color: #fff; border-color: #3a4550; }
|
|
38
|
+
.tb-icon:active:not(:disabled) { background: #171d23; }
|
|
39
|
+
.tb-icon:disabled { color: #5a6570; cursor: not-allowed; opacity: .6; }
|
|
27
40
|
|
|
28
41
|
/* S3 left gizmo rail */
|
|
29
42
|
.left-rail { flex: 0 0 48px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 0;
|
|
@@ -92,6 +105,12 @@
|
|
|
92
105
|
.bp-actions { margin-top: 6px; }
|
|
93
106
|
.bp-note { margin-top: 6px; font-size: 10.5px; line-height: 1.35; color: #8b98a2; }
|
|
94
107
|
|
|
108
|
+
/* Over-bed warning while arranging. Sits where the stats card does in Preview — the two never show at once, so the
|
|
109
|
+
same corner carries "here is the problem" in both modes. Amber rather than red: the model is still slicable. */
|
|
110
|
+
.bed-warn { position: absolute; left: 14px; bottom: 32px; z-index: 2;
|
|
111
|
+
background: rgba(58,42,16,.94); border: 1px solid #7a5a1e; border-radius: 10px;
|
|
112
|
+
padding: 8px 13px; font-size: 12.5px; color: #f0c060; }
|
|
113
|
+
|
|
95
114
|
/* Preview stats card, bottom left */
|
|
96
115
|
.stats-card { position: absolute; left: 14px; bottom: 32px; background: rgba(22,27,33,.93); border: 1px solid #2c353d;
|
|
97
116
|
border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.7; z-index: 2; color: #cdd6dd; }
|
|
@@ -137,7 +156,11 @@
|
|
|
137
156
|
.fil-paint.on { background: #2b6cff; border-color: #2b6cff; }
|
|
138
157
|
|
|
139
158
|
.obj-list2 { list-style: none; margin: 0 0 6px; padding: 0; }
|
|
140
|
-
|
|
159
|
+
|
|
160
|
+
.obj-list2 li { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 12px; cursor: pointer; }
|
|
161
|
+
/* A row of the object list that is part of the current selection. The card is light and the row text is near-black
|
|
162
|
+
(.obj-name is #24282e), so the tint has to be a LIGHT green — a dark one swallows the name it is highlighting. */
|
|
163
|
+
.obj-list2 li.obj-selected { background: #e3f6ea; box-shadow: inset 2px 0 0 #00ae42; }
|
|
141
164
|
.obj-list2 li.obj-hidden { opacity: .5; }
|
|
142
165
|
.obj-eye { border: 0; background: none; cursor: pointer; font-size: 13px; padding: 0; }
|
|
143
166
|
.obj-list2 .obj-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #24282e; }
|
|
@@ -173,6 +196,12 @@
|
|
|
173
196
|
|
|
174
197
|
.vp-canvas { position: absolute; inset: 0; }
|
|
175
198
|
.vp-canvas canvas { display: block; }
|
|
199
|
+
/* The 3D view holds focus so Ctrl+Z can be scoped to this component instead of window — the focus itself stays,
|
|
200
|
+
only its ring is dropped. :focus-visible has to go with it: the focus is taken by a script (`focus()` in the
|
|
201
|
+
view's own pointerdown), and a scripted focus matches :focus-visible in Chrome even when the pointer caused it,
|
|
202
|
+
so a plain click drew the ring the :focus rule below was written to prevent. CSS cannot tell that click apart
|
|
203
|
+
from a Tab, so a keyboard user gets no ring here; the gizmo rail and the panels keep theirs. */
|
|
204
|
+
.vp-canvas:focus, .vp-canvas:focus-visible { outline: none; }
|
|
176
205
|
.vp-canvas.fail { display: flex; align-items: center; justify-content: center; }
|
|
177
206
|
.vp-fallback { color: #f0c9a8; padding: 24px; text-align: center; max-width: 560px; line-height: 1.5; }
|
|
178
207
|
.vp-status { position: absolute; bottom: 8px; left: 12px; right: 12px; z-index: 1;
|