endset_three_editor 0.9.7 → 0.9.8

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.
@@ -533,20 +533,20 @@ class vo extends wn {
533
533
  const i = new Lo();
534
534
  this._plane = i, n.add(i);
535
535
  const o = this;
536
- function a(w, m) {
537
- let v = m;
538
- Object.defineProperty(o, w, {
536
+ function a(I, h) {
537
+ let w = h;
538
+ Object.defineProperty(o, I, {
539
539
  get: function() {
540
- return v !== void 0 ? v : m;
540
+ return w !== void 0 ? w : h;
541
541
  },
542
- set: function(D) {
543
- v !== D && (v = D, i[w] = D, s[w] = D, o.dispatchEvent({ type: w + "-changed", value: D }), o.dispatchEvent(cs));
542
+ set: function(E) {
543
+ w !== E && (w = E, i[I] = E, s[I] = E, o.dispatchEvent({ type: I + "-changed", value: E }), o.dispatchEvent(cs));
544
544
  }
545
- }), o[w] = m, i[w] = m, s[w] = m;
545
+ }), o[I] = h, i[I] = h, s[I] = h;
546
546
  }
547
547
  a("camera", e), a("object", void 0), a("enabled", !0), a("axis", null), a("mode", "translate"), a("translationSnap", null), a("rotationSnap", null), a("scaleSnap", null), a("space", "world"), a("size", 1), a("dragging", !1), a("showX", !0), a("showY", !0), a("showZ", !0), a("showXY", !0), a("showYZ", !0), a("showXZ", !0), a("minX", -1 / 0), a("maxX", 1 / 0), a("minY", -1 / 0), a("maxY", 1 / 0), a("minZ", -1 / 0), a("maxZ", 1 / 0);
548
- const l = new R(), c = new R(), d = new pe(), u = new pe(), A = new R(), p = new pe(), g = new R(), f = new R(), h = new R(), y = 0, C = new R();
549
- a("worldPosition", l), a("worldPositionStart", c), a("worldQuaternion", d), a("worldQuaternionStart", u), a("cameraPosition", A), a("cameraQuaternion", p), a("pointStart", g), a("pointEnd", f), a("rotationAxis", h), a("rotationAngle", y), a("eye", C), this._offset = new R(), this._startNorm = new R(), this._endNorm = new R(), this._cameraScale = new R(), this._parentPosition = new R(), this._parentQuaternion = new pe(), this._parentQuaternionInv = new pe(), this._parentScale = new R(), this._worldScaleStart = new R(), this._worldQuaternionInv = new pe(), this._worldScale = new R(), this._positionStart = new R(), this._quaternionStart = new pe(), this._scaleStart = new R(), this._getPointer = To.bind(this), this._onPointerDown = Do.bind(this), this._onPointerHover = Eo.bind(this), this._onPointerMove = Po.bind(this), this._onPointerUp = Ro.bind(this), t !== null && this.connect(t);
548
+ const l = new R(), c = new R(), d = new pe(), u = new pe(), A = new R(), p = new pe(), g = new R(), f = new R(), m = new R(), y = 0, v = new R();
549
+ a("worldPosition", l), a("worldPositionStart", c), a("worldQuaternion", d), a("worldQuaternionStart", u), a("cameraPosition", A), a("cameraQuaternion", p), a("pointStart", g), a("pointEnd", f), a("rotationAxis", m), a("rotationAngle", y), a("eye", v), this._offset = new R(), this._startNorm = new R(), this._endNorm = new R(), this._cameraScale = new R(), this._parentPosition = new R(), this._parentQuaternion = new pe(), this._parentQuaternionInv = new pe(), this._parentScale = new R(), this._worldScaleStart = new R(), this._worldQuaternionInv = new pe(), this._worldScale = new R(), this._positionStart = new R(), this._quaternionStart = new pe(), this._scaleStart = new R(), this._getPointer = To.bind(this), this._onPointerDown = Do.bind(this), this._onPointerHover = Eo.bind(this), this._onPointerMove = Po.bind(this), this._onPointerUp = Ro.bind(this), t !== null && this.connect(t);
550
550
  }
551
551
  connect(e) {
552
552
  super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp), this.domElement.style.touchAction = "none";
@@ -815,35 +815,35 @@ class So extends dt {
815
815
  };
816
816
  const f = new me(0, 0.04, 0.1, 12);
817
817
  f.translate(0, 0.05, 0);
818
- const h = new fe(0.08, 0.08, 0.08);
819
- h.translate(0, 0.04, 0);
818
+ const m = new fe(0.08, 0.08, 0.08);
819
+ m.translate(0, 0.04, 0);
820
820
  const y = new et();
821
821
  y.setAttribute("position", new Se([0, 0, 0, 1, 0, 0], 3));
822
- const C = new me(75e-4, 75e-4, 0.5, 3);
823
- C.translate(0, 0.25, 0);
824
- function w(L, Q) {
822
+ const v = new me(75e-4, 75e-4, 0.5, 3);
823
+ v.translate(0, 0.25, 0);
824
+ function I(L, Q) {
825
825
  const ee = new ht(L, 75e-4, 3, 64, Q * Math.PI * 2);
826
826
  return ee.rotateY(Math.PI / 2), ee.rotateX(Math.PI / 2), ee;
827
827
  }
828
- function m() {
828
+ function h() {
829
829
  const L = new et();
830
830
  return L.setAttribute("position", new Se([0, 0, 0, 1, 1, 1], 3)), L;
831
831
  }
832
- const v = {
832
+ const w = {
833
833
  X: [
834
834
  [new S(f, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
835
835
  [new S(f, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]],
836
- [new S(C, i), [0, 0, 0], [0, 0, -Math.PI / 2]]
836
+ [new S(v, i), [0, 0, 0], [0, 0, -Math.PI / 2]]
837
837
  ],
838
838
  Y: [
839
839
  [new S(f, o), [0, 0.5, 0]],
840
840
  [new S(f, o), [0, -0.5, 0], [Math.PI, 0, 0]],
841
- [new S(C, o)]
841
+ [new S(v, o)]
842
842
  ],
843
843
  Z: [
844
844
  [new S(f, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
845
845
  [new S(f, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]],
846
- [new S(C, a), null, [Math.PI / 2, 0, 0]]
846
+ [new S(v, a), null, [Math.PI / 2, 0, 0]]
847
847
  ],
848
848
  XYZ: [
849
849
  [new S(new Lt(0.1, 0), u), [0, 0, 0]]
@@ -857,7 +857,7 @@ class So extends dt {
857
857
  XZ: [
858
858
  [new S(new fe(0.15, 0.15, 0.01), c), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
859
859
  ]
860
- }, D = {
860
+ }, E = {
861
861
  X: [
862
862
  [new S(new me(0.2, 0, 0.6, 4), n), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
863
863
  [new S(new me(0.2, 0, 0.6, 4), n), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
@@ -890,7 +890,7 @@ class So extends dt {
890
890
  [new S(new Lt(0.01, 2), s), null, null, null, "helper"]
891
891
  ],
892
892
  DELTA: [
893
- [new je(m(), s), null, null, null, "helper"]
893
+ [new je(h(), s), null, null, null, "helper"]
894
894
  ],
895
895
  X: [
896
896
  [new je(y, s), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
@@ -903,25 +903,25 @@ class So extends dt {
903
903
  ]
904
904
  }, H = {
905
905
  XYZE: [
906
- [new S(w(0.5, 1), g), null, [0, Math.PI / 2, 0]]
906
+ [new S(I(0.5, 1), g), null, [0, Math.PI / 2, 0]]
907
907
  ],
908
908
  X: [
909
- [new S(w(0.5, 0.5), i)]
909
+ [new S(I(0.5, 0.5), i)]
910
910
  ],
911
911
  Y: [
912
- [new S(w(0.5, 0.5), o), null, [0, 0, -Math.PI / 2]]
912
+ [new S(I(0.5, 0.5), o), null, [0, 0, -Math.PI / 2]]
913
913
  ],
914
914
  Z: [
915
- [new S(w(0.5, 0.5), a), null, [0, Math.PI / 2, 0]]
915
+ [new S(I(0.5, 0.5), a), null, [0, Math.PI / 2, 0]]
916
916
  ],
917
917
  E: [
918
- [new S(w(0.75, 1), A), null, [0, Math.PI / 2, 0]]
918
+ [new S(I(0.75, 1), A), null, [0, Math.PI / 2, 0]]
919
919
  ]
920
920
  }, ne = {
921
921
  AXIS: [
922
922
  [new je(y, s), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
923
923
  ]
924
- }, k = {
924
+ }, j = {
925
925
  XYZE: [
926
926
  [new S(new Pi(0.25, 10, 8), n)]
927
927
  ],
@@ -939,19 +939,19 @@ class So extends dt {
939
939
  ]
940
940
  }, J = {
941
941
  X: [
942
- [new S(h, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
943
- [new S(C, i), [0, 0, 0], [0, 0, -Math.PI / 2]],
944
- [new S(h, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]]
942
+ [new S(m, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
943
+ [new S(v, i), [0, 0, 0], [0, 0, -Math.PI / 2]],
944
+ [new S(m, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]]
945
945
  ],
946
946
  Y: [
947
- [new S(h, o), [0, 0.5, 0]],
948
- [new S(C, o)],
949
- [new S(h, o), [0, -0.5, 0], [0, 0, Math.PI]]
947
+ [new S(m, o), [0, 0.5, 0]],
948
+ [new S(v, o)],
949
+ [new S(m, o), [0, -0.5, 0], [0, 0, Math.PI]]
950
950
  ],
951
951
  Z: [
952
- [new S(h, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
953
- [new S(C, a), [0, 0, 0], [Math.PI / 2, 0, 0]],
954
- [new S(h, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]]
952
+ [new S(m, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
953
+ [new S(v, a), [0, 0, 0], [Math.PI / 2, 0, 0]],
954
+ [new S(m, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]]
955
955
  ],
956
956
  XY: [
957
957
  [new S(new fe(0.15, 0.15, 0.01), d), [0.15, 0.15, 0]]
@@ -1012,7 +1012,7 @@ class So extends dt {
1012
1012
  }
1013
1013
  return Q;
1014
1014
  }
1015
- this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = z(v)), this.add(this.gizmo.rotate = z(H)), this.add(this.gizmo.scale = z(J)), this.add(this.picker.translate = z(D)), this.add(this.picker.rotate = z(k)), this.add(this.picker.scale = z(K)), this.add(this.helper.translate = z(M)), this.add(this.helper.rotate = z(ne)), this.add(this.helper.scale = z(Z)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
1015
+ this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = z(w)), this.add(this.gizmo.rotate = z(H)), this.add(this.gizmo.scale = z(J)), this.add(this.picker.translate = z(E)), this.add(this.picker.rotate = z(j)), this.add(this.picker.scale = z(K)), this.add(this.helper.translate = z(M)), this.add(this.helper.rotate = z(ne)), this.add(this.helper.scale = z(Z)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
1016
1016
  }
1017
1017
  // updateMatrixWorld will update transformations and appearance of individual handles
1018
1018
  updateMatrixWorld(e) {
@@ -1615,44 +1615,44 @@ class Xo {
1615
1615
  };
1616
1616
  function c(g) {
1617
1617
  g.isCSS2DObject && (g.element.style.display = "none");
1618
- for (let f = 0, h = g.children.length; f < h; f++)
1618
+ for (let f = 0, m = g.children.length; f < m; f++)
1619
1619
  c(g.children[f]);
1620
1620
  }
1621
- function d(g, f, h) {
1621
+ function d(g, f, m) {
1622
1622
  if (g.visible === !1) {
1623
1623
  c(g);
1624
1624
  return;
1625
1625
  }
1626
1626
  if (g.isCSS2DObject) {
1627
1627
  it.setFromMatrixPosition(g.matrixWorld), it.applyMatrix4(on);
1628
- const y = it.z >= -1 && it.z <= 1 && g.layers.test(h.layers) === !0, C = g.element;
1629
- C.style.display = y === !0 ? "" : "none", y === !0 && (g.onBeforeRender(t, f, h), C.style.transform = "translate(" + -100 * g.center.x + "%," + -100 * g.center.y + "%)translate(" + (it.x * i + i) + "px," + (-it.y * o + o) + "px)", C.parentNode !== l && l.appendChild(C), g.onAfterRender(t, f, h));
1630
- const w = {
1631
- distanceToCameraSquared: u(h, g)
1628
+ const y = it.z >= -1 && it.z <= 1 && g.layers.test(m.layers) === !0, v = g.element;
1629
+ v.style.display = y === !0 ? "" : "none", y === !0 && (g.onBeforeRender(t, f, m), v.style.transform = "translate(" + -100 * g.center.x + "%," + -100 * g.center.y + "%)translate(" + (it.x * i + i) + "px," + (-it.y * o + o) + "px)", v.parentNode !== l && l.appendChild(v), g.onAfterRender(t, f, m));
1630
+ const I = {
1631
+ distanceToCameraSquared: u(m, g)
1632
1632
  };
1633
- a.objects.set(g, w);
1633
+ a.objects.set(g, I);
1634
1634
  }
1635
- for (let y = 0, C = g.children.length; y < C; y++)
1636
- d(g.children[y], f, h);
1635
+ for (let y = 0, v = g.children.length; y < v; y++)
1636
+ d(g.children[y], f, m);
1637
1637
  }
1638
1638
  function u(g, f) {
1639
1639
  return rn.setFromMatrixPosition(g.matrixWorld), an.setFromMatrixPosition(f.matrixWorld), rn.distanceToSquared(an);
1640
1640
  }
1641
1641
  function A(g) {
1642
1642
  const f = [];
1643
- return g.traverseVisible(function(h) {
1644
- h.isCSS2DObject && f.push(h);
1643
+ return g.traverseVisible(function(m) {
1644
+ m.isCSS2DObject && f.push(m);
1645
1645
  }), f;
1646
1646
  }
1647
1647
  function p(g) {
1648
- const f = A(g).sort(function(y, C) {
1649
- if (y.renderOrder !== C.renderOrder)
1650
- return C.renderOrder - y.renderOrder;
1651
- const w = a.objects.get(y).distanceToCameraSquared, m = a.objects.get(C).distanceToCameraSquared;
1652
- return w - m;
1653
- }), h = f.length;
1654
- for (let y = 0, C = f.length; y < C; y++)
1655
- f[y].element.style.zIndex = h - y;
1648
+ const f = A(g).sort(function(y, v) {
1649
+ if (y.renderOrder !== v.renderOrder)
1650
+ return v.renderOrder - y.renderOrder;
1651
+ const I = a.objects.get(y).distanceToCameraSquared, h = a.objects.get(v).distanceToCameraSquared;
1652
+ return I - h;
1653
+ }), m = f.length;
1654
+ for (let y = 0, v = f.length; y < v; y++)
1655
+ f[y].element.style.zIndex = m - y;
1656
1656
  }
1657
1657
  }
1658
1658
  }
@@ -1928,7 +1928,7 @@ let ie = null;
1928
1928
  function $o(r) {
1929
1929
  return ie ? (ie.domElement.parentNode !== r && r.appendChild(ie.domElement), ie) : (ie = new Xo(), ie.setSize(r.clientWidth, r.clientHeight), ie.domElement.style.position = "absolute", ie.domElement.style.top = "0", ie.domElement.style.left = "0", ie.domElement.style.pointerEvents = "none", r.appendChild(ie.domElement), ie);
1930
1930
  }
1931
- function mu() {
1931
+ function Au() {
1932
1932
  return ie;
1933
1933
  }
1934
1934
  function er(r, e) {
@@ -2245,21 +2245,21 @@ class fr {
2245
2245
  A.readAsArrayBuffer(c), A.onloadend = function() {
2246
2246
  const p = hs(A.result), g = new DataView(new ArrayBuffer(dn));
2247
2247
  g.setUint32(0, p.byteLength, !0), g.setUint32(4, lr, !0);
2248
- const f = hs(cr(JSON.stringify(o)), 32), h = new DataView(new ArrayBuffer(dn));
2249
- h.setUint32(0, f.byteLength, !0), h.setUint32(4, ar, !0);
2250
- const y = new ArrayBuffer(un), C = new DataView(y);
2251
- C.setUint32(0, or, !0), C.setUint32(4, rr, !0);
2252
- const w = un + h.byteLength + f.byteLength + g.byteLength + p.byteLength;
2253
- C.setUint32(8, w, !0);
2254
- const m = new Blob([
2248
+ const f = hs(cr(JSON.stringify(o)), 32), m = new DataView(new ArrayBuffer(dn));
2249
+ m.setUint32(0, f.byteLength, !0), m.setUint32(4, ar, !0);
2250
+ const y = new ArrayBuffer(un), v = new DataView(y);
2251
+ v.setUint32(0, or, !0), v.setUint32(4, rr, !0);
2252
+ const I = un + m.byteLength + f.byteLength + g.byteLength + p.byteLength;
2253
+ v.setUint32(8, I, !0);
2254
+ const h = new Blob([
2255
2255
  y,
2256
- h,
2256
+ m,
2257
2257
  f,
2258
2258
  g,
2259
2259
  p
2260
- ], { type: "application/octet-stream" }), v = new FileReader();
2261
- v.readAsArrayBuffer(m), v.onloadend = function() {
2262
- t(v.result);
2260
+ ], { type: "application/octet-stream" }), w = new FileReader();
2261
+ w.readAsArrayBuffer(h), w.onloadend = function() {
2262
+ t(w.result);
2263
2263
  };
2264
2264
  };
2265
2265
  } else if (o.buffers && o.buffers.length > 0) {
@@ -2425,8 +2425,8 @@ class fr {
2425
2425
  let u = 0;
2426
2426
  for (let g = n; g < n + s; g++) {
2427
2427
  for (let f = 0; f < e.itemSize; f++) {
2428
- let h;
2429
- e.itemSize > 4 ? h = e.array[g * e.itemSize + f] : (f === 0 ? h = e.getX(g) : f === 1 ? h = e.getY(g) : f === 2 ? h = e.getZ(g) : f === 3 && (h = e.getW(g)), e.normalized === !0 && (h = Tt.normalize(h, e.array))), t === X.FLOAT ? d.setFloat32(u, h, !0) : t === X.INT ? d.setInt32(u, h, !0) : t === X.UNSIGNED_INT ? d.setUint32(u, h, !0) : t === X.SHORT ? d.setInt16(u, h, !0) : t === X.UNSIGNED_SHORT ? d.setUint16(u, h, !0) : t === X.BYTE ? d.setInt8(u, h) : t === X.UNSIGNED_BYTE && d.setUint8(u, h), u += a;
2428
+ let m;
2429
+ e.itemSize > 4 ? m = e.array[g * e.itemSize + f] : (f === 0 ? m = e.getX(g) : f === 1 ? m = e.getY(g) : f === 2 ? m = e.getZ(g) : f === 3 && (m = e.getW(g)), e.normalized === !0 && (m = Tt.normalize(m, e.array))), t === X.FLOAT ? d.setFloat32(u, m, !0) : t === X.INT ? d.setInt32(u, m, !0) : t === X.UNSIGNED_INT ? d.setUint32(u, m, !0) : t === X.SHORT ? d.setInt16(u, m, !0) : t === X.UNSIGNED_SHORT ? d.setUint16(u, m, !0) : t === X.BYTE ? d.setInt8(u, m) : t === X.UNSIGNED_BYTE && d.setUint8(u, m), u += a;
2430
2430
  }
2431
2431
  u % l !== 0 && (u += l - u % l);
2432
2432
  }
@@ -2530,17 +2530,17 @@ class fr {
2530
2530
  });
2531
2531
  if (n === !0 && (g.translate(0, p.height), g.scale(1, -1)), e.data !== void 0) {
2532
2532
  t !== Vi && console.error("GLTFExporter: Only RGBAFormat is supported.", t), (e.width > l.maxTextureSize || e.height > l.maxTextureSize) && console.warn("GLTFExporter: Image size is bigger than maxTextureSize", e);
2533
- const h = new Uint8ClampedArray(e.height * e.width * 4);
2534
- for (let y = 0; y < h.length; y += 4)
2535
- h[y + 0] = e.data[y + 0], h[y + 1] = e.data[y + 1], h[y + 2] = e.data[y + 2], h[y + 3] = e.data[y + 3];
2536
- g.putImageData(new ImageData(h, e.width, e.height), 0, 0);
2533
+ const m = new Uint8ClampedArray(e.height * e.width * 4);
2534
+ for (let y = 0; y < m.length; y += 4)
2535
+ m[y + 0] = e.data[y + 0], m[y + 1] = e.data[y + 1], m[y + 2] = e.data[y + 2], m[y + 3] = e.data[y + 3];
2536
+ g.putImageData(new ImageData(m, e.width, e.height), 0, 0);
2537
2537
  } else if (typeof HTMLImageElement < "u" && e instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap || typeof OffscreenCanvas < "u" && e instanceof OffscreenCanvas)
2538
2538
  g.drawImage(e, 0, 0, p.width, p.height);
2539
2539
  else
2540
2540
  throw new Error("THREE.GLTFExporter: Invalid image type. Use HTMLImageElement, HTMLCanvasElement, ImageBitmap or OffscreenCanvas.");
2541
2541
  l.binary === !0 ? c.push(
2542
- hr(p, s).then((h) => i.processBufferViewImage(h)).then((h) => {
2543
- A.bufferView = h;
2542
+ hr(p, s).then((m) => i.processBufferViewImage(m)).then((m) => {
2543
+ A.bufferView = m;
2544
2544
  })
2545
2545
  ) : A.uri = Yi.getDataURL(p, s);
2546
2546
  const f = a.images.push(A) - 1;
@@ -2650,8 +2650,8 @@ class fr {
2650
2650
  async processMeshAsync(e) {
2651
2651
  const t = this.cache, n = this.json, s = [e.geometry.uuid];
2652
2652
  if (Array.isArray(e.material))
2653
- for (let m = 0, v = e.material.length; m < v; m++)
2654
- s.push(e.material[m].uuid);
2653
+ for (let h = 0, w = e.material.length; h < w; h++)
2654
+ s.push(e.material[h].uuid);
2655
2655
  else
2656
2656
  s.push(e.material.uuid);
2657
2657
  const i = s.join(":");
@@ -2670,34 +2670,34 @@ class fr {
2670
2670
  }, p = o.getAttribute("normal");
2671
2671
  p !== void 0 && !this.isNormalizedNormalAttribute(p) && (console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."), o.setAttribute("normal", this.createNormalizedNormalAttribute(p)));
2672
2672
  let g = null;
2673
- for (let m in o.attributes) {
2674
- if (m.slice(0, 5) === "morph") continue;
2675
- const v = o.attributes[m];
2676
- if (m = A[m] || m.toUpperCase(), !/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(m) && !m.startsWith("_") && (m = "_" + m), t.attributes.has(this.getUID(v))) {
2677
- c[m] = t.attributes.get(this.getUID(v));
2673
+ for (let h in o.attributes) {
2674
+ if (h.slice(0, 5) === "morph") continue;
2675
+ const w = o.attributes[h];
2676
+ if (h = A[h] || h.toUpperCase(), !/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(h) && !h.startsWith("_") && (h = "_" + h), t.attributes.has(this.getUID(w))) {
2677
+ c[h] = t.attributes.get(this.getUID(w));
2678
2678
  continue;
2679
2679
  }
2680
2680
  g = null;
2681
- const M = v.array;
2682
- m === "JOINTS_0" && !(M instanceof Uint16Array) && !(M instanceof Uint8Array) ? (console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'), g = wt.Utils.toTypedBufferAttribute(v, Uint16Array)) : (M instanceof Uint32Array || M instanceof Int32Array) && !m.startsWith("_") && (console.warn(`GLTFExporter: Attribute "${m}" converted to type FLOAT.`), g = wt.Utils.toTypedBufferAttribute(v, Float32Array));
2683
- const H = this.processAccessor(g || v, o);
2684
- H !== null && (m.startsWith("_") || this.detectMeshQuantization(m, v), c[m] = H, t.attributes.set(this.getUID(v), H));
2681
+ const M = w.array;
2682
+ h === "JOINTS_0" && !(M instanceof Uint16Array) && !(M instanceof Uint8Array) ? (console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'), g = wt.Utils.toTypedBufferAttribute(w, Uint16Array)) : (M instanceof Uint32Array || M instanceof Int32Array) && !h.startsWith("_") && (console.warn(`GLTFExporter: Attribute "${h}" converted to type FLOAT.`), g = wt.Utils.toTypedBufferAttribute(w, Float32Array));
2683
+ const H = this.processAccessor(g || w, o);
2684
+ H !== null && (h.startsWith("_") || this.detectMeshQuantization(h, w), c[h] = H, t.attributes.set(this.getUID(w), H));
2685
2685
  }
2686
2686
  if (p !== void 0 && o.setAttribute("normal", p), Object.keys(c).length === 0) return null;
2687
2687
  if (e.morphTargetInfluences !== void 0 && e.morphTargetInfluences.length > 0) {
2688
- const m = [], v = [], D = {};
2688
+ const h = [], w = [], E = {};
2689
2689
  if (e.morphTargetDictionary !== void 0)
2690
2690
  for (const M in e.morphTargetDictionary)
2691
- D[e.morphTargetDictionary[M]] = M;
2691
+ E[e.morphTargetDictionary[M]] = M;
2692
2692
  for (let M = 0; M < e.morphTargetInfluences.length; ++M) {
2693
2693
  const H = {};
2694
2694
  let ne = !1;
2695
- for (const k in o.morphAttributes) {
2696
- if (k !== "position" && k !== "normal") {
2695
+ for (const j in o.morphAttributes) {
2696
+ if (j !== "position" && j !== "normal") {
2697
2697
  ne || (console.warn("GLTFExporter: Only POSITION and NORMAL morph are supported."), ne = !0);
2698
2698
  continue;
2699
2699
  }
2700
- const J = o.morphAttributes[k][M], K = k.toUpperCase(), Z = o.attributes[k];
2700
+ const J = o.morphAttributes[j][M], K = j.toUpperCase(), Z = o.attributes[j];
2701
2701
  if (t.attributes.has(this.getUID(J, !0))) {
2702
2702
  H[K] = t.attributes.get(this.getUID(J, !0));
2703
2703
  continue;
@@ -2709,37 +2709,37 @@ class fr {
2709
2709
  ee === 0 && z.setX(L, J.getX(L) - Z.getX(L)), ee === 1 && z.setY(L, J.getY(L) - Z.getY(L)), ee === 2 && z.setZ(L, J.getZ(L) - Z.getZ(L)), ee === 3 && z.setW(L, J.getW(L) - Z.getW(L));
2710
2710
  H[K] = this.processAccessor(z, o), t.attributes.set(this.getUID(Z, !0), H[K]);
2711
2711
  }
2712
- u.push(H), m.push(e.morphTargetInfluences[M]), e.morphTargetDictionary !== void 0 && v.push(D[M]);
2712
+ u.push(H), h.push(e.morphTargetInfluences[M]), e.morphTargetDictionary !== void 0 && w.push(E[M]);
2713
2713
  }
2714
- l.weights = m, v.length > 0 && (l.extras = {}, l.extras.targetNames = v);
2714
+ l.weights = h, w.length > 0 && (l.extras = {}, l.extras.targetNames = w);
2715
2715
  }
2716
2716
  const f = Array.isArray(e.material);
2717
2717
  if (f && o.groups.length === 0) return null;
2718
- let h = !1;
2718
+ let m = !1;
2719
2719
  if (f && o.index === null) {
2720
- const m = [];
2721
- for (let v = 0, D = o.attributes.position.count; v < D; v++)
2722
- m[v] = v;
2723
- o.setIndex(m), h = !0;
2724
- }
2725
- const y = f ? e.material : [e.material], C = f ? o.groups : [{ materialIndex: 0, start: void 0, count: void 0 }];
2726
- for (let m = 0, v = C.length; m < v; m++) {
2727
- const D = {
2720
+ const h = [];
2721
+ for (let w = 0, E = o.attributes.position.count; w < E; w++)
2722
+ h[w] = w;
2723
+ o.setIndex(h), m = !0;
2724
+ }
2725
+ const y = f ? e.material : [e.material], v = f ? o.groups : [{ materialIndex: 0, start: void 0, count: void 0 }];
2726
+ for (let h = 0, w = v.length; h < w; h++) {
2727
+ const E = {
2728
2728
  mode: a,
2729
2729
  attributes: c
2730
2730
  };
2731
- if (this.serializeUserData(o, D), u.length > 0 && (D.targets = u), o.index !== null) {
2731
+ if (this.serializeUserData(o, E), u.length > 0 && (E.targets = u), o.index !== null) {
2732
2732
  let H = this.getUID(o.index);
2733
- (C[m].start !== void 0 || C[m].count !== void 0) && (H += ":" + C[m].start + ":" + C[m].count), t.attributes.has(H) ? D.indices = t.attributes.get(H) : (D.indices = this.processAccessor(o.index, o, C[m].start, C[m].count), t.attributes.set(H, D.indices)), D.indices === null && delete D.indices;
2733
+ (v[h].start !== void 0 || v[h].count !== void 0) && (H += ":" + v[h].start + ":" + v[h].count), t.attributes.has(H) ? E.indices = t.attributes.get(H) : (E.indices = this.processAccessor(o.index, o, v[h].start, v[h].count), t.attributes.set(H, E.indices)), E.indices === null && delete E.indices;
2734
2734
  }
2735
- const M = await this.processMaterialAsync(y[C[m].materialIndex]);
2736
- M !== null && (D.material = M), d.push(D);
2735
+ const M = await this.processMaterialAsync(y[v[h].materialIndex]);
2736
+ M !== null && (E.material = M), d.push(E);
2737
2737
  }
2738
- h === !0 && o.setIndex(null), l.primitives = d, n.meshes || (n.meshes = []), await this._invokeAllAsync(function(m) {
2739
- m.writeMesh && m.writeMesh(e, l);
2738
+ m === !0 && o.setIndex(null), l.primitives = d, n.meshes || (n.meshes = []), await this._invokeAllAsync(function(h) {
2739
+ h.writeMesh && h.writeMesh(e, l);
2740
2740
  });
2741
- const w = n.meshes.push(l) - 1;
2742
- return t.meshes.set(i, w), w;
2741
+ const I = n.meshes.push(l) - 1;
2742
+ return t.meshes.set(i, I), I;
2743
2743
  }
2744
2744
  /**
2745
2745
  * If a vertex attribute with a
@@ -2823,11 +2823,11 @@ class fr {
2823
2823
  const g = 1;
2824
2824
  let f = d.values.length / d.times.length;
2825
2825
  p === cn.morphTargetInfluences && (f /= A.morphTargetInfluences.length);
2826
- let h;
2827
- d.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === !0 ? (h = "CUBICSPLINE", f /= 3) : d.getInterpolation() === Dn ? h = "STEP" : h = "LINEAR", a.push({
2826
+ let m;
2827
+ d.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === !0 ? (m = "CUBICSPLINE", f /= 3) : d.getInterpolation() === Dn ? m = "STEP" : m = "LINEAR", a.push({
2828
2828
  input: this.processAccessor(new we(d.times, g)),
2829
2829
  output: this.processAccessor(new we(d.values, f)),
2830
- interpolation: h
2830
+ interpolation: m
2831
2831
  }), o.push({
2832
2832
  sampler: a.length - 1,
2833
2833
  target: {
@@ -2920,11 +2920,11 @@ class fr {
2920
2920
  const g = [t.nodes.push(u) - 1];
2921
2921
  if (e.children.length > 0) {
2922
2922
  const f = [];
2923
- for (let h = 0, y = e.children.length; h < y; h++) {
2924
- const C = e.children[h];
2925
- if (C.visible || n.onlyVisible === !1) {
2926
- const w = await this.processNodeAsync(C);
2927
- w !== null && f.push(w);
2923
+ for (let m = 0, y = e.children.length; m < y; m++) {
2924
+ const v = e.children[m];
2925
+ if (v.visible || n.onlyVisible === !1) {
2926
+ const I = await this.processNodeAsync(v);
2927
+ I !== null && f.push(I);
2928
2928
  }
2929
2929
  }
2930
2930
  f.length > 0 && (u.children = f);
@@ -3907,15 +3907,15 @@ class Vr {
3907
3907
  return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(e)), Promise.all(a).then((c) => {
3908
3908
  const d = c.pop(), u = d.isGroup ? d.children : [d], A = c[0].count, p = [];
3909
3909
  for (const g of u) {
3910
- const f = new xe(), h = new R(), y = new pe(), C = new R(1, 1, 1), w = new _i(g.geometry, g.material, A);
3911
- for (let m = 0; m < A; m++)
3912
- l.TRANSLATION && h.fromBufferAttribute(l.TRANSLATION, m), l.ROTATION && y.fromBufferAttribute(l.ROTATION, m), l.SCALE && C.fromBufferAttribute(l.SCALE, m), w.setMatrixAt(m, f.compose(h, y, C));
3913
- for (const m in l)
3914
- if (m === "_COLOR_0") {
3915
- const v = l[m];
3916
- w.instanceColor = new $i(v.array, v.itemSize, v.normalized);
3917
- } else m !== "TRANSLATION" && m !== "ROTATION" && m !== "SCALE" && g.geometry.setAttribute(m, l[m]);
3918
- dt.prototype.copy.call(w, g), this.parser.assignFinalMaterial(w), p.push(w);
3910
+ const f = new xe(), m = new R(), y = new pe(), v = new R(1, 1, 1), I = new _i(g.geometry, g.material, A);
3911
+ for (let h = 0; h < A; h++)
3912
+ l.TRANSLATION && m.fromBufferAttribute(l.TRANSLATION, h), l.ROTATION && y.fromBufferAttribute(l.ROTATION, h), l.SCALE && v.fromBufferAttribute(l.SCALE, h), I.setMatrixAt(h, f.compose(m, y, v));
3913
+ for (const h in l)
3914
+ if (h === "_COLOR_0") {
3915
+ const w = l[h];
3916
+ I.instanceColor = new $i(w.array, w.itemSize, w.normalized);
3917
+ } else h !== "TRANSLATION" && h !== "ROTATION" && h !== "SCALE" && g.geometry.setAttribute(h, l[h]);
3918
+ dt.prototype.copy.call(I, g), this.parser.assignFinalMaterial(I), p.push(I);
3919
3919
  }
3920
3920
  return d.isGroup ? (d.clear(), d.add(...p), d) : p[0];
3921
3921
  }));
@@ -3976,8 +3976,8 @@ class Kr {
3976
3976
  return new Promise(function(u, A) {
3977
3977
  s.decodeDracoFile(d, function(p) {
3978
3978
  for (const g in p.attributes) {
3979
- const f = p.attributes[g], h = l[g];
3980
- h !== void 0 && (f.normalized = h);
3979
+ const f = p.attributes[g], m = l[g];
3980
+ m !== void 0 && (f.normalized = m);
3981
3981
  }
3982
3982
  u(p);
3983
3983
  }, a, c, He, A);
@@ -4009,10 +4009,10 @@ class Kn extends ro {
4009
4009
  return t;
4010
4010
  }
4011
4011
  interpolate_(e, t, n, s) {
4012
- const i = this.resultBuffer, o = this.sampleValues, a = this.valueSize, l = a * 2, c = a * 3, d = s - t, u = (n - t) / d, A = u * u, p = A * u, g = e * c, f = g - c, h = -2 * p + 3 * A, y = p - A, C = 1 - h, w = y - A + u;
4013
- for (let m = 0; m !== a; m++) {
4014
- const v = o[f + m + a], D = o[f + m + l] * d, M = o[g + m + a], H = o[g + m] * d;
4015
- i[m] = C * v + w * D + h * M + y * H;
4012
+ const i = this.resultBuffer, o = this.sampleValues, a = this.valueSize, l = a * 2, c = a * 3, d = s - t, u = (n - t) / d, A = u * u, p = A * u, g = e * c, f = g - c, m = -2 * p + 3 * A, y = p - A, v = 1 - m, I = y - A + u;
4013
+ for (let h = 0; h !== a; h++) {
4014
+ const w = o[f + h + a], E = o[f + h + l] * d, M = o[g + h + a], H = o[g + h] * d;
4015
+ i[h] = v * w + I * E + m * M + y * H;
4016
4016
  }
4017
4017
  return i;
4018
4018
  }
@@ -4438,23 +4438,23 @@ class ra {
4438
4438
  const i = [];
4439
4439
  return s.bufferView !== void 0 ? i.push(this.getDependency("bufferView", s.bufferView)) : i.push(null), s.sparse !== void 0 && (i.push(this.getDependency("bufferView", s.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", s.sparse.values.bufferView))), Promise.all(i).then(function(o) {
4440
4440
  const a = o[0], l = fs[s.type], c = ut[s.componentType], d = c.BYTES_PER_ELEMENT, u = d * l, A = s.byteOffset || 0, p = s.bufferView !== void 0 ? n.bufferViews[s.bufferView].byteStride : void 0, g = s.normalized === !0;
4441
- let f, h;
4441
+ let f, m;
4442
4442
  if (p && p !== u) {
4443
- const y = Math.floor(A / p), C = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + y + ":" + s.count;
4444
- let w = t.cache.get(C);
4445
- w || (f = new c(a, y * p, s.count * p / d), w = new Hn(f, p / d), t.cache.add(C, w)), h = new kn(w, l, A % p / d, g);
4443
+ const y = Math.floor(A / p), v = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + y + ":" + s.count;
4444
+ let I = t.cache.get(v);
4445
+ I || (f = new c(a, y * p, s.count * p / d), I = new Hn(f, p / d), t.cache.add(v, I)), m = new kn(I, l, A % p / d, g);
4446
4446
  } else
4447
- a === null ? f = new c(s.count * l) : f = new c(a, A, s.count * l), h = new we(f, l, g);
4447
+ a === null ? f = new c(s.count * l) : f = new c(a, A, s.count * l), m = new we(f, l, g);
4448
4448
  if (s.sparse !== void 0) {
4449
- const y = fs.SCALAR, C = ut[s.sparse.indices.componentType], w = s.sparse.indices.byteOffset || 0, m = s.sparse.values.byteOffset || 0, v = new C(o[1], w, s.sparse.count * y), D = new c(o[2], m, s.sparse.count * l);
4450
- a !== null && (h = new we(h.array.slice(), h.itemSize, h.normalized)), h.normalized = !1;
4451
- for (let M = 0, H = v.length; M < H; M++) {
4452
- const ne = v[M];
4453
- if (h.setX(ne, D[M * l]), l >= 2 && h.setY(ne, D[M * l + 1]), l >= 3 && h.setZ(ne, D[M * l + 2]), l >= 4 && h.setW(ne, D[M * l + 3]), l >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
4449
+ const y = fs.SCALAR, v = ut[s.sparse.indices.componentType], I = s.sparse.indices.byteOffset || 0, h = s.sparse.values.byteOffset || 0, w = new v(o[1], I, s.sparse.count * y), E = new c(o[2], h, s.sparse.count * l);
4450
+ a !== null && (m = new we(m.array.slice(), m.itemSize, m.normalized)), m.normalized = !1;
4451
+ for (let M = 0, H = w.length; M < H; M++) {
4452
+ const ne = w[M];
4453
+ if (m.setX(ne, E[M * l]), l >= 2 && m.setY(ne, E[M * l + 1]), l >= 3 && m.setZ(ne, E[M * l + 2]), l >= 4 && m.setW(ne, E[M * l + 3]), l >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
4454
4454
  }
4455
- h.normalized = g;
4455
+ m.normalized = g;
4456
4456
  }
4457
- return h;
4457
+ return m;
4458
4458
  });
4459
4459
  }
4460
4460
  /**
@@ -4504,8 +4504,8 @@ class ra {
4504
4504
  return new Promise(function(A, p) {
4505
4505
  let g = A;
4506
4506
  t.isImageBitmapLoader === !0 && (g = function(f) {
4507
- const h = new Gs(f);
4508
- h.needsUpdate = !0, A(h);
4507
+ const m = new Gs(f);
4508
+ m.needsUpdate = !0, A(m);
4509
4509
  }), t.load(It.resolveURL(u, i.path), g, void 0, p);
4510
4510
  });
4511
4511
  }).then(function(u) {
@@ -4669,22 +4669,22 @@ class ra {
4669
4669
  return a.push(t.loadGeometries(o)), Promise.all(a).then(function(l) {
4670
4670
  const c = l.slice(0, l.length - 1), d = l[l.length - 1], u = [];
4671
4671
  for (let p = 0, g = d.length; p < g; p++) {
4672
- const f = d[p], h = o[p];
4672
+ const f = d[p], m = o[p];
4673
4673
  let y;
4674
- const C = c[p];
4675
- if (h.mode === Ce.TRIANGLES || h.mode === Ce.TRIANGLE_STRIP || h.mode === Ce.TRIANGLE_FAN || h.mode === void 0)
4676
- y = i.isSkinnedMesh === !0 ? new to(f, C) : new S(f, C), y.isSkinnedMesh === !0 && y.normalizeSkinWeights(), h.mode === Ce.TRIANGLE_STRIP ? y.geometry = fn(y.geometry, Nn) : h.mode === Ce.TRIANGLE_FAN && (y.geometry = fn(y.geometry, Cs));
4677
- else if (h.mode === Ce.LINES)
4678
- y = new ws(f, C);
4679
- else if (h.mode === Ce.LINE_STRIP)
4680
- y = new je(f, C);
4681
- else if (h.mode === Ce.LINE_LOOP)
4682
- y = new so(f, C);
4683
- else if (h.mode === Ce.POINTS)
4684
- y = new Bt(f, C);
4674
+ const v = c[p];
4675
+ if (m.mode === Ce.TRIANGLES || m.mode === Ce.TRIANGLE_STRIP || m.mode === Ce.TRIANGLE_FAN || m.mode === void 0)
4676
+ y = i.isSkinnedMesh === !0 ? new to(f, v) : new S(f, v), y.isSkinnedMesh === !0 && y.normalizeSkinWeights(), m.mode === Ce.TRIANGLE_STRIP ? y.geometry = fn(y.geometry, Nn) : m.mode === Ce.TRIANGLE_FAN && (y.geometry = fn(y.geometry, Cs));
4677
+ else if (m.mode === Ce.LINES)
4678
+ y = new ws(f, v);
4679
+ else if (m.mode === Ce.LINE_STRIP)
4680
+ y = new je(f, v);
4681
+ else if (m.mode === Ce.LINE_LOOP)
4682
+ y = new so(f, v);
4683
+ else if (m.mode === Ce.POINTS)
4684
+ y = new Bt(f, v);
4685
4685
  else
4686
- throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + h.mode);
4687
- Object.keys(y.geometry.morphAttributes).length > 0 && sa(y, i), y.name = t.createUniqueName(i.name || "mesh_" + e), Oe(y, i), h.extensions && Ke(s, y, h), t.assignFinalMaterial(y), u.push(y);
4686
+ throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + m.mode);
4687
+ Object.keys(y.geometry.morphAttributes).length > 0 && sa(y, i), y.name = t.createUniqueName(i.name || "mesh_" + e), Oe(y, i), m.extensions && Ke(s, y, m), t.assignFinalMaterial(y), u.push(y);
4688
4688
  }
4689
4689
  for (let p = 0, g = u.length; p < g; p++)
4690
4690
  t.associations.set(u[p], {
@@ -4751,8 +4751,8 @@ class ra {
4751
4751
  loadAnimation(e) {
4752
4752
  const t = this.json, n = this, s = t.animations[e], i = s.name ? s.name : "animation_" + e, o = [], a = [], l = [], c = [], d = [];
4753
4753
  for (let u = 0, A = s.channels.length; u < A; u++) {
4754
- const p = s.channels[u], g = s.samplers[p.sampler], f = p.target, h = f.node, y = s.parameters !== void 0 ? s.parameters[g.input] : g.input, C = s.parameters !== void 0 ? s.parameters[g.output] : g.output;
4755
- f.node !== void 0 && (o.push(this.getDependency("node", h)), a.push(this.getDependency("accessor", y)), l.push(this.getDependency("accessor", C)), c.push(g), d.push(f));
4754
+ const p = s.channels[u], g = s.samplers[p.sampler], f = p.target, m = f.node, y = s.parameters !== void 0 ? s.parameters[g.input] : g.input, v = s.parameters !== void 0 ? s.parameters[g.output] : g.output;
4755
+ f.node !== void 0 && (o.push(this.getDependency("node", m)), a.push(this.getDependency("accessor", y)), l.push(this.getDependency("accessor", v)), c.push(g), d.push(f));
4756
4756
  }
4757
4757
  return Promise.all([
4758
4758
  Promise.all(o),
@@ -4761,18 +4761,18 @@ class ra {
4761
4761
  Promise.all(c),
4762
4762
  Promise.all(d)
4763
4763
  ]).then(function(u) {
4764
- const A = u[0], p = u[1], g = u[2], f = u[3], h = u[4], y = [];
4765
- for (let w = 0, m = A.length; w < m; w++) {
4766
- const v = A[w], D = p[w], M = g[w], H = f[w], ne = h[w];
4767
- if (v === void 0) continue;
4768
- v.updateMatrix && v.updateMatrix();
4769
- const k = n._createAnimationTracks(v, D, M, H, ne);
4770
- if (k)
4771
- for (let J = 0; J < k.length; J++)
4772
- y.push(k[J]);
4764
+ const A = u[0], p = u[1], g = u[2], f = u[3], m = u[4], y = [];
4765
+ for (let I = 0, h = A.length; I < h; I++) {
4766
+ const w = A[I], E = p[I], M = g[I], H = f[I], ne = m[I];
4767
+ if (w === void 0) continue;
4768
+ w.updateMatrix && w.updateMatrix();
4769
+ const j = n._createAnimationTracks(w, E, M, H, ne);
4770
+ if (j)
4771
+ for (let J = 0; J < j.length; J++)
4772
+ y.push(j[J]);
4773
4773
  }
4774
- const C = new io(i, void 0, y);
4775
- return Oe(C, s), C;
4774
+ const v = new io(i, void 0, y);
4775
+ return Oe(v, s), v;
4776
4776
  });
4777
4777
  }
4778
4778
  createNodeMesh(e) {
@@ -5002,7 +5002,7 @@ function yn(r, e, t) {
5002
5002
  return e.targets !== void 0 ? ta(r, e.targets, t) : r;
5003
5003
  });
5004
5004
  }
5005
- const I = {
5005
+ const C = {
5006
5006
  /** 场景模式 */
5007
5007
  mode: "",
5008
5008
  /** 控制器模式 */
@@ -5032,64 +5032,68 @@ let Es = [], zt = [], Rt = !0, $e = null, Ds = null, Yt = null, Be = [];
5032
5032
  const st = /* @__PURE__ */ new Map();
5033
5033
  let es, Kt = null, Mt = null, vt = null;
5034
5034
  async function ca(r, e = "edit", t) {
5035
- I.container = r, I.mode = e, da(), fa(), Aa(), t && (await Xa(t.scene, e, t.dataPanels, t.waters, t.textures, t.ambientLight), t != null && t.camera && (I.defaultMainCamera = t.camera, Zn(!0))), ga(), ma(), es && I.orbitControls && (I.orbitControls.target.fromArray(es), I.orbitControls.update()), ha(), ei(), Jn(), Mt = (n) => Ca(n), vt = () => ba(), e === "edit" && r.addEventListener("click", Mt), window.addEventListener("resize", vt), t || ya(), e === "edit" && pa();
5035
+ C.container = r, C.mode = e, da(), fa(), Aa(), t && (await Ba(t.scene, e, t.dataPanels, t.waters, t.textures, t.ambientLight), t != null && t.camera && (C.defaultMainCamera = t.camera, Zn(!0))), ga(), ma(), es && C.orbitControls && (C.orbitControls.target.fromArray(es), C.orbitControls.update()), ha(), ei(), Jn(), Mt = (n) => Ca(n), vt = () => ba(), e === "edit" && r.addEventListener("click", Mt), window.addEventListener("resize", vt), t || ya(), e === "edit" && pa();
5036
5036
  }
5037
5037
  function ua() {
5038
5038
  return window.devicePixelRatio;
5039
5039
  }
5040
5040
  function da() {
5041
5041
  const r = ua(), e = new P.WebGLRenderer({ antialias: !0, alpha: !0 });
5042
- e.setSize(I.container.clientWidth, I.container.clientHeight), e.setPixelRatio(r), e.toneMapping = P.NeutralToneMapping, e.toneMappingExposure = 1, console.log(
5043
- `[Renderer] css=${I.container.clientWidth}×${I.container.clientHeight}, dpr=${window.devicePixelRatio}, targetRatio=${r}, antialias=true`
5044
- ), I.container.appendChild(e.domElement), I.renderer = e;
5042
+ e.setSize(C.container.clientWidth, C.container.clientHeight), e.setPixelRatio(r), e.toneMapping = P.NeutralToneMapping, e.toneMappingExposure = 1, console.log(
5043
+ `[Renderer] css=${C.container.clientWidth}×${C.container.clientHeight}, dpr=${window.devicePixelRatio}, targetRatio=${r}, antialias=true`
5044
+ ), console.log("[初始化诊断] 渲染状态:", {
5045
+ toneMapping: e.toneMapping,
5046
+ 曝光: e.toneMappingExposure,
5047
+ 输出色彩空间: e.outputColorSpace
5048
+ }), C.container.appendChild(e.domElement), C.renderer = e;
5045
5049
  }
5046
5050
  function ha() {
5047
- if (!I.renderer || !I.scene || !I.camera) return;
5048
- const r = I.renderer.getPixelRatio(), e = I.container.clientWidth * r, t = I.container.clientHeight * r, n = new P.WebGLRenderTarget(e, t, {
5051
+ if (!C.renderer || !C.scene || !C.camera) return;
5052
+ const r = C.renderer.getPixelRatio(), e = C.container.clientWidth * r, t = C.container.clientHeight * r, n = new P.WebGLRenderTarget(e, t, {
5049
5053
  type: P.HalfFloatType,
5050
5054
  samples: 4
5051
5055
  });
5052
5056
  n.texture.name = "EffectComposer.rt1";
5053
- const s = new zo(I.renderer, n);
5054
- s.addPass(new Go(I.scene, I.camera)), s.addPass(new Wo()), We = s;
5057
+ const s = new zo(C.renderer, n);
5058
+ s.addPass(new Go(C.scene, C.camera)), s.addPass(new Wo()), We = s;
5055
5059
  }
5056
5060
  function fa() {
5057
- if (I.scene = new P.Scene(), I.scene.name = "sl_scene", I.renderer) {
5058
- const r = Ms(I.renderer);
5059
- r && (I.scene.environment = r, I.scene.environmentIntensity = 1);
5061
+ if (C.scene = new P.Scene(), C.scene.name = "sl_scene", C.renderer) {
5062
+ const r = Ms(C.renderer);
5063
+ r ? (C.scene.environment = r, C.scene.environmentIntensity = 1) : console.warn("[初始化] 环境贴图生成失败,场景将没有 IBL 间接光照");
5060
5064
  }
5061
5065
  }
5062
5066
  function pa() {
5063
5067
  const r = new P.GridHelper(30, 30, 8956671, 3364232);
5064
- r.name = "地板", r.userData.type = "initFloor", I.scene.add(r), I.gridHelper = r;
5068
+ r.name = "地板", r.userData.type = "initFloor", C.scene.add(r), C.gridHelper = r;
5065
5069
  }
5066
5070
  function Aa() {
5067
- const r = I.container, e = r.clientWidth / r.clientHeight, t = new P.PerspectiveCamera(45, e, 0.1, 1e3);
5068
- t.position.set(0, 6, 15), t.lookAt(0, 0, 0), I.camera = t;
5071
+ const r = C.container, e = r.clientWidth / r.clientHeight, t = new P.PerspectiveCamera(45, e, 0.1, 1e3);
5072
+ t.position.set(0, 6, 15), t.lookAt(0, 0, 0), C.camera = t;
5069
5073
  }
5070
5074
  function Zn(r = !1) {
5071
- if (!I.defaultMainCamera) return;
5072
- const e = I.defaultMainCamera;
5075
+ if (!C.defaultMainCamera) return;
5076
+ const e = C.defaultMainCamera;
5073
5077
  if (r) {
5074
- I.camera.position.set(
5078
+ C.camera.position.set(
5075
5079
  e.position[0],
5076
5080
  e.position[1],
5077
5081
  e.position[2]
5078
- ), I.camera.rotation.set(
5082
+ ), C.camera.rotation.set(
5079
5083
  e.rotation[0],
5080
5084
  e.rotation[1],
5081
5085
  e.rotation[2]
5082
- ), I.camera.updateProjectionMatrix(), es = e.target;
5086
+ ), C.camera.updateProjectionMatrix(), es = e.target;
5083
5087
  return;
5084
5088
  } else
5085
5089
  $n(""), ts();
5086
- if (!I.camera || !I.orbitControls) return;
5087
- const t = I.camera.position.clone(), n = I.orbitControls.target.clone(), s = new P.Vector3(
5090
+ if (!C.camera || !C.orbitControls) return;
5091
+ const t = C.camera.position.clone(), n = C.orbitControls.target.clone(), s = new P.Vector3(
5088
5092
  e.position[0],
5089
5093
  e.position[1],
5090
5094
  e.position[2]
5091
5095
  ), i = e.target ? new P.Vector3(e.target[0], e.target[1], e.target[2]) : new P.Vector3(0, 0, 0);
5092
- I.orbitControls.enabled = !1, new Pt.Tween({
5096
+ C.orbitControls.enabled = !1, new Pt.Tween({
5093
5097
  x: t.x,
5094
5098
  y: t.y,
5095
5099
  z: t.z,
@@ -5107,13 +5111,13 @@ function Zn(r = !1) {
5107
5111
  },
5108
5112
  1e3
5109
5113
  ).easing(Pt.Easing.Quadratic.InOut).onUpdate((o) => {
5110
- I.camera.position.set(o.x, o.y, o.z), I.orbitControls.target.set(o.tx, o.ty, o.tz), I.orbitControls.update();
5114
+ C.camera.position.set(o.x, o.y, o.z), C.orbitControls.target.set(o.tx, o.ty, o.tz), C.orbitControls.update();
5111
5115
  }).onComplete(() => {
5112
- es = e.target, I.orbitControls.enabled = !0;
5116
+ es = e.target, C.orbitControls.enabled = !0;
5113
5117
  }).start();
5114
5118
  }
5115
5119
  function ma() {
5116
- const r = new ho(I.camera, I.renderer.domElement);
5120
+ const r = new ho(C.camera, C.renderer.domElement);
5117
5121
  r.minDistance = 0, r.maxDistance = 1 / 0, r.addEventListener("start", () => {
5118
5122
  Vt = !1;
5119
5123
  }), r.addEventListener("change", () => {
@@ -5122,26 +5126,26 @@ function ma() {
5122
5126
  Vt && (tt = !0, setTimeout(() => {
5123
5127
  tt = !1;
5124
5128
  }, 200));
5125
- }), I.orbitControls = r;
5129
+ }), C.orbitControls = r;
5126
5130
  }
5127
5131
  function ga() {
5128
5132
  const r = new vo(
5129
- I.camera,
5130
- I.renderer.domElement
5133
+ C.camera,
5134
+ C.renderer.domElement
5131
5135
  );
5132
5136
  r.addEventListener("dragging-changed", (e) => {
5133
- I.orbitControls.enabled = !e.value, e.value || (tt = !0, setTimeout(() => {
5137
+ C.orbitControls.enabled = !e.value, e.value || (tt = !0, setTimeout(() => {
5134
5138
  tt = !1;
5135
5139
  }, 200));
5136
5140
  }), r.addEventListener("objectChange", () => {
5137
- const e = I.selectedObject;
5141
+ const e = C.selectedObject;
5138
5142
  if (Ds && e && Ds(e), e && e.type === "DirectionalLight") {
5139
5143
  const t = e.userData.helper;
5140
5144
  t && t.update && t.update();
5141
5145
  }
5142
- }), I.scene.add(r.getHelper()), I.transformControls = r;
5146
+ }), C.scene.add(r.getHelper()), C.transformControls = r;
5143
5147
  }
5144
- function Qn(r = I.scene) {
5148
+ function Qn(r = C.scene) {
5145
5149
  if (!r || r.children.some((t) => t.type === "AmbientLight")) return null;
5146
5150
  const e = new P.AmbientLight(
5147
5151
  Ua,
@@ -5150,18 +5154,18 @@ function Qn(r = I.scene) {
5150
5154
  return e.name = "环境光", r.add(e), e;
5151
5155
  }
5152
5156
  function ya() {
5153
- Qn(I.scene);
5157
+ Qn(C.scene);
5154
5158
  }
5155
5159
  function Jn() {
5156
5160
  var e, t;
5157
- Kt = requestAnimationFrame(Jn), Pt.update(), (e = I.orbitControls) == null || e.update(), I.mode === "run" && We && I.scene && I.camera ? We.render() : (t = I.renderer) == null || t.render(I.scene, I.camera), I.scene && I.camera && er(I.scene, I.camera), Rt && I.scene && (zt = [], I.scene.traverse((n) => {
5161
+ Kt = requestAnimationFrame(Jn), Pt.update(), (e = C.orbitControls) == null || e.update(), C.mode === "run" && We && C.scene && C.camera ? We.render() : (t = C.renderer) == null || t.render(C.scene, C.camera), C.scene && C.camera && er(C.scene, C.camera), Rt && C.scene && (zt = [], C.scene.traverse((n) => {
5158
5162
  n.userData.isWater && n.type === "Mesh" && zt.push(n);
5159
5163
  }), Rt = !1);
5160
5164
  for (let n = 0; n < zt.length; n++) {
5161
5165
  const s = zt[n], i = s.material;
5162
5166
  if (i.uniforms && i.uniforms.time) {
5163
5167
  const o = s.userData.waterTimeScale ?? 1;
5164
- i.uniforms.time.value += 1 / 60 * o, I.camera && i.uniforms.eye && i.uniforms.eye.value.copy(I.camera.position);
5168
+ i.uniforms.time.value += 1 / 60 * o, C.camera && i.uniforms.eye && i.uniforms.eye.value.copy(C.camera.position);
5165
5169
  continue;
5166
5170
  }
5167
5171
  if (i.normalMap) {
@@ -5171,12 +5175,12 @@ function Jn() {
5171
5175
  }
5172
5176
  }
5173
5177
  function ba() {
5174
- if (!I.container || !I.camera || !I.renderer) return;
5175
- const r = I.container.clientWidth, e = I.container.clientHeight;
5176
- r === 0 || e === 0 || (I.camera.aspect = r / e, I.camera.updateProjectionMatrix(), I.renderer.setSize(r, e), We && We.setSize(r, e), tr(r, e));
5178
+ if (!C.container || !C.camera || !C.renderer) return;
5179
+ const r = C.container.clientWidth, e = C.container.clientHeight;
5180
+ r === 0 || e === 0 || (C.camera.aspect = r / e, C.camera.updateProjectionMatrix(), C.renderer.setSize(r, e), We && We.setSize(r, e), tr(r, e));
5177
5181
  }
5178
5182
  function Hs(r) {
5179
- I.selectedObject !== r && (I.selectedObject && I.transformControls.detach(), I.selectedObject = r, I.transformControls.attach(r), I.transformControls.setMode(I.transformControlsMode), I.transformControls.showX = !0, I.transformControls.showY = !0, I.transformControls.showZ = !0, _n(r), $e == null || $e(r));
5183
+ C.selectedObject !== r && (C.selectedObject && C.transformControls.detach(), C.selectedObject = r, C.transformControls.attach(r), C.transformControls.setMode(C.transformControlsMode), C.transformControls.showX = !0, C.transformControls.showY = !0, C.transformControls.showZ = !0, _n(r), $e == null || $e(r));
5180
5184
  }
5181
5185
  let ye = null;
5182
5186
  function xa(r) {
@@ -5186,10 +5190,10 @@ function ms(r) {
5186
5190
  ye == null || ye(r);
5187
5191
  }
5188
5192
  function Ia(r) {
5189
- I.transformControlsMode = r, I.transformControls && I.transformControls.setMode(I.transformControlsMode);
5193
+ C.transformControlsMode = r, C.transformControls && C.transformControls.setMode(C.transformControlsMode);
5190
5194
  }
5191
5195
  function _n(r) {
5192
- if (I.mode !== "edit") {
5196
+ if (C.mode !== "edit") {
5193
5197
  ts();
5194
5198
  return;
5195
5199
  }
@@ -5209,7 +5213,7 @@ function ts() {
5209
5213
  Es = [];
5210
5214
  }
5211
5215
  function ks() {
5212
- I.selectedObject && (ts(), I.transformControls.detach(), I.selectedObject = null, $e == null || $e(null));
5216
+ C.selectedObject && (ts(), C.transformControls.detach(), C.selectedObject = null, $e == null || $e(null));
5213
5217
  }
5214
5218
  function $n(r) {
5215
5219
  let e = null;
@@ -5219,7 +5223,7 @@ function $n(r) {
5219
5223
  });
5220
5224
  }), e && (e.children.forEach((t) => {
5221
5225
  t.name && t.name.startsWith("DataPanel_") && (t.visible = !0);
5222
- }), _n(e), I.selectedObject = e, setTimeout(() => {
5226
+ }), _n(e), C.selectedObject = e, setTimeout(() => {
5223
5227
  Ma(e);
5224
5228
  }, 500));
5225
5229
  }
@@ -5228,13 +5232,13 @@ function Ca(r) {
5228
5232
  tt = !1;
5229
5233
  return;
5230
5234
  }
5231
- const e = I.renderer.domElement.getBoundingClientRect(), t = new P.Vector2(
5235
+ const e = C.renderer.domElement.getBoundingClientRect(), t = new P.Vector2(
5232
5236
  (r.clientX - e.left) / e.width * 2 - 1,
5233
5237
  -((r.clientY - e.top) / e.height) * 2 + 1
5234
5238
  ), n = new P.Raycaster();
5235
- n.setFromCamera(t, I.camera);
5239
+ n.setFromCamera(t, C.camera);
5236
5240
  const s = [];
5237
- I.scene.traverse((o) => {
5241
+ C.scene.traverse((o) => {
5238
5242
  (o.userData.isMovable || o.userData.type === "lightHelper") && s.push(o);
5239
5243
  });
5240
5244
  const i = n.intersectObjects(s);
@@ -5245,32 +5249,30 @@ function Ca(r) {
5245
5249
  ks();
5246
5250
  }
5247
5251
  function wa(r) {
5248
- var t, n;
5252
+ var t;
5249
5253
  let e = r;
5250
5254
  for (; e; ) {
5251
5255
  if (((t = e.userData) == null ? void 0 : t.type) === "lightHelper" || e.type === "DirectionalLightHelper")
5252
5256
  return e.light || e;
5253
- if (((n = e.userData) == null ? void 0 : n.type) === "AmbientLightHelper")
5254
- return e.parent && e.parent.type === "AmbientLight" ? e.parent : e;
5255
5257
  e = e.parent;
5256
5258
  }
5257
5259
  if (r.type === "Line" || r.type === "LineSegments") {
5258
- const s = r.parent;
5259
- if (s)
5260
- switch (s.type) {
5260
+ const n = r.parent;
5261
+ if (n)
5262
+ switch (n.type) {
5261
5263
  case "DirectionalLightHelper":
5262
- return s.light;
5264
+ return n.light;
5263
5265
  case "AmbientLight":
5264
- return s;
5266
+ return n;
5265
5267
  default:
5266
- return s.isMesh ? s : r;
5268
+ return n.isMesh ? n : r;
5267
5269
  }
5268
5270
  return r;
5269
5271
  }
5270
5272
  return r;
5271
5273
  }
5272
5274
  function Ma(r, e = 500) {
5273
- if (!I.camera || !I.orbitControls) {
5275
+ if (!C.camera || !C.orbitControls) {
5274
5276
  console.warn(
5275
5277
  "[focusOnObject] 编辑器尚未初始化或已销毁,无法执行聚焦操作。请确保已调用 initEditor()"
5276
5278
  );
@@ -5284,9 +5286,9 @@ function Ma(r, e = 500) {
5284
5286
  r.userData.closeUpView && typeof r.userData.closeUpView.x == "number" && typeof r.userData.closeUpView.y == "number" && typeof r.userData.closeUpView.z == "number" && (t = r.userData.closeUpView);
5285
5287
  const n = new P.Vector3();
5286
5288
  r.getWorldPosition(n);
5287
- const i = new P.Box3().setFromObject(r).getSize(new P.Vector3()), o = Math.max(i.x, i.y, i.z) * 0.5, a = Math.max(o * 3.5, 5), l = new P.Vector3().copy(I.camera.position).sub(n).normalize();
5289
+ const i = new P.Box3().setFromObject(r).getSize(new P.Vector3()), o = Math.max(i.x, i.y, i.z) * 0.5, a = Math.max(o * 3.5, 5), l = new P.Vector3().copy(C.camera.position).sub(n).normalize();
5288
5290
  l.lengthSq() < 1e-3 && l.set(0, 0, 1);
5289
- const c = n.clone().add(l.multiplyScalar(a)), d = I.camera.position.clone(), u = I.orbitControls.target.clone();
5291
+ const c = n.clone().add(l.multiplyScalar(a)), d = C.camera.position.clone(), u = C.orbitControls.target.clone();
5290
5292
  try {
5291
5293
  new Pt.Tween({
5292
5294
  x: d.x,
@@ -5306,7 +5308,7 @@ function Ma(r, e = 500) {
5306
5308
  },
5307
5309
  e
5308
5310
  ).easing(Pt.Easing.Quadratic.InOut).onUpdate((A) => {
5309
- I.camera.position.set(A.x, A.y, A.z), I.orbitControls.target.set(A.tx, A.ty, A.tz), I.orbitControls.update();
5311
+ C.camera.position.set(A.x, A.y, A.z), C.orbitControls.target.set(A.tx, A.ty, A.tz), C.orbitControls.update();
5310
5312
  }).start();
5311
5313
  } catch (A) {
5312
5314
  console.error(
@@ -5339,17 +5341,17 @@ function Da(r) {
5339
5341
  });
5340
5342
  }
5341
5343
  function nt(r, e = !1) {
5342
- I.scene.add(r), Rt = !0, r.userData.isMovable && (Oa(r), is()), e && I.mode === "edit" && Hs(r);
5344
+ C.scene.add(r), Rt = !0, r.userData.isMovable && (Oa(r), is()), e && C.mode === "edit" && Hs(r);
5343
5345
  }
5344
5346
  function Pa(r) {
5345
- I.selectedObject === r && ks(), Rt = !0, Da(r), Ta(r), r.userData.helper && I.scene.remove(r.userData.helper), r.parent ? r.parent.remove(r) : I.scene.remove(r), Sa(r), is();
5347
+ C.selectedObject === r && ks(), Rt = !0, Da(r), Ta(r), r.userData.helper && C.scene.remove(r.userData.helper), r.parent ? r.parent.remove(r) : C.scene.remove(r), Sa(r), is();
5346
5348
  }
5347
5349
  function Ra(r) {
5348
- const e = I.scene.getObjectByProperty("uuid", r);
5350
+ const e = C.scene.getObjectByProperty("uuid", r);
5349
5351
  e && Pa(e);
5350
5352
  }
5351
5353
  function Oa(r) {
5352
- r.userData.isMovable && r.parent === I.scene && (Be.includes(r) || Be.push(r));
5354
+ r.userData.isMovable && r.parent === C.scene && (Be.includes(r) || Be.push(r));
5353
5355
  }
5354
5356
  function Sa(r) {
5355
5357
  const e = Be.indexOf(r);
@@ -5357,7 +5359,7 @@ function Sa(r) {
5357
5359
  }
5358
5360
  function ei() {
5359
5361
  const r = [];
5360
- I.scene.children.forEach((e) => {
5362
+ C.scene.children.forEach((e) => {
5361
5363
  e.userData.isMovable && r.push(e);
5362
5364
  }), Be = r, is();
5363
5365
  }
@@ -5377,30 +5379,30 @@ function ka() {
5377
5379
  return Be;
5378
5380
  }
5379
5381
  function ja() {
5380
- return I.selectedObject;
5382
+ return C.selectedObject;
5381
5383
  }
5382
- function Ru(r, e, t) {
5383
- if (!I.scene) return;
5384
+ function Pu(r, e, t) {
5385
+ if (!C.scene) return;
5384
5386
  const n = st.get(r);
5385
5387
  if (n) {
5386
5388
  const s = St(n);
5387
5389
  s && s.updateItemByCode(e, t);
5388
5390
  }
5389
5391
  }
5390
- function Ou() {
5391
- return I.scene;
5392
+ function Ru() {
5393
+ return C.scene;
5392
5394
  }
5393
5395
  function Fa() {
5394
- return I.camera;
5396
+ return C.camera;
5395
5397
  }
5396
- function Su() {
5397
- return I.renderer;
5398
+ function Ou() {
5399
+ return C.renderer;
5398
5400
  }
5399
5401
  const Ua = 16777215, za = 1;
5400
5402
  async function Ga() {
5401
- var w, m, v, D;
5403
+ var I, h, w, E;
5402
5404
  ye == null || ye(!0), await new Promise((M) => setTimeout(M, 50)), ks();
5403
- const r = I.scene;
5405
+ const r = C.scene;
5404
5406
  if (!r)
5405
5407
  return ye == null || ye(!1), {
5406
5408
  scene: new ArrayBuffer(0),
@@ -5416,21 +5418,20 @@ async function Ga() {
5416
5418
  r.traverse((M) => {
5417
5419
  var H, ne;
5418
5420
  if (M.userData._sourceUuid = M.uuid, M.type === "AmbientLight") {
5419
- const k = M;
5421
+ const j = M;
5420
5422
  a = {
5421
- color: "#" + k.color.getHexString(),
5422
- intensity: k.intensity,
5423
- name: k.name || "环境光",
5424
- visible: k.visible,
5425
- position: k.position.toArray(),
5426
- hasHelper: !!k.userData.helper
5427
- }, l.push(k);
5423
+ color: "#" + j.color.getHexString(),
5424
+ intensity: j.intensity,
5425
+ name: j.name || "环境光",
5426
+ visible: j.visible,
5427
+ position: j.position.toArray()
5428
+ }, l.push(j);
5428
5429
  }
5429
5430
  if (M.userData.type === "lightHelper" && e.push(M), M.type === "DirectionalLight" && M.userData.helper && (t.set(M, M.userData.helper), M.userData.helper = void 0), M.userData.isWater && M.type === "Mesh" && M.parent) {
5430
- const k = M, J = k.material;
5431
+ const j = M, J = j.material;
5431
5432
  let K = "#4fc3f7";
5432
5433
  J.uniforms && J.uniforms.waterColor && (K = "#" + J.uniforms.waterColor.value.getHexString());
5433
- const Z = k.geometry, z = {
5434
+ const Z = j.geometry, z = {
5434
5435
  uuid: M.uuid,
5435
5436
  name: M.name,
5436
5437
  position: M.position.toArray(),
@@ -5448,12 +5449,12 @@ async function Ga() {
5448
5449
  Z.parameters && Z.parameters.radiusTop !== void 0 ? (z.geometryType = "cylinder", z.cylinderRadiusTop = Z.parameters.radiusTop, z.cylinderRadiusBottom = Z.parameters.radiusBottom, z.cylinderRadialSegments = Z.parameters.radialSegments) : (z.geometryType = "box", z.boxWidth = Z.parameters.width, z.boxDepth = Z.parameters.depth), i.push(z), o.push(M);
5449
5450
  }
5450
5451
  if (M.name && M.name.startsWith("DataPanel_")) {
5451
- const k = M;
5452
- if (k.element) {
5453
- const J = k.element.querySelector(
5452
+ const j = M;
5453
+ if (j.element) {
5454
+ const J = j.element.querySelector(
5454
5455
  "[data-panel-title]"
5455
5456
  ), K = [];
5456
- if (k.element.querySelectorAll(
5457
+ if (j.element.querySelectorAll(
5457
5458
  ".sl-css2d-data-panel-item"
5458
5459
  ).forEach((z) => {
5459
5460
  var ee, le, _;
@@ -5465,7 +5466,7 @@ async function Ga() {
5465
5466
  K.push({ label: Ee, value: De, unit: Ue, code: Pe });
5466
5467
  }
5467
5468
  }), M.parent) {
5468
- const z = k.element.style.width || "", L = k.element.style.fontSize || "", Q = St(M.parent), ee = Q ? Q.getOffsetY() : 0.1;
5469
+ const z = j.element.style.width || "", L = j.element.style.fontSize || "", Q = St(M.parent), ee = Q ? Q.getOffsetY() : 0.1;
5469
5470
  n.set(
5470
5471
  M.parent.userData.id ? M.parent.userData.id : M.parent.uuid,
5471
5472
  {
@@ -5482,7 +5483,7 @@ async function Ga() {
5482
5483
  }
5483
5484
  }
5484
5485
  if (M.type === "Mesh") {
5485
- const k = M, J = Array.isArray(k.material) ? k.material : [k.material];
5486
+ const j = M, J = Array.isArray(j.material) ? j.material : [j.material];
5486
5487
  for (const K of J)
5487
5488
  if (K && K.userData) {
5488
5489
  const Z = K.userData;
@@ -5493,7 +5494,7 @@ async function Ga() {
5493
5494
  }
5494
5495
  }
5495
5496
  }), e.forEach((M) => r.remove(M));
5496
- const c = (w = I.transformControls) == null ? void 0 : w.getHelper(), d = (c == null ? void 0 : c.parent) ?? null;
5497
+ const c = (I = C.transformControls) == null ? void 0 : I.getHelper(), d = (c == null ? void 0 : c.parent) ?? null;
5497
5498
  c && c.parent && c.parent.remove(c);
5498
5499
  const u = /* @__PURE__ */ new Map();
5499
5500
  for (const M of l)
@@ -5526,23 +5527,23 @@ async function Ga() {
5526
5527
  }), r.traverse((M) => {
5527
5528
  delete M.userData._sourceUuid;
5528
5529
  }), c && (d ? d.add(c) : r.add(c));
5529
- const h = {
5530
- position: (m = I.camera) == null ? void 0 : m.position.toArray(),
5531
- rotation: (v = I.camera) == null ? void 0 : v.rotation.toArray(),
5532
- target: ((D = I.orbitControls) == null ? void 0 : D.target.toArray()) || [0, 0, 0]
5530
+ const m = {
5531
+ position: (h = C.camera) == null ? void 0 : h.position.toArray(),
5532
+ rotation: (w = C.camera) == null ? void 0 : w.rotation.toArray(),
5533
+ target: ((E = C.orbitControls) == null ? void 0 : E.target.toArray()) || [0, 0, 0]
5533
5534
  }, y = {};
5534
5535
  n.forEach((M, H) => {
5535
5536
  y[H] = M;
5536
5537
  });
5537
- const C = {
5538
+ const v = {
5538
5539
  scene: f,
5539
- camera: h,
5540
+ camera: m,
5540
5541
  dataPanels: y,
5541
5542
  waters: i,
5542
5543
  textures: s,
5543
5544
  ambientLight: a
5544
5545
  };
5545
- return ye == null || ye(!1), C;
5546
+ return ye == null || ye(!1), v;
5546
5547
  }
5547
5548
  function Wa(r) {
5548
5549
  if (r instanceof ArrayBuffer || ArrayBuffer.isView(r)) {
@@ -5567,114 +5568,108 @@ function Wa(r) {
5567
5568
  }
5568
5569
  return r && typeof r == "object" && r.type === "Buffer" && Array.isArray(r.data) ? new Uint8Array(r.data).buffer : null;
5569
5570
  }
5570
- function Ba(r, e = 0.5) {
5571
- const t = new P.EdgesGeometry(
5572
- new P.SphereGeometry(e, 12, 8)
5573
- ), n = new P.LineBasicMaterial({
5574
- color: r.color,
5575
- transparent: !0,
5576
- opacity: 0.6
5577
- }), s = new P.LineSegments(t, n);
5578
- return s.userData.type = "AmbientLightHelper", s;
5579
- }
5580
- async function Xa(r, e = "edit", t, n, s, i) {
5581
- var a, l, c, d, u, A, p;
5571
+ async function Ba(r, e = "edit", t, n, s, i) {
5572
+ var a, l, c, d, u, A, p, g, f, m;
5582
5573
  const o = Wa(r);
5583
5574
  if (o) {
5584
- const g = await new Vn().parseAsync(o, ""), f = g.scene || ((a = g.scenes) == null ? void 0 : a[0]), h = (l = I.scene) == null ? void 0 : l.environment;
5585
- if (I.scene = f, !f.children.some((y) => y.type === "AmbientLight"))
5575
+ const y = await new Vn().parseAsync(o, ""), v = y.scene || ((a = y.scenes) == null ? void 0 : a[0]), I = (l = C.scene) == null ? void 0 : l.environment;
5576
+ if (C.scene = v, !v.children.some((h) => h.type === "AmbientLight"))
5586
5577
  if (i) {
5587
- const y = new P.AmbientLight(i.color, i.intensity);
5588
- if (y.name = i.name || "环境光", y.visible = i.visible ?? !0, y.userData.isMovable = !0, i.position && y.position.fromArray(i.position), e === "edit" && i.hasHelper) {
5589
- const C = Ba(y, 0.5);
5590
- y.userData.helper = C, y.add(C);
5591
- }
5592
- f.add(y);
5578
+ const h = new P.AmbientLight(i.color, i.intensity);
5579
+ h.name = i.name || "环境光", h.visible = i.visible ?? !0, i.position && h.position.fromArray(i.position), v.add(h);
5593
5580
  } else
5594
- Qn(f);
5595
- if (h)
5596
- I.scene.environment = h, I.scene.environmentIntensity = 1;
5597
- else if (I.renderer) {
5598
- const y = Ms(I.renderer);
5599
- y && (I.scene.environment = y, I.scene.environmentIntensity = 1);
5581
+ Qn(v);
5582
+ if (console.log("[导入诊断] bin 环境光参数:", i), console.log("[导入诊断] 导入后渲染状态:", {
5583
+ 环境光: C.scene.children.filter((h) => h.type === "AmbientLight").map((h) => ({ color: "#" + h.color.getHexString(), intensity: h.intensity })),
5584
+ 有环境贴图: !!C.scene.environment,
5585
+ 环境贴图强度: C.scene.environmentIntensity,
5586
+ toneMapping: (c = C.renderer) == null ? void 0 : c.toneMapping,
5587
+ 曝光: (d = C.renderer) == null ? void 0 : d.toneMappingExposure,
5588
+ 输出色彩空间: (u = C.renderer) == null ? void 0 : u.outputColorSpace
5589
+ }), I)
5590
+ C.scene.environment = I, C.scene.environmentIntensity = 1;
5591
+ else if (C.renderer) {
5592
+ const h = Ms(C.renderer);
5593
+ h && (C.scene.environment = h, C.scene.environmentIntensity = 1);
5600
5594
  }
5601
5595
  } else {
5602
- const g = typeof r == "string" ? JSON.parse(r) : r, h = new P.ObjectLoader().parse(g);
5603
- if (h.type === "Scene") {
5604
- const y = (c = I.scene) == null ? void 0 : c.environment;
5605
- if (I.scene = h, y)
5606
- I.scene.environment = y, I.scene.environmentIntensity = 1;
5607
- else if (I.renderer) {
5608
- const C = Ms(I.renderer);
5609
- C && (I.scene.environment = C, I.scene.environmentIntensity = 1);
5596
+ const y = typeof r == "string" ? JSON.parse(r) : r, I = new P.ObjectLoader().parse(y);
5597
+ if (I.type === "Scene") {
5598
+ const h = (A = C.scene) == null ? void 0 : A.environment;
5599
+ if (C.scene = I, h)
5600
+ C.scene.environment = h, C.scene.environmentIntensity = 1;
5601
+ else if (C.renderer) {
5602
+ const w = Ms(C.renderer);
5603
+ w && (C.scene.environment = w, C.scene.environmentIntensity = 1);
5610
5604
  }
5611
5605
  } else
5612
- (d = I.scene) == null || d.add(h);
5613
- }
5614
- if (t && ((u = I.scene) == null || u.traverse((g) => {
5615
- const f = g.userData.id || g.userData._sourceUuid || g.uuid, h = t[f];
5616
- if (h && g.userData.isMovable) {
5617
- va(g);
5618
- const y = new _t({
5619
- title: h.title,
5620
- items: h.items
5606
+ (p = C.scene) == null || p.add(I);
5607
+ }
5608
+ if (t && ((g = C.scene) == null || g.traverse((y) => {
5609
+ const v = y.userData.id || y.userData._sourceUuid || y.uuid, I = t[v];
5610
+ if (I && y.userData.isMovable) {
5611
+ va(y);
5612
+ const h = new _t({
5613
+ title: I.title,
5614
+ items: I.items
5621
5615
  });
5622
- y.attachTo(g), y.visible = !1, h.width && y.setWidth(h.width), h.fontSize && y.setFontSize(h.fontSize), h.offsetY !== void 0 && y.setOffsetY(h.offsetY), h.offsetX !== void 0 && y.setOffsetX(h.offsetX), h.offsetZ !== void 0 && y.setOffsetZ(h.offsetZ), Wn(g, y);
5623
- }
5624
- })), n && n.length > 0 && Promise.resolve().then(() => tl).then(({ addWater: g, addWaterCylinder: f }) => {
5625
- for (const h of n) {
5626
- const y = h.geometryType || "box";
5627
- let C;
5628
- y === "cylinder" ? C = f({
5629
- radiusTop: h.cylinderRadiusTop ?? 5,
5630
- radiusBottom: h.cylinderRadiusBottom ?? 5,
5631
- radialSegments: h.cylinderRadialSegments ?? 32,
5616
+ h.attachTo(y), h.visible = !1, I.width && h.setWidth(I.width), I.fontSize && h.setFontSize(I.fontSize), I.offsetY !== void 0 && h.setOffsetY(I.offsetY), I.offsetX !== void 0 && h.setOffsetX(I.offsetX), I.offsetZ !== void 0 && h.setOffsetZ(I.offsetZ), Wn(y, h);
5617
+ }
5618
+ })), n && n.length > 0 && Promise.resolve().then(() => el).then(({ addWater: y, addWaterCylinder: v }) => {
5619
+ for (const I of n) {
5620
+ const h = I.geometryType || "box";
5621
+ let w;
5622
+ h === "cylinder" ? w = v({
5623
+ radiusTop: I.cylinderRadiusTop ?? 5,
5624
+ radiusBottom: I.cylinderRadiusBottom ?? 5,
5625
+ radialSegments: I.cylinderRadialSegments ?? 32,
5632
5626
  height: 0.8,
5633
- color: h.color,
5627
+ color: I.color,
5634
5628
  scale: 4
5635
- }) : C = g({
5636
- width: h.boxWidth ?? 10,
5637
- height: h.boxDepth ?? 10,
5638
- color: h.color,
5629
+ }) : w = y({
5630
+ width: I.boxWidth ?? 10,
5631
+ height: I.boxDepth ?? 10,
5632
+ color: I.color,
5639
5633
  scale: 4
5640
- }), C.position.fromArray(h.position), C.rotation.set(h.rotation[0], h.rotation[1], h.rotation[2]), C.scale.fromArray(h.scale), C.name = h.name, C.userData.waterTimeScale = h.timeScale ?? 0.05, C.userData.isWater = !0, C.userData.isMovable = !0, Rt = !0;
5634
+ }), w.position.fromArray(I.position), w.rotation.set(I.rotation[0], I.rotation[1], I.rotation[2]), w.scale.fromArray(I.scale), w.name = I.name, w.userData.waterTimeScale = I.timeScale ?? 0.05, w.userData.isWater = !0, w.userData.isMovable = !0, Rt = !0;
5641
5635
  }
5642
5636
  ei();
5643
5637
  }), s) {
5644
- const g = new P.TextureLoader();
5645
- (A = I.scene) == null || A.traverse((f) => {
5646
- if (f.type === "Mesh") {
5647
- const h = f, y = Array.isArray(h.material) ? h.material : [h.material];
5648
- for (const C of y)
5649
- if (C && C.uuid && s[C.uuid]) {
5650
- const w = s[C.uuid];
5651
- if (w.mapDataUrl) {
5652
- const m = g.load(w.mapDataUrl);
5653
- m.wrapS = m.wrapT = P.RepeatWrapping, m.repeat.set(1, 1), C.map = m, C.userData = C.userData || {}, C.userData._mapDataUrl = w.mapDataUrl, C.userData._mapFileName = w.mapFileName;
5638
+ const y = new P.TextureLoader();
5639
+ (f = C.scene) == null || f.traverse((v) => {
5640
+ if (v.type === "Mesh") {
5641
+ const I = v, h = Array.isArray(I.material) ? I.material : [I.material];
5642
+ for (const w of h)
5643
+ if (w && w.uuid && s[w.uuid]) {
5644
+ const E = s[w.uuid];
5645
+ if (E.mapDataUrl) {
5646
+ const M = y.load(E.mapDataUrl);
5647
+ M.wrapS = M.wrapT = P.RepeatWrapping, M.repeat.set(1, 1), w.map = M, w.userData = w.userData || {}, w.userData._mapDataUrl = E.mapDataUrl, w.userData._mapFileName = E.mapFileName;
5654
5648
  }
5655
- if (w.normalMapDataUrl) {
5656
- const m = g.load(w.normalMapDataUrl);
5657
- m.wrapS = m.wrapT = P.RepeatWrapping, m.repeat.set(1, 1), C.normalMap = m, C.normalScale = new P.Vector2(
5658
- w.normalScale ?? 1,
5659
- w.normalScale ?? 1
5660
- ), C.userData = C.userData || {}, C.userData._normalMapDataUrl = w.normalMapDataUrl, C.userData._normalMapFileName = w.normalMapFileName;
5649
+ if (E.normalMapDataUrl) {
5650
+ const M = y.load(E.normalMapDataUrl);
5651
+ M.wrapS = M.wrapT = P.RepeatWrapping, M.repeat.set(1, 1), w.normalMap = M, w.normalScale = new P.Vector2(
5652
+ E.normalScale ?? 1,
5653
+ E.normalScale ?? 1
5654
+ ), w.userData = w.userData || {}, w.userData._normalMapDataUrl = E.normalMapDataUrl, w.userData._normalMapFileName = E.normalMapFileName;
5661
5655
  }
5662
- if (w.aoMapDataUrl) {
5663
- const m = g.load(w.aoMapDataUrl);
5664
- m.wrapS = m.wrapT = P.RepeatWrapping, m.repeat.set(1, 1), C.aoMap = m, C.aoMapIntensity = w.aoMapIntensity ?? 1, C.userData = C.userData || {}, C.userData._aoMapDataUrl = w.aoMapDataUrl, C.userData._aoMapFileName = w.aoMapFileName;
5656
+ if (E.aoMapDataUrl) {
5657
+ const M = y.load(E.aoMapDataUrl);
5658
+ M.wrapS = M.wrapT = P.RepeatWrapping, M.repeat.set(1, 1), w.aoMap = M, w.aoMapIntensity = E.aoMapIntensity ?? 1, w.userData = w.userData || {}, w.userData._aoMapDataUrl = E.aoMapDataUrl, w.userData._aoMapFileName = E.aoMapFileName;
5665
5659
  }
5666
- C.needsUpdate = !0;
5660
+ w.needsUpdate = !0;
5667
5661
  }
5668
5662
  }
5669
5663
  });
5670
5664
  }
5671
- e === "edit" && ((p = I.scene) == null || p.traverse((g) => {
5672
- var f;
5673
- if (g.type === "DirectionalLight") {
5674
- const h = g;
5675
- if (!h.userData.helper) {
5676
- const y = new P.DirectionalLightHelper(h, 1);
5677
- y.userData.type = "lightHelper", h.userData.helper = y, y.update(), (f = I.scene) == null || f.add(y);
5665
+ e === "edit" && ((m = C.scene) == null || m.traverse((y) => {
5666
+ var v;
5667
+ if (y.type === "DirectionalLight") {
5668
+ const I = y;
5669
+ if (!I.userData.helper) {
5670
+ I.target.parent !== I && (I.target.parent && I.target.parent.remove(I.target), I.target.position.set(0, 0, -1), I.add(I.target));
5671
+ const h = new P.DirectionalLightHelper(I, 1);
5672
+ h.userData.type = "lightHelper", I.userData.helper = h, h.update(), (v = C.scene) == null || v.add(h);
5678
5673
  }
5679
5674
  }
5680
5675
  }));
@@ -5691,11 +5686,11 @@ function ti(r) {
5691
5686
  for (const t of e)
5692
5687
  ti(t);
5693
5688
  }
5694
- function qa() {
5695
- Kt !== null && (cancelAnimationFrame(Kt), Kt = null), Mt && I.container && (I.container.removeEventListener("click", Mt), Mt = null), vt && (window.removeEventListener("resize", vt), vt = null), I.orbitControls && (I.orbitControls.dispose(), I.orbitControls = null), I.transformControls && (I.transformControls.dispose(), I.transformControls = null), We && (We.dispose(), We = null), I.scene && (ti(I.scene), I.scene = null), I.renderer && (I.renderer.dispose(), I.renderer.domElement && I.container && I.container.removeChild(I.renderer.domElement), I.renderer = null), sr(), I.camera = null, I.gridHelper = null, I.selectedObject = null, I.container = null, I.mode = "", Be = [], st.clear(), is(), Vt = !1, tt = !1;
5689
+ function Xa() {
5690
+ Kt !== null && (cancelAnimationFrame(Kt), Kt = null), Mt && C.container && (C.container.removeEventListener("click", Mt), Mt = null), vt && (window.removeEventListener("resize", vt), vt = null), C.orbitControls && (C.orbitControls.dispose(), C.orbitControls = null), C.transformControls && (C.transformControls.dispose(), C.transformControls = null), We && (We.dispose(), We = null), C.scene && (ti(C.scene), C.scene = null), C.renderer && (C.renderer.dispose(), C.renderer.domElement && C.container && C.container.removeChild(C.renderer.domElement), C.renderer = null), sr(), C.camera = null, C.gridHelper = null, C.selectedObject = null, C.container = null, C.mode = "", Be = [], st.clear(), is(), Vt = !1, tt = !1;
5696
5691
  }
5697
- const Va = /^[og]\s*(.+)?/, Ya = /^mtllib /, Ka = /^usemtl /, Za = /^usemap /, bn = /\s+/, xn = new R(), gs = new R(), In = new R(), Cn = new R(), Ie = new R(), Gt = new re();
5698
- function Qa() {
5692
+ const qa = /^[og]\s*(.+)?/, Va = /^mtllib /, Ya = /^usemtl /, Ka = /^usemap /, bn = /\s+/, xn = new R(), gs = new R(), In = new R(), Cn = new R(), Ie = new R(), Gt = new re();
5693
+ function Za() {
5699
5694
  const r = {
5700
5695
  objects: [],
5701
5696
  object: {},
@@ -5855,7 +5850,7 @@ function Qa() {
5855
5850
  };
5856
5851
  return r.startObject("", !1), r;
5857
5852
  }
5858
- class Ja extends Ls {
5853
+ class Qa extends Ls {
5859
5854
  /**
5860
5855
  * Constructs a new OBJ loader.
5861
5856
  *
@@ -5899,7 +5894,7 @@ class Ja extends Ls {
5899
5894
  * @return {Group} The parsed OBJ.
5900
5895
  */
5901
5896
  parse(e) {
5902
- const t = new Qa();
5897
+ const t = new Za();
5903
5898
  e.indexOf(`\r
5904
5899
  `) !== -1 && (e = e.replace(/\r\n/g, `
5905
5900
  `)), e.indexOf(`\\
@@ -5943,26 +5938,26 @@ class Ja extends Ls {
5943
5938
  }
5944
5939
  } else if (d === "f") {
5945
5940
  const A = c.slice(1).trim().split(bn), p = [];
5946
- for (let f = 0, h = A.length; f < h; f++) {
5941
+ for (let f = 0, m = A.length; f < m; f++) {
5947
5942
  const y = A[f];
5948
5943
  if (y.length > 0) {
5949
- const C = y.split("/");
5950
- p.push(C);
5944
+ const v = y.split("/");
5945
+ p.push(v);
5951
5946
  }
5952
5947
  }
5953
5948
  const g = p[0];
5954
- for (let f = 1, h = p.length - 1; f < h; f++) {
5955
- const y = p[f], C = p[f + 1];
5949
+ for (let f = 1, m = p.length - 1; f < m; f++) {
5950
+ const y = p[f], v = p[f + 1];
5956
5951
  t.addFace(
5957
5952
  g[0],
5958
5953
  y[0],
5959
- C[0],
5954
+ v[0],
5960
5955
  g[1],
5961
5956
  y[1],
5962
- C[1],
5957
+ v[1],
5963
5958
  g[2],
5964
5959
  y[2],
5965
- C[2]
5960
+ v[2]
5966
5961
  );
5967
5962
  }
5968
5963
  } else if (d === "l") {
@@ -5973,21 +5968,21 @@ class Ja extends Ls {
5973
5968
  A = u;
5974
5969
  else
5975
5970
  for (let g = 0, f = u.length; g < f; g++) {
5976
- const h = u[g].split("/");
5977
- h[0] !== "" && A.push(h[0]), h[1] !== "" && p.push(h[1]);
5971
+ const m = u[g].split("/");
5972
+ m[0] !== "" && A.push(m[0]), m[1] !== "" && p.push(m[1]);
5978
5973
  }
5979
5974
  t.addLineGeometry(A, p);
5980
5975
  } else if (d === "p") {
5981
5976
  const A = c.slice(1).trim().split(" ");
5982
5977
  t.addPointGeometry(A);
5983
- } else if ((s = Va.exec(c)) !== null) {
5978
+ } else if ((s = qa.exec(c)) !== null) {
5984
5979
  const u = (" " + s[0].slice(1).trim()).slice(1);
5985
5980
  t.startObject(u);
5986
- } else if (Ka.test(c))
5981
+ } else if (Ya.test(c))
5987
5982
  t.object.startMaterial(c.substring(7).trim(), t.materialLibraries);
5988
- else if (Ya.test(c))
5983
+ else if (Va.test(c))
5989
5984
  t.materialLibraries.push(c.substring(7).trim());
5990
- else if (Za.test(c))
5985
+ else if (Ka.test(c))
5991
5986
  console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');
5992
5987
  else if (d === "s") {
5993
5988
  if (s = c.split(" "), s.length > 1) {
@@ -6011,30 +6006,30 @@ class Ja extends Ls {
6011
6006
  if (d.vertices.length === 0) continue;
6012
6007
  const f = new et();
6013
6008
  f.setAttribute("position", new Se(d.vertices, 3)), d.normals.length > 0 && f.setAttribute("normal", new Se(d.normals, 3)), d.colors.length > 0 && (g = !0, f.setAttribute("color", new Se(d.colors, 3))), d.hasUVIndices === !0 && f.setAttribute("uv", new Se(d.uvs, 2));
6014
- const h = [];
6015
- for (let C = 0, w = u.length; C < w; C++) {
6016
- const m = u[C], v = m.name + "_" + m.smooth + "_" + g;
6017
- let D = t.materials[v];
6009
+ const m = [];
6010
+ for (let v = 0, I = u.length; v < I; v++) {
6011
+ const h = u[v], w = h.name + "_" + h.smooth + "_" + g;
6012
+ let E = t.materials[w];
6018
6013
  if (this.materials !== null) {
6019
- if (D = this.materials.create(m.name), A && D && !(D instanceof xt)) {
6014
+ if (E = this.materials.create(h.name), A && E && !(E instanceof xt)) {
6020
6015
  const M = new xt();
6021
- Ct.prototype.copy.call(M, D), M.color.copy(D.color), D = M;
6022
- } else if (p && D && !(D instanceof mt)) {
6016
+ Ct.prototype.copy.call(M, E), M.color.copy(E.color), E = M;
6017
+ } else if (p && E && !(E instanceof mt)) {
6023
6018
  const M = new mt({ size: 10, sizeAttenuation: !1 });
6024
- Ct.prototype.copy.call(M, D), M.color.copy(D.color), M.map = D.map, D = M;
6019
+ Ct.prototype.copy.call(M, E), M.color.copy(E.color), M.map = E.map, E = M;
6025
6020
  }
6026
6021
  }
6027
- D === void 0 && (A ? D = new xt() : p ? D = new mt({ size: 1, sizeAttenuation: !1 }) : D = new co(), D.name = m.name, D.flatShading = !m.smooth, D.vertexColors = g, t.materials[v] = D), h.push(D);
6022
+ E === void 0 && (A ? E = new xt() : p ? E = new mt({ size: 1, sizeAttenuation: !1 }) : E = new co(), E.name = h.name, E.flatShading = !h.smooth, E.vertexColors = g, t.materials[w] = E), m.push(E);
6028
6023
  }
6029
6024
  let y;
6030
- if (h.length > 1) {
6031
- for (let C = 0, w = u.length; C < w; C++) {
6032
- const m = u[C];
6033
- f.addGroup(m.groupStart, m.groupCount, C);
6025
+ if (m.length > 1) {
6026
+ for (let v = 0, I = u.length; v < I; v++) {
6027
+ const h = u[v];
6028
+ f.addGroup(h.groupStart, h.groupCount, v);
6034
6029
  }
6035
- A ? y = new ws(f, h) : p ? y = new Bt(f, h) : y = new S(f, h);
6030
+ A ? y = new ws(f, m) : p ? y = new Bt(f, m) : y = new S(f, m);
6036
6031
  } else
6037
- A ? y = new ws(f, h[0]) : p ? y = new Bt(f, h[0]) : y = new S(f, h[0]);
6032
+ A ? y = new ws(f, m[0]) : p ? y = new Bt(f, m[0]) : y = new S(f, m[0]);
6038
6033
  y.name = c.name, i.add(y);
6039
6034
  }
6040
6035
  else if (t.vertices.length > 0) {
@@ -6047,7 +6042,7 @@ class Ja extends Ls {
6047
6042
  }
6048
6043
  }
6049
6044
  const ys = /* @__PURE__ */ new WeakMap();
6050
- class _a extends Ls {
6045
+ class Ja extends Ls {
6051
6046
  /**
6052
6047
  * Constructs a new Draco loader.
6053
6048
  *
@@ -6190,7 +6185,7 @@ class _a extends Ls {
6190
6185
  return e ? t.push(this._loadLibrary("draco_decoder.js", "text")) : (t.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), t.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(t).then((n) => {
6191
6186
  const s = n[0];
6192
6187
  e || (this.decoderConfig.wasmBinary = n[1]);
6193
- const i = $a.toString(), o = [
6188
+ const i = _a.toString(), o = [
6194
6189
  "/* draco decoder */",
6195
6190
  s,
6196
6191
  "",
@@ -6238,7 +6233,7 @@ class _a extends Ls {
6238
6233
  return this.workerPool.length = 0, this.workerSourceURL !== "" && URL.revokeObjectURL(this.workerSourceURL), this;
6239
6234
  }
6240
6235
  }
6241
- function $a() {
6236
+ function _a() {
6242
6237
  let r, e;
6243
6238
  onmessage = function(o) {
6244
6239
  const a = o.data;
@@ -6279,17 +6274,17 @@ function $a() {
6279
6274
  if (!p.ok() || A.ptr === 0)
6280
6275
  throw new Error("THREE.DRACOLoader: Decoding failed: " + p.error_msg());
6281
6276
  const f = { index: null, attributes: [] };
6282
- for (const h in d) {
6283
- const y = self[u[h]];
6284
- let C, w;
6277
+ for (const m in d) {
6278
+ const y = self[u[m]];
6279
+ let v, I;
6285
6280
  if (c.useUniqueIDs)
6286
- w = d[h], C = a.GetAttributeByUniqueId(A, w);
6281
+ I = d[m], v = a.GetAttributeByUniqueId(A, I);
6287
6282
  else {
6288
- if (w = a.GetAttributeId(A, o[d[h]]), w === -1) continue;
6289
- C = a.GetAttribute(A, w);
6283
+ if (I = a.GetAttributeId(A, o[d[m]]), I === -1) continue;
6284
+ v = a.GetAttribute(A, I);
6290
6285
  }
6291
- const m = s(o, a, A, h, y, C);
6292
- h === "color" && (m.vertexColorSpace = c.vertexColorSpace), f.attributes.push(m);
6286
+ const h = s(o, a, A, m, y, v);
6287
+ m === "color" && (h.vertexColorSpace = c.vertexColorSpace), f.attributes.push(h);
6293
6288
  }
6294
6289
  return g === o.TRIANGULAR_MESH && (f.index = n(o, a, A)), o.destroy(A), f;
6295
6290
  }
@@ -6300,26 +6295,26 @@ function $a() {
6300
6295
  return o._free(A), { array: p, itemSize: 1 };
6301
6296
  }
6302
6297
  function s(o, a, l, c, d, u) {
6303
- const A = l.num_points(), p = u.num_components(), g = i(o, d), f = p * d.BYTES_PER_ELEMENT, h = Math.ceil(f / 4) * 4, y = h / d.BYTES_PER_ELEMENT, C = A * f, w = A * h, m = o._malloc(C);
6304
- a.GetAttributeDataArrayForAllPoints(l, u, g, C, m);
6305
- const v = new d(o.HEAPF32.buffer, m, C / d.BYTES_PER_ELEMENT);
6306
- let D;
6307
- if (f === h)
6308
- D = v.slice();
6298
+ const A = l.num_points(), p = u.num_components(), g = i(o, d), f = p * d.BYTES_PER_ELEMENT, m = Math.ceil(f / 4) * 4, y = m / d.BYTES_PER_ELEMENT, v = A * f, I = A * m, h = o._malloc(v);
6299
+ a.GetAttributeDataArrayForAllPoints(l, u, g, v, h);
6300
+ const w = new d(o.HEAPF32.buffer, h, v / d.BYTES_PER_ELEMENT);
6301
+ let E;
6302
+ if (f === m)
6303
+ E = w.slice();
6309
6304
  else {
6310
- D = new d(w / d.BYTES_PER_ELEMENT);
6305
+ E = new d(I / d.BYTES_PER_ELEMENT);
6311
6306
  let M = 0;
6312
- for (let H = 0, ne = v.length; H < ne; H++) {
6313
- for (let k = 0; k < p; k++)
6314
- D[M + k] = v[H * p + k];
6307
+ for (let H = 0, ne = w.length; H < ne; H++) {
6308
+ for (let j = 0; j < p; j++)
6309
+ E[M + j] = w[H * p + j];
6315
6310
  M += y;
6316
6311
  }
6317
6312
  }
6318
- return o._free(m), {
6313
+ return o._free(h), {
6319
6314
  name: c,
6320
6315
  count: A,
6321
6316
  itemSize: p,
6322
- array: D,
6317
+ array: E,
6323
6318
  stride: y
6324
6319
  };
6325
6320
  }
@@ -6342,7 +6337,7 @@ function $a() {
6342
6337
  }
6343
6338
  }
6344
6339
  }
6345
- class el extends S {
6340
+ class $a extends S {
6346
6341
  /**
6347
6342
  * Constructs a new water instance.
6348
6343
  *
@@ -6351,7 +6346,7 @@ class el extends S {
6351
6346
  */
6352
6347
  constructor(e, t = {}) {
6353
6348
  super(e), this.isWater = !0;
6354
- const n = this, s = t.textureWidth !== void 0 ? t.textureWidth : 512, i = t.textureHeight !== void 0 ? t.textureHeight : 512, o = t.clipBias !== void 0 ? t.clipBias : 0, a = t.alpha !== void 0 ? t.alpha : 1, l = t.time !== void 0 ? t.time : 0, c = t.waterNormals !== void 0 ? t.waterNormals : null, d = t.sunDirection !== void 0 ? t.sunDirection : new R(0.70707, 0.70707, 0), u = new re(t.sunColor !== void 0 ? t.sunColor : 16777215), A = new re(t.waterColor !== void 0 ? t.waterColor : 8355711), p = t.eye !== void 0 ? t.eye : new R(0, 0, 0), g = t.distortionScale !== void 0 ? t.distortionScale : 20, f = t.side !== void 0 ? t.side : Un, h = t.fog !== void 0 ? t.fog : !1, y = new Mn(), C = new R(), w = new R(), m = new R(), v = new xe(), D = new R(0, 0, -1), M = new qs(), H = new R(), ne = new R(), k = new qs(), J = new xe(), K = new Fn(), Z = new Tn(s, i, { type: En }), z = {
6349
+ const n = this, s = t.textureWidth !== void 0 ? t.textureWidth : 512, i = t.textureHeight !== void 0 ? t.textureHeight : 512, o = t.clipBias !== void 0 ? t.clipBias : 0, a = t.alpha !== void 0 ? t.alpha : 1, l = t.time !== void 0 ? t.time : 0, c = t.waterNormals !== void 0 ? t.waterNormals : null, d = t.sunDirection !== void 0 ? t.sunDirection : new R(0.70707, 0.70707, 0), u = new re(t.sunColor !== void 0 ? t.sunColor : 16777215), A = new re(t.waterColor !== void 0 ? t.waterColor : 8355711), p = t.eye !== void 0 ? t.eye : new R(0, 0, 0), g = t.distortionScale !== void 0 ? t.distortionScale : 20, f = t.side !== void 0 ? t.side : Un, m = t.fog !== void 0 ? t.fog : !1, y = new Mn(), v = new R(), I = new R(), h = new R(), w = new xe(), E = new R(0, 0, -1), M = new qs(), H = new R(), ne = new R(), j = new qs(), J = new xe(), K = new Fn(), Z = new Tn(s, i, { type: En }), z = {
6355
6350
  name: "MirrorShader",
6356
6351
  uniforms: Zt.merge([
6357
6352
  Vs.fog,
@@ -6481,11 +6476,11 @@ class el extends S {
6481
6476
  fragmentShader: z.fragmentShader,
6482
6477
  lights: !0,
6483
6478
  side: f,
6484
- fog: h
6479
+ fog: m
6485
6480
  });
6486
6481
  L.uniforms.mirrorSampler.value = Z.texture, L.uniforms.textureMatrix.value = J, L.uniforms.alpha.value = a, L.uniforms.time.value = l, L.uniforms.normalSampler.value = c, L.uniforms.sunColor.value = u, L.uniforms.waterColor.value = A, L.uniforms.sunDirection.value = d, L.uniforms.distortionScale.value = g, L.uniforms.eye.value = p, n.material = L, n.onBeforeRender = function(Q, ee, le) {
6487
- if (w.setFromMatrixPosition(n.matrixWorld), m.setFromMatrixPosition(le.matrixWorld), v.extractRotation(n.matrixWorld), C.set(0, 0, 1), C.applyMatrix4(v), H.subVectors(w, m), H.dot(C) > 0) return;
6488
- H.reflect(C).negate(), H.add(w), v.extractRotation(le.matrixWorld), D.set(0, 0, -1), D.applyMatrix4(v), D.add(m), ne.subVectors(w, D), ne.reflect(C).negate(), ne.add(w), K.position.copy(H), K.up.set(0, 1, 0), K.up.applyMatrix4(v), K.up.reflect(C), K.lookAt(ne), K.far = le.far, K.updateMatrixWorld(), K.projectionMatrix.copy(le.projectionMatrix), J.set(
6482
+ if (I.setFromMatrixPosition(n.matrixWorld), h.setFromMatrixPosition(le.matrixWorld), w.extractRotation(n.matrixWorld), v.set(0, 0, 1), v.applyMatrix4(w), H.subVectors(I, h), H.dot(v) > 0) return;
6483
+ H.reflect(v).negate(), H.add(I), w.extractRotation(le.matrixWorld), E.set(0, 0, -1), E.applyMatrix4(w), E.add(h), ne.subVectors(I, E), ne.reflect(v).negate(), ne.add(I), K.position.copy(H), K.up.set(0, 1, 0), K.up.applyMatrix4(w), K.up.reflect(v), K.lookAt(ne), K.far = le.far, K.updateMatrixWorld(), K.projectionMatrix.copy(le.projectionMatrix), J.set(
6489
6484
  0.5,
6490
6485
  0,
6491
6486
  0,
@@ -6502,9 +6497,9 @@ class el extends S {
6502
6497
  0,
6503
6498
  0,
6504
6499
  1
6505
- ), J.multiply(K.projectionMatrix), J.multiply(K.matrixWorldInverse), y.setFromNormalAndCoplanarPoint(C, w), y.applyMatrix4(K.matrixWorldInverse), M.set(y.normal.x, y.normal.y, y.normal.z, y.constant);
6500
+ ), J.multiply(K.projectionMatrix), J.multiply(K.matrixWorldInverse), y.setFromNormalAndCoplanarPoint(v, I), y.applyMatrix4(K.matrixWorldInverse), M.set(y.normal.x, y.normal.y, y.normal.z, y.constant);
6506
6501
  const _ = K.projectionMatrix;
6507
- k.x = (Math.sign(M.x) + _.elements[8]) / _.elements[0], k.y = (Math.sign(M.y) + _.elements[9]) / _.elements[5], k.z = -1, k.w = (1 + _.elements[10]) / _.elements[14], M.multiplyScalar(2 / M.dot(k)), _.elements[2] = M.x, _.elements[6] = M.y, _.elements[10] = M.z + 1 - o, _.elements[14] = M.w, p.setFromMatrixPosition(le.matrixWorld);
6502
+ j.x = (Math.sign(M.x) + _.elements[8]) / _.elements[0], j.y = (Math.sign(M.y) + _.elements[9]) / _.elements[5], j.z = -1, j.w = (1 + _.elements[10]) / _.elements[14], M.multiplyScalar(2 / M.dot(j)), _.elements[2] = M.x, _.elements[6] = M.y, _.elements[10] = M.z + 1 - o, _.elements[14] = M.w, p.setFromMatrixPosition(le.matrixWorld);
6508
6503
  const Ee = Q.getRenderTarget(), De = Q.xr.enabled, Me = Q.shadowMap.autoUpdate;
6509
6504
  n.visible = !1, Q.xr.enabled = !1, Q.shadowMap.autoUpdate = !1, Q.setRenderTarget(Z), Q.state.buffers.depth.setMask(!0), Q.autoClear === !1 && Q.clear(), Q.render(ee, K), n.visible = !0, Q.xr.enabled = De, Q.shadowMap.autoUpdate = Me, Q.setRenderTarget(Ee);
6510
6505
  const Ue = le.viewport;
@@ -6525,7 +6520,7 @@ function oi() {
6525
6520
  const r = new P.DirectionalLight(16777215, 1.5);
6526
6521
  r.position.set(5, 5, 5), r.name = "平行光", r.userData.isMovable = !0, r.castShadow = !0, r.shadow.mapSize.set(2048, 2048);
6527
6522
  const e = 10;
6528
- r.shadow.camera.left = -e, r.shadow.camera.right = e, r.shadow.camera.top = e, r.shadow.camera.bottom = -e, r.shadow.camera.near = 0.1, r.shadow.camera.far = 25, r.shadow.bias = -5e-4, r.shadow.normalBias = 0.02, r.target.position.set(0, 0, 0);
6523
+ r.shadow.camera.left = -e, r.shadow.camera.right = e, r.shadow.camera.top = e, r.shadow.camera.bottom = -e, r.shadow.camera.near = 0.1, r.shadow.camera.far = 25, r.shadow.bias = -5e-4, r.shadow.normalBias = 0.02, r.target.position.set(0, 0, -1), r.add(r.target), r.lookAt(0, 0, 0);
6529
6524
  const t = new P.DirectionalLightHelper(r, 1);
6530
6525
  t.lightPlane.userData.name = "平行光辅助", t.userData.type = "lightHelper", r.userData.helper = t, t.update(), nt(t), nt(r, !0);
6531
6526
  }
@@ -6553,7 +6548,7 @@ function ai(r) {
6553
6548
  function li(r, e, t, n, s, i = "水体(Water)") {
6554
6549
  const a = new P.TextureLoader().load(si, (d) => {
6555
6550
  d.wrapS = d.wrapT = P.RepeatWrapping, d.repeat.set(s, s), d.generateMipmaps = !0, d.minFilter = P.LinearMipmapLinearFilter, d.magFilter = P.LinearFilter;
6556
- }), l = Math.min(1024, Math.max(256, Math.round(Math.sqrt(e * t) * 64))), c = new el(r, {
6551
+ }), l = Math.min(1024, Math.max(256, Math.round(Math.sqrt(e * t) * 64))), c = new $a(r, {
6557
6552
  textureWidth: l,
6558
6553
  textureHeight: l,
6559
6554
  waterNormals: a,
@@ -6578,8 +6573,8 @@ function ci(r) {
6578
6573
  repeatY: l = 4,
6579
6574
  speedX: c = 5e-4,
6580
6575
  speedY: d = 5e-4
6581
- } = r || {}, u = new P.PlaneGeometry(e, t), p = new P.TextureLoader().load(si, (h) => {
6582
- h.wrapS = h.wrapT = P.RepeatWrapping, h.repeat.set(a, l), h.generateMipmaps = !1, h.minFilter = P.LinearFilter, h.magFilter = P.LinearFilter;
6576
+ } = r || {}, u = new P.PlaneGeometry(e, t), p = new P.TextureLoader().load(si, (m) => {
6577
+ m.wrapS = m.wrapT = P.RepeatWrapping, m.repeat.set(a, l), m.generateMipmaps = !1, m.minFilter = P.LinearFilter, m.magFilter = P.LinearFilter;
6583
6578
  }), g = new P.MeshStandardMaterial({
6584
6579
  color: n,
6585
6580
  roughness: s,
@@ -6616,9 +6611,9 @@ function di(r) {
6616
6611
  const n = (o = r.name.split(".").pop()) == null ? void 0 : o.toLowerCase(), s = URL.createObjectURL(r);
6617
6612
  let i;
6618
6613
  if (n === "obj")
6619
- i = new Ja();
6614
+ i = new Qa();
6620
6615
  else if (n === "gltf" || n === "glb") {
6621
- const a = new _a();
6616
+ const a = new Ja();
6622
6617
  a.setDecoderPath(
6623
6618
  "https://www.gstatic.com/draco/versioned/decoders/1.5.7/"
6624
6619
  );
@@ -6670,7 +6665,7 @@ function hi(r) {
6670
6665
  break;
6671
6666
  }
6672
6667
  }
6673
- const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6668
+ const el = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6674
6669
  __proto__: null,
6675
6670
  addBox: ni,
6676
6671
  addDataPanel: ui,
@@ -6683,13 +6678,13 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6683
6678
  getDataPanel: St,
6684
6679
  importModelFromFile: di,
6685
6680
  removeDataPanel: Bn
6686
- }, Symbol.toStringTag, { value: "Module" })), sl = {
6681
+ }, Symbol.toStringTag, { value: "Module" })), tl = {
6687
6682
  key: 1,
6688
6683
  class: "toggle-placeholder"
6689
- }, nl = { class: "tree-icon" }, il = { class: "tree-name" }, ol = {
6684
+ }, sl = { class: "tree-icon" }, nl = { class: "tree-name" }, il = {
6690
6685
  key: 0,
6691
6686
  class: "tree-children"
6692
- }, rl = /* @__PURE__ */ Xe({
6687
+ }, ol = /* @__PURE__ */ Xe({
6693
6688
  __name: "TreeItem",
6694
6689
  props: {
6695
6690
  node: {},
@@ -6722,7 +6717,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6722
6717
  }, A = (f) => {
6723
6718
  f.stopPropagation(), n("delete", t.node);
6724
6719
  }, p = (f) => f.type === "Mesh" || f.type === "Sprite" ? "🟦" : f.type === "Light" ? "💡" : "📦", g = (f) => f.name || `${f.type} (${f.id})`;
6725
- return (f, h) => {
6720
+ return (f, m) => {
6726
6721
  const y = xi("TreeItem", !0);
6727
6722
  return N(), U("div", {
6728
6723
  class: "tree-node",
@@ -6736,23 +6731,23 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6736
6731
  l.value ? (N(), U("span", {
6737
6732
  key: 0,
6738
6733
  class: "toggle-icon",
6739
- onClick: h[0] || (h[0] = bs((C) => Ii(o)(f.node.uuid), ["stop"]))
6740
- }, de(a.value ? "▼" : "▶"), 1)) : (N(), U("span", sl)),
6741
- b("span", nl, de(p(f.node)), 1),
6742
- b("span", il, de(g(f.node)), 1),
6734
+ onClick: m[0] || (m[0] = bs((v) => Ii(o)(f.node.uuid), ["stop"]))
6735
+ }, de(a.value ? "▼" : "▶"), 1)) : (N(), U("span", tl)),
6736
+ b("span", sl, de(p(f.node)), 1),
6737
+ b("span", nl, de(g(f.node)), 1),
6743
6738
  b("button", {
6744
6739
  class: "tree-delete",
6745
6740
  onClick: bs(A, ["stop"])
6746
6741
  }, "×")
6747
6742
  ], 2),
6748
- a.value && l.value ? (N(), U("div", ol, [
6749
- (N(!0), U(Le, null, ns(c.value, (C) => (N(), bt(y, {
6750
- key: C.uuid,
6751
- node: C,
6743
+ a.value && l.value ? (N(), U("div", il, [
6744
+ (N(!0), U(Le, null, ns(c.value, (v) => (N(), bt(y, {
6745
+ key: v.uuid,
6746
+ node: v,
6752
6747
  "selected-object": f.selectedObject,
6753
6748
  version: f.version,
6754
- onSelect: h[1] || (h[1] = (w) => n("select", w)),
6755
- onDelete: h[2] || (h[2] = (w) => n("delete", w))
6749
+ onSelect: m[1] || (m[1] = (I) => n("select", I)),
6750
+ onDelete: m[2] || (m[2] = (I) => n("delete", I))
6756
6751
  }, null, 8, ["node", "selected-object", "version"]))), 128))
6757
6752
  ])) : ue("", !0)
6758
6753
  ], 512);
@@ -6763,46 +6758,46 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6763
6758
  for (const [n, s] of e)
6764
6759
  t[n] = s;
6765
6760
  return t;
6766
- }, al = /* @__PURE__ */ qe(rl, [["__scopeId", "data-v-5ad9c842"]]), ll = { class: "property-group" }, cl = { class: "row" }, ul = { class: "property-group" }, dl = { class: "row" }, hl = { class: "property-group" }, fl = { class: "row" }, pl = {
6761
+ }, rl = /* @__PURE__ */ qe(ol, [["__scopeId", "data-v-5ad9c842"]]), al = { class: "property-group" }, ll = { class: "row" }, cl = { class: "property-group" }, ul = { class: "row" }, dl = { class: "property-group" }, hl = { class: "row" }, fl = {
6767
6762
  key: 0,
6768
6763
  class: "property-group light-group"
6769
- }, Al = { class: "slider-row" }, ml = {
6764
+ }, pl = { class: "slider-row" }, Al = {
6770
6765
  key: 1,
6771
6766
  class: "property-group material-group"
6772
- }, gl = { class: "color-row" }, yl = ["value"], bl = ["value"], xl = { class: "slider-row" }, Il = { class: "slider-value" }, Cl = { class: "slider-row" }, wl = { class: "slider-value" }, Ml = { class: "slider-row" }, vl = { class: "slider-value" }, Tl = { class: "texture-row" }, El = { class: "texture-controls" }, Dl = {
6767
+ }, ml = { class: "color-row" }, gl = ["value"], yl = ["value"], bl = { class: "slider-row" }, xl = { class: "slider-value" }, Il = { class: "slider-row" }, Cl = { class: "slider-value" }, wl = { class: "slider-row" }, Ml = { class: "slider-value" }, vl = { class: "texture-row" }, Tl = { class: "texture-controls" }, El = {
6773
6768
  key: 0,
6774
6769
  class: "texture-upload-btn",
6775
6770
  title: "上传法线贴图"
6776
- }, Pl = {
6771
+ }, Dl = {
6777
6772
  class: "texture-modify-btn",
6778
6773
  title: "点击修改法线贴图"
6779
- }, Rl = { class: "texture-filename" }, Ol = {
6774
+ }, Pl = { class: "texture-filename" }, Rl = {
6780
6775
  key: 0,
6781
6776
  class: "slider-row"
6782
- }, Sl = { class: "slider-value" }, Ll = { class: "texture-row" }, Nl = { class: "texture-controls" }, Hl = {
6777
+ }, Ol = { class: "slider-value" }, Sl = { class: "texture-row" }, Ll = { class: "texture-controls" }, Nl = {
6783
6778
  key: 0,
6784
6779
  class: "texture-upload-btn",
6785
6780
  title: "上传环境光遮蔽贴图"
6786
- }, kl = {
6781
+ }, Hl = {
6787
6782
  class: "texture-modify-btn",
6788
6783
  title: "点击修改 AO 贴图"
6789
- }, jl = { class: "texture-filename" }, Fl = {
6784
+ }, kl = { class: "texture-filename" }, jl = {
6790
6785
  key: 1,
6791
6786
  class: "slider-row"
6792
- }, Ul = { class: "slider-value" }, zl = { class: "texture-row" }, Gl = { class: "texture-controls" }, Wl = {
6787
+ }, Fl = { class: "slider-value" }, Ul = { class: "texture-row" }, zl = { class: "texture-controls" }, Gl = {
6793
6788
  key: 0,
6794
6789
  class: "texture-upload-btn",
6795
6790
  title: "上传模型贴图"
6796
- }, Bl = {
6791
+ }, Wl = {
6797
6792
  class: "texture-modify-btn",
6798
6793
  title: "点击修改模型贴图"
6799
- }, Xl = { class: "texture-filename" }, ql = {
6794
+ }, Bl = { class: "texture-filename" }, Xl = {
6800
6795
  key: 2,
6801
6796
  class: "material-hint"
6802
- }, Vl = {
6797
+ }, ql = {
6803
6798
  key: 2,
6804
6799
  class: "property-group water-group"
6805
- }, Yl = { class: "color-row" }, Kl = ["value"], Zl = ["value"], Ql = /* @__PURE__ */ Xe({
6800
+ }, Vl = { class: "color-row" }, Yl = ["value"], Kl = ["value"], Zl = /* @__PURE__ */ Xe({
6806
6801
  __name: "TransformTab",
6807
6802
  props: {
6808
6803
  transform: {},
@@ -6822,19 +6817,19 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6822
6817
  const u = W(!1), A = W("");
6823
6818
  let p = null;
6824
6819
  const g = W(!1), f = W("");
6825
- let h = null;
6820
+ let m = null;
6826
6821
  const y = xs({
6827
6822
  intensity: 1
6828
6823
  });
6829
- function C() {
6824
+ function v() {
6830
6825
  t.selectedObject && t.selectedObject.type === "DirectionalLight" && (t.selectedObject.intensity = y.intensity);
6831
6826
  }
6832
- function w(E) {
6827
+ function I(D) {
6833
6828
  let x = null;
6834
- return E.traverse((T) => {
6829
+ return D.traverse((T) => {
6835
6830
  if (T.type === "Mesh" && !x) {
6836
- const O = T, j = Array.isArray(O.material) ? O.material : [O.material];
6837
- for (const V of j)
6831
+ const O = T, k = Array.isArray(O.material) ? O.material : [O.material];
6832
+ for (const V of k)
6838
6833
  if (V && (V.type === "MeshStandardMaterial" || V.type === "MeshPhongMaterial" || V.type === "MeshBasicMaterial" || V.type === "MeshLambertMaterial" || V.type === "MeshToonMaterial" || V.type === "MeshPhysicalMaterial")) {
6839
6834
  x = V;
6840
6835
  break;
@@ -6842,12 +6837,12 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6842
6837
  }
6843
6838
  }), x;
6844
6839
  }
6845
- function m(E) {
6840
+ function h(D) {
6846
6841
  let x = null;
6847
- return E.traverse((T) => {
6842
+ return D.traverse((T) => {
6848
6843
  if (T.type === "Mesh" && !x) {
6849
- const O = T, j = Array.isArray(O.material) ? O.material : [O.material];
6850
- for (const V of j)
6844
+ const O = T, k = Array.isArray(O.material) ? O.material : [O.material];
6845
+ for (const V of k)
6851
6846
  if (V && (V.type === "MeshStandardMaterial" || V.type === "MeshPhongMaterial" || V.type === "MeshBasicMaterial" || V.type === "MeshLambertMaterial" || V.type === "MeshToonMaterial" || V.type === "MeshPhysicalMaterial")) {
6852
6847
  const q = V;
6853
6848
  x = {
@@ -6861,48 +6856,48 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6861
6856
  }
6862
6857
  }), x;
6863
6858
  }
6864
- function v(E, x) {
6859
+ function w(D, x) {
6865
6860
  let T = !1;
6866
- return E.traverse((O) => {
6861
+ return D.traverse((O) => {
6867
6862
  if (O.type === "Mesh") {
6868
- const j = O, V = Array.isArray(j.material) ? j.material : [j.material];
6863
+ const k = O, V = Array.isArray(k.material) ? k.material : [k.material];
6869
6864
  for (const q of V)
6870
6865
  q && (q.type === "MeshStandardMaterial" || q.type === "MeshPhongMaterial" || q.type === "MeshBasicMaterial" || q.type === "MeshLambertMaterial" || q.type === "MeshToonMaterial" || q.type === "MeshPhysicalMaterial") && (x.color !== void 0 && (q.color = new re(x.color)), x.metalness !== void 0 && (q.metalness = x.metalness), x.roughness !== void 0 && (q.roughness = x.roughness), x.opacity !== void 0 && (q.opacity = x.opacity, q.transparent = x.opacity < 1), q.needsUpdate = !0, T = !0);
6871
6866
  }
6872
6867
  }), T;
6873
6868
  }
6874
- function D() {
6869
+ function E() {
6875
6870
  if (t.selectedObject) {
6876
- const E = v(t.selectedObject, {
6871
+ const D = w(t.selectedObject, {
6877
6872
  metalness: i.metalness,
6878
6873
  roughness: i.roughness,
6879
6874
  opacity: i.opacity
6880
6875
  });
6881
- a.value = E;
6876
+ a.value = D;
6882
6877
  }
6883
6878
  }
6884
- function M(E) {
6885
- const T = E.target.value;
6879
+ function M(D) {
6880
+ const T = D.target.value;
6886
6881
  o.value = T;
6887
6882
  const O = new re(T);
6888
- i.color = O.getHex(), t.selectedObject && v(t.selectedObject, { color: O.getHex() });
6883
+ i.color = O.getHex(), t.selectedObject && w(t.selectedObject, { color: O.getHex() });
6889
6884
  }
6890
- function H(E) {
6891
- let T = E.target.value.trim();
6885
+ function H(D) {
6886
+ let T = D.target.value.trim();
6892
6887
  if (T.startsWith("#") || (T = "#" + T), /^#[0-9a-fA-F]{6}$/.test(T)) {
6893
6888
  o.value = T;
6894
6889
  const O = new re(T);
6895
- i.color = O.getHex(), t.selectedObject && v(t.selectedObject, { color: O.getHex() });
6890
+ i.color = O.getHex(), t.selectedObject && w(t.selectedObject, { color: O.getHex() });
6896
6891
  }
6897
6892
  }
6898
- function ne(E) {
6893
+ function ne(D) {
6899
6894
  var T, O;
6900
- const x = w(E);
6895
+ const x = I(D);
6901
6896
  x && x.normalMap ? (l.value = !0, d = x.normalMap, c.value = ((T = x.userData) == null ? void 0 : T._normalMapFileName) || "法线贴图", i.normalScale = ((O = x.normalScale) == null ? void 0 : O.x) ?? 1) : (l.value = !1, d = null, c.value = "", i.normalScale = 1);
6902
6897
  }
6903
- function k(E) {
6904
- var j;
6905
- const x = E.target, T = (j = x.files) == null ? void 0 : j[0];
6898
+ function j(D) {
6899
+ var k;
6900
+ const x = D.target, T = (k = x.files) == null ? void 0 : k[0];
6906
6901
  if (!T || !t.selectedObject) return;
6907
6902
  const O = new FileReader();
6908
6903
  O.onload = (V) => {
@@ -6911,20 +6906,20 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6911
6906
  J(t.selectedObject, q, T.name);
6912
6907
  }, O.readAsDataURL(T), x.value = "";
6913
6908
  }
6914
- function J(E, x, T) {
6915
- const j = new Wt().load(x);
6916
- j.wrapS = j.wrapT = _e, j.repeat.set(1, 1), E.traverse((V) => {
6909
+ function J(D, x, T) {
6910
+ const k = new Wt().load(x);
6911
+ k.wrapS = k.wrapT = _e, k.repeat.set(1, 1), D.traverse((V) => {
6917
6912
  if (V.type === "Mesh") {
6918
6913
  const q = V, Ae = Array.isArray(q.material) ? q.material : [q.material];
6919
6914
  for (const G of Ae)
6920
- G && (G.type === "MeshStandardMaterial" || G.type === "MeshPhongMaterial" || G.type === "MeshToonMaterial" || G.type === "MeshPhysicalMaterial") && (G.normalMap = j, G.normalScale = new ce(i.normalScale, i.normalScale), G.userData = G.userData || {}, G.userData._normalMapDataUrl = x, G.userData._normalMapFileName = T, G.needsUpdate = !0);
6915
+ G && (G.type === "MeshStandardMaterial" || G.type === "MeshPhongMaterial" || G.type === "MeshToonMaterial" || G.type === "MeshPhysicalMaterial") && (G.normalMap = k, G.normalScale = new ce(i.normalScale, i.normalScale), G.userData = G.userData || {}, G.userData._normalMapDataUrl = x, G.userData._normalMapFileName = T, G.needsUpdate = !0);
6921
6916
  }
6922
- }), d = j, l.value = !0, c.value = T;
6917
+ }), d = k, l.value = !0, c.value = T;
6923
6918
  }
6924
6919
  function K() {
6925
- t.selectedObject && (t.selectedObject.traverse((E) => {
6926
- if (E.type === "Mesh") {
6927
- const x = E, T = Array.isArray(x.material) ? x.material : [x.material];
6920
+ t.selectedObject && (t.selectedObject.traverse((D) => {
6921
+ if (D.type === "Mesh") {
6922
+ const x = D, T = Array.isArray(x.material) ? x.material : [x.material];
6928
6923
  for (const O of T)
6929
6924
  O.normalMap && (O.normalMap = null, O.userData && (delete O.userData._normalMapDataUrl, delete O.userData._normalMapFileName), O.needsUpdate = !0);
6930
6925
  }
@@ -6932,23 +6927,23 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6932
6927
  }
6933
6928
  function Z() {
6934
6929
  if (!t.selectedObject) return;
6935
- const E = i.normalScale;
6930
+ const D = i.normalScale;
6936
6931
  t.selectedObject.traverse((x) => {
6937
6932
  if (x.type === "Mesh") {
6938
6933
  const T = x, O = Array.isArray(T.material) ? T.material : [T.material];
6939
- for (const j of O)
6940
- j.normalMap && (j.normalScale = new ce(E, E), j.needsUpdate = !0);
6934
+ for (const k of O)
6935
+ k.normalMap && (k.normalScale = new ce(D, D), k.needsUpdate = !0);
6941
6936
  }
6942
6937
  });
6943
6938
  }
6944
- function z(E) {
6939
+ function z(D) {
6945
6940
  var T;
6946
- const x = w(E);
6941
+ const x = I(D);
6947
6942
  x && x.map ? (u.value = !0, p = x.map, A.value = ((T = x.userData) == null ? void 0 : T._mapFileName) || "模型贴图") : (u.value = !1, p = null, A.value = "");
6948
6943
  }
6949
- function L(E) {
6950
- var j;
6951
- const x = E.target, T = (j = x.files) == null ? void 0 : j[0];
6944
+ function L(D) {
6945
+ var k;
6946
+ const x = D.target, T = (k = x.files) == null ? void 0 : k[0];
6952
6947
  if (!T || !t.selectedObject) return;
6953
6948
  const O = new FileReader();
6954
6949
  O.onload = (V) => {
@@ -6957,33 +6952,33 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6957
6952
  Q(t.selectedObject, q, T.name);
6958
6953
  }, O.readAsDataURL(T), x.value = "";
6959
6954
  }
6960
- function Q(E, x, T) {
6961
- const j = new Wt().load(x);
6962
- j.wrapS = j.wrapT = _e, j.repeat.set(1, 1), E.traverse((V) => {
6955
+ function Q(D, x, T) {
6956
+ const k = new Wt().load(x);
6957
+ k.wrapS = k.wrapT = _e, k.repeat.set(1, 1), D.traverse((V) => {
6963
6958
  if (V.type === "Mesh") {
6964
6959
  const q = V, Ae = Array.isArray(q.material) ? q.material : [q.material];
6965
6960
  for (const G of Ae)
6966
- G && (G.type === "MeshStandardMaterial" || G.type === "MeshPhongMaterial" || G.type === "MeshBasicMaterial" || G.type === "MeshLambertMaterial" || G.type === "MeshToonMaterial" || G.type === "MeshPhysicalMaterial") && (G.map = j, G.userData = G.userData || {}, G.userData._mapDataUrl = x, G.userData._mapFileName = T, G.needsUpdate = !0);
6961
+ G && (G.type === "MeshStandardMaterial" || G.type === "MeshPhongMaterial" || G.type === "MeshBasicMaterial" || G.type === "MeshLambertMaterial" || G.type === "MeshToonMaterial" || G.type === "MeshPhysicalMaterial") && (G.map = k, G.userData = G.userData || {}, G.userData._mapDataUrl = x, G.userData._mapFileName = T, G.needsUpdate = !0);
6967
6962
  }
6968
- }), p = j, u.value = !0, A.value = T;
6963
+ }), p = k, u.value = !0, A.value = T;
6969
6964
  }
6970
6965
  function ee() {
6971
- t.selectedObject && (t.selectedObject.traverse((E) => {
6972
- if (E.type === "Mesh") {
6973
- const x = E, T = Array.isArray(x.material) ? x.material : [x.material];
6966
+ t.selectedObject && (t.selectedObject.traverse((D) => {
6967
+ if (D.type === "Mesh") {
6968
+ const x = D, T = Array.isArray(x.material) ? x.material : [x.material];
6974
6969
  for (const O of T)
6975
6970
  O.map && (O.map = null, O.userData && (delete O.userData._mapDataUrl, delete O.userData._mapFileName), O.needsUpdate = !0);
6976
6971
  }
6977
6972
  }), p && (p.dispose(), p = null), u.value = !1, A.value = "");
6978
6973
  }
6979
- function le(E) {
6974
+ function le(D) {
6980
6975
  var T;
6981
- const x = w(E);
6982
- x && x.aoMap ? (g.value = !0, h = x.aoMap, f.value = ((T = x.userData) == null ? void 0 : T._aoMapFileName) || "AO 贴图", i.aoIntensity = x.aoMapIntensity ?? 1) : (g.value = !1, h = null, f.value = "", i.aoIntensity = 1);
6976
+ const x = I(D);
6977
+ x && x.aoMap ? (g.value = !0, m = x.aoMap, f.value = ((T = x.userData) == null ? void 0 : T._aoMapFileName) || "AO 贴图", i.aoIntensity = x.aoMapIntensity ?? 1) : (g.value = !1, m = null, f.value = "", i.aoIntensity = 1);
6983
6978
  }
6984
- function _(E) {
6985
- var j;
6986
- const x = E.target, T = (j = x.files) == null ? void 0 : j[0];
6979
+ function _(D) {
6980
+ var k;
6981
+ const x = D.target, T = (k = x.files) == null ? void 0 : k[0];
6987
6982
  if (!T || !t.selectedObject) return;
6988
6983
  const O = new FileReader();
6989
6984
  O.onload = (V) => {
@@ -6992,49 +6987,49 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6992
6987
  Ee(t.selectedObject, q, T.name);
6993
6988
  }, O.readAsDataURL(T), x.value = "";
6994
6989
  }
6995
- function Ee(E, x, T) {
6996
- const j = new Wt().load(x);
6997
- j.wrapS = j.wrapT = _e, j.repeat.set(1, 1), E.traverse((V) => {
6990
+ function Ee(D, x, T) {
6991
+ const k = new Wt().load(x);
6992
+ k.wrapS = k.wrapT = _e, k.repeat.set(1, 1), D.traverse((V) => {
6998
6993
  if (V.type === "Mesh") {
6999
6994
  const q = V, Ae = Array.isArray(q.material) ? q.material : [q.material];
7000
6995
  for (const G of Ae)
7001
- G && (G.type === "MeshStandardMaterial" || G.type === "MeshPhongMaterial" || G.type === "MeshToonMaterial" || G.type === "MeshPhysicalMaterial") && (G.aoMap = j, G.aoMapIntensity = i.aoIntensity, G.userData = G.userData || {}, G.userData._aoMapDataUrl = x, G.userData._aoMapFileName = T, G.needsUpdate = !0);
6996
+ G && (G.type === "MeshStandardMaterial" || G.type === "MeshPhongMaterial" || G.type === "MeshToonMaterial" || G.type === "MeshPhysicalMaterial") && (G.aoMap = k, G.aoMapIntensity = i.aoIntensity, G.userData = G.userData || {}, G.userData._aoMapDataUrl = x, G.userData._aoMapFileName = T, G.needsUpdate = !0);
7002
6997
  }
7003
- }), h = j, g.value = !0, f.value = T;
6998
+ }), m = k, g.value = !0, f.value = T;
7004
6999
  }
7005
7000
  function De() {
7006
- t.selectedObject && (t.selectedObject.traverse((E) => {
7007
- if (E.type === "Mesh") {
7008
- const x = E, T = Array.isArray(x.material) ? x.material : [x.material];
7001
+ t.selectedObject && (t.selectedObject.traverse((D) => {
7002
+ if (D.type === "Mesh") {
7003
+ const x = D, T = Array.isArray(x.material) ? x.material : [x.material];
7009
7004
  for (const O of T)
7010
7005
  O.aoMap && (O.aoMap = null, O.userData && (delete O.userData._aoMapDataUrl, delete O.userData._aoMapFileName), O.needsUpdate = !0);
7011
7006
  }
7012
- }), h && (h.dispose(), h = null), g.value = !1, f.value = "");
7007
+ }), m && (m.dispose(), m = null), g.value = !1, f.value = "");
7013
7008
  }
7014
7009
  function Me() {
7015
7010
  if (!t.selectedObject) return;
7016
- const E = i.aoIntensity;
7011
+ const D = i.aoIntensity;
7017
7012
  t.selectedObject.traverse((x) => {
7018
7013
  if (x.type === "Mesh") {
7019
7014
  const T = x, O = Array.isArray(T.material) ? T.material : [T.material];
7020
- for (const j of O)
7021
- j.aoMap && (j.aoMapIntensity = E, j.needsUpdate = !0);
7015
+ for (const k of O)
7016
+ k.aoMap && (k.aoMapIntensity = D, k.needsUpdate = !0);
7022
7017
  }
7023
7018
  });
7024
7019
  }
7025
7020
  const Ue = ot(() => {
7026
- const E = t.selectedObject;
7027
- if (!E) return !1;
7021
+ const D = t.selectedObject;
7022
+ if (!D) return !1;
7028
7023
  let x = !1;
7029
- return E.traverse((T) => {
7024
+ return D.traverse((T) => {
7030
7025
  if (!x && T.type === "Mesh") {
7031
7026
  const O = T.material;
7032
7027
  O.uniforms && O.uniforms.waterColor && (x = !0);
7033
7028
  }
7034
7029
  }), x;
7035
7030
  }), Pe = W("#4fc3f7");
7036
- function fi(E) {
7037
- E.traverse((x) => {
7031
+ function fi(D) {
7032
+ D.traverse((x) => {
7038
7033
  if (x.type === "Mesh") {
7039
7034
  const T = x.material;
7040
7035
  if (T.uniforms && T.uniforms.waterColor) {
@@ -7044,47 +7039,47 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7044
7039
  }
7045
7040
  });
7046
7041
  }
7047
- function js(E, x) {
7042
+ function js(D, x) {
7048
7043
  const T = new re(x);
7049
- E.traverse((O) => {
7044
+ D.traverse((O) => {
7050
7045
  if (O.type === "Mesh") {
7051
- const j = O.material;
7052
- j.uniforms && j.uniforms.waterColor && j.uniforms.waterColor.value.copy(T);
7046
+ const k = O.material;
7047
+ k.uniforms && k.uniforms.waterColor && k.uniforms.waterColor.value.copy(T);
7053
7048
  }
7054
7049
  });
7055
7050
  }
7056
- function pi(E) {
7057
- const T = E.target.value;
7051
+ function pi(D) {
7052
+ const T = D.target.value;
7058
7053
  Pe.value = T, t.selectedObject && js(t.selectedObject, T);
7059
7054
  }
7060
- function Ai(E) {
7061
- let T = E.target.value.trim();
7055
+ function Ai(D) {
7056
+ let T = D.target.value.trim();
7062
7057
  T.startsWith("#") || (T = "#" + T), /^#[0-9a-fA-F]{6}$/.test(T) && (Pe.value = T, t.selectedObject && js(t.selectedObject, T));
7063
7058
  }
7064
7059
  return ve(
7065
7060
  () => t.selectedObject,
7066
- (E) => {
7067
- if (E) {
7068
- const x = m(E);
7069
- x ? (i.color = x.color, i.metalness = x.metalness, i.roughness = x.roughness, i.opacity = x.opacity, o.value = "#" + new re(x.color).getHexString(), a.value = !0) : (i.color = 16777215, i.metalness = 0, i.roughness = 0.5, i.opacity = 1, o.value = "#ffffff", a.value = !1), ne(E), z(E), le(E), E.type === "DirectionalLight" && (y.intensity = E.intensity ?? 1), fi(E);
7061
+ (D) => {
7062
+ if (D) {
7063
+ const x = h(D);
7064
+ x ? (i.color = x.color, i.metalness = x.metalness, i.roughness = x.roughness, i.opacity = x.opacity, o.value = "#" + new re(x.color).getHexString(), a.value = !0) : (i.color = 16777215, i.metalness = 0, i.roughness = 0.5, i.opacity = 1, o.value = "#ffffff", a.value = !1), ne(D), z(D), le(D), D.type === "DirectionalLight" && (y.intensity = D.intensity ?? 1), fi(D);
7070
7065
  } else
7071
7066
  i.color = 16777215, i.metalness = 0, i.roughness = 0.5, i.opacity = 1, o.value = "#ffffff", a.value = !1, l.value = !1, c.value = "", u.value = !1, A.value = "", g.value = !1, f.value = "";
7072
7067
  },
7073
7068
  { immediate: !0 }
7074
- ), (E, x) => (N(), U("div", null, [
7075
- b("div", ll, [
7069
+ ), (D, x) => (N(), U("div", null, [
7070
+ b("div", al, [
7076
7071
  x[19] || (x[19] = b("label", null, "位置", -1)),
7077
- b("div", cl, [
7072
+ b("div", ll, [
7078
7073
  x[16] || (x[16] = b("span", null, "X:", -1)),
7079
7074
  F(b("input", {
7080
7075
  type: "number",
7081
- "onUpdate:modelValue": x[0] || (x[0] = (T) => E.transform.position.x = T),
7076
+ "onUpdate:modelValue": x[0] || (x[0] = (T) => D.transform.position.x = T),
7082
7077
  step: "0.01",
7083
7078
  onInput: s
7084
7079
  }, null, 544), [
7085
7080
  [
7086
7081
  Y,
7087
- E.transform.position.x,
7082
+ D.transform.position.x,
7088
7083
  void 0,
7089
7084
  { number: !0 }
7090
7085
  ]
@@ -7092,13 +7087,13 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7092
7087
  x[17] || (x[17] = b("span", null, "Y:", -1)),
7093
7088
  F(b("input", {
7094
7089
  type: "number",
7095
- "onUpdate:modelValue": x[1] || (x[1] = (T) => E.transform.position.y = T),
7090
+ "onUpdate:modelValue": x[1] || (x[1] = (T) => D.transform.position.y = T),
7096
7091
  step: "0.01",
7097
7092
  onInput: s
7098
7093
  }, null, 544), [
7099
7094
  [
7100
7095
  Y,
7101
- E.transform.position.y,
7096
+ D.transform.position.y,
7102
7097
  void 0,
7103
7098
  { number: !0 }
7104
7099
  ]
@@ -7106,32 +7101,32 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7106
7101
  x[18] || (x[18] = b("span", null, "Z:", -1)),
7107
7102
  F(b("input", {
7108
7103
  type: "number",
7109
- "onUpdate:modelValue": x[2] || (x[2] = (T) => E.transform.position.z = T),
7104
+ "onUpdate:modelValue": x[2] || (x[2] = (T) => D.transform.position.z = T),
7110
7105
  step: "0.01",
7111
7106
  onInput: s
7112
7107
  }, null, 544), [
7113
7108
  [
7114
7109
  Y,
7115
- E.transform.position.z,
7110
+ D.transform.position.z,
7116
7111
  void 0,
7117
7112
  { number: !0 }
7118
7113
  ]
7119
7114
  ])
7120
7115
  ])
7121
7116
  ]),
7122
- b("div", ul, [
7117
+ b("div", cl, [
7123
7118
  x[23] || (x[23] = b("label", null, "旋转 (弧度)", -1)),
7124
- b("div", dl, [
7119
+ b("div", ul, [
7125
7120
  x[20] || (x[20] = b("span", null, "X:", -1)),
7126
7121
  F(b("input", {
7127
7122
  type: "number",
7128
- "onUpdate:modelValue": x[3] || (x[3] = (T) => E.transform.rotation.x = T),
7123
+ "onUpdate:modelValue": x[3] || (x[3] = (T) => D.transform.rotation.x = T),
7129
7124
  step: "0.01",
7130
7125
  onInput: s
7131
7126
  }, null, 544), [
7132
7127
  [
7133
7128
  Y,
7134
- E.transform.rotation.x,
7129
+ D.transform.rotation.x,
7135
7130
  void 0,
7136
7131
  { number: !0 }
7137
7132
  ]
@@ -7139,13 +7134,13 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7139
7134
  x[21] || (x[21] = b("span", null, "Y:", -1)),
7140
7135
  F(b("input", {
7141
7136
  type: "number",
7142
- "onUpdate:modelValue": x[4] || (x[4] = (T) => E.transform.rotation.y = T),
7137
+ "onUpdate:modelValue": x[4] || (x[4] = (T) => D.transform.rotation.y = T),
7143
7138
  step: "0.01",
7144
7139
  onInput: s
7145
7140
  }, null, 544), [
7146
7141
  [
7147
7142
  Y,
7148
- E.transform.rotation.y,
7143
+ D.transform.rotation.y,
7149
7144
  void 0,
7150
7145
  { number: !0 }
7151
7146
  ]
@@ -7153,32 +7148,32 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7153
7148
  x[22] || (x[22] = b("span", null, "Z:", -1)),
7154
7149
  F(b("input", {
7155
7150
  type: "number",
7156
- "onUpdate:modelValue": x[5] || (x[5] = (T) => E.transform.rotation.z = T),
7151
+ "onUpdate:modelValue": x[5] || (x[5] = (T) => D.transform.rotation.z = T),
7157
7152
  step: "0.01",
7158
7153
  onInput: s
7159
7154
  }, null, 544), [
7160
7155
  [
7161
7156
  Y,
7162
- E.transform.rotation.z,
7157
+ D.transform.rotation.z,
7163
7158
  void 0,
7164
7159
  { number: !0 }
7165
7160
  ]
7166
7161
  ])
7167
7162
  ])
7168
7163
  ]),
7169
- b("div", hl, [
7164
+ b("div", dl, [
7170
7165
  x[27] || (x[27] = b("label", null, "缩放", -1)),
7171
- b("div", fl, [
7166
+ b("div", hl, [
7172
7167
  x[24] || (x[24] = b("span", null, "X:", -1)),
7173
7168
  F(b("input", {
7174
7169
  type: "number",
7175
- "onUpdate:modelValue": x[6] || (x[6] = (T) => E.transform.scale.x = T),
7170
+ "onUpdate:modelValue": x[6] || (x[6] = (T) => D.transform.scale.x = T),
7176
7171
  step: "0.01",
7177
7172
  onInput: s
7178
7173
  }, null, 544), [
7179
7174
  [
7180
7175
  Y,
7181
- E.transform.scale.x,
7176
+ D.transform.scale.x,
7182
7177
  void 0,
7183
7178
  { number: !0 }
7184
7179
  ]
@@ -7186,13 +7181,13 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7186
7181
  x[25] || (x[25] = b("span", null, "Y:", -1)),
7187
7182
  F(b("input", {
7188
7183
  type: "number",
7189
- "onUpdate:modelValue": x[7] || (x[7] = (T) => E.transform.scale.y = T),
7184
+ "onUpdate:modelValue": x[7] || (x[7] = (T) => D.transform.scale.y = T),
7190
7185
  step: "0.01",
7191
7186
  onInput: s
7192
7187
  }, null, 544), [
7193
7188
  [
7194
7189
  Y,
7195
- E.transform.scale.y,
7190
+ D.transform.scale.y,
7196
7191
  void 0,
7197
7192
  { number: !0 }
7198
7193
  ]
@@ -7200,22 +7195,22 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7200
7195
  x[26] || (x[26] = b("span", null, "Z:", -1)),
7201
7196
  F(b("input", {
7202
7197
  type: "number",
7203
- "onUpdate:modelValue": x[8] || (x[8] = (T) => E.transform.scale.z = T),
7198
+ "onUpdate:modelValue": x[8] || (x[8] = (T) => D.transform.scale.z = T),
7204
7199
  step: "0.01",
7205
7200
  onInput: s
7206
7201
  }, null, 544), [
7207
7202
  [
7208
7203
  Y,
7209
- E.transform.scale.z,
7204
+ D.transform.scale.z,
7210
7205
  void 0,
7211
7206
  { number: !0 }
7212
7207
  ]
7213
7208
  ])
7214
7209
  ])
7215
7210
  ]),
7216
- E.selectedObject && E.selectedObject.type === "DirectionalLight" ? (N(), U("div", pl, [
7211
+ D.selectedObject && D.selectedObject.type === "DirectionalLight" ? (N(), U("div", fl, [
7217
7212
  x[29] || (x[29] = b("label", null, "光源属性", -1)),
7218
- b("div", Al, [
7213
+ b("div", pl, [
7219
7214
  x[28] || (x[28] = b("span", { class: "slider-label" }, "强度", -1)),
7220
7215
  F(b("input", {
7221
7216
  type: "range",
@@ -7223,7 +7218,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7223
7218
  max: "10",
7224
7219
  step: "0.1",
7225
7220
  "onUpdate:modelValue": x[9] || (x[9] = (T) => y.intensity = T),
7226
- onInput: C
7221
+ onInput: v
7227
7222
  }, null, 544), [
7228
7223
  [
7229
7224
  Y,
@@ -7239,7 +7234,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7239
7234
  step: "0.1",
7240
7235
  "onUpdate:modelValue": x[10] || (x[10] = (T) => y.intensity = T),
7241
7236
  class: "intensity-input",
7242
- onInput: C
7237
+ onInput: v
7243
7238
  }, null, 544), [
7244
7239
  [
7245
7240
  Y,
@@ -7250,25 +7245,25 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7250
7245
  ])
7251
7246
  ])
7252
7247
  ])) : ue("", !0),
7253
- E.selectedObject ? (N(), U("div", ml, [
7248
+ D.selectedObject ? (N(), U("div", Al, [
7254
7249
  x[45] || (x[45] = b("label", null, "材质", -1)),
7255
- b("div", gl, [
7250
+ b("div", ml, [
7256
7251
  x[30] || (x[30] = b("span", { class: "slider-label" }, "颜色", -1)),
7257
7252
  b("input", {
7258
7253
  type: "color",
7259
7254
  value: o.value,
7260
7255
  onInput: M,
7261
7256
  class: "color-picker"
7262
- }, null, 40, yl),
7257
+ }, null, 40, gl),
7263
7258
  b("input", {
7264
7259
  type: "text",
7265
7260
  value: o.value,
7266
7261
  onInput: H,
7267
7262
  class: "color-text-input",
7268
7263
  placeholder: "#ffffff"
7269
- }, null, 40, bl)
7264
+ }, null, 40, yl)
7270
7265
  ]),
7271
- b("div", xl, [
7266
+ b("div", bl, [
7272
7267
  x[31] || (x[31] = b("span", { class: "slider-label" }, "金属度", -1)),
7273
7268
  F(b("input", {
7274
7269
  type: "range",
@@ -7276,7 +7271,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7276
7271
  max: "1",
7277
7272
  step: "0.01",
7278
7273
  "onUpdate:modelValue": x[11] || (x[11] = (T) => i.metalness = T),
7279
- onInput: D
7274
+ onInput: E
7280
7275
  }, null, 544), [
7281
7276
  [
7282
7277
  Y,
@@ -7285,9 +7280,9 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7285
7280
  { number: !0 }
7286
7281
  ]
7287
7282
  ]),
7288
- b("span", Il, de(i.metalness.toFixed(2)), 1)
7283
+ b("span", xl, de(i.metalness.toFixed(2)), 1)
7289
7284
  ]),
7290
- b("div", Cl, [
7285
+ b("div", Il, [
7291
7286
  x[32] || (x[32] = b("span", { class: "slider-label" }, "粗糙度", -1)),
7292
7287
  F(b("input", {
7293
7288
  type: "range",
@@ -7295,7 +7290,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7295
7290
  max: "1",
7296
7291
  step: "0.01",
7297
7292
  "onUpdate:modelValue": x[12] || (x[12] = (T) => i.roughness = T),
7298
- onInput: D
7293
+ onInput: E
7299
7294
  }, null, 544), [
7300
7295
  [
7301
7296
  Y,
@@ -7304,9 +7299,9 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7304
7299
  { number: !0 }
7305
7300
  ]
7306
7301
  ]),
7307
- b("span", wl, de(i.roughness.toFixed(2)), 1)
7302
+ b("span", Cl, de(i.roughness.toFixed(2)), 1)
7308
7303
  ]),
7309
- b("div", Ml, [
7304
+ b("div", wl, [
7310
7305
  x[33] || (x[33] = b("span", { class: "slider-label" }, "透明度", -1)),
7311
7306
  F(b("input", {
7312
7307
  type: "range",
@@ -7314,7 +7309,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7314
7309
  max: "1",
7315
7310
  step: "0.01",
7316
7311
  "onUpdate:modelValue": x[13] || (x[13] = (T) => i.opacity = T),
7317
- onInput: D
7312
+ onInput: E
7318
7313
  }, null, 544), [
7319
7314
  [
7320
7315
  Y,
@@ -7323,20 +7318,20 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7323
7318
  { number: !0 }
7324
7319
  ]
7325
7320
  ]),
7326
- b("span", vl, de(i.opacity.toFixed(2)), 1)
7321
+ b("span", Ml, de(i.opacity.toFixed(2)), 1)
7327
7322
  ]),
7328
- b("div", Tl, [
7323
+ b("div", vl, [
7329
7324
  x[36] || (x[36] = b("span", { class: "slider-label" }, "法线贴图", -1)),
7330
- b("div", El, [
7325
+ b("div", Tl, [
7331
7326
  l.value ? (N(), U(Le, { key: 1 }, [
7332
- b("label", Pl, [
7327
+ b("label", Dl, [
7333
7328
  b("input", {
7334
7329
  type: "file",
7335
7330
  accept: "image/*",
7336
- onChange: k,
7331
+ onChange: j,
7337
7332
  class: "texture-file-input"
7338
7333
  }, null, 32),
7339
- b("span", Rl, de(c.value), 1),
7334
+ b("span", Pl, de(c.value), 1),
7340
7335
  x[35] || (x[35] = b("span", { class: "modify-hint" }, "修改", -1))
7341
7336
  ]),
7342
7337
  b("button", {
@@ -7344,18 +7339,18 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7344
7339
  title: "移除法线贴图",
7345
7340
  onClick: K
7346
7341
  }, " ✕ ")
7347
- ], 64)) : (N(), U("label", Dl, [
7342
+ ], 64)) : (N(), U("label", El, [
7348
7343
  b("input", {
7349
7344
  type: "file",
7350
7345
  accept: "image/*",
7351
- onChange: k,
7346
+ onChange: j,
7352
7347
  class: "texture-file-input"
7353
7348
  }, null, 32),
7354
7349
  x[34] || (x[34] = os(" + 选择 "))
7355
7350
  ]))
7356
7351
  ])
7357
7352
  ]),
7358
- l.value ? (N(), U("div", Ol, [
7353
+ l.value ? (N(), U("div", Rl, [
7359
7354
  x[37] || (x[37] = b("span", { class: "slider-label" }, "法线强度", -1)),
7360
7355
  F(b("input", {
7361
7356
  type: "range",
@@ -7372,20 +7367,20 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7372
7367
  { number: !0 }
7373
7368
  ]
7374
7369
  ]),
7375
- b("span", Sl, de(i.normalScale.toFixed(2)), 1)
7370
+ b("span", Ol, de(i.normalScale.toFixed(2)), 1)
7376
7371
  ])) : ue("", !0),
7377
- b("div", Ll, [
7372
+ b("div", Sl, [
7378
7373
  x[40] || (x[40] = b("span", { class: "slider-label" }, "AO 贴图", -1)),
7379
- b("div", Nl, [
7374
+ b("div", Ll, [
7380
7375
  g.value ? (N(), U(Le, { key: 1 }, [
7381
- b("label", kl, [
7376
+ b("label", Hl, [
7382
7377
  b("input", {
7383
7378
  type: "file",
7384
7379
  accept: "image/*",
7385
7380
  onChange: _,
7386
7381
  class: "texture-file-input"
7387
7382
  }, null, 32),
7388
- b("span", jl, de(f.value), 1),
7383
+ b("span", kl, de(f.value), 1),
7389
7384
  x[39] || (x[39] = b("span", { class: "modify-hint" }, "修改", -1))
7390
7385
  ]),
7391
7386
  b("button", {
@@ -7393,7 +7388,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7393
7388
  title: "移除 AO 贴图",
7394
7389
  onClick: De
7395
7390
  }, " ✕ ")
7396
- ], 64)) : (N(), U("label", Hl, [
7391
+ ], 64)) : (N(), U("label", Nl, [
7397
7392
  b("input", {
7398
7393
  type: "file",
7399
7394
  accept: "image/*",
@@ -7404,7 +7399,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7404
7399
  ]))
7405
7400
  ])
7406
7401
  ]),
7407
- g.value ? (N(), U("div", Fl, [
7402
+ g.value ? (N(), U("div", jl, [
7408
7403
  x[41] || (x[41] = b("span", { class: "slider-label" }, "AO 强度", -1)),
7409
7404
  F(b("input", {
7410
7405
  type: "range",
@@ -7421,20 +7416,20 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7421
7416
  { number: !0 }
7422
7417
  ]
7423
7418
  ]),
7424
- b("span", Ul, de(i.aoIntensity.toFixed(2)), 1)
7419
+ b("span", Fl, de(i.aoIntensity.toFixed(2)), 1)
7425
7420
  ])) : ue("", !0),
7426
- b("div", zl, [
7421
+ b("div", Ul, [
7427
7422
  x[44] || (x[44] = b("span", { class: "slider-label" }, "模型贴图", -1)),
7428
- b("div", Gl, [
7423
+ b("div", zl, [
7429
7424
  u.value ? (N(), U(Le, { key: 1 }, [
7430
- b("label", Bl, [
7425
+ b("label", Wl, [
7431
7426
  b("input", {
7432
7427
  type: "file",
7433
7428
  accept: "image/*",
7434
7429
  onChange: L,
7435
7430
  class: "texture-file-input"
7436
7431
  }, null, 32),
7437
- b("span", Xl, de(A.value), 1),
7432
+ b("span", Bl, de(A.value), 1),
7438
7433
  x[43] || (x[43] = b("span", { class: "modify-hint" }, "修改", -1))
7439
7434
  ]),
7440
7435
  b("button", {
@@ -7442,7 +7437,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7442
7437
  title: "移除模型贴图",
7443
7438
  onClick: ee
7444
7439
  }, " ✕ ")
7445
- ], 64)) : (N(), U("label", Wl, [
7440
+ ], 64)) : (N(), U("label", Gl, [
7446
7441
  b("input", {
7447
7442
  type: "file",
7448
7443
  accept: "image/*",
@@ -7453,164 +7448,164 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7453
7448
  ]))
7454
7449
  ])
7455
7450
  ]),
7456
- a.value ? ue("", !0) : (N(), U("div", ql, " ⚠️ 当前材质不支持金属度/粗糙度(仅支持 Standard/Phong) "))
7451
+ a.value ? ue("", !0) : (N(), U("div", Xl, " ⚠️ 当前材质不支持金属度/粗糙度(仅支持 Standard/Phong) "))
7457
7452
  ])) : ue("", !0),
7458
- Ue.value ? (N(), U("div", Vl, [
7453
+ Ue.value ? (N(), U("div", ql, [
7459
7454
  x[47] || (x[47] = b("label", null, "水体属性", -1)),
7460
- b("div", Yl, [
7455
+ b("div", Vl, [
7461
7456
  x[46] || (x[46] = b("span", { class: "slider-label" }, "水体颜色", -1)),
7462
7457
  b("input", {
7463
7458
  type: "color",
7464
7459
  value: Pe.value,
7465
7460
  onInput: pi,
7466
7461
  class: "color-picker"
7467
- }, null, 40, Kl),
7462
+ }, null, 40, Yl),
7468
7463
  b("input", {
7469
7464
  type: "text",
7470
7465
  value: Pe.value,
7471
7466
  onInput: Ai,
7472
7467
  class: "color-text-input",
7473
7468
  placeholder: "#4fc3f7"
7474
- }, null, 40, Zl)
7469
+ }, null, 40, Kl)
7475
7470
  ])
7476
7471
  ])) : ue("", !0)
7477
7472
  ]));
7478
7473
  }
7479
- }), Jl = /* @__PURE__ */ qe(Ql, [["__scopeId", "data-v-a0505cb0"]]), _l = { class: "userdata-tab" }, $l = { class: "property-group userdata-group" }, ec = { class: "userdata-add-row" }, tc = ["onKeyup"], sc = {
7474
+ }), Ql = /* @__PURE__ */ qe(Zl, [["__scopeId", "data-v-a0505cb0"]]), Jl = { class: "userdata-tab" }, _l = { class: "property-group userdata-group" }, $l = { class: "userdata-add-row" }, ec = ["onKeyup"], tc = {
7480
7475
  key: 0,
7481
7476
  class: "userdata-list"
7482
- }, nc = { class: "ud-key" }, ic = {
7477
+ }, sc = { class: "ud-key" }, nc = {
7483
7478
  key: 0,
7484
7479
  class: "ud-value-readonly",
7485
7480
  title: "isMovable 为系统属性,不可修改"
7486
- }, oc = { class: "ud-value-json-preview" }, rc = ["onClick"], ac = {
7481
+ }, ic = { class: "ud-value-json-preview" }, oc = ["onClick"], rc = {
7487
7482
  key: 0,
7488
7483
  class: "ud-json-error"
7489
- }, lc = { class: "ud-json-actions" }, cc = ["onClick"], uc = ["onClick"], dc = {
7484
+ }, ac = { class: "ud-json-actions" }, lc = ["onClick"], cc = ["onClick"], uc = {
7490
7485
  key: 1,
7491
7486
  class: "userdata-empty"
7492
- }, hc = /* @__PURE__ */ Xe({
7487
+ }, dc = /* @__PURE__ */ Xe({
7493
7488
  __name: "UserDataTab",
7494
7489
  props: {
7495
7490
  selectedObject: {}
7496
7491
  },
7497
7492
  setup(r) {
7498
7493
  const e = r, t = W(""), n = W(""), s = W(null), i = W(""), o = W(null), a = W([]);
7499
- function l(w) {
7500
- if (w === null) return "null";
7501
- if (w === void 0) return "undefined";
7502
- if (Array.isArray(w)) return "array";
7503
- const m = typeof w;
7504
- return m === "object" ? "object" : m === "number" ? "number" : m === "boolean" ? "boolean" : "string";
7505
- }
7506
- function c(w) {
7507
- const m = [];
7508
- if (w.userData)
7509
- for (const [v, D] of Object.entries(w.userData))
7510
- typeof v == "string" && !v.startsWith("_") && m.push({
7511
- key: v,
7512
- value: typeof D == "object" ? JSON.stringify(D) : String(D),
7513
- rawType: l(D)
7494
+ function l(I) {
7495
+ if (I === null) return "null";
7496
+ if (I === void 0) return "undefined";
7497
+ if (Array.isArray(I)) return "array";
7498
+ const h = typeof I;
7499
+ return h === "object" ? "object" : h === "number" ? "number" : h === "boolean" ? "boolean" : "string";
7500
+ }
7501
+ function c(I) {
7502
+ const h = [];
7503
+ if (I.userData)
7504
+ for (const [w, E] of Object.entries(I.userData))
7505
+ typeof w == "string" && !w.startsWith("_") && h.push({
7506
+ key: w,
7507
+ value: typeof E == "object" ? JSON.stringify(E) : String(E),
7508
+ rawType: l(E)
7514
7509
  });
7515
- a.value = m;
7516
- }
7517
- function d(w) {
7518
- const m = w.trim();
7519
- if (m === "true") return !0;
7520
- if (m === "false") return !1;
7521
- if (m === "null") return null;
7522
- if (m === "undefined") return;
7523
- const v = Number(m);
7524
- if (m !== "" && !isNaN(v))
7525
- return String(v) !== m ? m : v;
7526
- if (m.startsWith("{") && m.endsWith("}") || m.startsWith("[") && m.endsWith("]"))
7510
+ a.value = h;
7511
+ }
7512
+ function d(I) {
7513
+ const h = I.trim();
7514
+ if (h === "true") return !0;
7515
+ if (h === "false") return !1;
7516
+ if (h === "null") return null;
7517
+ if (h === "undefined") return;
7518
+ const w = Number(h);
7519
+ if (h !== "" && !isNaN(w))
7520
+ return String(w) !== h ? h : w;
7521
+ if (h.startsWith("{") && h.endsWith("}") || h.startsWith("[") && h.endsWith("]"))
7527
7522
  try {
7528
- return JSON.parse(m);
7523
+ return JSON.parse(h);
7529
7524
  } catch {
7530
7525
  }
7531
- return m;
7526
+ return h;
7532
7527
  }
7533
7528
  function u() {
7534
7529
  if (!e.selectedObject || !t.value.trim()) return;
7535
- const w = t.value.trim();
7536
- if (w === "isMovable") {
7530
+ const I = t.value.trim();
7531
+ if (I === "isMovable") {
7537
7532
  t.value = "";
7538
7533
  return;
7539
7534
  }
7540
- const m = d(n.value);
7541
- e.selectedObject.userData[w] = m, c(e.selectedObject), t.value = "", n.value = "";
7535
+ const h = d(n.value);
7536
+ e.selectedObject.userData[I] = h, c(e.selectedObject), t.value = "", n.value = "";
7542
7537
  }
7543
- function A(w, m) {
7544
- e.selectedObject && (delete e.selectedObject.userData[w], c(e.selectedObject));
7538
+ function A(I, h) {
7539
+ e.selectedObject && (delete e.selectedObject.userData[I], c(e.selectedObject));
7545
7540
  }
7546
- function p(w) {
7547
- return w.length <= 28 ? w : w.substring(0, 28) + "…";
7541
+ function p(I) {
7542
+ return I.length <= 28 ? I : I.substring(0, 28) + "…";
7548
7543
  }
7549
- function g(w) {
7550
- s.value = w;
7551
- const m = e.selectedObject;
7552
- if (!m) return;
7553
- const v = m.userData[w];
7544
+ function g(I) {
7545
+ s.value = I;
7546
+ const h = e.selectedObject;
7547
+ if (!h) return;
7548
+ const w = h.userData[I];
7554
7549
  try {
7555
- i.value = JSON.stringify(v, null, 2);
7550
+ i.value = JSON.stringify(w, null, 2);
7556
7551
  } catch {
7557
- i.value = String(v);
7552
+ i.value = String(w);
7558
7553
  }
7559
7554
  f();
7560
7555
  }
7561
7556
  function f() {
7562
- const w = i.value.trim();
7563
- if (!w) {
7557
+ const I = i.value.trim();
7558
+ if (!I) {
7564
7559
  o.value = null;
7565
7560
  return;
7566
7561
  }
7567
- if (!w.startsWith("{") && !w.startsWith("[")) {
7562
+ if (!I.startsWith("{") && !I.startsWith("[")) {
7568
7563
  o.value = "提示:当前输入不是 JSON 格式,将作为普通字符串保存";
7569
7564
  return;
7570
7565
  }
7571
7566
  try {
7572
- JSON.parse(w), o.value = null;
7573
- } catch (m) {
7574
- o.value = "JSON 格式错误:" + m.message;
7567
+ JSON.parse(I), o.value = null;
7568
+ } catch (h) {
7569
+ o.value = "JSON 格式错误:" + h.message;
7575
7570
  }
7576
7571
  }
7577
- function h(w) {
7578
- const m = e.selectedObject;
7579
- if (!m) return;
7580
- const v = i.value.trim();
7572
+ function m(I) {
7573
+ const h = e.selectedObject;
7574
+ if (!h) return;
7575
+ const w = i.value.trim();
7581
7576
  try {
7582
- const D = JSON.parse(v);
7583
- m.userData[w] = D, c(m), s.value = null, i.value = "";
7577
+ const E = JSON.parse(w);
7578
+ h.userData[I] = E, c(h), s.value = null, i.value = "";
7584
7579
  } catch {
7585
- m.userData[w] = v, c(m), s.value = null, i.value = "";
7580
+ h.userData[I] = w, c(h), s.value = null, i.value = "";
7586
7581
  }
7587
7582
  }
7588
7583
  function y() {
7589
7584
  s.value = null, i.value = "";
7590
7585
  }
7591
- function C() {
7592
- const w = e.selectedObject;
7593
- if (!w) return;
7594
- const m = Fa();
7595
- m && (w.userData.closeUpView = {
7596
- x: m.position.x,
7597
- y: m.position.y,
7598
- z: m.position.z
7599
- }, c(w));
7586
+ function v() {
7587
+ const I = e.selectedObject;
7588
+ if (!I) return;
7589
+ const h = Fa();
7590
+ h && (I.userData.closeUpView = {
7591
+ x: h.position.x,
7592
+ y: h.position.y,
7593
+ z: h.position.z
7594
+ }, c(I));
7600
7595
  }
7601
7596
  return ve(
7602
7597
  () => e.selectedObject,
7603
- (w) => {
7604
- w ? c(w) : a.value = [], s.value = null, i.value = "";
7598
+ (I) => {
7599
+ I ? c(I) : a.value = [], s.value = null, i.value = "";
7605
7600
  },
7606
7601
  { immediate: !0 }
7607
- ), (w, m) => (N(), U("div", _l, [
7608
- b("div", $l, [
7609
- m[3] || (m[3] = b("label", null, "userData 属性", -1)),
7610
- b("div", ec, [
7602
+ ), (I, h) => (N(), U("div", Jl, [
7603
+ b("div", _l, [
7604
+ h[3] || (h[3] = b("label", null, "userData 属性", -1)),
7605
+ b("div", $l, [
7611
7606
  F(b("input", {
7612
7607
  type: "text",
7613
- "onUpdate:modelValue": m[0] || (m[0] = (v) => t.value = v),
7608
+ "onUpdate:modelValue": h[0] || (h[0] = (w) => t.value = w),
7614
7609
  placeholder: "属性名",
7615
7610
  class: "ud-input",
7616
7611
  onKeyup: rt(u, ["enter"])
@@ -7618,11 +7613,11 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7618
7613
  [Y, t.value]
7619
7614
  ]),
7620
7615
  F(b("textarea", {
7621
- "onUpdate:modelValue": m[1] || (m[1] = (v) => n.value = v),
7616
+ "onUpdate:modelValue": h[1] || (h[1] = (w) => n.value = w),
7622
7617
  placeholder: "值",
7623
7618
  class: "ud-input ud-textarea",
7624
7619
  onKeyup: rt(bs(u, ["prevent"]), ["enter"])
7625
- }, null, 40, tc), [
7620
+ }, null, 40, ec), [
7626
7621
  [Y, n.value]
7627
7622
  ]),
7628
7623
  b("button", {
@@ -7631,39 +7626,39 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7631
7626
  onClick: u
7632
7627
  }, " + ")
7633
7628
  ]),
7634
- a.value.length > 0 ? (N(), U("div", sc, [
7635
- (N(!0), U(Le, null, ns(a.value, (v, D) => (N(), U("div", {
7636
- key: v.key,
7629
+ a.value.length > 0 ? (N(), U("div", tc, [
7630
+ (N(!0), U(Le, null, ns(a.value, (w, E) => (N(), U("div", {
7631
+ key: w.key,
7637
7632
  class: Te(["userdata-item", {
7638
- readonly: v.key === "isMovable",
7639
- "editing-json": s.value === v.key
7633
+ readonly: w.key === "isMovable",
7634
+ "editing-json": s.value === w.key
7640
7635
  }])
7641
7636
  }, [
7642
- b("span", nc, de(v.key), 1),
7643
- v.key === "isMovable" ? (N(), U("span", ic, de(String(v.value)) + " 🔒 ", 1)) : v.key !== "isMovable" ? (N(), U(Le, { key: 1 }, [
7644
- s.value !== v.key ? (N(), U(Le, { key: 0 }, [
7645
- b("span", oc, de(p(v.value)), 1),
7637
+ b("span", sc, de(w.key), 1),
7638
+ w.key === "isMovable" ? (N(), U("span", nc, de(String(w.value)) + " 🔒 ", 1)) : w.key !== "isMovable" ? (N(), U(Le, { key: 1 }, [
7639
+ s.value !== w.key ? (N(), U(Le, { key: 0 }, [
7640
+ b("span", ic, de(p(w.value)), 1),
7646
7641
  b("button", {
7647
7642
  class: "ud-btn edit-json-btn",
7648
7643
  title: "编辑对象",
7649
- onClick: (M) => g(v.key)
7650
- }, " ✎ ", 8, rc)
7644
+ onClick: (M) => g(w.key)
7645
+ }, " ✎ ", 8, oc)
7651
7646
  ], 64)) : (N(), U(Le, { key: 1 }, [
7652
- o.value ? (N(), U("div", ac, " ⚠ " + de(o.value), 1)) : ue("", !0),
7647
+ o.value ? (N(), U("div", rc, " ⚠ " + de(o.value), 1)) : ue("", !0),
7653
7648
  F(b("textarea", {
7654
- "onUpdate:modelValue": m[2] || (m[2] = (M) => i.value = M),
7649
+ "onUpdate:modelValue": h[2] || (h[2] = (M) => i.value = M),
7655
7650
  class: Te(["ud-json-textarea", { "has-error": o.value }]),
7656
7651
  rows: "3",
7657
7652
  onInput: f
7658
7653
  }, null, 34), [
7659
7654
  [Y, i.value]
7660
7655
  ]),
7661
- b("div", lc, [
7656
+ b("div", ac, [
7662
7657
  b("button", {
7663
7658
  class: "ud-btn apply-btn",
7664
7659
  title: "应用修改",
7665
- onClick: (M) => h(v.key)
7666
- }, " ✓ ", 8, cc),
7660
+ onClick: (M) => m(w.key)
7661
+ }, " ✓ ", 8, lc),
7667
7662
  b("button", {
7668
7663
  class: "ud-btn cancel-btn",
7669
7664
  title: "取消编辑",
@@ -7671,23 +7666,23 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7671
7666
  }, " ✕ ")
7672
7667
  ])
7673
7668
  ], 64)),
7674
- s.value !== v.key ? (N(), U("button", {
7669
+ s.value !== w.key ? (N(), U("button", {
7675
7670
  key: 2,
7676
7671
  class: "ud-btn del-btn",
7677
7672
  title: "删除",
7678
- onClick: (M) => A(v.key)
7679
- }, " ✕ ", 8, uc)) : ue("", !0)
7673
+ onClick: (M) => A(w.key)
7674
+ }, " ✕ ", 8, cc)) : ue("", !0)
7680
7675
  ], 64)) : ue("", !0)
7681
7676
  ], 2))), 128))
7682
- ])) : (N(), U("div", dc, "暂无自定义数据")),
7677
+ ])) : (N(), U("div", uc, "暂无自定义数据")),
7683
7678
  b("button", {
7684
7679
  class: "get-camera-btn",
7685
- onClick: C
7680
+ onClick: v
7686
7681
  }, " 添加当前相机位置 ")
7687
7682
  ])
7688
7683
  ]));
7689
7684
  }
7690
- }), fc = /* @__PURE__ */ qe(hc, [["__scopeId", "data-v-4e117415"]]), pc = { class: "datapanel-tab" }, Ac = { class: "property-group" }, mc = { class: "dp-section" }, gc = { class: "dp-visibility-row" }, yc = { class: "dp-toggle" }, bc = { class: "dp-visibility-text" }, xc = { class: "dp-section" }, Ic = { class: "dp-section" }, Cc = { class: "dp-size-row" }, wc = { class: "dp-size-value" }, Mc = { class: "dp-section" }, vc = { class: "dp-size-row" }, Tc = { class: "dp-section" }, Ec = { class: "dp-size-row" }, Dc = { class: "dp-section" }, Pc = { class: "dp-size-row" }, Rc = { class: "dp-section" }, Oc = { class: "dp-list" }, Sc = ["onUpdate:modelValue"], Lc = ["onUpdate:modelValue"], Nc = ["onUpdate:modelValue"], Hc = ["onUpdate:modelValue"], kc = ["onClick"], jc = { class: "dp-add-row" }, Fc = /* @__PURE__ */ Xe({
7685
+ }), hc = /* @__PURE__ */ qe(dc, [["__scopeId", "data-v-4e117415"]]), fc = { class: "datapanel-tab" }, pc = { class: "property-group" }, Ac = { class: "dp-section" }, mc = { class: "dp-visibility-row" }, gc = { class: "dp-toggle" }, yc = { class: "dp-visibility-text" }, bc = { class: "dp-section" }, xc = { class: "dp-section" }, Ic = { class: "dp-size-row" }, Cc = { class: "dp-size-value" }, wc = { class: "dp-section" }, Mc = { class: "dp-size-row" }, vc = { class: "dp-section" }, Tc = { class: "dp-size-row" }, Ec = { class: "dp-section" }, Dc = { class: "dp-size-row" }, Pc = { class: "dp-section" }, Rc = { class: "dp-list" }, Oc = ["onUpdate:modelValue"], Sc = ["onUpdate:modelValue"], Lc = ["onUpdate:modelValue"], Nc = ["onUpdate:modelValue"], Hc = ["onClick"], kc = { class: "dp-add-row" }, jc = /* @__PURE__ */ Xe({
7691
7686
  __name: "DataPanelTab",
7692
7687
  props: {
7693
7688
  selectedObject: {}
@@ -7696,28 +7691,28 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7696
7691
  const e = r, t = W(""), n = W([]), s = W(!0), i = W(0.1), o = W(0), a = W(0), l = W(20), c = W(""), d = W(""), u = W(""), A = W("");
7697
7692
  let p = f(), g = !1;
7698
7693
  function f() {
7699
- const w = e.selectedObject;
7700
- return w ? St(ss(w)) : null;
7701
- }
7702
- ve(s, (w) => {
7703
- g || !p || (p.visible = w);
7704
- }), ve(l, (w) => {
7705
- g || !p || p.setWidth(`${w}em`);
7706
- }), ve(o, (w) => {
7707
- g || !p || p.setOffsetX(w);
7708
- }), ve(i, (w) => {
7709
- g || !p || p.setOffsetY(w);
7710
- }), ve(a, (w) => {
7711
- g || !p || p.setOffsetZ(w);
7694
+ const I = e.selectedObject;
7695
+ return I ? St(ss(I)) : null;
7696
+ }
7697
+ ve(s, (I) => {
7698
+ g || !p || (p.visible = I);
7699
+ }), ve(l, (I) => {
7700
+ g || !p || p.setWidth(`${I}em`);
7701
+ }), ve(o, (I) => {
7702
+ g || !p || p.setOffsetX(I);
7703
+ }), ve(i, (I) => {
7704
+ g || !p || p.setOffsetY(I);
7705
+ }), ve(a, (I) => {
7706
+ g || !p || p.setOffsetZ(I);
7712
7707
  });
7713
- function h() {
7708
+ function m() {
7714
7709
  g || !p || (p.setTitle(t.value), p.setItems([...n.value]));
7715
7710
  }
7716
- ve(t, () => h()), ve(n, () => h(), { deep: !0 });
7717
- function y(w) {
7718
- n.value = n.value.filter((m, v) => v !== w), h();
7711
+ ve(t, () => m()), ve(n, () => m(), { deep: !0 });
7712
+ function y(I) {
7713
+ n.value = n.value.filter((h, w) => w !== I), m();
7719
7714
  }
7720
- function C() {
7715
+ function v() {
7721
7716
  !c.value.trim() || !d.value.trim() || (n.value = [
7722
7717
  ...n.value,
7723
7718
  {
@@ -7726,7 +7721,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7726
7721
  unit: u.value.trim() || void 0,
7727
7722
  code: A.value.trim() || void 0
7728
7723
  }
7729
- ], h(), c.value = "", d.value = "", u.value = "", A.value = "");
7724
+ ], m(), c.value = "", d.value = "", u.value = "", A.value = "");
7730
7725
  }
7731
7726
  return ve(
7732
7727
  () => e.selectedObject,
@@ -7736,46 +7731,46 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7736
7731
  }, 0);
7737
7732
  },
7738
7733
  { immediate: !0 }
7739
- ), (w, m) => (N(), U("div", pc, [
7740
- b("div", Ac, [
7741
- m[29] || (m[29] = b("label", null, "📊 数据面板", -1)),
7742
- b("div", mc, [
7743
- m[14] || (m[14] = b("span", { class: "dp-label-sm" }, "可见性", -1)),
7744
- b("div", gc, [
7745
- b("label", yc, [
7734
+ ), (I, h) => (N(), U("div", fc, [
7735
+ b("div", pc, [
7736
+ h[29] || (h[29] = b("label", null, "📊 数据面板", -1)),
7737
+ b("div", Ac, [
7738
+ h[14] || (h[14] = b("span", { class: "dp-label-sm" }, "可见性", -1)),
7739
+ b("div", mc, [
7740
+ b("label", gc, [
7746
7741
  F(b("input", {
7747
7742
  type: "checkbox",
7748
- "onUpdate:modelValue": m[0] || (m[0] = (v) => s.value = v)
7743
+ "onUpdate:modelValue": h[0] || (h[0] = (w) => s.value = w)
7749
7744
  }, null, 512), [
7750
7745
  [Ci, s.value]
7751
7746
  ]),
7752
- m[13] || (m[13] = b("span", { class: "dp-toggle-slider" }, null, -1))
7747
+ h[13] || (h[13] = b("span", { class: "dp-toggle-slider" }, null, -1))
7753
7748
  ]),
7754
- b("span", bc, de(s.value ? "显示中" : "已隐藏"), 1)
7749
+ b("span", yc, de(s.value ? "显示中" : "已隐藏"), 1)
7755
7750
  ])
7756
7751
  ]),
7757
- b("div", xc, [
7758
- m[15] || (m[15] = b("span", { class: "dp-label-sm" }, "标题", -1)),
7752
+ b("div", bc, [
7753
+ h[15] || (h[15] = b("span", { class: "dp-label-sm" }, "标题", -1)),
7759
7754
  F(b("input", {
7760
7755
  type: "text",
7761
7756
  class: "dp-input",
7762
- "onUpdate:modelValue": m[1] || (m[1] = (v) => t.value = v),
7757
+ "onUpdate:modelValue": h[1] || (h[1] = (w) => t.value = w),
7763
7758
  placeholder: "面板标题"
7764
7759
  }, null, 512), [
7765
7760
  [Y, t.value]
7766
7761
  ])
7767
7762
  ]),
7768
- b("div", Ic, [
7769
- m[18] || (m[18] = b("span", { class: "dp-label-sm" }, "面板宽度", -1)),
7770
- b("div", Cc, [
7771
- m[16] || (m[16] = b("span", { class: "dp-range-label" }, "窄", -1)),
7763
+ b("div", xc, [
7764
+ h[18] || (h[18] = b("span", { class: "dp-label-sm" }, "面板宽度", -1)),
7765
+ b("div", Ic, [
7766
+ h[16] || (h[16] = b("span", { class: "dp-range-label" }, "窄", -1)),
7772
7767
  F(b("input", {
7773
7768
  type: "range",
7774
7769
  class: "dp-range",
7775
7770
  min: "10",
7776
7771
  max: "40",
7777
7772
  step: "1",
7778
- "onUpdate:modelValue": m[2] || (m[2] = (v) => l.value = v)
7773
+ "onUpdate:modelValue": h[2] || (h[2] = (w) => l.value = w)
7779
7774
  }, null, 512), [
7780
7775
  [
7781
7776
  Y,
@@ -7784,21 +7779,21 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7784
7779
  { number: !0 }
7785
7780
  ]
7786
7781
  ]),
7787
- m[17] || (m[17] = b("span", { class: "dp-range-label" }, "宽", -1)),
7788
- b("span", wc, de(l.value) + "em", 1)
7782
+ h[17] || (h[17] = b("span", { class: "dp-range-label" }, "宽", -1)),
7783
+ b("span", Cc, de(l.value) + "em", 1)
7789
7784
  ])
7790
7785
  ]),
7791
- b("div", Mc, [
7792
- m[21] || (m[21] = b("span", { class: "dp-label-sm" }, "面板左右位置", -1)),
7793
- b("div", vc, [
7794
- m[19] || (m[19] = b("span", { class: "dp-range-label" }, "偏左", -1)),
7786
+ b("div", wc, [
7787
+ h[21] || (h[21] = b("span", { class: "dp-label-sm" }, "面板左右位置", -1)),
7788
+ b("div", Mc, [
7789
+ h[19] || (h[19] = b("span", { class: "dp-range-label" }, "偏左", -1)),
7795
7790
  F(b("input", {
7796
7791
  type: "range",
7797
7792
  class: "dp-range",
7798
7793
  min: "-5",
7799
7794
  max: "5",
7800
7795
  step: "0.01",
7801
- "onUpdate:modelValue": m[3] || (m[3] = (v) => o.value = v)
7796
+ "onUpdate:modelValue": h[3] || (h[3] = (w) => o.value = w)
7802
7797
  }, null, 512), [
7803
7798
  [
7804
7799
  Y,
@@ -7807,11 +7802,11 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7807
7802
  { number: !0 }
7808
7803
  ]
7809
7804
  ]),
7810
- m[20] || (m[20] = b("span", { class: "dp-range-label" }, "偏右", -1)),
7805
+ h[20] || (h[20] = b("span", { class: "dp-range-label" }, "偏右", -1)),
7811
7806
  F(b("input", {
7812
7807
  type: "number",
7813
7808
  class: "dp-input dp-input-number",
7814
- "onUpdate:modelValue": m[4] || (m[4] = (v) => o.value = v),
7809
+ "onUpdate:modelValue": h[4] || (h[4] = (w) => o.value = w),
7815
7810
  step: "0.01"
7816
7811
  }, null, 512), [
7817
7812
  [
@@ -7823,17 +7818,17 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7823
7818
  ])
7824
7819
  ])
7825
7820
  ]),
7826
- b("div", Tc, [
7827
- m[24] || (m[24] = b("span", { class: "dp-label-sm" }, "面板上下位置", -1)),
7828
- b("div", Ec, [
7829
- m[22] || (m[22] = b("span", { class: "dp-range-label" }, "偏下", -1)),
7821
+ b("div", vc, [
7822
+ h[24] || (h[24] = b("span", { class: "dp-label-sm" }, "面板上下位置", -1)),
7823
+ b("div", Tc, [
7824
+ h[22] || (h[22] = b("span", { class: "dp-range-label" }, "偏下", -1)),
7830
7825
  F(b("input", {
7831
7826
  type: "range",
7832
7827
  class: "dp-range",
7833
7828
  min: "-5",
7834
7829
  max: "5",
7835
7830
  step: "0.01",
7836
- "onUpdate:modelValue": m[5] || (m[5] = (v) => i.value = v)
7831
+ "onUpdate:modelValue": h[5] || (h[5] = (w) => i.value = w)
7837
7832
  }, null, 512), [
7838
7833
  [
7839
7834
  Y,
@@ -7842,11 +7837,11 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7842
7837
  { number: !0 }
7843
7838
  ]
7844
7839
  ]),
7845
- m[23] || (m[23] = b("span", { class: "dp-range-label" }, "偏上", -1)),
7840
+ h[23] || (h[23] = b("span", { class: "dp-range-label" }, "偏上", -1)),
7846
7841
  F(b("input", {
7847
7842
  type: "number",
7848
7843
  class: "dp-input dp-input-number",
7849
- "onUpdate:modelValue": m[6] || (m[6] = (v) => i.value = v),
7844
+ "onUpdate:modelValue": h[6] || (h[6] = (w) => i.value = w),
7850
7845
  step: "0.01"
7851
7846
  }, null, 512), [
7852
7847
  [
@@ -7858,17 +7853,17 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7858
7853
  ])
7859
7854
  ])
7860
7855
  ]),
7861
- b("div", Dc, [
7862
- m[27] || (m[27] = b("span", { class: "dp-label-sm" }, "面板前后位置", -1)),
7863
- b("div", Pc, [
7864
- m[25] || (m[25] = b("span", { class: "dp-range-label" }, "近", -1)),
7856
+ b("div", Ec, [
7857
+ h[27] || (h[27] = b("span", { class: "dp-label-sm" }, "面板前后位置", -1)),
7858
+ b("div", Dc, [
7859
+ h[25] || (h[25] = b("span", { class: "dp-range-label" }, "近", -1)),
7865
7860
  F(b("input", {
7866
7861
  type: "range",
7867
7862
  class: "dp-range",
7868
7863
  min: "-5",
7869
7864
  max: "5",
7870
7865
  step: "0.01",
7871
- "onUpdate:modelValue": m[7] || (m[7] = (v) => a.value = v)
7866
+ "onUpdate:modelValue": h[7] || (h[7] = (w) => a.value = w)
7872
7867
  }, null, 512), [
7873
7868
  [
7874
7869
  Y,
@@ -7877,11 +7872,11 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7877
7872
  { number: !0 }
7878
7873
  ]
7879
7874
  ]),
7880
- m[26] || (m[26] = b("span", { class: "dp-range-label" }, "远", -1)),
7875
+ h[26] || (h[26] = b("span", { class: "dp-range-label" }, "远", -1)),
7881
7876
  F(b("input", {
7882
7877
  type: "number",
7883
7878
  class: "dp-input dp-input-number",
7884
- "onUpdate:modelValue": m[8] || (m[8] = (v) => a.value = v),
7879
+ "onUpdate:modelValue": h[8] || (h[8] = (w) => a.value = w),
7885
7880
  step: "0.01"
7886
7881
  }, null, 512), [
7887
7882
  [
@@ -7893,92 +7888,92 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7893
7888
  ])
7894
7889
  ])
7895
7890
  ]),
7896
- b("div", Rc, [
7897
- m[28] || (m[28] = b("span", { class: "dp-label-sm" }, "数据项", -1)),
7898
- b("div", Oc, [
7899
- (N(!0), U(Le, null, ns(n.value, (v, D) => (N(), U("div", {
7900
- key: D,
7891
+ b("div", Pc, [
7892
+ h[28] || (h[28] = b("span", { class: "dp-label-sm" }, "数据项", -1)),
7893
+ b("div", Rc, [
7894
+ (N(!0), U(Le, null, ns(n.value, (w, E) => (N(), U("div", {
7895
+ key: E,
7901
7896
  class: "dp-item"
7902
7897
  }, [
7903
7898
  F(b("input", {
7904
7899
  type: "text",
7905
7900
  class: "dp-input dp-input-sm",
7906
- "onUpdate:modelValue": (M) => v.label = M,
7901
+ "onUpdate:modelValue": (M) => w.label = M,
7907
7902
  placeholder: "标签"
7908
- }, null, 8, Sc), [
7909
- [Y, v.label]
7903
+ }, null, 8, Oc), [
7904
+ [Y, w.label]
7910
7905
  ]),
7911
7906
  F(b("input", {
7912
7907
  type: "text",
7913
7908
  class: "dp-input dp-input-sm",
7914
- "onUpdate:modelValue": (M) => v.value = M,
7909
+ "onUpdate:modelValue": (M) => w.value = M,
7915
7910
  placeholder: "值"
7916
- }, null, 8, Lc), [
7917
- [Y, v.value]
7911
+ }, null, 8, Sc), [
7912
+ [Y, w.value]
7918
7913
  ]),
7919
7914
  F(b("input", {
7920
7915
  type: "text",
7921
7916
  class: "dp-input dp-input-xs",
7922
- "onUpdate:modelValue": (M) => v.unit = M,
7917
+ "onUpdate:modelValue": (M) => w.unit = M,
7923
7918
  placeholder: "单位"
7924
- }, null, 8, Nc), [
7925
- [Y, v.unit]
7919
+ }, null, 8, Lc), [
7920
+ [Y, w.unit]
7926
7921
  ]),
7927
7922
  F(b("input", {
7928
7923
  type: "text",
7929
7924
  class: "dp-input dp-input-xs",
7930
- "onUpdate:modelValue": (M) => v.code = M,
7925
+ "onUpdate:modelValue": (M) => w.code = M,
7931
7926
  placeholder: "编码"
7932
- }, null, 8, Hc), [
7933
- [Y, v.code]
7927
+ }, null, 8, Nc), [
7928
+ [Y, w.code]
7934
7929
  ]),
7935
7930
  b("button", {
7936
7931
  class: "dp-btn dp-btn-del",
7937
- onClick: (M) => y(D),
7932
+ onClick: (M) => y(E),
7938
7933
  title: "删除此项"
7939
- }, "✕", 8, kc)
7934
+ }, "✕", 8, Hc)
7940
7935
  ]))), 128))
7941
7936
  ]),
7942
- b("div", jc, [
7937
+ b("div", kc, [
7943
7938
  F(b("input", {
7944
7939
  type: "text",
7945
7940
  class: "dp-input dp-input-sm",
7946
- "onUpdate:modelValue": m[9] || (m[9] = (v) => c.value = v),
7941
+ "onUpdate:modelValue": h[9] || (h[9] = (w) => c.value = w),
7947
7942
  placeholder: "标签",
7948
- onKeyup: rt(C, ["enter"])
7943
+ onKeyup: rt(v, ["enter"])
7949
7944
  }, null, 544), [
7950
7945
  [Y, c.value]
7951
7946
  ]),
7952
7947
  F(b("input", {
7953
7948
  type: "text",
7954
7949
  class: "dp-input dp-input-sm",
7955
- "onUpdate:modelValue": m[10] || (m[10] = (v) => d.value = v),
7950
+ "onUpdate:modelValue": h[10] || (h[10] = (w) => d.value = w),
7956
7951
  placeholder: "值",
7957
- onKeyup: rt(C, ["enter"])
7952
+ onKeyup: rt(v, ["enter"])
7958
7953
  }, null, 544), [
7959
7954
  [Y, d.value]
7960
7955
  ]),
7961
7956
  F(b("input", {
7962
7957
  type: "text",
7963
7958
  class: "dp-input dp-input-xs",
7964
- "onUpdate:modelValue": m[11] || (m[11] = (v) => u.value = v),
7959
+ "onUpdate:modelValue": h[11] || (h[11] = (w) => u.value = w),
7965
7960
  placeholder: "单位",
7966
- onKeyup: rt(C, ["enter"])
7961
+ onKeyup: rt(v, ["enter"])
7967
7962
  }, null, 544), [
7968
7963
  [Y, u.value]
7969
7964
  ]),
7970
7965
  F(b("input", {
7971
7966
  type: "text",
7972
7967
  class: "dp-input dp-input-xs",
7973
- "onUpdate:modelValue": m[12] || (m[12] = (v) => A.value = v),
7968
+ "onUpdate:modelValue": h[12] || (h[12] = (w) => A.value = w),
7974
7969
  placeholder: "编码",
7975
- onKeyup: rt(C, ["enter"])
7970
+ onKeyup: rt(v, ["enter"])
7976
7971
  }, null, 544), [
7977
7972
  [Y, A.value]
7978
7973
  ]),
7979
7974
  b("button", {
7980
7975
  class: "dp-btn dp-btn-add",
7981
- onClick: C,
7976
+ onClick: v,
7982
7977
  title: "添加"
7983
7978
  }, "+")
7984
7979
  ])
@@ -7986,8 +7981,8 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7986
7981
  ])
7987
7982
  ]));
7988
7983
  }
7989
- }), Uc = /* @__PURE__ */ qe(Fc, [["__scopeId", "data-v-b4c7c7dc"]]);
7990
- function zc(r) {
7984
+ }), Fc = /* @__PURE__ */ qe(jc, [["__scopeId", "data-v-b4c7c7dc"]]);
7985
+ function Uc(r) {
7991
7986
  const e = W(/* @__PURE__ */ new Set()), t = (s) => {
7992
7987
  const i = new Set(e.value);
7993
7988
  i.has(s) ? i.delete(s) : i.add(s), e.value = i;
@@ -8007,22 +8002,22 @@ function zc(r) {
8007
8002
  { immediate: !0 }
8008
8003
  ), { expandedSet: e, toggleExpand: t };
8009
8004
  }
8010
- const Gc = {
8005
+ const zc = {
8011
8006
  key: 0,
8012
8007
  class: "property-panel"
8013
- }, Wc = { class: "property-group tree-group" }, Bc = { class: "tree-container" }, Xc = {
8008
+ }, Gc = { class: "property-group tree-group" }, Wc = { class: "tree-container" }, Bc = {
8014
8009
  key: 0,
8015
8010
  class: "tree-empty"
8016
- }, qc = { class: "property-group" }, Vc = { class: "transform-mode-row" }, Yc = {
8011
+ }, Xc = { class: "property-group" }, qc = { class: "transform-mode-row" }, Vc = {
8017
8012
  key: 0,
8018
8013
  class: "tabs"
8019
- }, Kc = {
8014
+ }, Yc = {
8020
8015
  key: 1,
8021
8016
  class: "tab-content"
8022
- }, Zc = {
8017
+ }, Kc = {
8023
8018
  key: 1,
8024
8019
  class: "property-panel empty"
8025
- }, Qc = /* @__PURE__ */ Xe({
8020
+ }, Zc = /* @__PURE__ */ Xe({
8026
8021
  __name: "index",
8027
8022
  props: {
8028
8023
  transform: {},
@@ -8038,81 +8033,81 @@ const Gc = {
8038
8033
  const o = () => n("propertyChange"), a = W("transform"), l = ot(() => {
8039
8034
  var g;
8040
8035
  return !!(t.selectedObject && ((g = t.selectedObject.userData) != null && g._hasDataPanel));
8041
- }), c = W(0), d = wi(t, "selectedObject"), { expandedSet: u, toggleExpand: A } = zc(d);
8036
+ }), c = W(0), d = wi(t, "selectedObject"), { expandedSet: u, toggleExpand: A } = Uc(d);
8042
8037
  Mi("treeExpand", { expandedSet: u, toggleExpand: A });
8043
8038
  const p = (g) => {
8044
8039
  c.value++, n("treeDelete", g);
8045
8040
  };
8046
- return (g, f) => g.transform ? (N(), U("div", Gc, [
8047
- b("div", Wc, [
8041
+ return (g, f) => g.transform ? (N(), U("div", zc, [
8042
+ b("div", Gc, [
8048
8043
  f[7] || (f[7] = b("label", null, "场景物体", -1)),
8049
- b("div", Bc, [
8050
- (N(!0), U(Le, null, ns(g.treeData, (h) => (N(), bt(al, {
8051
- key: h.uuid,
8052
- node: h,
8044
+ b("div", Wc, [
8045
+ (N(!0), U(Le, null, ns(g.treeData, (m) => (N(), bt(rl, {
8046
+ key: m.uuid,
8047
+ node: m,
8053
8048
  "selected-object": g.selectedObject,
8054
8049
  version: c.value,
8055
8050
  onSelect: f[0] || (f[0] = (y) => n("treeSelect", y)),
8056
8051
  onDelete: p
8057
8052
  }, null, 8, ["node", "selected-object", "version"]))), 128)),
8058
- g.treeData.length === 0 ? (N(), U("div", Xc, "暂无物体")) : ue("", !0)
8053
+ g.treeData.length === 0 ? (N(), U("div", Bc, "暂无物体")) : ue("", !0)
8059
8054
  ])
8060
8055
  ]),
8061
- b("div", qc, [
8056
+ b("div", Xc, [
8062
8057
  f[8] || (f[8] = b("label", null, "全局属性", -1)),
8063
- b("div", Vc, [
8058
+ b("div", qc, [
8064
8059
  b("button", {
8065
8060
  class: Te(["mode-btn", { active: s.value === "translate" }]),
8066
8061
  title: "移动 (W)",
8067
- onClick: f[1] || (f[1] = (h) => i("translate"))
8062
+ onClick: f[1] || (f[1] = (m) => i("translate"))
8068
8063
  }, " ↕ 移动 ", 2),
8069
8064
  b("button", {
8070
8065
  class: Te(["mode-btn", { active: s.value === "rotate" }]),
8071
8066
  title: "旋转 (E)",
8072
- onClick: f[2] || (f[2] = (h) => i("rotate"))
8067
+ onClick: f[2] || (f[2] = (m) => i("rotate"))
8073
8068
  }, " ↻ 旋转 ", 2),
8074
8069
  b("button", {
8075
8070
  class: Te(["mode-btn", { active: s.value === "scale" }]),
8076
8071
  title: "缩放 (R)",
8077
- onClick: f[3] || (f[3] = (h) => i("scale"))
8072
+ onClick: f[3] || (f[3] = (m) => i("scale"))
8078
8073
  }, " ⤡ 缩放 ", 2)
8079
8074
  ])
8080
8075
  ]),
8081
- g.selectedObject ? (N(), U("div", Yc, [
8076
+ g.selectedObject ? (N(), U("div", Vc, [
8082
8077
  b("button", {
8083
8078
  class: Te(["tab-btn", { active: a.value === "transform" }]),
8084
- onClick: f[4] || (f[4] = (h) => a.value = "transform")
8079
+ onClick: f[4] || (f[4] = (m) => a.value = "transform")
8085
8080
  }, " 🔄 变换 ", 2),
8086
8081
  b("button", {
8087
8082
  class: Te(["tab-btn", { active: a.value === "userdata" }]),
8088
- onClick: f[5] || (f[5] = (h) => a.value = "userdata")
8083
+ onClick: f[5] || (f[5] = (m) => a.value = "userdata")
8089
8084
  }, " 📋 自定义数据 ", 2),
8090
8085
  l.value ? (N(), U("button", {
8091
8086
  key: 0,
8092
8087
  class: Te(["tab-btn", { active: a.value === "datapanel" }]),
8093
- onClick: f[6] || (f[6] = (h) => a.value = "datapanel")
8088
+ onClick: f[6] || (f[6] = (m) => a.value = "datapanel")
8094
8089
  }, " 📊 数据面板 ", 2)) : ue("", !0)
8095
8090
  ])) : ue("", !0),
8096
- g.selectedObject ? (N(), U("div", Kc, [
8097
- F(rs(Jl, {
8091
+ g.selectedObject ? (N(), U("div", Yc, [
8092
+ F(rs(Ql, {
8098
8093
  transform: g.transform,
8099
8094
  "selected-object": g.selectedObject,
8100
8095
  onPropertyChange: o
8101
8096
  }, null, 8, ["transform", "selected-object"]), [
8102
8097
  [Qe, a.value === "transform"]
8103
8098
  ]),
8104
- F(rs(fc, { "selected-object": g.selectedObject }, null, 8, ["selected-object"]), [
8099
+ F(rs(hc, { "selected-object": g.selectedObject }, null, 8, ["selected-object"]), [
8105
8100
  [Qe, a.value === "userdata"]
8106
8101
  ]),
8107
- F(rs(Uc, { "selected-object": g.selectedObject }, null, 8, ["selected-object"]), [
8102
+ F(rs(Fc, { "selected-object": g.selectedObject }, null, 8, ["selected-object"]), [
8108
8103
  [Qe, a.value === "datapanel"]
8109
8104
  ])
8110
8105
  ])) : ue("", !0)
8111
- ])) : (N(), U("div", Zc, f[9] || (f[9] = [
8106
+ ])) : (N(), U("div", Kc, f[9] || (f[9] = [
8112
8107
  b("p", null, "未选中任何模型", -1)
8113
8108
  ])));
8114
8109
  }
8115
- }), Jc = /* @__PURE__ */ qe(Qc, [["__scopeId", "data-v-c92c9fa7"]]), _c = { class: "top-bar" }, $c = { class: "left-section" }, eu = { class: "dropdown-menu" }, tu = { class: "dropdown-menu sub-menu" }, su = { class: "dropdown-menu sub-menu" }, nu = { class: "dropdown-menu" }, iu = /* @__PURE__ */ Xe({
8110
+ }), Qc = /* @__PURE__ */ qe(Zc, [["__scopeId", "data-v-c92c9fa7"]]), Jc = { class: "top-bar" }, _c = { class: "left-section" }, $c = { class: "dropdown-menu" }, eu = { class: "dropdown-menu sub-menu" }, tu = { class: "dropdown-menu sub-menu" }, su = { class: "dropdown-menu" }, nu = /* @__PURE__ */ Xe({
8116
8111
  __name: "TopBar",
8117
8112
  emits: ["addModel", "importModel"],
8118
8113
  setup(r, { emit: e }) {
@@ -8120,8 +8115,8 @@ const Gc = {
8120
8115
  var f;
8121
8116
  return (f = a.value) == null ? void 0 : f.click();
8122
8117
  }, c = (f) => {
8123
- const h = f.target;
8124
- h.files && h.files.length > 0 && (o("importModel", h.files[0]), h.value = "");
8118
+ const m = f.target;
8119
+ m.files && m.files.length > 0 && (o("importModel", m.files[0]), m.value = "");
8125
8120
  }, d = () => console.log("撤销"), u = () => console.log("删除物体"), A = async () => {
8126
8121
  const f = await Ga();
8127
8122
  console.log("scene GLB 字节数:", f.scene.byteLength), console.log("camera:", f.camera), console.log("dataPanels:", f.dataPanels), console.log("waters:", f.waters), console.log("textures:", f.textures), console.log("ambientLight:", f.ambientLight);
@@ -8129,45 +8124,45 @@ const Gc = {
8129
8124
  if (!localStorage.getItem("test_id")) return localStorage.setItem("test_id", "123");
8130
8125
  $n(localStorage.getItem("test_id"));
8131
8126
  }, g = () => Zn();
8132
- return (f, h) => (N(), U("div", _c, [
8133
- b("div", $c, [
8127
+ return (f, m) => (N(), U("div", Jc, [
8128
+ b("div", _c, [
8134
8129
  b("div", {
8135
8130
  class: "dropdown-wrapper",
8136
- onMouseenter: h[11] || (h[11] = (y) => n.value = !0),
8137
- onMouseleave: h[12] || (h[12] = (y) => n.value = !1)
8131
+ onMouseenter: m[11] || (m[11] = (y) => n.value = !0),
8132
+ onMouseleave: m[12] || (m[12] = (y) => n.value = !1)
8138
8133
  }, [
8139
- h[17] || (h[17] = b("button", { class: "menu-btn" }, "添加", -1)),
8140
- F(b("div", eu, [
8134
+ m[17] || (m[17] = b("button", { class: "menu-btn" }, "添加", -1)),
8135
+ F(b("div", $c, [
8141
8136
  b("div", {
8142
8137
  class: "menu-item",
8143
8138
  onClick: d
8144
8139
  }, "组"),
8145
8140
  b("div", {
8146
8141
  class: "menu-item dropdown-wrapper sub-trigger",
8147
- onMouseenter: h[5] || (h[5] = (y) => s.value = !0),
8148
- onMouseleave: h[6] || (h[6] = (y) => s.value = !1)
8142
+ onMouseenter: m[5] || (m[5] = (y) => s.value = !0),
8143
+ onMouseleave: m[6] || (m[6] = (y) => s.value = !1)
8149
8144
  }, [
8150
- h[15] || (h[15] = b("span", null, "网格", -1)),
8151
- F(b("div", tu, [
8145
+ m[15] || (m[15] = b("span", null, "网格", -1)),
8146
+ F(b("div", eu, [
8152
8147
  b("div", {
8153
8148
  class: "menu-item",
8154
- onClick: h[0] || (h[0] = (y) => o("addModel", "box"))
8149
+ onClick: m[0] || (m[0] = (y) => o("addModel", "box"))
8155
8150
  }, " 正方体 "),
8156
8151
  b("div", {
8157
8152
  class: "menu-item",
8158
- onClick: h[1] || (h[1] = (y) => o("addModel", "sphere"))
8153
+ onClick: m[1] || (m[1] = (y) => o("addModel", "sphere"))
8159
8154
  }, " 球体 "),
8160
8155
  b("div", {
8161
8156
  class: "menu-item",
8162
- onClick: h[2] || (h[2] = (y) => o("addModel", "water"))
8157
+ onClick: m[2] || (m[2] = (y) => o("addModel", "water"))
8163
8158
  }, " 水体(Water.js) "),
8164
8159
  b("div", {
8165
8160
  class: "menu-item",
8166
- onClick: h[3] || (h[3] = (y) => o("addModel", "waterCylinder"))
8161
+ onClick: m[3] || (m[3] = (y) => o("addModel", "waterCylinder"))
8167
8162
  }, " 水体(圆柱) "),
8168
8163
  b("div", {
8169
8164
  class: "menu-item",
8170
- onClick: h[4] || (h[4] = (y) => o("addModel", "waterPlane"))
8165
+ onClick: m[4] || (m[4] = (y) => o("addModel", "waterPlane"))
8171
8166
  }, " 水面(标准材质) "),
8172
8167
  b("div", {
8173
8168
  class: "menu-item",
@@ -8179,14 +8174,14 @@ const Gc = {
8179
8174
  ], 32),
8180
8175
  b("div", {
8181
8176
  class: "menu-item dropdown-wrapper sub-trigger",
8182
- onMouseenter: h[8] || (h[8] = (y) => i.value = !0),
8183
- onMouseleave: h[9] || (h[9] = (y) => i.value = !1)
8177
+ onMouseenter: m[8] || (m[8] = (y) => i.value = !0),
8178
+ onMouseleave: m[9] || (m[9] = (y) => i.value = !1)
8184
8179
  }, [
8185
- h[16] || (h[16] = b("span", null, "光源", -1)),
8186
- F(b("div", su, [
8180
+ m[16] || (m[16] = b("span", null, "光源", -1)),
8181
+ F(b("div", tu, [
8187
8182
  b("div", {
8188
8183
  class: "menu-item",
8189
- onClick: h[7] || (h[7] = (y) => o("addModel", "directionalLight"))
8184
+ onClick: m[7] || (m[7] = (y) => o("addModel", "directionalLight"))
8190
8185
  }, " 平行光 ")
8191
8186
  ], 512), [
8192
8187
  [Qe, i.value]
@@ -8198,7 +8193,7 @@ const Gc = {
8198
8193
  }, "摄像机"),
8199
8194
  b("div", {
8200
8195
  class: "menu-item",
8201
- onClick: h[10] || (h[10] = (y) => o("addModel", "dataPanel"))
8196
+ onClick: m[10] || (m[10] = (y) => o("addModel", "dataPanel"))
8202
8197
  }, " 数据面板 ")
8203
8198
  ], 512), [
8204
8199
  [Qe, n.value]
@@ -8206,11 +8201,11 @@ const Gc = {
8206
8201
  ], 32),
8207
8202
  b("div", {
8208
8203
  class: "dropdown-wrapper",
8209
- onMouseenter: h[13] || (h[13] = (y) => t.value = !0),
8210
- onMouseleave: h[14] || (h[14] = (y) => t.value = !1)
8204
+ onMouseenter: m[13] || (m[13] = (y) => t.value = !0),
8205
+ onMouseleave: m[14] || (m[14] = (y) => t.value = !1)
8211
8206
  }, [
8212
- h[19] || (h[19] = b("button", { class: "menu-btn" }, "帮助", -1)),
8213
- F(b("div", nu, [
8207
+ m[19] || (m[19] = b("button", { class: "menu-btn" }, "帮助", -1)),
8208
+ F(b("div", su, [
8214
8209
  b("div", {
8215
8210
  class: "menu-item",
8216
8211
  onClick: A
@@ -8223,13 +8218,13 @@ const Gc = {
8223
8218
  class: "menu-item",
8224
8219
  onClick: g
8225
8220
  }, " 重置相机位置 "),
8226
- h[18] || (h[18] = b("div", { class: "menu-divider" }, null, -1))
8221
+ m[18] || (m[18] = b("div", { class: "menu-divider" }, null, -1))
8227
8222
  ], 512), [
8228
8223
  [Qe, t.value]
8229
8224
  ])
8230
8225
  ], 32)
8231
8226
  ]),
8232
- h[20] || (h[20] = b("div", { class: "right-section" }, [
8227
+ m[20] || (m[20] = b("div", { class: "right-section" }, [
8233
8228
  b("span", { class: "app-title" }, "3D 模型编辑器")
8234
8229
  ], -1)),
8235
8230
  b("input", {
@@ -8242,10 +8237,10 @@ const Gc = {
8242
8237
  }, null, 544)
8243
8238
  ]));
8244
8239
  }
8245
- }), ou = /* @__PURE__ */ qe(iu, [["__scopeId", "data-v-9cee44a7"]]), ru = { class: "bottom-bar" }, au = /* @__PURE__ */ Xe({
8240
+ }), iu = /* @__PURE__ */ qe(nu, [["__scopeId", "data-v-9cee44a7"]]), ou = { class: "bottom-bar" }, ru = /* @__PURE__ */ Xe({
8246
8241
  __name: "BottomBar",
8247
8242
  setup(r) {
8248
- return (e, t) => (N(), U("div", ru, t[0] || (t[0] = [
8243
+ return (e, t) => (N(), U("div", ou, t[0] || (t[0] = [
8249
8244
  b("div", { class: "status-left" }, [
8250
8245
  b("span", null, "就绪")
8251
8246
  ], -1),
@@ -8254,10 +8249,10 @@ const Gc = {
8254
8249
  ], -1)
8255
8250
  ])));
8256
8251
  }
8257
- }), lu = /* @__PURE__ */ qe(au, [["__scopeId", "data-v-3427bb27"]]), cu = { class: "app-layout" }, uu = {
8252
+ }), au = /* @__PURE__ */ qe(ru, [["__scopeId", "data-v-3427bb27"]]), lu = { class: "app-layout" }, cu = {
8258
8253
  key: 0,
8259
8254
  class: "loading-overlay"
8260
- }, du = /* @__PURE__ */ Xe({
8255
+ }, uu = /* @__PURE__ */ Xe({
8261
8256
  __name: "DrawingBoard",
8262
8257
  props: {
8263
8258
  mode: { default: "edit" },
@@ -8298,8 +8293,8 @@ const Gc = {
8298
8293
  }, l = (y) => hi(y), c = async (y) => {
8299
8294
  try {
8300
8295
  await di(y);
8301
- } catch (C) {
8302
- console.error("导入失败:", C), alert("导入失败:" + C.message);
8296
+ } catch (v) {
8297
+ console.error("导入失败:", v), alert("导入失败:" + v.message);
8303
8298
  }
8304
8299
  }, d = Fs([]);
8305
8300
  Ha((y) => {
@@ -8310,19 +8305,19 @@ const Gc = {
8310
8305
  y && (d.value = y);
8311
8306
  }, A = (y) => Hs(y), p = (y) => Ra(y.uuid), g = (y) => {
8312
8307
  Ia(y);
8313
- }, f = W(null), h = async () => {
8308
+ }, f = W(null), m = async () => {
8314
8309
  f.value && await ca(f.value, e.mode, e.sceneData), u();
8315
8310
  };
8316
8311
  return vi(() => {
8317
- h(), f.value && $o(f.value);
8312
+ m(), f.value && $o(f.value);
8318
8313
  }), Ti(() => {
8319
- console.log("endset_three_editor destroy"), qa();
8320
- }), (y, C) => (N(), U("div", cu, [
8321
- t.value ? (N(), U("div", uu, C[0] || (C[0] = [
8314
+ console.log("endset_three_editor destroy"), Xa();
8315
+ }), (y, v) => (N(), U("div", lu, [
8316
+ t.value ? (N(), U("div", cu, v[0] || (v[0] = [
8322
8317
  b("div", { class: "loading-spinner" }, null, -1),
8323
8318
  b("div", { class: "loading-text" }, "加载中...", -1)
8324
8319
  ]))) : ue("", !0),
8325
- y.mode === "edit" ? (N(), bt(ou, {
8320
+ y.mode === "edit" ? (N(), bt(iu, {
8326
8321
  key: 1,
8327
8322
  onAddModel: l,
8328
8323
  onImportModel: c
@@ -8335,7 +8330,7 @@ const Gc = {
8335
8330
  ref_key: "containerRef",
8336
8331
  ref: f
8337
8332
  }, null, 2),
8338
- y.mode === "edit" ? (N(), bt(Jc, {
8333
+ y.mode === "edit" ? (N(), bt(Qc, {
8339
8334
  key: 0,
8340
8335
  transform: s,
8341
8336
  "tree-data": d.value,
@@ -8346,17 +8341,17 @@ const Gc = {
8346
8341
  onTransformModeChange: g
8347
8342
  }, null, 8, ["transform", "tree-data", "selected-object"])) : ue("", !0)
8348
8343
  ], 2),
8349
- y.mode === "edit" ? (N(), bt(lu, { key: 2 })) : ue("", !0)
8344
+ y.mode === "edit" ? (N(), bt(au, { key: 2 })) : ue("", !0)
8350
8345
  ]));
8351
8346
  }
8352
- }), Lu = /* @__PURE__ */ qe(du, [["__scopeId", "data-v-1be6406e"]]);
8347
+ }), Su = /* @__PURE__ */ qe(uu, [["__scopeId", "data-v-1be6406e"]]);
8353
8348
  export {
8354
- lu as BottomBar,
8349
+ au as BottomBar,
8355
8350
  _t as DataPanel,
8356
- Lu as DrawingBoard,
8357
- Jc as PropertyPanel,
8358
- ou as TopBar,
8359
- al as TreeItem,
8351
+ Su as DrawingBoard,
8352
+ Qc as PropertyPanel,
8353
+ iu as TopBar,
8354
+ rl as TreeItem,
8360
8355
  ni as addBox,
8361
8356
  ui as addDataPanel,
8362
8357
  oi as addDirectionalLight,
@@ -8367,21 +8362,21 @@ export {
8367
8362
  ai as addWaterCylinder,
8368
8363
  ci as addWaterPlane,
8369
8364
  $o as createCSS2DRenderer,
8370
- qa as destroyEditor,
8365
+ Xa as destroyEditor,
8371
8366
  sr as disposeCSS2DRenderer,
8372
8367
  Ga as exportSceneToJSON,
8373
8368
  Ma as focusOnObject,
8374
- mu as getCSS2DRenderer,
8369
+ Au as getCSS2DRenderer,
8375
8370
  Fa as getCamera,
8376
8371
  St as getDataPanel,
8377
- Su as getRenderer,
8378
- Ou as getScene,
8372
+ Ou as getRenderer,
8373
+ Ru as getScene,
8379
8374
  ka as getSceneObjects,
8380
8375
  ja as getSelectedObject,
8381
8376
  di as importModelFromFile,
8382
8377
  Zn as initDefaultMainCamera,
8383
8378
  ca as initEditor,
8384
- Xa as loadSceneFromJSON,
8379
+ Ba as loadSceneFromJSON,
8385
8380
  Ha as onSceneObjectsChangeCallback,
8386
8381
  Ea as registerModelDataPanel,
8387
8382
  Bn as removeDataPanel,
@@ -8396,7 +8391,7 @@ export {
8396
8391
  La as setSelectedObjectCallback,
8397
8392
  Na as setTransformChangeCallback,
8398
8393
  Ia as setTransformMode,
8399
- Ru as updateDataPanelValue,
8400
- zc as useTreeExpand
8394
+ Pu as updateDataPanelValue,
8395
+ Uc as useTreeExpand
8401
8396
  };
8402
8397
  //# sourceMappingURL=three-editor.es.js.map