@floless/app 0.90.2 → 0.90.3
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/dist/floless-server.cjs +2 -2
- package/dist/web/steel-3d-view.js +25 -10
- package/package.json +1 -1
package/dist/floless-server.cjs
CHANGED
|
@@ -53106,7 +53106,7 @@ function appVersion() {
|
|
|
53106
53106
|
return resolveVersion({
|
|
53107
53107
|
isSea: isSea2(),
|
|
53108
53108
|
sqVersionXml: readSqVersionXml(),
|
|
53109
|
-
define: true ? "0.90.
|
|
53109
|
+
define: true ? "0.90.3" : void 0,
|
|
53110
53110
|
pkgVersion: readPkgVersion()
|
|
53111
53111
|
});
|
|
53112
53112
|
}
|
|
@@ -53116,7 +53116,7 @@ function resolveChannel(s) {
|
|
|
53116
53116
|
return "dev";
|
|
53117
53117
|
}
|
|
53118
53118
|
function appChannel() {
|
|
53119
|
-
return resolveChannel({ isSea: isSea2(), define: true ? "0.90.
|
|
53119
|
+
return resolveChannel({ isSea: isSea2(), define: true ? "0.90.3" : void 0 });
|
|
53120
53120
|
}
|
|
53121
53121
|
|
|
53122
53122
|
// workflow-update.ts
|
|
@@ -2243,6 +2243,16 @@ let wpDraft = null; // 3pt picks collected so far
|
|
|
2243
2243
|
let wpVisible = true; // "Show plane" toggle (applies to an explicit plane)
|
|
2244
2244
|
let wpGroup = null;
|
|
2245
2245
|
function effectiveWP() { return workPlane || { origin: [0, 0, api ? api.defaultTosMm() : 0], normal: [0, 0, 1], xAxis: [1, 0, 0] }; }
|
|
2246
|
+
// F3: lock a plan-space [dx,dy] drag delta to the dominant working-plane axis (Shift = ortho on a direct member drag — move or Ctrl+drag copy).
|
|
2247
|
+
// Reuses the Move/Copy u/v basis so a rotated set-axes frame is honoured; the default (no set-axes) frame reduces to
|
|
2248
|
+
// world X/Y, and a tilted frame falls back to X/Y too — the horizontal plan drag never gains a Z component.
|
|
2249
|
+
function orthoLockDelta(dx, dy) {
|
|
2250
|
+
const wp = effectiveWP();
|
|
2251
|
+
if (Math.abs(wp.normal[2]) < 0.9999) return Math.abs(dx) >= Math.abs(dy) ? [dx, 0] : [0, dy]; // ponytail: only an (essentially) horizontal frame — incl. rotated-about-Z — uses u/v; a genuinely tilted frame (>~0.8°) falls back to plan X/Y, whose u/v aren't horizontal (don't inject Z / attenuate the lock)
|
|
2252
|
+
const { u, v } = planeBasis(wp.normal, wp.xAxis);
|
|
2253
|
+
const du = dx * u[0] + dy * u[1], dv = dx * v[0] + dy * v[1];
|
|
2254
|
+
return Math.abs(du) >= Math.abs(dv) ? [du * u[0], du * u[1]] : [dv * v[0], dv * v[1]];
|
|
2255
|
+
}
|
|
2246
2256
|
function renderWorkPlane() {
|
|
2247
2257
|
if (wpGroup) { scene.remove(wpGroup); wpGroup.traverse((o) => { if (o.geometry) o.geometry.dispose(); if (o.material) o.material.dispose(); }); wpGroup = null; }
|
|
2248
2258
|
if (!workPlane || !wpVisible) return; // the implicit level plane is not drawn — the 2D plan already communicates it
|
|
@@ -2685,16 +2695,21 @@ function onMove(e) {
|
|
|
2685
2695
|
if (pending.mode === 'vertical') { onMoveVertical(e); return; }
|
|
2686
2696
|
const cur = rayToPlane(e.clientX, e.clientY, pending.planeZ); if (!cur) return;
|
|
2687
2697
|
let dx = cur[0] - pending.grab[0], dy = cur[1] - pending.grab[1];
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
+
let at = null, atType = null;
|
|
2699
|
+
if (e.shiftKey) { // F3: Shift = ortho lock along the dominant in-plane axis; snap suppressed (marker stays hidden) — mirrors the Move/Copy tool
|
|
2700
|
+
[dx, dy] = orthoLockDelta(dx, dy);
|
|
2701
|
+
} else {
|
|
2702
|
+
// snap the translated endpoints; take the closest winning correction
|
|
2703
|
+
let best = Infinity, corr = null;
|
|
2704
|
+
for (const ep of pending.origMm) {
|
|
2705
|
+
const tp = [ep[0] + dx, ep[1] + dy, ep[2]];
|
|
2706
|
+
const r = snapPoint(tp, pending.candidates, toScreen, SNAP_TOL_PX);
|
|
2707
|
+
if (!r.candidate) continue;
|
|
2708
|
+
const a = toScreen(tp), b = toScreen(r.snapped), d = Math.hypot(b.x - a.x, b.y - a.y);
|
|
2709
|
+
if (d < best) { best = d; corr = [r.snapped[0] - tp[0], r.snapped[1] - tp[1]]; at = r.snapped; atType = r.candidate.type; }
|
|
2710
|
+
}
|
|
2711
|
+
if (corr) { dx += corr[0]; dy += corr[1]; }
|
|
2712
|
+
}
|
|
2698
2713
|
pending.delta = [dx, dy];
|
|
2699
2714
|
if (pending.copy) positionCopyGhost(dx, dy); // Ctrl+drag: move a translucent ghost, never the original
|
|
2700
2715
|
else if (pending.mesh && pending.meshPos0) pending.mesh.position.set(pending.meshPos0.x + dx, pending.meshPos0.y + dy, pending.meshPos0.z);
|