iflow-engine-base-3d 3.12.24 → 3.12.25

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.
@@ -1,5 +1,5 @@
1
1
  import { S as Ti, G as ue, P as qt, O as ke, M as O, V as d, e as $e, T as Rn, C as Ds, W as Ii, a as ks, b as je, N as _i, c as Ls, d as ot, f as W, Q as Se, E as On, R as pe, g as Ze, h as Fn, B as R, i as Di, A as Nn, j as H, k as z, I as V, l as ii, m as ni, n as Hn, o as Vn, L as Kt, p as Bs, q as zs, r as Rs, s as Gi, D as re, t as qi, u as Os, F as Fs, v as Me, w as Un, x as Wn, y as ki, z as Ns, H as Gn, J as he, K as Hs, U as Vs, X as bt, Y as Us, Z as qn, _ as Ws, $ as qe, a0 as jt, a1 as Li, a2 as Z, a3 as oe, a4 as Ct, a5 as Gs, a6 as Je, a7 as yi, a8 as He, a9 as It, aa as qs, ab as Ks, ac as Mi, ad as ht, ae as js, af as ct, ag as Ys, ah as Xs, ai as Kn, aj as Yt, ak as At, al as Xt, am as Qs, an as Ki, ao as dt, ap as Et, aq as St, ar as $s, as as Zs, at as ji, au as Js, av as eo, aw as to, ax as io, ay as no, az as so, aA as oo, aB as ro, aC as ao, aD as lo, aE as jn, aF as co, aG as ho, aH as uo, aI as vi, aJ as Ye, aK as po, aL as mo, aM as go, aN as fo, aO as yo, aP as Mo, aQ as vo } from "./three-vendor-Cy618JLY.js";
2
- import { W as ge, C as xo, L as ft, B as Yi, g as ze, a as wo, E as bo, r as Co } from "./sdk-runtime-9GTYNlYO.js";
2
+ import { W as ge, C as xo, L as ft, B as Yi, g as ze, a as wo, E as bo, r as Co } from "./sdk-runtime-CY1F9tN3.js";
3
3
  import { r as ee, g as Ao } from "./sdk-assets-Dl8936wx.js";
4
4
  import { a as Qt, J as xi, c as Eo, b as So, P as si, q as Po, k as To, n as Xi, E as Qi, S as Io } from "./sdk-vendor-DYgn7sFs.js";
