endset_three_editor 0.9.7 → 0.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  var mi = Object.defineProperty;
2
2
  var gi = (r, e, t) => e in r ? mi(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
3
  var Ve = (r, e, t) => gi(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { toRaw as ss, defineComponent as Xe, ref as W, inject as yi, computed as ot, watchEffect as bi, resolveComponent as xi, openBlock as N, createElementBlock as U, createElementVNode as b, normalizeClass as Te, withModifiers as bs, unref as Ii, toDisplayString as de, Fragment as Le, renderList as ns, createBlock as bt, createCommentVNode as ue, reactive as xs, watch as ve, withDirectives as F, vModelText as Y, createTextVNode as os, withKeys as rt, vModelCheckbox as Ci, toRef as wi, provide as Mi, createVNode as rs, vShow as Qe, shallowRef as Fs, onMounted as vi, onBeforeUnmount as Ti } from "vue";
4
+ import { toRaw as ns, defineComponent as Xe, ref as W, inject as yi, computed as ot, watchEffect as bi, resolveComponent as xi, openBlock as N, createElementBlock as U, createElementVNode as b, normalizeClass as Te, withModifiers as xs, unref as Ii, toDisplayString as de, Fragment as Le, renderList as is, createBlock as bt, createCommentVNode as ue, reactive as Is, watch as ve, withDirectives as F, vModelText as Y, createTextVNode as rs, withKeys as rt, vModelCheckbox as Ci, toRef as wi, provide as Mi, createVNode as as, vShow as Qe, shallowRef as Fs, onMounted as vi, onBeforeUnmount as Ti } from "vue";
5
5
  import * as P from "three";
6
- import { Controls as wn, Vector3 as R, MOUSE as ct, TOUCH as at, Quaternion as pe, Spherical as Us, Vector2 as ce, Ray as Ei, Plane as Mn, MathUtils as Tt, Raycaster as Di, Object3D as dt, MeshBasicMaterial as Je, LineBasicMaterial as xt, CylinderGeometry as me, BoxGeometry as fe, BufferGeometry as et, Float32BufferAttribute as Se, Mesh as S, OctahedronGeometry as Lt, Line as je, TorusGeometry as ht, SphereGeometry as Pi, Euler as Ri, Matrix4 as xe, PlaneGeometry as Oi, DoubleSide as Ps, OrthographicCamera as vn, ShaderMaterial as Is, UniformsUtils as Zt, WebGLRenderTarget as Tn, HalfFloatType as En, NoBlending as Si, Timer as Li, Color as re, RawShaderMaterial as Ni, ColorManagement as Qt, SRGBTransfer as Hi, LinearToneMapping as ki, ReinhardToneMapping as ji, CineonToneMapping as Fi, ACESFilmicToneMapping as Ui, AgXToneMapping as zi, NeutralToneMapping as Gi, CustomToneMapping as Wi, BufferAttribute as we, REVISION as Bi, CompressedTexture as as, Source as Xi, NoColorSpace as qi, RGBAFormat as Vi, ImageUtils as Yi, PropertyBinding as Et, InterpolateDiscrete as Dn, Scene as zs, SRGBColorSpace as Ne, NearestFilter as Rs, NearestMipmapNearestFilter as Pn, NearestMipmapLinearFilter as Rn, LinearFilter as Jt, LinearMipmapNearestFilter as On, LinearMipmapLinearFilter as Os, ClampToEdgeWrapping as Sn, RepeatWrapping as _e, MirroredRepeatWrapping as Ln, InterpolateLinear as Ss, TrianglesDrawMode as Ki, TriangleFanDrawMode as Cs, TriangleStripDrawMode as Nn, Loader as Ls, LoaderUtils as It, FileLoader as Dt, MeshPhysicalMaterial as ke, LinearSRGBColorSpace as He, SpotLight as Zi, PointLight as Qi, DirectionalLight as Ji, InstancedMesh as _i, InstancedBufferAttribute as $i, TextureLoader as Wt, ImageBitmapLoader as eo, InterleavedBuffer as Hn, InterleavedBufferAttribute as kn, PointsMaterial as mt, Material as Ct, MeshStandardMaterial as jn, SkinnedMesh as to, LineSegments as ws, LineLoop as so, Points as Bt, Group as Xt, PerspectiveCamera as Fn, Skeleton as no, AnimationClip as io, Bone as oo, Texture as Gs, VectorKeyframeTrack as Ws, NumberKeyframeTrack as Bs, QuaternionKeyframeTrack as Xs, FrontSide as Un, Interpolant as ro, Box3 as ao, Sphere as lo, MeshPhongMaterial as co, Vector4 as qs, UniformsLib as Vs } from "three";
6
+ import { Controls as wn, Vector3 as R, MOUSE as ct, TOUCH as at, Quaternion as pe, Spherical as Us, Vector2 as ce, Ray as Ei, Plane as Mn, MathUtils as Tt, Raycaster as Di, Object3D as dt, MeshBasicMaterial as Je, LineBasicMaterial as xt, CylinderGeometry as me, BoxGeometry as fe, BufferGeometry as et, Float32BufferAttribute as Se, Mesh as S, OctahedronGeometry as Lt, Line as je, TorusGeometry as ht, SphereGeometry as Pi, Euler as Ri, Matrix4 as xe, PlaneGeometry as Oi, DoubleSide as Ps, OrthographicCamera as vn, ShaderMaterial as Cs, UniformsUtils as Qt, WebGLRenderTarget as Tn, HalfFloatType as En, NoBlending as Si, Timer as Li, Color as re, RawShaderMaterial as Ni, ColorManagement as Jt, SRGBTransfer as Hi, LinearToneMapping as ki, ReinhardToneMapping as ji, CineonToneMapping as Fi, ACESFilmicToneMapping as Ui, AgXToneMapping as zi, NeutralToneMapping as Gi, CustomToneMapping as Wi, BufferAttribute as we, REVISION as Bi, CompressedTexture as ls, Source as Xi, NoColorSpace as qi, RGBAFormat as Vi, ImageUtils as Yi, PropertyBinding as Et, InterpolateDiscrete as Dn, Scene as zs, SRGBColorSpace as Ne, NearestFilter as Rs, NearestMipmapNearestFilter as Pn, NearestMipmapLinearFilter as Rn, LinearFilter as _t, LinearMipmapNearestFilter as On, LinearMipmapLinearFilter as Os, ClampToEdgeWrapping as Sn, RepeatWrapping as _e, MirroredRepeatWrapping as Ln, InterpolateLinear as Ss, TrianglesDrawMode as Ki, TriangleFanDrawMode as ws, TriangleStripDrawMode as Nn, Loader as Ls, LoaderUtils as It, FileLoader as Dt, MeshPhysicalMaterial as ke, LinearSRGBColorSpace as He, SpotLight as Zi, PointLight as Qi, DirectionalLight as Ji, InstancedMesh as _i, InstancedBufferAttribute as $i, TextureLoader as Wt, ImageBitmapLoader as eo, InterleavedBuffer as Hn, InterleavedBufferAttribute as kn, PointsMaterial as mt, Material as Ct, MeshStandardMaterial as jn, SkinnedMesh as to, LineSegments as Ms, LineLoop as so, Points as Bt, Group as Xt, PerspectiveCamera as Fn, Skeleton as no, AnimationClip as io, Bone as oo, Texture as Gs, VectorKeyframeTrack as Ws, NumberKeyframeTrack as Bs, QuaternionKeyframeTrack as Xs, FrontSide as Un, Interpolant as ro, Box3 as ao, Sphere as lo, MeshPhongMaterial as co, Vector4 as qs, UniformsLib as Vs } from "three";
7
7
  import Pt from "@tweenjs/tween.js";
8
8
  const Ys = { type: "change" }, Ns = { type: "start" }, zn = { type: "end" }, Nt = new Ei(), Ks = new Mn(), uo = Math.cos(70 * Tt.DEG2RAD), ae = new R(), ge = 2 * Math.PI, $ = {
9
9
  NONE: -1,
@@ -14,7 +14,7 @@ const Ys = { type: "change" }, Ns = { type: "start" }, zn = { type: "end" }, Nt
14
14
  TOUCH_PAN: 4,
15
15
  TOUCH_DOLLY_PAN: 5,
16
16
  TOUCH_DOLLY_ROTATE: 6
17
- }, ls = 1e-6;
17
+ }, cs = 1e-6;
18
18
  class ho extends wn {
19
19
  /**
20
20
  * Constructs a new controls instance.
@@ -172,7 +172,7 @@ class ho extends wn {
172
172
  const o = this.object.zoom;
173
173
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), o !== this.object.zoom && (this.object.updateProjectionMatrix(), i = !0);
174
174
  }
175
- return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) > ls || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > ls || this._lastTargetPosition.distanceToSquared(this.target) > ls ? (this.dispatchEvent(Ys), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
175
+ return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) > cs || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > cs || this._lastTargetPosition.distanceToSquared(this.target) > cs ? (this.dispatchEvent(Ys), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
176
176
  }
177
177
  _getAutoRotationAngle(e) {
178
178
  return e !== null ? ge / 60 * this.autoRotateSpeed * e : ge / 60 / 60 * this.autoRotateSpeed;
@@ -516,7 +516,7 @@ const Ye = new Di(), he = new R(), ze = new R(), se = new pe(), Zs = {
516
516
  X: new R(1, 0, 0),
517
517
  Y: new R(0, 1, 0),
518
518
  Z: new R(0, 0, 1)
519
- }, cs = { type: "change" }, Qs = { type: "mouseDown", mode: null }, Js = { type: "mouseUp", mode: null }, _s = { type: "objectChange" };
519
+ }, us = { type: "change" }, Qs = { type: "mouseDown", mode: null }, Js = { type: "mouseUp", mode: null }, _s = { type: "objectChange" };
520
520
  class vo extends wn {
521
521
  /**
522
522
  * Constructs a new controls instance.
@@ -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(us));
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";
@@ -566,13 +566,13 @@ class vo extends wn {
566
566
  pointerHover(e) {
567
567
  if (this.object === void 0 || this.dragging === !0) return;
568
568
  e !== null && Ye.setFromCamera(e, this.camera);
569
- const t = us(this._gizmo.picker[this.mode], Ye);
569
+ const t = ds(this._gizmo.picker[this.mode], Ye);
570
570
  t ? this.axis = t.object.name : this.axis = null;
571
571
  }
572
572
  pointerDown(e) {
573
573
  if (!(this.object === void 0 || this.dragging === !0 || e != null && e.button !== 0) && this.axis !== null) {
574
574
  e !== null && Ye.setFromCamera(e, this.camera);
575
- const t = us(this._plane, Ye, !0);
575
+ const t = ds(this._plane, Ye, !0);
576
576
  t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, Qs.mode = this.mode, this.dispatchEvent(Qs);
577
577
  }
578
578
  }
@@ -581,7 +581,7 @@ class vo extends wn {
581
581
  let i = this.space;
582
582
  if (n === "scale" ? i = "local" : (t === "E" || t === "XYZE" || t === "XYZ") && (i = "world"), s === void 0 || t === null || this.dragging === !1 || e !== null && e.button !== -1) return;
583
583
  e !== null && Ye.setFromCamera(e, this.camera);
584
- const o = us(this._plane, Ye, !0);
584
+ const o = ds(this._plane, Ye, !0);
585
585
  if (o) {
586
586
  if (this.pointEnd.copy(o.point).sub(this.worldPositionStart), n === "translate")
587
587
  this._offset.copy(this.pointEnd).sub(this.pointStart), i === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), i === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), s.position.copy(this._offset).add(this._positionStart), this.translationSnap && (i === "local" && (s.position.applyQuaternion(se.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (s.position.x = Math.round(s.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (s.position.y = Math.round(s.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (s.position.z = Math.round(s.position.z / this.translationSnap) * this.translationSnap), s.position.applyQuaternion(this._quaternionStart)), i === "world" && (s.parent && s.position.add(he.setFromMatrixPosition(s.parent.matrixWorld)), t.search("X") !== -1 && (s.position.x = Math.round(s.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (s.position.y = Math.round(s.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (s.position.z = Math.round(s.position.z / this.translationSnap) * this.translationSnap), s.parent && s.position.sub(he.setFromMatrixPosition(s.parent.matrixWorld)))), s.position.x = Math.max(this.minX, Math.min(this.maxX, s.position.x)), s.position.y = Math.max(this.minY, Math.min(this.maxY, s.position.y)), s.position.z = Math.max(this.minZ, Math.min(this.maxZ, s.position.z));
@@ -598,7 +598,7 @@ class vo extends wn {
598
598
  let l = !1;
599
599
  t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(he.copy(this.rotationAxis).cross(this.eye)) * a) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(Zs[t]), he.copy(Zs[t]), i === "local" && he.applyQuaternion(this.worldQuaternion), he.cross(this.eye), he.length() === 0 ? l = !0 : this.rotationAngle = this._offset.dot(he.normalize()) * a), (t === "E" || l) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), i === "local" && t !== "E" && t !== "XYZE" ? (s.quaternion.copy(this._quaternionStart), s.quaternion.multiply(se.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), s.quaternion.copy(se.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), s.quaternion.multiply(this._quaternionStart).normalize());
600
600
  }
601
- this.dispatchEvent(cs), this.dispatchEvent(_s);
601
+ this.dispatchEvent(us), this.dispatchEvent(_s);
602
602
  }
603
603
  }
604
604
  pointerUp(e) {
@@ -628,7 +628,7 @@ class vo extends wn {
628
628
  * Resets the object's position, rotation and scale to when the current transform began.
629
629
  */
630
630
  reset() {
631
- this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(cs), this.dispatchEvent(_s), this.pointStart.copy(this.pointEnd));
631
+ this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(us), this.dispatchEvent(_s), this.pointStart.copy(this.pointEnd));
632
632
  }
633
633
  /**
634
634
  * Returns the raycaster that is used for user interaction. This object is shared between all
@@ -742,7 +742,7 @@ function Po(r) {
742
742
  function Ro(r) {
743
743
  this.enabled && (this.domElement.releasePointerCapture(r.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(r)));
744
744
  }
745
- function us(r, e, t) {
745
+ function ds(r, e, t) {
746
746
  const n = e.intersectObject(r, !0);
747
747
  for (let s = 0; s < n.length; s++)
748
748
  if (n[s].object.visible || t)
@@ -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) {
@@ -1210,7 +1210,7 @@ class Fo extends Ot {
1210
1210
  * the read buffer.
1211
1211
  */