5
5
  class _o {
@@ -1741,7 +1741,7 @@ class Go {
1741
1741
  r || (r = [0, 0, []]);
1742
1742
  const a = Pe(n, s), c = this.getModelSnapCache(s, o, r);
1743
1743
  n.camera.updateMatrixWorld(!0);
1744
- const h = new H().multiplyMatrices(n.camera.projectionMatrix, n.camera.matrixWorldInverse), u = n.renderer.domElement.clientWidth, p = n.renderer.domElement.clientHeight, g = new W(t.offsetX, t.offsetY), f = new ii(), v = new d(), w = new d(), m = new W(), b = new W(), A = new d();
1744
+ const h = new H().multiplyMatrices(n.camera.projectionMatrix, n.camera.matrixWorldInverse), u = n.renderer.domElement.clientWidth, p = n.renderer.domElement.clientHeight, g = new W(t.offsetX, t.offsetY), f = new ii(), v = new d(), x = new d(), m = new W(), b = new W(), A = new d();
1745
1745
  let S = "face", I = null, T = null, L = 100;
1746
1746
  if (i != null) {
1747
1747
  const k = e.point.clone(), N = e.normal || (e.face ? e.face.normal : null);
@@ -1790,13 +1790,13 @@ class Go {
1790
1790
  S = "point";
1791
1791
  else {
1792
1792
  for (let k = 0; k < c.localLines.length; k += 6) {
1793
- v.set(c.localLines[k], c.localLines[k + 1], c.localLines[k + 2]).applyMatrix4(a), w.set(c.localLines[k + 3], c.localLines[k + 4], c.localLines[k + 5]).applyMatrix4(a);
1794
- const N = this.projectWorldPointToScreen(v, h, u, p, m, f), K = this.projectWorldPointToScreen(w, h, u, p, b, f);
1793
+ v.set(c.localLines[k], c.localLines[k + 1], c.localLines[k + 2]).applyMatrix4(a), x.set(c.localLines[k + 3], c.localLines[k + 4], c.localLines[k + 5]).applyMatrix4(a);
1794
+ const N = this.projectWorldPointToScreen(v, h, u, p, m, f), K = this.projectWorldPointToScreen(x, h, u, p, b, f);
1795
1795
  if (N == null || K == null)
1796
1796
  continue;
1797
1797
  const te = this.pointToLineProjection(g, N, K), Q = this.pointToLineDistanceSq(g, N, K);
1798
1798
  if (Q < L) {
1799
- const ce = this.pointToLineProjection3D(te, v, w, h, A);
1799
+ const ce = this.pointToLineProjection3D(te, v, x, h, A);
1800
1800
  if (n.clipping && !n.clipping.isPointInClippingRange(ce))
1801
1801
  continue;
1802
1802
  T = {
@@ -1825,8 +1825,8 @@ class Go {
1825
1825
  s.forEach((f) => {
1826
1826
  if (f?.[0] == null || f?.[1] == null)
1827
1827
  return;
1828
- const v = f[0], w = f[1];
1829
- r[h++] = v.X, r[h++] = v.Z, r[h++] = -v.Y, a[u++] = (v.X + w.X) * 0.5, a[u++] = (v.Z + w.Z) * 0.5, a[u++] = (-v.Y - w.Y) * 0.5, c[p++] = v.X, c[p++] = v.Z, c[p++] = -v.Y, c[p++] = w.X, c[p++] = w.Z, c[p++] = -w.Y;
1828
+ const v = f[0], x = f[1];
1829
+ r[h++] = v.X, r[h++] = v.Z, r[h++] = -v.Y, a[u++] = (v.X + x.X) * 0.5, a[u++] = (v.Z + x.Z) * 0.5, a[u++] = (-v.Y - x.Y) * 0.5, c[p++] = v.X, c[p++] = v.Z, c[p++] = -v.Y, c[p++] = x.X, c[p++] = x.Z, c[p++] = -x.Y;
1830
1830
  });
1831
1831
  const g = {
1832
1832
  source: s,
@@ -2001,11 +2001,11 @@ function Hi(l) {
2001
2001
  const E = typeof TouchEvent < "u" && M?.originalEvent instanceof TouchEvent;
2002
2002
  return f() && !E;
2003
2003
  }
2004
- function w() {
2004
+ function x() {
2005
2005
  e.touchLongPressTimer != null && (clearTimeout(e.touchLongPressTimer), e.touchLongPressTimer = null);
2006
2006
  }
2007
2007
  function m() {
2008
- w(), k(), S(), e.touchLongPressActive = !1, e.touchLatestEvent = null, e.touchStartPosition = null, e.touchInputMode = null, e.touchPointerId = null;
2008
+ x(), k(), S(), e.touchLongPressActive = !1, e.touchLatestEvent = null, e.touchStartPosition = null, e.touchInputMode = null, e.touchPointerId = null;
2009
2009
  }
2010
2010
  function b(M) {
2011
2011
  M?.preventDefault?.(), M?.stopPropagation?.(), M?.stopImmediatePropagation?.();
@@ -2135,7 +2135,7 @@ function Hi(l) {
2135
2135
  originalEvent: M
2136
2136
  };
2137
2137
  }
2138
- function x(M, E, B, U = null) {
2138
+ function w(M, E, B, U = null) {
2139
2139
  m(), e.touchInputMode = B, e.touchPointerId = U, e.touchLatestEvent = M, e.touchStartPosition = E, e.touchLongPressTimer = window.setTimeout(() => {
2140
2140
  const Y = e.touchLatestEvent;
2141
2141
  Y && (e.touchLongPressActive = !0, A(), e.mouseDownTime = Date.now(), e.mouseDownPosition = new d(Y.offsetX, Y.offsetY, 0), e.self?.handleMouseMove != null && (Q(Y, !0, !0, e.isClickSimpleModel), e.self.handleMouseMove(Y)), te(Y));
@@ -2144,10 +2144,10 @@ function Hi(l) {
2144
2144
  function y(M, E) {
2145
2145
  e.touchLatestEvent = M;
2146
2146
  const B = e.touchStartPosition;
2147
- !e.touchLongPressActive && B && E && B.distanceTo(E) > i && w(), e.touchLongPressActive && (e.self?.handleMouseMove != null && (Q(M, !0, !0, e.isClickSimpleModel), e.self.handleMouseMove(M)), te(M));
2147
+ !e.touchLongPressActive && B && E && B.distanceTo(E) > i && x(), e.touchLongPressActive && (e.self?.handleMouseMove != null && (Q(M, !0, !0, e.isClickSimpleModel), e.self.handleMouseMove(M)), te(M));
2148
2148
  }
2149
2149
  function C(M) {
2150
- w(), e.touchLongPressActive && (Q(M, !0, !0, e.isClickSimpleModel), e.self?.handleMouseClick != null && e.self.handleMouseClick(M), e.self?.handleMouseUp != null && e.self.handleMouseUp(M)), m();
2150
+ x(), e.touchLongPressActive && (Q(M, !0, !0, e.isClickSimpleModel), e.self?.handleMouseClick != null && e.self.handleMouseClick(M), e.self?.handleMouseUp != null && e.self.handleMouseUp(M)), m();
2151
2151
  }
2152
2152
  function _(M) {
2153
2153
  if (M.preventDefault(), M.touches.length !== 1) {
@@ -2157,7 +2157,7 @@ function Hi(l) {
2157
2157
  const E = fe(M);
2158
2158
  if (E) {
2159
2159
  if (f()) {
2160
- x(E, T(M) ?? new W(E.clientX, E.clientY), "touch");
2160
+ w(E, T(M) ?? new W(E.clientX, E.clientY), "touch");
2161
2161
  return;
2162
2162
  }
2163
2163
  ce(E);
@@ -2192,7 +2192,7 @@ function Hi(l) {
2192
2192
  if (M.pointerType !== "touch" || !f() || M.isPrimary === !1)
2193
2193
  return;
2194
2194
  const E = Ae(M);
2195
- x(E, new W(M.clientX, M.clientY), "pointer", M.pointerId);
2195
+ w(E, new W(M.clientX, M.clientY), "pointer", M.pointerId);
2196
2196
  }
2197
2197
  function G(M) {
2198
2198
  M.pointerType !== "touch" || !f() || (e.touchLongPressActive && b(M), e.touchInputMode === "pointer" && (e.touchPointerId != null && M.pointerId !== e.touchPointerId || y(Ae(M), new W(M.clientX, M.clientY))));
@@ -2475,8 +2475,8 @@ class qo {
2475
2475
  }
2476
2476
  bindMovePad(e) {
2477
2477
  const t = e.querySelector(".bim-mobile-roam-move-knob"), i = (s) => {
2478
- const o = e.getBoundingClientRect(), r = Math.min(o.width, o.height) * 0.5, a = r * 0.48, c = r * 0.22, h = s.clientX - o.left - r, u = s.clientY - o.top - r, p = Math.hypot(h, u), g = Math.min(p, a), f = p > a ? a / p : 1, v = h * f, w = u * f;
2479
- t && (t.style.transform = `translate(${v}px, ${w}px)`);
2478
+ const o = e.getBoundingClientRect(), r = Math.min(o.width, o.height) * 0.5, a = r * 0.48, c = r * 0.22, h = s.clientX - o.left - r, u = s.clientY - o.top - r, p = Math.hypot(h, u), g = Math.min(p, a), f = p > a ? a / p : 1, v = h * f, x = u * f;
2479
+ t && (t.style.transform = `translate(${v}px, ${x}px)`);
2480
2480
  const m = [];
2481
2481
  u < -c ? m.push("w") : u > c && m.push("s"), h < -c ? m.push("a") : h > c && m.push("d"), this.mobileMoveIntensity = m.length === 0 ? 0 : Math.max(0, Math.min(1, (g - c) / (a - c))), this.updateMobileMoveKeys(m);
2482
2482
  };
@@ -2708,17 +2708,17 @@ function Tt(l) {
2708
2708
  l.name = t, l.guid = i;
2709
2709
  }
2710
2710
  function Yo(l, e, t, i) {
2711
- const r = l.models.find((w) => w.url == t);
2711
+ const r = l.models.find((x) => x.url == t);
2712
2712
  if (r == null)
2713
2713
  return;
2714
- const a = it(l, t), c = [], h = e.circularMeps, u = e.rectMeps?.filter((w) => w.type === "风管"), p = e.rectMeps?.filter((w) => w.type === "桥架"), g = e.ellipseMeps, f = (w) => (w.color = w.color.split(",").map((m) => parseInt(m) / 255), w.color = new Me().setRGB(w.color[0], w.color[1], w.color[2], je), w.position = {
2715
- x: w.startPoint.X * 0.3048 + 0,
2716
- y: w.startPoint.Z * 0.3048 + 0,
2717
- z: -w.startPoint.Y * 0.3048 + 0
2718
- }, w.rotation = { x: 0, y: 0, z: 0 }, w), v = (w, m) => {
2714
+ const a = it(l, t), c = [], h = e.circularMeps, u = e.rectMeps?.filter((x) => x.type === "风管"), p = e.rectMeps?.filter((x) => x.type === "桥架"), g = e.ellipseMeps, f = (x) => (x.color = x.color.split(",").map((m) => parseInt(m) / 255), x.color = new Me().setRGB(x.color[0], x.color[1], x.color[2], je), x.position = {
2715
+ x: x.startPoint.X * 0.3048 + 0,
2716
+ y: x.startPoint.Z * 0.3048 + 0,
2717
+ z: -x.startPoint.Y * 0.3048 + 0
2718
+ }, x.rotation = { x: 0, y: 0, z: 0 }, x), v = (x, m) => {
2719
2719
  if (!Array.isArray(m) || m.length === 0)
2720
2720
  return;
2721
- const b = m.map((S) => f(S)), A = Qo(w, a, b, t, l);
2721
+ const b = m.map((S) => f(S)), A = Qo(x, a, b, t, l);
2722
2722
  A != null && b.forEach((S, I) => {
2723
2723
  const T = [[A, I, 0, 0]];
2724
2724
  S.indexes = T, S.id = Number(S.id);
@@ -2773,15 +2773,15 @@ function Qo(l, e, t, i, n) {
2773
2773
  Ni(r, a), r.geometry.getAttribute("normal") == null && r.geometry.computeVertexNormals(), r.geometry.computeBoundingBox();
2774
2774
  const c = r.geometry.boundingBox?.clone() ?? null, h = [], u = [];
2775
2775
  for (let g = 0; g < t.length; g++) {
2776
- const f = t[g], v = new d(f.startPoint.X, 0, -f.startPoint.Y), w = new d(f.endPoint.X, 0, -f.endPoint.Y), m = new d(f.startPoint.X, f.startPoint.Z, -f.startPoint.Y), b = new d(f.endPoint.X, f.endPoint.Z, -f.endPoint.Y);
2776
+ const f = t[g], v = new d(f.startPoint.X, 0, -f.startPoint.Y), x = new d(f.endPoint.X, 0, -f.endPoint.Y), m = new d(f.startPoint.X, f.startPoint.Z, -f.startPoint.Y), b = new d(f.endPoint.X, f.endPoint.Z, -f.endPoint.Y);
2777
2777
  let A = 0, S = 0, I = 0;
2778
- if (Math.abs(w.clone().sub(v.clone()).z) < 0.01 && Math.abs(w.clone().sub(v.clone()).x) < 0.01) {
2778
+ if (Math.abs(x.clone().sub(v.clone()).z) < 0.01 && Math.abs(x.clone().sub(v.clone()).x) < 0.01) {
2779
2779
  if (A = (f.startPoint.Z > f.endPoint.Z ? 1 : -1) * Math.PI * 0.5, f.base_x != null) {
2780
- const x = new d(f.base_x.X, 0, -f.base_x.Y);
2781
- S = (x.clone().cross(new d(0, 0, 1)).y <= 0 ? 1 : -1) * x.angleTo(new d(0, 0, 1)) + Math.PI * 0.5;
2780
+ const w = new d(f.base_x.X, 0, -f.base_x.Y);
2781
+ S = (w.clone().cross(new d(0, 0, 1)).y <= 0 ? 1 : -1) * w.angleTo(new d(0, 0, 1)) + Math.PI * 0.5;
2782
2782
  }
2783
2783
  } else
2784
- S = (w.clone().sub(v.clone()).cross(new d(0, 0, 1)).y > 0 ? -1 : 1) * w.clone().sub(v.clone()).angleTo(new d(0, 0, 1)), A = (f.startPoint.Z > f.endPoint.Z ? 1 : -1) * w.clone().sub(v.clone()).angleTo(b.clone().sub(m.clone()));
2784
+ S = (x.clone().sub(v.clone()).cross(new d(0, 0, 1)).y > 0 ? -1 : 1) * x.clone().sub(v.clone()).angleTo(new d(0, 0, 1)), A = (f.startPoint.Z > f.endPoint.Z ? 1 : -1) * x.clone().sub(v.clone()).angleTo(b.clone().sub(m.clone()));
2785
2785
  const T = new H(), L = new Ze(A, S, I, "YXZ"), k = T.clone().makeRotationFromEuler(L);
2786
2786
  let N, K;
2787
2787
  l === "Circle" ? (N = f.diameter, K = f.diameter) : (N = f.width, K = f.height);
@@ -3059,28 +3059,28 @@ async function Sr(l, e, t, i) {
3059
3059
  return [];
3060
3060
  const s = l.filterLoaderModel?.getContinueIdSet?.(e.url) ?? /* @__PURE__ */ new Set(), o = await Er(l, t, i);
3061
3061
  console.log("[loadLightModel] pending mesh ids", t.path, o.length);
3062
- const r = [];
3063
- let a = performance.now(), c = 0;
3064
- for (const h of o) {
3065
- if (s.has(Number(h)) || !n.nodesMap.has(h))
3062
+ const r = [], a = l?.deviceModule?.isMobile?.() !== !0;
3063
+ let c = performance.now(), h = 0;
3064
+ for (const u of o) {
3065
+ if (s.has(Number(u)) || !n.nodesMap.has(u))
3066
3066
  continue;
3067
- const u = n.nodesMap.get(h), p = Array.isArray(u?.infos) ? u.infos : [];
3068
- for (const g of p) {
3069
- const f = t.glbs?.[g.glb]?.[g.mesh];
3070
- if (f?.geometry == null || f.material == null)
3067
+ const p = n.nodesMap.get(u), g = Array.isArray(p?.infos) ? p.infos : [];
3068
+ for (const f of g) {
3069
+ const v = t.glbs?.[f.glb]?.[f.mesh];
3070
+ if (v?.geometry == null || v.material == null)
3071
3071
  continue;
3072
- const v = new H();
3073
- v.elements = g.matrix;
3074
- const w = f.geometry.clone(), m = w.getAttribute("position");
3075
- if (m == null) {
3076
- w.dispose();
3072
+ const x = new H();
3073
+ x.elements = f.matrix;
3074
+ const m = v.geometry.clone(), b = m.getAttribute("position");
3075
+ if (b == null) {
3076
+ m.dispose();
3077
3077
  continue;
3078
3078
  }
3079
- w.applyMatrix4(v), w.computeBoundingBox(), m.count > 2e4 && or(w, {
3079
+ m.applyMatrix4(x), m.computeBoundingBox(), a && b.count > 2e4 && or(m, {
3080
3080
  setBoundingSphere: !0
3081
3081
  });
3082
- const b = new z(w, f.material);
3083
- g.box = w.boundingBox?.clone(), g.mesh = b, b.name = Number(h), b.glb = g.glb, b.url = e.url, r.push(b), c++, c % ss === 0 && (a = await Xe(l, i, a));
3082
+ const A = new z(m, v.material);
3083
+ f.box = m.boundingBox?.clone(), f.mesh = A, A.name = Number(u), A.glb = f.glb, A.url = e.url, r.push(A), h++, h % ss === 0 && (c = await Xe(l, i, c));
3084
3084
  }
3085
3085
  }
3086
3086
  return r;
@@ -3132,16 +3132,16 @@ async function kr(l, e, t, i) {
3132
3132
  const p = Wr(u[0].material, e);
3133
3133
  let g = _r(e, l, r, p), f = 0, v = 0;
3134
3134
  g = null, g != null ? (f = Array.isArray(g.geometrys) ? g.geometrys.length : 0, v = hn(g.geometry), Dr(g, u)) : g = Ir(l, e, r, u, p);
3135
- const w = /* @__PURE__ */ new Map();
3135
+ const x = /* @__PURE__ */ new Map();
3136
3136
  let m = v;
3137
3137
  u.forEach((b, A) => {
3138
- const S = Number(b.name), I = hn(b.geometry), T = w.get(S) ?? [];
3139
- if (T.push([m, m + I]), w.set(S, T), s?.nodesMap?.has(S)) {
3138
+ const S = Number(b.name), I = hn(b.geometry), T = x.get(S) ?? [];
3139
+ if (T.push([m, m + I]), x.set(S, T), s?.nodesMap?.has(S)) {
3140
3140
  const L = s.nodesMap.get(S);
3141
3141
  L.indexes == null && (L.indexes = []), L.indexes.push([g.index, f + A, m, m + I]);
3142
3142
  }
3143
3143
  m += I;
3144
- }), g.indexes == null && (g.indexes = /* @__PURE__ */ new Map()), w.forEach((b, A) => {
3144
+ }), g.indexes == null && (g.indexes = /* @__PURE__ */ new Map()), x.forEach((b, A) => {
3145
3145
  const S = g.indexes.get(A) ?? [];
3146
3146
  S.push(...b), g.indexes.set(A, S);
3147
3147
  }), e.requestComposerRender?.(), o = await Xe(e, i, o);
@@ -3172,10 +3172,10 @@ async function Br(l, e, t, i, n, s) {
3172
3172
  for (let g = 0; g < n.length; g++) {
3173
3173
  const f = n[g], v = new H();
3174
3174
  v.elements = f.matrix;
3175
- const w = Lr(i, v);
3176
- if (w != null && (f.box = w.clone()), r.setMatrixAt(g, v), r.matrixs || (r.matrixs = []), r.matrixs.push(v.clone()), p.push(v.clone()), o.nodesMap.has(f.id)) {
3175
+ const x = Lr(i, v);
3176
+ if (x != null && (f.box = x.clone()), r.setMatrixAt(g, v), r.matrixs || (r.matrixs = []), r.matrixs.push(v.clone()), p.push(v.clone()), o.nodesMap.has(f.id)) {
3177
3177
  const m = o.nodesMap.get(f.id);
3178
- m.indexes == null && (m.indexes = []), m.indexes.push([c, g, 0, 0]), Tt(m), w != null && m?.info != null && (m.info.box instanceof R ? m.info.box.union(w) : m.info.box = w.clone());
3178
+ m.indexes == null && (m.indexes = []), m.indexes.push([c, g, 0, 0]), Tt(m), x != null && m?.info != null && (m.info.box instanceof R ? m.info.box.union(x) : m.info.box = x.clone());
3179
3179
  } else {
3180
3180
  const m = {
3181
3181
  instance: !0,
@@ -3244,61 +3244,61 @@ async function Or(l, e, t, i) {
3244
3244
  a.nodesMap == null && (a.nodesMap = /* @__PURE__ */ new Map());
3245
3245
  let c = performance.now();
3246
3246
  const h = Object.keys(r);
3247
- for (const v of h) {
3248
- const w = r[v];
3249
- for (let m = 0; m < w.length; m++) {
3250
- const b = w[m];
3251
- if (b.glb = v, a.nodesMap.has(b.id) === !1) {
3252
- const A = { infos: [b] };
3253
- Tt(A), a.nodesMap.set(b.id, A);
3247
+ for (const x of h) {
3248
+ const m = r[x];
3249
+ for (let b = 0; b < m.length; b++) {
3250
+ const A = m[b];
3251
+ if (A.glb = x, a.nodesMap.has(A.id) === !1) {
3252
+ const S = { infos: [A] };
3253
+ Tt(S), a.nodesMap.set(A.id, S);
3254
3254
  } else {
3255
- const A = a.nodesMap.get(b.id);
3256
- if (!A.infos)
3255
+ const S = a.nodesMap.get(A.id);
3256
+ if (!S.infos)
3257
3257
  continue;
3258
- A.infos.push(b), Tt(A);
3258
+ S.infos.push(A), Tt(S);
3259
3259
  }
3260
- (m + 1) % ss === 0 && (c = await Xe(l, i, c));
3260
+ (b + 1) % ss === 0 && (c = await Xe(l, i, c));
3261
3261
  }
3262
3262
  }
3263
- const u = async (v) => {
3264
- let w = await wr(s, [`/${v}.glb`, `${v}.glb`, v + ".glb"]);
3265
- if (w == null) {
3263
+ const u = async (x) => {
3264
+ let m = await wr(s, [`/${x}.glb`, `${x}.glb`, x + ".glb"]);
3265
+ if (m == null) {
3266
3266
  console.error("[loadLightModel] glb not found in zip", {
3267
3267
  modelUrl: e.url,
3268
3268
  lodPath: t.path,
3269
- glbKey: `${v}.glb`,
3269
+ glbKey: `${x}.glb`,
3270
3270
  availableFiles: Object.keys(s.files)
3271
3271
  });
3272
3272
  return;
3273
3273
  }
3274
3274
  try {
3275
- const m = await br(l, w);
3276
- w = null, t.glbs[v] = m.scene.children, t.glbs[v].forEach((b) => {
3277
- b.matrixWorld;
3278
- }), await Ar(l, t.glbs[v], i);
3279
- } catch (m) {
3275
+ const b = await br(l, m);
3276
+ m = null, t.glbs[x] = b.scene.children, t.glbs[x].forEach((A) => {
3277
+ A.matrixWorld;
3278
+ }), await Ar(l, t.glbs[x], i);
3279
+ } catch (b) {
3280
3280
  console.error("[loadLightModel] failed to load glb", {
3281
3281
  modelUrl: e.url,
3282
3282
  lodPath: t.path,
3283
- glbKey: `${v}.glb`,
3283
+ glbKey: `${x}.glb`,
3284
3284
  dracoDecoderPath: os(),
3285
3285
  basisTranscoderPath: rs(),
3286
- error: m
3286
+ error: b
3287
3287
  });
3288
3288
  } finally {
3289
- w = null;
3289
+ m = null;
3290
3290
  }
3291
3291
  };
3292
3292
  let p = 0;
3293
- const g = Math.min(hr, h.length);
3294
- await Promise.all(Array.from({ length: g }, async () => {
3293
+ const g = l?.deviceModule?.isMobile?.() === !0 ? 1 : hr, f = Math.min(g, h.length);
3294
+ await Promise.all(Array.from({ length: f }, async () => {
3295
3295
  for (; p < h.length; ) {
3296
- const v = h[p++];
3297
- await u(v);
3296
+ const x = h[p++];
3297
+ await u(x);
3298
3298
  }
3299
3299
  })), console.log(`[loadLightModel] 所有 GLB 加载完成 ${Date.now() - window.startTime}ms`);
3300
- const f = await cn(s, ["/instances.json", "instances.json"]);
3301
- t.instanceNodes = f != null ? Zt(f) : null, t.loadSuccess = !0;
3300
+ const v = await cn(s, ["/instances.json", "instances.json"]);
3301
+ t.instanceNodes = v != null ? Zt(v) : null, t.loadSuccess = !0;
3302
3302
  })().finally(() => {
3303
3303
  t.preparePromise = null;
3304
3304
  }), await t.preparePromise;
@@ -3317,8 +3317,8 @@ function Fr(l, e, t) {
3317
3317
  const p = o.clone().sub(u).dot(h);
3318
3318
  if (p <= 0)
3319
3319
  return 0;
3320
- const g = u.clone().add(h.multiplyScalar(Math.max(p, r))), f = g.clone().add(a.setLength(t.maxSize)), v = new ge(e, l.renderer, l.scene).worldToScreen(g), w = new ge(e, l.renderer, l.scene).worldToScreen(f);
3321
- return v.distanceTo(w);
3320
+ const g = u.clone().add(h.multiplyScalar(Math.max(p, r))), f = g.clone().add(a.setLength(t.maxSize)), v = new ge(e, l.renderer, l.scene).worldToScreen(g), x = new ge(e, l.renderer, l.scene).worldToScreen(f);
3321
+ return v.distanceTo(x);
3322
3322
  }
3323
3323
  async function Nr(l, e, t, i) {
3324
3324
  t.maxSize < 1e6 && t.path != "/lod0" && (!(Fr(l, l.camera, t) >= dr) || t.status === !0) || (await Or(l, e, t, i), t.loadSuccess === !0 && await Rr(l, e, t, i));
@@ -3863,16 +3863,16 @@ class Ma {
3863
3863
  g,
3864
3864
  u,
3865
3865
  t.shadow.mapSize.width
3866
- ), w = f.clone().add(
3866
+ ), x = f.clone().add(
3867
3867
  g.clone().multiplyScalar(p)
3868
3868
  ), m = this.getShadowDepthRange(
3869
3869
  n,
3870
- w,
3870
+ x,
3871
3871
  f,
3872
3872
  o,
3873
3873
  u
3874
- ), b = Math.abs(u - this.lastShadowHalfSize) > 0.5, A = Math.abs(m.near - this.lastShadowNear) > 1, S = Math.abs(m.far - this.lastShadowFar) > 1, I = w.distanceToSquared(this.lastLightPosition) > 0.25, T = f.distanceToSquared(this.lastLightTarget) > 0.25, L = Math.abs(v - this.lastShadowIntensity) > 0.01;
3875
- !b && !A && !S && !I && !T && !L || (t.position.copy(w), t.target.position.copy(f), t.target.updateMatrixWorld(!0), t.updateMatrixWorld(!0), i.left = -u, i.right = u, i.top = u, i.bottom = -u, i.near = m.near, i.far = m.far, i.updateProjectionMatrix(), this.updateShadowBias(t, u, m), t.shadow.intensity = v, t.shadow.needsUpdate = !0, this.lastShadowHalfSize = u, this.lastShadowNear = m.near, this.lastShadowFar = m.far, this.lastLightPosition.copy(w), this.lastLightTarget.copy(f), this.lastShadowIntensity = v);
3874
+ ), b = Math.abs(u - this.lastShadowHalfSize) > 0.5, A = Math.abs(m.near - this.lastShadowNear) > 1, S = Math.abs(m.far - this.lastShadowFar) > 1, I = x.distanceToSquared(this.lastLightPosition) > 0.25, T = f.distanceToSquared(this.lastLightTarget) > 0.25, L = Math.abs(v - this.lastShadowIntensity) > 0.01;
3875
+ !b && !A && !S && !I && !T && !L || (t.position.copy(x), t.target.position.copy(f), t.target.updateMatrixWorld(!0), t.updateMatrixWorld(!0), i.left = -u, i.right = u, i.top = u, i.bottom = -u, i.near = m.near, i.far = m.far, i.updateProjectionMatrix(), this.updateShadowBias(t, u, m), t.shadow.intensity = v, t.shadow.needsUpdate = !0, this.lastShadowHalfSize = u, this.lastShadowNear = m.near, this.lastShadowFar = m.far, this.lastLightPosition.copy(x), this.lastLightTarget.copy(f), this.lastShadowIntensity = v);
3876
3876
  }
3877
3877
  /**
3878
3878
  * 计算场景范围对阴影相机半边长的贡献。
@@ -4314,8 +4314,8 @@ class va {
4314
4314
  let g = h.clone().sub(c).normalize();
4315
4315
  h = h.clone().sub(g.clone().setLength(0.5));
4316
4316
  const f = () => {
4317
- const v = performance.now() - p, w = Math.min(v / u, 1), m = w < 0.5 ? 2 * w * w : 1 - Math.pow(-2 * w + 2, 2) / 2;
4318
- a.position.lerpVectors(c, h, m), w < 1 ? requestAnimationFrame(f) : this.engine.controlModule.firstPersonControls.setCameraHeight(a.position.y);
4317
+ const v = performance.now() - p, x = Math.min(v / u, 1), m = x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2;
4318
+ a.position.lerpVectors(c, h, m), x < 1 ? requestAnimationFrame(f) : this.engine.controlModule.firstPersonControls.setCameraHeight(a.position.y);
4319
4319
  };
4320
4320
  this.clearModelHighlightBeforeCameraFlight(), requestAnimationFrame(f);
4321
4321
  return;
@@ -4665,13 +4665,13 @@ class xa {
4665
4665
  );
4666
4666
  const v = new Ct(f.x, f.y, f.z);
4667
4667
  v.translate(g.x, g.y, g.z), v.computeBoundingBox();
4668
- const w = new z(v, this.pickBoxMaterial);
4669
- w.name = c, w.url = o.url, w.castShadow = !1, w.receiveShadow = !1, w.userData.excludeFromAmbientOcclusion = !0, w.userData.__pickBox = !0, r.add(w), Array.isArray(a.infos) || (a.infos = a.info != null ? [a.info] : []), a.infos.push({
4668
+ const x = new z(v, this.pickBoxMaterial);
4669
+ x.name = c, x.url = o.url, x.castShadow = !1, x.receiveShadow = !1, x.userData.excludeFromAmbientOcclusion = !0, x.userData.__pickBox = !0, r.add(x), Array.isArray(a.infos) || (a.infos = a.info != null ? [a.info] : []), a.infos.push({
4670
4670
  id: c,
4671
4671
  name: h,
4672
- mesh: w,
4672
+ mesh: x,
4673
4673
  isPickBox: !0
4674
- }), a.pickBoxMesh = w, s += 1;
4674
+ }), a.pickBoxMesh = x, s += 1;
4675
4675
  });
4676
4676
  }), s;
4677
4677
  }
@@ -5779,16 +5779,16 @@ function Pa(l, e, t) {
5779
5779
  let n = null, s = 0, o, r, a = [];
5780
5780
  const c = 120;
5781
5781
  function h() {
5782
- const x = Math.max(1, o?.clientWidth || c), y = Math.max(1, o?.clientHeight || c);
5783
- return { width: x, height: y };
5782
+ const w = Math.max(1, o?.clientWidth || c), y = Math.max(1, o?.clientHeight || c);
5783
+ return { width: w, height: y };
5784
5784
  }
5785
5785
  function u() {
5786
- const x = i.sceneOrtho?.renderer;
5787
- if (!x || !i.camera)
5786
+ const w = i.sceneOrtho?.renderer;
5787
+ if (!w || !i.camera)
5788
5788
  return;
5789
- const { width: y, height: C } = h(), _ = x.getSize(new W());
5789
+ const { width: y, height: C } = h(), _ = w.getSize(new W());
5790
5790
  if (_.x !== y || _.y !== C) {
5791
- x.setSize(y, C);
5791
+ w.setSize(y, C);
5792
5792
  const D = y > C ? y / C : C / y, P = 300;
5793
5793
  i.camera.left = P * D / -2, i.camera.right = P * D / 2, i.camera.top = P / 2, i.camera.bottom = P / -2, i.camera.updateProjectionMatrix();
5794
5794
  }
@@ -5809,68 +5809,68 @@ function Pa(l, e, t) {
5809
5809
  function f() {
5810
5810
  s <= 0 || (s -= 1, !(s > 0) && (l.renderer && (l.renderer.interactionActive = !1), l.setIdleFrameRateExempt?.("view-cube-animation", !1), l.events?.trigger?.("engine-free"), t?.style && (t.style.cursor = "default")));
5811
5811
  }
5812
- function v(x, y, C) {
5813
- !C || !x || (x.up.copy(C), y && (y._referenceUp?.copy && y._referenceUp.copy(C).normalize(), y.up0?.copy && y.up0.copy(C), y._lastUp?.copy && y._lastUp.copy(C)));
5812
+ function v(w, y, C) {
5813
+ !C || !w || (w.up.copy(C), y && (y._referenceUp?.copy && y._referenceUp.copy(C).normalize(), y.up0?.copy && y.up0.copy(C), y._lastUp?.copy && y._lastUp.copy(C)));
5814
5814
  }
5815
- function w(x) {
5816
- v(e.camera, l.controls, x);
5815
+ function x(w) {
5816
+ v(e.camera, l.controls, w);
5817
5817
  }
5818
- function m(x) {
5819
- v(i.camera, i.orbitControls, x);
5818
+ function m(w) {
5819
+ v(i.camera, i.orbitControls, w);
5820
5820
  }
5821
- function b(x, y) {
5822
- !x || !y || (x._referenceUp?.copy && y._referenceUp && x._referenceUp.copy(y._referenceUp).normalize(), x._viewRight?.copy && y._viewRight && x._viewRight.copy(y._viewRight).normalize());
5821
+ function b(w, y) {
5822
+ !w || !y || (w._referenceUp?.copy && y._referenceUp && w._referenceUp.copy(y._referenceUp).normalize(), w._viewRight?.copy && y._viewRight && w._viewRight.copy(y._viewRight).normalize());
5823
5823
  }
5824
5824
  function A() {
5825
5825
  if (!i.camera || !e.camera)
5826
5826
  return;
5827
5827
  i.camera.quaternion.copy(e.camera.quaternion), i.camera.up.copy(e.camera.up);
5828
- const x = new d(0, 0, 1).applyQuaternion(e.camera.quaternion);
5829
- i.camera.position.copy(x.multiplyScalar(100)), b(i.orbitControls, l.controls);
5828
+ const w = new d(0, 0, 1).applyQuaternion(e.camera.quaternion);
5829
+ i.camera.position.copy(w.multiplyScalar(100)), b(i.orbitControls, l.controls);
5830
5830
  }
5831
5831
  function S() {
5832
5832
  !i.camera || !e.camera || (e.camera.quaternion.copy(i.camera.quaternion), e.camera.up.copy(i.camera.up), b(l.controls, i.orbitControls));
5833
5833
  }
5834
- function I(x, y) {
5835
- if (!x || !y)
5834
+ function I(w, y) {
5835
+ if (!w || !y)
5836
5836
  return;
5837
- const C = y.target, _ = C?.clone?.().sub(x.position), D = x.up.clone().normalize();
5837
+ const C = y.target, _ = C?.clone?.().sub(w.position), D = w.up.clone().normalize();
5838
5838
  if (y._referenceUp?.copy && y._referenceUp.copy(D), _?.lengthSq?.() > 1e-6 && y._viewRight?.copy) {
5839
5839
  const P = new d().crossVectors(_.clone().normalize(), D);
5840
- P.lengthSq() > 1e-6 ? y._viewRight.copy(P.normalize()) : y._viewRight.set(1, 0, 0).applyQuaternion(x.quaternion).normalize();
5840
+ P.lengthSq() > 1e-6 ? y._viewRight.copy(P.normalize()) : y._viewRight.set(1, 0, 0).applyQuaternion(w.quaternion).normalize();
5841
5841
  }
5842
- y._rotateVelocity?.set?.(0, 0), y._panVelocity?.set?.(0, 0), typeof y._zoomVelocity == "number" && (y._zoomVelocity = 0), y._mouseStart?.set?.(0, 0), y._touchCenter?.set?.(0, 0), typeof y._touchDistance == "number" && (y._touchDistance = 0), y._pointers?.clear?.(), y._isInteracting = !1, y.state = -1, y._lastPosition?.copy?.(x.position), y._lastTarget?.copy?.(C), y._lastUp?.copy?.(x.up), y._lastQuaternion?.copy?.(x.quaternion), typeof y._lastZoom == "number" && (y._lastZoom = x.zoom), y.saveState?.();
5842
+ y._rotateVelocity?.set?.(0, 0), y._panVelocity?.set?.(0, 0), typeof y._zoomVelocity == "number" && (y._zoomVelocity = 0), y._mouseStart?.set?.(0, 0), y._touchCenter?.set?.(0, 0), typeof y._touchDistance == "number" && (y._touchDistance = 0), y._pointers?.clear?.(), y._isInteracting = !1, y.state = -1, y._lastPosition?.copy?.(w.position), y._lastTarget?.copy?.(C), y._lastUp?.copy?.(w.up), y._lastQuaternion?.copy?.(w.quaternion), typeof y._lastZoom == "number" && (y._lastZoom = w.zoom), y.saveState?.();
5843
5843
  }
5844
5844
  i.RenderScene = function() {
5845
5845
  if (u(), N)
5846
5846
  i.orbitControls && i.orbitControls.update();
5847
5847
  else {
5848
5848
  i.camera.quaternion.copy(e.camera.quaternion), A();
5849
- const x = new d(0, 0, 1).applyQuaternion(e.camera.quaternion);
5850
- i.camera.position.copy(x.multiplyScalar(100));
5849
+ const w = new d(0, 0, 1).applyQuaternion(e.camera.quaternion);
5850
+ i.camera.position.copy(w.multiplyScalar(100));
5851
5851
  }
5852
5852
  i.sceneOrtho.renderer.render(i.sceneOrtho, i.camera);
5853
- }, i.ToggleDirectionView = function(x) {
5853
+ }, i.ToggleDirectionView = function(w) {
5854
5854
  p();
5855
5855
  var y = new d(0, 0, 0), C = null;
5856
- x == "top" ? (y = new d(0, 1, 0), C = new d(0, 0, -1)) : x == "down" || x == "button" ? (y = new d(0, -1, 0), C = new d(0, 0, 1)) : x == "front" ? y = new d(0, 0, 1) : x == "left" ? y = new d(-1, 0, 0) : x == "back" ? y = new d(0, 0, -1) : x == "right" ? y = new d(1, 0, 0) : x == "top_front" ? y = new d(1, 1, 0) : x == "top_left" ? y = new d(0, 1, -1) : x == "top_back" ? y = new d(-1, 1, 0) : x == "top_right" ? y = new d(0, 1, 1) : x == "down_front" ? y = new d(1, -1, 0) : x == "down_left" ? y = new d(0, -1, -1) : x == "down_back" ? y = new d(-1, -1, 0) : x == "down_right" ? y = new d(0, -1, 1) : x == "front_right" ? y = new d(1, 0, 1) : x == "right_back" ? y = new d(-1, 0, 1) : x == "back_left" ? y = new d(-1, 0, -1) : x == "left_front" ? y = new d(1, 0, -1) : x == "top_left_front" ? y = new d(1, 1, -1) : x == "top_front_right" ? y = new d(1, 1, 1) : x == "top_right_back" ? y = new d(-1, 1, 1) : x == "top_back_left" ? y = new d(-1, 1, -1) : x == "button_left_front" ? y = new d(1, -1, -1) : x == "button_front_right" ? y = new d(1, -1, 1) : x == "button_right_back" ? y = new d(-1, 1, 1) : x == "button_back_left" && (y = new d(-1, -1, -1));
5856
+ w == "top" ? (y = new d(0, 1, 0), C = new d(0, 0, -1)) : w == "down" || w == "button" ? (y = new d(0, -1, 0), C = new d(0, 0, 1)) : w == "front" ? y = new d(0, 0, 1) : w == "left" ? y = new d(-1, 0, 0) : w == "back" ? y = new d(0, 0, -1) : w == "right" ? y = new d(1, 0, 0) : w == "top_front" ? y = new d(1, 1, 0) : w == "top_left" ? y = new d(0, 1, -1) : w == "top_back" ? y = new d(-1, 1, 0) : w == "top_right" ? y = new d(0, 1, 1) : w == "down_front" ? y = new d(1, -1, 0) : w == "down_left" ? y = new d(0, -1, -1) : w == "down_back" ? y = new d(-1, -1, 0) : w == "down_right" ? y = new d(0, -1, 1) : w == "front_right" ? y = new d(1, 0, 1) : w == "right_back" ? y = new d(-1, 0, 1) : w == "back_left" ? y = new d(-1, 0, -1) : w == "left_front" ? y = new d(1, 0, -1) : w == "top_left_front" ? y = new d(1, 1, -1) : w == "top_front_right" ? y = new d(1, 1, 1) : w == "top_right_back" ? y = new d(-1, 1, 1) : w == "top_back_left" ? y = new d(-1, 1, -1) : w == "button_left_front" ? y = new d(1, -1, -1) : w == "button_front_right" ? y = new d(1, -1, 1) : w == "button_right_back" ? y = new d(-1, 1, 1) : w == "button_back_left" && (y = new d(-1, -1, -1));
5857
5857
  var _ = l.octreeBox.getBoundingBox(), D = _.min, P = _.max, F = D.clone().add(P.clone()).multiplyScalar(0.5), G = F.clone().add(y.multiplyScalar(1 * P.distanceTo(D)));
5858
5858
  T(e.camera.position, G, l.controls.target.clone(), F, null, null, 1e3, null, C);
5859
5859
  }, i.GetCameraPose = function() {
5860
- var x = e.camera.quaternion, y = e.camera.position, C = l.controls.target, _ = {
5861
- quaternion: x,
5860
+ var w = e.camera.quaternion, y = e.camera.position, C = l.controls.target, _ = {
5861
+ quaternion: w,
5862
5862
  position: y,
5863
5863
  target: C
5864
5864
  };
5865
5865
  return _;
5866
- }, i.ReductionCameraPose = function(x, y = 1e3, C) {
5866
+ }, i.ReductionCameraPose = function(w, y = 1e3, C) {
5867
5867
  p();
5868
5868
  var _ = new Se(
5869
- x.quaternion._x,
5870
- x.quaternion._y,
5871
- x.quaternion._z,
5872
- x.quaternion._w
5873
- ), D = new d(x.position.x, x.position.y, x.position.z), P = new d(x.target.x, x.target.y, x.target.z);
5869
+ w.quaternion._x,
5870
+ w.quaternion._y,
5871
+ w.quaternion._z,
5872
+ w.quaternion._w
5873
+ ), D = new d(w.position.x, w.position.y, w.position.z), P = new d(w.target.x, w.target.y, w.target.z);
5874
5874
  let F = !1;
5875
5875
  T(
5876
5876
  e.camera.position,
@@ -5886,10 +5886,10 @@ function Pa(l, e, t) {
5886
5886
  ), C && setTimeout(() => {
5887
5887
  F || (C(!0), F = !0);
5888
5888
  }, y + 10);
5889
- }, i.CameraGoHome = function(x = 1e3) {
5889
+ }, i.CameraGoHome = function(w = 1e3) {
5890
5890
  p();
5891
5891
  const y = new d(0, 1, 0);
5892
- w(y), m(y);
5892
+ x(y), m(y);
5893
5893
  var C = l.octreeBox.getBoundingBox(), _ = l.clipping?.getClippedBoundingBox?.(C), D = _ && !_.isEmpty() ? _ : C, P = D.min.clone().add(D.max.clone()).multiplyScalar(0.5);
5894
5894
  let F = new d(1, 1, 1);
5895
5895
  var G = C.max.distanceTo(C.min), q = D.max.distanceTo(D.min), j = P.clone().add(F.multiplyScalar(q * 0.8));
@@ -5905,25 +5905,25 @@ function Pa(l, e, t) {
5905
5905
  P,
5906
5906
  null,
5907
5907
  null,
5908
- x,
5908
+ w,
5909
5909
  () => {
5910
- w(y), m(y), e.camera.lookAt(P), e.camera.updateMatrix(), e.camera.updateMatrixWorld(!0), I(e.camera, l.controls), I(i.camera, i.orbitControls), i.RenderScene();
5910
+ x(y), m(y), e.camera.lookAt(P), e.camera.updateMatrix(), e.camera.updateMatrixWorld(!0), I(e.camera, l.controls), I(i.camera, i.orbitControls), i.RenderScene();
5911
5911
  }
5912
5912
  );
5913
- }, i.zoomToBox = function(x, y = 1e3) {
5913
+ }, i.zoomToBox = function(w, y = 1e3) {
5914
5914
  if (p(), e.camera.isOrthographicCamera) {
5915
5915
  let ti = function() {
5916
5916
  n = requestAnimationFrame(ti), Fe.update();
5917
5917
  };
5918
- var C = x.min.clone().add(x.max.clone()).multiplyScalar(0.5), _ = e.camera.position.clone().sub(l.controls.target.clone()).normalize(), D = e.camera.position.distanceTo(l.controls.target), P = C.clone().add(_.multiplyScalar(D)), F = e.camera.zoom, G = new d(1, 0, 0).applyQuaternion(e.camera.quaternion), q = new d(0, 1, 0).applyQuaternion(e.camera.quaternion), j = [
5919
- new d(x.min.x, x.min.y, x.min.z),
5920
- new d(x.max.x, x.min.y, x.min.z),
5921
- new d(x.min.x, x.max.y, x.min.z),
5922
- new d(x.max.x, x.max.y, x.min.z),
5923
- new d(x.min.x, x.min.y, x.max.z),
5924
- new d(x.max.x, x.min.y, x.max.z),
5925
- new d(x.min.x, x.max.y, x.max.z),
5926
- new d(x.max.x, x.max.y, x.max.z)
5918
+ var C = w.min.clone().add(w.max.clone()).multiplyScalar(0.5), _ = e.camera.position.clone().sub(l.controls.target.clone()).normalize(), D = e.camera.position.distanceTo(l.controls.target), P = C.clone().add(_.multiplyScalar(D)), F = e.camera.zoom, G = new d(1, 0, 0).applyQuaternion(e.camera.quaternion), q = new d(0, 1, 0).applyQuaternion(e.camera.quaternion), j = [
5919
+ new d(w.min.x, w.min.y, w.min.z),
5920
+ new d(w.max.x, w.min.y, w.min.z),
5921
+ new d(w.min.x, w.max.y, w.min.z),
5922
+ new d(w.max.x, w.max.y, w.min.z),
5923
+ new d(w.min.x, w.min.y, w.max.z),
5924
+ new d(w.max.x, w.min.y, w.max.z),
5925
+ new d(w.min.x, w.max.y, w.max.z),
5926
+ new d(w.max.x, w.max.y, w.max.z)
5927
5927
  ], M = 1 / 0, E = -1 / 0, B = 1 / 0, U = -1 / 0;
5928
5928
  for (var Y of j) {
5929
5929
  var we = Y.dot(G), ve = Y.dot(q);
@@ -5958,20 +5958,20 @@ function Pa(l, e, t) {
5958
5958
  l.controls.auto = !1, i.RenderScene(), cancelAnimationFrame(n), n = null, f();
5959
5959
  }), Fe.easing($e.Easing.Cubic.InOut), g(), Fe.start(), ti();
5960
5960
  } else {
5961
- var C = x.min.clone().add(x.max.clone()).multiplyScalar(0.5);
5961
+ var C = w.min.clone().add(w.max.clone()).multiplyScalar(0.5);
5962
5962
  let _s = e.camera.position.clone().sub(l.controls.target.clone()).normalize();
5963
- var P = C.clone().add(_s.multiplyScalar(2 * x.max.distanceTo(x.min)));
5963
+ var P = C.clone().add(_s.multiplyScalar(2 * w.max.distanceTo(w.min)));
5964
5964
  T(e.camera.position, P, l.controls.target.clone(), C, null, null, y);
5965
5965
  }
5966
5966
  };
5967
- function T(x, y, C, _, D, P, F = 1e3, G, q) {
5967
+ function T(w, y, C, _, D, P, F = 1e3, G, q) {
5968
5968
  var j;
5969
5969
  D && P ? (j = new $e.Tween({
5970
- x1: x.x,
5970
+ x1: w.x,
5971
5971
  // 相机当前位置x
5972
- y1: x.y,
5972
+ y1: w.y,
5973
5973
  // 相机当前位置y
5974
- z1: x.z,
5974
+ z1: w.z,
5975
5975
  // 相机当前位置z
5976
5976
  x2: C.x,
5977
5977
  // 控制当前的中心点x
@@ -6012,11 +6012,11 @@ function Pa(l, e, t) {
6012
6012
  },
6013
6013
  F
6014
6014
  )) : (j = new $e.Tween({
6015
- x1: x.x,
6015
+ x1: w.x,
6016
6016
  // 相机当前位置x
6017
- y1: x.y,
6017
+ y1: w.y,
6018
6018
  // 相机当前位置y
6019
- z1: x.z,
6019
+ z1: w.z,
6020
6020
  // 相机当前位置z
6021
6021
  x2: C.x,
6022
6022
  // 控制当前的中心点x
@@ -6059,10 +6059,10 @@ function Pa(l, e, t) {
6059
6059
  }
6060
6060
  function L() {
6061
6061
  o = document.createElement("div"), o.className = "ViewCube", t.appendChild(o), r = document.createElement("div"), r.className = "viewSettingWrapper", r.innerHTML = "...";
6062
- var x = document.createElement("div");
6063
- x.className = "homeViewWrapper", x.style.backgroundImage = `url(${Qe.home})`, x.addEventListener("mousedown", function() {
6062
+ var w = document.createElement("div");
6063
+ w.className = "homeViewWrapper", w.style.backgroundImage = `url(${Qe.home})`, w.addEventListener("mousedown", function() {
6064
6064
  l.viewCube.cameraGoHome(500);
6065
- }), o.appendChild(x), r.addEventListener("mousedown", function(_) {
6065
+ }), o.appendChild(w), r.addEventListener("mousedown", function(_) {
6066
6066
  _.stopPropagation(), cameraToggle.classList.contains("show") ? (y(), console.log("隐藏功能按钮")) : (C(), console.log("显示功能按钮"));
6067
6067
  });
6068
6068
  function y() {
@@ -6074,10 +6074,10 @@ function Pa(l, e, t) {
6074
6074
  }
6075
6075
  function k() {
6076
6076
  i.sceneOrtho = Ea();
6077
- var C = t.clientWidth, _ = t.clientWidth, x = C > _ ? C / _ : _ / C, y = 300;
6077
+ var C = t.clientWidth, _ = t.clientWidth, w = C > _ ? C / _ : _ / C, y = 300;
6078
6078
  i.camera = new ke(
6079
- y * x / -2,
6080
- y * x / 2,
6079
+ y * w / -2,
6080
+ y * w / 2,
6081
6081
  y / 2,
6082
6082
  y / -2,
6083
6083
  0.01,
@@ -6097,8 +6097,8 @@ function Pa(l, e, t) {
6097
6097
  function te() {
6098
6098
  if (N) {
6099
6099
  if (e.camera.quaternion.copy(i.camera.quaternion), S(), l.controls && i._mainTarget && i._mainDistance) {
6100
- const x = new d(0, 0, 1).applyQuaternion(e.camera.quaternion);
6101
- e.camera.position.copy(i._mainTarget.clone().add(x.multiplyScalar(i._mainDistance))), l.controls.update();
6100
+ const w = new d(0, 0, 1).applyQuaternion(e.camera.quaternion);
6101
+ e.camera.position.copy(i._mainTarget.clone().add(w.multiplyScalar(i._mainDistance))), l.controls.update();
6102
6102
  }
6103
6103
  l.renderer && e.camera && l.renderer.render(e, e.camera);
6104
6104
  }
@@ -6106,15 +6106,15 @@ function Pa(l, e, t) {
6106
6106
  function Q() {
6107
6107
  N = !1, i._mainTarget = null, i._mainDistance = null, f();
6108
6108
  }
6109
- function ce(x) {
6110
- return x ? (x.colorSpace = je, x) : null;
6109
+ function ce(w) {
6110
+ return w ? (w.colorSpace = je, w) : null;
6111
6111
  }
6112
- async function ae(x, y) {
6113
- const C = await x.loadAsync(y);
6112
+ async function ae(w, y) {
6113
+ const C = await w.loadAsync(y);
6114
6114
  return ce(C);
6115
6115
  }
6116
6116
  async function le() {
6117
- let x = [
6117
+ let w = [
6118
6118
  {
6119
6119
  label: "右",
6120
6120
  icon: Qe.right
@@ -6141,7 +6141,7 @@ function Pa(l, e, t) {
6141
6141
  }
6142
6142
  ];
6143
6143
  const y = new Je(), _ = (await Promise.all(
6144
- x.map((F) => ae(y, F.icon))
6144
+ w.map((F) => ae(y, F.icon))
6145
6145
  )).map((F) => new oe({
6146
6146
  color: 16777215,
6147
6147
  map: F
@@ -6172,8 +6172,8 @@ function Pa(l, e, t) {
6172
6172
  j.length > 0 && (j[0].object.material.opacity = 0.2);
6173
6173
  });
6174
6174
  }
6175
- function fe(x) {
6176
- for (var y = x * 0.5 - 20, C = [
6175
+ function fe(w) {
6176
+ for (var y = w * 0.5 - 20, C = [
6177
6177
  {
6178
6178
  name: "right",
6179
6179
  a: 30,
@@ -6365,14 +6365,14 @@ function Pa(l, e, t) {
6365
6365
  for (var P = 0; P < D.length; P++)
6366
6366
  a.push(Ae(D[P]));
6367
6367
  }
6368
- function Ae(x) {
6369
- const y = new Ct(x.a, x.b, x.c), C = new oe({
6368
+ function Ae(w) {
6369
+ const y = new Ct(w.a, w.b, w.c), C = new oe({
6370
6370
  color: "blue",
6371
6371
  transparent: !0,
6372
6372
  opacity: 0.01
6373
- }), _ = new H().makeTranslation(x.point.x, x.point.y, x.point.z);
6373
+ }), _ = new H().makeTranslation(w.point.x, w.point.y, w.point.z);
6374
6374
  let D = y.applyMatrix4(_), P = new z(D, C);
6375
- return P.name = x.name, i.sceneOrtho.add(P), P;
6375
+ return P.name = w.name, i.sceneOrtho.add(P), P;
6376
6376
  }
6377
6377
  return i.ToggleCameraType = function() {
6378
6378
  l.cameraModule.switchCurrentCamera();
@@ -6385,12 +6385,12 @@ function Pa(l, e, t) {
6385
6385
  l.renderer.render(e, e.camera);
6386
6386
  const y = l.renderer.domElement.toDataURL("image/png"), C = document.createElement("a"), _ = (/* @__PURE__ */ new Date()).toISOString().replaceAll(/[:.]/g, "-");
6387
6387
  C.download = `screenshot_${_}.png`, C.href = y, C.click(), console.log("截图已保存");
6388
- } catch (x) {
6389
- console.error("截图失败:", x);
6388
+ } catch (w) {
6389
+ console.error("截图失败:", w);
6390
6390
  }
6391
6391
  }, i.ToggleFullscreen = function() {
6392
- const x = t || document.documentElement;
6393
- !document.fullscreenElement && !document.webkitFullscreenElement && !document.mozFullScreenElement && !document.msFullscreenElement ? (x.requestFullscreen ? x.requestFullscreen() : x.webkitRequestFullscreen ? x.webkitRequestFullscreen() : x.mozRequestFullScreen ? x.mozRequestFullScreen() : x.msRequestFullscreen && x.msRequestFullscreen(), console.log("已进入全屏模式")) : (document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen(), console.log("已退出全屏模式"));
6392
+ const w = t || document.documentElement;
6393
+ !document.fullscreenElement && !document.webkitFullscreenElement && !document.mozFullScreenElement && !document.msFullscreenElement ? (w.requestFullscreen ? w.requestFullscreen() : w.webkitRequestFullscreen ? w.webkitRequestFullscreen() : w.mozRequestFullScreen ? w.mozRequestFullScreen() : w.msRequestFullscreen && w.msRequestFullscreen(), console.log("已进入全屏模式")) : (document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen(), console.log("已退出全屏模式"));
6394
6394
  }, i;
6395
6395
  }
6396
6396
  class Ta {
@@ -6567,7 +6567,7 @@ function Ia(l) {
6567
6567
  }, e.clearSelectableScope = function() {
6568
6568
  t = null;
6569
6569
  }, e.rayInterationModel = function(i, n, s = !0, o = !0) {
6570
- const a = [], c = /* @__PURE__ */ new Set(), h = new d(), u = l.clipping, p = Array.isArray(l.models) ? l.models : [], g = new Map(p.map((y) => [y.url, y])), f = Ae(l.engineStatus.hideModels), v = Ae(l.engineStatus.translucentModels), w = l.modelExplode?.raycast?.(i) ?? [];
6570
+ const a = [], c = /* @__PURE__ */ new Set(), h = new d(), u = l.clipping, p = Array.isArray(l.models) ? l.models : [], g = new Map(p.map((y) => [y.url, y])), f = Ae(l.engineStatus.hideModels), v = Ae(l.engineStatus.translucentModels), x = l.modelExplode?.raycast?.(i) ?? [];
6571
6571
  p.forEach((y) => {
6572
6572
  const C = g.get(y.url);
6573
6573
  if (C == null)
@@ -6581,7 +6581,7 @@ function Ia(l) {
6581
6581
  const m = a.map((y) => N(y)).filter((y) => y instanceof z);
6582
6582
  tr(i);
6583
6583
  const b = [
6584
- ...w,
6584
+ ...x,
6585
6585
  ...i.intersectObjects(m, !1).map(ce)
6586
6586
  ].sort((y, C) => y.distance - C.distance);
6587
6587
  return ir(i), b;
@@ -6631,7 +6631,7 @@ function Ia(l) {
6631
6631
  });
6632
6632
  }
6633
6633
  function I(y, C) {
6634
- if (!(y instanceof z) || (y.parent == null && x(y, C), s && y.geometry.attributes.position.count >= 2e3))
6634
+ if (!(y instanceof z) || (y.parent == null && w(y, C), s && y.geometry.attributes.position.count >= 2e3))
6635
6635
  return;
6636
6636
  const _ = y.uuid ?? y.id;
6637
6637
  if (c.has(_))
@@ -6686,7 +6686,7 @@ function Ia(l) {
6686
6686
  j.__pickMeshes instanceof Map || (j.__pickMeshes = /* @__PURE__ */ new Map());
6687
6687
  const M = `${C[0]}:${F}`;
6688
6688
  let E = j.__pickMeshes.get(M);
6689
- return E instanceof z || (E = new z(P.geometry, P.material), j.__pickMeshes.set(M, E)), x(E, q), E.userData.__instancePickMeta = {
6689
+ return E instanceof z || (E = new z(P.geometry, P.material), j.__pickMeshes.set(M, E)), w(E, q), E.userData.__instancePickMeta = {
6690
6690
  url: _,
6691
6691
  id: y.info?.id ?? y.id ?? y.infos[0].id,
6692
6692
  instanceId: F,
@@ -6742,7 +6742,7 @@ function Ia(l) {
6742
6742
  Array.isArray(_.ids) && C.set(_.url, new Set(_.ids));
6743
6743
  }), C;
6744
6744
  }
6745
- function x(y, C) {
6745
+ function w(y, C) {
6746
6746
  y instanceof z && (y.matrixAutoUpdate = !1, y.matrix.copy(C), y.matrixWorld.copy(C), y.matrixWorldNeedsUpdate = !1, y.box instanceof R && (y.box.copy(y.geometry.boundingBox ?? new R().setFromBufferAttribute(y.geometry.attributes.position)), y.box.applyMatrix4(C)));
6747
6747
  }
6748
6748
  }, e;
@@ -8755,7 +8755,7 @@ class Ve {
8755
8755
  m.container != null && (m.container.style.display = b ? "block" : "none");
8756
8756
  }
8757
8757
  this.engine.measure.annotationData.normalAnnotation.forEach((m) => {
8758
- w(m);
8758
+ x(m);
8759
8759
  }), this.engine.measure.annotationData.elevationAnnotation.forEach((m) => {
8760
8760
  v(m);
8761
8761
  }), this.engine.measure.annotationData.coordinateAnnotation.forEach((m) => {
@@ -8914,7 +8914,7 @@ class Ve {
8914
8914
  }
8915
8915
  n(m, !0), b.style.top = A.y - 48 + "px", b.style.left = A.x - 16 + "px", b.getElementsByTagName("text")[0].innerHTML = e.getMeasureText(m.text, 1);
8916
8916
  }
8917
- function w(m) {
8917
+ function x(m) {
8918
8918
  if (m.container == null) {
8919
8919
  let I = [
8920
8920
  '<svg class="measureSvg">',
@@ -10221,8 +10221,8 @@ class al {
10221
10221
  f == null ? (f = new It(g, p), f.name = n + "Line", e.add(f), this.meshs.push(f)) : (f.geometry = g, f.material = p);
10222
10222
  const v = new d();
10223
10223
  t.forEach((m) => v.add(m)), v.multiplyScalar(1 / t.length), this.updateFaceTransformControl(n, i, v, s);
10224
- const w = this.engine.sectionPlane.find((m) => m.name == n);
10225
- w && w.setFromNormalAndCoplanarPoint(i.clone().setLength(-1), o);
10224
+ const x = this.engine.sectionPlane.find((m) => m.name == n);
10225
+ x && x.setFromNormalAndCoplanarPoint(i.clone().setLength(-1), o);
10226
10226
  }
10227
10227
  }
10228
10228
  class ll {
@@ -10443,12 +10443,12 @@ class ll {
10443
10443
  );
10444
10444
  this.center = o.clone();
10445
10445
  const r = t?.clone() ?? o.clone().add(n.clone().multiplyScalar(e)), { tangent: a, bitangent: c } = this.getPlaneBasis(n), h = this.getBoxCorners(this.box), u = this.box.min.distanceTo(this.box.max), p = Math.max(u * 0.02, 0.01);
10446
- let g = 1 / 0, f = -1 / 0, v = 1 / 0, w = -1 / 0;
10446
+ let g = 1 / 0, f = -1 / 0, v = 1 / 0, x = -1 / 0;
10447
10447
  h.forEach((I) => {
10448
10448
  const T = I.clone().sub(r), L = T.dot(a), k = T.dot(c);
10449
- g = Math.min(g, L), f = Math.max(f, L), v = Math.min(v, k), w = Math.max(w, k);
10450
- }), g -= p, f += p, v -= p, w += p;
10451
- const m = r.clone().add(a.clone().multiplyScalar(g)).add(c.clone().multiplyScalar(v)), b = r.clone().add(a.clone().multiplyScalar(f)).add(c.clone().multiplyScalar(v)), A = r.clone().add(a.clone().multiplyScalar(f)).add(c.clone().multiplyScalar(w)), S = r.clone().add(a.clone().multiplyScalar(g)).add(c.clone().multiplyScalar(w));
10449
+ g = Math.min(g, L), f = Math.max(f, L), v = Math.min(v, k), x = Math.max(x, k);
10450
+ }), g -= p, f += p, v -= p, x += p;
10451
+ const m = r.clone().add(a.clone().multiplyScalar(g)).add(c.clone().multiplyScalar(v)), b = r.clone().add(a.clone().multiplyScalar(f)).add(c.clone().multiplyScalar(v)), A = r.clone().add(a.clone().multiplyScalar(f)).add(c.clone().multiplyScalar(x)), S = r.clone().add(a.clone().multiplyScalar(g)).add(c.clone().multiplyScalar(x));
10452
10452
  this.current_center = r.clone(), this.createFace(i, [m, b, A, S], n, "face"), this.updateTransformControl(s), this.updateRotateControl(s);
10453
10453
  }
10454
10454
  createFace(e, t, i, n) {
@@ -10896,17 +10896,17 @@ class hl {
10896
10896
  return;
10897
10897
  const o = i.min.distanceTo(i.max), r = o * 5, a = 0.1, c = this.createPlaneBrush(e, r, a), h = [];
10898
10898
  for (const v of s.slice(0, this.maxCandidates)) {
10899
- const w = this.createWorldBrushFromMesh(v);
10900
- if (w != null)
10899
+ const x = this.createWorldBrushFromMesh(v);
10900
+ if (x != null)
10901
10901
  try {
10902
- const b = this.evaluator.evaluate(w, c, Zs)?.geometry;
10902
+ const b = this.evaluator.evaluate(x, c, Zs)?.geometry;
10903
10903
  if (!b)
10904
10904
  continue;
10905
10905
  const A = this.extractPlaneCapGeometry(b, e, a);
10906
10906
  A && h.push(A), b.dispose();
10907
10907
  } catch {
10908
10908
  } finally {
10909
- w.geometry.dispose();
10909
+ x.geometry.dispose();
10910
10910
  }
10911
10911
  }
10912
10912
  if (c.geometry.dispose(), h.length === 0)
@@ -11088,12 +11088,12 @@ class hl {
11088
11088
  const n = e.index ? e.toNonIndexed() : e.clone(), s = n.getAttribute("position");
11089
11089
  if (!s || s.count < 3)
11090
11090
  return n.dispose(), null;
11091
- const o = t.normal.clone().normalize(), r = new d(), a = new d(), c = new d(), h = new d(), u = new d(), p = new d(), g = new d(), f = new d(), v = new d(), w = Math.max(i * 0.35, 1e-4), m = Math.max(i * 0.7, 1e-4), b = [];
11091
+ const o = t.normal.clone().normalize(), r = new d(), a = new d(), c = new d(), h = new d(), u = new d(), p = new d(), g = new d(), f = new d(), v = new d(), x = Math.max(i * 0.35, 1e-4), m = Math.max(i * 0.7, 1e-4), b = [];
11092
11092
  for (let S = 0; S < s.count; S += 3) {
11093
11093
  if (h.fromBufferAttribute(s, S), u.fromBufferAttribute(s, S + 1), p.fromBufferAttribute(s, S + 2), a.subVectors(u, h), c.subVectors(p, h), r.crossVectors(a, c), r.lengthSq() < 1e-14 || (r.normalize(), Math.abs(r.dot(o)) < 0.9))
11094
11094
  continue;
11095
11095
  const I = t.distanceToPoint(h), T = t.distanceToPoint(u), L = t.distanceToPoint(p), k = Math.min(I, T, L);
11096
- if (Math.max(I, T, L) - k > w)
11096
+ if (Math.max(I, T, L) - k > x)
11097
11097
  continue;
11098
11098
  const K = (I + T + L) / 3;
11099
11099
  Math.abs(K) > m || K < 0 || (g.copy(h).addScaledVector(o, -I), f.copy(u).addScaledVector(o, -T), v.copy(p).addScaledVector(o, -L), r.dot(o) <= 0 ? (b.push(g.x, g.y, g.z), b.push(f.x, f.y, f.z), b.push(v.x, v.y, v.z)) : (b.push(g.x, g.y, g.z), b.push(v.x, v.y, v.z), b.push(f.x, f.y, f.z)));
@@ -11111,8 +11111,8 @@ class hl {
11111
11111
  let a = 1 / 0, c = -1 / 0, h = 1 / 0, u = -1 / 0;
11112
11112
  for (let f = 0; f < i.count; f++) {
11113
11113
  o.fromBufferAttribute(i, f);
11114
- const v = o.dot(n), w = o.dot(s), m = f * 2;
11115
- r[m] = v, r[m + 1] = w, a = Math.min(a, v), c = Math.max(c, v), h = Math.min(h, w), u = Math.max(u, w);
11114
+ const v = o.dot(n), x = o.dot(s), m = f * 2;
11115
+ r[m] = v, r[m + 1] = x, a = Math.min(a, v), c = Math.max(c, v), h = Math.min(h, x), u = Math.max(u, x);
11116
11116
  }
11117
11117
  const p = Math.max(c - a, 1e-6), g = Math.max(u - h, 1e-6);
11118
11118
  for (let f = 0; f < r.length; f += 2)
@@ -11519,10 +11519,10 @@ class ml {
11519
11519
  name: r.categorys[f],
11520
11520
  children: []
11521
11521
  };
11522
- h.push(v), u.filter((w) => w[0] === f).forEach((w) => {
11522
+ h.push(v), u.filter((x) => x[0] === f).forEach((x) => {
11523
11523
  v.children.push({
11524
- name: r.names[w[1]],
11525
- value: r.values[w[2]]
11524
+ name: r.names[x[1]],
11525
+ value: r.values[x[2]]
11526
11526
  });
11527
11527
  });
11528
11528
  }), n != null && n.has(a) && h.push(n.get(a));
@@ -11554,8 +11554,8 @@ class ml {
11554
11554
  分析性質: 10
11555
11555
  };
11556
11556
  return h.sort((f, v) => {
11557
- const w = g[f.name] ?? 99;
11558
- return (g[v.name] ?? 99) - w;
11557
+ const x = g[f.name] ?? 99;
11558
+ return (g[v.name] ?? 99) - x;
11559
11559
  }), c?.({
11560
11560
  properties: h,
11561
11561
  materials: h
@@ -12977,8 +12977,8 @@ class Sl {
12977
12977
  c > Math.PI && (c -= 2 * Math.PI), c < -Math.PI && (c += 2 * Math.PI);
12978
12978
  const h = n.target ? Math.max(i.position.distanceTo(n.target), 1e-3) : 10, u = this.engine.controlModule?.firstPersonControls, p = this.getThirdPersonControl();
12979
12979
  if (u?.enabled) {
12980
- const v = new d(0, 1, 0), w = new Se().setFromAxisAngle(v, -c);
12981
- i.quaternion.premultiply(w), i.up.copy(v), i.updateMatrixWorld(!0);
12980
+ const v = new d(0, 1, 0), x = new Se().setFromAxisAngle(v, -c);
12981
+ i.quaternion.premultiply(x), i.up.copy(v), i.updateMatrixWorld(!0);
12982
12982
  const m = i.position.clone().add(i.getWorldDirection(new d()).multiplyScalar(h));
12983
12983
  n.target?.copy(m), u.syncRotationStateFromCamera?.(), u.syncSharedTargetFromCamera?.();
12984
12984
  return;
@@ -14251,11 +14251,11 @@ class Ui {
14251
14251
  const p = o.ViewDirection || o.viewDirection;
14252
14252
  if (!r || !p)
14253
14253
  return;
14254
- const g = this.toEnginePointFromLike(r), f = o.CameraPosition || o.cameraPosition || null, v = o.CameraTarget || o.cameraTarget || r, w = f ? this.toEnginePointFromLike(f) : null, m = this.toEnginePointFromLike(v), b = new d(
14254
+ const g = this.toEnginePointFromLike(r), f = o.CameraPosition || o.cameraPosition || null, v = o.CameraTarget || o.cameraTarget || r, x = f ? this.toEnginePointFromLike(f) : null, m = this.toEnginePointFromLike(v), b = new d(
14255
14255
  p.X ?? p.x,
14256
14256
  p.Z ?? p.z,
14257
14257
  -(p.Y ?? p.y)
14258
- ).setLength(a), A = w ? w.distanceTo(m) : null, S = o.__dynamic === !0, I = Ui.OPEN_VIEW_ANIMATION_DURATION;
14258
+ ).setLength(a), A = x ? x.distanceTo(m) : null, S = o.__dynamic === !0, I = Ui.OPEN_VIEW_ANIMATION_DURATION;
14259
14259
  if (o.disableClipping === !0)
14260
14260
  this.engine.clipping?.disActive?.();
14261
14261
  else {
@@ -14294,11 +14294,11 @@ class Ui {
14294
14294
  if (!i || !n || !o || !r || !a || !c)
14295
14295
  return null;
14296
14296
  const h = this.toEnginePoint(o), u = t.clone().sub(h), p = this.shouldCorrectViewRangeOrigin(u) ? u : new d(), g = (v) => {
14297
- const w = o.clone().add(r.clone().multiplyScalar(v.x)).add(a.clone().multiplyScalar(v.y)).add(c.clone().multiplyScalar(v.z));
14298
- return this.toEnginePoint(w).add(p);
14297
+ const x = o.clone().add(r.clone().multiplyScalar(v.x)).add(a.clone().multiplyScalar(v.y)).add(c.clone().multiplyScalar(v.z));
14298
+ return this.toEnginePoint(x).add(p);
14299
14299
  }, f = (v) => {
14300
- const w = r.clone().multiplyScalar(v.x).add(a.clone().multiplyScalar(v.y)).add(c.clone().multiplyScalar(v.z));
14301
- return this.toEngineDirection(w).normalize();
14300
+ const x = r.clone().multiplyScalar(v.x).add(a.clone().multiplyScalar(v.y)).add(c.clone().multiplyScalar(v.z));
14301
+ return this.toEngineDirection(x).normalize();
14302
14302
  };
14303
14303
  return [
14304
14304
  this.createPlane(f(new d(1, 0, 0)), g(new d(i.x, i.y, i.z))),
@@ -15036,14 +15036,14 @@ class oc {
15036
15036
  });
15037
15037
  return N.annotationType = "arrow", N;
15038
15038
  }
15039
- const a = s / r, c = o / r, h = -c, u = a, p = Math.max(10, i.strokeWidth * 6), g = p * 0.72, f = t.x - a * p, v = t.y - c * p, w = f + h * (g * 0.5), m = v + u * (g * 0.5), b = f - h * (g * 0.5), A = v - u * (g * 0.5), S = new si([e.x, e.y, t.x, t.y], {
15039
+ const a = s / r, c = o / r, h = -c, u = a, p = Math.max(10, i.strokeWidth * 6), g = p * 0.72, f = t.x - a * p, v = t.y - c * p, x = f + h * (g * 0.5), m = v + u * (g * 0.5), b = f - h * (g * 0.5), A = v - u * (g * 0.5), S = new si([e.x, e.y, t.x, t.y], {
15040
15040
  stroke: i.stroke,
15041
15041
  strokeWidth: i.strokeWidth,
15042
15042
  fill: "",
15043
15043
  strokeLineCap: "round",
15044
15044
  selectable: !1,
15045
15045
  evented: !1
15046
- }), I = `M ${t.x} ${t.y} L ${w} ${m} L ${b} ${A} Z`, T = new Qi(I, {
15046
+ }), I = `M ${t.x} ${t.y} L ${x} ${m} L ${b} ${A} Z`, T = new Qi(I, {
15047
15047
  fill: i.stroke,
15048
15048
  stroke: i.stroke,
15049
15049
  strokeWidth: 1,
@@ -15100,8 +15100,8 @@ class oc {
15100
15100
  if (p < 0.1)
15101
15101
  continue;
15102
15102
  const g = -u / p, f = h / p, v = Math.max(1, Math.round(p / n));
15103
- for (let w = 1; w <= v; w++) {
15104
- const m = w / v, b = a.x + h * m, A = a.y + u * m, S = o % 2 === 0 ? -1 : 1, I = b + g * i * S, T = A + f * i * S;
15103
+ for (let x = 1; x <= v; x++) {
15104
+ const m = x / v, b = a.x + h * m, A = a.y + u * m, S = o % 2 === 0 ? -1 : 1, I = b + g * i * S, T = A + f * i * S;
15105
15105
  s += ` Q ${I} ${T} ${b} ${A}`, o++;
15106
15106
  }
15107
15107
  }
@@ -16548,13 +16548,13 @@ function Mc(l) {
16548
16548
  }
16549
16549
  class vc {
16550
16550
  render(e) {
16551
- const t = e.instance.style.leaderPoint ?? {}, i = t.strokeColor || e.instance.style.color || "#7ffcff", n = t.backgroundColor || e.instance.style.fillColor || i, s = t.borderColor || i, o = t.anchorColor || n, r = t.anchorRingColor || i, a = t.iconBackgroundColor || n, c = t.side ?? "right", h = t.icon ? this.escapeXmlAttribute(t.icon) : "", u = Math.max(t.iconWidth ?? 22, 1), p = Math.max(t.iconHeight ?? 22, 1), g = (t.text ?? "").trim(), f = Math.max(t.fontSize ?? 14, 10), v = t.textColor || e.instance.style.color || "#ffffff", w = t.fontWeight ?? 500, m = Math.max(Math.round((t.height ?? 8) * 12), 48), b = Math.max(Math.round(Math.abs(t.offsetX ?? t.armLength ?? 4) * 18), 56), A = this.getBoardWidth(e, g, f), S = Math.max(Math.round((t.boardHeight ?? 1.8) * 22), f + 18, 34), I = Math.max(Math.round((t.stemWidth ?? e.instance.style.lineWidth ?? 0.12) * 20), 2), T = t.borderWidth ?? 2.5, L = t.variant ?? "elbow", k = c === "right" ? 22 + b - 8 : 22 - b - A + 8, N = 8, K = Math.min(22, k) - 16, te = Math.max(22, k + A) + 16, Q = Math.max(te - K, 140), ce = Math.max(m + S + 36, 120), ae = 22 - K, le = k - K, fe = ce - 18, Ae = Math.max(fe - m, 14), x = c === "right" ? le : le + A, y = N + Math.round(S * 0.5), C = L === "vertical" ? [`${ae},${fe}`, `${ae},${Ae}`] : [`${ae},${fe}`, `${ae},${y}`, `${x},${y}`], _ = e.instance.selectable !== !1, D = _ ? "visiblePainted" : "none", P = _ ? "pointer" : "default", F = le + (h || !g ? 38 : 12), G = t.showBoard === !1 ? "" : `
16551
+ const t = e.instance.style.leaderPoint ?? {}, i = t.strokeColor || e.instance.style.color || "#7ffcff", n = t.backgroundColor || e.instance.style.fillColor || i, s = t.borderColor || i, o = t.anchorColor || n, r = t.anchorRingColor || i, a = t.iconBackgroundColor || n, c = t.side ?? "right", h = t.icon ? this.escapeXmlAttribute(t.icon) : "", u = Math.max(t.iconWidth ?? 22, 1), p = Math.max(t.iconHeight ?? 22, 1), g = (t.text ?? "").trim(), f = Math.max(t.fontSize ?? 14, 10), v = t.textColor || e.instance.style.color || "#ffffff", x = t.fontWeight ?? 500, m = Math.max(Math.round((t.height ?? 8) * 12), 48), b = Math.max(Math.round(Math.abs(t.offsetX ?? t.armLength ?? 4) * 18), 56), A = this.getBoardWidth(e, g, f), S = Math.max(Math.round((t.boardHeight ?? 1.8) * 22), f + 18, 34), I = Math.max(Math.round((t.stemWidth ?? e.instance.style.lineWidth ?? 0.12) * 20), 2), T = t.borderWidth ?? 2.5, L = t.variant ?? "elbow", k = c === "right" ? 22 + b - 8 : 22 - b - A + 8, N = 8, K = Math.min(22, k) - 16, te = Math.max(22, k + A) + 16, Q = Math.max(te - K, 140), ce = Math.max(m + S + 36, 120), ae = 22 - K, le = k - K, fe = ce - 18, Ae = Math.max(fe - m, 14), w = c === "right" ? le : le + A, y = N + Math.round(S * 0.5), C = L === "vertical" ? [`${ae},${fe}`, `${ae},${Ae}`] : [`${ae},${fe}`, `${ae},${y}`, `${w},${y}`], _ = e.instance.selectable !== !1, D = _ ? "visiblePainted" : "none", P = _ ? "pointer" : "default", F = le + (h || !g ? 38 : 12), G = t.showBoard === !1 ? "" : `
16552
16552
  <rect x="${le}" y="${N}" width="${A}" height="${S}" rx="10"
16553
16553
  fill="${n}" fill-opacity="${t.backgroundOpacity ?? t.boardOpacity ?? 0.18}"
16554
16554
  stroke="${s}" stroke-width="${T}" />
16555
16555
  ${t.iconBackgroundOpacity && t.iconBackgroundOpacity > 0 ? `<circle cx="${le + 19}" cy="${N + 17}" r="11" fill="${a}" fill-opacity="${t.iconBackgroundOpacity}" />` : ""}
16556
16556
  ${h ? `<image href="${h}" x="${le + 8}" y="${N + 6}" width="${u}" height="${p}" preserveAspectRatio="xMidYMid meet" />` : g ? "" : `<circle cx="${le + 19}" cy="${N + 17}" r="8" fill="${i}" />`}
16557
- ${g ? `<text x="${F}" y="${y}" fill="${v}" font-size="${f}" font-weight="${this.escapeXmlAttribute(String(w))}" dominant-baseline="middle">${this.escapeXmlText(g)}</text>` : ""}
16557
+ ${g ? `<text x="${F}" y="${y}" fill="${v}" font-size="${f}" font-weight="${this.escapeXmlAttribute(String(x))}" dominant-baseline="middle">${this.escapeXmlText(g)}</text>` : ""}
16558
16558
  `, q = t.showAnchor === !1 ? "" : `
16559
16559
  <circle cx="${ae}" cy="${fe}" r="7" fill="${o}" fill-opacity="0.92" />
16560
16560
  <circle cx="${ae}" cy="${fe}" r="10" fill="none" stroke="${r}" stroke-width="2" stroke-opacity="0.9" />
@@ -18745,7 +18745,7 @@ class Qc {
18745
18745
  this.emit("progress", this.createProgress(i, "diff", r.processed, o, "正在计算新增构件…")), v = 0;
18746
18746
  for (const [m, b] of c)
18747
18747
  this.throwIfCancelled(i), a.has(m) || h.push(b), r.processed += 1, v += 1, v >= t.batchSize && (v = 0, this.emit("progress", this.createProgress(i, "diff", r.processed, o, "正在计算新增构件…")), await this.yieldToBrowser());
18748
- const w = {
18748
+ const x = {
18749
18749
  runId: i.id,
18750
18750
  addedIds: h.map((m) => this.toComparisonRef(m)),
18751
18751
  removedIds: u.map((m) => this.toComparisonRef(m)),
@@ -18766,7 +18766,7 @@ class Qc {
18766
18766
  boxUnavailable: g.size
18767
18767
  }
18768
18768
  };
18769
- return this.emit("progress", this.createProgress(i, "completed", o, o, "模型对比完成")), w;
18769
+ return this.emit("progress", this.createProgress(i, "completed", o, o, "模型对比完成")), x;
18770
18770
  }
18771
18771
  /** 按 GUID 建立数值包围盒快照;原始节点 ID 仅保留给后续改色和定位。 */
18772
18772
  async createSnapshot(e, t, i, n, s) {
@@ -18779,16 +18779,16 @@ class Qc {
18779
18779
  continue;
18780
18780
  const p = i.getModelKey(h, c, t);
18781
18781
  let g = 0, f = 0;
18782
- for (const [v, w] of u) {
18782
+ for (const [v, x] of u) {
18783
18783
  this.throwIfCancelled(n);
18784
- const m = typeof w?.guid == "string" ? w.guid : "", b = `${p}::${m}`;
18784
+ const m = typeof x?.guid == "string" ? x.guid : "", b = `${p}::${m}`;
18785
18785
  m ? o.has(b) ? f += 1 : o.set(b, {
18786
18786
  key: b,
18787
18787
  modelKey: p,
18788
18788
  modelUrl: String(h?.url ?? ""),
18789
18789
  nodeId: v,
18790
18790
  guid: m,
18791
- box: this.extractBox(w)
18791
+ box: this.extractBox(x)
18792
18792
  }) : g += 1, s.processed += 1, r += 1, r >= i.batchSize && (r = 0, this.emit("progress", this.createProgress(n, "snapshot", s.processed, s.total, `正在扫描${t === "baseline" ? "基准" : "目标"}模型构件…`, t)), await this.yieldToBrowser());
18793
18793
  }
18794
18794
  (g > 0 || f > 0) && console.warn("[ModelComparison] GUID 快照存在不可比较节点", {
@@ -20116,14 +20116,14 @@ class sh {
20116
20116
  const g = String(s[p[0]] ?? ""), f = String(o[p[1]] ?? ""), v = String(r[p[2]] ?? "");
20117
20117
  if (g !== "基础信息" || f !== "解单信息")
20118
20118
  return;
20119
- let w = [];
20119
+ let x = [];
20120
20120
  try {
20121
20121
  const m = JSON.parse(v);
20122
- w = Array.isArray(m) ? m : [];
20122
+ x = Array.isArray(m) ? m : [];
20123
20123
  } catch {
20124
- w = [];
20124
+ x = [];
20125
20125
  }
20126
- w.forEach((m) => {
20126
+ x.forEach((m) => {
20127
20127
  const b = String(m?.code ?? "").trim();
20128
20128
  if (b.length !== 0) {
20129
20129
  if (b.length > 12) {
@@ -20568,9 +20568,9 @@ class ah {
20568
20568
  const s = this.createIconButton("×", "关闭路径绘制", () => this.close());
20569
20569
  t.append(i, n, s), e.appendChild(t), this.statusElement = n;
20570
20570
  const o = document.createElement("div");
20571
- Object.assign(o.style, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: "4px", padding: "8px" }), ["bezier", "straight", "rounded"].forEach((w) => {
20572
- const m = this.createIconButton(rh[w], oh[w], () => this.setLineType(w));
20573
- m.dataset.lineType = w, m.style.width = "100%", m.style.fontSize = "18px", o.appendChild(m);
20571
+ Object.assign(o.style, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: "4px", padding: "8px" }), ["bezier", "straight", "rounded"].forEach((x) => {
20572
+ const m = this.createIconButton(rh[x], oh[x], () => this.setLineType(x));
20573
+ m.dataset.lineType = x, m.style.width = "100%", m.style.fontSize = "18px", o.appendChild(m);
20574
20574
  }), e.appendChild(o);
20575
20575
  const r = document.createElement("label");
20576
20576
  r.dataset.radiusRow = "true", Object.assign(r.style, { display: "none", alignItems: "center", gap: "8px", padding: "0 10px 8px", color: "#475569" });
@@ -20578,12 +20578,12 @@ class ah {
20578
20578
  a.textContent = "圆角";
20579
20579
  const c = document.createElement("input");
20580
20580
  c.type = "number", c.min = "0", c.step = "0.1", Object.assign(c.style, { flex: "1", minWidth: "0", height: "26px", padding: "0 7px", color: "#111827", background: "#ffffff", border: "1px solid #cbd5e1", borderRadius: "4px" }), c.addEventListener("change", () => {
20581
- const w = Number(c.value);
20582
- if (!Number.isFinite(w) || w < 0 || w === this.roundedRadius) {
20581
+ const x = Number(c.value);
20582
+ if (!Number.isFinite(x) || x < 0 || x === this.roundedRadius) {
20583
20583
  c.value = String(this.roundedRadius);
20584
20584
  return;
20585
20585
  }
20586
- this.saveHistory(), this.roundedRadius = w, this.refreshAll(), this.emitChange();
20586
+ this.saveHistory(), this.roundedRadius = x, this.refreshAll(), this.emitChange();
20587
20587
  }), r.append(a, c), e.appendChild(r), this.radiusInput = c;
20588
20588
  const h = document.createElement("div");
20589
20589
  Object.assign(h.style, { flex: "1", minHeight: "72px", maxHeight: "200px", overflowY: "auto", overflowX: "hidden", borderTop: "1px solid #e5e7eb" }), e.appendChild(h), this.pointsList = h;