1212
1212
  constructor(e, t = "tDiffuse") {
1213
- super(), this.textureID = t, this.uniforms = null, this.material = null, e instanceof Is ? (this.uniforms = e.uniforms, this.material = e) : e && (this.uniforms = Zt.clone(e.uniforms), this.material = new Is({
1213
+ super(), this.textureID = t, this.uniforms = null, this.material = null, e instanceof Cs ? (this.uniforms = e.uniforms, this.material = e) : e && (this.uniforms = Qt.clone(e.uniforms), this.material = new Cs({
1214
1214
  name: e.name !== void 0 ? e.name : "unspecified",
1215
1215
  defines: Object.assign({}, e.defines),
1216
1216
  uniforms: this.uniforms,
@@ -1544,7 +1544,7 @@ class Wo extends Ot {
1544
1544
  * Constructs a new output pass.
1545
1545
  */
1546
1546
  constructor() {
1547
- super(), this.isOutputPass = !0, this.uniforms = Zt.clone(Ft.uniforms), this.material = new Ni({
1547
+ super(), this.isOutputPass = !0, this.uniforms = Qt.clone(Ft.uniforms), this.material = new Ni({
1548
1548
  name: Ft.name,
1549
1549
  uniforms: this.uniforms,
1550
1550
  vertexShader: Ft.vertexShader,
@@ -1563,7 +1563,7 @@ class Wo extends Ot {
1563
1563
  * @param {boolean} maskActive - Whether masking is active or not.
1564
1564
  */
1565
1565
  render(e, t, n) {
1566
- this.uniforms.tDiffuse.value = n.texture, this.uniforms.toneMappingExposure.value = e.toneMappingExposure, (this._outputColorSpace !== e.outputColorSpace || this._toneMapping !== e.toneMapping) && (this._outputColorSpace = e.outputColorSpace, this._toneMapping = e.toneMapping, this.material.defines = {}, Qt.getTransfer(this._outputColorSpace) === Hi && (this.material.defines.SRGB_TRANSFER = ""), this._toneMapping === ki ? this.material.defines.LINEAR_TONE_MAPPING = "" : this._toneMapping === ji ? this.material.defines.REINHARD_TONE_MAPPING = "" : this._toneMapping === Fi ? this.material.defines.CINEON_TONE_MAPPING = "" : this._toneMapping === Ui ? this.material.defines.ACES_FILMIC_TONE_MAPPING = "" : this._toneMapping === zi ? this.material.defines.AGX_TONE_MAPPING = "" : this._toneMapping === Gi ? this.material.defines.NEUTRAL_TONE_MAPPING = "" : this._toneMapping === Wi && (this.material.defines.CUSTOM_TONE_MAPPING = ""), this.material.needsUpdate = !0), this.renderToScreen === !0 ? (e.setRenderTarget(null), this._fsQuad.render(e)) : (e.setRenderTarget(t), this.clear && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), this._fsQuad.render(e));
1566
+ this.uniforms.tDiffuse.value = n.texture, this.uniforms.toneMappingExposure.value = e.toneMappingExposure, (this._outputColorSpace !== e.outputColorSpace || this._toneMapping !== e.toneMapping) && (this._outputColorSpace = e.outputColorSpace, this._toneMapping = e.toneMapping, this.material.defines = {}, Jt.getTransfer(this._outputColorSpace) === Hi && (this.material.defines.SRGB_TRANSFER = ""), this._toneMapping === ki ? this.material.defines.LINEAR_TONE_MAPPING = "" : this._toneMapping === ji ? this.material.defines.REINHARD_TONE_MAPPING = "" : this._toneMapping === Fi ? this.material.defines.CINEON_TONE_MAPPING = "" : this._toneMapping === Ui ? this.material.defines.ACES_FILMIC_TONE_MAPPING = "" : this._toneMapping === zi ? this.material.defines.AGX_TONE_MAPPING = "" : this._toneMapping === Gi ? this.material.defines.NEUTRAL_TONE_MAPPING = "" : this._toneMapping === Wi && (this.material.defines.CUSTOM_TONE_MAPPING = ""), this.material.needsUpdate = !0), this.renderToScreen === !0 ? (e.setRenderTarget(null), this._fsQuad.render(e)) : (e.setRenderTarget(t), this.clear && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), this._fsQuad.render(e));
1567
1567
  }
1568
1568
  /**
1569
1569
  * Frees the GPU-related resources allocated by this instance. Call this
@@ -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
  }
@@ -1911,24 +1911,24 @@ const Ut = {
1911
1911
  }
1912
1912
  };
1913
1913
  Ve(lt, "_breathInjected", !1);
1914
- let _t = lt;
1915
- const $t = /* @__PURE__ */ new WeakMap();
1914
+ let $t = lt;
1915
+ const es = /* @__PURE__ */ new WeakMap();
1916
1916
  function Wn(r, e) {
1917
- const t = ss(r);
1918
- $t.set(t, e), t.userData._hasDataPanel = !0;
1917
+ const t = ns(r);
1918
+ es.set(t, e), t.userData._hasDataPanel = !0;
1919
1919
  }
1920
1920
  function St(r) {
1921
- return $t.get(ss(r)) || null;
1921
+ return es.get(ns(r)) || null;
1922
1922
  }
1923
1923
  function Bn(r) {
1924
- const e = ss(r), t = $t.get(e);
1925
- t && (t.dispose(), $t.delete(e)), e.userData._hasDataPanel = void 0;
1924
+ const e = ns(r), t = es.get(e);
1925
+ t && (t.dispose(), es.delete(e)), e.userData._hasDataPanel = void 0;
1926
1926
  }
1927
1927
  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) {
@@ -1971,7 +1971,7 @@ function nr() {
1971
1971
  const g = new P.Mesh(e, l(100));
1972
1972
  return g.position.set(0, 20, 0), g.scale.set(1, 0.1, 1), r.add(g), r;
1973
1973
  }
1974
- function Ms(r) {
1974
+ function Vt(r) {
1975
1975
  try {
1976
1976
  const e = new P.PMREMGenerator(r), t = nr(), n = e.fromScene(t).texture;
1977
1977
  return t.traverse((s) => {
@@ -2132,11 +2132,11 @@ const X = {
2132
2132
  CLAMP_TO_EDGE: 33071,
2133
2133
  MIRRORED_REPEAT: 33648,
2134
2134
  REPEAT: 10497
2135
- }, ds = "KHR_mesh_quantization", be = {};
2135
+ }, hs = "KHR_mesh_quantization", be = {};
2136
2136
  be[Rs] = X.NEAREST;
2137
2137
  be[Pn] = X.NEAREST_MIPMAP_NEAREST;
2138
2138
  be[Rn] = X.NEAREST_MIPMAP_LINEAR;
2139
- be[Jt] = X.LINEAR;
2139
+ be[_t] = X.LINEAR;
2140
2140
  be[On] = X.LINEAR_MIPMAP_NEAREST;
2141
2141
  be[Os] = X.LINEAR_MIPMAP_LINEAR;
2142
2142
  be[Sn] = X.CLAMP_TO_EDGE;
@@ -2174,7 +2174,7 @@ function dr(r, e, t) {
2174
2174
  function Xn(r) {
2175
2175
  return Math.ceil(r / 4) * 4;
2176
2176
  }
2177
- function hs(r, e = 0) {
2177
+ function fs(r, e = 0) {
2178
2178
  const t = Xn(r.byteLength);
2179
2179
  if (t !== r.byteLength) {
2180
2180
  const n = new Uint8Array(t);
@@ -2243,23 +2243,23 @@ class fr {
2243
2243
  if (d.length > 0 && (o.extensionsUsed = d), u.length > 0 && (o.extensionsRequired = u), o.buffers && o.buffers.length > 0 && (o.buffers[0].byteLength = c.size), n.binary === !0) {
2244
2244
  const A = new FileReader();
2245
2245
  A.readAsArrayBuffer(c), A.onloadend = function() {
2246
- const p = hs(A.result), g = new DataView(new ArrayBuffer(dn));
2246
+ const p = fs(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 = fs(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) {
@@ -2356,7 +2356,7 @@ class fr {
2356
2356
  return f;
2357
2357
  };
2358
2358
  }
2359
- e instanceof as && (e = await this.decompressTextureAsync(e)), t instanceof as && (t = await this.decompressTextureAsync(t));
2359
+ e instanceof ls && (e = await this.decompressTextureAsync(e)), t instanceof ls && (t = await this.decompressTextureAsync(t));
2360
2360
  const s = e ? e.image : null, i = t ? t.image : null, o = Math.max(s ? s.width : 0, i ? i.width : 0), a = Math.max(s ? s.height : 0, i ? i.height : 0), l = hn();
2361
2361
  l.width = o, l.height = a;
2362
2362
  const c = l.getContext("2d", {
@@ -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
  }
@@ -2450,7 +2450,7 @@ class fr {
2450
2450
  return n.bufferViews || (n.bufferViews = []), new Promise(function(s) {
2451
2451
  const i = new FileReader();
2452
2452
  i.readAsArrayBuffer(e), i.onloadend = function() {
2453
- const o = hs(i.result), a = {
2453
+ const o = fs(i.result), a = {
2454
2454
  buffer: t.processBuffer(o),
2455
2455
  byteOffset: t.byteOffset,
2456
2456
  byteLength: o.byteLength
@@ -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;
@@ -2572,7 +2572,7 @@ class fr {
2572
2572
  async processTextureAsync(e) {
2573
2573
  const n = this.options, s = this.cache, i = this.json;
2574
2574
  if (s.textures.has(e)) return s.textures.get(e);
2575
- i.textures || (i.textures = []), e instanceof as && (e = await this.decompressTextureAsync(e, n.maxTextureSize));
2575
+ i.textures || (i.textures = []), e instanceof ls && (e = await this.decompressTextureAsync(e, n.maxTextureSize));
2576
2576
  const o = e.userData.mimeType, a = this.processImage(e.image, e.format, e.flipY, o), l = {
2577
2577
  sampler: this.processSampler(e)
2578
2578
  };
@@ -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
@@ -2753,7 +2753,7 @@ class fr {
2753
2753
  * @param {THREE.BufferAttribute} attribute
2754
2754
  */
2755
2755
  detectMeshQuantization(e, t) {
2756
- if (this.extensionsUsed[ds]) return;
2756
+ if (this.extensionsUsed[hs]) return;
2757
2757
  let n;
2758
2758
  switch (t.array.constructor) {
2759
2759
  case Int8Array:
@@ -2773,7 +2773,7 @@ class fr {
2773
2773
  }
2774
2774
  t.normalized && (n += " normalized");
2775
2775
  const s = e.split("_", 1)[0];
2776
- ln[s] && ln[s].includes(n) && (this.extensionsUsed[ds] = !0, this.extensionsRequired[ds] = !0);
2776
+ ln[s] && ln[s].includes(n) && (this.extensionsUsed[hs] = !0, this.extensionsRequired[hs] = !0);
2777
2777
  }
2778
2778
  /**
2779
2779
  * Process camera
@@ -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);
@@ -3293,7 +3293,7 @@ wt.Utils = {
3293
3293
  function fn(r, e) {
3294
3294
  if (e === Ki)
3295
3295
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), r;
3296
- if (e === Cs || e === Nn) {
3296
+ if (e === ws || e === Nn) {
3297
3297
  let t = r.getIndex();
3298
3298
  if (t === null) {
3299
3299
  const o = [], a = r.getAttribute("position");
@@ -3305,7 +3305,7 @@ function fn(r, e) {
3305
3305
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), r;
3306
3306
  }
3307
3307
  const n = t.count - 2, s = [];
3308
- if (e === Cs)
3308
+ if (e === ws)
3309
3309
  for (let o = 1; o <= n; o++)
3310
3310
  s.push(t.getX(0)), s.push(t.getX(o)), s.push(t.getX(o + 1));
3311
3311
  else
@@ -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
  }
@@ -4041,7 +4041,7 @@ const Ce = {
4041
4041
  5126: Float32Array
4042
4042
  }, mn = {
4043
4043
  9728: Rs,
4044
- 9729: Jt,
4044
+ 9729: _t,
4045
4045
  9984: Pn,
4046
4046
  9985: On,
4047
4047
  9986: Rn,
@@ -4050,7 +4050,7 @@ const Ce = {
4050
4050
  33071: Sn,
4051
4051
  33648: Ln,
4052
4052
  10497: _e
4053
- }, fs = {
4053
+ }, ps = {
4054
4054
  SCALAR: 1,
4055
4055
  VEC2: 2,
4056
4056
  VEC3: 3,
@@ -4080,7 +4080,7 @@ const Ce = {
4080
4080
  // keyframe track will be initialized with a default interpolation type, then modified.
4081
4081
  LINEAR: Ss,
4082
4082
  STEP: Dn
4083
- }, ps = {
4083
+ }, As = {
4084
4084
  OPAQUE: "OPAQUE",
4085
4085
  MASK: "MASK",
4086
4086
  BLEND: "BLEND"
@@ -4152,12 +4152,12 @@ function sa(r, e) {
4152
4152
  function na(r) {
4153
4153
  let e;
4154
4154
  const t = r.extensions && r.extensions[B.KHR_DRACO_MESH_COMPRESSION];
4155
- if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + As(t.attributes) : e = r.indices + ":" + As(r.attributes) + ":" + r.mode, r.targets !== void 0)
4155
+ if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + ms(t.attributes) : e = r.indices + ":" + ms(r.attributes) + ":" + r.mode, r.targets !== void 0)
4156
4156
  for (let n = 0, s = r.targets.length; n < s; n++)
4157
- e += ":" + As(r.targets[n]);
4157
+ e += ":" + ms(r.targets[n]);
4158
4158
  return e;
4159
4159
  }
4160
- function As(r) {
4160
+ function ms(r) {
4161
4161
  let e = "";
4162
4162
  const t = Object.keys(r).sort();
4163
4163
  for (let n = 0, s = t.length; n < s; n++)
@@ -4432,29 +4432,29 @@ class ra {
4432
4432
  loadAccessor(e) {
4433
4433
  const t = this, n = this.json, s = this.json.accessors[e];
4434
4434
  if (s.bufferView === void 0 && s.sparse === void 0) {
4435
- const o = fs[s.type], a = ut[s.componentType], l = s.normalized === !0, c = new a(s.count * o);
4435
+ const o = ps[s.type], a = ut[s.componentType], l = s.normalized === !0, c = new a(s.count * o);
4436
4436
  return Promise.resolve(new we(c, o, l));
4437
4437
  }
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
- 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;
4440
+ const a = o[0], l = ps[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, 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 = ps.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
  /**
@@ -4480,7 +4480,7 @@ class ra {
4480
4480
  const c = this.loadImageSource(t, n).then(function(d) {
4481
4481
  d.flipY = !1, d.name = o.name || a.name || "", d.name === "" && typeof a.uri == "string" && a.uri.startsWith("data:image/") === !1 && (d.name = a.uri);
4482
4482
  const A = (i.samplers || {})[o.sampler] || {};
4483
- return d.magFilter = mn[A.magFilter] || Jt, d.minFilter = mn[A.minFilter] || Os, d.wrapS = gn[A.wrapS] || _e, d.wrapT = gn[A.wrapT] || _e, d.generateMipmaps = !d.isCompressedTexture && d.minFilter !== Rs && d.minFilter !== Jt, s.associations.set(d, { textures: e }), d;
4483
+ return d.magFilter = mn[A.magFilter] || _t, d.minFilter = mn[A.minFilter] || Os, d.wrapS = gn[A.wrapS] || _e, d.wrapT = gn[A.wrapT] || _e, d.generateMipmaps = !d.isCompressedTexture && d.minFilter !== Rs && d.minFilter !== _t, s.associations.set(d, { textures: e }), d;
4484
4484
  }).catch(function() {
4485
4485
  return null;
4486
4486
  });
@@ -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) {
@@ -4600,8 +4600,8 @@ class ra {
4600
4600
  })));
4601
4601
  }
4602
4602
  i.doubleSided === !0 && (a.side = Ps);
4603
- const d = i.alphaMode || ps.OPAQUE;
4604
- if (d === ps.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, d === ps.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== Je && (c.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new ce(1, 1), i.normalTexture.scale !== void 0)) {
4603
+ const d = i.alphaMode || As.OPAQUE;
4604
+ if (d === As.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, d === As.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== Je && (c.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new ce(1, 1), i.normalTexture.scale !== void 0)) {
4605
4605
  const u = i.normalTexture.scale;
4606
4606
  a.normalScale.set(u, u);
4607
4607
  }
@@ -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, ws));
4677
+ else if (m.mode === Ce.LINES)
4678
+ y = new Ms(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) {
@@ -4998,11 +4998,11 @@ function yn(r, e, t) {
4998
4998
  });
4999
4999
  s.push(o);
5000
5000
  }
5001
- return Qt.workingColorSpace !== He && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Qt.workingColorSpace}" not supported.`), Oe(r, e), aa(r, e, t), Promise.all(s).then(function() {
5001
+ return Jt.workingColorSpace !== He && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Jt.workingColorSpace}" not supported.`), Oe(r, e), aa(r, e, t), Promise.all(s).then(function() {
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
  /** 控制器模式 */
@@ -5026,70 +5026,78 @@ const I = {
5026
5026
  /** 当前选中的物体 */
5027
5027
  selectedObject: null
5028
5028
  };
5029
- let Vt = !1, tt = !1, We = null;
5029
+ let Yt = !1, tt = !1, We = null;
5030
5030
  const la = 16755200;
5031
- let Es = [], zt = [], Rt = !0, $e = null, Ds = null, Yt = null, Be = [];
5031
+ let Es = [], zt = [], Rt = !0, $e = null, Ds = null, Kt = null, Be = [];
5032
5032
  const st = /* @__PURE__ */ new Map();
5033
- let es, Kt = null, Mt = null, vt = null;
5033
+ let ts, Zt = 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(), ts && C.orbitControls && (C.orbitControls.target.fromArray(ts), 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 = Vt(C.renderer);
5063
+ r ? (C.scene.environment = r, C.scene.environmentIntensity = 1, console.log(
5064
+ "[初始化诊断] 环境贴图: 已生成",
5065
+ "environmentIntensity:",
5066
+ C.scene.environmentIntensity
5067
+ )) : console.warn("[初始化] 环境贴图生成失败,场景将没有 IBL 间接光照");
5060
5068
  }
5061
5069
  }
5062
5070
  function pa() {
5063
5071
  const r = new P.GridHelper(30, 30, 8956671, 3364232);
5064
- r.name = "地板", r.userData.type = "initFloor", I.scene.add(r), I.gridHelper = r;
5072
+ r.name = "地板", r.userData.type = "initFloor", C.scene.add(r), C.gridHelper = r;
5065
5073
  }
5066
5074
  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;
5075
+ const r = C.container, e = r.clientWidth / r.clientHeight, t = new P.PerspectiveCamera(45, e, 0.1, 1e3);
5076
+ t.position.set(0, 6, 15), t.lookAt(0, 0, 0), C.camera = t;
5069
5077
  }
5070
5078
  function Zn(r = !1) {
5071
- if (!I.defaultMainCamera) return;
5072
- const e = I.defaultMainCamera;
5079
+ if (!C.defaultMainCamera) return;
5080
+ const e = C.defaultMainCamera;
5073
5081
  if (r) {
5074
- I.camera.position.set(
5082
+ C.camera.position.set(
5075
5083
  e.position[0],
5076
5084
  e.position[1],
5077
5085
  e.position[2]
5078
- ), I.camera.rotation.set(
5086
+ ), C.camera.rotation.set(
5079
5087
  e.rotation[0],
5080
5088
  e.rotation[1],
5081
5089
  e.rotation[2]
5082
- ), I.camera.updateProjectionMatrix(), es = e.target;
5090
+ ), C.camera.updateProjectionMatrix(), ts = e.target;
5083
5091
  return;
5084
5092
  } else
5085
- $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(
5093
+ $n(""), ss();
5094
+ if (!C.camera || !C.orbitControls) return;
5095
+ const t = C.camera.position.clone(), n = C.orbitControls.target.clone(), s = new P.Vector3(
5088
5096
  e.position[0],
5089
5097
  e.position[1],
5090
5098
  e.position[2]
5091
5099
  ), 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({
5100
+ C.orbitControls.enabled = !1, new Pt.Tween({
5093
5101
  x: t.x,
5094
5102
  y: t.y,
5095
5103
  z: t.z,
@@ -5107,41 +5115,41 @@ function Zn(r = !1) {
5107
5115
  },
5108
5116
  1e3
5109
5117
  ).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();
5118
+ C.camera.position.set(o.x, o.y, o.z), C.orbitControls.target.set(o.tx, o.ty, o.tz), C.orbitControls.update();
5111
5119
  }).onComplete(() => {
5112
- es = e.target, I.orbitControls.enabled = !0;
5120
+ ts = e.target, C.orbitControls.enabled = !0;
5113
5121
  }).start();
5114
5122
  }
5115
5123
  function ma() {
5116
- const r = new ho(I.camera, I.renderer.domElement);
5124
+ const r = new ho(C.camera, C.renderer.domElement);
5117
5125
  r.minDistance = 0, r.maxDistance = 1 / 0, r.addEventListener("start", () => {
5118
- Vt = !1;
5126
+ Yt = !1;
5119
5127
  }), r.addEventListener("change", () => {
5120
- Vt = !0;
5128
+ Yt = !0;
5121
5129
  }), r.addEventListener("end", () => {
5122
- Vt && (tt = !0, setTimeout(() => {
5130
+ Yt && (tt = !0, setTimeout(() => {
5123
5131
  tt = !1;
5124
5132
  }, 200));
5125
- }), I.orbitControls = r;
5133
+ }), C.orbitControls = r;
5126
5134
  }
5127
5135
  function ga() {
5128
5136
  const r = new vo(
5129
- I.camera,
5130
- I.renderer.domElement
5137
+ C.camera,
5138
+ C.renderer.domElement
5131
5139
  );
5132
5140
  r.addEventListener("dragging-changed", (e) => {
5133
- I.orbitControls.enabled = !e.value, e.value || (tt = !0, setTimeout(() => {
5141
+ C.orbitControls.enabled = !e.value, e.value || (tt = !0, setTimeout(() => {
5134
5142
  tt = !1;
5135
5143
  }, 200));
5136
5144
  }), r.addEventListener("objectChange", () => {
5137
- const e = I.selectedObject;
5145
+ const e = C.selectedObject;
5138
5146
  if (Ds && e && Ds(e), e && e.type === "DirectionalLight") {
5139
5147
  const t = e.userData.helper;
5140
5148
  t && t.update && t.update();
5141
5149
  }
5142
- }), I.scene.add(r.getHelper()), I.transformControls = r;
5150
+ }), C.scene.add(r.getHelper()), C.transformControls = r;
5143
5151
  }
5144
- function Qn(r = I.scene) {
5152
+ function Qn(r = C.scene) {
5145
5153
  if (!r || r.children.some((t) => t.type === "AmbientLight")) return null;
5146
5154
  const e = new P.AmbientLight(
5147
5155
  Ua,
@@ -5150,18 +5158,18 @@ function Qn(r = I.scene) {
5150
5158
  return e.name = "环境光", r.add(e), e;
5151
5159
  }
5152
5160
  function ya() {
5153
- Qn(I.scene);
5161
+ Qn(C.scene);
5154
5162
  }
5155
5163
  function Jn() {
5156
5164
  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) => {
5165
+ Zt = 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
5166
  n.userData.isWater && n.type === "Mesh" && zt.push(n);
5159
5167
  }), Rt = !1);
5160
5168
  for (let n = 0; n < zt.length; n++) {
5161
5169
  const s = zt[n], i = s.material;
5162
5170
  if (i.uniforms && i.uniforms.time) {
5163
5171
  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);
5172
+ i.uniforms.time.value += 1 / 60 * o, C.camera && i.uniforms.eye && i.uniforms.eye.value.copy(C.camera.position);
5165
5173
  continue;
5166
5174
  }
5167
5175
  if (i.normalMap) {
@@ -5171,29 +5179,29 @@ function Jn() {
5171
5179
  }
5172
5180
  }
5173
5181
  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));
5182
+ if (!C.container || !C.camera || !C.renderer) return;
5183
+ const r = C.container.clientWidth, e = C.container.clientHeight;
5184
+ 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
5185
  }
5178
5186
  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));
5187
+ 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
5188
  }
5181
5189
  let ye = null;
5182
5190
  function xa(r) {
5183
5191
  ye = r;
5184
5192
  }
5185
- function ms(r) {
5193
+ function gs(r) {
5186
5194
  ye == null || ye(r);
5187
5195
  }
5188
5196
  function Ia(r) {
5189
- I.transformControlsMode = r, I.transformControls && I.transformControls.setMode(I.transformControlsMode);
5197
+ C.transformControlsMode = r, C.transformControls && C.transformControls.setMode(C.transformControlsMode);
5190
5198
  }
5191
5199
  function _n(r) {
5192
- if (I.mode !== "edit") {
5193
- ts();
5200
+ if (C.mode !== "edit") {
5201
+ ss();
5194
5202
  return;
5195
5203
  }
5196
- ts(), r.traverse((e) => {
5204
+ ss(), r.traverse((e) => {
5197
5205
  if (e.isMesh) {
5198
5206
  const t = e, n = new P.EdgesGeometry(t.geometry), s = new P.LineBasicMaterial({
5199
5207
  color: la,
@@ -5203,13 +5211,13 @@ function _n(r) {
5203
5211
  }
5204
5212
  });
5205
5213
  }
5206
- function ts() {
5214
+ function ss() {
5207
5215
  for (const r of Es)
5208
5216
  r.parent && r.parent.remove(r), r.geometry.dispose(), r.material.dispose();
5209
5217
  Es = [];
5210
5218
  }
5211
5219
  function ks() {
5212
- I.selectedObject && (ts(), I.transformControls.detach(), I.selectedObject = null, $e == null || $e(null));
5220
+ C.selectedObject && (ss(), C.transformControls.detach(), C.selectedObject = null, $e == null || $e(null));
5213
5221
  }
5214
5222
  function $n(r) {
5215
5223
  let e = null;
@@ -5219,7 +5227,7 @@ function $n(r) {
5219
5227
  });
5220
5228
  }), e && (e.children.forEach((t) => {
5221
5229
  t.name && t.name.startsWith("DataPanel_") && (t.visible = !0);
5222
- }), _n(e), I.selectedObject = e, setTimeout(() => {
5230
+ }), _n(e), C.selectedObject = e, setTimeout(() => {
5223
5231
  Ma(e);
5224
5232
  }, 500));
5225
5233
  }
@@ -5228,13 +5236,13 @@ function Ca(r) {
5228
5236
  tt = !1;
5229
5237
  return;
5230
5238
  }
5231
- const e = I.renderer.domElement.getBoundingClientRect(), t = new P.Vector2(
5239
+ const e = C.renderer.domElement.getBoundingClientRect(), t = new P.Vector2(
5232
5240
  (r.clientX - e.left) / e.width * 2 - 1,
5233
5241
  -((r.clientY - e.top) / e.height) * 2 + 1
5234
5242
  ), n = new P.Raycaster();
5235
- n.setFromCamera(t, I.camera);
5243
+ n.setFromCamera(t, C.camera);
5236
5244
  const s = [];
5237
- I.scene.traverse((o) => {
5245
+ C.scene.traverse((o) => {
5238
5246
  (o.userData.isMovable || o.userData.type === "lightHelper") && s.push(o);
5239
5247
  });
5240
5248
  const i = n.intersectObjects(s);
@@ -5245,32 +5253,30 @@ function Ca(r) {
5245
5253
  ks();
5246
5254
  }
5247
5255
  function wa(r) {
5248
- var t, n;
5256
+ var t;
5249
5257
  let e = r;
5250
5258
  for (; e; ) {
5251
5259
  if (((t = e.userData) == null ? void 0 : t.type) === "lightHelper" || e.type === "DirectionalLightHelper")
5252
5260
  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
5261
  e = e.parent;
5256
5262
  }
5257
5263
  if (r.type === "Line" || r.type === "LineSegments") {
5258
- const s = r.parent;
5259
- if (s)
5260
- switch (s.type) {
5264
+ const n = r.parent;
5265
+ if (n)
5266
+ switch (n.type) {
5261
5267
  case "DirectionalLightHelper":
5262
- return s.light;
5268
+ return n.light;
5263
5269
  case "AmbientLight":
5264
- return s;
5270
+ return n;
5265
5271
  default:
5266
- return s.isMesh ? s : r;
5272
+ return n.isMesh ? n : r;
5267
5273
  }
5268
5274
  return r;
5269
5275
  }
5270
5276
  return r;
5271
5277
  }
5272
5278
  function Ma(r, e = 500) {
5273
- if (!I.camera || !I.orbitControls) {
5279
+ if (!C.camera || !C.orbitControls) {
5274
5280
  console.warn(
5275
5281
  "[focusOnObject] 编辑器尚未初始化或已销毁,无法执行聚焦操作。请确保已调用 initEditor()"
5276
5282
  );
@@ -5284,9 +5290,9 @@ function Ma(r, e = 500) {
5284
5290
  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
5291
  const n = new P.Vector3();
5286
5292
  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();
5293
+ 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
5294
  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();
5295
+ const c = n.clone().add(l.multiplyScalar(a)), d = C.camera.position.clone(), u = C.orbitControls.target.clone();
5290
5296
  try {
5291
5297
  new Pt.Tween({
5292
5298
  x: d.x,
@@ -5306,7 +5312,7 @@ function Ma(r, e = 500) {
5306
5312
  },
5307
5313
  e
5308
5314
  ).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();
5315
+ C.camera.position.set(A.x, A.y, A.z), C.orbitControls.target.set(A.tx, A.ty, A.tz), C.orbitControls.update();
5310
5316
  }).start();
5311
5317
  } catch (A) {
5312
5318
  console.error(
@@ -5339,17 +5345,17 @@ function Da(r) {
5339
5345
  });
5340
5346
  }
5341
5347
  function nt(r, e = !1) {
5342
- I.scene.add(r), Rt = !0, r.userData.isMovable && (Oa(r), is()), e && I.mode === "edit" && Hs(r);
5348
+ C.scene.add(r), Rt = !0, r.userData.isMovable && (Oa(r), os()), e && C.mode === "edit" && Hs(r);
5343
5349
  }
5344
5350
  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();
5351
+ 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), os();
5346
5352
  }
5347
5353
  function Ra(r) {
5348
- const e = I.scene.getObjectByProperty("uuid", r);
5354
+ const e = C.scene.getObjectByProperty("uuid", r);
5349
5355
  e && Pa(e);
5350
5356
  }
5351
5357
  function Oa(r) {
5352
- r.userData.isMovable && r.parent === I.scene && (Be.includes(r) || Be.push(r));
5358
+ r.userData.isMovable && r.parent === C.scene && (Be.includes(r) || Be.push(r));
5353
5359
  }
5354
5360
  function Sa(r) {
5355
5361
  const e = Be.indexOf(r);
@@ -5357,12 +5363,12 @@ function Sa(r) {
5357
5363
  }
5358
5364
  function ei() {
5359
5365
  const r = [];
5360
- I.scene.children.forEach((e) => {
5366
+ C.scene.children.forEach((e) => {
5361
5367
  e.userData.isMovable && r.push(e);
5362
- }), Be = r, is();
5368
+ }), Be = r, os();
5363
5369
  }
5364
- function is() {
5365
- Yt == null || Yt([...Be]);
5370
+ function os() {
5371
+ Kt == null || Kt([...Be]);
5366
5372
  }
5367
5373
  function La(r) {
5368
5374
  $e = r;
@@ -5371,36 +5377,36 @@ function Na(r) {
5371
5377
  Ds = r;
5372
5378
  }
5373
5379
  function Ha(r) {
5374
- Yt = r;
5380
+ Kt = r;
5375
5381
  }
5376
5382
  function ka() {
5377
5383
  return Be;
5378
5384
  }
5379
5385
  function ja() {
5380
- return I.selectedObject;
5386
+ return C.selectedObject;
5381
5387
  }
5382
- function Ru(r, e, t) {
5383
- if (!I.scene) return;
5388
+ function Pu(r, e, t) {
5389
+ if (!C.scene) return;
5384
5390
  const n = st.get(r);
5385
5391
  if (n) {
5386
5392
  const s = St(n);
5387
5393
  s && s.updateItemByCode(e, t);
5388
5394
  }
5389
5395
  }
5390
- function Ou() {
5391
- return I.scene;
5396
+ function Ru() {
5397
+ return C.scene;
5392
5398
  }
5393
5399
  function Fa() {
5394
- return I.camera;
5400
+ return C.camera;
5395
5401
  }
5396
- function Su() {
5397
- return I.renderer;
5402
+ function Ou() {
5403
+ return C.renderer;
5398
5404
  }
5399
5405
  const Ua = 16777215, za = 1;
5400
5406
  async function Ga() {
5401
- var w, m, v, D;
5407
+ var I, h, w, E;
5402
5408
  ye == null || ye(!0), await new Promise((M) => setTimeout(M, 50)), ks();
5403
- const r = I.scene;
5409
+ const r = C.scene;
5404
5410
  if (!r)
5405
5411
  return ye == null || ye(!1), {
5406
5412
  scene: new ArrayBuffer(0),
@@ -5416,21 +5422,20 @@ async function Ga() {
5416
5422
  r.traverse((M) => {
5417
5423
  var H, ne;
5418
5424
  if (M.userData._sourceUuid = M.uuid, M.type === "AmbientLight") {
5419
- const k = M;
5425
+ const j = M;
5420
5426
  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);
5427
+ color: "#" + j.color.getHexString(),
5428
+ intensity: j.intensity,
5429
+ name: j.name || "环境光",
5430
+ visible: j.visible,
5431
+ position: j.position.toArray()
5432
+ }, l.push(j);
5428
5433
  }
5429
5434
  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;
5435
+ const j = M, J = j.material;
5431
5436
  let K = "#4fc3f7";
5432
5437
  J.uniforms && J.uniforms.waterColor && (K = "#" + J.uniforms.waterColor.value.getHexString());
5433
- const Z = k.geometry, z = {
5438
+ const Z = j.geometry, z = {
5434
5439
  uuid: M.uuid,
5435
5440
  name: M.name,
5436
5441
  position: M.position.toArray(),
@@ -5448,12 +5453,12 @@ async function Ga() {
5448
5453
  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
5454
  }
5450
5455
  if (M.name && M.name.startsWith("DataPanel_")) {
5451
- const k = M;
5452
- if (k.element) {
5453
- const J = k.element.querySelector(
5456
+ const j = M;
5457
+ if (j.element) {
5458
+ const J = j.element.querySelector(
5454
5459
  "[data-panel-title]"
5455
5460
  ), K = [];
5456
- if (k.element.querySelectorAll(
5461
+ if (j.element.querySelectorAll(
5457
5462
  ".sl-css2d-data-panel-item"
5458
5463
  ).forEach((z) => {
5459
5464
  var ee, le, _;
@@ -5465,7 +5470,7 @@ async function Ga() {
5465
5470
  K.push({ label: Ee, value: De, unit: Ue, code: Pe });
5466
5471
  }
5467
5472
  }), M.parent) {
5468
- const z = k.element.style.width || "", L = k.element.style.fontSize || "", Q = St(M.parent), ee = Q ? Q.getOffsetY() : 0.1;
5473
+ const z = j.element.style.width || "", L = j.element.style.fontSize || "", Q = St(M.parent), ee = Q ? Q.getOffsetY() : 0.1;
5469
5474
  n.set(
5470
5475
  M.parent.userData.id ? M.parent.userData.id : M.parent.uuid,
5471
5476
  {
@@ -5482,7 +5487,7 @@ async function Ga() {
5482
5487
  }
5483
5488
  }
5484
5489
  if (M.type === "Mesh") {
5485
- const k = M, J = Array.isArray(k.material) ? k.material : [k.material];
5490
+ const j = M, J = Array.isArray(j.material) ? j.material : [j.material];
5486
5491
  for (const K of J)
5487
5492
  if (K && K.userData) {
5488
5493
  const Z = K.userData;
@@ -5493,7 +5498,7 @@ async function Ga() {
5493
5498
  }
5494
5499
  }
5495
5500
  }), 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;
5501
+ const c = (I = C.transformControls) == null ? void 0 : I.getHelper(), d = (c == null ? void 0 : c.parent) ?? null;
5497
5502
  c && c.parent && c.parent.remove(c);
5498
5503
  const u = /* @__PURE__ */ new Map();
5499
5504
  for (const M of l)
@@ -5526,23 +5531,23 @@ async function Ga() {
5526
5531
  }), r.traverse((M) => {
5527
5532
  delete M.userData._sourceUuid;
5528
5533
  }), 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]
5534
+ const m = {
5535
+ position: (h = C.camera) == null ? void 0 : h.position.toArray(),
5536
+ rotation: (w = C.camera) == null ? void 0 : w.rotation.toArray(),
5537
+ target: ((E = C.orbitControls) == null ? void 0 : E.target.toArray()) || [0, 0, 0]
5533
5538
  }, y = {};
5534
5539
  n.forEach((M, H) => {
5535
5540
  y[H] = M;
5536
5541
  });
5537
- const C = {
5542
+ const v = {
5538
5543
  scene: f,
5539
- camera: h,
5544
+ camera: m,
5540
5545
  dataPanels: y,
5541
5546
  waters: i,
5542
5547
  textures: s,
5543
5548
  ambientLight: a
5544
5549
  };
5545
- return ye == null || ye(!1), C;
5550
+ return ye == null || ye(!1), v;
5546
5551
  }
5547
5552
  function Wa(r) {
5548
5553
  if (r instanceof ArrayBuffer || ArrayBuffer.isView(r)) {
@@ -5567,114 +5572,113 @@ function Wa(r) {
5567
5572
  }
5568
5573
  return r && typeof r == "object" && r.type === "Buffer" && Array.isArray(r.data) ? new Uint8Array(r.data).buffer : null;
5569
5574
  }
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;
5575
+ async function Ba(r, e = "edit", t, n, s, i) {
5576
+ var a, l, c, d, u, A, p, g, f, m;
5582
5577
  const o = Wa(r);
5583
5578
  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"))
5579
+ 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;
5580
+ if (C.scene = v, !v.children.some((h) => h.type === "AmbientLight"))
5586
5581
  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);
5582
+ const h = new P.AmbientLight(i.color, i.intensity);
5583
+ h.name = i.name || "环境光", h.visible = i.visible ?? !0, i.position && h.position.fromArray(i.position), v.add(h);
5593
5584
  } 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);
5600
- }
5585
+ Qn(v);
5586
+ if (I)
5587
+ C.scene.environment = I, C.scene.environmentIntensity = 1;
5588
+ else if (C.renderer) {
5589
+ const h = Vt(C.renderer);
5590
+ h && (C.scene.environment = h, C.scene.environmentIntensity = 1);
5591
+ }
5592
+ if (!C.scene.environment && C.renderer) {
5593
+ const h = Vt(C.renderer);
5594
+ h ? (C.scene.environment = h, C.scene.environmentIntensity = 1, console.warn("[导入] 原环境贴图不可用,已重新生成")) : console.error("[导入] 环境贴图生成失败,场景将没有 IBL 间接光照,模型会偏暗");
5595
+ }
5596
+ console.log("[导入诊断] bin 环境光参数:", i), console.log("[导入诊断] 导入后渲染状态:", {
5597
+ 环境光: C.scene.children.filter((h) => h.type === "AmbientLight").map((h) => ({ color: "#" + h.color.getHexString(), intensity: h.intensity })),
5598
+ 有环境贴图: !!C.scene.environment,
5599
+ 环境贴图强度: C.scene.environmentIntensity,
5600
+ toneMapping: (c = C.renderer) == null ? void 0 : c.toneMapping,
5601
+ 曝光: (d = C.renderer) == null ? void 0 : d.toneMappingExposure,
5602
+ 输出色彩空间: (u = C.renderer) == null ? void 0 : u.outputColorSpace
5603
+ });
5601
5604
  } 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);
5605
+ const y = typeof r == "string" ? JSON.parse(r) : r, I = new P.ObjectLoader().parse(y);
5606
+ if (I.type === "Scene") {
5607
+ const h = (A = C.scene) == null ? void 0 : A.environment;
5608
+ if (C.scene = I, h)
5609
+ C.scene.environment = h, C.scene.environmentIntensity = 1;
5610
+ else if (C.renderer) {
5611
+ const w = Vt(C.renderer);
5612
+ w && (C.scene.environment = w, C.scene.environmentIntensity = 1);
5610
5613
  }
5611
5614
  } 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
5615
+ (p = C.scene) == null || p.add(I);
5616
+ }
5617
+ if (t && ((g = C.scene) == null || g.traverse((y) => {
5618
+ const v = y.userData.id || y.userData._sourceUuid || y.uuid, I = t[v];
5619
+ if (I && y.userData.isMovable) {
5620
+ va(y);
5621
+ const h = new $t({
5622
+ title: I.title,
5623
+ items: I.items
5621
5624
  });
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,
5625
+ 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);
5626
+ }
5627
+ })), n && n.length > 0 && Promise.resolve().then(() => el).then(({ addWater: y, addWaterCylinder: v }) => {
5628
+ for (const I of n) {
5629
+ const h = I.geometryType || "box";
5630
+ let w;
5631
+ h === "cylinder" ? w = v({
5632
+ radiusTop: I.cylinderRadiusTop ?? 5,
5633
+ radiusBottom: I.cylinderRadiusBottom ?? 5,
5634
+ radialSegments: I.cylinderRadialSegments ?? 32,
5632
5635
  height: 0.8,
5633
- color: h.color,
5636
+ color: I.color,
5634
5637
  scale: 4
5635
- }) : C = g({
5636
- width: h.boxWidth ?? 10,
5637
- height: h.boxDepth ?? 10,
5638
- color: h.color,
5638
+ }) : w = y({
5639
+ width: I.boxWidth ?? 10,
5640
+ height: I.boxDepth ?? 10,
5641
+ color: I.color,
5639
5642
  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;
5643
+ }), 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
5644
  }
5642
5645
  ei();
5643
5646
  }), 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;
5647
+ const y = new P.TextureLoader();
5648
+ (f = C.scene) == null || f.traverse((v) => {
5649
+ if (v.type === "Mesh") {
5650
+ const I = v, h = Array.isArray(I.material) ? I.material : [I.material];
5651
+ for (const w of h)
5652
+ if (w && w.uuid && s[w.uuid]) {
5653
+ const E = s[w.uuid];
5654
+ if (E.mapDataUrl) {
5655
+ const M = y.load(E.mapDataUrl);
5656
+ 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
5657
  }
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;
5658
+ if (E.normalMapDataUrl) {
5659
+ const M = y.load(E.normalMapDataUrl);
5660
+ M.wrapS = M.wrapT = P.RepeatWrapping, M.repeat.set(1, 1), w.normalMap = M, w.normalScale = new P.Vector2(
5661
+ E.normalScale ?? 1,
5662
+ E.normalScale ?? 1
5663
+ ), w.userData = w.userData || {}, w.userData._normalMapDataUrl = E.normalMapDataUrl, w.userData._normalMapFileName = E.normalMapFileName;
5661
5664
  }
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;
5665
+ if (E.aoMapDataUrl) {
5666
+ const M = y.load(E.aoMapDataUrl);
5667
+ 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
5668
  }
5666
- C.needsUpdate = !0;
5669
+ w.needsUpdate = !0;
5667
5670
  }
5668
5671
  }
5669
5672
  });
5670
5673
  }
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);
5674
+ e === "edit" && ((m = C.scene) == null || m.traverse((y) => {
5675
+ var v;
5676
+ if (y.type === "DirectionalLight") {
5677
+ const I = y;
5678
+ if (!I.userData.helper) {
5679
+ I.target.parent !== I && (I.target.parent && I.target.parent.remove(I.target), I.target.position.set(0, 0, -1), I.add(I.target));
5680
+ const h = new P.DirectionalLightHelper(I, 1);
5681
+ h.userData.type = "lightHelper", I.userData.helper = h, h.update(), (v = C.scene) == null || v.add(h);
5678
5682
  }
5679
5683
  }
5680
5684
  }));
@@ -5691,11 +5695,11 @@ function ti(r) {
5691
5695
  for (const t of e)
5692
5696
  ti(t);
5693
5697
  }
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;
5698
+ function Xa() {
5699
+ Zt !== null && (cancelAnimationFrame(Zt), Zt = 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(), os(), Yt = !1, tt = !1;
5696
5700
  }
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() {
5701
+ const qa = /^[og]\s*(.+)?/, Va = /^mtllib /, Ya = /^usemtl /, Ka = /^usemap /, bn = /\s+/, xn = new R(), ys = new R(), In = new R(), Cn = new R(), Ie = new R(), Gt = new re();
5702
+ function Za() {
5699
5703
  const r = {
5700
5704
  objects: [],
5701
5705
  object: {},
@@ -5804,7 +5808,7 @@ function Qa() {
5804
5808
  },
5805
5809
  addFaceNormal: function(e, t, n) {
5806
5810
  const s = this.vertices, i = this.object.geometry.normals;
5807
- xn.fromArray(s, e), gs.fromArray(s, t), In.fromArray(s, n), Ie.subVectors(In, gs), Cn.subVectors(xn, gs), Ie.cross(Cn), Ie.normalize(), i.push(Ie.x, Ie.y, Ie.z), i.push(Ie.x, Ie.y, Ie.z), i.push(Ie.x, Ie.y, Ie.z);
5811
+ xn.fromArray(s, e), ys.fromArray(s, t), In.fromArray(s, n), Ie.subVectors(In, ys), Cn.subVectors(xn, ys), Ie.cross(Cn), Ie.normalize(), i.push(Ie.x, Ie.y, Ie.z), i.push(Ie.x, Ie.y, Ie.z), i.push(Ie.x, Ie.y, Ie.z);
5808
5812
  },
5809
5813
  addColor: function(e, t, n) {
5810
5814
  const s = this.colors, i = this.object.geometry.colors;
@@ -5855,7 +5859,7 @@ function Qa() {
5855
5859
  };
5856
5860
  return r.startObject("", !1), r;
5857
5861
  }
5858
- class Ja extends Ls {
5862
+ class Qa extends Ls {
5859
5863
  /**
5860
5864
  * Constructs a new OBJ loader.
5861
5865
  *
@@ -5899,7 +5903,7 @@ class Ja extends Ls {
5899
5903
  * @return {Group} The parsed OBJ.
5900
5904
  */
5901
5905
  parse(e) {
5902
- const t = new Qa();
5906
+ const t = new Za();
5903
5907
  e.indexOf(`\r
5904
5908
  `) !== -1 && (e = e.replace(/\r\n/g, `
5905
5909
  `)), e.indexOf(`\\
@@ -5943,26 +5947,26 @@ class Ja extends Ls {
5943
5947
  }
5944
5948
  } else if (d === "f") {
5945
5949
  const A = c.slice(1).trim().split(bn), p = [];
5946
- for (let f = 0, h = A.length; f < h; f++) {
5950
+ for (let f = 0, m = A.length; f < m; f++) {
5947
5951
  const y = A[f];
5948
5952
  if (y.length > 0) {
5949
- const C = y.split("/");
5950
- p.push(C);
5953
+ const v = y.split("/");
5954
+ p.push(v);
5951
5955
  }
5952
5956
  }
5953
5957
  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];
5958
+ for (let f = 1, m = p.length - 1; f < m; f++) {
5959
+ const y = p[f], v = p[f + 1];
5956
5960
  t.addFace(
5957
5961
  g[0],
5958
5962
  y[0],
5959
- C[0],
5963
+ v[0],
5960
5964
  g[1],
5961
5965
  y[1],
5962
- C[1],
5966
+ v[1],
5963
5967
  g[2],
5964
5968
  y[2],
5965
- C[2]
5969
+ v[2]
5966
5970
  );
5967
5971
  }
5968
5972
  } else if (d === "l") {
@@ -5973,21 +5977,21 @@ class Ja extends Ls {
5973
5977
  A = u;
5974
5978
  else
5975
5979
  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]);
5980
+ const m = u[g].split("/");
5981
+ m[0] !== "" && A.push(m[0]), m[1] !== "" && p.push(m[1]);
5978
5982
  }
5979
5983
  t.addLineGeometry(A, p);
5980
5984
  } else if (d === "p") {
5981
5985
  const A = c.slice(1).trim().split(" ");
5982
5986
  t.addPointGeometry(A);
5983
- } else if ((s = Va.exec(c)) !== null) {
5987
+ } else if ((s = qa.exec(c)) !== null) {
5984
5988
  const u = (" " + s[0].slice(1).trim()).slice(1);
5985
5989
  t.startObject(u);
5986
- } else if (Ka.test(c))
5990
+ } else if (Ya.test(c))
5987
5991
  t.object.startMaterial(c.substring(7).trim(), t.materialLibraries);
5988
- else if (Ya.test(c))
5992
+ else if (Va.test(c))
5989
5993
  t.materialLibraries.push(c.substring(7).trim());
5990
- else if (Za.test(c))
5994
+ else if (Ka.test(c))
5991
5995
  console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');
5992
5996
  else if (d === "s") {
5993
5997
  if (s = c.split(" "), s.length > 1) {
@@ -6011,30 +6015,30 @@ class Ja extends Ls {
6011
6015
  if (d.vertices.length === 0) continue;
6012
6016
  const f = new et();
6013
6017
  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];
6018
+ const m = [];
6019
+ for (let v = 0, I = u.length; v < I; v++) {
6020
+ const h = u[v], w = h.name + "_" + h.smooth + "_" + g;
6021
+ let E = t.materials[w];
6018
6022
  if (this.materials !== null) {
6019
- if (D = this.materials.create(m.name), A && D && !(D instanceof xt)) {
6023
+ if (E = this.materials.create(h.name), A && E && !(E instanceof xt)) {
6020
6024
  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)) {
6025
+ Ct.prototype.copy.call(M, E), M.color.copy(E.color), E = M;
6026
+ } else if (p && E && !(E instanceof mt)) {
6023
6027
  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;
6028
+ Ct.prototype.copy.call(M, E), M.color.copy(E.color), M.map = E.map, E = M;
6025
6029
  }
6026
6030
  }
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);
6031
+ 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
6032
  }
6029
6033
  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);
6034
+ if (m.length > 1) {
6035
+ for (let v = 0, I = u.length; v < I; v++) {
6036
+ const h = u[v];
6037
+ f.addGroup(h.groupStart, h.groupCount, v);
6034
6038
  }
6035
- A ? y = new ws(f, h) : p ? y = new Bt(f, h) : y = new S(f, h);
6039
+ A ? y = new Ms(f, m) : p ? y = new Bt(f, m) : y = new S(f, m);
6036
6040
  } else
6037
- A ? y = new ws(f, h[0]) : p ? y = new Bt(f, h[0]) : y = new S(f, h[0]);
6041
+ A ? y = new Ms(f, m[0]) : p ? y = new Bt(f, m[0]) : y = new S(f, m[0]);
6038
6042
  y.name = c.name, i.add(y);
6039
6043
  }
6040
6044
  else if (t.vertices.length > 0) {
@@ -6046,8 +6050,8 @@ class Ja extends Ls {
6046
6050
  return i;
6047
6051
  }
6048
6052
  }
6049
- const ys = /* @__PURE__ */ new WeakMap();
6050
- class _a extends Ls {
6053
+ const bs = /* @__PURE__ */ new WeakMap();
6054
+ class Ja extends Ls {
6051
6055
  /**
6052
6056
  * Constructs a new Draco loader.
6053
6057
  *
@@ -6133,8 +6137,8 @@ class _a extends Ls {
6133
6137
  }
6134
6138
  decodeGeometry(e, t) {
6135
6139
  const n = JSON.stringify(t);
6136
- if (ys.has(e)) {
6137
- const l = ys.get(e);
6140
+ if (bs.has(e)) {
6141
+ const l = bs.get(e);
6138
6142
  if (l.key === n)
6139
6143
  return l.promise;
6140
6144
  if (e.byteLength === 0)
@@ -6148,7 +6152,7 @@ class _a extends Ls {
6148
6152
  }))).then((l) => this._createGeometry(l.geometry));
6149
6153
  return a.catch(() => !0).then(() => {
6150
6154
  s && i && this._releaseTask(s, i);
6151
- }), ys.set(e, {
6155
+ }), bs.set(e, {
6152
6156
  key: n,
6153
6157
  promise: a
6154
6158
  }), a;
@@ -6173,7 +6177,7 @@ class _a extends Ls {
6173
6177
  if (t !== Ne) return;
6174
6178
  const n = new re();
6175
6179
  for (let s = 0, i = e.count; s < i; s++)
6176
- n.fromBufferAttribute(e, s), Qt.colorSpaceToWorking(n, Ne), e.setXYZ(s, n.r, n.g, n.b);
6180
+ n.fromBufferAttribute(e, s), Jt.colorSpaceToWorking(n, Ne), e.setXYZ(s, n.r, n.g, n.b);
6177
6181
  }
6178
6182
  _loadLibrary(e, t) {
6179
6183
  const n = new Dt(this.manager);
@@ -6190,7 +6194,7 @@ class _a extends Ls {
6190
6194
  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
6195
  const s = n[0];
6192
6196
  e || (this.decoderConfig.wasmBinary = n[1]);
6193
- const i = $a.toString(), o = [
6197
+ const i = _a.toString(), o = [
6194
6198
  "/* draco decoder */",
6195
6199
  s,
6196
6200
  "",
@@ -6238,7 +6242,7 @@ class _a extends Ls {
6238
6242
  return this.workerPool.length = 0, this.workerSourceURL !== "" && URL.revokeObjectURL(this.workerSourceURL), this;
6239
6243
  }
6240
6244
  }
6241
- function $a() {
6245
+ function _a() {
6242
6246
  let r, e;
6243
6247
  onmessage = function(o) {
6244
6248
  const a = o.data;
@@ -6279,17 +6283,17 @@ function $a() {
6279
6283
  if (!p.ok() || A.ptr === 0)
6280
6284
  throw new Error("THREE.DRACOLoader: Decoding failed: " + p.error_msg());
6281
6285
  const f = { index: null, attributes: [] };
6282
- for (const h in d) {
6283
- const y = self[u[h]];
6284
- let C, w;
6286
+ for (const m in d) {
6287
+ const y = self[u[m]];
6288
+ let v, I;
6285
6289
  if (c.useUniqueIDs)
6286
- w = d[h], C = a.GetAttributeByUniqueId(A, w);
6290
+ I = d[m], v = a.GetAttributeByUniqueId(A, I);
6287
6291
  else {
6288
- if (w = a.GetAttributeId(A, o[d[h]]), w === -1) continue;
6289
- C = a.GetAttribute(A, w);
6292
+ if (I = a.GetAttributeId(A, o[d[m]]), I === -1) continue;
6293
+ v = a.GetAttribute(A, I);
6290
6294
  }
6291
- const m = s(o, a, A, h, y, C);
6292
- h === "color" && (m.vertexColorSpace = c.vertexColorSpace), f.attributes.push(m);
6295
+ const h = s(o, a, A, m, y, v);
6296
+ m === "color" && (h.vertexColorSpace = c.vertexColorSpace), f.attributes.push(h);
6293
6297
  }
6294
6298
  return g === o.TRIANGULAR_MESH && (f.index = n(o, a, A)), o.destroy(A), f;
6295
6299
  }
@@ -6300,26 +6304,26 @@ function $a() {
6300
6304
  return o._free(A), { array: p, itemSize: 1 };
6301
6305
  }
6302
6306
  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();
6307
+ 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);
6308
+ a.GetAttributeDataArrayForAllPoints(l, u, g, v, h);
6309
+ const w = new d(o.HEAPF32.buffer, h, v / d.BYTES_PER_ELEMENT);
6310
+ let E;
6311
+ if (f === m)
6312
+ E = w.slice();
6309
6313
  else {
6310
- D = new d(w / d.BYTES_PER_ELEMENT);
6314
+ E = new d(I / d.BYTES_PER_ELEMENT);
6311
6315
  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];
6316
+ for (let H = 0, ne = w.length; H < ne; H++) {
6317
+ for (let j = 0; j < p; j++)
6318
+ E[M + j] = w[H * p + j];
6315
6319
  M += y;
6316
6320
  }
6317
6321
  }
6318
- return o._free(m), {
6322
+ return o._free(h), {
6319
6323
  name: c,
6320
6324
  count: A,
6321
6325
  itemSize: p,
6322
- array: D,
6326
+ array: E,
6323
6327
  stride: y
6324
6328
  };
6325
6329
  }
@@ -6342,7 +6346,7 @@ function $a() {
6342
6346
  }
6343
6347
  }
6344
6348
  }
6345
- class el extends S {
6349
+ class $a extends S {
6346
6350
  /**
6347
6351
  * Constructs a new water instance.
6348
6352
  *
@@ -6351,9 +6355,9 @@ class el extends S {
6351
6355
  */
6352
6356
  constructor(e, t = {}) {
6353
6357
  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 = {
6358
+ 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
6359
  name: "MirrorShader",
6356
- uniforms: Zt.merge([
6360
+ uniforms: Qt.merge([
6357
6361
  Vs.fog,
6358
6362
  Vs.lights,
6359
6363
  {
@@ -6474,18 +6478,18 @@ class el extends S {
6474
6478
  #include <fog_fragment>
6475
6479
  }`
6476
6480
  )
6477
- }, L = new Is({
6481
+ }, L = new Cs({
6478
6482
  name: z.name,
6479
- uniforms: Zt.clone(z.uniforms),
6483
+ uniforms: Qt.clone(z.uniforms),
6480
6484
  vertexShader: z.vertexShader,
6481
6485
  fragmentShader: z.fragmentShader,
6482
6486
  lights: !0,
6483
6487
  side: f,
6484
- fog: h
6488
+ fog: m
6485
6489
  });
6486
6490
  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(
6491
+ 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;
6492
+ 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
6493
  0.5,
6490
6494
  0,
6491
6495
  0,
@@ -6502,9 +6506,9 @@ class el extends S {
6502
6506
  0,
6503
6507
  0,
6504
6508
  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);
6509
+ ), 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
6510
  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);
6511
+ 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
6512
  const Ee = Q.getRenderTarget(), De = Q.xr.enabled, Me = Q.shadowMap.autoUpdate;
6509
6513
  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
6514
  const Ue = le.viewport;
@@ -6525,7 +6529,7 @@ function oi() {
6525
6529
  const r = new P.DirectionalLight(16777215, 1.5);
6526
6530
  r.position.set(5, 5, 5), r.name = "平行光", r.userData.isMovable = !0, r.castShadow = !0, r.shadow.mapSize.set(2048, 2048);
6527
6531
  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);
6532
+ 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
6533
  const t = new P.DirectionalLightHelper(r, 1);
6530
6534
  t.lightPlane.userData.name = "平行光辅助", t.userData.type = "lightHelper", r.userData.helper = t, t.update(), nt(t), nt(r, !0);
6531
6535
  }
@@ -6553,7 +6557,7 @@ function ai(r) {
6553
6557
  function li(r, e, t, n, s, i = "水体(Water)") {
6554
6558
  const a = new P.TextureLoader().load(si, (d) => {
6555
6559
  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, {
6560
+ }), l = Math.min(1024, Math.max(256, Math.round(Math.sqrt(e * t) * 64))), c = new $a(r, {
6557
6561
  textureWidth: l,
6558
6562
  textureHeight: l,
6559
6563
  waterNormals: a,
@@ -6578,8 +6582,8 @@ function ci(r) {
6578
6582
  repeatY: l = 4,
6579
6583
  speedX: c = 5e-4,
6580
6584
  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;
6585
+ } = r || {}, u = new P.PlaneGeometry(e, t), p = new P.TextureLoader().load(si, (m) => {
6586
+ m.wrapS = m.wrapT = P.RepeatWrapping, m.repeat.set(a, l), m.generateMipmaps = !1, m.minFilter = P.LinearFilter, m.magFilter = P.LinearFilter;
6583
6587
  }), g = new P.MeshStandardMaterial({
6584
6588
  color: n,
6585
6589
  roughness: s,
@@ -6604,21 +6608,21 @@ function ui(r) {
6604
6608
  { label: "湿度", value: "65", unit: "%" },
6605
6609
  { label: "压力", value: "101.3", unit: "kPa" },
6606
6610
  { label: "名称", value: e.name || "未命名" }
6607
- ], s = new _t({
6611
+ ], s = new $t({
6608
6612
  title: (r == null ? void 0 : r.title) || "数据面板",
6609
6613
  items: (r == null ? void 0 : r.items) || n
6610
6614
  });
6611
6615
  return s.attachTo(e), Wn(e, s), Ea(e), s;
6612
6616
  }
6613
6617
  function di(r) {
6614
- return ms(!0), new Promise((e, t) => {
6618
+ return gs(!0), new Promise((e, t) => {
6615
6619
  var o;
6616
6620
  const n = (o = r.name.split(".").pop()) == null ? void 0 : o.toLowerCase(), s = URL.createObjectURL(r);
6617
6621
  let i;
6618
6622
  if (n === "obj")
6619
- i = new Ja();
6623
+ i = new Qa();
6620
6624
  else if (n === "gltf" || n === "glb") {
6621
- const a = new _a();
6625
+ const a = new Ja();
6622
6626
  a.setDecoderPath(
6623
6627
  "https://www.gstatic.com/draco/versioned/decoders/1.5.7/"
6624
6628
  );
@@ -6636,11 +6640,11 @@ function di(r) {
6636
6640
  u.userData.isMovable = !0, u.name || (u.name = u.type), u.type === "Mesh" && (u.frustumCulled = !0, u.castShadow = !0, u.receiveShadow = !0);
6637
6641
  });
6638
6642
  const d = new P.Box3().setFromObject(l).getCenter(new P.Vector3());
6639
- l.position.sub(d), nt(l, !0), ms(!1), e(l);
6643
+ l.position.sub(d), nt(l, !0), gs(!1), e(l);
6640
6644
  },
6641
6645
  void 0,
6642
6646
  (a) => {
6643
- ms(!1), t(a);
6647
+ gs(!1), t(a);
6644
6648
  }
6645
6649
  );
6646
6650
  });
@@ -6670,7 +6674,7 @@ function hi(r) {
6670
6674
  break;
6671
6675
  }
6672
6676
  }
6673
- const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6677
+ const el = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6674
6678
  __proto__: null,
6675
6679
  addBox: ni,
6676
6680
  addDataPanel: ui,
@@ -6683,13 +6687,13 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6683
6687
  getDataPanel: St,
6684
6688
  importModelFromFile: di,
6685
6689
  removeDataPanel: Bn
6686
- }, Symbol.toStringTag, { value: "Module" })), sl = {
6690
+ }, Symbol.toStringTag, { value: "Module" })), tl = {
6687
6691
  key: 1,
6688
6692
  class: "toggle-placeholder"
6689
- }, nl = { class: "tree-icon" }, il = { class: "tree-name" }, ol = {
6693
+ }, sl = { class: "tree-icon" }, nl = { class: "tree-name" }, il = {
6690
6694
  key: 0,
6691
6695
  class: "tree-children"
6692
- }, rl = /* @__PURE__ */ Xe({
6696
+ }, ol = /* @__PURE__ */ Xe({
6693
6697
  __name: "TreeItem",
6694
6698
  props: {
6695
6699
  node: {},
@@ -6722,7 +6726,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6722
6726
  }, A = (f) => {
6723
6727
  f.stopPropagation(), n("delete", t.node);
6724
6728
  }, p = (f) => f.type === "Mesh" || f.type === "Sprite" ? "🟦" : f.type === "Light" ? "💡" : "📦", g = (f) => f.name || `${f.type} (${f.id})`;
6725
- return (f, h) => {
6729
+ return (f, m) => {
6726
6730
  const y = xi("TreeItem", !0);
6727
6731
  return N(), U("div", {
6728
6732
  class: "tree-node",
@@ -6736,23 +6740,23 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6736
6740
  l.value ? (N(), U("span", {
6737
6741
  key: 0,
6738
6742
  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),
6743
+ onClick: m[0] || (m[0] = xs((v) => Ii(o)(f.node.uuid), ["stop"]))
6744
+ }, de(a.value ? "▼" : "▶"), 1)) : (N(), U("span", tl)),
6745
+ b("span", sl, de(p(f.node)), 1),
6746
+ b("span", nl, de(g(f.node)), 1),
6743
6747
  b("button", {
6744
6748
  class: "tree-delete",
6745
- onClick: bs(A, ["stop"])
6749
+ onClick: xs(A, ["stop"])
6746
6750
  }, "×")
6747
6751
  ], 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,
6752
+ a.value && l.value ? (N(), U("div", il, [
6753
+ (N(!0), U(Le, null, is(c.value, (v) => (N(), bt(y, {
6754
+ key: v.uuid,
6755
+ node: v,
6752
6756
  "selected-object": f.selectedObject,
6753
6757
  version: f.version,
6754
- onSelect: h[1] || (h[1] = (w) => n("select", w)),
6755
- onDelete: h[2] || (h[2] = (w) => n("delete", w))
6758
+ onSelect: m[1] || (m[1] = (I) => n("select", I)),
6759
+ onDelete: m[2] || (m[2] = (I) => n("delete", I))
6756
6760
  }, null, 8, ["node", "selected-object", "version"]))), 128))
6757
6761
  ])) : ue("", !0)
6758
6762
  ], 512);
@@ -6763,46 +6767,46 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6763
6767
  for (const [n, s] of e)
6764
6768
  t[n] = s;
6765
6769
  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 = {
6770
+ }, 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
6771
  key: 0,
6768
6772
  class: "property-group light-group"
6769
- }, Al = { class: "slider-row" }, ml = {
6773
+ }, pl = { class: "slider-row" }, Al = {
6770
6774
  key: 1,
6771
6775
  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 = {
6776
+ }, 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
6777
  key: 0,
6774
6778
  class: "texture-upload-btn",
6775
6779
  title: "上传法线贴图"
6776
- }, Pl = {
6780
+ }, Dl = {
6777
6781
  class: "texture-modify-btn",
6778
6782
  title: "点击修改法线贴图"
6779
- }, Rl = { class: "texture-filename" }, Ol = {
6783
+ }, Pl = { class: "texture-filename" }, Rl = {
6780
6784
  key: 0,
6781
6785
  class: "slider-row"
6782
- }, Sl = { class: "slider-value" }, Ll = { class: "texture-row" }, Nl = { class: "texture-controls" }, Hl = {
6786
+ }, Ol = { class: "slider-value" }, Sl = { class: "texture-row" }, Ll = { class: "texture-controls" }, Nl = {
6783
6787
  key: 0,
6784
6788
  class: "texture-upload-btn",
6785
6789
  title: "上传环境光遮蔽贴图"
6786
- }, kl = {
6790
+ }, Hl = {
6787
6791
  class: "texture-modify-btn",
6788
6792
  title: "点击修改 AO 贴图"
6789
- }, jl = { class: "texture-filename" }, Fl = {
6793
+ }, kl = { class: "texture-filename" }, jl = {
6790
6794
  key: 1,
6791
6795
  class: "slider-row"
6792
- }, Ul = { class: "slider-value" }, zl = { class: "texture-row" }, Gl = { class: "texture-controls" }, Wl = {
6796
+ }, Fl = { class: "slider-value" }, Ul = { class: "texture-row" }, zl = { class: "texture-controls" }, Gl = {
6793
6797
  key: 0,
6794
6798
  class: "texture-upload-btn",
6795
6799
  title: "上传模型贴图"
6796
- }, Bl = {
6800
+ }, Wl = {
6797
6801
  class: "texture-modify-btn",
6798
6802
  title: "点击修改模型贴图"
6799
- }, Xl = { class: "texture-filename" }, ql = {
6803
+ }, Bl = { class: "texture-filename" }, Xl = {
6800
6804
  key: 2,
6801
6805
  class: "material-hint"
6802
- }, Vl = {
6806
+ }, ql = {
6803
6807
  key: 2,
6804
6808
  class: "property-group water-group"
6805
- }, Yl = { class: "color-row" }, Kl = ["value"], Zl = ["value"], Ql = /* @__PURE__ */ Xe({
6809
+ }, Vl = { class: "color-row" }, Yl = ["value"], Kl = ["value"], Zl = /* @__PURE__ */ Xe({
6806
6810
  __name: "TransformTab",
6807
6811
  props: {
6808
6812
  transform: {},
@@ -6810,7 +6814,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6810
6814
  },
6811
6815
  emits: ["propertyChange"],
6812
6816
  setup(r, { emit: e }) {
6813
- const t = r, n = e, s = () => n("propertyChange"), i = xs({
6817
+ const t = r, n = e, s = () => n("propertyChange"), i = Is({
6814
6818
  color: 16777215,
6815
6819
  metalness: 0,
6816
6820
  roughness: 0.5,
@@ -6822,19 +6826,19 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6822
6826
  const u = W(!1), A = W("");
6823
6827
  let p = null;
6824
6828
  const g = W(!1), f = W("");
6825
- let h = null;
6826
- const y = xs({
6829
+ let m = null;
6830
+ const y = Is({
6827
6831
  intensity: 1
6828
6832
  });
6829
- function C() {
6833
+ function v() {
6830
6834
  t.selectedObject && t.selectedObject.type === "DirectionalLight" && (t.selectedObject.intensity = y.intensity);
6831
6835
  }
6832
- function w(E) {
6836
+ function I(D) {
6833
6837
  let x = null;
6834
- return E.traverse((T) => {
6838
+ return D.traverse((T) => {
6835
6839
  if (T.type === "Mesh" && !x) {
6836
- const O = T, j = Array.isArray(O.material) ? O.material : [O.material];
6837
- for (const V of j)
6840
+ const O = T, k = Array.isArray(O.material) ? O.material : [O.material];
6841
+ for (const V of k)
6838
6842
  if (V && (V.type === "MeshStandardMaterial" || V.type === "MeshPhongMaterial" || V.type === "MeshBasicMaterial" || V.type === "MeshLambertMaterial" || V.type === "MeshToonMaterial" || V.type === "MeshPhysicalMaterial")) {
6839
6843
  x = V;
6840
6844
  break;
@@ -6842,12 +6846,12 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6842
6846
  }
6843
6847
  }), x;
6844
6848
  }
6845
- function m(E) {
6849
+ function h(D) {
6846
6850
  let x = null;
6847
- return E.traverse((T) => {
6851
+ return D.traverse((T) => {
6848
6852
  if (T.type === "Mesh" && !x) {
6849
- const O = T, j = Array.isArray(O.material) ? O.material : [O.material];
6850
- for (const V of j)
6853
+ const O = T, k = Array.isArray(O.material) ? O.material : [O.material];
6854
+ for (const V of k)
6851
6855
  if (V && (V.type === "MeshStandardMaterial" || V.type === "MeshPhongMaterial" || V.type === "MeshBasicMaterial" || V.type === "MeshLambertMaterial" || V.type === "MeshToonMaterial" || V.type === "MeshPhysicalMaterial")) {
6852
6856
  const q = V;
6853
6857
  x = {
@@ -6861,48 +6865,48 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6861
6865
  }
6862
6866
  }), x;
6863
6867
  }
6864
- function v(E, x) {
6868
+ function w(D, x) {
6865
6869
  let T = !1;
6866
- return E.traverse((O) => {
6870
+ return D.traverse((O) => {
6867
6871
  if (O.type === "Mesh") {
6868
- const j = O, V = Array.isArray(j.material) ? j.material : [j.material];
6872
+ const k = O, V = Array.isArray(k.material) ? k.material : [k.material];
6869
6873
  for (const q of V)
6870
6874
  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
6875
  }
6872
6876
  }), T;
6873
6877
  }
6874
- function D() {
6878
+ function E() {
6875
6879
  if (t.selectedObject) {
6876
- const E = v(t.selectedObject, {
6880
+ const D = w(t.selectedObject, {
6877
6881
  metalness: i.metalness,
6878
6882
  roughness: i.roughness,
6879
6883
  opacity: i.opacity
6880
6884
  });
6881
- a.value = E;
6885
+ a.value = D;
6882
6886
  }
6883
6887
  }
6884
- function M(E) {
6885
- const T = E.target.value;
6888
+ function M(D) {
6889
+ const T = D.target.value;
6886
6890
  o.value = T;
6887
6891
  const O = new re(T);
6888
- i.color = O.getHex(), t.selectedObject && v(t.selectedObject, { color: O.getHex() });
6892
+ i.color = O.getHex(), t.selectedObject && w(t.selectedObject, { color: O.getHex() });
6889
6893
  }
6890
- function H(E) {
6891
- let T = E.target.value.trim();
6894
+ function H(D) {
6895
+ let T = D.target.value.trim();
6892
6896
  if (T.startsWith("#") || (T = "#" + T), /^#[0-9a-fA-F]{6}$/.test(T)) {
6893
6897
  o.value = T;
6894
6898
  const O = new re(T);
6895
- i.color = O.getHex(), t.selectedObject && v(t.selectedObject, { color: O.getHex() });
6899
+ i.color = O.getHex(), t.selectedObject && w(t.selectedObject, { color: O.getHex() });
6896
6900
  }
6897
6901
  }
6898
- function ne(E) {
6902
+ function ne(D) {
6899
6903
  var T, O;
6900
- const x = w(E);
6904
+ const x = I(D);
6901
6905
  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
6906
  }
6903
- function k(E) {
6904
- var j;
6905
- const x = E.target, T = (j = x.files) == null ? void 0 : j[0];
6907
+ function j(D) {
6908
+ var k;
6909
+ const x = D.target, T = (k = x.files) == null ? void 0 : k[0];
6906
6910
  if (!T || !t.selectedObject) return;
6907
6911
  const O = new FileReader();
6908
6912
  O.onload = (V) => {
@@ -6911,20 +6915,20 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6911
6915
  J(t.selectedObject, q, T.name);
6912
6916
  }, O.readAsDataURL(T), x.value = "";
6913
6917
  }
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) => {
6918
+ function J(D, x, T) {
6919
+ const k = new Wt().load(x);
6920
+ k.wrapS = k.wrapT = _e, k.repeat.set(1, 1), D.traverse((V) => {
6917
6921
  if (V.type === "Mesh") {
6918
6922
  const q = V, Ae = Array.isArray(q.material) ? q.material : [q.material];
6919
6923
  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);
6924
+ 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
6925
  }
6922
- }), d = j, l.value = !0, c.value = T;
6926
+ }), d = k, l.value = !0, c.value = T;
6923
6927
  }
6924
6928
  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];
6929
+ t.selectedObject && (t.selectedObject.traverse((D) => {
6930
+ if (D.type === "Mesh") {
6931
+ const x = D, T = Array.isArray(x.material) ? x.material : [x.material];
6928
6932
  for (const O of T)
6929
6933
  O.normalMap && (O.normalMap = null, O.userData && (delete O.userData._normalMapDataUrl, delete O.userData._normalMapFileName), O.needsUpdate = !0);
6930
6934
  }
@@ -6932,23 +6936,23 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6932
6936
  }
6933
6937
  function Z() {
6934
6938
  if (!t.selectedObject) return;
6935
- const E = i.normalScale;
6939
+ const D = i.normalScale;
6936
6940
  t.selectedObject.traverse((x) => {
6937
6941
  if (x.type === "Mesh") {
6938
6942
  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);
6943
+ for (const k of O)
6944
+ k.normalMap && (k.normalScale = new ce(D, D), k.needsUpdate = !0);
6941
6945
  }
6942
6946
  });
6943
6947
  }
6944
- function z(E) {
6948
+ function z(D) {
6945
6949
  var T;
6946
- const x = w(E);
6950
+ const x = I(D);
6947
6951
  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
6952
  }
6949
- function L(E) {
6950
- var j;
6951
- const x = E.target, T = (j = x.files) == null ? void 0 : j[0];
6953
+ function L(D) {
6954
+ var k;
6955
+ const x = D.target, T = (k = x.files) == null ? void 0 : k[0];
6952
6956
  if (!T || !t.selectedObject) return;
6953
6957
  const O = new FileReader();
6954
6958
  O.onload = (V) => {
@@ -6957,33 +6961,33 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6957
6961
  Q(t.selectedObject, q, T.name);
6958
6962
  }, O.readAsDataURL(T), x.value = "";
6959
6963
  }
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) => {
6964
+ function Q(D, x, T) {
6965
+ const k = new Wt().load(x);
6966
+ k.wrapS = k.wrapT = _e, k.repeat.set(1, 1), D.traverse((V) => {
6963
6967
  if (V.type === "Mesh") {
6964
6968
  const q = V, Ae = Array.isArray(q.material) ? q.material : [q.material];
6965
6969
  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);
6970
+ 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
6971
  }
6968
- }), p = j, u.value = !0, A.value = T;
6972
+ }), p = k, u.value = !0, A.value = T;
6969
6973
  }
6970
6974
  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];
6975
+ t.selectedObject && (t.selectedObject.traverse((D) => {
6976
+ if (D.type === "Mesh") {
6977
+ const x = D, T = Array.isArray(x.material) ? x.material : [x.material];
6974
6978
  for (const O of T)
6975
6979
  O.map && (O.map = null, O.userData && (delete O.userData._mapDataUrl, delete O.userData._mapFileName), O.needsUpdate = !0);
6976
6980
  }
6977
6981
  }), p && (p.dispose(), p = null), u.value = !1, A.value = "");
6978
6982
  }
6979
- function le(E) {
6983
+ function le(D) {
6980
6984
  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);
6985
+ const x = I(D);
6986
+ 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
6987
  }
6984
- function _(E) {
6985
- var j;
6986
- const x = E.target, T = (j = x.files) == null ? void 0 : j[0];
6988
+ function _(D) {
6989
+ var k;
6990
+ const x = D.target, T = (k = x.files) == null ? void 0 : k[0];
6987
6991
  if (!T || !t.selectedObject) return;
6988
6992
  const O = new FileReader();
6989
6993
  O.onload = (V) => {
@@ -6992,49 +6996,49 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6992
6996
  Ee(t.selectedObject, q, T.name);
6993
6997
  }, O.readAsDataURL(T), x.value = "";
6994
6998
  }
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) => {
6999
+ function Ee(D, x, T) {
7000
+ const k = new Wt().load(x);
7001
+ k.wrapS = k.wrapT = _e, k.repeat.set(1, 1), D.traverse((V) => {
6998
7002
  if (V.type === "Mesh") {
6999
7003
  const q = V, Ae = Array.isArray(q.material) ? q.material : [q.material];
7000
7004
  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);
7005
+ 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
7006
  }
7003
- }), h = j, g.value = !0, f.value = T;
7007
+ }), m = k, g.value = !0, f.value = T;
7004
7008
  }
7005
7009
  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];
7010
+ t.selectedObject && (t.selectedObject.traverse((D) => {
7011
+ if (D.type === "Mesh") {
7012
+ const x = D, T = Array.isArray(x.material) ? x.material : [x.material];
7009
7013
  for (const O of T)
7010
7014
  O.aoMap && (O.aoMap = null, O.userData && (delete O.userData._aoMapDataUrl, delete O.userData._aoMapFileName), O.needsUpdate = !0);
7011
7015
  }
7012
- }), h && (h.dispose(), h = null), g.value = !1, f.value = "");
7016
+ }), m && (m.dispose(), m = null), g.value = !1, f.value = "");
7013
7017
  }
7014
7018
  function Me() {
7015
7019
  if (!t.selectedObject) return;
7016
- const E = i.aoIntensity;
7020
+ const D = i.aoIntensity;
7017
7021
  t.selectedObject.traverse((x) => {
7018
7022
  if (x.type === "Mesh") {
7019
7023
  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);
7024
+ for (const k of O)
7025
+ k.aoMap && (k.aoMapIntensity = D, k.needsUpdate = !0);
7022
7026
  }
7023
7027
  });
7024
7028
  }
7025
7029
  const Ue = ot(() => {
7026
- const E = t.selectedObject;
7027
- if (!E) return !1;
7030
+ const D = t.selectedObject;
7031
+ if (!D) return !1;
7028
7032
  let x = !1;
7029
- return E.traverse((T) => {
7033
+ return D.traverse((T) => {
7030
7034
  if (!x && T.type === "Mesh") {
7031
7035
  const O = T.material;
7032
7036
  O.uniforms && O.uniforms.waterColor && (x = !0);
7033
7037
  }
7034
7038
  }), x;
7035
7039
  }), Pe = W("#4fc3f7");
7036
- function fi(E) {
7037
- E.traverse((x) => {
7040
+ function fi(D) {
7041
+ D.traverse((x) => {
7038
7042
  if (x.type === "Mesh") {
7039
7043
  const T = x.material;
7040
7044
  if (T.uniforms && T.uniforms.waterColor) {
@@ -7044,47 +7048,47 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7044
7048
  }
7045
7049
  });
7046
7050
  }
7047
- function js(E, x) {
7051
+ function js(D, x) {
7048
7052
  const T = new re(x);
7049
- E.traverse((O) => {
7053
+ D.traverse((O) => {
7050
7054
  if (O.type === "Mesh") {
7051
- const j = O.material;
7052
- j.uniforms && j.uniforms.waterColor && j.uniforms.waterColor.value.copy(T);
7055
+ const k = O.material;
7056
+ k.uniforms && k.uniforms.waterColor && k.uniforms.waterColor.value.copy(T);
7053
7057
  }
7054
7058
  });
7055
7059
  }
7056
- function pi(E) {
7057
- const T = E.target.value;
7060
+ function pi(D) {
7061
+ const T = D.target.value;
7058
7062
  Pe.value = T, t.selectedObject && js(t.selectedObject, T);
7059
7063
  }
7060
- function Ai(E) {
7061
- let T = E.target.value.trim();
7064
+ function Ai(D) {
7065
+ let T = D.target.value.trim();
7062
7066
  T.startsWith("#") || (T = "#" + T), /^#[0-9a-fA-F]{6}$/.test(T) && (Pe.value = T, t.selectedObject && js(t.selectedObject, T));
7063
7067
  }
7064
7068
  return ve(
7065
7069
  () => 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);
7070
+ (D) => {
7071
+ if (D) {
7072
+ const x = h(D);
7073
+ 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
7074
  } else
7071
7075
  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
7076
  },
7073
7077
  { immediate: !0 }
7074
- ), (E, x) => (N(), U("div", null, [
7075
- b("div", ll, [
7078
+ ), (D, x) => (N(), U("div", null, [
7079
+ b("div", al, [
7076
7080
  x[19] || (x[19] = b("label", null, "位置", -1)),
7077
- b("div", cl, [
7081
+ b("div", ll, [
7078
7082
  x[16] || (x[16] = b("span", null, "X:", -1)),
7079
7083
  F(b("input", {
7080
7084
  type: "number",
7081
- "onUpdate:modelValue": x[0] || (x[0] = (T) => E.transform.position.x = T),
7085
+ "onUpdate:modelValue": x[0] || (x[0] = (T) => D.transform.position.x = T),
7082
7086
  step: "0.01",
7083
7087
  onInput: s
7084
7088
  }, null, 544), [
7085
7089
  [
7086
7090
  Y,
7087
- E.transform.position.x,
7091
+ D.transform.position.x,
7088
7092
  void 0,
7089
7093
  { number: !0 }
7090
7094
  ]
@@ -7092,13 +7096,13 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7092
7096
  x[17] || (x[17] = b("span", null, "Y:", -1)),
7093
7097
  F(b("input", {
7094
7098
  type: "number",
7095
- "onUpdate:modelValue": x[1] || (x[1] = (T) => E.transform.position.y = T),
7099
+ "onUpdate:modelValue": x[1] || (x[1] = (T) => D.transform.position.y = T),
7096
7100
  step: "0.01",
7097
7101
  onInput: s
7098
7102
  }, null, 544), [
7099
7103
  [
7100
7104
  Y,
7101
- E.transform.position.y,
7105
+ D.transform.position.y,
7102
7106
  void 0,
7103
7107
  { number: !0 }
7104
7108
  ]
@@ -7106,32 +7110,32 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7106
7110
  x[18] || (x[18] = b("span", null, "Z:", -1)),
7107
7111
  F(b("input", {
7108
7112
  type: "number",
7109
- "onUpdate:modelValue": x[2] || (x[2] = (T) => E.transform.position.z = T),
7113
+ "onUpdate:modelValue": x[2] || (x[2] = (T) => D.transform.position.z = T),
7110
7114
  step: "0.01",
7111
7115
  onInput: s
7112
7116
  }, null, 544), [
7113
7117
  [
7114
7118
  Y,
7115
- E.transform.position.z,
7119
+ D.transform.position.z,
7116
7120
  void 0,
7117
7121
  { number: !0 }
7118
7122
  ]
7119
7123
  ])
7120
7124
  ])
7121
7125
  ]),
7122
- b("div", ul, [
7126
+ b("div", cl, [
7123
7127
  x[23] || (x[23] = b("label", null, "旋转 (弧度)", -1)),
7124
- b("div", dl, [
7128
+ b("div", ul, [
7125
7129
  x[20] || (x[20] = b("span", null, "X:", -1)),
7126
7130
  F(b("input", {
7127
7131
  type: "number",
7128
- "onUpdate:modelValue": x[3] || (x[3] = (T) => E.transform.rotation.x = T),
7132
+ "onUpdate:modelValue": x[3] || (x[3] = (T) => D.transform.rotation.x = T),
7129
7133
  step: "0.01",
7130
7134
  onInput: s
7131
7135
  }, null, 544), [
7132
7136
  [
7133
7137
  Y,
7134
- E.transform.rotation.x,
7138
+ D.transform.rotation.x,
7135
7139
  void 0,
7136
7140
  { number: !0 }
7137
7141
  ]
@@ -7139,13 +7143,13 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7139
7143
  x[21] || (x[21] = b("span", null, "Y:", -1)),
7140
7144
  F(b("input", {
7141
7145
  type: "number",
7142
- "onUpdate:modelValue": x[4] || (x[4] = (T) => E.transform.rotation.y = T),
7146
+ "onUpdate:modelValue": x[4] || (x[4] = (T) => D.transform.rotation.y = T),
7143
7147
  step: "0.01",
7144
7148
  onInput: s
7145
7149
  }, null, 544), [
7146
7150
  [
7147
7151
  Y,
7148
- E.transform.rotation.y,
7152
+ D.transform.rotation.y,
7149
7153
  void 0,
7150
7154
  { number: !0 }
7151
7155
  ]
@@ -7153,32 +7157,32 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7153
7157
  x[22] || (x[22] = b("span", null, "Z:", -1)),
7154
7158
  F(b("input", {
7155
7159
  type: "number",
7156
- "onUpdate:modelValue": x[5] || (x[5] = (T) => E.transform.rotation.z = T),
7160
+ "onUpdate:modelValue": x[5] || (x[5] = (T) => D.transform.rotation.z = T),
7157
7161
  step: "0.01",
7158
7162
  onInput: s
7159
7163
  }, null, 544), [
7160
7164
  [
7161
7165
  Y,
7162
- E.transform.rotation.z,
7166
+ D.transform.rotation.z,
7163
7167
  void 0,
7164
7168
  { number: !0 }
7165
7169
  ]
7166
7170
  ])
7167
7171
  ])
7168
7172
  ]),
7169
- b("div", hl, [
7173
+ b("div", dl, [
7170
7174
  x[27] || (x[27] = b("label", null, "缩放", -1)),
7171
- b("div", fl, [
7175
+ b("div", hl, [
7172
7176
  x[24] || (x[24] = b("span", null, "X:", -1)),
7173
7177
  F(b("input", {
7174
7178
  type: "number",
7175
- "onUpdate:modelValue": x[6] || (x[6] = (T) => E.transform.scale.x = T),
7179
+ "onUpdate:modelValue": x[6] || (x[6] = (T) => D.transform.scale.x = T),
7176
7180
  step: "0.01",
7177
7181
  onInput: s
7178
7182
  }, null, 544), [
7179
7183
  [
7180
7184
  Y,
7181
- E.transform.scale.x,
7185
+ D.transform.scale.x,
7182
7186
  void 0,
7183
7187
  { number: !0 }
7184
7188
  ]
@@ -7186,13 +7190,13 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7186
7190
  x[25] || (x[25] = b("span", null, "Y:", -1)),
7187
7191
  F(b("input", {
7188
7192
  type: "number",
7189
- "onUpdate:modelValue": x[7] || (x[7] = (T) => E.transform.scale.y = T),
7193
+ "onUpdate:modelValue": x[7] || (x[7] = (T) => D.transform.scale.y = T),
7190
7194
  step: "0.01",
7191
7195
  onInput: s
7192
7196
  }, null, 544), [
7193
7197
  [
7194
7198
  Y,
7195
- E.transform.scale.y,
7199
+ D.transform.scale.y,
7196
7200
  void 0,
7197
7201
  { number: !0 }
7198
7202
  ]
@@ -7200,22 +7204,22 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7200
7204
  x[26] || (x[26] = b("span", null, "Z:", -1)),
7201
7205
  F(b("input", {
7202
7206
  type: "number",
7203
- "onUpdate:modelValue": x[8] || (x[8] = (T) => E.transform.scale.z = T),
7207
+ "onUpdate:modelValue": x[8] || (x[8] = (T) => D.transform.scale.z = T),
7204
7208
  step: "0.01",
7205
7209
  onInput: s
7206
7210
  }, null, 544), [
7207
7211
  [
7208
7212
  Y,
7209
- E.transform.scale.z,
7213
+ D.transform.scale.z,
7210
7214
  void 0,
7211
7215
  { number: !0 }
7212
7216
  ]
7213
7217
  ])
7214
7218
  ])
7215
7219
  ]),
7216
- E.selectedObject && E.selectedObject.type === "DirectionalLight" ? (N(), U("div", pl, [
7220
+ D.selectedObject && D.selectedObject.type === "DirectionalLight" ? (N(), U("div", fl, [
7217
7221
  x[29] || (x[29] = b("label", null, "光源属性", -1)),
7218
- b("div", Al, [
7222
+ b("div", pl, [
7219
7223
  x[28] || (x[28] = b("span", { class: "slider-label" }, "强度", -1)),
7220
7224
  F(b("input", {
7221
7225
  type: "range",
@@ -7223,7 +7227,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7223
7227
  max: "10",
7224
7228
  step: "0.1",
7225
7229
  "onUpdate:modelValue": x[9] || (x[9] = (T) => y.intensity = T),
7226
- onInput: C
7230
+ onInput: v
7227
7231
  }, null, 544), [
7228
7232
  [
7229
7233
  Y,
@@ -7239,7 +7243,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7239
7243
  step: "0.1",
7240
7244
  "onUpdate:modelValue": x[10] || (x[10] = (T) => y.intensity = T),
7241
7245
  class: "intensity-input",
7242
- onInput: C
7246
+ onInput: v
7243
7247
  }, null, 544), [
7244
7248
  [
7245
7249
  Y,
@@ -7250,25 +7254,25 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7250
7254
  ])
7251
7255
  ])
7252
7256
  ])) : ue("", !0),
7253
- E.selectedObject ? (N(), U("div", ml, [
7257
+ D.selectedObject ? (N(), U("div", Al, [
7254
7258
  x[45] || (x[45] = b("label", null, "材质", -1)),
7255
- b("div", gl, [
7259
+ b("div", ml, [
7256
7260
  x[30] || (x[30] = b("span", { class: "slider-label" }, "颜色", -1)),
7257
7261
  b("input", {
7258
7262
  type: "color",
7259
7263
  value: o.value,
7260
7264
  onInput: M,
7261
7265
  class: "color-picker"
7262
- }, null, 40, yl),
7266
+ }, null, 40, gl),
7263
7267
  b("input", {
7264
7268
  type: "text",
7265
7269
  value: o.value,
7266
7270
  onInput: H,
7267
7271
  class: "color-text-input",
7268
7272
  placeholder: "#ffffff"
7269
- }, null, 40, bl)
7273
+ }, null, 40, yl)
7270
7274
  ]),
7271
- b("div", xl, [
7275
+ b("div", bl, [
7272
7276
  x[31] || (x[31] = b("span", { class: "slider-label" }, "金属度", -1)),
7273
7277
  F(b("input", {
7274
7278
  type: "range",
@@ -7276,7 +7280,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7276
7280
  max: "1",
7277
7281
  step: "0.01",
7278
7282
  "onUpdate:modelValue": x[11] || (x[11] = (T) => i.metalness = T),
7279
- onInput: D
7283
+ onInput: E
7280
7284
  }, null, 544), [
7281
7285
  [
7282
7286
  Y,
@@ -7285,9 +7289,9 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7285
7289
  { number: !0 }
7286
7290
  ]
7287
7291
  ]),
7288
- b("span", Il, de(i.metalness.toFixed(2)), 1)
7292
+ b("span", xl, de(i.metalness.toFixed(2)), 1)
7289
7293
  ]),
7290
- b("div", Cl, [
7294
+ b("div", Il, [
7291
7295
  x[32] || (x[32] = b("span", { class: "slider-label" }, "粗糙度", -1)),
7292
7296
  F(b("input", {
7293
7297
  type: "range",
@@ -7295,7 +7299,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7295
7299
  max: "1",
7296
7300
  step: "0.01",
7297
7301
  "onUpdate:modelValue": x[12] || (x[12] = (T) => i.roughness = T),
7298
- onInput: D
7302
+ onInput: E
7299
7303
  }, null, 544), [
7300
7304
  [
7301
7305
  Y,
@@ -7304,9 +7308,9 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7304
7308
  { number: !0 }
7305
7309
  ]
7306
7310
  ]),
7307
- b("span", wl, de(i.roughness.toFixed(2)), 1)
7311
+ b("span", Cl, de(i.roughness.toFixed(2)), 1)
7308
7312
  ]),
7309
- b("div", Ml, [
7313
+ b("div", wl, [
7310
7314
  x[33] || (x[33] = b("span", { class: "slider-label" }, "透明度", -1)),
7311
7315
  F(b("input", {
7312
7316
  type: "range",
@@ -7314,7 +7318,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7314
7318
  max: "1",
7315
7319
  step: "0.01",
7316
7320
  "onUpdate:modelValue": x[13] || (x[13] = (T) => i.opacity = T),
7317
- onInput: D
7321
+ onInput: E
7318
7322
  }, null, 544), [
7319
7323
  [
7320
7324
  Y,
@@ -7323,20 +7327,20 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7323
7327
  { number: !0 }
7324
7328
  ]
7325
7329
  ]),
7326
- b("span", vl, de(i.opacity.toFixed(2)), 1)
7330
+ b("span", Ml, de(i.opacity.toFixed(2)), 1)
7327
7331
  ]),
7328
- b("div", Tl, [
7332
+ b("div", vl, [
7329
7333
  x[36] || (x[36] = b("span", { class: "slider-label" }, "法线贴图", -1)),
7330
- b("div", El, [
7334
+ b("div", Tl, [
7331
7335
  l.value ? (N(), U(Le, { key: 1 }, [
7332
- b("label", Pl, [
7336
+ b("label", Dl, [
7333
7337
  b("input", {
7334
7338
  type: "file",
7335
7339
  accept: "image/*",
7336
- onChange: k,
7340
+ onChange: j,
7337
7341
  class: "texture-file-input"
7338
7342
  }, null, 32),
7339
- b("span", Rl, de(c.value), 1),
7343
+ b("span", Pl, de(c.value), 1),
7340
7344
  x[35] || (x[35] = b("span", { class: "modify-hint" }, "修改", -1))
7341
7345
  ]),
7342
7346
  b("button", {
@@ -7344,18 +7348,18 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7344
7348
  title: "移除法线贴图",
7345
7349
  onClick: K
7346
7350
  }, " ✕ ")
7347
- ], 64)) : (N(), U("label", Dl, [
7351
+ ], 64)) : (N(), U("label", El, [
7348
7352
  b("input", {
7349
7353
  type: "file",
7350
7354
  accept: "image/*",
7351
- onChange: k,
7355
+ onChange: j,
7352
7356
  class: "texture-file-input"
7353
7357
  }, null, 32),
7354
- x[34] || (x[34] = os(" + 选择 "))
7358
+ x[34] || (x[34] = rs(" + 选择 "))
7355
7359
  ]))
7356
7360
  ])
7357
7361
  ]),
7358
- l.value ? (N(), U("div", Ol, [
7362
+ l.value ? (N(), U("div", Rl, [
7359
7363
  x[37] || (x[37] = b("span", { class: "slider-label" }, "法线强度", -1)),
7360
7364
  F(b("input", {
7361
7365
  type: "range",
@@ -7372,20 +7376,20 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7372
7376
  { number: !0 }
7373
7377
  ]
7374
7378
  ]),
7375
- b("span", Sl, de(i.normalScale.toFixed(2)), 1)
7379
+ b("span", Ol, de(i.normalScale.toFixed(2)), 1)
7376
7380
  ])) : ue("", !0),
7377
- b("div", Ll, [
7381
+ b("div", Sl, [
7378
7382
  x[40] || (x[40] = b("span", { class: "slider-label" }, "AO 贴图", -1)),
7379
- b("div", Nl, [
7383
+ b("div", Ll, [
7380
7384
  g.value ? (N(), U(Le, { key: 1 }, [
7381
- b("label", kl, [
7385
+ b("label", Hl, [
7382
7386
  b("input", {
7383
7387
  type: "file",
7384
7388
  accept: "image/*",
7385
7389
  onChange: _,
7386
7390
  class: "texture-file-input"
7387
7391
  }, null, 32),
7388
- b("span", jl, de(f.value), 1),
7392
+ b("span", kl, de(f.value), 1),
7389
7393
  x[39] || (x[39] = b("span", { class: "modify-hint" }, "修改", -1))
7390
7394
  ]),
7391
7395
  b("button", {
@@ -7393,18 +7397,18 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7393
7397
  title: "移除 AO 贴图",
7394
7398
  onClick: De
7395
7399
  }, " ✕ ")
7396
- ], 64)) : (N(), U("label", Hl, [
7400
+ ], 64)) : (N(), U("label", Nl, [
7397
7401
  b("input", {
7398
7402
  type: "file",
7399
7403
  accept: "image/*",
7400
7404
  onChange: _,
7401
7405
  class: "texture-file-input"
7402
7406
  }, null, 32),
7403
- x[38] || (x[38] = os(" + 选择 "))
7407
+ x[38] || (x[38] = rs(" + 选择 "))
7404
7408
  ]))
7405
7409
  ])
7406
7410
  ]),
7407
- g.value ? (N(), U("div", Fl, [
7411
+ g.value ? (N(), U("div", jl, [
7408
7412
  x[41] || (x[41] = b("span", { class: "slider-label" }, "AO 强度", -1)),
7409
7413
  F(b("input", {
7410
7414
  type: "range",
@@ -7421,20 +7425,20 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7421
7425
  { number: !0 }
7422
7426
  ]
7423
7427
  ]),
7424
- b("span", Ul, de(i.aoIntensity.toFixed(2)), 1)
7428
+ b("span", Fl, de(i.aoIntensity.toFixed(2)), 1)
7425
7429
  ])) : ue("", !0),
7426
- b("div", zl, [
7430
+ b("div", Ul, [
7427
7431
  x[44] || (x[44] = b("span", { class: "slider-label" }, "模型贴图", -1)),
7428
- b("div", Gl, [
7432
+ b("div", zl, [
7429
7433
  u.value ? (N(), U(Le, { key: 1 }, [
7430
- b("label", Bl, [
7434
+ b("label", Wl, [
7431
7435
  b("input", {
7432
7436
  type: "file",
7433
7437
  accept: "image/*",
7434
7438
  onChange: L,
7435
7439
  class: "texture-file-input"
7436
7440
  }, null, 32),
7437
- b("span", Xl, de(A.value), 1),
7441
+ b("span", Bl, de(A.value), 1),
7438
7442
  x[43] || (x[43] = b("span", { class: "modify-hint" }, "修改", -1))
7439
7443
  ]),
7440
7444
  b("button", {
@@ -7442,175 +7446,175 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7442
7446
  title: "移除模型贴图",
7443
7447
  onClick: ee
7444
7448
  }, " ✕ ")
7445
- ], 64)) : (N(), U("label", Wl, [
7449
+ ], 64)) : (N(), U("label", Gl, [
7446
7450
  b("input", {
7447
7451
  type: "file",
7448
7452
  accept: "image/*",
7449
7453
  onChange: L,
7450
7454
  class: "texture-file-input"
7451
7455
  }, null, 32),
7452
- x[42] || (x[42] = os(" + 选择 "))
7456
+ x[42] || (x[42] = rs(" + 选择 "))
7453
7457
  ]))
7454
7458
  ])
7455
7459
  ]),
7456
- a.value ? ue("", !0) : (N(), U("div", ql, " ⚠️ 当前材质不支持金属度/粗糙度(仅支持 Standard/Phong) "))
7460
+ a.value ? ue("", !0) : (N(), U("div", Xl, " ⚠️ 当前材质不支持金属度/粗糙度(仅支持 Standard/Phong) "))
7457
7461
  ])) : ue("", !0),
7458
- Ue.value ? (N(), U("div", Vl, [
7462
+ Ue.value ? (N(), U("div", ql, [
7459
7463
  x[47] || (x[47] = b("label", null, "水体属性", -1)),
7460
- b("div", Yl, [
7464
+ b("div", Vl, [
7461
7465
  x[46] || (x[46] = b("span", { class: "slider-label" }, "水体颜色", -1)),
7462
7466
  b("input", {
7463
7467
  type: "color",
7464
7468
  value: Pe.value,
7465
7469
  onInput: pi,
7466
7470
  class: "color-picker"
7467
- }, null, 40, Kl),
7471
+ }, null, 40, Yl),
7468
7472
  b("input", {
7469
7473
  type: "text",
7470
7474
  value: Pe.value,
7471
7475
  onInput: Ai,
7472
7476
  class: "color-text-input",
7473
7477
  placeholder: "#4fc3f7"
7474
- }, null, 40, Zl)
7478
+ }, null, 40, Kl)
7475
7479
  ])
7476
7480
  ])) : ue("", !0)
7477
7481
  ]));
7478
7482
  }
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 = {
7483
+ }), 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
7484
  key: 0,
7481
7485
  class: "userdata-list"
7482
- }, nc = { class: "ud-key" }, ic = {
7486
+ }, sc = { class: "ud-key" }, nc = {
7483
7487
  key: 0,
7484
7488
  class: "ud-value-readonly",
7485
7489
  title: "isMovable 为系统属性,不可修改"
7486
- }, oc = { class: "ud-value-json-preview" }, rc = ["onClick"], ac = {
7490
+ }, ic = { class: "ud-value-json-preview" }, oc = ["onClick"], rc = {
7487
7491
  key: 0,
7488
7492
  class: "ud-json-error"
7489
- }, lc = { class: "ud-json-actions" }, cc = ["onClick"], uc = ["onClick"], dc = {
7493
+ }, ac = { class: "ud-json-actions" }, lc = ["onClick"], cc = ["onClick"], uc = {
7490
7494
  key: 1,
7491
7495
  class: "userdata-empty"
7492
- }, hc = /* @__PURE__ */ Xe({
7496
+ }, dc = /* @__PURE__ */ Xe({
7493
7497
  __name: "UserDataTab",
7494
7498
  props: {
7495
7499
  selectedObject: {}
7496
7500
  },
7497
7501
  setup(r) {
7498
7502
  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)
7503
+ function l(I) {
7504
+ if (I === null) return "null";
7505
+ if (I === void 0) return "undefined";
7506
+ if (Array.isArray(I)) return "array";
7507
+ const h = typeof I;
7508
+ return h === "object" ? "object" : h === "number" ? "number" : h === "boolean" ? "boolean" : "string";
7509
+ }
7510
+ function c(I) {
7511
+ const h = [];
7512
+ if (I.userData)
7513
+ for (const [w, E] of Object.entries(I.userData))
7514
+ typeof w == "string" && !w.startsWith("_") && h.push({
7515
+ key: w,
7516
+ value: typeof E == "object" ? JSON.stringify(E) : String(E),
7517
+ rawType: l(E)
7514
7518
  });
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("]"))
7519
+ a.value = h;
7520
+ }
7521
+ function d(I) {
7522
+ const h = I.trim();
7523
+ if (h === "true") return !0;
7524
+ if (h === "false") return !1;
7525
+ if (h === "null") return null;
7526
+ if (h === "undefined") return;
7527
+ const w = Number(h);
7528
+ if (h !== "" && !isNaN(w))
7529
+ return String(w) !== h ? h : w;
7530
+ if (h.startsWith("{") && h.endsWith("}") || h.startsWith("[") && h.endsWith("]"))
7527
7531
  try {
7528
- return JSON.parse(m);
7532
+ return JSON.parse(h);
7529
7533
  } catch {
7530
7534
  }
7531
- return m;
7535
+ return h;
7532
7536
  }
7533
7537
  function u() {
7534
7538
  if (!e.selectedObject || !t.value.trim()) return;
7535
- const w = t.value.trim();
7536
- if (w === "isMovable") {
7539
+ const I = t.value.trim();
7540
+ if (I === "isMovable") {
7537
7541
  t.value = "";
7538
7542
  return;
7539
7543
  }
7540
- const m = d(n.value);
7541
- e.selectedObject.userData[w] = m, c(e.selectedObject), t.value = "", n.value = "";
7544
+ const h = d(n.value);
7545
+ e.selectedObject.userData[I] = h, c(e.selectedObject), t.value = "", n.value = "";
7542
7546
  }
7543
- function A(w, m) {
7544
- e.selectedObject && (delete e.selectedObject.userData[w], c(e.selectedObject));
7547
+ function A(I, h) {
7548
+ e.selectedObject && (delete e.selectedObject.userData[I], c(e.selectedObject));
7545
7549
  }
7546
- function p(w) {
7547
- return w.length <= 28 ? w : w.substring(0, 28) + "…";
7550
+ function p(I) {
7551
+ return I.length <= 28 ? I : I.substring(0, 28) + "…";
7548
7552
  }
7549
- function g(w) {
7550
- s.value = w;
7551
- const m = e.selectedObject;
7552
- if (!m) return;
7553
- const v = m.userData[w];
7553
+ function g(I) {
7554
+ s.value = I;
7555
+ const h = e.selectedObject;
7556
+ if (!h) return;
7557
+ const w = h.userData[I];
7554
7558
  try {
7555
- i.value = JSON.stringify(v, null, 2);
7559
+ i.value = JSON.stringify(w, null, 2);
7556
7560
  } catch {
7557
- i.value = String(v);
7561
+ i.value = String(w);
7558
7562
  }
7559
7563
  f();
7560
7564
  }
7561
7565
  function f() {
7562
- const w = i.value.trim();
7563
- if (!w) {
7566
+ const I = i.value.trim();
7567
+ if (!I) {
7564
7568
  o.value = null;
7565
7569
  return;
7566
7570
  }
7567
- if (!w.startsWith("{") && !w.startsWith("[")) {
7571
+ if (!I.startsWith("{") && !I.startsWith("[")) {
7568
7572
  o.value = "提示:当前输入不是 JSON 格式,将作为普通字符串保存";
7569
7573
  return;
7570
7574
  }
7571
7575
  try {
7572
- JSON.parse(w), o.value = null;
7573
- } catch (m) {
7574
- o.value = "JSON 格式错误:" + m.message;
7576
+ JSON.parse(I), o.value = null;
7577
+ } catch (h) {
7578
+ o.value = "JSON 格式错误:" + h.message;
7575
7579
  }
7576
7580
  }
7577
- function h(w) {
7578
- const m = e.selectedObject;
7579
- if (!m) return;
7580
- const v = i.value.trim();
7581
+ function m(I) {
7582
+ const h = e.selectedObject;
7583
+ if (!h) return;
7584
+ const w = i.value.trim();
7581
7585
  try {
7582
- const D = JSON.parse(v);
7583
- m.userData[w] = D, c(m), s.value = null, i.value = "";
7586
+ const E = JSON.parse(w);
7587
+ h.userData[I] = E, c(h), s.value = null, i.value = "";
7584
7588
  } catch {
7585
- m.userData[w] = v, c(m), s.value = null, i.value = "";
7589
+ h.userData[I] = w, c(h), s.value = null, i.value = "";
7586
7590
  }
7587
7591
  }
7588
7592
  function y() {
7589
7593
  s.value = null, i.value = "";
7590
7594
  }
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));
7595
+ function v() {
7596
+ const I = e.selectedObject;
7597
+ if (!I) return;
7598
+ const h = Fa();
7599
+ h && (I.userData.closeUpView = {
7600
+ x: h.position.x,
7601
+ y: h.position.y,
7602
+ z: h.position.z
7603
+ }, c(I));
7600
7604
  }
7601
7605
  return ve(
7602
7606
  () => e.selectedObject,
7603
- (w) => {
7604
- w ? c(w) : a.value = [], s.value = null, i.value = "";
7607
+ (I) => {
7608
+ I ? c(I) : a.value = [], s.value = null, i.value = "";
7605
7609
  },
7606
7610
  { 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, [
7611
+ ), (I, h) => (N(), U("div", Jl, [
7612
+ b("div", _l, [
7613
+ h[3] || (h[3] = b("label", null, "userData 属性", -1)),
7614
+ b("div", $l, [
7611
7615
  F(b("input", {
7612
7616
  type: "text",
7613
- "onUpdate:modelValue": m[0] || (m[0] = (v) => t.value = v),
7617
+ "onUpdate:modelValue": h[0] || (h[0] = (w) => t.value = w),
7614
7618
  placeholder: "属性名",
7615
7619
  class: "ud-input",
7616
7620
  onKeyup: rt(u, ["enter"])
@@ -7618,11 +7622,11 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7618
7622
  [Y, t.value]
7619
7623
  ]),
7620
7624
  F(b("textarea", {
7621
- "onUpdate:modelValue": m[1] || (m[1] = (v) => n.value = v),
7625
+ "onUpdate:modelValue": h[1] || (h[1] = (w) => n.value = w),
7622
7626
  placeholder: "值",
7623
7627
  class: "ud-input ud-textarea",
7624
- onKeyup: rt(bs(u, ["prevent"]), ["enter"])
7625
- }, null, 40, tc), [
7628
+ onKeyup: rt(xs(u, ["prevent"]), ["enter"])
7629
+ }, null, 40, ec), [
7626
7630
  [Y, n.value]
7627
7631
  ]),
7628
7632
  b("button", {
@@ -7631,39 +7635,39 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7631
7635
  onClick: u
7632
7636
  }, " + ")
7633
7637
  ]),
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,
7638
+ a.value.length > 0 ? (N(), U("div", tc, [
7639
+ (N(!0), U(Le, null, is(a.value, (w, E) => (N(), U("div", {
7640
+ key: w.key,
7637
7641
  class: Te(["userdata-item", {
7638
- readonly: v.key === "isMovable",
7639
- "editing-json": s.value === v.key
7642
+ readonly: w.key === "isMovable",
7643
+ "editing-json": s.value === w.key
7640
7644
  }])
7641
7645
  }, [
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),
7646
+ b("span", sc, de(w.key), 1),
7647
+ w.key === "isMovable" ? (N(), U("span", nc, de(String(w.value)) + " 🔒 ", 1)) : w.key !== "isMovable" ? (N(), U(Le, { key: 1 }, [
7648
+ s.value !== w.key ? (N(), U(Le, { key: 0 }, [
7649
+ b("span", ic, de(p(w.value)), 1),
7646
7650
  b("button", {
7647
7651
  class: "ud-btn edit-json-btn",
7648
7652
  title: "编辑对象",
7649
- onClick: (M) => g(v.key)
7650
- }, " ✎ ", 8, rc)
7653
+ onClick: (M) => g(w.key)
7654
+ }, " ✎ ", 8, oc)
7651
7655
  ], 64)) : (N(), U(Le, { key: 1 }, [
7652
- o.value ? (N(), U("div", ac, " ⚠ " + de(o.value), 1)) : ue("", !0),
7656
+ o.value ? (N(), U("div", rc, " ⚠ " + de(o.value), 1)) : ue("", !0),
7653
7657
  F(b("textarea", {
7654
- "onUpdate:modelValue": m[2] || (m[2] = (M) => i.value = M),
7658
+ "onUpdate:modelValue": h[2] || (h[2] = (M) => i.value = M),
7655
7659
  class: Te(["ud-json-textarea", { "has-error": o.value }]),
7656
7660
  rows: "3",
7657
7661
  onInput: f
7658
7662
  }, null, 34), [
7659
7663
  [Y, i.value]
7660
7664
  ]),
7661
- b("div", lc, [
7665
+ b("div", ac, [
7662
7666
  b("button", {
7663
7667
  class: "ud-btn apply-btn",
7664
7668
  title: "应用修改",
7665
- onClick: (M) => h(v.key)
7666
- }, " ✓ ", 8, cc),
7669
+ onClick: (M) => m(w.key)
7670
+ }, " ✓ ", 8, lc),
7667
7671
  b("button", {
7668
7672
  class: "ud-btn cancel-btn",
7669
7673
  title: "取消编辑",
@@ -7671,23 +7675,23 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7671
7675
  }, " ✕ ")
7672
7676
  ])
7673
7677
  ], 64)),
7674
- s.value !== v.key ? (N(), U("button", {
7678
+ s.value !== w.key ? (N(), U("button", {
7675
7679
  key: 2,
7676
7680
  class: "ud-btn del-btn",
7677
7681
  title: "删除",
7678
- onClick: (M) => A(v.key)
7679
- }, " ✕ ", 8, uc)) : ue("", !0)
7682
+ onClick: (M) => A(w.key)
7683
+ }, " ✕ ", 8, cc)) : ue("", !0)
7680
7684
  ], 64)) : ue("", !0)
7681
7685
  ], 2))), 128))
7682
- ])) : (N(), U("div", dc, "暂无自定义数据")),
7686
+ ])) : (N(), U("div", uc, "暂无自定义数据")),
7683
7687
  b("button", {
7684
7688
  class: "get-camera-btn",
7685
- onClick: C
7689
+ onClick: v
7686
7690
  }, " 添加当前相机位置 ")
7687
7691
  ])
7688
7692
  ]));
7689
7693
  }
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({
7694
+ }), 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
7695
  __name: "DataPanelTab",
7692
7696
  props: {
7693
7697
  selectedObject: {}
@@ -7696,28 +7700,28 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7696
7700
  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
7701
  let p = f(), g = !1;
7698
7702
  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);
7703
+ const I = e.selectedObject;
7704
+ return I ? St(ns(I)) : null;
7705
+ }
7706
+ ve(s, (I) => {
7707
+ g || !p || (p.visible = I);
7708
+ }), ve(l, (I) => {
7709
+ g || !p || p.setWidth(`${I}em`);
7710
+ }), ve(o, (I) => {
7711
+ g || !p || p.setOffsetX(I);
7712
+ }), ve(i, (I) => {
7713
+ g || !p || p.setOffsetY(I);
7714
+ }), ve(a, (I) => {
7715
+ g || !p || p.setOffsetZ(I);
7712
7716
  });
7713
- function h() {
7717
+ function m() {
7714
7718
  g || !p || (p.setTitle(t.value), p.setItems([...n.value]));
7715
7719
  }
7716
- ve(t, () => h()), ve(n, () => h(), { deep: !0 });
7717
- function y(w) {
7718
- n.value = n.value.filter((m, v) => v !== w), h();
7720
+ ve(t, () => m()), ve(n, () => m(), { deep: !0 });
7721
+ function y(I) {
7722
+ n.value = n.value.filter((h, w) => w !== I), m();
7719
7723
  }
7720
- function C() {
7724
+ function v() {
7721
7725
  !c.value.trim() || !d.value.trim() || (n.value = [
7722
7726
  ...n.value,
7723
7727
  {
@@ -7726,7 +7730,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7726
7730
  unit: u.value.trim() || void 0,
7727
7731
  code: A.value.trim() || void 0
7728
7732
  }
7729
- ], h(), c.value = "", d.value = "", u.value = "", A.value = "");
7733
+ ], m(), c.value = "", d.value = "", u.value = "", A.value = "");
7730
7734
  }
7731
7735
  return ve(
7732
7736
  () => e.selectedObject,
@@ -7736,46 +7740,46 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7736
7740
  }, 0);
7737
7741
  },
7738
7742
  { 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, [
7743
+ ), (I, h) => (N(), U("div", fc, [
7744
+ b("div", pc, [
7745
+ h[29] || (h[29] = b("label", null, "📊 数据面板", -1)),
7746
+ b("div", Ac, [
7747
+ h[14] || (h[14] = b("span", { class: "dp-label-sm" }, "可见性", -1)),
7748
+ b("div", mc, [
7749
+ b("label", gc, [
7746
7750
  F(b("input", {
7747
7751
  type: "checkbox",
7748
- "onUpdate:modelValue": m[0] || (m[0] = (v) => s.value = v)
7752
+ "onUpdate:modelValue": h[0] || (h[0] = (w) => s.value = w)
7749
7753
  }, null, 512), [
7750
7754
  [Ci, s.value]
7751
7755
  ]),
7752
- m[13] || (m[13] = b("span", { class: "dp-toggle-slider" }, null, -1))
7756
+ h[13] || (h[13] = b("span", { class: "dp-toggle-slider" }, null, -1))
7753
7757
  ]),
7754
- b("span", bc, de(s.value ? "显示中" : "已隐藏"), 1)
7758
+ b("span", yc, de(s.value ? "显示中" : "已隐藏"), 1)
7755
7759
  ])
7756
7760
  ]),
7757
- b("div", xc, [
7758
- m[15] || (m[15] = b("span", { class: "dp-label-sm" }, "标题", -1)),
7761
+ b("div", bc, [
7762
+ h[15] || (h[15] = b("span", { class: "dp-label-sm" }, "标题", -1)),
7759
7763
  F(b("input", {
7760
7764
  type: "text",
7761
7765
  class: "dp-input",
7762
- "onUpdate:modelValue": m[1] || (m[1] = (v) => t.value = v),
7766
+ "onUpdate:modelValue": h[1] || (h[1] = (w) => t.value = w),
7763
7767
  placeholder: "面板标题"
7764
7768
  }, null, 512), [
7765
7769
  [Y, t.value]
7766
7770
  ])
7767
7771
  ]),
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)),
7772
+ b("div", xc, [
7773
+ h[18] || (h[18] = b("span", { class: "dp-label-sm" }, "面板宽度", -1)),
7774
+ b("div", Ic, [
7775
+ h[16] || (h[16] = b("span", { class: "dp-range-label" }, "窄", -1)),
7772
7776
  F(b("input", {
7773
7777
  type: "range",
7774
7778
  class: "dp-range",
7775
7779
  min: "10",
7776
7780
  max: "40",
7777
7781
  step: "1",
7778
- "onUpdate:modelValue": m[2] || (m[2] = (v) => l.value = v)
7782
+ "onUpdate:modelValue": h[2] || (h[2] = (w) => l.value = w)
7779
7783
  }, null, 512), [
7780
7784
  [
7781
7785
  Y,
@@ -7784,21 +7788,21 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7784
7788
  { number: !0 }
7785
7789
  ]
7786
7790
  ]),
7787
- m[17] || (m[17] = b("span", { class: "dp-range-label" }, "宽", -1)),
7788
- b("span", wc, de(l.value) + "em", 1)
7791
+ h[17] || (h[17] = b("span", { class: "dp-range-label" }, "宽", -1)),
7792
+ b("span", Cc, de(l.value) + "em", 1)
7789
7793
  ])
7790
7794
  ]),
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)),
7795
+ b("div", wc, [
7796
+ h[21] || (h[21] = b("span", { class: "dp-label-sm" }, "面板左右位置", -1)),
7797
+ b("div", Mc, [
7798
+ h[19] || (h[19] = b("span", { class: "dp-range-label" }, "偏左", -1)),
7795
7799
  F(b("input", {
7796
7800
  type: "range",
7797
7801
  class: "dp-range",
7798
7802
  min: "-5",
7799
7803
  max: "5",
7800
7804
  step: "0.01",
7801
- "onUpdate:modelValue": m[3] || (m[3] = (v) => o.value = v)
7805
+ "onUpdate:modelValue": h[3] || (h[3] = (w) => o.value = w)
7802
7806
  }, null, 512), [
7803
7807
  [
7804
7808
  Y,
@@ -7807,11 +7811,11 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7807
7811
  { number: !0 }
7808
7812
  ]
7809
7813
  ]),
7810
- m[20] || (m[20] = b("span", { class: "dp-range-label" }, "偏右", -1)),
7814
+ h[20] || (h[20] = b("span", { class: "dp-range-label" }, "偏右", -1)),
7811
7815
  F(b("input", {
7812
7816
  type: "number",
7813
7817
  class: "dp-input dp-input-number",
7814
- "onUpdate:modelValue": m[4] || (m[4] = (v) => o.value = v),
7818
+ "onUpdate:modelValue": h[4] || (h[4] = (w) => o.value = w),
7815
7819
  step: "0.01"
7816
7820
  }, null, 512), [
7817
7821
  [
@@ -7823,17 +7827,17 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7823
7827
  ])
7824
7828
  ])
7825
7829
  ]),
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)),
7830
+ b("div", vc, [
7831
+ h[24] || (h[24] = b("span", { class: "dp-label-sm" }, "面板上下位置", -1)),
7832
+ b("div", Tc, [
7833
+ h[22] || (h[22] = b("span", { class: "dp-range-label" }, "偏下", -1)),
7830
7834
  F(b("input", {
7831
7835
  type: "range",
7832
7836
  class: "dp-range",
7833
7837
  min: "-5",
7834
7838
  max: "5",
7835
7839
  step: "0.01",
7836
- "onUpdate:modelValue": m[5] || (m[5] = (v) => i.value = v)
7840
+ "onUpdate:modelValue": h[5] || (h[5] = (w) => i.value = w)
7837
7841
  }, null, 512), [
7838
7842
  [
7839
7843
  Y,
@@ -7842,11 +7846,11 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7842
7846
  { number: !0 }
7843
7847
  ]
7844
7848
  ]),
7845
- m[23] || (m[23] = b("span", { class: "dp-range-label" }, "偏上", -1)),
7849
+ h[23] || (h[23] = b("span", { class: "dp-range-label" }, "偏上", -1)),
7846
7850
  F(b("input", {
7847
7851
  type: "number",
7848
7852
  class: "dp-input dp-input-number",
7849
- "onUpdate:modelValue": m[6] || (m[6] = (v) => i.value = v),
7853
+ "onUpdate:modelValue": h[6] || (h[6] = (w) => i.value = w),
7850
7854
  step: "0.01"
7851
7855
  }, null, 512), [
7852
7856
  [
@@ -7858,17 +7862,17 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7858
7862
  ])
7859
7863
  ])
7860
7864
  ]),
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)),
7865
+ b("div", Ec, [
7866
+ h[27] || (h[27] = b("span", { class: "dp-label-sm" }, "面板前后位置", -1)),
7867
+ b("div", Dc, [
7868
+ h[25] || (h[25] = b("span", { class: "dp-range-label" }, "近", -1)),
7865
7869
  F(b("input", {
7866
7870
  type: "range",
7867
7871
  class: "dp-range",
7868
7872
  min: "-5",
7869
7873
  max: "5",
7870
7874
  step: "0.01",
7871
- "onUpdate:modelValue": m[7] || (m[7] = (v) => a.value = v)
7875
+ "onUpdate:modelValue": h[7] || (h[7] = (w) => a.value = w)
7872
7876
  }, null, 512), [
7873
7877
  [
7874
7878
  Y,
@@ -7877,11 +7881,11 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7877
7881
  { number: !0 }
7878
7882
  ]
7879
7883
  ]),
7880
- m[26] || (m[26] = b("span", { class: "dp-range-label" }, "远", -1)),
7884
+ h[26] || (h[26] = b("span", { class: "dp-range-label" }, "远", -1)),
7881
7885
  F(b("input", {
7882
7886
  type: "number",
7883
7887
  class: "dp-input dp-input-number",
7884
- "onUpdate:modelValue": m[8] || (m[8] = (v) => a.value = v),
7888
+ "onUpdate:modelValue": h[8] || (h[8] = (w) => a.value = w),
7885
7889
  step: "0.01"
7886
7890
  }, null, 512), [
7887
7891
  [
@@ -7893,92 +7897,92 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7893
7897
  ])
7894
7898
  ])
7895
7899
  ]),
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,
7900
+ b("div", Pc, [
7901
+ h[28] || (h[28] = b("span", { class: "dp-label-sm" }, "数据项", -1)),
7902
+ b("div", Rc, [
7903
+ (N(!0), U(Le, null, is(n.value, (w, E) => (N(), U("div", {
7904
+ key: E,
7901
7905
  class: "dp-item"
7902
7906
  }, [
7903
7907
  F(b("input", {
7904
7908
  type: "text",
7905
7909
  class: "dp-input dp-input-sm",
7906
- "onUpdate:modelValue": (M) => v.label = M,
7910
+ "onUpdate:modelValue": (M) => w.label = M,
7907
7911
  placeholder: "标签"
7908
- }, null, 8, Sc), [
7909
- [Y, v.label]
7912
+ }, null, 8, Oc), [
7913
+ [Y, w.label]
7910
7914
  ]),
7911
7915
  F(b("input", {
7912
7916
  type: "text",
7913
7917
  class: "dp-input dp-input-sm",
7914
- "onUpdate:modelValue": (M) => v.value = M,
7918
+ "onUpdate:modelValue": (M) => w.value = M,
7915
7919
  placeholder: "值"
7916
- }, null, 8, Lc), [
7917
- [Y, v.value]
7920
+ }, null, 8, Sc), [
7921
+ [Y, w.value]
7918
7922
  ]),
7919
7923
  F(b("input", {
7920
7924
  type: "text",
7921
7925
  class: "dp-input dp-input-xs",
7922
- "onUpdate:modelValue": (M) => v.unit = M,
7926
+ "onUpdate:modelValue": (M) => w.unit = M,
7923
7927
  placeholder: "单位"
7924
- }, null, 8, Nc), [
7925
- [Y, v.unit]
7928
+ }, null, 8, Lc), [
7929
+ [Y, w.unit]
7926
7930
  ]),
7927
7931
  F(b("input", {
7928
7932
  type: "text",
7929
7933
  class: "dp-input dp-input-xs",
7930
- "onUpdate:modelValue": (M) => v.code = M,
7934
+ "onUpdate:modelValue": (M) => w.code = M,
7931
7935
  placeholder: "编码"
7932
- }, null, 8, Hc), [
7933
- [Y, v.code]
7936
+ }, null, 8, Nc), [
7937
+ [Y, w.code]
7934
7938
  ]),
7935
7939
  b("button", {
7936
7940
  class: "dp-btn dp-btn-del",
7937
- onClick: (M) => y(D),
7941
+ onClick: (M) => y(E),
7938
7942
  title: "删除此项"
7939
- }, "✕", 8, kc)
7943
+ }, "✕", 8, Hc)
7940
7944
  ]))), 128))
7941
7945
  ]),
7942
- b("div", jc, [
7946
+ b("div", kc, [
7943
7947
  F(b("input", {
7944
7948
  type: "text",
7945
7949
  class: "dp-input dp-input-sm",
7946
- "onUpdate:modelValue": m[9] || (m[9] = (v) => c.value = v),
7950
+ "onUpdate:modelValue": h[9] || (h[9] = (w) => c.value = w),
7947
7951
  placeholder: "标签",
7948
- onKeyup: rt(C, ["enter"])
7952
+ onKeyup: rt(v, ["enter"])
7949
7953
  }, null, 544), [
7950
7954
  [Y, c.value]
7951
7955
  ]),
7952
7956
  F(b("input", {
7953
7957
  type: "text",
7954
7958
  class: "dp-input dp-input-sm",
7955
- "onUpdate:modelValue": m[10] || (m[10] = (v) => d.value = v),
7959
+ "onUpdate:modelValue": h[10] || (h[10] = (w) => d.value = w),
7956
7960
  placeholder: "值",
7957
- onKeyup: rt(C, ["enter"])
7961
+ onKeyup: rt(v, ["enter"])
7958
7962
  }, null, 544), [
7959
7963
  [Y, d.value]
7960
7964
  ]),
7961
7965
  F(b("input", {
7962
7966
  type: "text",
7963
7967
  class: "dp-input dp-input-xs",
7964
- "onUpdate:modelValue": m[11] || (m[11] = (v) => u.value = v),
7968
+ "onUpdate:modelValue": h[11] || (h[11] = (w) => u.value = w),
7965
7969
  placeholder: "单位",
7966
- onKeyup: rt(C, ["enter"])
7970
+ onKeyup: rt(v, ["enter"])
7967
7971
  }, null, 544), [
7968
7972
  [Y, u.value]
7969
7973
  ]),
7970
7974
  F(b("input", {
7971
7975
  type: "text",
7972
7976
  class: "dp-input dp-input-xs",
7973
- "onUpdate:modelValue": m[12] || (m[12] = (v) => A.value = v),
7977
+ "onUpdate:modelValue": h[12] || (h[12] = (w) => A.value = w),
7974
7978
  placeholder: "编码",
7975
- onKeyup: rt(C, ["enter"])
7979
+ onKeyup: rt(v, ["enter"])
7976
7980
  }, null, 544), [
7977
7981
  [Y, A.value]
7978
7982
  ]),
7979
7983
  b("button", {
7980
7984
  class: "dp-btn dp-btn-add",
7981
- onClick: C,
7985
+ onClick: v,
7982
7986
  title: "添加"
7983
7987
  }, "+")
7984
7988
  ])
@@ -7986,8 +7990,8 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7986
7990
  ])
7987
7991
  ]));
7988
7992
  }
7989
- }), Uc = /* @__PURE__ */ qe(Fc, [["__scopeId", "data-v-b4c7c7dc"]]);
7990
- function zc(r) {
7993
+ }), Fc = /* @__PURE__ */ qe(jc, [["__scopeId", "data-v-b4c7c7dc"]]);
7994
+ function Uc(r) {
7991
7995
  const e = W(/* @__PURE__ */ new Set()), t = (s) => {
7992
7996
  const i = new Set(e.value);
7993
7997
  i.has(s) ? i.delete(s) : i.add(s), e.value = i;
@@ -8007,22 +8011,22 @@ function zc(r) {
8007
8011
  { immediate: !0 }
8008
8012
  ), { expandedSet: e, toggleExpand: t };
8009
8013
  }
8010
- const Gc = {
8014
+ const zc = {
8011
8015
  key: 0,
8012
8016
  class: "property-panel"
8013
- }, Wc = { class: "property-group tree-group" }, Bc = { class: "tree-container" }, Xc = {
8017
+ }, Gc = { class: "property-group tree-group" }, Wc = { class: "tree-container" }, Bc = {
8014
8018
  key: 0,
8015
8019
  class: "tree-empty"
8016
- }, qc = { class: "property-group" }, Vc = { class: "transform-mode-row" }, Yc = {
8020
+ }, Xc = { class: "property-group" }, qc = { class: "transform-mode-row" }, Vc = {
8017
8021
  key: 0,
8018
8022
  class: "tabs"
8019
- }, Kc = {
8023
+ }, Yc = {
8020
8024
  key: 1,
8021
8025
  class: "tab-content"
8022
- }, Zc = {
8026
+ }, Kc = {
8023
8027
  key: 1,
8024
8028
  class: "property-panel empty"
8025
- }, Qc = /* @__PURE__ */ Xe({
8029
+ }, Zc = /* @__PURE__ */ Xe({
8026
8030
  __name: "index",
8027
8031
  props: {
8028
8032
  transform: {},
@@ -8038,81 +8042,81 @@ const Gc = {
8038
8042
  const o = () => n("propertyChange"), a = W("transform"), l = ot(() => {
8039
8043
  var g;
8040
8044
  return !!(t.selectedObject && ((g = t.selectedObject.userData) != null && g._hasDataPanel));
8041
- }), c = W(0), d = wi(t, "selectedObject"), { expandedSet: u, toggleExpand: A } = zc(d);
8045
+ }), c = W(0), d = wi(t, "selectedObject"), { expandedSet: u, toggleExpand: A } = Uc(d);
8042
8046
  Mi("treeExpand", { expandedSet: u, toggleExpand: A });
8043
8047
  const p = (g) => {
8044
8048
  c.value++, n("treeDelete", g);
8045
8049
  };
8046
- return (g, f) => g.transform ? (N(), U("div", Gc, [
8047
- b("div", Wc, [
8050
+ return (g, f) => g.transform ? (N(), U("div", zc, [
8051
+ b("div", Gc, [
8048
8052
  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,
8053
+ b("div", Wc, [
8054
+ (N(!0), U(Le, null, is(g.treeData, (m) => (N(), bt(rl, {
8055
+ key: m.uuid,
8056
+ node: m,
8053
8057
  "selected-object": g.selectedObject,
8054
8058
  version: c.value,
8055
8059
  onSelect: f[0] || (f[0] = (y) => n("treeSelect", y)),
8056
8060
  onDelete: p
8057
8061
  }, null, 8, ["node", "selected-object", "version"]))), 128)),
8058
- g.treeData.length === 0 ? (N(), U("div", Xc, "暂无物体")) : ue("", !0)
8062
+ g.treeData.length === 0 ? (N(), U("div", Bc, "暂无物体")) : ue("", !0)
8059
8063
  ])
8060
8064
  ]),
8061
- b("div", qc, [
8065
+ b("div", Xc, [
8062
8066
  f[8] || (f[8] = b("label", null, "全局属性", -1)),
8063
- b("div", Vc, [
8067
+ b("div", qc, [
8064
8068
  b("button", {
8065
8069
  class: Te(["mode-btn", { active: s.value === "translate" }]),
8066
8070
  title: "移动 (W)",
8067
- onClick: f[1] || (f[1] = (h) => i("translate"))
8071
+ onClick: f[1] || (f[1] = (m) => i("translate"))
8068
8072
  }, " ↕ 移动 ", 2),
8069
8073
  b("button", {
8070
8074
  class: Te(["mode-btn", { active: s.value === "rotate" }]),
8071
8075
  title: "旋转 (E)",
8072
- onClick: f[2] || (f[2] = (h) => i("rotate"))
8076
+ onClick: f[2] || (f[2] = (m) => i("rotate"))
8073
8077
  }, " ↻ 旋转 ", 2),
8074
8078
  b("button", {
8075
8079
  class: Te(["mode-btn", { active: s.value === "scale" }]),
8076
8080
  title: "缩放 (R)",
8077
- onClick: f[3] || (f[3] = (h) => i("scale"))
8081
+ onClick: f[3] || (f[3] = (m) => i("scale"))
8078
8082
  }, " ⤡ 缩放 ", 2)
8079
8083
  ])
8080
8084
  ]),
8081
- g.selectedObject ? (N(), U("div", Yc, [
8085
+ g.selectedObject ? (N(), U("div", Vc, [
8082
8086
  b("button", {
8083
8087
  class: Te(["tab-btn", { active: a.value === "transform" }]),
8084
- onClick: f[4] || (f[4] = (h) => a.value = "transform")
8088
+ onClick: f[4] || (f[4] = (m) => a.value = "transform")
8085
8089
  }, " 🔄 变换 ", 2),
8086
8090
  b("button", {
8087
8091
  class: Te(["tab-btn", { active: a.value === "userdata" }]),
8088
- onClick: f[5] || (f[5] = (h) => a.value = "userdata")
8092
+ onClick: f[5] || (f[5] = (m) => a.value = "userdata")
8089
8093
  }, " 📋 自定义数据 ", 2),
8090
8094
  l.value ? (N(), U("button", {
8091
8095
  key: 0,
8092
8096
  class: Te(["tab-btn", { active: a.value === "datapanel" }]),
8093
- onClick: f[6] || (f[6] = (h) => a.value = "datapanel")
8097
+ onClick: f[6] || (f[6] = (m) => a.value = "datapanel")
8094
8098
  }, " 📊 数据面板 ", 2)) : ue("", !0)
8095
8099
  ])) : ue("", !0),
8096
- g.selectedObject ? (N(), U("div", Kc, [
8097
- F(rs(Jl, {
8100
+ g.selectedObject ? (N(), U("div", Yc, [
8101
+ F(as(Ql, {
8098
8102
  transform: g.transform,
8099
8103
  "selected-object": g.selectedObject,
8100
8104
  onPropertyChange: o
8101
8105
  }, null, 8, ["transform", "selected-object"]), [
8102
8106
  [Qe, a.value === "transform"]
8103
8107
  ]),
8104
- F(rs(fc, { "selected-object": g.selectedObject }, null, 8, ["selected-object"]), [
8108
+ F(as(hc, { "selected-object": g.selectedObject }, null, 8, ["selected-object"]), [
8105
8109
  [Qe, a.value === "userdata"]
8106
8110
  ]),
8107
- F(rs(Uc, { "selected-object": g.selectedObject }, null, 8, ["selected-object"]), [
8111
+ F(as(Fc, { "selected-object": g.selectedObject }, null, 8, ["selected-object"]), [
8108
8112
  [Qe, a.value === "datapanel"]
8109
8113
  ])
8110
8114
  ])) : ue("", !0)
8111
- ])) : (N(), U("div", Zc, f[9] || (f[9] = [
8115
+ ])) : (N(), U("div", Kc, f[9] || (f[9] = [
8112
8116
  b("p", null, "未选中任何模型", -1)
8113
8117
  ])));
8114
8118
  }
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({
8119
+ }), 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
8120
  __name: "TopBar",
8117
8121
  emits: ["addModel", "importModel"],
8118
8122
  setup(r, { emit: e }) {
@@ -8120,8 +8124,8 @@ const Gc = {
8120
8124
  var f;
8121
8125
  return (f = a.value) == null ? void 0 : f.click();
8122
8126
  }, c = (f) => {
8123
- const h = f.target;
8124
- h.files && h.files.length > 0 && (o("importModel", h.files[0]), h.value = "");
8127
+ const m = f.target;
8128
+ m.files && m.files.length > 0 && (o("importModel", m.files[0]), m.value = "");
8125
8129
  }, d = () => console.log("撤销"), u = () => console.log("删除物体"), A = async () => {
8126
8130
  const f = await Ga();
8127
8131
  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 +8133,45 @@ const Gc = {
8129
8133
  if (!localStorage.getItem("test_id")) return localStorage.setItem("test_id", "123");
8130
8134
  $n(localStorage.getItem("test_id"));
8131
8135
  }, g = () => Zn();
8132
- return (f, h) => (N(), U("div", _c, [
8133
- b("div", $c, [
8136
+ return (f, m) => (N(), U("div", Jc, [
8137
+ b("div", _c, [
8134
8138
  b("div", {
8135
8139
  class: "dropdown-wrapper",
8136
- onMouseenter: h[11] || (h[11] = (y) => n.value = !0),
8137
- onMouseleave: h[12] || (h[12] = (y) => n.value = !1)
8140
+ onMouseenter: m[11] || (m[11] = (y) => n.value = !0),
8141
+ onMouseleave: m[12] || (m[12] = (y) => n.value = !1)
8138
8142
  }, [
8139
- h[17] || (h[17] = b("button", { class: "menu-btn" }, "添加", -1)),
8140
- F(b("div", eu, [
8143
+ m[17] || (m[17] = b("button", { class: "menu-btn" }, "添加", -1)),
8144
+ F(b("div", $c, [
8141
8145
  b("div", {
8142
8146
  class: "menu-item",
8143
8147
  onClick: d
8144
8148
  }, "组"),
8145
8149
  b("div", {
8146
8150
  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)
8151
+ onMouseenter: m[5] || (m[5] = (y) => s.value = !0),
8152
+ onMouseleave: m[6] || (m[6] = (y) => s.value = !1)
8149
8153
  }, [
8150
- h[15] || (h[15] = b("span", null, "网格", -1)),
8151
- F(b("div", tu, [
8154
+ m[15] || (m[15] = b("span", null, "网格", -1)),
8155
+ F(b("div", eu, [
8152
8156
  b("div", {
8153
8157
  class: "menu-item",
8154
- onClick: h[0] || (h[0] = (y) => o("addModel", "box"))
8158
+ onClick: m[0] || (m[0] = (y) => o("addModel", "box"))
8155
8159
  }, " 正方体 "),
8156
8160
  b("div", {
8157
8161
  class: "menu-item",
8158
- onClick: h[1] || (h[1] = (y) => o("addModel", "sphere"))
8162
+ onClick: m[1] || (m[1] = (y) => o("addModel", "sphere"))
8159
8163
  }, " 球体 "),
8160
8164
  b("div", {
8161
8165
  class: "menu-item",
8162
- onClick: h[2] || (h[2] = (y) => o("addModel", "water"))
8166
+ onClick: m[2] || (m[2] = (y) => o("addModel", "water"))
8163
8167
  }, " 水体(Water.js) "),
8164
8168
  b("div", {
8165
8169
  class: "menu-item",
8166
- onClick: h[3] || (h[3] = (y) => o("addModel", "waterCylinder"))
8170
+ onClick: m[3] || (m[3] = (y) => o("addModel", "waterCylinder"))
8167
8171
  }, " 水体(圆柱) "),
8168
8172
  b("div", {
8169
8173
  class: "menu-item",
8170
- onClick: h[4] || (h[4] = (y) => o("addModel", "waterPlane"))
8174
+ onClick: m[4] || (m[4] = (y) => o("addModel", "waterPlane"))
8171
8175
  }, " 水面(标准材质) "),
8172
8176
  b("div", {
8173
8177
  class: "menu-item",
@@ -8179,14 +8183,14 @@ const Gc = {
8179
8183
  ], 32),
8180
8184
  b("div", {
8181
8185
  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)
8186
+ onMouseenter: m[8] || (m[8] = (y) => i.value = !0),
8187
+ onMouseleave: m[9] || (m[9] = (y) => i.value = !1)
8184
8188
  }, [
8185
- h[16] || (h[16] = b("span", null, "光源", -1)),
8186
- F(b("div", su, [
8189
+ m[16] || (m[16] = b("span", null, "光源", -1)),
8190
+ F(b("div", tu, [
8187
8191
  b("div", {
8188
8192
  class: "menu-item",
8189
- onClick: h[7] || (h[7] = (y) => o("addModel", "directionalLight"))
8193
+ onClick: m[7] || (m[7] = (y) => o("addModel", "directionalLight"))
8190
8194
  }, " 平行光 ")
8191
8195
  ], 512), [
8192
8196
  [Qe, i.value]
@@ -8198,7 +8202,7 @@ const Gc = {
8198
8202
  }, "摄像机"),
8199
8203
  b("div", {
8200
8204
  class: "menu-item",
8201
- onClick: h[10] || (h[10] = (y) => o("addModel", "dataPanel"))
8205
+ onClick: m[10] || (m[10] = (y) => o("addModel", "dataPanel"))
8202
8206
  }, " 数据面板 ")
8203
8207
  ], 512), [
8204
8208
  [Qe, n.value]
@@ -8206,11 +8210,11 @@ const Gc = {
8206
8210
  ], 32),
8207
8211
  b("div", {
8208
8212
  class: "dropdown-wrapper",
8209
- onMouseenter: h[13] || (h[13] = (y) => t.value = !0),
8210
- onMouseleave: h[14] || (h[14] = (y) => t.value = !1)
8213
+ onMouseenter: m[13] || (m[13] = (y) => t.value = !0),
8214
+ onMouseleave: m[14] || (m[14] = (y) => t.value = !1)
8211
8215
  }, [
8212
- h[19] || (h[19] = b("button", { class: "menu-btn" }, "帮助", -1)),
8213
- F(b("div", nu, [
8216
+ m[19] || (m[19] = b("button", { class: "menu-btn" }, "帮助", -1)),
8217
+ F(b("div", su, [
8214
8218
  b("div", {
8215
8219
  class: "menu-item",
8216
8220
  onClick: A
@@ -8223,13 +8227,13 @@ const Gc = {
8223
8227
  class: "menu-item",
8224
8228
  onClick: g
8225
8229
  }, " 重置相机位置 "),
8226
- h[18] || (h[18] = b("div", { class: "menu-divider" }, null, -1))
8230
+ m[18] || (m[18] = b("div", { class: "menu-divider" }, null, -1))
8227
8231
  ], 512), [
8228
8232
  [Qe, t.value]
8229
8233
  ])
8230
8234
  ], 32)
8231
8235
  ]),
8232
- h[20] || (h[20] = b("div", { class: "right-section" }, [
8236
+ m[20] || (m[20] = b("div", { class: "right-section" }, [
8233
8237
  b("span", { class: "app-title" }, "3D 模型编辑器")
8234
8238
  ], -1)),
8235
8239
  b("input", {
@@ -8242,10 +8246,10 @@ const Gc = {
8242
8246
  }, null, 544)
8243
8247
  ]));
8244
8248
  }
8245
- }), ou = /* @__PURE__ */ qe(iu, [["__scopeId", "data-v-9cee44a7"]]), ru = { class: "bottom-bar" }, au = /* @__PURE__ */ Xe({
8249
+ }), iu = /* @__PURE__ */ qe(nu, [["__scopeId", "data-v-9cee44a7"]]), ou = { class: "bottom-bar" }, ru = /* @__PURE__ */ Xe({
8246
8250
  __name: "BottomBar",
8247
8251
  setup(r) {
8248
- return (e, t) => (N(), U("div", ru, t[0] || (t[0] = [
8252
+ return (e, t) => (N(), U("div", ou, t[0] || (t[0] = [
8249
8253
  b("div", { class: "status-left" }, [
8250
8254
  b("span", null, "就绪")
8251
8255
  ], -1),
@@ -8254,10 +8258,10 @@ const Gc = {
8254
8258
  ], -1)
8255
8259
  ])));
8256
8260
  }
8257
- }), lu = /* @__PURE__ */ qe(au, [["__scopeId", "data-v-3427bb27"]]), cu = { class: "app-layout" }, uu = {
8261
+ }), au = /* @__PURE__ */ qe(ru, [["__scopeId", "data-v-3427bb27"]]), lu = { class: "app-layout" }, cu = {
8258
8262
  key: 0,
8259
8263
  class: "loading-overlay"
8260
- }, du = /* @__PURE__ */ Xe({
8264
+ }, uu = /* @__PURE__ */ Xe({
8261
8265
  __name: "DrawingBoard",
8262
8266
  props: {
8263
8267
  mode: { default: "edit" },
@@ -8268,7 +8272,7 @@ const Gc = {
8268
8272
  xa((y) => {
8269
8273
  t.value = y;
8270
8274
  });
8271
- const n = Fs(null), s = xs({
8275
+ const n = Fs(null), s = Is({
8272
8276
  position: { x: 0, y: 0, z: 0 },
8273
8277
  rotation: { x: 0, y: 0, z: 0 },
8274
8278
  scale: { x: 1, y: 1, z: 1 }
@@ -8298,8 +8302,8 @@ const Gc = {
8298
8302
  }, l = (y) => hi(y), c = async (y) => {
8299
8303
  try {
8300
8304
  await di(y);
8301
- } catch (C) {
8302
- console.error("导入失败:", C), alert("导入失败:" + C.message);
8305
+ } catch (v) {
8306
+ console.error("导入失败:", v), alert("导入失败:" + v.message);
8303
8307
  }
8304
8308
  }, d = Fs([]);
8305
8309
  Ha((y) => {
@@ -8310,19 +8314,19 @@ const Gc = {
8310
8314
  y && (d.value = y);
8311
8315
  }, A = (y) => Hs(y), p = (y) => Ra(y.uuid), g = (y) => {
8312
8316
  Ia(y);
8313
- }, f = W(null), h = async () => {
8317
+ }, f = W(null), m = async () => {
8314
8318
  f.value && await ca(f.value, e.mode, e.sceneData), u();
8315
8319
  };
8316
8320
  return vi(() => {
8317
- h(), f.value && $o(f.value);
8321
+ m(), f.value && $o(f.value);
8318
8322
  }), 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] = [
8323
+ console.log("endset_three_editor destroy"), Xa();
8324
+ }), (y, v) => (N(), U("div", lu, [
8325
+ t.value ? (N(), U("div", cu, v[0] || (v[0] = [
8322
8326
  b("div", { class: "loading-spinner" }, null, -1),
8323
8327
  b("div", { class: "loading-text" }, "加载中...", -1)
8324
8328
  ]))) : ue("", !0),
8325
- y.mode === "edit" ? (N(), bt(ou, {
8329
+ y.mode === "edit" ? (N(), bt(iu, {
8326
8330
  key: 1,
8327
8331
  onAddModel: l,
8328
8332
  onImportModel: c
@@ -8335,7 +8339,7 @@ const Gc = {
8335
8339
  ref_key: "containerRef",
8336
8340
  ref: f
8337
8341
  }, null, 2),
8338
- y.mode === "edit" ? (N(), bt(Jc, {
8342
+ y.mode === "edit" ? (N(), bt(Qc, {
8339
8343
  key: 0,
8340
8344
  transform: s,
8341
8345
  "tree-data": d.value,
@@ -8346,17 +8350,17 @@ const Gc = {
8346
8350
  onTransformModeChange: g
8347
8351
  }, null, 8, ["transform", "tree-data", "selected-object"])) : ue("", !0)
8348
8352
  ], 2),
8349
- y.mode === "edit" ? (N(), bt(lu, { key: 2 })) : ue("", !0)
8353
+ y.mode === "edit" ? (N(), bt(au, { key: 2 })) : ue("", !0)
8350
8354
  ]));
8351
8355
  }
8352
- }), Lu = /* @__PURE__ */ qe(du, [["__scopeId", "data-v-1be6406e"]]);
8356
+ }), Su = /* @__PURE__ */ qe(uu, [["__scopeId", "data-v-1be6406e"]]);
8353
8357
  export {
8354
- lu as BottomBar,
8355
- _t as DataPanel,
8356
- Lu as DrawingBoard,
8357
- Jc as PropertyPanel,
8358
- ou as TopBar,
8359
- al as TreeItem,
8358
+ au as BottomBar,
8359
+ $t as DataPanel,
8360
+ Su as DrawingBoard,
8361
+ Qc as PropertyPanel,
8362
+ iu as TopBar,
8363
+ rl as TreeItem,
8360
8364
  ni as addBox,
8361
8365
  ui as addDataPanel,
8362
8366
  oi as addDirectionalLight,
@@ -8367,21 +8371,21 @@ export {
8367
8371
  ai as addWaterCylinder,
8368
8372
  ci as addWaterPlane,
8369
8373
  $o as createCSS2DRenderer,
8370
- qa as destroyEditor,
8374
+ Xa as destroyEditor,
8371
8375
  sr as disposeCSS2DRenderer,
8372
8376
  Ga as exportSceneToJSON,
8373
8377
  Ma as focusOnObject,
8374
- mu as getCSS2DRenderer,
8378
+ Au as getCSS2DRenderer,
8375
8379
  Fa as getCamera,
8376
8380
  St as getDataPanel,
8377
- Su as getRenderer,
8378
- Ou as getScene,
8381
+ Ou as getRenderer,
8382
+ Ru as getScene,
8379
8383
  ka as getSceneObjects,
8380
8384
  ja as getSelectedObject,
8381
8385
  di as importModelFromFile,
8382
8386
  Zn as initDefaultMainCamera,
8383
8387
  ca as initEditor,
8384
- Xa as loadSceneFromJSON,
8388
+ Ba as loadSceneFromJSON,
8385
8389
  Ha as onSceneObjectsChangeCallback,
8386
8390
  Ea as registerModelDataPanel,
8387
8391
  Bn as removeDataPanel,
@@ -8391,12 +8395,12 @@ export {
8391
8395
  tr as resizeCSS2DRenderer,
8392
8396
  $n as selectModelHandle,
8393
8397
  Hs as selectObject,
8394
- ms as setLoading,
8398
+ gs as setLoading,
8395
8399
  xa as setLoadingCallback,
8396
8400
  La as setSelectedObjectCallback,
8397
8401
  Na as setTransformChangeCallback,
8398
8402
  Ia as setTransformMode,
8399
- Ru as updateDataPanelValue,
8400
- zc as useTreeExpand
8403
+ Pu as updateDataPanelValue,
8404
+ Uc as useTreeExpand
8401
8405
  };
8402
8406
  //# sourceMappingURL=three-editor.es.js.map