endset_three_editor 0.10.30 → 0.10.31

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,11 +1,11 @@
1
1
  var _i = Object.defineProperty;
2
2
  var $i = (r, e, t) => e in r ? _i(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var Je = (r, e, t) => $i(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { toRaw as hs, reactive as is, defineComponent as Ze, ref as W, inject as eo, computed as tt, watchEffect as to, resolveComponent as so, openBlock as H, createElementBlock as k, createElementVNode as g, normalizeClass as Pe, withModifiers as os, unref as rs, toDisplayString as he, Fragment as Ee, renderList as mt, createBlock as Mt, createCommentVNode as re, watch as Me, withDirectives as j, vModelText as B, createTextVNode as ys, vModelCheckbox as Gn, withKeys as dt, toRef as no, provide as io, createVNode as bs, vShow as st, shallowRef as en, onMounted as oo, onBeforeUnmount as ro, normalizeStyle as ao } from "vue";
3
+ var _e = (r, e, t) => $i(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { toRaw as hs, reactive as os, defineComponent as Qe, ref as W, inject as eo, computed as st, watchEffect as to, resolveComponent as so, openBlock as H, createElementBlock as j, createElementVNode as g, normalizeClass as Pe, withModifiers as St, unref as rs, toDisplayString as ue, Fragment as Ee, renderList as mt, createBlock as Mt, createCommentVNode as re, watch as Me, withDirectives as k, vModelText as B, createTextVNode as ys, vModelCheckbox as Gn, withKeys as dt, toRef as no, provide as io, vShow as Ye, createVNode as bs, shallowRef as en, onMounted as oo, onBeforeUnmount as ro, normalizeStyle as ao } from "vue";
5
5
  import * as R from "three";
6
- import { Controls as Bn, Vector3 as S, MOUSE as pt, TOUCH as ft, Quaternion as me, Spherical as tn, Vector2 as de, Ray as lo, Plane as Xn, MathUtils as St, Raycaster as co, Object3D as gt, MeshBasicMaterial as nt, LineBasicMaterial as Tt, CylinderGeometry as ge, BoxGeometry as Ae, BufferGeometry as rt, Float32BufferAttribute as ke, Mesh as L, OctahedronGeometry as Ut, Line as We, TorusGeometry as yt, SphereGeometry as uo, Euler as fo, Matrix4 as Ce, PlaneGeometry as ho, DoubleSide as Xs, OrthographicCamera as qn, ShaderMaterial as Ls, UniformsUtils as as, WebGLRenderTarget as Vn, HalfFloatType as Yn, NoBlending as po, Timer as Ao, Color as le, RawShaderMaterial as mo, ColorManagement as ls, SRGBTransfer as go, LinearToneMapping as yo, ReinhardToneMapping as bo, CineonToneMapping as xo, ACESFilmicToneMapping as Io, AgXToneMapping as Co, NeutralToneMapping as wo, CustomToneMapping as vo, BufferAttribute as De, REVISION as Mo, CompressedTexture as xs, Source as To, NoColorSpace as Eo, RGBAFormat as Do, ImageUtils as Oo, PropertyBinding as Lt, InterpolateDiscrete as Kn, Scene as sn, SRGBColorSpace as je, NearestFilter as qs, NearestMipmapNearestFilter as Zn, NearestMipmapLinearFilter as Qn, LinearFilter as cs, LinearMipmapNearestFilter as Jn, LinearMipmapLinearFilter as Vs, ClampToEdgeWrapping as _n, RepeatWrapping as it, MirroredRepeatWrapping as $n, InterpolateLinear as Ys, TrianglesDrawMode as Ro, TriangleFanDrawMode as Ns, TriangleStripDrawMode as ei, Loader as Ks, LoaderUtils as Et, FileLoader as Nt, MeshPhysicalMaterial as Ue, LinearSRGBColorSpace as Fe, SpotLight as Po, PointLight as So, DirectionalLight as Lo, InstancedMesh as No, InstancedBufferAttribute as Ho, TextureLoader as Qt, ImageBitmapLoader as ko, InterleavedBuffer as ti, InterleavedBufferAttribute as si, PointsMaterial as Ct, Material as Dt, MeshStandardMaterial as ni, SkinnedMesh as jo, LineSegments as Hs, LineLoop as Fo, Points as Jt, Group as _t, PerspectiveCamera as ii, Skeleton as Uo, AnimationClip as zo, Bone as Wo, Texture as nn, VectorKeyframeTrack as on, NumberKeyframeTrack as rn, QuaternionKeyframeTrack as an, FrontSide as oi, Interpolant as Go, Box3 as Bo, Sphere as Xo, MeshPhongMaterial as qo, Vector4 as ln, UniformsLib as cn } from "three";
7
- import fe from "@tweenjs/tween.js";
8
- const un = { type: "change" }, Zs = { type: "start" }, ri = { type: "end" }, zt = new lo(), dn = new Xn(), Vo = Math.cos(70 * St.DEG2RAD), ce = new S(), ye = 2 * Math.PI, te = {
6
+ import { Controls as Bn, Vector3 as S, MOUSE as pt, TOUCH as ft, Quaternion as me, Spherical as tn, Vector2 as fe, Ray as lo, Plane as Xn, MathUtils as Lt, Raycaster as co, Object3D as gt, MeshBasicMaterial as nt, LineBasicMaterial as Tt, CylinderGeometry as ge, BoxGeometry as Ae, BufferGeometry as rt, Float32BufferAttribute as ke, Mesh as L, OctahedronGeometry as zt, Line as We, TorusGeometry as yt, SphereGeometry as uo, Euler as fo, Matrix4 as Ce, PlaneGeometry as ho, DoubleSide as Xs, OrthographicCamera as qn, ShaderMaterial as Ls, UniformsUtils as as, WebGLRenderTarget as Vn, HalfFloatType as Yn, NoBlending as po, Timer as Ao, Color as le, RawShaderMaterial as mo, ColorManagement as ls, SRGBTransfer as go, LinearToneMapping as yo, ReinhardToneMapping as bo, CineonToneMapping as xo, ACESFilmicToneMapping as Io, AgXToneMapping as Co, NeutralToneMapping as wo, CustomToneMapping as vo, BufferAttribute as De, REVISION as Mo, CompressedTexture as xs, Source as To, NoColorSpace as Eo, RGBAFormat as Do, ImageUtils as Oo, PropertyBinding as Nt, InterpolateDiscrete as Kn, Scene as sn, SRGBColorSpace as je, NearestFilter as qs, NearestMipmapNearestFilter as Zn, NearestMipmapLinearFilter as Qn, LinearFilter as cs, LinearMipmapNearestFilter as Jn, LinearMipmapLinearFilter as Vs, ClampToEdgeWrapping as _n, RepeatWrapping as it, MirroredRepeatWrapping as $n, InterpolateLinear as Ys, TrianglesDrawMode as Ro, TriangleFanDrawMode as Ns, TriangleStripDrawMode as ei, Loader as Ks, LoaderUtils as Et, FileLoader as Ht, MeshPhysicalMaterial as Ue, LinearSRGBColorSpace as Fe, SpotLight as Po, PointLight as So, DirectionalLight as Lo, InstancedMesh as No, InstancedBufferAttribute as Ho, TextureLoader as Jt, ImageBitmapLoader as ko, InterleavedBuffer as ti, InterleavedBufferAttribute as si, PointsMaterial as Ct, Material as Dt, MeshStandardMaterial as ni, SkinnedMesh as jo, LineSegments as Hs, LineLoop as Fo, Points as _t, Group as $t, PerspectiveCamera as ii, Skeleton as Uo, AnimationClip as zo, Bone as Wo, Texture as nn, VectorKeyframeTrack as on, NumberKeyframeTrack as rn, QuaternionKeyframeTrack as an, FrontSide as oi, Interpolant as Go, Box3 as Bo, Sphere as Xo, MeshPhongMaterial as qo, Vector4 as ln, UniformsLib as cn } from "three";
7
+ import he from "@tweenjs/tween.js";
8
+ const un = { type: "change" }, Zs = { type: "start" }, ri = { type: "end" }, Wt = new lo(), dn = new Xn(), Vo = Math.cos(70 * Lt.DEG2RAD), ce = new S(), ye = 2 * Math.PI, te = {
9
9
  NONE: -1,
10
10
  ROTATE: 0,
11
11
  DOLLY: 1,
@@ -23,7 +23,7 @@ class Yo extends Bn {
23
23
  * @param {?HTMLElement} domElement - The HTML element used for event listeners.
24
24
  */
25
25
  constructor(e, t = null) {
26
- super(e, t), this.state = te.NONE, this.target = new S(), this.cursor = new S(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: pt.ROTATE, MIDDLE: pt.DOLLY, RIGHT: pt.PAN }, this.touches = { ONE: ft.ROTATE, TWO: ft.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._cursorStyle = "auto", this._domElementKeyEvents = null, this._lastPosition = new S(), this._lastQuaternion = new me(), this._lastTargetPosition = new S(), this._quat = new me().setFromUnitVectors(e.up, new S(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new tn(), this._sphericalDelta = new tn(), this._scale = 1, this._panOffset = new S(), this._rotateStart = new de(), this._rotateEnd = new de(), this._rotateDelta = new de(), this._panStart = new de(), this._panEnd = new de(), this._panDelta = new de(), this._dollyStart = new de(), this._dollyEnd = new de(), this._dollyDelta = new de(), this._dollyDirection = new S(), this._mouse = new de(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Zo.bind(this), this._onPointerDown = Ko.bind(this), this._onPointerUp = Qo.bind(this), this._onContextMenu = nr.bind(this), this._onMouseWheel = $o.bind(this), this._onKeyDown = er.bind(this), this._onTouchStart = tr.bind(this), this._onTouchMove = sr.bind(this), this._onMouseDown = Jo.bind(this), this._onMouseMove = _o.bind(this), this._interceptControlDown = ir.bind(this), this._interceptControlUp = or.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
26
+ super(e, t), this.state = te.NONE, this.target = new S(), this.cursor = new S(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: pt.ROTATE, MIDDLE: pt.DOLLY, RIGHT: pt.PAN }, this.touches = { ONE: ft.ROTATE, TWO: ft.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._cursorStyle = "auto", this._domElementKeyEvents = null, this._lastPosition = new S(), this._lastQuaternion = new me(), this._lastTargetPosition = new S(), this._quat = new me().setFromUnitVectors(e.up, new S(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new tn(), this._sphericalDelta = new tn(), this._scale = 1, this._panOffset = new S(), this._rotateStart = new fe(), this._rotateEnd = new fe(), this._rotateDelta = new fe(), this._panStart = new fe(), this._panEnd = new fe(), this._panDelta = new fe(), this._dollyStart = new fe(), this._dollyEnd = new fe(), this._dollyDelta = new fe(), this._dollyDirection = new S(), this._mouse = new fe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Zo.bind(this), this._onPointerDown = Ko.bind(this), this._onPointerUp = Qo.bind(this), this._onContextMenu = nr.bind(this), this._onMouseWheel = $o.bind(this), this._onKeyDown = er.bind(this), this._onTouchStart = tr.bind(this), this._onTouchMove = sr.bind(this), this._onMouseDown = Jo.bind(this), this._onMouseMove = _o.bind(this), this._interceptControlDown = ir.bind(this), this._interceptControlUp = or.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
27
27
  }
28
28
  /**
29
29
  * Defines the visual representation of the cursor.
@@ -167,7 +167,7 @@ class Yo extends Bn {
167
167
  c.unproject(this.object), this.object.position.sub(c).add(a), this.object.updateMatrixWorld(), o = ce.length();
168
168
  } else
169
169
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
170
- o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (zt.origin.copy(this.object.position), zt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(zt.direction)) < Vo ? this.object.lookAt(this.target) : (dn.setFromNormalAndCoplanarPoint(this.object.up, this.target), zt.intersectPlane(dn, this.target))));
170
+ o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (Wt.origin.copy(this.object.position), Wt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Wt.direction)) < Vo ? this.object.lookAt(this.target) : (dn.setFromNormalAndCoplanarPoint(this.object.up, this.target), Wt.intersectPlane(dn, this.target))));
171
171
  } else if (this.object.isOrthographicCamera) {
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);
@@ -340,7 +340,7 @@ class Yo extends Bn {
340
340
  }
341
341
  _trackPointer(e) {
342
342
  let t = this._pointerPositions[e.pointerId];
343
- t === void 0 && (t = new de(), this._pointerPositions[e.pointerId] = t), t.set(e.pageX, e.pageY);
343
+ t === void 0 && (t = new fe(), this._pointerPositions[e.pointerId] = t), t.set(e.pageX, e.pageY);
344
344
  }
345
345
  _getSecondPointerPosition(e) {
346
346
  const t = e.pointerId === this._pointers[0] ? this._pointers[1] : this._pointers[0];
@@ -512,7 +512,7 @@ function ir(r) {
512
512
  function or(r) {
513
513
  r.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
514
514
  }
515
- const _e = new co(), pe = new S(), qe = new S(), ie = new me(), fn = {
515
+ const $e = new co(), pe = new S(), qe = new S(), ie = new me(), fn = {
516
516
  X: new S(1, 0, 0),
517
517
  Y: new S(0, 1, 0),
518
518
  Z: new S(0, 0, 1)
@@ -533,20 +533,20 @@ class rr extends Bn {
533
533
  const i = new pr();
534
534
  this._plane = i, n.add(i);
535
535
  const o = this;
536
- function a(x, f) {
537
- let v = f;
538
- Object.defineProperty(o, x, {
536
+ function a(w, d) {
537
+ let x = d;
538
+ Object.defineProperty(o, w, {
539
539
  get: function() {
540
- return v !== void 0 ? v : f;
540
+ return x !== void 0 ? x : d;
541
541
  },
542
542
  set: function(M) {
543
- v !== M && (v = M, i[x] = M, s[x] = M, o.dispatchEvent({ type: x + "-changed", value: M }), o.dispatchEvent(Cs));
543
+ x !== M && (x = M, i[w] = M, s[w] = M, o.dispatchEvent({ type: w + "-changed", value: M }), o.dispatchEvent(Cs));
544
544
  }
545
- }), o[x] = f, i[x] = f, s[x] = f;
545
+ }), o[w] = d, i[w] = d, s[w] = d;
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 S(), c = new S(), d = new me(), u = new me(), A = new S(), m = new me(), b = new S(), h = new S(), p = new S(), w = 0, I = new S();
549
- a("worldPosition", l), a("worldPositionStart", c), a("worldQuaternion", d), a("worldQuaternionStart", u), a("cameraPosition", A), a("cameraQuaternion", m), a("pointStart", b), a("pointEnd", h), a("rotationAxis", p), a("rotationAngle", w), a("eye", I), this._offset = new S(), this._startNorm = new S(), this._endNorm = new S(), this._cameraScale = new S(), this._parentPosition = new S(), this._parentQuaternion = new me(), this._parentQuaternionInv = new me(), this._parentScale = new S(), this._worldScaleStart = new S(), this._worldQuaternionInv = new me(), this._worldScale = new S(), this._positionStart = new S(), this._quaternionStart = new me(), this._scaleStart = new S(), this._getPointer = ar.bind(this), this._onPointerDown = cr.bind(this), this._onPointerHover = lr.bind(this), this._onPointerMove = ur.bind(this), this._onPointerUp = dr.bind(this), t !== null && this.connect(t);
548
+ const l = new S(), c = new S(), f = new me(), u = new me(), A = new S(), m = new me(), b = new S(), h = new S(), p = new S(), C = 0, v = new S();
549
+ a("worldPosition", l), a("worldPositionStart", c), a("worldQuaternion", f), a("worldQuaternionStart", u), a("cameraPosition", A), a("cameraQuaternion", m), a("pointStart", b), a("pointEnd", h), a("rotationAxis", p), a("rotationAngle", C), a("eye", v), this._offset = new S(), this._startNorm = new S(), this._endNorm = new S(), this._cameraScale = new S(), this._parentPosition = new S(), this._parentQuaternion = new me(), this._parentQuaternionInv = new me(), this._parentScale = new S(), this._worldScaleStart = new S(), this._worldQuaternionInv = new me(), this._worldScale = new S(), this._positionStart = new S(), this._quaternionStart = new me(), this._scaleStart = new S(), this._getPointer = ar.bind(this), this._onPointerDown = cr.bind(this), this._onPointerHover = lr.bind(this), this._onPointerMove = ur.bind(this), this._onPointerUp = dr.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";
@@ -565,14 +565,14 @@ class rr extends Bn {
565
565
  }
566
566
  pointerHover(e) {
567
567
  if (this.object === void 0 || this.dragging === !0) return;
568
- e !== null && _e.setFromCamera(e, this.camera);
569
- const t = ws(this._gizmo.picker[this.mode], _e);
568
+ e !== null && $e.setFromCamera(e, this.camera);
569
+ const t = ws(this._gizmo.picker[this.mode], $e);
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
- e !== null && _e.setFromCamera(e, this.camera);
575
- const t = ws(this._plane, _e, !0);
574
+ e !== null && $e.setFromCamera(e, this.camera);
575
+ const t = ws(this._plane, $e, !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, hn.mode = this.mode, this.dispatchEvent(hn);
577
577
  }
578
578
  }
@@ -580,8 +580,8 @@ class rr extends Bn {
580
580
  const t = this.axis, n = this.mode, s = this.object;
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
- e !== null && _e.setFromCamera(e, this.camera);
584
- const o = ws(this._plane, _e, !0);
583
+ e !== null && $e.setFromCamera(e, this.camera);
584
+ const o = ws(this._plane, $e, !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(ie.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(pe.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(pe.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));
@@ -637,7 +637,7 @@ class rr extends Bn {
637
637
  * @returns {Raycaster} The internal raycaster.
638
638
  */
639
639
  getRaycaster() {
640
- return _e;
640
+ return $e;
641
641
  }
642
642
  /**
643
643
  * Returns the transformation mode.
@@ -749,7 +749,7 @@ function ws(r, e, t) {
749
749
  return n[s];
750
750
  return !1;
751
751
  }
752
- const Wt = new fo(), se = new S(0, 1, 0), mn = new S(0, 0, 0), gn = new Ce(), Gt = new me(), $t = new me(), Ne = new S(), yn = new Ce(), wt = new S(1, 0, 0), et = new S(0, 1, 0), vt = new S(0, 0, 1), Bt = new S(), bt = new S(), xt = new S();
752
+ const Gt = new fo(), se = new S(0, 1, 0), mn = new S(0, 0, 0), gn = new Ce(), Bt = new me(), es = new me(), Ne = new S(), yn = new Ce(), wt = new S(1, 0, 0), tt = new S(0, 1, 0), vt = new S(0, 0, 1), Xt = new S(), bt = new S(), xt = new S();
753
753
  class fr extends gt {
754
754
  constructor(e) {
755
755
  super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
@@ -794,8 +794,8 @@ class hr extends gt {
794
794
  l.color.setHex(16711680), l.opacity = 0.5;
795
795
  const c = e.clone();
796
796
  c.color.setHex(65280), c.opacity = 0.5;
797
- const d = e.clone();
798
- d.color.setHex(255), d.opacity = 0.5;
797
+ const f = e.clone();
798
+ f.color.setHex(255), f.opacity = 0.5;
799
799
  const u = e.clone();
800
800
  u.opacity = 0.25;
801
801
  const A = e.clone();
@@ -810,46 +810,46 @@ class hr extends gt {
810
810
  active: m,
811
811
  xAxisTransparent: l,
812
812
  yAxisTransparent: c,
813
- zAxisTransparent: d,
813
+ zAxisTransparent: f,
814
814
  activeTransparent: A
815
815
  };
816
816
  const h = new ge(0, 0.04, 0.1, 12);
817
817
  h.translate(0, 0.05, 0);
818
818
  const p = new Ae(0.08, 0.08, 0.08);
819
819
  p.translate(0, 0.04, 0);
820
- const w = new rt();
821
- w.setAttribute("position", new ke([0, 0, 0, 1, 0, 0], 3));
822
- const I = new ge(75e-4, 75e-4, 0.5, 3);
823
- I.translate(0, 0.25, 0);
824
- function x(N, z) {
820
+ const C = new rt();
821
+ C.setAttribute("position", new ke([0, 0, 0, 1, 0, 0], 3));
822
+ const v = new ge(75e-4, 75e-4, 0.5, 3);
823
+ v.translate(0, 0.25, 0);
824
+ function w(N, z) {
825
825
  const G = new yt(N, 75e-4, 3, 64, z * Math.PI * 2);
826
826
  return G.rotateY(Math.PI / 2), G.rotateX(Math.PI / 2), G;
827
827
  }
828
- function f() {
828
+ function d() {
829
829
  const N = new rt();
830
830
  return N.setAttribute("position", new ke([0, 0, 0, 1, 1, 1], 3)), N;
831
831
  }
832
- const v = {
832
+ const x = {
833
833
  X: [
834
834
  [new L(h, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
835
835
  [new L(h, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]],
836
- [new L(I, i), [0, 0, 0], [0, 0, -Math.PI / 2]]
836
+ [new L(v, i), [0, 0, 0], [0, 0, -Math.PI / 2]]
837
837
  ],
838
838
  Y: [
839
839
  [new L(h, o), [0, 0.5, 0]],
840
840
  [new L(h, o), [0, -0.5, 0], [Math.PI, 0, 0]],
841
- [new L(I, o)]
841
+ [new L(v, o)]
842
842
  ],
843
843
  Z: [
844
844
  [new L(h, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
845
845
  [new L(h, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]],
846
- [new L(I, a), null, [Math.PI / 2, 0, 0]]
846
+ [new L(v, a), null, [Math.PI / 2, 0, 0]]
847
847
  ],
848
848
  XYZ: [
849
- [new L(new Ut(0.1, 0), u), [0, 0, 0]]
849
+ [new L(new zt(0.1, 0), u), [0, 0, 0]]
850
850
  ],
851
851
  XY: [
852
- [new L(new Ae(0.15, 0.15, 0.01), d), [0.15, 0.15, 0]]
852
+ [new L(new Ae(0.15, 0.15, 0.01), f), [0.15, 0.15, 0]]
853
853
  ],
854
854
  YZ: [
855
855
  [new L(new Ae(0.15, 0.15, 0.01), l), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
@@ -871,7 +871,7 @@ class hr extends gt {
871
871
  [new L(new ge(0.2, 0, 0.6, 4), n), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
872
872
  ],
873
873
  XYZ: [
874
- [new L(new Ut(0.2, 0), n)]
874
+ [new L(new zt(0.2, 0), n)]
875
875
  ],
876
876
  XY: [
877
877
  [new L(new Ae(0.2, 0.2, 0.01), n), [0.15, 0.15, 0]]
@@ -884,42 +884,42 @@ class hr extends gt {
884
884
  ]
885
885
  }, D = {
886
886
  START: [
887
- [new L(new Ut(0.01, 2), s), null, null, null, "helper"]
887
+ [new L(new zt(0.01, 2), s), null, null, null, "helper"]
888
888
  ],
889
889
  END: [
890
- [new L(new Ut(0.01, 2), s), null, null, null, "helper"]
890
+ [new L(new zt(0.01, 2), s), null, null, null, "helper"]
891
891
  ],
892
892
  DELTA: [
893
- [new We(f(), s), null, null, null, "helper"]
893
+ [new We(d(), s), null, null, null, "helper"]
894
894
  ],
895
895
  X: [
896
- [new We(w, s), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
896
+ [new We(C, s), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
897
897
  ],
898
898
  Y: [
899
- [new We(w, s), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
899
+ [new We(C, s), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
900
900
  ],
901
901
  Z: [
902
- [new We(w, s), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
902
+ [new We(C, s), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
903
903
  ]
904
904
  }, E = {
905
905
  XYZE: [
906
- [new L(x(0.5, 1), b), null, [0, Math.PI / 2, 0]]
906
+ [new L(w(0.5, 1), b), null, [0, Math.PI / 2, 0]]
907
907
  ],
908
908
  X: [
909
- [new L(x(0.5, 0.5), i)]
909
+ [new L(w(0.5, 0.5), i)]
910
910
  ],
911
911
  Y: [
912
- [new L(x(0.5, 0.5), o), null, [0, 0, -Math.PI / 2]]
912
+ [new L(w(0.5, 0.5), o), null, [0, 0, -Math.PI / 2]]
913
913
  ],
914
914
  Z: [
915
- [new L(x(0.5, 0.5), a), null, [0, Math.PI / 2, 0]]
915
+ [new L(w(0.5, 0.5), a), null, [0, Math.PI / 2, 0]]
916
916
  ],
917
917
  E: [
918
- [new L(x(0.75, 1), A), null, [0, Math.PI / 2, 0]]
918
+ [new L(w(0.75, 1), A), null, [0, Math.PI / 2, 0]]
919
919
  ]
920
920
  }, U = {
921
921
  AXIS: [
922
- [new We(w, s), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
922
+ [new We(C, s), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
923
923
  ]
924
924
  }, Z = {
925
925
  XYZE: [
@@ -940,21 +940,21 @@ class hr extends gt {
940
940
  }, _ = {
941
941
  X: [
942
942
  [new L(p, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
943
- [new L(I, i), [0, 0, 0], [0, 0, -Math.PI / 2]],
943
+ [new L(v, i), [0, 0, 0], [0, 0, -Math.PI / 2]],
944
944
  [new L(p, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]]
945
945
  ],
946
946
  Y: [
947
947
  [new L(p, o), [0, 0.5, 0]],
948
- [new L(I, o)],
948
+ [new L(v, o)],
949
949
  [new L(p, o), [0, -0.5, 0], [0, 0, Math.PI]]
950
950
  ],
951
951
  Z: [
952
952
  [new L(p, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
953
- [new L(I, a), [0, 0, 0], [Math.PI / 2, 0, 0]],
953
+ [new L(v, a), [0, 0, 0], [Math.PI / 2, 0, 0]],
954
954
  [new L(p, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]]
955
955
  ],
956
956
  XY: [
957
- [new L(new Ae(0.15, 0.15, 0.01), d), [0.15, 0.15, 0]]
957
+ [new L(new Ae(0.15, 0.15, 0.01), f), [0.15, 0.15, 0]]
958
958
  ],
959
959
  YZ: [
960
960
  [new L(new Ae(0.15, 0.15, 0.01), l), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
@@ -992,13 +992,13 @@ class hr extends gt {
992
992
  ]
993
993
  }, $ = {
994
994
  X: [
995
- [new We(w, s), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
995
+ [new We(C, s), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
996
996
  ],
997
997
  Y: [
998
- [new We(w, s), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
998
+ [new We(C, s), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
999
999
  ],
1000
1000
  Z: [
1001
- [new We(w, s), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
1001
+ [new We(C, s), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
1002
1002
  ]
1003
1003
  };
1004
1004
  function Q(N) {
@@ -1012,11 +1012,11 @@ class hr extends gt {
1012
1012
  }
1013
1013
  return z;
1014
1014
  }
1015
- this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = Q(v)), this.add(this.gizmo.rotate = Q(E)), this.add(this.gizmo.scale = Q(_)), this.add(this.picker.translate = Q(M)), this.add(this.picker.rotate = Q(Z)), this.add(this.picker.scale = Q(ne)), this.add(this.helper.translate = Q(D)), this.add(this.helper.rotate = Q(U)), this.add(this.helper.scale = Q($)), 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 = Q(x)), this.add(this.gizmo.rotate = Q(E)), this.add(this.gizmo.scale = Q(_)), this.add(this.picker.translate = Q(M)), this.add(this.picker.rotate = Q(Z)), this.add(this.picker.scale = Q(ne)), this.add(this.helper.translate = Q(D)), this.add(this.helper.rotate = Q(U)), this.add(this.helper.scale = Q($)), 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) {
1019
- const n = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : $t;
1019
+ const n = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : es;
1020
1020
  this.gizmo.translate.visible = this.mode === "translate", this.gizmo.rotate.visible = this.mode === "rotate", this.gizmo.scale.visible = this.mode === "scale", this.helper.translate.visible = this.mode === "translate", this.helper.rotate.visible = this.mode === "rotate", this.helper.scale.visible = this.mode === "scale";
1021
1021
  let s = [];
1022
1022
  s = s.concat(this.picker[this.mode].children), s = s.concat(this.gizmo[this.mode].children), s = s.concat(this.helper[this.mode].children);
@@ -1025,10 +1025,10 @@ class hr extends gt {
1025
1025
  o.visible = !0, o.rotation.set(0, 0, 0), o.position.copy(this.worldPosition);
1026
1026
  let a;
1027
1027
  if (this.camera.isOrthographicCamera ? a = (this.camera.top - this.camera.bottom) / this.camera.zoom : a = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), o.scale.set(1, 1, 1).multiplyScalar(a * this.size / 4), o.tag === "helper") {
1028
- o.visible = !1, o.name === "AXIS" ? (o.visible = !!this.axis, this.axis === "X" && (ie.setFromEuler(Wt.set(0, 0, 0)), o.quaternion.copy(n).multiply(ie), Math.abs(se.copy(wt).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Y" && (ie.setFromEuler(Wt.set(0, 0, Math.PI / 2)), o.quaternion.copy(n).multiply(ie), Math.abs(se.copy(et).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Z" && (ie.setFromEuler(Wt.set(0, Math.PI / 2, 0)), o.quaternion.copy(n).multiply(ie), Math.abs(se.copy(vt).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "XYZE" && (ie.setFromEuler(Wt.set(0, Math.PI / 2, 0)), se.copy(this.rotationAxis), o.quaternion.setFromRotationMatrix(gn.lookAt(mn, se, et)), o.quaternion.multiply(ie), o.visible = this.dragging), this.axis === "E" && (o.visible = !1)) : o.name === "START" ? (o.position.copy(this.worldPositionStart), o.visible = this.dragging) : o.name === "END" ? (o.position.copy(this.worldPosition), o.visible = this.dragging) : o.name === "DELTA" ? (o.position.copy(this.worldPositionStart), o.quaternion.copy(this.worldQuaternionStart), pe.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), pe.applyQuaternion(this.worldQuaternionStart.clone().invert()), o.scale.copy(pe), o.visible = this.dragging) : (o.quaternion.copy(n), this.dragging ? o.position.copy(this.worldPositionStart) : o.position.copy(this.worldPosition), this.axis && (o.visible = this.axis.search(o.name) !== -1));
1028
+ o.visible = !1, o.name === "AXIS" ? (o.visible = !!this.axis, this.axis === "X" && (ie.setFromEuler(Gt.set(0, 0, 0)), o.quaternion.copy(n).multiply(ie), Math.abs(se.copy(wt).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Y" && (ie.setFromEuler(Gt.set(0, 0, Math.PI / 2)), o.quaternion.copy(n).multiply(ie), Math.abs(se.copy(tt).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Z" && (ie.setFromEuler(Gt.set(0, Math.PI / 2, 0)), o.quaternion.copy(n).multiply(ie), Math.abs(se.copy(vt).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "XYZE" && (ie.setFromEuler(Gt.set(0, Math.PI / 2, 0)), se.copy(this.rotationAxis), o.quaternion.setFromRotationMatrix(gn.lookAt(mn, se, tt)), o.quaternion.multiply(ie), o.visible = this.dragging), this.axis === "E" && (o.visible = !1)) : o.name === "START" ? (o.position.copy(this.worldPositionStart), o.visible = this.dragging) : o.name === "END" ? (o.position.copy(this.worldPosition), o.visible = this.dragging) : o.name === "DELTA" ? (o.position.copy(this.worldPositionStart), o.quaternion.copy(this.worldQuaternionStart), pe.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), pe.applyQuaternion(this.worldQuaternionStart.clone().invert()), o.scale.copy(pe), o.visible = this.dragging) : (o.quaternion.copy(n), this.dragging ? o.position.copy(this.worldPositionStart) : o.position.copy(this.worldPosition), this.axis && (o.visible = this.axis.search(o.name) !== -1));
1029
1029
  continue;
1030
1030
  }
1031
- o.quaternion.copy(n), this.mode === "translate" || this.mode === "scale" ? (o.name === "X" && Math.abs(se.copy(wt).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Y" && Math.abs(se.copy(et).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Z" && Math.abs(se.copy(vt).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XY" && Math.abs(se.copy(vt).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "YZ" && Math.abs(se.copy(wt).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XZ" && Math.abs(se.copy(et).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1)) : this.mode === "rotate" && (Gt.copy(n), se.copy(this.eye).applyQuaternion(ie.copy(n).invert()), o.name.search("E") !== -1 && o.quaternion.setFromRotationMatrix(gn.lookAt(this.eye, mn, et)), o.name === "X" && (ie.setFromAxisAngle(wt, Math.atan2(-se.y, se.z)), ie.multiplyQuaternions(Gt, ie), o.quaternion.copy(ie)), o.name === "Y" && (ie.setFromAxisAngle(et, Math.atan2(se.x, se.z)), ie.multiplyQuaternions(Gt, ie), o.quaternion.copy(ie)), o.name === "Z" && (ie.setFromAxisAngle(vt, Math.atan2(se.y, se.x)), ie.multiplyQuaternions(Gt, ie), o.quaternion.copy(ie))), o.visible = o.visible && (o.name.indexOf("X") === -1 || this.showX), o.visible = o.visible && (o.name.indexOf("Y") === -1 || this.showY), o.visible = o.visible && (o.name.indexOf("Z") === -1 || this.showZ), o.visible = o.visible && (o.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), o.visible = o.visible && (o.name.indexOf("XY") === -1 || this.showXY), o.visible = o.visible && (o.name.indexOf("YZ") === -1 || this.showYZ), o.visible = o.visible && (o.name.indexOf("XZ") === -1 || this.showXZ), o.material._color = o.material._color || o.material.color.clone(), o.material._opacity = o.material._opacity || o.material.opacity, o.material.color.copy(o.material._color), o.material.opacity = o.material._opacity, this.enabled && this.axis && (o.name === this.axis ? (o.material.color.copy(this.materialLib.active.color), o.material.opacity = 1) : this.axis.split("").some(function(l) {
1031
+ o.quaternion.copy(n), this.mode === "translate" || this.mode === "scale" ? (o.name === "X" && Math.abs(se.copy(wt).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Y" && Math.abs(se.copy(tt).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Z" && Math.abs(se.copy(vt).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XY" && Math.abs(se.copy(vt).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "YZ" && Math.abs(se.copy(wt).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XZ" && Math.abs(se.copy(tt).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1)) : this.mode === "rotate" && (Bt.copy(n), se.copy(this.eye).applyQuaternion(ie.copy(n).invert()), o.name.search("E") !== -1 && o.quaternion.setFromRotationMatrix(gn.lookAt(this.eye, mn, tt)), o.name === "X" && (ie.setFromAxisAngle(wt, Math.atan2(-se.y, se.z)), ie.multiplyQuaternions(Bt, ie), o.quaternion.copy(ie)), o.name === "Y" && (ie.setFromAxisAngle(tt, Math.atan2(se.x, se.z)), ie.multiplyQuaternions(Bt, ie), o.quaternion.copy(ie)), o.name === "Z" && (ie.setFromAxisAngle(vt, Math.atan2(se.y, se.x)), ie.multiplyQuaternions(Bt, ie), o.quaternion.copy(ie))), o.visible = o.visible && (o.name.indexOf("X") === -1 || this.showX), o.visible = o.visible && (o.name.indexOf("Y") === -1 || this.showY), o.visible = o.visible && (o.name.indexOf("Z") === -1 || this.showZ), o.visible = o.visible && (o.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), o.visible = o.visible && (o.name.indexOf("XY") === -1 || this.showXY), o.visible = o.visible && (o.name.indexOf("YZ") === -1 || this.showYZ), o.visible = o.visible && (o.name.indexOf("XZ") === -1 || this.showXZ), o.material._color = o.material._color || o.material.color.clone(), o.material._opacity = o.material._opacity || o.material.opacity, o.material.color.copy(o.material._color), o.material.opacity = o.material._opacity, this.enabled && this.axis && (o.name === this.axis ? (o.material.color.copy(this.materialLib.active.color), o.material.opacity = 1) : this.axis.split("").some(function(l) {
1032
1032
  return o.name === l;
1033
1033
  }) && (o.material.color.copy(this.materialLib.active.color), o.material.opacity = 1));
1034
1034
  }
@@ -1044,12 +1044,12 @@ class pr extends L {
1044
1044
  }
1045
1045
  updateMatrixWorld(e) {
1046
1046
  let t = this.space;
1047
- switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Bt.copy(wt).applyQuaternion(t === "local" ? this.worldQuaternion : $t), bt.copy(et).applyQuaternion(t === "local" ? this.worldQuaternion : $t), xt.copy(vt).applyQuaternion(t === "local" ? this.worldQuaternion : $t), se.copy(bt), this.mode) {
1047
+ switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Xt.copy(wt).applyQuaternion(t === "local" ? this.worldQuaternion : es), bt.copy(tt).applyQuaternion(t === "local" ? this.worldQuaternion : es), xt.copy(vt).applyQuaternion(t === "local" ? this.worldQuaternion : es), se.copy(bt), this.mode) {
1048
1048
  case "translate":
1049
1049
  case "scale":
1050
1050
  switch (this.axis) {
1051
1051
  case "X":
1052
- se.copy(this.eye).cross(Bt), Ne.copy(Bt).cross(se);
1052
+ se.copy(this.eye).cross(Xt), Ne.copy(Xt).cross(se);
1053
1053
  break;
1054
1054
  case "Y":
1055
1055
  se.copy(this.eye).cross(bt), Ne.copy(bt).cross(se);
@@ -1061,7 +1061,7 @@ class pr extends L {
1061
1061
  Ne.copy(xt);
1062
1062
  break;
1063
1063
  case "YZ":
1064
- Ne.copy(Bt);
1064
+ Ne.copy(Xt);
1065
1065
  break;
1066
1066
  case "XZ":
1067
1067
  se.copy(xt), Ne.copy(bt);
@@ -1117,7 +1117,7 @@ const Ar = {
1117
1117
  }`
1118
1118
  )
1119
1119
  };
1120
- class jt {
1120
+ class Ft {
1121
1121
  /**
1122
1122
  * Constructs a new pass.
1123
1123
  */
@@ -1200,7 +1200,7 @@ class ai {
1200
1200
  this._mesh.material = e;
1201
1201
  }
1202
1202
  }
1203
- class br extends jt {
1203
+ class br extends Ft {
1204
1204
  /**
1205
1205
  * Constructs a new shader pass.
1206
1206
  *
@@ -1240,7 +1240,7 @@ class br extends jt {
1240
1240
  this.material.dispose(), this._fsQuad.dispose();
1241
1241
  }
1242
1242
  }
1243
- class bn extends jt {
1243
+ class bn extends Ft {
1244
1244
  /**
1245
1245
  * Constructs a new mask pass.
1246
1246
  *
@@ -1268,7 +1268,7 @@ class bn extends jt {
1268
1268
  this.inverse ? (o = 0, a = 1) : (o = 1, a = 0), i.buffers.stencil.setTest(!0), i.buffers.stencil.setOp(s.REPLACE, s.REPLACE, s.REPLACE), i.buffers.stencil.setFunc(s.ALWAYS, o, 4294967295), i.buffers.stencil.setClear(a), i.buffers.stencil.setLocked(!0), e.setRenderTarget(n), this.clear && e.clear(), e.render(this.scene, this.camera), e.setRenderTarget(t), this.clear && e.clear(), e.render(this.scene, this.camera), i.buffers.color.setLocked(!1), i.buffers.depth.setLocked(!1), i.buffers.color.setMask(!0), i.buffers.depth.setMask(!0), i.buffers.stencil.setLocked(!1), i.buffers.stencil.setFunc(s.EQUAL, 1, 4294967295), i.buffers.stencil.setOp(s.KEEP, s.KEEP, s.KEEP), i.buffers.stencil.setLocked(!0);
1269
1269
  }
1270
1270
  }
1271
- class xr extends jt {
1271
+ class xr extends Ft {
1272
1272
  /**
1273
1273
  * Constructs a new clear mask pass.
1274
1274
  */
@@ -1301,7 +1301,7 @@ class Ir {
1301
1301
  */
1302
1302
  constructor(e, t) {
1303
1303
  if (this.renderer = e, this._pixelRatio = e.getPixelRatio(), t === void 0) {
1304
- const n = e.getSize(new de());
1304
+ const n = e.getSize(new fe());
1305
1305
  this._width = n.width, this._height = n.height, t = new Vn(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: Yn }), t.texture.name = "EffectComposer.rt1";
1306
1306
  } else
1307
1307
  this._width = t.width, this._height = t.height;
@@ -1385,7 +1385,7 @@ class Ir {
1385
1385
  */
1386
1386
  reset(e) {
1387
1387
  if (e === void 0) {
1388
- const t = this.renderer.getSize(new de());
1388
+ const t = this.renderer.getSize(new fe());
1389
1389
  this._pixelRatio = this.renderer.getPixelRatio(), this._width = t.width, this._height = t.height, e = this.renderTarget1.clone(), e.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
1390
1390
  }
1391
1391
  this.renderTarget1.dispose(), this.renderTarget2.dispose(), this.renderTarget1 = e, this.renderTarget2 = e.clone(), this.writeBuffer = this.renderTarget1, this.readBuffer = this.renderTarget2;
@@ -1421,7 +1421,7 @@ class Ir {
1421
1421
  this.renderTarget1.dispose(), this.renderTarget2.dispose(), this.copyPass.dispose();
1422
1422
  }
1423
1423
  }
1424
- class Cr extends jt {
1424
+ class Cr extends Ft {
1425
1425
  /**
1426
1426
  * Constructs a new render pass.
1427
1427
  *
@@ -1453,7 +1453,7 @@ class Cr extends jt {
1453
1453
  this.overrideMaterial !== null && (o = this.scene.overrideMaterial, this.scene.overrideMaterial = this.overrideMaterial), this.clearColor !== null && (e.getClearColor(this._oldClearColor), e.setClearColor(this.clearColor, e.getClearAlpha())), this.clearAlpha !== null && (i = e.getClearAlpha(), e.setClearAlpha(this.clearAlpha)), this.clearDepth == !0 && e.clearDepth(), e.setRenderTarget(this.renderToScreen ? null : n), this.clear === !0 && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), e.render(this.scene, this.camera), this.clearColor !== null && e.setClearColor(this._oldClearColor), this.clearAlpha !== null && e.setClearAlpha(i), this.overrideMaterial !== null && (this.scene.overrideMaterial = o), e.autoClear = s;
1454
1454
  }
1455
1455
  }
1456
- const Xt = {
1456
+ const qt = {
1457
1457
  name: "OutputShader",
1458
1458
  uniforms: {
1459
1459
  tDiffuse: { value: null },
@@ -1539,16 +1539,16 @@ const Xt = {
1539
1539
  }`
1540
1540
  )
1541
1541
  };
1542
- class wr extends jt {
1542
+ class wr extends Ft {
1543
1543
  /**
1544
1544
  * Constructs a new output pass.
1545
1545
  */
1546
1546
  constructor() {
1547
- super(), this.isOutputPass = !0, this.uniforms = as.clone(Xt.uniforms), this.material = new mo({
1548
- name: Xt.name,
1547
+ super(), this.isOutputPass = !0, this.uniforms = as.clone(qt.uniforms), this.material = new mo({
1548
+ name: qt.name,
1549
1549
  uniforms: this.uniforms,
1550
- vertexShader: Xt.vertexShader,
1551
- fragmentShader: Xt.fragmentShader
1550
+ vertexShader: qt.vertexShader,
1551
+ fragmentShader: qt.fragmentShader
1552
1552
  }), this._fsQuad = new ai(this.material), this._outputColorSpace = null, this._toneMapping = null;
1553
1553
  }
1554
1554
  /**
@@ -1580,7 +1580,7 @@ class vr extends gt {
1580
1580
  * @param {HTMLElement} [element] - The DOM element.
1581
1581
  */
1582
1582
  constructor(e = document.createElement("div")) {
1583
- super(), this.isCSS2DObject = !0, this.element = e, this.element.style.position = "absolute", this.element.style.userSelect = "none", this.element.setAttribute("draggable", !1), this.center = new de(0.5, 0.5), this.addEventListener("removed", function() {
1583
+ super(), this.isCSS2DObject = !0, this.element = e, this.element.style.position = "absolute", this.element.style.userSelect = "none", this.element.setAttribute("draggable", !1), this.center = new fe(0.5, 0.5), this.addEventListener("removed", function() {
1584
1584
  this.traverse(function(t) {
1585
1585
  t.element && t.element instanceof t.element.ownerDocument.defaultView.Element && t.element.parentNode !== null && t.element.remove();
1586
1586
  });
@@ -1609,7 +1609,7 @@ class Mr {
1609
1609
  height: s
1610
1610
  };
1611
1611
  }, this.render = function(b, h) {
1612
- b.matrixWorldAutoUpdate === !0 && b.updateMatrixWorld(), h.parent === null && h.matrixWorldAutoUpdate === !0 && h.updateMatrixWorld(), xn.copy(h.matrixWorldInverse), In.multiplyMatrices(h.projectionMatrix, xn), d(b, b, h), this.sortObjects && m(b);
1612
+ b.matrixWorldAutoUpdate === !0 && b.updateMatrixWorld(), h.parent === null && h.matrixWorldAutoUpdate === !0 && h.updateMatrixWorld(), xn.copy(h.matrixWorldInverse), In.multiplyMatrices(h.projectionMatrix, xn), f(b, b, h), this.sortObjects && m(b);
1613
1613
  }, this.setSize = function(b, h) {
1614
1614
  n = b, s = h, i = n / 2, o = s / 2, l.style.width = b + "px", l.style.height = h + "px";
1615
1615
  };
@@ -1618,22 +1618,22 @@ class Mr {
1618
1618
  for (let h = 0, p = b.children.length; h < p; h++)
1619
1619
  c(b.children[h]);
1620
1620
  }
1621
- function d(b, h, p) {
1621
+ function f(b, h, p) {
1622
1622
  if (b.visible === !1) {
1623
1623
  c(b);
1624
1624
  return;
1625
1625
  }
1626
1626
  if (b.isCSS2DObject) {
1627
1627
  ut.setFromMatrixPosition(b.matrixWorld), ut.applyMatrix4(In);
1628
- const w = ut.z >= -1 && ut.z <= 1 && b.layers.test(p.layers) === !0, I = b.element;
1629
- I.style.display = w === !0 ? "" : "none", w === !0 && (b.onBeforeRender(t, h, p), I.style.transform = "translate(" + -100 * b.center.x + "%," + -100 * b.center.y + "%)translate(" + (ut.x * i + i) + "px," + (-ut.y * o + o) + "px)", I.parentNode !== l && l.appendChild(I), b.onAfterRender(t, h, p));
1630
- const x = {
1628
+ const C = ut.z >= -1 && ut.z <= 1 && b.layers.test(p.layers) === !0, v = b.element;
1629
+ v.style.display = C === !0 ? "" : "none", C === !0 && (b.onBeforeRender(t, h, p), v.style.transform = "translate(" + -100 * b.center.x + "%," + -100 * b.center.y + "%)translate(" + (ut.x * i + i) + "px," + (-ut.y * o + o) + "px)", v.parentNode !== l && l.appendChild(v), b.onAfterRender(t, h, p));
1630
+ const w = {
1631
1631
  distanceToCameraSquared: u(p, b)
1632
1632
  };
1633
- a.objects.set(b, x);
1633
+ a.objects.set(b, w);
1634
1634
  }
1635
- for (let w = 0, I = b.children.length; w < I; w++)
1636
- d(b.children[w], h, p);
1635
+ for (let C = 0, v = b.children.length; C < v; C++)
1636
+ f(b.children[C], h, p);
1637
1637
  }
1638
1638
  function u(b, h) {
1639
1639
  return Cn.setFromMatrixPosition(b.matrixWorld), wn.setFromMatrixPosition(h.matrixWorld), Cn.distanceToSquared(wn);
@@ -1645,31 +1645,31 @@ class Mr {
1645
1645
  }), h;
1646
1646
  }
1647
1647
  function m(b) {
1648
- const h = A(b).sort(function(w, I) {
1649
- if (w.renderOrder !== I.renderOrder)
1650
- return I.renderOrder - w.renderOrder;
1651
- const x = a.objects.get(w).distanceToCameraSquared, f = a.objects.get(I).distanceToCameraSquared;
1652
- return x - f;
1648
+ const h = A(b).sort(function(C, v) {
1649
+ if (C.renderOrder !== v.renderOrder)
1650
+ return v.renderOrder - C.renderOrder;
1651
+ const w = a.objects.get(C).distanceToCameraSquared, d = a.objects.get(v).distanceToCameraSquared;
1652
+ return w - d;
1653
1653
  }), p = h.length;
1654
- for (let w = 0, I = h.length; w < I; w++)
1655
- h[w].element.style.zIndex = p - w;
1654
+ for (let C = 0, v = h.length; C < v; C++)
1655
+ h[C].element.style.zIndex = p - C;
1656
1656
  }
1657
1657
  }
1658
1658
  }
1659
1659
  const Tr = 1920, Er = 13, Dr = 0.6, Or = 4, Rr = window.innerWidth / Tr, Pr = Math.min(Math.max(Rr, Dr), Or), Sr = Math.round(Er * Pr);
1660
1660
  document.documentElement.style.setProperty("--sl-css2d-base-font-size", Sr + "px");
1661
- const qt = {
1661
+ const Vt = {
1662
1662
  panel: "sl-css2d-data-panel",
1663
1663
  title: "sl-css2d-data-panel-title",
1664
1664
  list: "sl-css2d-data-panel-list",
1665
1665
  item: "sl-css2d-data-panel-item"
1666
- }, Lr = "--sl-css2d-base-font-size", Nr = 15, Vt = { top: 0, right: 2.7, bottom: 1.8, left: 0.9 }, Yt = (r) => `animation:sl-breath ${Nr}s ease-in-out ${r}s infinite backwards;`, ht = class ht {
1666
+ }, Lr = "--sl-css2d-base-font-size", Nr = 15, Yt = { top: 0, right: 2.7, bottom: 1.8, left: 0.9 }, Kt = (r) => `animation:sl-breath ${Nr}s ease-in-out ${r}s infinite backwards;`, ht = class ht {
1667
1667
  constructor(e = {}) {
1668
- Je(this, "css2dObject", null);
1669
- Je(this, "container", null);
1670
- Je(this, "options");
1671
- Je(this, "attachedObject", null);
1672
- Je(this, "_visible", !0);
1668
+ _e(this, "css2dObject", null);
1669
+ _e(this, "container", null);
1670
+ _e(this, "options");
1671
+ _e(this, "attachedObject", null);
1672
+ _e(this, "_visible", !0);
1673
1673
  this.options = {
1674
1674
  title: e.title || "",
1675
1675
  items: e.items || [],
@@ -1703,7 +1703,7 @@ const qt = {
1703
1703
  }
1704
1704
  buildPanel() {
1705
1705
  const e = this.options, t = document.createElement("div");
1706
- t.className = `${qt.panel} ${e.className}`.trim();
1706
+ t.className = `${Vt.panel} ${e.className}`.trim();
1707
1707
  let n = e.backgroundColor || "rgba(0, 12, 30, 0.55)";
1708
1708
  if (n.includes("gradient")) {
1709
1709
  const c = n.match(/rgba?\([^)]+\)/);
@@ -1732,21 +1732,21 @@ const qt = {
1732
1732
  const s = "0.23em", i = "#00e5ff", o = `0 0 0.46em ${i}, 0 0 1.08em ${i}`;
1733
1733
  t.appendChild(this.createEl(
1734
1734
  "div",
1735
- `position:absolute; top:0.92em; left:3.08em; right:3.08em; height:${s}; background:${i}; box-shadow:${o}; border-radius:0.15em; pointer-events:none; z-index:1; ${Yt(Vt.top)}`
1735
+ `position:absolute; top:0.92em; left:3.08em; right:3.08em; height:${s}; background:${i}; box-shadow:${o}; border-radius:0.15em; pointer-events:none; z-index:1; ${Kt(Yt.top)}`
1736
1736
  )), t.appendChild(this.createEl(
1737
1737
  "div",
1738
- `position:absolute; bottom:0.92em; left:3.08em; right:3.08em; height:${s}; background:${i}; box-shadow:${o}; border-radius:0.15em; pointer-events:none; z-index:1; ${Yt(Vt.bottom)}`
1738
+ `position:absolute; bottom:0.92em; left:3.08em; right:3.08em; height:${s}; background:${i}; box-shadow:${o}; border-radius:0.15em; pointer-events:none; z-index:1; ${Kt(Yt.bottom)}`
1739
1739
  )), t.appendChild(this.createEl(
1740
1740
  "div",
1741
- `position:absolute; left:0.92em; top:3.08em; bottom:3.08em; width:${s}; background:${i}; box-shadow:${o}; border-radius:0.15em; pointer-events:none; z-index:1; ${Yt(Vt.left)}`
1741
+ `position:absolute; left:0.92em; top:3.08em; bottom:3.08em; width:${s}; background:${i}; box-shadow:${o}; border-radius:0.15em; pointer-events:none; z-index:1; ${Kt(Yt.left)}`
1742
1742
  )), t.appendChild(this.createEl(
1743
1743
  "div",
1744
- `position:absolute; right:0.92em; top:3.08em; bottom:3.08em; width:${s}; background:${i}; box-shadow:${o}; border-radius:0.15em; pointer-events:none; z-index:1; ${Yt(Vt.right)}`
1744
+ `position:absolute; right:0.92em; top:3.08em; bottom:3.08em; width:${s}; background:${i}; box-shadow:${o}; border-radius:0.15em; pointer-events:none; z-index:1; ${Kt(Yt.right)}`
1745
1745
  ));
1746
1746
  const a = `position:absolute; width:0.62em; height:0.62em; border-radius:50%; background:#ffffff; box-shadow:0 0 0.46em ${i}, 0 0 0.92em ${i}; pointer-events:none; z-index:2;`;
1747
1747
  if (t.appendChild(this.createEl("div", `${a} top:0.69em; left:0.69em;`)), t.appendChild(this.createEl("div", `${a} top:0.69em; right:0.69em;`)), t.appendChild(this.createEl("div", `${a} bottom:0.69em; left:0.69em;`)), t.appendChild(this.createEl("div", `${a} bottom:0.69em; right:0.69em;`)), e.title) {
1748
1748
  const c = document.createElement("div");
1749
- c.className = qt.title, c.style.cssText = `
1749
+ c.className = Vt.title, c.style.cssText = `
1750
1750
  font-weight: 700;
1751
1751
  font-size: 1.15em;
1752
1752
  color: #c8f4ff;
@@ -1759,12 +1759,12 @@ const qt = {
1759
1759
  `, c.textContent = e.title, c.setAttribute("data-panel-title", ""), t.appendChild(c);
1760
1760
  }
1761
1761
  const l = document.createElement("div");
1762
- l.className = qt.list, l.setAttribute("data-panel-list", ""), t.appendChild(l), this.renderItems(l, e.items), this.container = t, this.css2dObject && (this.css2dObject.element = t);
1762
+ l.className = Vt.list, l.setAttribute("data-panel-list", ""), t.appendChild(l), this.renderItems(l, e.items), this.container = t, this.css2dObject && (this.css2dObject.element = t);
1763
1763
  }
1764
1764
  renderItems(e, t) {
1765
1765
  e.innerHTML = "", t.forEach((n, s) => {
1766
1766
  const i = document.createElement("div");
1767
- i.className = `${qt.item} ${n.className || ""}`.trim(), i.style.cssText = `
1767
+ i.className = `${Vt.item} ${n.className || ""}`.trim(), i.style.cssText = `
1768
1768
  display: flex;
1769
1769
  justify-content: space-between;
1770
1770
  align-items: center;
@@ -1910,14 +1910,14 @@ const qt = {
1910
1910
  this.detach(), (e = this.container) != null && e.parentNode && this.container.parentNode.removeChild(this.container), this.css2dObject = null, this.container = null, this.attachedObject = null;
1911
1911
  }
1912
1912
  };
1913
- Je(ht, "_breathInjected", !1);
1913
+ _e(ht, "_breathInjected", !1);
1914
1914
  let us = ht;
1915
1915
  const ds = /* @__PURE__ */ new WeakMap();
1916
1916
  function li(r, e) {
1917
1917
  const t = hs(r);
1918
1918
  ds.set(t, e), t.userData._hasDataPanel = !0;
1919
1919
  }
1920
- function Ft(r) {
1920
+ function Ut(r) {
1921
1921
  return ds.get(hs(r)) || null;
1922
1922
  }
1923
1923
  function ci(r) {
@@ -1928,7 +1928,7 @@ let oe = null;
1928
1928
  function Hr(r) {
1929
1929
  return oe ? (oe.domElement.parentNode !== r && r.appendChild(oe.domElement), oe) : (oe = new Mr(), oe.setSize(r.clientWidth, r.clientHeight), oe.domElement.style.position = "absolute", oe.domElement.style.top = "0", oe.domElement.style.left = "0", oe.domElement.style.pointerEvents = "none", r.appendChild(oe.domElement), oe);
1930
1930
  }
1931
- function gd() {
1931
+ function bd() {
1932
1932
  return oe;
1933
1933
  }
1934
1934
  function kr(r, e) {
@@ -1960,8 +1960,8 @@ function Ur() {
1960
1960
  }
1961
1961
  const c = new R.Mesh(e, l(50));
1962
1962
  c.position.set(-16.116, 14.37, 8.208), c.scale.set(0.1, 2.428, 2.739), r.add(c);
1963
- const d = new R.Mesh(e, l(50));
1964
- d.position.set(-16.109, 18.021, -8.207), d.scale.set(0.1, 2.425, 2.751), r.add(d);
1963
+ const f = new R.Mesh(e, l(50));
1964
+ f.position.set(-16.109, 18.021, -8.207), f.scale.set(0.1, 2.425, 2.751), r.add(f);
1965
1965
  const u = new R.Mesh(e, l(17));
1966
1966
  u.position.set(14.904, 12.198, -1.832), u.scale.set(0.15, 4.265, 6.331), r.add(u);
1967
1967
  const A = new R.Mesh(e, l(43));
@@ -1971,7 +1971,7 @@ function Ur() {
1971
1971
  const b = new R.Mesh(e, l(100));
1972
1972
  return b.position.set(0, 20, 0), b.scale.set(1, 0.1, 1), r.add(b), r;
1973
1973
  }
1974
- function es(r) {
1974
+ function ts(r) {
1975
1975
  try {
1976
1976
  const e = new R.PMREMGenerator(r), t = Ur(), n = e.fromScene(t).texture;
1977
1977
  return t.traverse((s) => {
@@ -2167,7 +2167,7 @@ function Yr(r, e, t) {
2167
2167
  for (let s = e; s < e + t; s++)
2168
2168
  for (let i = 0; i < r.itemSize; i++) {
2169
2169
  let o;
2170
- r.itemSize > 4 ? o = r.array[s * r.itemSize + i] : (i === 0 ? o = r.getX(s) : i === 1 ? o = r.getY(s) : i === 2 ? o = r.getZ(s) : i === 3 && (o = r.getW(s)), r.normalized === !0 && (o = St.normalize(o, r.array))), n.min[i] = Math.min(n.min[i], o), n.max[i] = Math.max(n.max[i], o);
2170
+ r.itemSize > 4 ? o = r.array[s * r.itemSize + i] : (i === 0 ? o = r.getX(s) : i === 1 ? o = r.getY(s) : i === 2 ? o = r.getZ(s) : i === 3 && (o = r.getW(s)), r.normalized === !0 && (o = Lt.normalize(o, r.array))), n.min[i] = Math.min(n.min[i], o), n.max[i] = Math.max(n.max[i], o);
2171
2171
  }
2172
2172
  return n;
2173
2173
  }
@@ -2239,27 +2239,27 @@ class Zr {
2239
2239
  }, n), this.options.animations.length > 0 && (this.options.trs = !0), await this.processInputAsync(e), await Promise.all(this.pending);
2240
2240
  const s = this, i = s.buffers, o = s.json;
2241
2241
  n = s.options;
2242
- const a = s.extensionsUsed, l = s.extensionsRequired, c = new Blob(i, { type: "application/octet-stream" }), d = Object.keys(a), u = Object.keys(l);
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) {
2242
+ const a = s.extensionsUsed, l = s.extensionsRequired, c = new Blob(i, { type: "application/octet-stream" }), f = Object.keys(a), u = Object.keys(l);
2243
+ if (f.length > 0 && (o.extensionsUsed = f), 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
2246
  const m = Ms(A.result), b = new DataView(new ArrayBuffer(En));
2247
2247
  b.setUint32(0, m.byteLength, !0), b.setUint32(4, Xr, !0);
2248
2248
  const h = Ms(qr(JSON.stringify(o)), 32), p = new DataView(new ArrayBuffer(En));
2249
2249
  p.setUint32(0, h.byteLength, !0), p.setUint32(4, Br, !0);
2250
- const w = new ArrayBuffer(Tn), I = new DataView(w);
2251
- I.setUint32(0, Wr, !0), I.setUint32(4, Gr, !0);
2252
- const x = Tn + p.byteLength + h.byteLength + b.byteLength + m.byteLength;
2253
- I.setUint32(8, x, !0);
2254
- const f = new Blob([
2255
- w,
2250
+ const C = new ArrayBuffer(Tn), v = new DataView(C);
2251
+ v.setUint32(0, Wr, !0), v.setUint32(4, Gr, !0);
2252
+ const w = Tn + p.byteLength + h.byteLength + b.byteLength + m.byteLength;
2253
+ v.setUint32(8, w, !0);
2254
+ const d = new Blob([
2255
+ C,
2256
2256
  p,
2257
2257
  h,
2258
2258
  b,
2259
2259
  m
2260
- ], { type: "application/octet-stream" }), v = new FileReader();
2261
- v.readAsArrayBuffer(f), v.onloadend = function() {
2262
- t(v.result);
2260
+ ], { type: "application/octet-stream" }), x = new FileReader();
2261
+ x.readAsArrayBuffer(d), x.onloadend = function() {
2262
+ t(x.result);
2263
2263
  };
2264
2264
  };
2265
2265
  } else if (o.buffers && o.buffers.length > 0) {
@@ -2363,20 +2363,20 @@ class Zr {
2363
2363
  willReadFrequently: !0
2364
2364
  });
2365
2365
  c.fillStyle = "#00ffff", c.fillRect(0, 0, o, a);
2366
- const d = c.getImageData(0, 0, o, a);
2366
+ const f = c.getImageData(0, 0, o, a);
2367
2367
  if (s) {
2368
2368
  c.drawImage(s, 0, 0, o, a);
2369
2369
  const m = n(e), b = c.getImageData(0, 0, o, a).data;
2370
2370
  for (let h = 2; h < b.length; h += 4)
2371
- d.data[h] = m(b[h] / 256) * 256;
2371
+ f.data[h] = m(b[h] / 256) * 256;
2372
2372
  }
2373
2373
  if (i) {
2374
2374
  c.drawImage(i, 0, 0, o, a);
2375
2375
  const m = n(t), b = c.getImageData(0, 0, o, a).data;
2376
2376
  for (let h = 1; h < b.length; h += 4)
2377
- d.data[h] = m(b[h] / 256) * 256;
2377
+ f.data[h] = m(b[h] / 256) * 256;
2378
2378
  }
2379
- c.putImageData(d, 0, 0);
2379
+ c.putImageData(f, 0, 0);
2380
2380
  const A = (e || t).clone();
2381
2381
  return A.source = new To(l), A.colorSpace = Eo, A.channel = (e || t).channel, e && t && e.channel !== t.channel && console.warn("THREE.GLTFExporter: UV channels for metalnessMap and roughnessMap textures must match."), console.warn("THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures."), A;
2382
2382
  }
@@ -2421,17 +2421,17 @@ class Zr {
2421
2421
  }
2422
2422
  let l = e.itemSize * a;
2423
2423
  i === K.ARRAY_BUFFER && (l = Math.ceil(l / 4) * 4);
2424
- const c = ui(s * l), d = new DataView(new ArrayBuffer(c));
2424
+ const c = ui(s * l), f = new DataView(new ArrayBuffer(c));
2425
2425
  let u = 0;
2426
2426
  for (let b = n; b < n + s; b++) {
2427
2427
  for (let h = 0; h < e.itemSize; h++) {
2428
2428
  let p;
2429
- e.itemSize > 4 ? p = e.array[b * e.itemSize + h] : (h === 0 ? p = e.getX(b) : h === 1 ? p = e.getY(b) : h === 2 ? p = e.getZ(b) : h === 3 && (p = e.getW(b)), e.normalized === !0 && (p = St.normalize(p, e.array))), t === K.FLOAT ? d.setFloat32(u, p, !0) : t === K.INT ? d.setInt32(u, p, !0) : t === K.UNSIGNED_INT ? d.setUint32(u, p, !0) : t === K.SHORT ? d.setInt16(u, p, !0) : t === K.UNSIGNED_SHORT ? d.setUint16(u, p, !0) : t === K.BYTE ? d.setInt8(u, p) : t === K.UNSIGNED_BYTE && d.setUint8(u, p), u += a;
2429
+ e.itemSize > 4 ? p = e.array[b * e.itemSize + h] : (h === 0 ? p = e.getX(b) : h === 1 ? p = e.getY(b) : h === 2 ? p = e.getZ(b) : h === 3 && (p = e.getW(b)), e.normalized === !0 && (p = Lt.normalize(p, e.array))), t === K.FLOAT ? f.setFloat32(u, p, !0) : t === K.INT ? f.setInt32(u, p, !0) : t === K.UNSIGNED_INT ? f.setUint32(u, p, !0) : t === K.SHORT ? f.setInt16(u, p, !0) : t === K.UNSIGNED_SHORT ? f.setUint16(u, p, !0) : t === K.BYTE ? f.setInt8(u, p) : t === K.UNSIGNED_BYTE && f.setUint8(u, p), u += a;
2430
2430
  }
2431
2431
  u % l !== 0 && (u += l - u % l);
2432
2432
  }
2433
2433
  const A = {
2434
- buffer: this.processBuffer(d.buffer),
2434
+ buffer: this.processBuffer(f.buffer),
2435
2435
  byteOffset: this.byteOffset,
2436
2436
  byteLength: c
2437
2437
  };
@@ -2497,9 +2497,9 @@ class Zr {
2497
2497
  const l = Yr(e, n, s);
2498
2498
  let c;
2499
2499
  t !== void 0 && (c = e === t.index ? K.ELEMENT_ARRAY_BUFFER : K.ARRAY_BUFFER);
2500
- const d = this.processBufferView(e, a, n, s, c), u = {
2501
- bufferView: d.id,
2502
- byteOffset: d.byteOffset,
2500
+ const f = this.processBufferView(e, a, n, s, c), u = {
2501
+ bufferView: f.id,
2502
+ byteOffset: f.byteOffset,
2503
2503
  componentType: a,
2504
2504
  count: s,
2505
2505
  max: l.max,
@@ -2520,8 +2520,8 @@ class Zr {
2520
2520
  if (e !== null) {
2521
2521
  const i = this, o = i.cache, a = i.json, l = i.options, c = i.pending;
2522
2522
  o.images.has(e) || o.images.set(e, {});
2523
- const d = o.images.get(e), u = s + ":flipY/" + n.toString();
2524
- if (d[u] !== void 0) return d[u];
2523
+ const f = o.images.get(e), u = s + ":flipY/" + n.toString();
2524
+ if (f[u] !== void 0) return f[u];
2525
2525
  a.images || (a.images = []);
2526
2526
  const A = { mimeType: s }, m = Dn();
2527
2527
  m.width = Math.min(e.width, l.maxTextureSize), m.height = Math.min(e.height, l.maxTextureSize);
@@ -2531,8 +2531,8 @@ class Zr {
2531
2531
  if (n === !0 && (b.translate(0, m.height), b.scale(1, -1)), e.data !== void 0) {
2532
2532
  t !== Do && 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
2533
  const p = new Uint8ClampedArray(e.height * e.width * 4);
2534
- for (let w = 0; w < p.length; w += 4)
2535
- p[w + 0] = e.data[w + 0], p[w + 1] = e.data[w + 1], p[w + 2] = e.data[w + 2], p[w + 3] = e.data[w + 3];
2534
+ for (let C = 0; C < p.length; C += 4)
2535
+ p[C + 0] = e.data[C + 0], p[C + 1] = e.data[C + 1], p[C + 2] = e.data[C + 2], p[C + 3] = e.data[C + 3];
2536
2536
  b.putImageData(new ImageData(p, 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
  b.drawImage(e, 0, 0, m.width, m.height);
@@ -2544,7 +2544,7 @@ class Zr {
2544
2544
  })
2545
2545
  ) : A.uri = Oo.getDataURL(m, s);
2546
2546
  const h = a.images.push(A) - 1;
2547
- return d[u] = h, h;
2547
+ return f[u] = h, h;
2548
2548
  } else
2549
2549
  throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.");
2550
2550
  }
@@ -2578,8 +2578,8 @@ class Zr {
2578
2578
  };
2579
2579
  o === "image/webp" ? (l.extensions = l.extensions || {}, l.extensions.EXT_texture_webp = {
2580
2580
  source: a
2581
- }, this.extensionsUsed.EXT_texture_webp = !0, this.extensionsRequired.EXT_texture_webp = !0) : l.source = a, e.name && (l.name = e.name), await this._invokeAllAsync(async function(d) {
2582
- d.writeTexture && await d.writeTexture(e, l);
2581
+ }, this.extensionsUsed.EXT_texture_webp = !0, this.extensionsRequired.EXT_texture_webp = !0) : l.source = a, e.name && (l.name = e.name), await this._invokeAllAsync(async function(f) {
2582
+ f.writeTexture && await f.writeTexture(e, l);
2583
2583
  });
2584
2584
  const c = i.textures.push(l) - 1;
2585
2585
  return s.textures.set(e, c), c;
@@ -2650,8 +2650,8 @@ class Zr {
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 f = 0, v = e.material.length; f < v; f++)
2654
- s.push(e.material[f].uuid);
2653
+ for (let d = 0, x = e.material.length; d < x; d++)
2654
+ s.push(e.material[d].uuid);
2655
2655
  else
2656
2656
  s.push(e.material.uuid);
2657
2657
  const i = s.join(":");
@@ -2659,7 +2659,7 @@ class Zr {
2659
2659
  const o = e.geometry;
2660
2660
  let a;
2661
2661
  e.isLineSegments ? a = K.LINES : e.isLineLoop ? a = K.LINE_LOOP : e.isLine ? a = K.LINE_STRIP : e.isPoints ? a = K.POINTS : a = e.material.wireframe ? K.LINES : K.TRIANGLES;
2662
- const l = {}, c = {}, d = [], u = [], A = {
2662
+ const l = {}, c = {}, f = [], u = [], A = {
2663
2663
  uv: "TEXCOORD_0",
2664
2664
  uv1: "TEXCOORD_1",
2665
2665
  uv2: "TEXCOORD_2",
@@ -2670,22 +2670,22 @@ class Zr {
2670
2670
  }, m = o.getAttribute("normal");
2671
2671
  m !== void 0 && !this.isNormalizedNormalAttribute(m) && (console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."), o.setAttribute("normal", this.createNormalizedNormalAttribute(m)));
2672
2672
  let b = null;
2673
- for (let f in o.attributes) {
2674
- if (f.slice(0, 5) === "morph") continue;
2675
- const v = o.attributes[f];
2676
- if (f = A[f] || f.toUpperCase(), !/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(f) && !f.startsWith("_") && (f = "_" + f), t.attributes.has(this.getUID(v))) {
2677
- c[f] = t.attributes.get(this.getUID(v));
2673
+ for (let d in o.attributes) {
2674
+ if (d.slice(0, 5) === "morph") continue;
2675
+ const x = o.attributes[d];
2676
+ if (d = A[d] || d.toUpperCase(), !/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(d) && !d.startsWith("_") && (d = "_" + d), t.attributes.has(this.getUID(x))) {
2677
+ c[d] = t.attributes.get(this.getUID(x));
2678
2678
  continue;
2679
2679
  }
2680
2680
  b = null;
2681
- const D = v.array;
2682
- f === "JOINTS_0" && !(D instanceof Uint16Array) && !(D instanceof Uint8Array) ? (console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'), b = Ot.Utils.toTypedBufferAttribute(v, Uint16Array)) : (D instanceof Uint32Array || D instanceof Int32Array) && !f.startsWith("_") && (console.warn(`GLTFExporter: Attribute "${f}" converted to type FLOAT.`), b = Ot.Utils.toTypedBufferAttribute(v, Float32Array));
2683
- const E = this.processAccessor(b || v, o);
2684
- E !== null && (f.startsWith("_") || this.detectMeshQuantization(f, v), c[f] = E, t.attributes.set(this.getUID(v), E));
2681
+ const D = x.array;
2682
+ d === "JOINTS_0" && !(D instanceof Uint16Array) && !(D instanceof Uint8Array) ? (console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'), b = Ot.Utils.toTypedBufferAttribute(x, Uint16Array)) : (D instanceof Uint32Array || D instanceof Int32Array) && !d.startsWith("_") && (console.warn(`GLTFExporter: Attribute "${d}" converted to type FLOAT.`), b = Ot.Utils.toTypedBufferAttribute(x, Float32Array));
2683
+ const E = this.processAccessor(b || x, o);
2684
+ E !== null && (d.startsWith("_") || this.detectMeshQuantization(d, x), c[d] = E, t.attributes.set(this.getUID(x), E));
2685
2685
  }
2686
2686
  if (m !== void 0 && o.setAttribute("normal", m), Object.keys(c).length === 0) return null;
2687
2687
  if (e.morphTargetInfluences !== void 0 && e.morphTargetInfluences.length > 0) {
2688
- const f = [], v = [], M = {};
2688
+ const d = [], x = [], M = {};
2689
2689
  if (e.morphTargetDictionary !== void 0)
2690
2690
  for (const D in e.morphTargetDictionary)
2691
2691
  M[e.morphTargetDictionary[D]] = D;
@@ -2709,37 +2709,37 @@ class Zr {
2709
2709
  G === 0 && Q.setX(N, _.getX(N) - $.getX(N)), G === 1 && Q.setY(N, _.getY(N) - $.getY(N)), G === 2 && Q.setZ(N, _.getZ(N) - $.getZ(N)), G === 3 && Q.setW(N, _.getW(N) - $.getW(N));
2710
2710
  E[ne] = this.processAccessor(Q, o), t.attributes.set(this.getUID($, !0), E[ne]);
2711
2711
  }
2712
- u.push(E), f.push(e.morphTargetInfluences[D]), e.morphTargetDictionary !== void 0 && v.push(M[D]);
2712
+ u.push(E), d.push(e.morphTargetInfluences[D]), e.morphTargetDictionary !== void 0 && x.push(M[D]);
2713
2713
  }
2714
- l.weights = f, v.length > 0 && (l.extras = {}, l.extras.targetNames = v);
2714
+ l.weights = d, x.length > 0 && (l.extras = {}, l.extras.targetNames = x);
2715
2715
  }
2716
2716
  const h = Array.isArray(e.material);
2717
2717
  if (h && o.groups.length === 0) return null;
2718
2718
  let p = !1;
2719
2719
  if (h && o.index === null) {
2720
- const f = [];
2721
- for (let v = 0, M = o.attributes.position.count; v < M; v++)
2722
- f[v] = v;
2723
- o.setIndex(f), p = !0;
2720
+ const d = [];
2721
+ for (let x = 0, M = o.attributes.position.count; x < M; x++)
2722
+ d[x] = x;
2723
+ o.setIndex(d), p = !0;
2724
2724
  }
2725
- const w = h ? e.material : [e.material], I = h ? o.groups : [{ materialIndex: 0, start: void 0, count: void 0 }];
2726
- for (let f = 0, v = I.length; f < v; f++) {
2725
+ const C = h ? e.material : [e.material], v = h ? o.groups : [{ materialIndex: 0, start: void 0, count: void 0 }];
2726
+ for (let d = 0, x = v.length; d < x; d++) {
2727
2727
  const M = {
2728
2728
  mode: a,
2729
2729
  attributes: c
2730
2730
  };
2731
2731
  if (this.serializeUserData(o, M), u.length > 0 && (M.targets = u), o.index !== null) {
2732
2732
  let E = this.getUID(o.index);
2733
- (I[f].start !== void 0 || I[f].count !== void 0) && (E += ":" + I[f].start + ":" + I[f].count), t.attributes.has(E) ? M.indices = t.attributes.get(E) : (M.indices = this.processAccessor(o.index, o, I[f].start, I[f].count), t.attributes.set(E, M.indices)), M.indices === null && delete M.indices;
2733
+ (v[d].start !== void 0 || v[d].count !== void 0) && (E += ":" + v[d].start + ":" + v[d].count), t.attributes.has(E) ? M.indices = t.attributes.get(E) : (M.indices = this.processAccessor(o.index, o, v[d].start, v[d].count), t.attributes.set(E, M.indices)), M.indices === null && delete M.indices;
2734
2734
  }
2735
- const D = await this.processMaterialAsync(w[I[f].materialIndex]);
2736
- D !== null && (M.material = D), d.push(M);
2735
+ const D = await this.processMaterialAsync(C[v[d].materialIndex]);
2736
+ D !== null && (M.material = D), f.push(M);
2737
2737
  }
2738
- p === !0 && o.setIndex(null), l.primitives = d, n.meshes || (n.meshes = []), await this._invokeAllAsync(function(f) {
2739
- f.writeMesh && f.writeMesh(e, l);
2738
+ p === !0 && o.setIndex(null), l.primitives = f, n.meshes || (n.meshes = []), await this._invokeAllAsync(function(d) {
2739
+ d.writeMesh && d.writeMesh(e, l);
2740
2740
  });
2741
- const x = n.meshes.push(l) - 1;
2742
- return t.meshes.set(i, x), x;
2741
+ const w = n.meshes.push(l) - 1;
2742
+ return t.meshes.set(i, w), w;
2743
2743
  }
2744
2744
  /**
2745
2745
  * If a vertex attribute with a
@@ -2793,7 +2793,7 @@ class Zr {
2793
2793
  znear: e.near < 0 ? 0 : e.near
2794
2794
  } : s.perspective = {
2795
2795
  aspectRatio: e.aspect,
2796
- yfov: St.degToRad(e.fov),
2796
+ yfov: Lt.degToRad(e.fov),
2797
2797
  zfar: e.far <= 0 ? 1e-3 : e.far,
2798
2798
  znear: e.near < 0 ? 0 : e.near
2799
2799
  }, e.name !== "" && (s.name = e.type), t.cameras.push(s) - 1;
@@ -2813,20 +2813,20 @@ class Zr {
2813
2813
  n.animations || (n.animations = []), e = Ot.Utils.mergeMorphTargetTracks(e.clone(), t);
2814
2814
  const i = e.tracks, o = [], a = [];
2815
2815
  for (let c = 0; c < i.length; ++c) {
2816
- const d = i[c], u = Lt.parseTrackName(d.name);
2817
- let A = Lt.findNode(t, u.nodeName);
2816
+ const f = i[c], u = Nt.parseTrackName(f.name);
2817
+ let A = Nt.findNode(t, u.nodeName);
2818
2818
  const m = Mn[u.propertyName];
2819
2819
  if (u.objectName === "bones" && (A.isSkinnedMesh === !0 ? A = A.skeleton.getBoneByName(u.objectIndex) : A = void 0), !A || !m) {
2820
- console.warn('THREE.GLTFExporter: Could not export animation track "%s".', d.name);
2820
+ console.warn('THREE.GLTFExporter: Could not export animation track "%s".', f.name);
2821
2821
  continue;
2822
2822
  }
2823
2823
  const b = 1;
2824
- let h = d.values.length / d.times.length;
2824
+ let h = f.values.length / f.times.length;
2825
2825
  m === Mn.morphTargetInfluences && (h /= A.morphTargetInfluences.length);
2826
2826
  let p;
2827
- d.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === !0 ? (p = "CUBICSPLINE", h /= 3) : d.getInterpolation() === Kn ? p = "STEP" : p = "LINEAR", a.push({
2828
- input: this.processAccessor(new De(d.times, b)),
2829
- output: this.processAccessor(new De(d.values, h)),
2827
+ f.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === !0 ? (p = "CUBICSPLINE", h /= 3) : f.getInterpolation() === Kn ? p = "STEP" : p = "LINEAR", a.push({
2828
+ input: this.processAccessor(new De(f.times, b)),
2829
+ output: this.processAccessor(new De(f.values, h)),
2830
2830
  interpolation: p
2831
2831
  }), o.push({
2832
2832
  sampler: a.length - 1,
@@ -2885,9 +2885,9 @@ class Zr {
2885
2885
  if (s.set(e, o), e.children.length > 0) {
2886
2886
  const a = [];
2887
2887
  for (let l = 0, c = e.children.length; l < c; l++) {
2888
- const d = e.children[l];
2889
- if (d.visible || n.onlyVisible === !1) {
2890
- const u = await this.processNodeAsync(d);
2888
+ const f = e.children[l];
2889
+ if (f.visible || n.onlyVisible === !1) {
2890
+ const u = await this.processNodeAsync(f);
2891
2891
  u !== null && a.push(u);
2892
2892
  }
2893
2893
  }
@@ -2909,8 +2909,8 @@ class Zr {
2909
2909
  e.position.z + i.z
2910
2910
  ], c = e.scale.toArray();
2911
2911
  Ge(a, [0, 0, 0, 1]) || (o.rotation = a), Ge(l, [0, 0, 0]) || (o.translation = l), Ge(c, [1, 1, 1]) || (o.scale = c), o.extras = { pivot: i.toArray() }, e.name !== "" && (o.name = String(e.name)), this.serializeUserData(e, o);
2912
- const d = t.nodes.push(o) - 1;
2913
- s.set(e, d);
2912
+ const f = t.nodes.push(o) - 1;
2913
+ s.set(e, f);
2914
2914
  const u = {}, A = [-i.x, -i.y, -i.z];
2915
2915
  if (Ge(A, [0, 0, 0]) || (u.translation = A), e.isMesh || e.isLine || e.isPoints) {
2916
2916
  const h = await this.processMeshAsync(e);
@@ -2920,18 +2920,18 @@ class Zr {
2920
2920
  const b = [t.nodes.push(u) - 1];
2921
2921
  if (e.children.length > 0) {
2922
2922
  const h = [];
2923
- for (let p = 0, w = e.children.length; p < w; p++) {
2924
- const I = e.children[p];
2925
- if (I.visible || n.onlyVisible === !1) {
2926
- const x = await this.processNodeAsync(I);
2927
- x !== null && h.push(x);
2923
+ for (let p = 0, C = e.children.length; p < C; p++) {
2924
+ const v = e.children[p];
2925
+ if (v.visible || n.onlyVisible === !1) {
2926
+ const w = await this.processNodeAsync(v);
2927
+ w !== null && h.push(w);
2928
2928
  }
2929
2929
  }
2930
2930
  h.length > 0 && (u.children = h);
2931
2931
  }
2932
2932
  return o.children = b, await this._invokeAllAsync(function(h) {
2933
2933
  h.writeNode && h.writeNode(e, o);
2934
- }), d;
2934
+ }), f;
2935
2935
  }
2936
2936
  /**
2937
2937
  * Process Scene
@@ -3206,9 +3206,9 @@ let Jr = class {
3206
3206
  }
3207
3207
  writeNode(e, t) {
3208
3208
  if (!e.isInstancedMesh) return;
3209
- const n = this.writer, s = e, i = new Float32Array(s.count * 3), o = new Float32Array(s.count * 4), a = new Float32Array(s.count * 3), l = new Ce(), c = new S(), d = new me(), u = new S();
3209
+ const n = this.writer, s = e, i = new Float32Array(s.count * 3), o = new Float32Array(s.count * 4), a = new Float32Array(s.count * 3), l = new Ce(), c = new S(), f = new me(), u = new S();
3210
3210
  for (let m = 0; m < s.count; m++)
3211
- s.getMatrixAt(m, l), l.decompose(c, d, u), c.toArray(i, m * 3), d.toArray(o, m * 4), u.toArray(a, m * 3);
3211
+ s.getMatrixAt(m, l), l.decompose(c, f, u), c.toArray(i, m * 3), f.toArray(o, m * 4), u.toArray(a, m * 3);
3212
3212
  const A = {
3213
3213
  TRANSLATION: n.processAccessor(new De(i, 3)),
3214
3214
  ROTATION: n.processAccessor(new De(o, 4)),
@@ -3247,7 +3247,7 @@ Ot.Utils = {
3247
3247
  const t = [], n = {}, s = r.tracks;
3248
3248
  for (let i = 0; i < s.length; ++i) {
3249
3249
  let o = s[i];
3250
- const a = Lt.parseTrackName(o.name), l = Lt.findNode(e, a.nodeName);
3250
+ const a = Nt.parseTrackName(o.name), l = Nt.findNode(e, a.nodeName);
3251
3251
  if (a.propertyName !== "morphTargetInfluences" || a.propertyIndex === void 0) {
3252
3252
  t.push(o);
3253
3253
  continue;
@@ -3257,25 +3257,25 @@ Ot.Utils = {
3257
3257
  throw new Error("THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.");
3258
3258
  console.warn("THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead."), o = o.clone(), o.setInterpolation(Ys);
3259
3259
  }
3260
- const c = l.morphTargetInfluences.length, d = l.morphTargetDictionary[a.propertyIndex];
3261
- if (d === void 0)
3260
+ const c = l.morphTargetInfluences.length, f = l.morphTargetDictionary[a.propertyIndex];
3261
+ if (f === void 0)
3262
3262
  throw new Error("THREE.GLTFExporter: Morph target name not found: " + a.propertyIndex);
3263
3263
  let u;
3264
3264
  if (n[l.uuid] === void 0) {
3265
3265
  u = o.clone();
3266
3266
  const m = new u.ValueBufferType(c * u.times.length);
3267
3267
  for (let b = 0; b < u.times.length; b++)
3268
- m[b * c + d] = u.values[b];
3268
+ m[b * c + f] = u.values[b];
3269
3269
  u.name = (a.nodeName || "") + ".morphTargetInfluences", u.values = m, n[l.uuid] = u, t.push(u);
3270
3270
  continue;
3271
3271
  }
3272
3272
  const A = o.createInterpolant(new o.ValueBufferType(1));
3273
3273
  u = n[l.uuid];
3274
3274
  for (let m = 0; m < u.times.length; m++)
3275
- u.values[m * c + d] = A.evaluate(u.times[m]);
3275
+ u.values[m * c + f] = A.evaluate(u.times[m]);
3276
3276
  for (let m = 0; m < o.times.length; m++) {
3277
3277
  const b = this.insertKeyframe(u, o.times[m]);
3278
- u.values[b * c + d] = o.values[m];
3278
+ u.values[b * c + f] = o.values[m];
3279
3279
  }
3280
3280
  }
3281
3281
  return r.tracks = t, r;
@@ -3401,14 +3401,14 @@ class fi extends Ks {
3401
3401
  this.manager.itemStart(e);
3402
3402
  const a = function(c) {
3403
3403
  s ? s(c) : console.error(c), i.manager.itemError(e), i.manager.itemEnd(e);
3404
- }, l = new Nt(this.manager);
3404
+ }, l = new Ht(this.manager);
3405
3405
  l.setPath(this.path), l.setResponseType("arraybuffer"), l.setRequestHeader(this.requestHeader), l.setWithCredentials(this.withCredentials), l.load(e, function(c) {
3406
3406
  try {
3407
- i.parse(c, o, function(d) {
3408
- t(d), i.manager.itemEnd(e);
3407
+ i.parse(c, o, function(f) {
3408
+ t(f), i.manager.itemEnd(e);
3409
3409
  }, a);
3410
- } catch (d) {
3411
- a(d);
3410
+ } catch (f) {
3411
+ a(f);
3412
3412
  }
3413
3413
  }, n, a);
3414
3414
  }
@@ -3501,13 +3501,13 @@ class fi extends Ks {
3501
3501
  meshoptDecoder: this.meshoptDecoder
3502
3502
  });
3503
3503
  c.fileLoader.setRequestHeader(this.requestHeader);
3504
- for (let d = 0; d < this.pluginCallbacks.length; d++) {
3505
- const u = this.pluginCallbacks[d](c);
3504
+ for (let f = 0; f < this.pluginCallbacks.length; f++) {
3505
+ const u = this.pluginCallbacks[f](c);
3506
3506
  u.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), a[u.name] = u, o[u.name] = !0;
3507
3507
  }
3508
3508
  if (i.extensionsUsed)
3509
- for (let d = 0; d < i.extensionsUsed.length; ++d) {
3510
- const u = i.extensionsUsed[d], A = i.extensionsRequired || [];
3509
+ for (let f = 0; f < i.extensionsUsed.length; ++f) {
3510
+ const u = i.extensionsUsed[f], A = i.extensionsRequired || [];
3511
3511
  switch (u) {
3512
3512
  case Y.KHR_MATERIALS_UNLIT:
3513
3513
  o[u] = new ha();
@@ -3605,18 +3605,18 @@ class fa {
3605
3605
  if (s) return s;
3606
3606
  const i = t.json, l = ((i.extensions && i.extensions[this.name] || {}).lights || [])[e];
3607
3607
  let c;
3608
- const d = new le(16777215);
3609
- l.color !== void 0 && d.setRGB(l.color[0], l.color[1], l.color[2], Fe);
3608
+ const f = new le(16777215);
3609
+ l.color !== void 0 && f.setRGB(l.color[0], l.color[1], l.color[2], Fe);
3610
3610
  const u = l.range !== void 0 ? l.range : 0;
3611
3611
  switch (l.type) {
3612
3612
  case "directional":
3613
- c = new Lo(d), c.target.position.set(0, 0, -1), c.add(c.target);
3613
+ c = new Lo(f), c.target.position.set(0, 0, -1), c.add(c.target);
3614
3614
  break;
3615
3615
  case "point":
3616
- c = new So(d), c.distance = u;
3616
+ c = new So(f), c.distance = u;
3617
3617
  break;
3618
3618
  case "spot":
3619
- c = new Po(d), c.distance = u, l.spot = l.spot || {}, l.spot.innerConeAngle = l.spot.innerConeAngle !== void 0 ? l.spot.innerConeAngle : 0, l.spot.outerConeAngle = l.spot.outerConeAngle !== void 0 ? l.spot.outerConeAngle : Math.PI / 4, c.angle = l.spot.outerConeAngle, c.penumbra = 1 - l.spot.innerConeAngle / l.spot.outerConeAngle, c.target.position.set(0, 0, -1), c.add(c.target);
3619
+ c = new Po(f), c.distance = u, l.spot = l.spot || {}, l.spot.innerConeAngle = l.spot.innerConeAngle !== void 0 ? l.spot.innerConeAngle : 0, l.spot.outerConeAngle = l.spot.outerConeAngle !== void 0 ? l.spot.outerConeAngle : Math.PI / 4, c.angle = l.spot.outerConeAngle, c.penumbra = 1 - l.spot.innerConeAngle / l.spot.outerConeAngle, c.target.position.set(0, 0, -1), c.add(c.target);
3620
3620
  break;
3621
3621
  default:
3622
3622
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + l.type);
@@ -3677,7 +3677,7 @@ class Aa {
3677
3677
  const s = [];
3678
3678
  if (n.clearcoatFactor !== void 0 && (t.clearcoat = n.clearcoatFactor), n.clearcoatTexture !== void 0 && s.push(this.parser.assignTexture(t, "clearcoatMap", n.clearcoatTexture)), n.clearcoatRoughnessFactor !== void 0 && (t.clearcoatRoughness = n.clearcoatRoughnessFactor), n.clearcoatRoughnessTexture !== void 0 && s.push(this.parser.assignTexture(t, "clearcoatRoughnessMap", n.clearcoatRoughnessTexture)), n.clearcoatNormalTexture !== void 0 && (s.push(this.parser.assignTexture(t, "clearcoatNormalMap", n.clearcoatNormalTexture)), n.clearcoatNormalTexture.scale !== void 0)) {
3679
3679
  const i = n.clearcoatNormalTexture.scale;
3680
- t.clearcoatNormalScale = new de(i, i);
3680
+ t.clearcoatNormalScale = new fe(i, i);
3681
3681
  }
3682
3682
  return Promise.all(s);
3683
3683
  }
@@ -3877,12 +3877,12 @@ class Rn {
3877
3877
  return null;
3878
3878
  }
3879
3879
  return i.then(function(a) {
3880
- const l = s.byteOffset || 0, c = s.byteLength || 0, d = s.count, u = s.byteStride, A = new Uint8Array(a, l, c);
3881
- return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(d, u, A, s.mode, s.filter).then(function(m) {
3880
+ const l = s.byteOffset || 0, c = s.byteLength || 0, f = s.count, u = s.byteStride, A = new Uint8Array(a, l, c);
3881
+ return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(f, u, A, s.mode, s.filter).then(function(m) {
3882
3882
  return m.buffer;
3883
3883
  }) : o.ready.then(function() {
3884
- const m = new ArrayBuffer(d * u);
3885
- return o.decodeGltfBuffer(new Uint8Array(m), d, u, A, s.mode, s.filter), m;
3884
+ const m = new ArrayBuffer(f * u);
3885
+ return o.decodeGltfBuffer(new Uint8Array(m), f, u, A, s.mode, s.filter), m;
3886
3886
  });
3887
3887
  });
3888
3888
  } else
@@ -3903,21 +3903,21 @@ class Da {
3903
3903
  return null;
3904
3904
  const o = n.extensions[this.name].attributes, a = [], l = {};
3905
3905
  for (const c in o)
3906
- a.push(this.parser.getDependency("accessor", o[c]).then((d) => (l[c] = d, l[c])));
3906
+ a.push(this.parser.getDependency("accessor", o[c]).then((f) => (l[c] = f, l[c])));
3907
3907
  return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(e)), Promise.all(a).then((c) => {
3908
- const d = c.pop(), u = d.isGroup ? d.children : [d], A = c[0].count, m = [];
3908
+ const f = c.pop(), u = f.isGroup ? f.children : [f], A = c[0].count, m = [];
3909
3909
  for (const b of u) {
3910
- const h = new Ce(), p = new S(), w = new me(), I = new S(1, 1, 1), x = new No(b.geometry, b.material, A);
3911
- for (let f = 0; f < A; f++)
3912
- l.TRANSLATION && p.fromBufferAttribute(l.TRANSLATION, f), l.ROTATION && w.fromBufferAttribute(l.ROTATION, f), l.SCALE && I.fromBufferAttribute(l.SCALE, f), x.setMatrixAt(f, h.compose(p, w, I));
3913
- for (const f in l)
3914
- if (f === "_COLOR_0") {
3915
- const v = l[f];
3916
- x.instanceColor = new Ho(v.array, v.itemSize, v.normalized);
3917
- } else f !== "TRANSLATION" && f !== "ROTATION" && f !== "SCALE" && b.geometry.setAttribute(f, l[f]);
3918
- gt.prototype.copy.call(x, b), this.parser.assignFinalMaterial(x), m.push(x);
3910
+ const h = new Ce(), p = new S(), C = new me(), v = new S(1, 1, 1), w = new No(b.geometry, b.material, A);
3911
+ for (let d = 0; d < A; d++)
3912
+ l.TRANSLATION && p.fromBufferAttribute(l.TRANSLATION, d), l.ROTATION && C.fromBufferAttribute(l.ROTATION, d), l.SCALE && v.fromBufferAttribute(l.SCALE, d), w.setMatrixAt(d, h.compose(p, C, v));
3913
+ for (const d in l)
3914
+ if (d === "_COLOR_0") {
3915
+ const x = l[d];
3916
+ w.instanceColor = new Ho(x.array, x.itemSize, x.normalized);
3917
+ } else d !== "TRANSLATION" && d !== "ROTATION" && d !== "SCALE" && b.geometry.setAttribute(d, l[d]);
3918
+ gt.prototype.copy.call(w, b), this.parser.assignFinalMaterial(w), m.push(w);
3919
3919
  }
3920
- return d.isGroup ? (d.clear(), d.add(...m), d) : m[0];
3920
+ return f.isGroup ? (f.clear(), f.add(...m), f) : m[0];
3921
3921
  }));
3922
3922
  }
3923
3923
  }
@@ -3961,20 +3961,20 @@ class Ra {
3961
3961
  }
3962
3962
  decodePrimitive(e, t) {
3963
3963
  const n = this.json, s = this.dracoLoader, i = e.extensions[this.name].bufferView, o = e.extensions[this.name].attributes, a = {}, l = {}, c = {};
3964
- for (const d in o) {
3965
- const u = ks[d] || d.toLowerCase();
3966
- a[u] = o[d];
3967
- }
3968
- for (const d in e.attributes) {
3969
- const u = ks[d] || d.toLowerCase();
3970
- if (o[d] !== void 0) {
3971
- const A = n.accessors[e.attributes[d]], m = At[A.componentType];
3964
+ for (const f in o) {
3965
+ const u = ks[f] || f.toLowerCase();
3966
+ a[u] = o[f];
3967
+ }
3968
+ for (const f in e.attributes) {
3969
+ const u = ks[f] || f.toLowerCase();
3970
+ if (o[f] !== void 0) {
3971
+ const A = n.accessors[e.attributes[f]], m = At[A.componentType];
3972
3972
  c[u] = m.name, l[u] = A.normalized === !0;
3973
3973
  }
3974
3974
  }
3975
- return t.getDependency("bufferView", i).then(function(d) {
3975
+ return t.getDependency("bufferView", i).then(function(f) {
3976
3976
  return new Promise(function(u, A) {
3977
- s.decodeDracoFile(d, function(m) {
3977
+ s.decodeDracoFile(f, function(m) {
3978
3978
  for (const b in m.attributes) {
3979
3979
  const h = m.attributes[b], p = l[b];
3980
3980
  p !== void 0 && (h.normalized = p);
@@ -4009,10 +4009,10 @@ class pi extends Go {
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, m = A * u, b = e * c, h = b - c, p = -2 * m + 3 * A, w = m - A, I = 1 - p, x = w - A + u;
4013
- for (let f = 0; f !== a; f++) {
4014
- const v = o[h + f + a], M = o[h + f + l] * d, D = o[b + f + a], E = o[b + f] * d;
4015
- i[f] = I * v + x * M + p * D + w * E;
4012
+ const i = this.resultBuffer, o = this.sampleValues, a = this.valueSize, l = a * 2, c = a * 3, f = s - t, u = (n - t) / f, A = u * u, m = A * u, b = e * c, h = b - c, p = -2 * m + 3 * A, C = m - A, v = 1 - p, w = C - A + u;
4013
+ for (let d = 0; d !== a; d++) {
4014
+ const x = o[h + d + a], M = o[h + d + l] * f, D = o[b + d + a], E = o[b + d] * f;
4015
+ i[d] = v * x + w * M + p * D + C * E;
4016
4016
  }
4017
4017
  return i;
4018
4018
  }
@@ -4096,7 +4096,7 @@ function ka(r) {
4096
4096
  side: oi
4097
4097
  })), r.DefaultMaterial;
4098
4098
  }
4099
- function $e(r, e, t) {
4099
+ function et(r, e, t) {
4100
4100
  for (const n in t.extensions)
4101
4101
  r[n] === void 0 && (e.userData.gltfExtensions = e.userData.gltfExtensions || {}, e.userData.gltfExtensions[n] = t.extensions[n]);
4102
4102
  }
@@ -4105,13 +4105,13 @@ function He(r, e) {
4105
4105
  }
4106
4106
  function ja(r, e, t) {
4107
4107
  let n = !1, s = !1, i = !1;
4108
- for (let c = 0, d = e.length; c < d; c++) {
4108
+ for (let c = 0, f = e.length; c < f; c++) {
4109
4109
  const u = e[c];
4110
4110
  if (u.POSITION !== void 0 && (n = !0), u.NORMAL !== void 0 && (s = !0), u.COLOR_0 !== void 0 && (i = !0), n && s && i) break;
4111
4111
  }
4112
4112
  if (!n && !s && !i) return Promise.resolve(r);
4113
4113
  const o = [], a = [], l = [];
4114
- for (let c = 0, d = e.length; c < d; c++) {
4114
+ for (let c = 0, f = e.length; c < f; c++) {
4115
4115
  const u = e[c];
4116
4116
  if (n) {
4117
4117
  const A = u.POSITION !== void 0 ? t.getDependency("accessor", u.POSITION) : r.attributes.position;
@@ -4131,8 +4131,8 @@ function ja(r, e, t) {
4131
4131
  Promise.all(a),
4132
4132
  Promise.all(l)
4133
4133
  ]).then(function(c) {
4134
- const d = c[0], u = c[1], A = c[2];
4135
- return n && (r.morphAttributes.position = d), s && (r.morphAttributes.normal = u), i && (r.morphAttributes.color = A), r.morphTargetsRelative = !0, r;
4134
+ const f = c[0], u = c[1], A = c[2];
4135
+ return n && (r.morphAttributes.position = f), s && (r.morphAttributes.normal = u), i && (r.morphAttributes.color = A), r.morphTargetsRelative = !0, r;
4136
4136
  });
4137
4137
  }
4138
4138
  function Fa(r, e) {
@@ -4192,7 +4192,7 @@ class Ga {
4192
4192
  const l = a.match(/Version\/(\d+)/);
4193
4193
  s = n && l ? parseInt(l[1], 10) : -1, i = a.indexOf("Firefox") > -1, o = i ? a.match(/Firefox\/([0-9]+)\./)[1] : -1;
4194
4194
  }
4195
- typeof createImageBitmap > "u" || n && s < 17 || i && o < 98 ? this.textureLoader = new Qt(this.options.manager) : this.textureLoader = new ko(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Nt(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
4195
+ typeof createImageBitmap > "u" || n && s < 17 || i && o < 98 ? this.textureLoader = new Jt(this.options.manager) : this.textureLoader = new ko(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Ht(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
4196
4196
  }
4197
4197
  setExtensions(e) {
4198
4198
  this.extensions = e;
@@ -4222,7 +4222,7 @@ class Ga {
4222
4222
  parser: n,
4223
4223
  userData: {}
4224
4224
  };
4225
- return $e(i, a, s), He(a, s), Promise.all(n._invokeAll(function(l) {
4225
+ return et(i, a, s), He(a, s), Promise.all(n._invokeAll(function(l) {
4226
4226
  return l.afterRoot && l.afterRoot(a);
4227
4227
  })).then(function() {
4228
4228
  for (const l of a.scenes)
@@ -4278,8 +4278,8 @@ class Ga {
4278
4278
  const s = n.clone(), i = (o, a) => {
4279
4279
  const l = this.associations.get(o);
4280
4280
  l != null && this.associations.set(a, l);
4281
- for (const [c, d] of o.children.entries())
4282
- i(d, a.children[c]);
4281
+ for (const [c, f] of o.children.entries())
4282
+ i(f, a.children[c]);
4283
4283
  };
4284
4284
  return i(n, s), s.name += "_instance_" + e.uses[t]++, s;
4285
4285
  }
@@ -4437,19 +4437,19 @@ class Ga {
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 = Ts[s.type], c = At[s.componentType], d = c.BYTES_PER_ELEMENT, u = d * l, A = s.byteOffset || 0, m = s.bufferView !== void 0 ? n.bufferViews[s.bufferView].byteStride : void 0, b = s.normalized === !0;
4440
+ const a = o[0], l = Ts[s.type], c = At[s.componentType], f = c.BYTES_PER_ELEMENT, u = f * l, A = s.byteOffset || 0, m = s.bufferView !== void 0 ? n.bufferViews[s.bufferView].byteStride : void 0, b = s.normalized === !0;
4441
4441
  let h, p;
4442
4442
  if (m && m !== u) {
4443
- const w = Math.floor(A / m), I = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + w + ":" + s.count;
4444
- let x = t.cache.get(I);
4445
- x || (h = new c(a, w * m, s.count * m / d), x = new ti(h, m / d), t.cache.add(I, x)), p = new si(x, l, A % m / d, b);
4443
+ const C = Math.floor(A / m), v = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + C + ":" + s.count;
4444
+ let w = t.cache.get(v);
4445
+ w || (h = new c(a, C * m, s.count * m / f), w = new ti(h, m / f), t.cache.add(v, w)), p = new si(w, l, A % m / f, b);
4446
4446
  } else
4447
4447
  a === null ? h = new c(s.count * l) : h = new c(a, A, s.count * l), p = new De(h, l, b);
4448
4448
  if (s.sparse !== void 0) {
4449
- const w = Ts.SCALAR, I = At[s.sparse.indices.componentType], x = s.sparse.indices.byteOffset || 0, f = s.sparse.values.byteOffset || 0, v = new I(o[1], x, s.sparse.count * w), M = new c(o[2], f, s.sparse.count * l);
4449
+ const C = Ts.SCALAR, v = At[s.sparse.indices.componentType], w = s.sparse.indices.byteOffset || 0, d = s.sparse.values.byteOffset || 0, x = new v(o[1], w, s.sparse.count * C), M = new c(o[2], d, s.sparse.count * l);
4450
4450
  a !== null && (p = new De(p.array.slice(), p.itemSize, p.normalized)), p.normalized = !1;
4451
- for (let D = 0, E = v.length; D < E; D++) {
4452
- const U = v[D];
4451
+ for (let D = 0, E = x.length; D < E; D++) {
4452
+ const U = x[D];
4453
4453
  if (p.setX(U, M[D * l]), l >= 2 && p.setY(U, M[D * l + 1]), l >= 3 && p.setZ(U, M[D * l + 2]), l >= 4 && p.setW(U, M[D * l + 3]), l >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
4454
4454
  }
4455
4455
  p.normalized = b;
@@ -4477,10 +4477,10 @@ class Ga {
4477
4477
  const s = this, i = this.json, o = i.textures[e], a = i.images[t], l = (a.uri || a.bufferView) + ":" + o.sampler;
4478
4478
  if (this.textureCache[l])
4479
4479
  return this.textureCache[l];
4480
- const c = this.loadImageSource(t, n).then(function(d) {
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);
4480
+ const c = this.loadImageSource(t, n).then(function(f) {
4481
+ f.flipY = !1, f.name = o.name || a.name || "", f.name === "" && typeof a.uri == "string" && a.uri.startsWith("data:image/") === !1 && (f.name = a.uri);
4482
4482
  const A = (i.samplers || {})[o.sampler] || {};
4483
- return d.magFilter = Sn[A.magFilter] || cs, d.minFilter = Sn[A.minFilter] || Vs, d.wrapS = Ln[A.wrapS] || it, d.wrapT = Ln[A.wrapT] || it, d.generateMipmaps = !d.isCompressedTexture && d.minFilter !== qs && d.minFilter !== cs, s.associations.set(d, { textures: e }), d;
4483
+ return f.magFilter = Sn[A.magFilter] || cs, f.minFilter = Sn[A.minFilter] || Vs, f.wrapS = Ln[A.wrapS] || it, f.wrapT = Ln[A.wrapT] || it, f.generateMipmaps = !f.isCompressedTexture && f.minFilter !== qs && f.minFilter !== cs, s.associations.set(f, { textures: e }), f;
4484
4484
  }).catch(function() {
4485
4485
  return null;
4486
4486
  });
@@ -4500,7 +4500,7 @@ class Ga {
4500
4500
  });
4501
4501
  else if (o.uri === void 0)
4502
4502
  throw new Error("THREE.GLTFLoader: Image " + e + " is missing URI and bufferView");
4503
- const d = Promise.resolve(l).then(function(u) {
4503
+ const f = Promise.resolve(l).then(function(u) {
4504
4504
  return new Promise(function(A, m) {
4505
4505
  let b = A;
4506
4506
  t.isImageBitmapLoader === !0 && (b = function(h) {
@@ -4513,7 +4513,7 @@ class Ga {
4513
4513
  }).catch(function(u) {
4514
4514
  throw console.error("THREE.GLTFLoader: Couldn't load texture", l), u;
4515
4515
  });
4516
- return this.sourceCache[e] = d, d;
4516
+ return this.sourceCache[e] = f, f;
4517
4517
  }
4518
4518
  /**
4519
4519
  * Asynchronously assigns a texture to the given material parameters.
@@ -4600,8 +4600,8 @@ class Ga {
4600
4600
  })));
4601
4601
  }
4602
4602
  i.doubleSided === !0 && (a.side = Xs);
4603
- const d = i.alphaMode || Es.OPAQUE;
4604
- if (d === Es.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, d === Es.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== nt && (c.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new de(1, 1), i.normalTexture.scale !== void 0)) {
4603
+ const f = i.alphaMode || Es.OPAQUE;
4604
+ if (f === Es.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, f === Es.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== nt && (c.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new fe(1, 1), i.normalTexture.scale !== void 0)) {
4605
4605
  const u = i.normalTexture.scale;
4606
4606
  a.normalScale.set(u, u);
4607
4607
  }
@@ -4611,7 +4611,7 @@ class Ga {
4611
4611
  }
4612
4612
  return i.emissiveTexture !== void 0 && o !== nt && c.push(t.assignTexture(a, "emissiveMap", i.emissiveTexture, je)), Promise.all(c).then(function() {
4613
4613
  const u = new o(a);
4614
- return i.name && (u.name = i.name), He(u, i), t.associations.set(u, { materials: e }), i.extensions && $e(s, u, i), u;
4614
+ return i.name && (u.name = i.name), He(u, i), t.associations.set(u, { materials: e }), i.extensions && et(s, u, i), u;
4615
4615
  });
4616
4616
  }
4617
4617
  /**
@@ -4622,7 +4622,7 @@ class Ga {
4622
4622
  * @return {string}
4623
4623
  */
4624
4624
  createUniqueName(e) {
4625
- const t = Lt.sanitizeNodeName(e || "");
4625
+ const t = Nt.sanitizeNodeName(e || "");
4626
4626
  return t in this.nodeNamesUsed ? t + "_" + ++this.nodeNamesUsed[t] : (this.nodeNamesUsed[t] = 0, t);
4627
4627
  }
4628
4628
  /**
@@ -4643,12 +4643,12 @@ class Ga {
4643
4643
  }
4644
4644
  const o = [];
4645
4645
  for (let a = 0, l = e.length; a < l; a++) {
4646
- const c = e[a], d = Ua(c), u = s[d];
4646
+ const c = e[a], f = Ua(c), u = s[f];
4647
4647
  if (u)
4648
4648
  o.push(u.promise);
4649
4649
  else {
4650
4650
  let A;
4651
- c.extensions && c.extensions[Y.KHR_DRACO_MESH_COMPRESSION] ? A = i(c) : A = Nn(new rt(), c, t), s[d] = { primitive: c, promise: A }, o.push(A);
4651
+ c.extensions && c.extensions[Y.KHR_DRACO_MESH_COMPRESSION] ? A = i(c) : A = Nn(new rt(), c, t), s[f] = { primitive: c, promise: A }, o.push(A);
4652
4652
  }
4653
4653
  }
4654
4654
  return Promise.all(o);
@@ -4663,28 +4663,28 @@ class Ga {
4663
4663
  loadMesh(e) {
4664
4664
  const t = this, n = this.json, s = this.extensions, i = n.meshes[e], o = i.primitives, a = [];
4665
4665
  for (let l = 0, c = o.length; l < c; l++) {
4666
- const d = o[l].material === void 0 ? ka(this.cache) : this.getDependency("material", o[l].material);
4667
- a.push(d);
4666
+ const f = o[l].material === void 0 ? ka(this.cache) : this.getDependency("material", o[l].material);
4667
+ a.push(f);
4668
4668
  }
4669
4669
  return a.push(t.loadGeometries(o)), Promise.all(a).then(function(l) {
4670
- const c = l.slice(0, l.length - 1), d = l[l.length - 1], u = [];
4671
- for (let m = 0, b = d.length; m < b; m++) {
4672
- const h = d[m], p = o[m];
4673
- let w;
4674
- const I = c[m];
4670
+ const c = l.slice(0, l.length - 1), f = l[l.length - 1], u = [];
4671
+ for (let m = 0, b = f.length; m < b; m++) {
4672
+ const h = f[m], p = o[m];
4673
+ let C;
4674
+ const v = c[m];
4675
4675
  if (p.mode === ve.TRIANGLES || p.mode === ve.TRIANGLE_STRIP || p.mode === ve.TRIANGLE_FAN || p.mode === void 0)
4676
- w = i.isSkinnedMesh === !0 ? new jo(h, I) : new L(h, I), w.isSkinnedMesh === !0 && w.normalizeSkinWeights(), p.mode === ve.TRIANGLE_STRIP ? w.geometry = On(w.geometry, ei) : p.mode === ve.TRIANGLE_FAN && (w.geometry = On(w.geometry, Ns));
4676
+ C = i.isSkinnedMesh === !0 ? new jo(h, v) : new L(h, v), C.isSkinnedMesh === !0 && C.normalizeSkinWeights(), p.mode === ve.TRIANGLE_STRIP ? C.geometry = On(C.geometry, ei) : p.mode === ve.TRIANGLE_FAN && (C.geometry = On(C.geometry, Ns));
4677
4677
  else if (p.mode === ve.LINES)
4678
- w = new Hs(h, I);
4678
+ C = new Hs(h, v);
4679
4679
  else if (p.mode === ve.LINE_STRIP)
4680
- w = new We(h, I);
4680
+ C = new We(h, v);
4681
4681
  else if (p.mode === ve.LINE_LOOP)
4682
- w = new Fo(h, I);
4682
+ C = new Fo(h, v);
4683
4683
  else if (p.mode === ve.POINTS)
4684
- w = new Jt(h, I);
4684
+ C = new _t(h, v);
4685
4685
  else
4686
4686
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + p.mode);
4687
- Object.keys(w.geometry.morphAttributes).length > 0 && Fa(w, i), w.name = t.createUniqueName(i.name || "mesh_" + e), He(w, i), p.extensions && $e(s, w, p), t.assignFinalMaterial(w), u.push(w);
4687
+ Object.keys(C.geometry.morphAttributes).length > 0 && Fa(C, i), C.name = t.createUniqueName(i.name || "mesh_" + e), He(C, i), p.extensions && et(s, C, p), t.assignFinalMaterial(C), u.push(C);
4688
4688
  }
4689
4689
  for (let m = 0, b = u.length; m < b; m++)
4690
4690
  t.associations.set(u[m], {
@@ -4692,9 +4692,9 @@ class Ga {
4692
4692
  primitives: m
4693
4693
  });
4694
4694
  if (u.length === 1)
4695
- return i.extensions && $e(s, u[0], i), u[0];
4696
- const A = new _t();
4697
- i.extensions && $e(s, A, i), t.associations.set(A, { meshes: e });
4695
+ return i.extensions && et(s, u[0], i), u[0];
4696
+ const A = new $t();
4697
+ i.extensions && et(s, A, i), t.associations.set(A, { meshes: e });
4698
4698
  for (let m = 0, b = u.length; m < b; m++)
4699
4699
  A.add(u[m]);
4700
4700
  return A;
@@ -4714,7 +4714,7 @@ class Ga {
4714
4714
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
4715
4715
  return;
4716
4716
  }
4717
- return n.type === "perspective" ? t = new ii(St.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : n.type === "orthographic" && (t = new qn(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), n.name && (t.name = this.createUniqueName(n.name)), He(t, n), Promise.resolve(t);
4717
+ return n.type === "perspective" ? t = new ii(Lt.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : n.type === "orthographic" && (t = new qn(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), n.name && (t.name = this.createUniqueName(n.name)), He(t, n), Promise.resolve(t);
4718
4718
  }
4719
4719
  /**
4720
4720
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
@@ -4729,7 +4729,7 @@ class Ga {
4729
4729
  n.push(this._loadNodeShallow(t.joints[s]));
4730
4730
  return t.inverseBindMatrices !== void 0 ? n.push(this.getDependency("accessor", t.inverseBindMatrices)) : n.push(null), Promise.all(n).then(function(s) {
4731
4731
  const i = s.pop(), o = s, a = [], l = [];
4732
- for (let c = 0, d = o.length; c < d; c++) {
4732
+ for (let c = 0, f = o.length; c < f; c++) {
4733
4733
  const u = o[c];
4734
4734
  if (u) {
4735
4735
  a.push(u);
@@ -4749,30 +4749,30 @@ class Ga {
4749
4749
  * @return {Promise<AnimationClip>}
4750
4750
  */
4751
4751
  loadAnimation(e) {
4752
- const t = this.json, n = this, s = t.animations[e], i = s.name ? s.name : "animation_" + e, o = [], a = [], l = [], c = [], d = [];
4752
+ const t = this.json, n = this, s = t.animations[e], i = s.name ? s.name : "animation_" + e, o = [], a = [], l = [], c = [], f = [];
4753
4753
  for (let u = 0, A = s.channels.length; u < A; u++) {
4754
- const m = s.channels[u], b = s.samplers[m.sampler], h = m.target, p = h.node, w = s.parameters !== void 0 ? s.parameters[b.input] : b.input, I = s.parameters !== void 0 ? s.parameters[b.output] : b.output;
4755
- h.node !== void 0 && (o.push(this.getDependency("node", p)), a.push(this.getDependency("accessor", w)), l.push(this.getDependency("accessor", I)), c.push(b), d.push(h));
4754
+ const m = s.channels[u], b = s.samplers[m.sampler], h = m.target, p = h.node, C = s.parameters !== void 0 ? s.parameters[b.input] : b.input, v = s.parameters !== void 0 ? s.parameters[b.output] : b.output;
4755
+ h.node !== void 0 && (o.push(this.getDependency("node", p)), a.push(this.getDependency("accessor", C)), l.push(this.getDependency("accessor", v)), c.push(b), f.push(h));
4756
4756
  }
4757
4757
  return Promise.all([
4758
4758
  Promise.all(o),
4759
4759
  Promise.all(a),
4760
4760
  Promise.all(l),
4761
4761
  Promise.all(c),
4762
- Promise.all(d)
4762
+ Promise.all(f)
4763
4763
  ]).then(function(u) {
4764
- const A = u[0], m = u[1], b = u[2], h = u[3], p = u[4], w = [];
4765
- for (let x = 0, f = A.length; x < f; x++) {
4766
- const v = A[x], M = m[x], D = b[x], E = h[x], U = p[x];
4767
- if (v === void 0) continue;
4768
- v.updateMatrix && v.updateMatrix();
4769
- const Z = n._createAnimationTracks(v, M, D, E, U);
4764
+ const A = u[0], m = u[1], b = u[2], h = u[3], p = u[4], C = [];
4765
+ for (let w = 0, d = A.length; w < d; w++) {
4766
+ const x = A[w], M = m[w], D = b[w], E = h[w], U = p[w];
4767
+ if (x === void 0) continue;
4768
+ x.updateMatrix && x.updateMatrix();
4769
+ const Z = n._createAnimationTracks(x, M, D, E, U);
4770
4770
  if (Z)
4771
4771
  for (let _ = 0; _ < Z.length; _++)
4772
- w.push(Z[_]);
4772
+ C.push(Z[_]);
4773
4773
  }
4774
- const I = new zo(i, void 0, w);
4775
- return He(I, s), I;
4774
+ const v = new zo(i, void 0, C);
4775
+ return He(v, s), v;
4776
4776
  });
4777
4777
  }
4778
4778
  createNodeMesh(e) {
@@ -4795,7 +4795,7 @@ class Ga {
4795
4795
  */
4796
4796
  loadNode(e) {
4797
4797
  const t = this.json, n = this, s = t.nodes[e], i = n._loadNodeShallow(e), o = [], a = s.children || [];
4798
- for (let c = 0, d = a.length; c < d; c++)
4798
+ for (let c = 0, f = a.length; c < f; c++)
4799
4799
  o.push(n.getDependency("node", a[c]));
4800
4800
  const l = s.skin === void 0 ? Promise.resolve(null) : n.getDependency("skin", s.skin);
4801
4801
  return Promise.all([
@@ -4803,17 +4803,17 @@ class Ga {
4803
4803
  Promise.all(o),
4804
4804
  l
4805
4805
  ]).then(function(c) {
4806
- const d = c[0], u = c[1], A = c[2];
4807
- A !== null && d.traverse(function(m) {
4806
+ const f = c[0], u = c[1], A = c[2];
4807
+ A !== null && f.traverse(function(m) {
4808
4808
  m.isSkinnedMesh && m.bind(A, Wa);
4809
4809
  });
4810
4810
  for (let m = 0, b = u.length; m < b; m++)
4811
- d.add(u[m]);
4812
- if (d.userData.pivot !== void 0 && u.length > 0) {
4813
- const m = d.userData.pivot, b = u[0];
4814
- d.pivot = new S().fromArray(m), d.position.x -= m[0], d.position.y -= m[1], d.position.z -= m[2], b.position.set(0, 0, 0), delete d.userData.pivot;
4811
+ f.add(u[m]);
4812
+ if (f.userData.pivot !== void 0 && u.length > 0) {
4813
+ const m = f.userData.pivot, b = u[0];
4814
+ f.pivot = new S().fromArray(m), f.position.x -= m[0], f.position.y -= m[1], f.position.z -= m[2], b.position.set(0, 0, 0), delete f.userData.pivot;
4815
4815
  }
4816
- return d;
4816
+ return f;
4817
4817
  });
4818
4818
  }
4819
4819
  // ._loadNodeShallow() parses a single node.
@@ -4832,22 +4832,22 @@ class Ga {
4832
4832
  }).forEach(function(c) {
4833
4833
  a.push(c);
4834
4834
  }), this.nodeCache[e] = Promise.all(a).then(function(c) {
4835
- let d;
4836
- if (i.isBone === !0 ? d = new Wo() : c.length > 1 ? d = new _t() : c.length === 1 ? d = c[0] : d = new gt(), d !== c[0])
4835
+ let f;
4836
+ if (i.isBone === !0 ? f = new Wo() : c.length > 1 ? f = new $t() : c.length === 1 ? f = c[0] : f = new gt(), f !== c[0])
4837
4837
  for (let u = 0, A = c.length; u < A; u++)
4838
- d.add(c[u]);
4839
- if (i.name && (d.userData.name = i.name, d.name = o), He(d, i), i.extensions && $e(n, d, i), i.matrix !== void 0) {
4838
+ f.add(c[u]);
4839
+ if (i.name && (f.userData.name = i.name, f.name = o), He(f, i), i.extensions && et(n, f, i), i.matrix !== void 0) {
4840
4840
  const u = new Ce();
4841
- u.fromArray(i.matrix), d.applyMatrix4(u);
4841
+ u.fromArray(i.matrix), f.applyMatrix4(u);
4842
4842
  } else
4843
- i.translation !== void 0 && d.position.fromArray(i.translation), i.rotation !== void 0 && d.quaternion.fromArray(i.rotation), i.scale !== void 0 && d.scale.fromArray(i.scale);
4844
- if (!s.associations.has(d))
4845
- s.associations.set(d, {});
4843
+ i.translation !== void 0 && f.position.fromArray(i.translation), i.rotation !== void 0 && f.quaternion.fromArray(i.rotation), i.scale !== void 0 && f.scale.fromArray(i.scale);
4844
+ if (!s.associations.has(f))
4845
+ s.associations.set(f, {});
4846
4846
  else if (i.mesh !== void 0 && s.meshCache.refs[i.mesh] > 1) {
4847
- const u = s.associations.get(d);
4848
- s.associations.set(d, { ...u });
4847
+ const u = s.associations.get(f);
4848
+ s.associations.set(f, { ...u });
4849
4849
  }
4850
- return s.associations.get(d).nodes = e, d;
4850
+ return s.associations.get(f).nodes = e, f;
4851
4851
  }), this.nodeCache[e];
4852
4852
  }
4853
4853
  /**
@@ -4858,21 +4858,21 @@ class Ga {
4858
4858
  * @return {Promise<Group>}
4859
4859
  */
4860
4860
  loadScene(e) {
4861
- const t = this.extensions, n = this.json.scenes[e], s = this, i = new _t();
4862
- n.name && (i.name = s.createUniqueName(n.name)), He(i, n), n.extensions && $e(t, i, n);
4861
+ const t = this.extensions, n = this.json.scenes[e], s = this, i = new $t();
4862
+ n.name && (i.name = s.createUniqueName(n.name)), He(i, n), n.extensions && et(t, i, n);
4863
4863
  const o = n.nodes || [], a = [];
4864
4864
  for (let l = 0, c = o.length; l < c; l++)
4865
4865
  a.push(s.getDependency("node", o[l]));
4866
4866
  return Promise.all(a).then(function(l) {
4867
- for (let d = 0, u = l.length; d < u; d++) {
4868
- const A = l[d];
4867
+ for (let f = 0, u = l.length; f < u; f++) {
4868
+ const A = l[f];
4869
4869
  A.parent !== null ? i.add(ua(A)) : i.add(A);
4870
4870
  }
4871
- const c = (d) => {
4871
+ const c = (f) => {
4872
4872
  const u = /* @__PURE__ */ new Map();
4873
4873
  for (const [A, m] of s.associations)
4874
4874
  (A instanceof Dt || A instanceof nn) && u.set(A, m);
4875
- return d.traverse((A) => {
4875
+ return f.traverse((A) => {
4876
4876
  const m = s.associations.get(A);
4877
4877
  m != null && u.set(A, m);
4878
4878
  }), u;
@@ -4886,34 +4886,34 @@ class Ga {
4886
4886
  m.morphTargetInfluences && l.push(m.name ? m.name : m.uuid);
4887
4887
  }
4888
4888
  Ve[i.path] === Ve.weights ? (c(e), e.isGroup && e.children.forEach(c)) : l.push(a);
4889
- let d;
4889
+ let f;
4890
4890
  switch (Ve[i.path]) {
4891
4891
  case Ve.weights:
4892
- d = rn;
4892
+ f = rn;
4893
4893
  break;
4894
4894
  case Ve.rotation:
4895
- d = an;
4895
+ f = an;
4896
4896
  break;
4897
4897
  case Ve.translation:
4898
4898
  case Ve.scale:
4899
- d = on;
4899
+ f = on;
4900
4900
  break;
4901
4901
  default:
4902
4902
  switch (n.itemSize) {
4903
4903
  case 1:
4904
- d = rn;
4904
+ f = rn;
4905
4905
  break;
4906
4906
  case 2:
4907
4907
  case 3:
4908
4908
  default:
4909
- d = on;
4909
+ f = on;
4910
4910
  break;
4911
4911
  }
4912
4912
  break;
4913
4913
  }
4914
4914
  const u = s.interpolation !== void 0 ? Ha[s.interpolation] : Ys, A = this._getArrayFromAccessor(n);
4915
4915
  for (let m = 0, b = l.length; m < b; m++) {
4916
- const h = new d(
4916
+ const h = new f(
4917
4917
  l[m] + "." + Ve[i.path],
4918
4918
  t.array,
4919
4919
  A,
@@ -4949,8 +4949,8 @@ function Ba(r, e, t) {
4949
4949
  new S(l[0], l[1], l[2]),
4950
4950
  new S(c[0], c[1], c[2])
4951
4951
  ), a.normalized) {
4952
- const d = js(At[a.componentType]);
4953
- s.min.multiplyScalar(d), s.max.multiplyScalar(d);
4952
+ const f = js(At[a.componentType]);
4953
+ s.min.multiplyScalar(f), s.max.multiplyScalar(f);
4954
4954
  }
4955
4955
  } else {
4956
4956
  console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
@@ -4961,7 +4961,7 @@ function Ba(r, e, t) {
4961
4961
  const i = e.targets;
4962
4962
  if (i !== void 0) {
4963
4963
  const a = new S(), l = new S();
4964
- for (let c = 0, d = i.length; c < d; c++) {
4964
+ for (let c = 0, f = i.length; c < f; c++) {
4965
4965
  const u = i[c];
4966
4966
  if (u.POSITION !== void 0) {
4967
4967
  const A = t.json.accessors[u.POSITION], m = A.min, b = A.max;
@@ -5006,7 +5006,7 @@ let Fs = null;
5006
5006
  function Xa(r) {
5007
5007
  Fs = r;
5008
5008
  }
5009
- const Se = is({
5009
+ const Se = os({
5010
5010
  scripts: []
5011
5011
  });
5012
5012
  function Ai() {
@@ -5063,7 +5063,7 @@ function Qa(r, e = 0) {
5063
5063
  );
5064
5064
  return n ? n[1] : `脚本${e + 1}`;
5065
5065
  }
5066
- const C = {
5066
+ const I = {
5067
5067
  /** 场景模式 */
5068
5068
  mode: "",
5069
5069
  /** 控制器模式 */
@@ -5087,70 +5087,70 @@ const C = {
5087
5087
  /** 当前选中的物体 */
5088
5088
  selectedObject: null
5089
5089
  };
5090
- let ts = !1, at = !1, Ye = null;
5090
+ let ss = !1, at = !1, Ke = null;
5091
5091
  const Ja = 16755200;
5092
- let Us = [], Kt = [], Ht = !0, ot = null, Te = null, ss = null, Ke = [];
5092
+ let Us = [], Zt = [], kt = !0, ot = null, Te = null, ns = null, Ze = [];
5093
5093
  const lt = /* @__PURE__ */ new Map();
5094
- let kt, ns = null, Rt = null, Pt = null;
5094
+ let jt, is = null, Rt = null, Pt = null;
5095
5095
  async function _a(r, e = "edit", t) {
5096
- C.container = r, C.mode = e, el(), sl(), il(), t && (await Nl(t.scene, e, t.dataPanels, t.waters, t.textures, t.ambientLight, t.scripts), t != null && t.camera && (C.defaultMainCamera = t.camera, gi(!0))), rl(), ol(), kt && C.orbitControls && (C.orbitControls.target.fromArray(kt), C.orbitControls.update()), tl(), zs(), bi(), Rt = (n) => ul(n), Pt = () => ll(), e === "edit" && r.addEventListener("click", Rt), window.addEventListener("resize", Pt), t || al(), e === "edit" && nl(), Ol();
5096
+ I.container = r, I.mode = e, el(), sl(), il(), t && (await Nl(t.scene, e, t.dataPanels, t.waters, t.textures, t.ambientLight, t.scripts), t != null && t.camera && (I.defaultMainCamera = t.camera, gi(!0))), rl(), ol(), jt && I.orbitControls && (I.orbitControls.target.fromArray(jt), I.orbitControls.update()), tl(), zs(), bi(), Rt = (n) => ul(n), Pt = () => ll(), e === "edit" && r.addEventListener("click", Rt), window.addEventListener("resize", Pt), t || al(), e === "edit" && nl(), Ol();
5097
5097
  }
5098
5098
  function $a() {
5099
5099
  return window.devicePixelRatio;
5100
5100
  }
5101
5101
  function el() {
5102
5102
  const r = $a(), e = new R.WebGLRenderer({ antialias: !0, alpha: !0 });
5103
- e.setSize(C.container.clientWidth, C.container.clientHeight), e.setPixelRatio(r), e.toneMapping = R.NeutralToneMapping, e.toneMappingExposure = 1, console.log(
5104
- `[Renderer] css=${C.container.clientWidth}×${C.container.clientHeight}, dpr=${window.devicePixelRatio}, targetRatio=${r}, antialias=true`
5105
- ), C.container.appendChild(e.domElement), C.renderer = e;
5103
+ e.setSize(I.container.clientWidth, I.container.clientHeight), e.setPixelRatio(r), e.toneMapping = R.NeutralToneMapping, e.toneMappingExposure = 1, console.log(
5104
+ `[Renderer] css=${I.container.clientWidth}×${I.container.clientHeight}, dpr=${window.devicePixelRatio}, targetRatio=${r}, antialias=true`
5105
+ ), I.container.appendChild(e.domElement), I.renderer = e;
5106
5106
  }
5107
5107
  function tl() {
5108
- if (!C.renderer || !C.scene || !C.camera) return;
5109
- const r = C.renderer.getPixelRatio(), e = C.container.clientWidth * r, t = C.container.clientHeight * r, n = new R.WebGLRenderTarget(e, t, {
5108
+ if (!I.renderer || !I.scene || !I.camera) return;
5109
+ const r = I.renderer.getPixelRatio(), e = I.container.clientWidth * r, t = I.container.clientHeight * r, n = new R.WebGLRenderTarget(e, t, {
5110
5110
  type: R.HalfFloatType,
5111
5111
  samples: 4
5112
5112
  });
5113
5113
  n.texture.name = "EffectComposer.rt1";
5114
- const s = new Ir(C.renderer, n);
5115
- s.addPass(new Cr(C.scene, C.camera)), s.addPass(new wr()), Ye = s;
5114
+ const s = new Ir(I.renderer, n);
5115
+ s.addPass(new Cr(I.scene, I.camera)), s.addPass(new wr()), Ke = s;
5116
5116
  }
5117
5117
  function sl() {
5118
- if (C.scene = new R.Scene(), C.scene.name = "sl_scene", C.renderer) {
5119
- const r = es(C.renderer);
5120
- r ? (C.scene.environment = r, C.scene.environmentIntensity = 1) : console.warn("[初始化] 环境贴图生成失败,场景将没有 IBL 间接光照");
5118
+ if (I.scene = new R.Scene(), I.scene.name = "sl_scene", I.renderer) {
5119
+ const r = ts(I.renderer);
5120
+ r ? (I.scene.environment = r, I.scene.environmentIntensity = 1) : console.warn("[初始化] 环境贴图生成失败,场景将没有 IBL 间接光照");
5121
5121
  }
5122
5122
  }
5123
5123
  function nl() {
5124
5124
  const r = new R.GridHelper(30, 30, 8956671, 3364232);
5125
- r.name = "地板", r.userData.type = "initFloor", C.scene.add(r), C.gridHelper = r;
5125
+ r.name = "地板", r.userData.type = "initFloor", I.scene.add(r), I.gridHelper = r;
5126
5126
  }
5127
5127
  function il() {
5128
- const r = C.container, e = r.clientWidth / r.clientHeight, t = new R.PerspectiveCamera(45, e, 0.1, 1e3);
5129
- t.position.set(0, 6, 15), t.lookAt(0, 0, 0), C.camera = t;
5128
+ const r = I.container, e = r.clientWidth / r.clientHeight, t = new R.PerspectiveCamera(45, e, 0.1, 1e3);
5129
+ t.position.set(0, 6, 15), t.lookAt(0, 0, 0), I.camera = t;
5130
5130
  }
5131
5131
  function gi(r = !1) {
5132
- if (!C.defaultMainCamera) return;
5133
- const e = C.defaultMainCamera;
5132
+ if (!I.defaultMainCamera) return;
5133
+ const e = I.defaultMainCamera;
5134
5134
  if (r) {
5135
- C.camera.position.set(
5135
+ I.camera.position.set(
5136
5136
  e.position[0],
5137
5137
  e.position[1],
5138
5138
  e.position[2]
5139
- ), C.camera.rotation.set(
5139
+ ), I.camera.rotation.set(
5140
5140
  e.rotation[0],
5141
5141
  e.rotation[1],
5142
5142
  e.rotation[2]
5143
- ), C.camera.updateProjectionMatrix(), kt = e.target;
5143
+ ), I.camera.updateProjectionMatrix(), jt = e.target;
5144
5144
  return;
5145
5145
  } else
5146
5146
  Ci(""), fs();
5147
- if (!C.camera || !C.orbitControls) return;
5148
- const t = C.camera.position.clone(), n = C.orbitControls.target.clone(), s = new R.Vector3(
5147
+ if (!I.camera || !I.orbitControls) return;
5148
+ const t = I.camera.position.clone(), n = I.orbitControls.target.clone(), s = new R.Vector3(
5149
5149
  e.position[0],
5150
5150
  e.position[1],
5151
5151
  e.position[2]
5152
5152
  ), i = e.target ? new R.Vector3(e.target[0], e.target[1], e.target[2]) : new R.Vector3(0, 0, 0);
5153
- C.orbitControls.enabled = !1, new fe.Tween({
5153
+ I.orbitControls.enabled = !1, new he.Tween({
5154
5154
  x: t.x,
5155
5155
  y: t.y,
5156
5156
  z: t.z,
@@ -5167,42 +5167,42 @@ function gi(r = !1) {
5167
5167
  tz: i.z
5168
5168
  },
5169
5169
  1e3
5170
- ).easing(fe.Easing.Quadratic.InOut).onUpdate((o) => {
5171
- C.camera.position.set(o.x, o.y, o.z), C.orbitControls.target.set(o.tx, o.ty, o.tz), C.orbitControls.update();
5170
+ ).easing(he.Easing.Quadratic.InOut).onUpdate((o) => {
5171
+ I.camera.position.set(o.x, o.y, o.z), I.orbitControls.target.set(o.tx, o.ty, o.tz), I.orbitControls.update();
5172
5172
  }).onComplete(() => {
5173
- kt = e.target, C.orbitControls.enabled = !0;
5173
+ jt = e.target, I.orbitControls.enabled = !0;
5174
5174
  }).start();
5175
5175
  }
5176
5176
  function ol() {
5177
- const r = new Yo(C.camera, C.renderer.domElement);
5177
+ const r = new Yo(I.camera, I.renderer.domElement);
5178
5178
  r.minDistance = 0, r.maxDistance = 1 / 0, r.addEventListener("start", () => {
5179
- ts = !1;
5179
+ ss = !1;
5180
5180
  }), r.addEventListener("change", () => {
5181
- ts = !0;
5181
+ ss = !0;
5182
5182
  }), r.addEventListener("end", () => {
5183
- ts && (at = !0, setTimeout(() => {
5183
+ ss && (at = !0, setTimeout(() => {
5184
5184
  at = !1;
5185
5185
  }, 200));
5186
- }), C.orbitControls = r;
5186
+ }), I.orbitControls = r;
5187
5187
  }
5188
5188
  function rl() {
5189
5189
  const r = new rr(
5190
- C.camera,
5191
- C.renderer.domElement
5190
+ I.camera,
5191
+ I.renderer.domElement
5192
5192
  );
5193
5193
  r.addEventListener("dragging-changed", (e) => {
5194
- C.orbitControls.enabled = !e.value, e.value || (at = !0, setTimeout(() => {
5194
+ I.orbitControls.enabled = !e.value, e.value || (at = !0, setTimeout(() => {
5195
5195
  at = !1;
5196
5196
  }, 200));
5197
5197
  }), r.addEventListener("objectChange", () => {
5198
- const e = C.selectedObject;
5198
+ const e = I.selectedObject;
5199
5199
  if (Te && e && Te(e), e && e.type === "DirectionalLight") {
5200
5200
  const t = e.userData.helper;
5201
5201
  t && t.update && t.update();
5202
5202
  }
5203
- }), C.scene.add(r.getHelper()), C.transformControls = r;
5203
+ }), I.scene.add(r.getHelper()), I.transformControls = r;
5204
5204
  }
5205
- function yi(r = C.scene) {
5205
+ function yi(r = I.scene) {
5206
5206
  if (!r || r.children.some((t) => t.type === "AmbientLight")) return null;
5207
5207
  const e = new R.AmbientLight(
5208
5208
  Rl,
@@ -5211,18 +5211,18 @@ function yi(r = C.scene) {
5211
5211
  return e.name = "环境光", r.add(e), e;
5212
5212
  }
5213
5213
  function al() {
5214
- yi(C.scene);
5214
+ yi(I.scene);
5215
5215
  }
5216
5216
  function bi() {
5217
5217
  var e, t;
5218
- ns = requestAnimationFrame(bi), fe.update(), (e = C.orbitControls) == null || e.update(), C.mode === "run" && Ye && C.scene && C.camera ? Ye.render() : (t = C.renderer) == null || t.render(C.scene, C.camera), C.scene && C.camera && kr(C.scene, C.camera), Ht && C.scene && (Kt = [], C.scene.traverse((n) => {
5219
- n.userData.isWater && n.type === "Mesh" && Kt.push(n);
5220
- }), Ht = !1);
5221
- for (let n = 0; n < Kt.length; n++) {
5222
- const s = Kt[n], i = s.material;
5218
+ is = requestAnimationFrame(bi), he.update(), (e = I.orbitControls) == null || e.update(), I.mode === "run" && Ke && I.scene && I.camera ? Ke.render() : (t = I.renderer) == null || t.render(I.scene, I.camera), I.scene && I.camera && kr(I.scene, I.camera), kt && I.scene && (Zt = [], I.scene.traverse((n) => {
5219
+ n.userData.isWater && n.type === "Mesh" && Zt.push(n);
5220
+ }), kt = !1);
5221
+ for (let n = 0; n < Zt.length; n++) {
5222
+ const s = Zt[n], i = s.material;
5223
5223
  if (i.uniforms && i.uniforms.time) {
5224
5224
  const o = s.userData.waterTimeScale ?? 1;
5225
- i.uniforms.time.value += 1 / 60 * o, C.camera && i.uniforms.eye && i.uniforms.eye.value.copy(C.camera.position);
5225
+ i.uniforms.time.value += 1 / 60 * o, I.camera && i.uniforms.eye && i.uniforms.eye.value.copy(I.camera.position);
5226
5226
  continue;
5227
5227
  }
5228
5228
  if (i.normalMap) {
@@ -5232,9 +5232,9 @@ function bi() {
5232
5232
  }
5233
5233
  }
5234
5234
  function ll() {
5235
- if (!C.container || !C.camera || !C.renderer) return;
5236
- const r = C.container.clientWidth, e = C.container.clientHeight;
5237
- r === 0 || e === 0 || (C.camera.aspect = r / e, C.camera.updateProjectionMatrix(), C.renderer.setSize(r, e), Ye && Ye.setSize(r, e), jr(r, e));
5235
+ if (!I.container || !I.camera || !I.renderer) return;
5236
+ const r = I.container.clientWidth, e = I.container.clientHeight;
5237
+ r === 0 || e === 0 || (I.camera.aspect = r / e, I.camera.updateProjectionMatrix(), I.renderer.setSize(r, e), Ke && Ke.setSize(r, e), jr(r, e));
5238
5238
  }
5239
5239
  function ps(r) {
5240
5240
  let e = r;
@@ -5242,7 +5242,7 @@ function ps(r) {
5242
5242
  if (e.isTransformControlsRoot) return;
5243
5243
  e = e.parent;
5244
5244
  }
5245
- 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, Ii(r), ot == null || ot(r));
5245
+ 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, Ii(r), ot == null || ot(r));
5246
5246
  }
5247
5247
  let xe = null;
5248
5248
  function cl(r) {
@@ -5252,10 +5252,10 @@ function Os(r) {
5252
5252
  xe == null || xe(r);
5253
5253
  }
5254
5254
  function xi(r) {
5255
- C.transformControlsMode = r, C.transformControls && C.transformControls.setMode(C.transformControlsMode);
5255
+ I.transformControlsMode = r, I.transformControls && I.transformControls.setMode(I.transformControlsMode);
5256
5256
  }
5257
5257
  function Ii(r) {
5258
- if (C.mode !== "edit") {
5258
+ if (I.mode !== "edit") {
5259
5259
  fs();
5260
5260
  return;
5261
5261
  }
@@ -5275,7 +5275,7 @@ function fs() {
5275
5275
  Us = [];
5276
5276
  }
5277
5277
  function Qs() {
5278
- C.selectedObject && (fs(), C.transformControls.detach(), C.selectedObject = null, ot == null || ot(null));
5278
+ I.selectedObject && (fs(), I.transformControls.detach(), I.selectedObject = null, ot == null || ot(null));
5279
5279
  }
5280
5280
  function Ci(r) {
5281
5281
  let e = null;
@@ -5285,7 +5285,7 @@ function Ci(r) {
5285
5285
  });
5286
5286
  }), e && (e.children.forEach((t) => {
5287
5287
  t.name && t.name.startsWith("DataPanel_") && (t.visible = !0);
5288
- }), Ii(e), C.selectedObject = e, setTimeout(() => {
5288
+ }), Ii(e), I.selectedObject = e, setTimeout(() => {
5289
5289
  wi(e);
5290
5290
  }, 500));
5291
5291
  }
@@ -5298,20 +5298,20 @@ function ul(r) {
5298
5298
  e ? ps(e) : Qs();
5299
5299
  }
5300
5300
  function dl(r) {
5301
- const e = C.renderer.domElement.getBoundingClientRect(), t = new R.Vector2(
5301
+ const e = I.renderer.domElement.getBoundingClientRect(), t = new R.Vector2(
5302
5302
  (r.clientX - e.left) / e.width * 2 - 1,
5303
5303
  -((r.clientY - e.top) / e.height) * 2 + 1
5304
5304
  ), n = new R.Raycaster();
5305
- n.setFromCamera(t, C.camera);
5305
+ n.setFromCamera(t, I.camera);
5306
5306
  const s = [], i = (a) => {
5307
5307
  a.isTransformControlsRoot || a.isLine || a.isLineSegments || ((a.userData.isMovable || a.userData.type === "lightHelper") && s.push(a), a.children.forEach(i));
5308
5308
  };
5309
- i(C.scene);
5309
+ i(I.scene);
5310
5310
  const o = n.intersectObjects(s);
5311
5311
  if (o.length === 0) return null;
5312
5312
  for (const a of o) {
5313
5313
  const l = Hn(a.object);
5314
- if (l !== C.selectedObject)
5314
+ if (l !== I.selectedObject)
5315
5315
  return l;
5316
5316
  }
5317
5317
  return Hn(o[0].object);
@@ -5340,7 +5340,7 @@ function Hn(r) {
5340
5340
  return r;
5341
5341
  }
5342
5342
  function wi(r, e = 500) {
5343
- if (!C.camera || !C.orbitControls) {
5343
+ if (!I.camera || !I.orbitControls) {
5344
5344
  console.warn(
5345
5345
  "[focusOnObject] 编辑器尚未初始化或已销毁,无法执行聚焦操作。请确保已调用 initEditor()"
5346
5346
  );
@@ -5354,14 +5354,14 @@ function wi(r, e = 500) {
5354
5354
  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);
5355
5355
  const n = new R.Vector3();
5356
5356
  r.getWorldPosition(n);
5357
- const i = new R.Box3().setFromObject(r).getSize(new R.Vector3()), o = Math.max(i.x, i.y, i.z) * 0.5, a = Math.max(o * 3.5, 5), l = new R.Vector3().copy(C.camera.position).sub(n).normalize();
5357
+ const i = new R.Box3().setFromObject(r).getSize(new R.Vector3()), o = Math.max(i.x, i.y, i.z) * 0.5, a = Math.max(o * 3.5, 5), l = new R.Vector3().copy(I.camera.position).sub(n).normalize();
5358
5358
  l.lengthSq() < 1e-3 && l.set(0, 0, 1);
5359
- const c = n.clone().add(l.multiplyScalar(a)), d = C.camera.position.clone(), u = C.orbitControls.target.clone();
5359
+ const c = n.clone().add(l.multiplyScalar(a)), f = I.camera.position.clone(), u = I.orbitControls.target.clone();
5360
5360
  try {
5361
- new fe.Tween({
5362
- x: d.x,
5363
- y: d.y,
5364
- z: d.z,
5361
+ new he.Tween({
5362
+ x: f.x,
5363
+ y: f.y,
5364
+ z: f.z,
5365
5365
  tx: u.x,
5366
5366
  ty: u.y,
5367
5367
  tz: u.z
@@ -5375,8 +5375,8 @@ function wi(r, e = 500) {
5375
5375
  tz: n.z
5376
5376
  },
5377
5377
  e
5378
- ).easing(fe.Easing.Quadratic.InOut).onUpdate((A) => {
5379
- C.camera.position.set(A.x, A.y, A.z), C.orbitControls.target.set(A.tx, A.ty, A.tz), C.orbitControls.update();
5378
+ ).easing(he.Easing.Quadratic.InOut).onUpdate((A) => {
5379
+ I.camera.position.set(A.x, A.y, A.z), I.orbitControls.target.set(A.tx, A.ty, A.tz), I.orbitControls.update();
5380
5380
  }).start();
5381
5381
  } catch (A) {
5382
5382
  console.error(
@@ -5410,9 +5410,9 @@ function Al(r) {
5410
5410
  }
5411
5411
  function vi(r) {
5412
5412
  var n, s;
5413
- const e = (n = C.scene) == null ? void 0 : n.environment;
5413
+ const e = (n = I.scene) == null ? void 0 : n.environment;
5414
5414
  if (!e) return;
5415
- const t = ((s = C.scene) == null ? void 0 : s.environmentIntensity) ?? 1;
5415
+ const t = ((s = I.scene) == null ? void 0 : s.environmentIntensity) ?? 1;
5416
5416
  r.traverse((i) => {
5417
5417
  if (i.isMesh) {
5418
5418
  const o = i, a = Array.isArray(o.material) ? o.material : [o.material];
@@ -5424,30 +5424,30 @@ function vi(r) {
5424
5424
  });
5425
5425
  }
5426
5426
  function Be(r, e = !1) {
5427
- C.scene.add(r), vi(r), Ht = !0, r.userData.isMovable && (ml(r), As()), e && C.mode === "edit" && ps(r);
5427
+ I.scene.add(r), vi(r), kt = !0, r.userData.isMovable && (ml(r), As()), e && I.mode === "edit" && ps(r);
5428
5428
  }
5429
5429
  function Mi(r) {
5430
- C.selectedObject === r && Qs(), Ht = !0, Al(r), hl(r), r.userData.helper && C.scene.remove(r.userData.helper), r.parent ? r.parent.remove(r) : C.scene.remove(r), gl(r), As();
5430
+ I.selectedObject === r && Qs(), kt = !0, Al(r), hl(r), r.userData.helper && I.scene.remove(r.userData.helper), r.parent ? r.parent.remove(r) : I.scene.remove(r), gl(r), As();
5431
5431
  }
5432
5432
  function Ti(r) {
5433
- const e = C.scene.getObjectByProperty("uuid", r);
5433
+ const e = I.scene.getObjectByProperty("uuid", r);
5434
5434
  e && Mi(e);
5435
5435
  }
5436
5436
  function ml(r) {
5437
- r.userData.isMovable && r.parent === C.scene && (Ke.includes(r) || Ke.push(r));
5437
+ r.userData.isMovable && r.parent === I.scene && (Ze.includes(r) || Ze.push(r));
5438
5438
  }
5439
5439
  function gl(r) {
5440
- const e = Ke.indexOf(r);
5441
- e !== -1 && Ke.splice(e, 1);
5440
+ const e = Ze.indexOf(r);
5441
+ e !== -1 && Ze.splice(e, 1);
5442
5442
  }
5443
5443
  function zs() {
5444
5444
  const r = [];
5445
- C.scene.children.forEach((e) => {
5445
+ I.scene.children.forEach((e) => {
5446
5446
  e.userData.isMovable && r.push(e);
5447
- }), Ke = r, As();
5447
+ }), Ze = r, As();
5448
5448
  }
5449
5449
  function As() {
5450
- ss == null || ss([...Ke]);
5450
+ ns == null || ns([...Ze]);
5451
5451
  }
5452
5452
  function yl(r) {
5453
5453
  ot = r;
@@ -5456,41 +5456,41 @@ function bl(r) {
5456
5456
  Te = r;
5457
5457
  }
5458
5458
  function xl(r) {
5459
- ss = r;
5459
+ ns = r;
5460
5460
  }
5461
5461
  function Ei() {
5462
- return Ke;
5462
+ return Ze;
5463
5463
  }
5464
5464
  function Ws() {
5465
- return C.selectedObject;
5465
+ return I.selectedObject;
5466
5466
  }
5467
5467
  function Il(r, e, t) {
5468
- if (!C.scene) return;
5468
+ if (!I.scene) return;
5469
5469
  const n = lt.get(r);
5470
5470
  if (n) {
5471
- const s = Ft(n);
5471
+ const s = Ut(n);
5472
5472
  s && s.updateItemByCode(e, t);
5473
5473
  }
5474
5474
  }
5475
5475
  function kn() {
5476
- return C.scene;
5476
+ return I.scene;
5477
5477
  }
5478
5478
  function Gs() {
5479
- return C.camera;
5479
+ return I.camera;
5480
5480
  }
5481
5481
  function jn() {
5482
- return C.renderer;
5482
+ return I.renderer;
5483
5483
  }
5484
5484
  const Di = {
5485
- linear: fe.Easing.Linear.None,
5486
- "quad.in": fe.Easing.Quadratic.In,
5487
- "quad.out": fe.Easing.Quadratic.Out,
5488
- "quad.inout": fe.Easing.Quadratic.InOut,
5489
- "cubic.inout": fe.Easing.Cubic.InOut,
5490
- "sine.inout": fe.Easing.Sinusoidal.InOut,
5491
- "back.out": fe.Easing.Back.Out,
5492
- "elastic.out": fe.Easing.Elastic.Out,
5493
- "bounce.out": fe.Easing.Bounce.Out
5485
+ linear: he.Easing.Linear.None,
5486
+ "quad.in": he.Easing.Quadratic.In,
5487
+ "quad.out": he.Easing.Quadratic.Out,
5488
+ "quad.inout": he.Easing.Quadratic.InOut,
5489
+ "cubic.inout": he.Easing.Cubic.InOut,
5490
+ "sine.inout": he.Easing.Sinusoidal.InOut,
5491
+ "back.out": he.Easing.Back.Out,
5492
+ "elastic.out": he.Easing.Elastic.Out,
5493
+ "bounce.out": he.Easing.Bounce.Out
5494
5494
  }, Bs = /* @__PURE__ */ new WeakMap();
5495
5495
  function Oi(r) {
5496
5496
  let e = Bs.get(r);
@@ -5526,14 +5526,14 @@ function wl(r) {
5526
5526
  function ms(r, e = {}) {
5527
5527
  if (!r)
5528
5528
  return console.warn("[脚本动画] 目标对象为空,无法执行动画"), null;
5529
- const t = e.duration ?? 1e3, n = Di[e.easing ?? "quad.inout"] ?? fe.Easing.Quadratic.InOut, s = [], i = {};
5529
+ const t = e.duration ?? 1e3, n = Di[e.easing ?? "quad.inout"] ?? he.Easing.Quadratic.InOut, s = [], i = {};
5530
5530
  e.position && (s.push("position"), i.position = e.position), e.rotation && (s.push("rotation"), i.rotation = e.rotation), e.scale && (s.push("scale"), i.scale = e.scale), Js(r, s);
5531
- const o = new fe.Tween(r).to(i, t).easing(n).onUpdate(() => {
5532
- r === C.selectedObject && (Te == null || Te(r));
5531
+ const o = new he.Tween(r).to(i, t).easing(n).onUpdate(() => {
5532
+ r === I.selectedObject && (Te == null || Te(r));
5533
5533
  }).start();
5534
5534
  return Cl(r, o, s, () => {
5535
5535
  var a;
5536
- (a = e.onComplete) == null || a.call(e), r === C.selectedObject && (Te == null || Te(r));
5536
+ (a = e.onComplete) == null || a.call(e), r === I.selectedObject && (Te == null || Te(r));
5537
5537
  }), o;
5538
5538
  }
5539
5539
  function vl(r, e, t = 1e3, n) {
@@ -5553,32 +5553,32 @@ function El(r, e, t = 1e3, n, s) {
5553
5553
  if (r.traverse((h) => {
5554
5554
  const p = h.material;
5555
5555
  if (!p) return;
5556
- (Array.isArray(p) ? p : [p]).forEach((I) => I && i.add(I));
5556
+ (Array.isArray(p) ? p : [p]).forEach((v) => v && i.add(v));
5557
5557
  }), i.size === 0)
5558
5558
  return console.warn("[脚本动画] 目标及其子节点没有材质,无法执行透明度动画:", r.name), null;
5559
- const o = t ?? 1e3, a = Di[n ?? "quad.inout"] ?? fe.Easing.Quadratic.InOut, l = Math.min(1, Math.max(0, e)), c = l <= 0.01;
5559
+ const o = t ?? 1e3, a = Di[n ?? "quad.inout"] ?? he.Easing.Quadratic.InOut, l = Math.min(1, Math.max(0, e)), c = l <= 0.01;
5560
5560
  c || (r.visible = !0), Js(r, ["opacity"]);
5561
- const d = [...i], u = Ri;
5562
- d.forEach((h) => {
5561
+ const f = [...i], u = Ri;
5562
+ f.forEach((h) => {
5563
5563
  const p = h.userData;
5564
5564
  !p[u] && !h.uniforms && (p[u] = { transparent: h.transparent, opacity: h.opacity });
5565
- }), d.forEach((h) => {
5565
+ }), f.forEach((h) => {
5566
5566
  h.transparent = !0, h.needsUpdate = !0;
5567
- }), C.renderer && C.scene && C.camera && C.renderer.render(C.scene, C.camera);
5568
- const A = Oi(r), m = d.map((h) => {
5569
- const p = new fe.Tween(h).to({ opacity: l }, o).easing(a).start();
5567
+ }), I.renderer && I.scene && I.camera && I.renderer.render(I.scene, I.camera);
5568
+ const A = Oi(r), m = f.map((h) => {
5569
+ const p = new he.Tween(h).to({ opacity: l }, o).easing(a).start();
5570
5570
  return A.opacity.add(p), p;
5571
5571
  }), b = () => {
5572
- d.forEach((h) => {
5572
+ f.forEach((h) => {
5573
5573
  if (h.uniforms) return;
5574
- const w = h.userData[u];
5575
- if (!w) return;
5576
- !w.transparent && h.transparent && (h.transparent = !1, h.needsUpdate = !0);
5574
+ const C = h.userData[u];
5575
+ if (!C) return;
5576
+ !C.transparent && h.transparent && (h.transparent = !1, h.needsUpdate = !0);
5577
5577
  });
5578
5578
  };
5579
5579
  return m.forEach((h, p) => {
5580
5580
  p === 0 ? h.onComplete(() => {
5581
- A.opacity.delete(h), !c && l >= 0.999 ? b() : c && (b(), r.visible = !1), s == null || s(), r === C.selectedObject && (Te == null || Te(r));
5581
+ A.opacity.delete(h), !c && l >= 0.999 ? b() : c && (b(), r.visible = !1), s == null || s(), r === I.selectedObject && (Te == null || Te(r));
5582
5582
  }) : h.onComplete(() => A.opacity.delete(h)), h.onStop(() => A.opacity.delete(h));
5583
5583
  }), m[0] ?? null;
5584
5584
  }
@@ -5662,9 +5662,9 @@ function Ol() {
5662
5662
  }
5663
5663
  const Rl = 16777215, Pl = 1;
5664
5664
  async function Sl() {
5665
- var f, v, M, D;
5665
+ var d, x, M, D;
5666
5666
  xe == null || xe(!0), await new Promise((E) => setTimeout(E, 50)), Qs();
5667
- const r = C.scene;
5667
+ const r = I.scene;
5668
5668
  if (!r)
5669
5669
  return xe == null || xe(!1), {
5670
5670
  scene: new ArrayBuffer(0),
@@ -5731,7 +5731,7 @@ async function Sl() {
5731
5731
  N.push({ label: Xe, value: Le, unit: ct, code: gs });
5732
5732
  }
5733
5733
  }), E.parent) {
5734
- const G = $.element.style.width || "", ee = $.element.style.fontSize || "", X = Ft(E.parent), be = X ? X.getOffsetY() : 0.1;
5734
+ const G = $.element.style.width || "", ee = $.element.style.fontSize || "", X = Ut(E.parent), be = X ? X.getOffsetY() : 0.1;
5735
5735
  n.set(
5736
5736
  E.parent.userData.id ? E.parent.userData.id : E.parent.uuid,
5737
5737
  {
@@ -5759,7 +5759,7 @@ async function Sl() {
5759
5759
  }
5760
5760
  }
5761
5761
  }), e.forEach((E) => r.remove(E));
5762
- const c = (f = C.transformControls) == null ? void 0 : f.getHelper(), d = (c == null ? void 0 : c.parent) ?? null;
5762
+ const c = (d = I.transformControls) == null ? void 0 : d.getHelper(), f = (c == null ? void 0 : c.parent) ?? null;
5763
5763
  c && c.parent && c.parent.remove(c);
5764
5764
  const u = /* @__PURE__ */ new Map();
5765
5765
  for (const E of l)
@@ -5802,19 +5802,19 @@ async function Sl() {
5802
5802
  U.userData.helper = E;
5803
5803
  }), r.traverse((E) => {
5804
5804
  delete E.userData._sourceUuid;
5805
- }), c && (d ? d.add(c) : r.add(c));
5806
- const w = {
5807
- position: (v = C.camera) == null ? void 0 : v.position.toArray(),
5808
- rotation: (M = C.camera) == null ? void 0 : M.rotation.toArray(),
5809
- target: ((D = C.orbitControls) == null ? void 0 : D.target.toArray()) || [0, 0, 0]
5810
- }, I = {};
5805
+ }), c && (f ? f.add(c) : r.add(c));
5806
+ const C = {
5807
+ position: (x = I.camera) == null ? void 0 : x.position.toArray(),
5808
+ rotation: (M = I.camera) == null ? void 0 : M.rotation.toArray(),
5809
+ target: ((D = I.orbitControls) == null ? void 0 : D.target.toArray()) || [0, 0, 0]
5810
+ }, v = {};
5811
5811
  n.forEach((E, U) => {
5812
- I[U] = E;
5812
+ v[U] = E;
5813
5813
  });
5814
- const x = {
5814
+ const w = {
5815
5815
  scene: p,
5816
- camera: w,
5817
- dataPanels: I,
5816
+ camera: C,
5817
+ dataPanels: v,
5818
5818
  waters: i,
5819
5819
  textures: s,
5820
5820
  ambientLight: a,
@@ -5824,7 +5824,7 @@ async function Sl() {
5824
5824
  code: E.code
5825
5825
  }))
5826
5826
  };
5827
- return xe == null || xe(!1), x;
5827
+ return xe == null || xe(!1), w;
5828
5828
  }
5829
5829
  function Ll(r) {
5830
5830
  if (r instanceof ArrayBuffer || ArrayBuffer.isView(r)) {
@@ -5850,52 +5850,52 @@ function Ll(r) {
5850
5850
  return r && typeof r == "object" && r.type === "Buffer" && Array.isArray(r.data) ? new Uint8Array(r.data).buffer : null;
5851
5851
  }
5852
5852
  async function Nl(r, e = "edit", t, n, s, i, o) {
5853
- var l, c, d, u, A, m, b;
5853
+ var l, c, f, u, A, m, b;
5854
5854
  const a = Ll(r);
5855
5855
  if (a) {
5856
- const h = await new fi().parseAsync(a, ""), p = h.scene || ((l = h.scenes) == null ? void 0 : l[0]), w = (c = C.scene) == null ? void 0 : c.environment;
5857
- if (C.scene = p, !p.children.some((f) => f.type === "AmbientLight"))
5856
+ const h = await new fi().parseAsync(a, ""), p = h.scene || ((l = h.scenes) == null ? void 0 : l[0]), C = (c = I.scene) == null ? void 0 : c.environment;
5857
+ if (I.scene = p, !p.children.some((d) => d.type === "AmbientLight"))
5858
5858
  if (i) {
5859
- const f = new R.AmbientLight(i.color, i.intensity);
5860
- f.name = i.name || "环境光", f.visible = i.visible ?? !0, i.position && f.position.fromArray(i.position), p.add(f);
5859
+ const d = new R.AmbientLight(i.color, i.intensity);
5860
+ d.name = i.name || "环境光", d.visible = i.visible ?? !0, i.position && d.position.fromArray(i.position), p.add(d);
5861
5861
  } else
5862
5862
  yi(p);
5863
- if (w)
5864
- C.scene.environment = w, C.scene.environmentIntensity = 1;
5865
- else if (C.renderer) {
5866
- const f = es(C.renderer);
5867
- f && (C.scene.environment = f, C.scene.environmentIntensity = 1);
5863
+ if (C)
5864
+ I.scene.environment = C, I.scene.environmentIntensity = 1;
5865
+ else if (I.renderer) {
5866
+ const d = ts(I.renderer);
5867
+ d && (I.scene.environment = d, I.scene.environmentIntensity = 1);
5868
5868
  }
5869
- if (!C.scene.environment && C.renderer) {
5870
- const f = es(C.renderer);
5871
- f ? (C.scene.environment = f, C.scene.environmentIntensity = 1, console.warn("[导入] 原环境贴图不可用,已重新生成")) : console.error("[导入] 环境贴图生成失败,场景将没有 IBL 间接光照,模型会偏暗");
5869
+ if (!I.scene.environment && I.renderer) {
5870
+ const d = ts(I.renderer);
5871
+ d ? (I.scene.environment = d, I.scene.environmentIntensity = 1, console.warn("[导入] 原环境贴图不可用,已重新生成")) : console.error("[导入] 环境贴图生成失败,场景将没有 IBL 间接光照,模型会偏暗");
5872
5872
  }
5873
5873
  vi(p);
5874
- let I = !0;
5875
- for (; I; ) {
5876
- I = !1;
5877
- for (let f = p.children.length - 1; f >= 0; f--) {
5878
- const v = p.children[f];
5879
- if (v.name === "sl_scene" || v.name.startsWith("AuxScene")) {
5880
- v.updateMatrixWorld();
5881
- const M = v.matrixWorld.clone();
5882
- [...v.children].forEach((D) => {
5883
- v.remove(D), D.applyMatrix4(M), p.add(D);
5884
- }), p.remove(v), I = !0;
5874
+ let v = !0;
5875
+ for (; v; ) {
5876
+ v = !1;
5877
+ for (let d = p.children.length - 1; d >= 0; d--) {
5878
+ const x = p.children[d];
5879
+ if (x.name === "sl_scene" || x.name.startsWith("AuxScene")) {
5880
+ x.updateMatrixWorld();
5881
+ const M = x.matrixWorld.clone();
5882
+ [...x.children].forEach((D) => {
5883
+ x.remove(D), D.applyMatrix4(M), p.add(D);
5884
+ }), p.remove(x), v = !0;
5885
5885
  }
5886
5886
  }
5887
5887
  }
5888
- const x = (f) => {
5889
- if (f.isTransformControlsRoot || f.isLine || f.isLineSegments || f.type === "AmbientLight" || f.userData.type === "lightHelper" || f.userData.type === "initFloor")
5888
+ const w = (d) => {
5889
+ if (d.isTransformControlsRoot || d.isLine || d.isLineSegments || d.type === "AmbientLight" || d.userData.type === "lightHelper" || d.userData.type === "initFloor")
5890
5890
  return;
5891
- (f.isMesh || f.type === "Group" && f.parent === p) && (f.userData.isMovable = !0);
5892
- const v = f.material;
5893
- f.userData.isWater && v && !v.uniforms && !f.userData.waterSpeed && (f.userData.waterSpeed = { x: 5e-4, y: 5e-4 }), f.children.forEach(x);
5891
+ (d.isMesh || d.type === "Group" && d.parent === p) && (d.userData.isMovable = !0);
5892
+ const x = d.material;
5893
+ d.userData.isWater && x && !x.uniforms && !d.userData.waterSpeed && (d.userData.waterSpeed = { x: 5e-4, y: 5e-4 }), d.children.forEach(w);
5894
5894
  };
5895
- x(p), p.traverse((f) => {
5896
- const v = f.material;
5897
- if (!v || v.uniforms) return;
5898
- const M = Array.isArray(v) ? v : [v];
5895
+ w(p), p.traverse((d) => {
5896
+ const x = d.material;
5897
+ if (!x || x.uniforms) return;
5898
+ const M = Array.isArray(x) ? x : [x];
5899
5899
  for (const D of M) {
5900
5900
  if (!D) continue;
5901
5901
  const U = (D.userData || {})[Ri];
@@ -5909,83 +5909,83 @@ async function Nl(r, e = "edit", t, n, s, i, o) {
5909
5909
  }
5910
5910
  }), zs();
5911
5911
  } else {
5912
- const h = typeof r == "string" ? JSON.parse(r) : r, w = new R.ObjectLoader().parse(h);
5913
- if (w.type === "Scene") {
5914
- const I = (d = C.scene) == null ? void 0 : d.environment;
5915
- if (C.scene = w, I)
5916
- C.scene.environment = I, C.scene.environmentIntensity = 1;
5917
- else if (C.renderer) {
5918
- const x = es(C.renderer);
5919
- x && (C.scene.environment = x, C.scene.environmentIntensity = 1);
5912
+ const h = typeof r == "string" ? JSON.parse(r) : r, C = new R.ObjectLoader().parse(h);
5913
+ if (C.type === "Scene") {
5914
+ const v = (f = I.scene) == null ? void 0 : f.environment;
5915
+ if (I.scene = C, v)
5916
+ I.scene.environment = v, I.scene.environmentIntensity = 1;
5917
+ else if (I.renderer) {
5918
+ const w = ts(I.renderer);
5919
+ w && (I.scene.environment = w, I.scene.environmentIntensity = 1);
5920
5920
  }
5921
5921
  } else
5922
- (u = C.scene) == null || u.add(w);
5922
+ (u = I.scene) == null || u.add(C);
5923
5923
  }
5924
- if (t && ((A = C.scene) == null || A.traverse((h) => {
5925
- const p = h.userData.id || h.userData._sourceUuid || h.uuid, w = t[p];
5926
- if (w && h.userData.isMovable) {
5924
+ if (t && ((A = I.scene) == null || A.traverse((h) => {
5925
+ const p = h.userData.id || h.userData._sourceUuid || h.uuid, C = t[p];
5926
+ if (C && h.userData.isMovable) {
5927
5927
  fl(h);
5928
- const I = new us({
5929
- title: w.title,
5930
- items: w.items
5928
+ const v = new us({
5929
+ title: C.title,
5930
+ items: C.items
5931
5931
  });
5932
- I.attachTo(h), I.visible = !1, w.width && I.setWidth(w.width), w.fontSize && I.setFontSize(w.fontSize), w.offsetY !== void 0 && I.setOffsetY(w.offsetY), w.offsetX !== void 0 && I.setOffsetX(w.offsetX), w.offsetZ !== void 0 && I.setOffsetZ(w.offsetZ), li(h, I);
5932
+ v.attachTo(h), v.visible = !1, C.width && v.setWidth(C.width), C.fontSize && v.setFontSize(C.fontSize), C.offsetY !== void 0 && v.setOffsetY(C.offsetY), C.offsetX !== void 0 && v.setOffsetX(C.offsetX), C.offsetZ !== void 0 && v.setOffsetZ(C.offsetZ), li(h, v);
5933
5933
  }
5934
- })), n && n.length > 0 && Promise.resolve().then(() => ql).then(({ addWater: h, addWaterCylinder: p, setWaterReflection: w }) => {
5935
- for (const I of n) {
5936
- const x = I.geometryType || "box";
5937
- let f;
5938
- x === "cylinder" ? f = p({
5939
- radiusTop: I.cylinderRadiusTop ?? 5,
5940
- radiusBottom: I.cylinderRadiusBottom ?? 5,
5941
- radialSegments: I.cylinderRadialSegments ?? 32,
5934
+ })), n && n.length > 0 && Promise.resolve().then(() => ql).then(({ addWater: h, addWaterCylinder: p, setWaterReflection: C }) => {
5935
+ for (const v of n) {
5936
+ const w = v.geometryType || "box";
5937
+ let d;
5938
+ w === "cylinder" ? d = p({
5939
+ radiusTop: v.cylinderRadiusTop ?? 5,
5940
+ radiusBottom: v.cylinderRadiusBottom ?? 5,
5941
+ radialSegments: v.cylinderRadialSegments ?? 32,
5942
5942
  height: 0.8,
5943
- color: I.color,
5943
+ color: v.color,
5944
5944
  scale: 4
5945
- }) : f = h({
5946
- width: I.boxWidth ?? 10,
5947
- height: I.boxDepth ?? 10,
5948
- color: I.color,
5945
+ }) : d = h({
5946
+ width: v.boxWidth ?? 10,
5947
+ height: v.boxDepth ?? 10,
5948
+ color: v.color,
5949
5949
  scale: 4
5950
- }), f.position.fromArray(I.position), f.rotation.set(I.rotation[0], I.rotation[1], I.rotation[2]), f.scale.fromArray(I.scale), f.name = I.name, f.userData.waterTimeScale = I.timeScale ?? 0.05, f.userData.isWater = !0, f.userData.isMovable = !0, I.alpha !== void 0 && f.material.uniforms && f.material.uniforms.alpha && (f.material.uniforms.alpha.value = I.alpha), I.reflection === !1 && w(f, !1), Ht = !0;
5950
+ }), d.position.fromArray(v.position), d.rotation.set(v.rotation[0], v.rotation[1], v.rotation[2]), d.scale.fromArray(v.scale), d.name = v.name, d.userData.waterTimeScale = v.timeScale ?? 0.05, d.userData.isWater = !0, d.userData.isMovable = !0, v.alpha !== void 0 && d.material.uniforms && d.material.uniforms.alpha && (d.material.uniforms.alpha.value = v.alpha), v.reflection === !1 && C(d, !1), kt = !0;
5951
5951
  }
5952
5952
  zs();
5953
5953
  }), s) {
5954
5954
  const h = new R.TextureLoader();
5955
- (m = C.scene) == null || m.traverse((p) => {
5955
+ (m = I.scene) == null || m.traverse((p) => {
5956
5956
  if (p.type === "Mesh") {
5957
- const w = p, I = Array.isArray(w.material) ? w.material : [w.material];
5958
- for (const x of I)
5959
- if (x && x.uuid && s[x.uuid]) {
5960
- const f = s[x.uuid];
5961
- if (f.mapDataUrl) {
5962
- const v = h.load(f.mapDataUrl);
5963
- v.wrapS = v.wrapT = R.RepeatWrapping, v.repeat.set(1, 1), x.map = v, x.userData = x.userData || {}, x.userData._mapDataUrl = f.mapDataUrl, x.userData._mapFileName = f.mapFileName;
5957
+ const C = p, v = Array.isArray(C.material) ? C.material : [C.material];
5958
+ for (const w of v)
5959
+ if (w && w.uuid && s[w.uuid]) {
5960
+ const d = s[w.uuid];
5961
+ if (d.mapDataUrl) {
5962
+ const x = h.load(d.mapDataUrl);
5963
+ x.wrapS = x.wrapT = R.RepeatWrapping, x.repeat.set(1, 1), w.map = x, w.userData = w.userData || {}, w.userData._mapDataUrl = d.mapDataUrl, w.userData._mapFileName = d.mapFileName;
5964
5964
  }
5965
- if (f.normalMapDataUrl) {
5966
- const v = h.load(f.normalMapDataUrl);
5967
- v.wrapS = v.wrapT = R.RepeatWrapping, v.repeat.set(1, 1), x.normalMap = v, x.normalScale = new R.Vector2(
5968
- f.normalScale ?? 1,
5969
- f.normalScale ?? 1
5970
- ), x.userData = x.userData || {}, x.userData._normalMapDataUrl = f.normalMapDataUrl, x.userData._normalMapFileName = f.normalMapFileName;
5965
+ if (d.normalMapDataUrl) {
5966
+ const x = h.load(d.normalMapDataUrl);
5967
+ x.wrapS = x.wrapT = R.RepeatWrapping, x.repeat.set(1, 1), w.normalMap = x, w.normalScale = new R.Vector2(
5968
+ d.normalScale ?? 1,
5969
+ d.normalScale ?? 1
5970
+ ), w.userData = w.userData || {}, w.userData._normalMapDataUrl = d.normalMapDataUrl, w.userData._normalMapFileName = d.normalMapFileName;
5971
5971
  }
5972
- if (f.aoMapDataUrl) {
5973
- const v = h.load(f.aoMapDataUrl);
5974
- v.wrapS = v.wrapT = R.RepeatWrapping, v.repeat.set(1, 1), x.aoMap = v, x.aoMapIntensity = f.aoMapIntensity ?? 1, x.userData = x.userData || {}, x.userData._aoMapDataUrl = f.aoMapDataUrl, x.userData._aoMapFileName = f.aoMapFileName;
5972
+ if (d.aoMapDataUrl) {
5973
+ const x = h.load(d.aoMapDataUrl);
5974
+ x.wrapS = x.wrapT = R.RepeatWrapping, x.repeat.set(1, 1), w.aoMap = x, w.aoMapIntensity = d.aoMapIntensity ?? 1, w.userData = w.userData || {}, w.userData._aoMapDataUrl = d.aoMapDataUrl, w.userData._aoMapFileName = d.aoMapFileName;
5975
5975
  }
5976
- x.needsUpdate = !0;
5976
+ w.needsUpdate = !0;
5977
5977
  }
5978
5978
  }
5979
5979
  });
5980
5980
  }
5981
- o && Ya(o), e === "edit" && ((b = C.scene) == null || b.traverse((h) => {
5982
- var p, w;
5981
+ o && Ya(o), e === "edit" && ((b = I.scene) == null || b.traverse((h) => {
5982
+ var p, C;
5983
5983
  if (h.type === "DirectionalLight") {
5984
- const I = h;
5985
- if (!I.userData.helper) {
5986
- I.target.parent !== C.scene && (I.target.parent && I.target.parent.remove(I.target), I.target.position.set(0, 0, 0), (p = C.scene) == null || p.add(I.target));
5987
- const x = new R.DirectionalLightHelper(I, 1);
5988
- x.userData.type = "lightHelper", I.userData.helper = x, x.update(), (w = C.scene) == null || w.add(x);
5984
+ const v = h;
5985
+ if (!v.userData.helper) {
5986
+ v.target.parent !== I.scene && (v.target.parent && v.target.parent.remove(v.target), v.target.position.set(0, 0, 0), (p = I.scene) == null || p.add(v.target));
5987
+ const w = new R.DirectionalLightHelper(v, 1);
5988
+ w.userData.type = "lightHelper", v.userData.helper = w, w.update(), (C = I.scene) == null || C.add(w);
5989
5989
  }
5990
5990
  }
5991
5991
  }));
@@ -6003,9 +6003,9 @@ function Si(r) {
6003
6003
  Si(t);
6004
6004
  }
6005
6005
  function Hl() {
6006
- ns !== null && (cancelAnimationFrame(ns), ns = null), Rt && C.container && (C.container.removeEventListener("click", Rt), Rt = null), Pt && (window.removeEventListener("resize", Pt), Pt = null), C.orbitControls && (C.orbitControls.dispose(), C.orbitControls = null), C.transformControls && (C.transformControls.dispose(), C.transformControls = null), Ye && (Ye.dispose(), Ye = null), C.scene && (Si(C.scene), C.scene = null), C.renderer && (C.renderer.dispose(), C.renderer.domElement && C.container && C.container.removeChild(C.renderer.domElement), C.renderer = null), Fr(), C.camera = null, C.gridHelper = null, C.selectedObject = null, C.container = null, C.mode = "", C.defaultMainCamera = null, kt = void 0, Ke = [], lt.clear(), As(), Ka(), ts = !1, at = !1;
6006
+ is !== null && (cancelAnimationFrame(is), is = null), Rt && I.container && (I.container.removeEventListener("click", Rt), Rt = null), Pt && (window.removeEventListener("resize", Pt), Pt = null), I.orbitControls && (I.orbitControls.dispose(), I.orbitControls = null), I.transformControls && (I.transformControls.dispose(), I.transformControls = null), Ke && (Ke.dispose(), Ke = null), I.scene && (Si(I.scene), I.scene = null), I.renderer && (I.renderer.dispose(), I.renderer.domElement && I.container && I.container.removeChild(I.renderer.domElement), I.renderer = null), Fr(), I.camera = null, I.gridHelper = null, I.selectedObject = null, I.container = null, I.mode = "", I.defaultMainCamera = null, jt = void 0, Ze = [], lt.clear(), As(), Ka(), ss = !1, at = !1;
6007
6007
  }
6008
- const kl = /^[og]\s*(.+)?/, jl = /^mtllib /, Fl = /^usemtl /, Ul = /^usemap /, Fn = /\s+/, Un = new S(), Rs = new S(), zn = new S(), Wn = new S(), we = new S(), Zt = new le();
6008
+ const kl = /^[og]\s*(.+)?/, jl = /^mtllib /, Fl = /^usemtl /, Ul = /^usemap /, Fn = /\s+/, Un = new S(), Rs = new S(), zn = new S(), Wn = new S(), we = new S(), Qt = new le();
6009
6009
  function zl() {
6010
6010
  const r = {
6011
6011
  objects: [],
@@ -6134,8 +6134,8 @@ function zl() {
6134
6134
  this.object.geometry.uvs.push(t[e + 0], t[e + 1]);
6135
6135
  },
6136
6136
  addFace: function(e, t, n, s, i, o, a, l, c) {
6137
- const d = this.vertices.length;
6138
- let u = this.parseVertexIndex(e, d), A = this.parseVertexIndex(t, d), m = this.parseVertexIndex(n, d);
6137
+ const f = this.vertices.length;
6138
+ let u = this.parseVertexIndex(e, f), A = this.parseVertexIndex(t, f), m = this.parseVertexIndex(n, f);
6139
6139
  if (this.addVertex(u, A, m), this.addColor(u, A, m), a !== void 0 && a !== "") {
6140
6140
  const b = this.normals.length;
6141
6141
  u = this.parseNormalIndex(a, b), A = this.parseNormalIndex(l, b), m = this.parseNormalIndex(c, b), this.addNormal(u, A, m);
@@ -6185,7 +6185,7 @@ class Wl extends Ks {
6185
6185
  * @param {onErrorCallback} onError - Executed when errors occur.
6186
6186
  */
6187
6187
  load(e, t, n, s) {
6188
- const i = this, o = new Nt(this.manager);
6188
+ const i = this, o = new Ht(this.manager);
6189
6189
  o.setPath(this.path), o.setRequestHeader(this.requestHeader), o.setWithCredentials(this.withCredentials), o.load(e, function(a) {
6190
6190
  try {
6191
6191
  t(i.parse(a));
@@ -6221,9 +6221,9 @@ class Wl extends Ks {
6221
6221
  for (let a = 0, l = n.length; a < l; a++) {
6222
6222
  const c = n[a].trimStart();
6223
6223
  if (c.length === 0) continue;
6224
- const d = c.charAt(0);
6225
- if (d !== "#")
6226
- if (d === "v") {
6224
+ const f = c.charAt(0);
6225
+ if (f !== "#")
6226
+ if (f === "v") {
6227
6227
  const u = c.split(Fn);
6228
6228
  switch (u[0]) {
6229
6229
  case "v":
@@ -6231,12 +6231,12 @@ class Wl extends Ks {
6231
6231
  parseFloat(u[1]),
6232
6232
  parseFloat(u[2]),
6233
6233
  parseFloat(u[3])
6234
- ), u.length >= 7 ? (Zt.setRGB(
6234
+ ), u.length >= 7 ? (Qt.setRGB(
6235
6235
  parseFloat(u[4]),
6236
6236
  parseFloat(u[5]),
6237
6237
  parseFloat(u[6]),
6238
6238
  je
6239
- ), t.colors.push(Zt.r, Zt.g, Zt.b)) : t.colors.push(void 0, void 0, void 0);
6239
+ ), t.colors.push(Qt.r, Qt.g, Qt.b)) : t.colors.push(void 0, void 0, void 0);
6240
6240
  break;
6241
6241
  case "vn":
6242
6242
  t.normals.push(
@@ -6252,31 +6252,31 @@ class Wl extends Ks {
6252
6252
  );
6253
6253
  break;
6254
6254
  }
6255
- } else if (d === "f") {
6255
+ } else if (f === "f") {
6256
6256
  const A = c.slice(1).trim().split(Fn), m = [];
6257
6257
  for (let h = 0, p = A.length; h < p; h++) {
6258
- const w = A[h];
6259
- if (w.length > 0) {
6260
- const I = w.split("/");
6261
- m.push(I);
6258
+ const C = A[h];
6259
+ if (C.length > 0) {
6260
+ const v = C.split("/");
6261
+ m.push(v);
6262
6262
  }
6263
6263
  }
6264
6264
  const b = m[0];
6265
6265
  for (let h = 1, p = m.length - 1; h < p; h++) {
6266
- const w = m[h], I = m[h + 1];
6266
+ const C = m[h], v = m[h + 1];
6267
6267
  t.addFace(
6268
6268
  b[0],
6269
- w[0],
6270
- I[0],
6269
+ C[0],
6270
+ v[0],
6271
6271
  b[1],
6272
- w[1],
6273
- I[1],
6272
+ C[1],
6273
+ v[1],
6274
6274
  b[2],
6275
- w[2],
6276
- I[2]
6275
+ C[2],
6276
+ v[2]
6277
6277
  );
6278
6278
  }
6279
- } else if (d === "l") {
6279
+ } else if (f === "l") {
6280
6280
  const u = c.substring(1).trim().split(" ");
6281
6281
  let A = [];
6282
6282
  const m = [];
@@ -6288,7 +6288,7 @@ class Wl extends Ks {
6288
6288
  p[0] !== "" && A.push(p[0]), p[1] !== "" && m.push(p[1]);
6289
6289
  }
6290
6290
  t.addLineGeometry(A, m);
6291
- } else if (d === "p") {
6291
+ } else if (f === "p") {
6292
6292
  const A = c.slice(1).trim().split(" ");
6293
6293
  t.addPointGeometry(A);
6294
6294
  } else if ((s = kl.exec(c)) !== null) {
@@ -6300,7 +6300,7 @@ class Wl extends Ks {
6300
6300
  t.materialLibraries.push(c.substring(7).trim());
6301
6301
  else if (Ul.test(c))
6302
6302
  console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');
6303
- else if (d === "s") {
6303
+ else if (f === "s") {
6304
6304
  if (s = c.split(" "), s.length > 1) {
6305
6305
  const A = s[1].trim().toLowerCase();
6306
6306
  t.object.smooth = A !== "0" && A !== "off";
@@ -6314,20 +6314,20 @@ class Wl extends Ks {
6314
6314
  }
6315
6315
  }
6316
6316
  t.finalize();
6317
- const i = new _t();
6317
+ const i = new $t();
6318
6318
  if (i.materialLibraries = [].concat(t.materialLibraries), !(t.objects.length === 1 && t.objects[0].geometry.vertices.length === 0) === !0)
6319
6319
  for (let a = 0, l = t.objects.length; a < l; a++) {
6320
- const c = t.objects[a], d = c.geometry, u = c.materials, A = d.type === "Line", m = d.type === "Points";
6320
+ const c = t.objects[a], f = c.geometry, u = c.materials, A = f.type === "Line", m = f.type === "Points";
6321
6321
  let b = !1;
6322
- if (d.vertices.length === 0) continue;
6322
+ if (f.vertices.length === 0) continue;
6323
6323
  const h = new rt();
6324
- h.setAttribute("position", new ke(d.vertices, 3)), d.normals.length > 0 && h.setAttribute("normal", new ke(d.normals, 3)), d.colors.length > 0 && (b = !0, h.setAttribute("color", new ke(d.colors, 3))), d.hasUVIndices === !0 && h.setAttribute("uv", new ke(d.uvs, 2));
6324
+ h.setAttribute("position", new ke(f.vertices, 3)), f.normals.length > 0 && h.setAttribute("normal", new ke(f.normals, 3)), f.colors.length > 0 && (b = !0, h.setAttribute("color", new ke(f.colors, 3))), f.hasUVIndices === !0 && h.setAttribute("uv", new ke(f.uvs, 2));
6325
6325
  const p = [];
6326
- for (let I = 0, x = u.length; I < x; I++) {
6327
- const f = u[I], v = f.name + "_" + f.smooth + "_" + b;
6328
- let M = t.materials[v];
6326
+ for (let v = 0, w = u.length; v < w; v++) {
6327
+ const d = u[v], x = d.name + "_" + d.smooth + "_" + b;
6328
+ let M = t.materials[x];
6329
6329
  if (this.materials !== null) {
6330
- if (M = this.materials.create(f.name), A && M && !(M instanceof Tt)) {
6330
+ if (M = this.materials.create(d.name), A && M && !(M instanceof Tt)) {
6331
6331
  const D = new Tt();
6332
6332
  Dt.prototype.copy.call(D, M), D.color.copy(M.color), M = D;
6333
6333
  } else if (m && M && !(M instanceof Ct)) {
@@ -6335,23 +6335,23 @@ class Wl extends Ks {
6335
6335
  Dt.prototype.copy.call(D, M), D.color.copy(M.color), D.map = M.map, M = D;
6336
6336
  }
6337
6337
  }
6338
- M === void 0 && (A ? M = new Tt() : m ? M = new Ct({ size: 1, sizeAttenuation: !1 }) : M = new qo(), M.name = f.name, M.flatShading = !f.smooth, M.vertexColors = b, t.materials[v] = M), p.push(M);
6338
+ M === void 0 && (A ? M = new Tt() : m ? M = new Ct({ size: 1, sizeAttenuation: !1 }) : M = new qo(), M.name = d.name, M.flatShading = !d.smooth, M.vertexColors = b, t.materials[x] = M), p.push(M);
6339
6339
  }
6340
- let w;
6340
+ let C;
6341
6341
  if (p.length > 1) {
6342
- for (let I = 0, x = u.length; I < x; I++) {
6343
- const f = u[I];
6344
- h.addGroup(f.groupStart, f.groupCount, I);
6342
+ for (let v = 0, w = u.length; v < w; v++) {
6343
+ const d = u[v];
6344
+ h.addGroup(d.groupStart, d.groupCount, v);
6345
6345
  }
6346
- A ? w = new Hs(h, p) : m ? w = new Jt(h, p) : w = new L(h, p);
6346
+ A ? C = new Hs(h, p) : m ? C = new _t(h, p) : C = new L(h, p);
6347
6347
  } else
6348
- A ? w = new Hs(h, p[0]) : m ? w = new Jt(h, p[0]) : w = new L(h, p[0]);
6349
- w.name = c.name, i.add(w);
6348
+ A ? C = new Hs(h, p[0]) : m ? C = new _t(h, p[0]) : C = new L(h, p[0]);
6349
+ C.name = c.name, i.add(C);
6350
6350
  }
6351
6351
  else if (t.vertices.length > 0) {
6352
6352
  const a = new Ct({ size: 1, sizeAttenuation: !1 }), l = new rt();
6353
6353
  l.setAttribute("position", new ke(t.vertices, 3)), t.colors.length > 0 && t.colors[0] !== void 0 && (l.setAttribute("color", new ke(t.colors, 3)), a.vertexColors = !0);
6354
- const c = new Jt(l, a);
6354
+ const c = new _t(l, a);
6355
6355
  i.add(c);
6356
6356
  }
6357
6357
  return i;
@@ -6415,7 +6415,7 @@ class Gl extends Ks {
6415
6415
  * @param {onErrorCallback} onError - Executed when errors occur.
6416
6416
  */
6417
6417
  load(e, t, n, s) {
6418
- const i = new Nt(this.manager);
6418
+ const i = new Ht(this.manager);
6419
6419
  i.setPath(this.path), i.setResponseType("arraybuffer"), i.setRequestHeader(this.requestHeader), i.setWithCredentials(this.withCredentials), i.load(e, (o) => {
6420
6420
  this.parse(o, t, s);
6421
6421
  }, n, s);
@@ -6454,8 +6454,8 @@ class Gl extends Ks {
6454
6454
  );
6455
6455
  }
6456
6456
  let s;
6457
- const i = this.workerNextTaskID++, o = e.byteLength, a = this._getWorker(i, o).then((l) => (s = l, new Promise((c, d) => {
6458
- s._callbacks[i] = { resolve: c, reject: d }, s.postMessage({ type: "decode", id: i, taskConfig: t, buffer: e }, [e]);
6457
+ const i = this.workerNextTaskID++, o = e.byteLength, a = this._getWorker(i, o).then((l) => (s = l, new Promise((c, f) => {
6458
+ s._callbacks[i] = { resolve: c, reject: f }, s.postMessage({ type: "decode", id: i, taskConfig: t, buffer: e }, [e]);
6459
6459
  }))).then((l) => this._createGeometry(l.geometry));
6460
6460
  return a.catch(() => !0).then(() => {
6461
6461
  s && i && this._releaseTask(s, i);
@@ -6473,8 +6473,8 @@ class Gl extends Ks {
6473
6473
  if (o === a)
6474
6474
  c = new De(i, o);
6475
6475
  else {
6476
- const d = new ti(i, a);
6477
- c = new si(d, o, 0);
6476
+ const f = new ti(i, a);
6477
+ c = new si(f, o, 0);
6478
6478
  }
6479
6479
  s === "color" && (this._assignVertexColorSpace(c, l), c.normalized = !(i instanceof Float32Array)), t.setAttribute(s, c);
6480
6480
  }
@@ -6487,7 +6487,7 @@ class Gl extends Ks {
6487
6487
  n.fromBufferAttribute(e, s), ls.colorSpaceToWorking(n, je), e.setXYZ(s, n.r, n.g, n.b);
6488
6488
  }
6489
6489
  _loadLibrary(e, t) {
6490
- const n = new Nt(this.manager);
6490
+ const n = new Ht(this.manager);
6491
6491
  return n.setPath(this.decoderPath), n.setResponseType(t), n.setWithCredentials(this.withCredentials), new Promise((s, i) => {
6492
6492
  n.load(e, s, void 0, i);
6493
6493
  });
@@ -6555,16 +6555,16 @@ function Bl() {
6555
6555
  const a = o.data;
6556
6556
  switch (a.type) {
6557
6557
  case "init":
6558
- r = a.decoderConfig, e = new Promise(function(d) {
6558
+ r = a.decoderConfig, e = new Promise(function(f) {
6559
6559
  r.onModuleLoaded = function(u) {
6560
- d({ draco: u });
6560
+ f({ draco: u });
6561
6561
  }, DracoDecoderModule(r);
6562
6562
  });
6563
6563
  break;
6564
6564
  case "decode":
6565
6565
  const l = a.buffer, c = a.taskConfig;
6566
- e.then((d) => {
6567
- const u = d.draco, A = new u.Decoder();
6566
+ e.then((f) => {
6567
+ const u = f.draco, A = new u.Decoder();
6568
6568
  try {
6569
6569
  const m = t(u, A, new Int8Array(l), c), b = m.attributes.map((h) => h.array.buffer);
6570
6570
  m.index && b.push(m.index.array.buffer), self.postMessage({ type: "decode", id: a.id, geometry: m }, b);
@@ -6578,7 +6578,7 @@ function Bl() {
6578
6578
  }
6579
6579
  };
6580
6580
  function t(o, a, l, c) {
6581
- const d = c.attributeIDs, u = c.attributeTypes;
6581
+ const f = c.attributeIDs, u = c.attributeTypes;
6582
6582
  let A, m;
6583
6583
  const b = a.GetEncodedGeometryType(l);
6584
6584
  if (b === o.TRIANGULAR_MESH)
@@ -6590,48 +6590,48 @@ function Bl() {
6590
6590
  if (!m.ok() || A.ptr === 0)
6591
6591
  throw new Error("THREE.DRACOLoader: Decoding failed: " + m.error_msg());
6592
6592
  const h = { index: null, attributes: [] };
6593
- for (const p in d) {
6594
- const w = self[u[p]];
6595
- let I, x;
6593
+ for (const p in f) {
6594
+ const C = self[u[p]];
6595
+ let v, w;
6596
6596
  if (c.useUniqueIDs)
6597
- x = d[p], I = a.GetAttributeByUniqueId(A, x);
6597
+ w = f[p], v = a.GetAttributeByUniqueId(A, w);
6598
6598
  else {
6599
- if (x = a.GetAttributeId(A, o[d[p]]), x === -1) continue;
6600
- I = a.GetAttribute(A, x);
6599
+ if (w = a.GetAttributeId(A, o[f[p]]), w === -1) continue;
6600
+ v = a.GetAttribute(A, w);
6601
6601
  }
6602
- const f = s(o, a, A, p, w, I);
6603
- p === "color" && (f.vertexColorSpace = c.vertexColorSpace), h.attributes.push(f);
6602
+ const d = s(o, a, A, p, C, v);
6603
+ p === "color" && (d.vertexColorSpace = c.vertexColorSpace), h.attributes.push(d);
6604
6604
  }
6605
6605
  return b === o.TRIANGULAR_MESH && (h.index = n(o, a, A)), o.destroy(A), h;
6606
6606
  }
6607
6607
  function n(o, a, l) {
6608
- const d = l.num_faces() * 3, u = d * 4, A = o._malloc(u);
6608
+ const f = l.num_faces() * 3, u = f * 4, A = o._malloc(u);
6609
6609
  a.GetTrianglesUInt32Array(l, u, A);
6610
- const m = new Uint32Array(o.HEAPF32.buffer, A, d).slice();
6610
+ const m = new Uint32Array(o.HEAPF32.buffer, A, f).slice();
6611
6611
  return o._free(A), { array: m, itemSize: 1 };
6612
6612
  }
6613
- function s(o, a, l, c, d, u) {
6614
- const A = l.num_points(), m = u.num_components(), b = i(o, d), h = m * d.BYTES_PER_ELEMENT, p = Math.ceil(h / 4) * 4, w = p / d.BYTES_PER_ELEMENT, I = A * h, x = A * p, f = o._malloc(I);
6615
- a.GetAttributeDataArrayForAllPoints(l, u, b, I, f);
6616
- const v = new d(o.HEAPF32.buffer, f, I / d.BYTES_PER_ELEMENT);
6613
+ function s(o, a, l, c, f, u) {
6614
+ const A = l.num_points(), m = u.num_components(), b = i(o, f), h = m * f.BYTES_PER_ELEMENT, p = Math.ceil(h / 4) * 4, C = p / f.BYTES_PER_ELEMENT, v = A * h, w = A * p, d = o._malloc(v);
6615
+ a.GetAttributeDataArrayForAllPoints(l, u, b, v, d);
6616
+ const x = new f(o.HEAPF32.buffer, d, v / f.BYTES_PER_ELEMENT);
6617
6617
  let M;
6618
6618
  if (h === p)
6619
- M = v.slice();
6619
+ M = x.slice();
6620
6620
  else {
6621
- M = new d(x / d.BYTES_PER_ELEMENT);
6621
+ M = new f(w / f.BYTES_PER_ELEMENT);
6622
6622
  let D = 0;
6623
- for (let E = 0, U = v.length; E < U; E++) {
6623
+ for (let E = 0, U = x.length; E < U; E++) {
6624
6624
  for (let Z = 0; Z < m; Z++)
6625
- M[D + Z] = v[E * m + Z];
6626
- D += w;
6625
+ M[D + Z] = x[E * m + Z];
6626
+ D += C;
6627
6627
  }
6628
6628
  }
6629
- return o._free(f), {
6629
+ return o._free(d), {
6630
6630
  name: c,
6631
6631
  count: A,
6632
6632
  itemSize: m,
6633
6633
  array: M,
6634
- stride: w
6634
+ stride: C
6635
6635
  };
6636
6636
  }
6637
6637
  function i(o, a) {
@@ -6662,7 +6662,7 @@ class Xl extends L {
6662
6662
  */
6663
6663
  constructor(e, t = {}) {
6664
6664
  super(e), this.isWater = !0;
6665
- 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 S(0.70707, 0.70707, 0), u = new le(t.sunColor !== void 0 ? t.sunColor : 16777215), A = new le(t.waterColor !== void 0 ? t.waterColor : 8355711), m = t.eye !== void 0 ? t.eye : new S(0, 0, 0), b = t.distortionScale !== void 0 ? t.distortionScale : 20, h = t.side !== void 0 ? t.side : oi, p = t.fog !== void 0 ? t.fog : !1, w = new Xn(), I = new S(), x = new S(), f = new S(), v = new Ce(), M = new S(0, 0, -1), D = new ln(), E = new S(), U = new S(), Z = new ln(), _ = new Ce(), ne = new ii(), $ = new Vn(s, i, { type: Yn }), Q = {
6665
+ 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, f = t.sunDirection !== void 0 ? t.sunDirection : new S(0.70707, 0.70707, 0), u = new le(t.sunColor !== void 0 ? t.sunColor : 16777215), A = new le(t.waterColor !== void 0 ? t.waterColor : 8355711), m = t.eye !== void 0 ? t.eye : new S(0, 0, 0), b = t.distortionScale !== void 0 ? t.distortionScale : 20, h = t.side !== void 0 ? t.side : oi, p = t.fog !== void 0 ? t.fog : !1, C = new Xn(), v = new S(), w = new S(), d = new S(), x = new Ce(), M = new S(0, 0, -1), D = new ln(), E = new S(), U = new S(), Z = new ln(), _ = new Ce(), ne = new ii(), $ = new Vn(s, i, { type: Yn }), Q = {
6666
6666
  name: "MirrorShader",
6667
6667
  uniforms: as.merge([
6668
6668
  cn.fog,
@@ -6794,9 +6794,9 @@ class Xl extends L {
6794
6794
  side: h,
6795
6795
  fog: p
6796
6796
  });
6797
- N.uniforms.mirrorSampler.value = $.texture, N.uniforms.textureMatrix.value = _, N.uniforms.alpha.value = a, N.uniforms.time.value = l, N.uniforms.normalSampler.value = c, N.uniforms.sunColor.value = u, N.uniforms.waterColor.value = A, N.uniforms.sunDirection.value = d, N.uniforms.distortionScale.value = b, N.uniforms.eye.value = m, n.material = N, n.onBeforeRender = function(z, G, ee) {
6798
- if (x.setFromMatrixPosition(n.matrixWorld), f.setFromMatrixPosition(ee.matrixWorld), v.extractRotation(n.matrixWorld), I.set(0, 0, 1), I.applyMatrix4(v), E.subVectors(x, f), E.dot(I) > 0) return;
6799
- E.reflect(I).negate(), E.add(x), v.extractRotation(ee.matrixWorld), M.set(0, 0, -1), M.applyMatrix4(v), M.add(f), U.subVectors(x, M), U.reflect(I).negate(), U.add(x), ne.position.copy(E), ne.up.set(0, 1, 0), ne.up.applyMatrix4(v), ne.up.reflect(I), ne.lookAt(U), ne.far = ee.far, ne.updateMatrixWorld(), ne.projectionMatrix.copy(ee.projectionMatrix), _.set(
6797
+ N.uniforms.mirrorSampler.value = $.texture, N.uniforms.textureMatrix.value = _, N.uniforms.alpha.value = a, N.uniforms.time.value = l, N.uniforms.normalSampler.value = c, N.uniforms.sunColor.value = u, N.uniforms.waterColor.value = A, N.uniforms.sunDirection.value = f, N.uniforms.distortionScale.value = b, N.uniforms.eye.value = m, n.material = N, n.onBeforeRender = function(z, G, ee) {
6798
+ if (w.setFromMatrixPosition(n.matrixWorld), d.setFromMatrixPosition(ee.matrixWorld), x.extractRotation(n.matrixWorld), v.set(0, 0, 1), v.applyMatrix4(x), E.subVectors(w, d), E.dot(v) > 0) return;
6799
+ E.reflect(v).negate(), E.add(w), x.extractRotation(ee.matrixWorld), M.set(0, 0, -1), M.applyMatrix4(x), M.add(d), U.subVectors(w, M), U.reflect(v).negate(), U.add(w), ne.position.copy(E), ne.up.set(0, 1, 0), ne.up.applyMatrix4(x), ne.up.reflect(v), ne.lookAt(U), ne.far = ee.far, ne.updateMatrixWorld(), ne.projectionMatrix.copy(ee.projectionMatrix), _.set(
6800
6800
  0.5,
6801
6801
  0,
6802
6802
  0,
@@ -6813,7 +6813,7 @@ class Xl extends L {
6813
6813
  0,
6814
6814
  0,
6815
6815
  1
6816
- ), _.multiply(ne.projectionMatrix), _.multiply(ne.matrixWorldInverse), w.setFromNormalAndCoplanarPoint(I, x), w.applyMatrix4(ne.matrixWorldInverse), D.set(w.normal.x, w.normal.y, w.normal.z, w.constant);
6816
+ ), _.multiply(ne.projectionMatrix), _.multiply(ne.matrixWorldInverse), C.setFromNormalAndCoplanarPoint(v, w), C.applyMatrix4(ne.matrixWorldInverse), D.set(C.normal.x, C.normal.y, C.normal.z, C.constant);
6817
6817
  const X = ne.projectionMatrix;
6818
6818
  Z.x = (Math.sign(D.x) + X.elements[8]) / X.elements[0], Z.y = (Math.sign(D.y) + X.elements[9]) / X.elements[5], Z.z = -1, Z.w = (1 + X.elements[10]) / X.elements[14], D.multiplyScalar(2 / D.dot(Z)), X.elements[2] = D.x, X.elements[6] = D.y, X.elements[10] = D.z + 1 - o, X.elements[14] = D.w, m.setFromMatrixPosition(ee.matrixWorld);
6819
6819
  const be = z.getRenderTarget(), Oe = z.xr.enabled, Re = z.shadowMap.autoUpdate;
@@ -6862,8 +6862,8 @@ function Fi(r) {
6862
6862
  return Ui(a, l, c, i, o, "水体(圆柱)");
6863
6863
  }
6864
6864
  function Ui(r, e, t, n, s, i = "水体(Water)") {
6865
- const a = new R.TextureLoader().load(Li, (d) => {
6866
- d.wrapS = d.wrapT = R.RepeatWrapping, d.repeat.set(s, s), d.generateMipmaps = !0, d.minFilter = R.LinearMipmapLinearFilter, d.magFilter = R.LinearFilter;
6865
+ const a = new R.TextureLoader().load(Li, (f) => {
6866
+ f.wrapS = f.wrapT = R.RepeatWrapping, f.repeat.set(s, s), f.generateMipmaps = !0, f.minFilter = R.LinearMipmapLinearFilter, f.magFilter = R.LinearFilter;
6867
6867
  }), l = Math.min(1024, Math.max(256, Math.round(Math.sqrt(e * t) * 64))), c = new Xl(r, {
6868
6868
  textureWidth: l,
6869
6869
  textureHeight: l,
@@ -6905,7 +6905,7 @@ function Wi(r) {
6905
6905
  repeatX: a = 4,
6906
6906
  repeatY: l = 4,
6907
6907
  speedX: c = 5e-4,
6908
- speedY: d = 5e-4
6908
+ speedY: f = 5e-4
6909
6909
  } = r || {}, u = new R.PlaneGeometry(e, t), m = new R.TextureLoader().load(Li, (p) => {
6910
6910
  p.wrapS = p.wrapT = R.RepeatWrapping, p.repeat.set(a, l), p.generateMipmaps = !1, p.minFilter = R.LinearFilter, p.magFilter = R.LinearFilter;
6911
6911
  }), b = new R.MeshStandardMaterial({
@@ -6919,13 +6919,13 @@ function Wi(r) {
6919
6919
  transparent: !0,
6920
6920
  opacity: 0.6
6921
6921
  }), h = new R.Mesh(u, b);
6922
- h.rotation.x = -Math.PI / 2, h.position.y = 0, h.name = "水面(标准材质)", h.userData.isWater = !0, h.userData.isMovable = !0, h.userData.waterSpeed = { x: c, y: d }, Be(h);
6922
+ h.rotation.x = -Math.PI / 2, h.position.y = 0, h.name = "水面(标准材质)", h.userData.isWater = !0, h.userData.isMovable = !0, h.userData.waterSpeed = { x: c, y: f }, Be(h);
6923
6923
  }
6924
6924
  function Gi(r) {
6925
6925
  const e = Ws();
6926
6926
  if (!e)
6927
6927
  return console.warn("请先选中一个模型,再添加数据面板"), null;
6928
- const t = Ft(e);
6928
+ const t = Ut(e);
6929
6929
  t && (t.dispose(), ci(e));
6930
6930
  const n = [
6931
6931
  { label: "温度", value: "30", unit: "℃" },
@@ -6963,8 +6963,8 @@ function Bi(r) {
6963
6963
  l.traverse((u) => {
6964
6964
  u.userData.isMovable = !0, u.name || (u.name = u.type), u.type === "Mesh" && (u.frustumCulled = !0, u.castShadow = !0, u.receiveShadow = !0);
6965
6965
  });
6966
- const d = new R.Box3().setFromObject(l).getCenter(new R.Vector3());
6967
- l.position.sub(d), Be(l, !0), Os(!1), e(l);
6966
+ const f = new R.Box3().setFromObject(l).getCenter(new R.Vector3());
6967
+ l.position.sub(f), Be(l, !0), Os(!1), e(l);
6968
6968
  },
6969
6969
  void 0,
6970
6970
  (a) => {
@@ -7008,7 +7008,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7008
7008
  addWater: ji,
7009
7009
  addWaterCylinder: Fi,
7010
7010
  addWaterPlane: Wi,
7011
- getDataPanel: Ft,
7011
+ getDataPanel: Ut,
7012
7012
  importModelFromFile: Bi,
7013
7013
  removeDataPanel: ci,
7014
7014
  setWaterReflection: zi
@@ -7018,7 +7018,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7018
7018
  }, Yl = { class: "tree-icon" }, Kl = { class: "tree-name" }, Zl = {
7019
7019
  key: 0,
7020
7020
  class: "tree-children"
7021
- }, Ql = /* @__PURE__ */ Ze({
7021
+ }, Ql = /* @__PURE__ */ Qe({
7022
7022
  __name: "TreeItem",
7023
7023
  props: {
7024
7024
  node: {},
@@ -7027,9 +7027,9 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7027
7027
  },
7028
7028
  emits: ["select", "delete"],
7029
7029
  setup(r, { emit: e }) {
7030
- const t = r, n = e, s = W(null), { expandedSet: i, toggleExpand: o } = eo("treeExpand"), a = tt(() => i.value.has(t.node.uuid)), l = tt(() => (t.version, t.node.children.some((h) => h.userData.isMovable === !0))), c = tt(() => (t.version, t.node.children.filter(
7030
+ const t = r, n = e, s = W(null), { expandedSet: i, toggleExpand: o } = eo("treeExpand"), a = st(() => i.value.has(t.node.uuid)), l = st(() => (t.version, t.node.children.some((h) => h.userData.isMovable === !0))), c = st(() => (t.version, t.node.children.filter(
7031
7031
  (h) => h.userData.isMovable === !0
7032
- ))), d = tt(
7032
+ ))), f = st(
7033
7033
  () => {
7034
7034
  var h;
7035
7035
  return ((h = t.selectedObject) == null ? void 0 : h.uuid) === t.node.uuid;
@@ -7037,7 +7037,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7037
7037
  );
7038
7038
  to(
7039
7039
  () => {
7040
- d.value && s.value && s.value.scrollIntoView({
7040
+ f.value && s.value && s.value.scrollIntoView({
7041
7041
  block: "nearest",
7042
7042
  // 仅当元素不在可视区域时才滚动
7043
7043
  behavior: "smooth"
@@ -7052,47 +7052,47 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7052
7052
  h.stopPropagation(), n("delete", t.node);
7053
7053
  }, m = (h) => h.type === "Mesh" || h.type === "Sprite" ? "🟦" : h.type === "Light" ? "💡" : "📦", b = (h) => h.name || `${h.type} (${h.id})`;
7054
7054
  return (h, p) => {
7055
- const w = so("TreeItem", !0);
7056
- return H(), k("div", {
7055
+ const C = so("TreeItem", !0);
7056
+ return H(), j("div", {
7057
7057
  class: "tree-node",
7058
7058
  ref_key: "nodeRef",
7059
7059
  ref: s
7060
7060
  }, [
7061
7061
  g("div", {
7062
- class: Pe(["tree-item", { selected: d.value }]),
7062
+ class: Pe(["tree-item", { selected: f.value }]),
7063
7063
  onClick: u
7064
7064
  }, [
7065
- l.value ? (H(), k("span", {
7065
+ l.value ? (H(), j("span", {
7066
7066
  key: 0,
7067
7067
  class: "toggle-icon",
7068
- onClick: p[0] || (p[0] = os((I) => rs(o)(h.node.uuid), ["stop"]))
7069
- }, he(a.value ? "▼" : "▶"), 1)) : (H(), k("span", Vl)),
7070
- g("span", Yl, he(m(h.node)), 1),
7071
- g("span", Kl, he(b(h.node)), 1),
7068
+ onClick: p[0] || (p[0] = St((v) => rs(o)(h.node.uuid), ["stop"]))
7069
+ }, ue(a.value ? "▼" : "▶"), 1)) : (H(), j("span", Vl)),
7070
+ g("span", Yl, ue(m(h.node)), 1),
7071
+ g("span", Kl, ue(b(h.node)), 1),
7072
7072
  g("button", {
7073
7073
  class: "tree-delete",
7074
- onClick: os(A, ["stop"])
7074
+ onClick: St(A, ["stop"])
7075
7075
  }, "×")
7076
7076
  ], 2),
7077
- a.value && l.value ? (H(), k("div", Zl, [
7078
- (H(!0), k(Ee, null, mt(c.value, (I) => (H(), Mt(w, {
7079
- key: I.uuid,
7080
- node: I,
7077
+ a.value && l.value ? (H(), j("div", Zl, [
7078
+ (H(!0), j(Ee, null, mt(c.value, (v) => (H(), Mt(C, {
7079
+ key: v.uuid,
7080
+ node: v,
7081
7081
  "selected-object": h.selectedObject,
7082
7082
  version: h.version,
7083
- onSelect: p[1] || (p[1] = (x) => n("select", x)),
7084
- onDelete: p[2] || (p[2] = (x) => n("delete", x))
7083
+ onSelect: p[1] || (p[1] = (w) => n("select", w)),
7084
+ onDelete: p[2] || (p[2] = (w) => n("delete", w))
7085
7085
  }, null, 8, ["node", "selected-object", "version"]))), 128))
7086
7086
  ])) : re("", !0)
7087
7087
  ], 512);
7088
7088
  };
7089
7089
  }
7090
- }), Qe = (r, e) => {
7090
+ }), Je = (r, e) => {
7091
7091
  const t = r.__vccOpts || r;
7092
7092
  for (const [n, s] of e)
7093
7093
  t[n] = s;
7094
7094
  return t;
7095
- }, Jl = /* @__PURE__ */ Qe(Ql, [["__scopeId", "data-v-5ad9c842"]]), _l = { class: "property-group" }, $l = { class: "row" }, ec = { class: "property-group" }, tc = { class: "row" }, sc = { class: "property-group" }, nc = { class: "row" }, ic = {
7095
+ }, Jl = /* @__PURE__ */ Je(Ql, [["__scopeId", "data-v-5ad9c842"]]), _l = { class: "property-group" }, $l = { class: "row" }, ec = { class: "property-group" }, tc = { class: "row" }, sc = { class: "property-group" }, nc = { class: "row" }, ic = {
7096
7096
  key: 0,
7097
7097
  class: "property-group light-group"
7098
7098
  }, oc = { class: "slider-row" }, rc = {
@@ -7131,7 +7131,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7131
7131
  }, kc = {
7132
7132
  key: 2,
7133
7133
  class: "property-group water-group"
7134
- }, jc = { class: "color-row" }, Fc = ["value"], Uc = ["value"], zc = { class: "slider-row" }, Wc = { class: "toggle-row" }, Gc = { class: "switch" }, Ss = "__panelOriginTransparent__", Bc = /* @__PURE__ */ Ze({
7134
+ }, jc = { class: "color-row" }, Fc = ["value"], Uc = ["value"], zc = { class: "slider-row" }, Wc = { class: "toggle-row" }, Gc = { class: "switch" }, Ss = "__panelOriginTransparent__", Bc = /* @__PURE__ */ Qe({
7135
7135
  __name: "TransformTab",
7136
7136
  props: {
7137
7137
  transform: {},
@@ -7139,7 +7139,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7139
7139
  },
7140
7140
  emits: ["propertyChange"],
7141
7141
  setup(r, { emit: e }) {
7142
- const t = r, n = e, s = () => n("propertyChange"), i = is({
7142
+ const t = r, n = e, s = () => n("propertyChange"), i = os({
7143
7143
  color: 16777215,
7144
7144
  metalness: 0,
7145
7145
  roughness: 0.5,
@@ -7147,18 +7147,18 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7147
7147
  normalScale: 1,
7148
7148
  aoIntensity: 1
7149
7149
  }), o = W("#ffffff"), a = W(!1), l = W(!1), c = W("");
7150
- let d = null;
7150
+ let f = null;
7151
7151
  const u = W(!1), A = W("");
7152
7152
  let m = null;
7153
7153
  const b = W(!1), h = W("");
7154
7154
  let p = null;
7155
- const w = is({
7155
+ const C = os({
7156
7156
  intensity: 1
7157
7157
  });
7158
- function I() {
7159
- t.selectedObject && t.selectedObject.type === "DirectionalLight" && (t.selectedObject.intensity = w.intensity);
7158
+ function v() {
7159
+ t.selectedObject && t.selectedObject.type === "DirectionalLight" && (t.selectedObject.intensity = C.intensity);
7160
7160
  }
7161
- function x(O) {
7161
+ function w(O) {
7162
7162
  let y = null;
7163
7163
  return O.traverse((T) => {
7164
7164
  if (T.type === "Mesh" && !y) {
@@ -7171,7 +7171,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7171
7171
  }
7172
7172
  }), y;
7173
7173
  }
7174
- function f(O) {
7174
+ function d(O) {
7175
7175
  let y = null;
7176
7176
  return O.traverse((T) => {
7177
7177
  if (T.type === "Mesh" && !y) {
@@ -7190,7 +7190,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7190
7190
  }
7191
7191
  }), y;
7192
7192
  }
7193
- function v(O, y) {
7193
+ function x(O, y) {
7194
7194
  let T = !1;
7195
7195
  return O.traverse((P) => {
7196
7196
  if (P.type === "Mesh") {
@@ -7198,8 +7198,8 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7198
7198
  for (const q of J)
7199
7199
  if (q && (q.type === "MeshStandardMaterial" || q.type === "MeshPhongMaterial" || q.type === "MeshBasicMaterial" || q.type === "MeshLambertMaterial" || q.type === "MeshToonMaterial" || q.type === "MeshPhysicalMaterial")) {
7200
7200
  if (y.color !== void 0 && (q.color = new le(y.color)), y.metalness !== void 0 && (q.metalness = y.metalness), y.roughness !== void 0 && (q.roughness = y.roughness), y.opacity !== void 0) {
7201
- const ue = q.userData = q.userData || {};
7202
- ue[Ss] === void 0 && (ue[Ss] = q.transparent), q.opacity = y.opacity, q.transparent = y.opacity < 1 ? !0 : ue[Ss] === !0;
7201
+ const de = q.userData = q.userData || {};
7202
+ de[Ss] === void 0 && (de[Ss] = q.transparent), q.opacity = y.opacity, q.transparent = y.opacity < 1 ? !0 : de[Ss] === !0;
7203
7203
  }
7204
7204
  q.needsUpdate = !0, T = !0;
7205
7205
  }
@@ -7208,7 +7208,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7208
7208
  }
7209
7209
  function M() {
7210
7210
  if (t.selectedObject) {
7211
- const O = v(t.selectedObject, {
7211
+ const O = x(t.selectedObject, {
7212
7212
  metalness: i.metalness,
7213
7213
  roughness: i.roughness,
7214
7214
  opacity: i.opacity
@@ -7220,20 +7220,20 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7220
7220
  const T = O.target.value;
7221
7221
  o.value = T;
7222
7222
  const P = new le(T);
7223
- i.color = P.getHex(), t.selectedObject && v(t.selectedObject, { color: P.getHex() });
7223
+ i.color = P.getHex(), t.selectedObject && x(t.selectedObject, { color: P.getHex() });
7224
7224
  }
7225
7225
  function E(O) {
7226
7226
  let T = O.target.value.trim();
7227
7227
  if (T.startsWith("#") || (T = "#" + T), /^#[0-9a-fA-F]{6}$/.test(T)) {
7228
7228
  o.value = T;
7229
7229
  const P = new le(T);
7230
- i.color = P.getHex(), t.selectedObject && v(t.selectedObject, { color: P.getHex() });
7230
+ i.color = P.getHex(), t.selectedObject && x(t.selectedObject, { color: P.getHex() });
7231
7231
  }
7232
7232
  }
7233
7233
  function U(O) {
7234
7234
  var T, P;
7235
- const y = x(O);
7236
- y && y.normalMap ? (l.value = !0, d = y.normalMap, c.value = ((T = y.userData) == null ? void 0 : T._normalMapFileName) || "法线贴图", i.normalScale = ((P = y.normalScale) == null ? void 0 : P.x) ?? 1) : (l.value = !1, d = null, c.value = "", i.normalScale = 1);
7235
+ const y = w(O);
7236
+ y && y.normalMap ? (l.value = !0, f = y.normalMap, c.value = ((T = y.userData) == null ? void 0 : T._normalMapFileName) || "法线贴图", i.normalScale = ((P = y.normalScale) == null ? void 0 : P.x) ?? 1) : (l.value = !1, f = null, c.value = "", i.normalScale = 1);
7237
7237
  }
7238
7238
  function Z(O) {
7239
7239
  var F;
@@ -7241,20 +7241,20 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7241
7241
  if (!T || !t.selectedObject) return;
7242
7242
  const P = new FileReader();
7243
7243
  P.onload = (J) => {
7244
- var ue;
7245
- const q = (ue = J.target) == null ? void 0 : ue.result;
7244
+ var de;
7245
+ const q = (de = J.target) == null ? void 0 : de.result;
7246
7246
  _(t.selectedObject, q, T.name);
7247
7247
  }, P.readAsDataURL(T), y.value = "";
7248
7248
  }
7249
7249
  function _(O, y, T) {
7250
- const F = new Qt().load(y);
7250
+ const F = new Jt().load(y);
7251
7251
  F.wrapS = F.wrapT = it, F.repeat.set(1, 1), O.traverse((J) => {
7252
7252
  if (J.type === "Mesh") {
7253
- const q = J, ue = Array.isArray(q.material) ? q.material : [q.material];
7254
- for (const V of ue)
7255
- V && (V.type === "MeshStandardMaterial" || V.type === "MeshPhongMaterial" || V.type === "MeshToonMaterial" || V.type === "MeshPhysicalMaterial") && (V.normalMap = F, V.normalScale = new de(i.normalScale, i.normalScale), V.userData = V.userData || {}, V.userData._normalMapDataUrl = y, V.userData._normalMapFileName = T, V.needsUpdate = !0);
7253
+ const q = J, de = Array.isArray(q.material) ? q.material : [q.material];
7254
+ for (const V of de)
7255
+ V && (V.type === "MeshStandardMaterial" || V.type === "MeshPhongMaterial" || V.type === "MeshToonMaterial" || V.type === "MeshPhysicalMaterial") && (V.normalMap = F, V.normalScale = new fe(i.normalScale, i.normalScale), V.userData = V.userData || {}, V.userData._normalMapDataUrl = y, V.userData._normalMapFileName = T, V.needsUpdate = !0);
7256
7256
  }
7257
- }), d = F, l.value = !0, c.value = T;
7257
+ }), f = F, l.value = !0, c.value = T;
7258
7258
  }
7259
7259
  function ne() {
7260
7260
  t.selectedObject && (t.selectedObject.traverse((O) => {
@@ -7263,7 +7263,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7263
7263
  for (const P of T)
7264
7264
  P.normalMap && (P.normalMap = null, P.userData && (delete P.userData._normalMapDataUrl, delete P.userData._normalMapFileName), P.needsUpdate = !0);
7265
7265
  }
7266
- }), d && (d.dispose(), d = null), l.value = !1, c.value = "");
7266
+ }), f && (f.dispose(), f = null), l.value = !1, c.value = "");
7267
7267
  }
7268
7268
  function $() {
7269
7269
  if (!t.selectedObject) return;
@@ -7272,13 +7272,13 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7272
7272
  if (y.type === "Mesh") {
7273
7273
  const T = y, P = Array.isArray(T.material) ? T.material : [T.material];
7274
7274
  for (const F of P)
7275
- F.normalMap && (F.normalScale = new de(O, O), F.needsUpdate = !0);
7275
+ F.normalMap && (F.normalScale = new fe(O, O), F.needsUpdate = !0);
7276
7276
  }
7277
7277
  });
7278
7278
  }
7279
7279
  function Q(O) {
7280
7280
  var T;
7281
- const y = x(O);
7281
+ const y = w(O);
7282
7282
  y && y.map ? (u.value = !0, m = y.map, A.value = ((T = y.userData) == null ? void 0 : T._mapFileName) || "模型贴图") : (u.value = !1, m = null, A.value = "");
7283
7283
  }
7284
7284
  function N(O) {
@@ -7287,17 +7287,17 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7287
7287
  if (!T || !t.selectedObject) return;
7288
7288
  const P = new FileReader();
7289
7289
  P.onload = (J) => {
7290
- var ue;
7291
- const q = (ue = J.target) == null ? void 0 : ue.result;
7290
+ var de;
7291
+ const q = (de = J.target) == null ? void 0 : de.result;
7292
7292
  z(t.selectedObject, q, T.name);
7293
7293
  }, P.readAsDataURL(T), y.value = "";
7294
7294
  }
7295
7295
  function z(O, y, T) {
7296
- const F = new Qt().load(y);
7296
+ const F = new Jt().load(y);
7297
7297
  F.wrapS = F.wrapT = it, F.repeat.set(1, 1), O.traverse((J) => {
7298
7298
  if (J.type === "Mesh") {
7299
- const q = J, ue = Array.isArray(q.material) ? q.material : [q.material];
7300
- for (const V of ue)
7299
+ const q = J, de = Array.isArray(q.material) ? q.material : [q.material];
7300
+ for (const V of de)
7301
7301
  V && (V.type === "MeshStandardMaterial" || V.type === "MeshPhongMaterial" || V.type === "MeshBasicMaterial" || V.type === "MeshLambertMaterial" || V.type === "MeshToonMaterial" || V.type === "MeshPhysicalMaterial") && (V.map = F, V.userData = V.userData || {}, V.userData._mapDataUrl = y, V.userData._mapFileName = T, V.needsUpdate = !0);
7302
7302
  }
7303
7303
  }), m = F, u.value = !0, A.value = T;
@@ -7313,7 +7313,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7313
7313
  }
7314
7314
  function ee(O) {
7315
7315
  var T;
7316
- const y = x(O);
7316
+ const y = w(O);
7317
7317
  y && y.aoMap ? (b.value = !0, p = y.aoMap, h.value = ((T = y.userData) == null ? void 0 : T._aoMapFileName) || "AO 贴图", i.aoIntensity = y.aoMapIntensity ?? 1) : (b.value = !1, p = null, h.value = "", i.aoIntensity = 1);
7318
7318
  }
7319
7319
  function X(O) {
@@ -7322,17 +7322,17 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7322
7322
  if (!T || !t.selectedObject) return;
7323
7323
  const P = new FileReader();
7324
7324
  P.onload = (J) => {
7325
- var ue;
7326
- const q = (ue = J.target) == null ? void 0 : ue.result;
7325
+ var de;
7326
+ const q = (de = J.target) == null ? void 0 : de.result;
7327
7327
  be(t.selectedObject, q, T.name);
7328
7328
  }, P.readAsDataURL(T), y.value = "";
7329
7329
  }
7330
7330
  function be(O, y, T) {
7331
- const F = new Qt().load(y);
7331
+ const F = new Jt().load(y);
7332
7332
  F.wrapS = F.wrapT = it, F.repeat.set(1, 1), O.traverse((J) => {
7333
7333
  if (J.type === "Mesh") {
7334
- const q = J, ue = Array.isArray(q.material) ? q.material : [q.material];
7335
- for (const V of ue)
7334
+ const q = J, de = Array.isArray(q.material) ? q.material : [q.material];
7335
+ for (const V of de)
7336
7336
  V && (V.type === "MeshStandardMaterial" || V.type === "MeshPhongMaterial" || V.type === "MeshToonMaterial" || V.type === "MeshPhysicalMaterial") && (V.aoMap = F, V.aoMapIntensity = i.aoIntensity, V.userData = V.userData || {}, V.userData._aoMapDataUrl = y, V.userData._aoMapFileName = T, V.needsUpdate = !0);
7337
7337
  }
7338
7338
  }), p = F, b.value = !0, h.value = T;
@@ -7357,7 +7357,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7357
7357
  }
7358
7358
  });
7359
7359
  }
7360
- const Xe = tt(() => {
7360
+ const Xe = st(() => {
7361
7361
  const O = t.selectedObject;
7362
7362
  if (!O) return !1;
7363
7363
  let y = !1;
@@ -7434,18 +7434,18 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7434
7434
  () => t.selectedObject,
7435
7435
  (O) => {
7436
7436
  if (O) {
7437
- const y = f(O);
7438
- y ? (i.color = y.color, i.metalness = y.metalness, i.roughness = y.roughness, i.opacity = y.opacity, o.value = "#" + new le(y.color).getHexString(), a.value = !0) : (i.color = 16777215, i.metalness = 0, i.roughness = 0.5, i.opacity = 1, o.value = "#ffffff", a.value = !1), U(O), Q(O), ee(O), O.type === "DirectionalLight" && (w.intensity = O.intensity ?? 1), gs(O), qi(O), Yi(O);
7437
+ const y = d(O);
7438
+ y ? (i.color = y.color, i.metalness = y.metalness, i.roughness = y.roughness, i.opacity = y.opacity, o.value = "#" + new le(y.color).getHexString(), a.value = !0) : (i.color = 16777215, i.metalness = 0, i.roughness = 0.5, i.opacity = 1, o.value = "#ffffff", a.value = !1), U(O), Q(O), ee(O), O.type === "DirectionalLight" && (C.intensity = O.intensity ?? 1), gs(O), qi(O), Yi(O);
7439
7439
  } else
7440
7440
  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 = "", b.value = !1, h.value = "";
7441
7441
  },
7442
7442
  { immediate: !0 }
7443
- ), (O, y) => (H(), k("div", null, [
7443
+ ), (O, y) => (H(), j("div", null, [
7444
7444
  g("div", _l, [
7445
7445
  y[22] || (y[22] = g("label", null, "位置", -1)),
7446
7446
  g("div", $l, [
7447
7447
  y[19] || (y[19] = g("span", null, "X:", -1)),
7448
- j(g("input", {
7448
+ k(g("input", {
7449
7449
  type: "number",
7450
7450
  "onUpdate:modelValue": y[0] || (y[0] = (T) => O.transform.position.x = T),
7451
7451
  step: "0.01",
@@ -7459,7 +7459,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7459
7459
  ]
7460
7460
  ]),
7461
7461
  y[20] || (y[20] = g("span", null, "Y:", -1)),
7462
- j(g("input", {
7462
+ k(g("input", {
7463
7463
  type: "number",
7464
7464
  "onUpdate:modelValue": y[1] || (y[1] = (T) => O.transform.position.y = T),
7465
7465
  step: "0.01",
@@ -7473,7 +7473,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7473
7473
  ]
7474
7474
  ]),
7475
7475
  y[21] || (y[21] = g("span", null, "Z:", -1)),
7476
- j(g("input", {
7476
+ k(g("input", {
7477
7477
  type: "number",
7478
7478
  "onUpdate:modelValue": y[2] || (y[2] = (T) => O.transform.position.z = T),
7479
7479
  step: "0.01",
@@ -7492,7 +7492,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7492
7492
  y[26] || (y[26] = g("label", null, "旋转 (弧度)", -1)),
7493
7493
  g("div", tc, [
7494
7494
  y[23] || (y[23] = g("span", null, "X:", -1)),
7495
- j(g("input", {
7495
+ k(g("input", {
7496
7496
  type: "number",
7497
7497
  "onUpdate:modelValue": y[3] || (y[3] = (T) => O.transform.rotation.x = T),
7498
7498
  step: "0.01",
@@ -7506,7 +7506,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7506
7506
  ]
7507
7507
  ]),
7508
7508
  y[24] || (y[24] = g("span", null, "Y:", -1)),
7509
- j(g("input", {
7509
+ k(g("input", {
7510
7510
  type: "number",
7511
7511
  "onUpdate:modelValue": y[4] || (y[4] = (T) => O.transform.rotation.y = T),
7512
7512
  step: "0.01",
@@ -7520,7 +7520,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7520
7520
  ]
7521
7521
  ]),
7522
7522
  y[25] || (y[25] = g("span", null, "Z:", -1)),
7523
- j(g("input", {
7523
+ k(g("input", {
7524
7524
  type: "number",
7525
7525
  "onUpdate:modelValue": y[5] || (y[5] = (T) => O.transform.rotation.z = T),
7526
7526
  step: "0.01",
@@ -7539,7 +7539,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7539
7539
  y[30] || (y[30] = g("label", null, "缩放", -1)),
7540
7540
  g("div", nc, [
7541
7541
  y[27] || (y[27] = g("span", null, "X:", -1)),
7542
- j(g("input", {
7542
+ k(g("input", {
7543
7543
  type: "number",
7544
7544
  "onUpdate:modelValue": y[6] || (y[6] = (T) => O.transform.scale.x = T),
7545
7545
  step: "0.01",
@@ -7553,7 +7553,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7553
7553
  ]
7554
7554
  ]),
7555
7555
  y[28] || (y[28] = g("span", null, "Y:", -1)),
7556
- j(g("input", {
7556
+ k(g("input", {
7557
7557
  type: "number",
7558
7558
  "onUpdate:modelValue": y[7] || (y[7] = (T) => O.transform.scale.y = T),
7559
7559
  step: "0.01",
@@ -7567,7 +7567,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7567
7567
  ]
7568
7568
  ]),
7569
7569
  y[29] || (y[29] = g("span", null, "Z:", -1)),
7570
- j(g("input", {
7570
+ k(g("input", {
7571
7571
  type: "number",
7572
7572
  "onUpdate:modelValue": y[8] || (y[8] = (T) => O.transform.scale.z = T),
7573
7573
  step: "0.01",
@@ -7582,44 +7582,44 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7582
7582
  ])
7583
7583
  ])
7584
7584
  ]),
7585
- O.selectedObject && O.selectedObject.type === "DirectionalLight" ? (H(), k("div", ic, [
7585
+ O.selectedObject && O.selectedObject.type === "DirectionalLight" ? (H(), j("div", ic, [
7586
7586
  y[32] || (y[32] = g("label", null, "光源属性", -1)),
7587
7587
  g("div", oc, [
7588
7588
  y[31] || (y[31] = g("span", { class: "slider-label" }, "强度", -1)),
7589
- j(g("input", {
7589
+ k(g("input", {
7590
7590
  type: "range",
7591
7591
  min: "0",
7592
7592
  max: "10",
7593
7593
  step: "0.1",
7594
- "onUpdate:modelValue": y[9] || (y[9] = (T) => w.intensity = T),
7595
- onInput: I
7594
+ "onUpdate:modelValue": y[9] || (y[9] = (T) => C.intensity = T),
7595
+ onInput: v
7596
7596
  }, null, 544), [
7597
7597
  [
7598
7598
  B,
7599
- w.intensity,
7599
+ C.intensity,
7600
7600
  void 0,
7601
7601
  { number: !0 }
7602
7602
  ]
7603
7603
  ]),
7604
- j(g("input", {
7604
+ k(g("input", {
7605
7605
  type: "number",
7606
7606
  min: "0",
7607
7607
  max: "100",
7608
7608
  step: "0.1",
7609
- "onUpdate:modelValue": y[10] || (y[10] = (T) => w.intensity = T),
7609
+ "onUpdate:modelValue": y[10] || (y[10] = (T) => C.intensity = T),
7610
7610
  class: "intensity-input",
7611
- onInput: I
7611
+ onInput: v
7612
7612
  }, null, 544), [
7613
7613
  [
7614
7614
  B,
7615
- w.intensity,
7615
+ C.intensity,
7616
7616
  void 0,
7617
7617
  { number: !0 }
7618
7618
  ]
7619
7619
  ])
7620
7620
  ])
7621
7621
  ])) : re("", !0),
7622
- O.selectedObject ? (H(), k("div", rc, [
7622
+ O.selectedObject ? (H(), j("div", rc, [
7623
7623
  y[48] || (y[48] = g("label", null, "材质", -1)),
7624
7624
  g("div", ac, [
7625
7625
  y[33] || (y[33] = g("span", { class: "slider-label" }, "颜色", -1)),
@@ -7639,7 +7639,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7639
7639
  ]),
7640
7640
  g("div", uc, [
7641
7641
  y[34] || (y[34] = g("span", { class: "slider-label" }, "金属度", -1)),
7642
- j(g("input", {
7642
+ k(g("input", {
7643
7643
  type: "range",
7644
7644
  min: "0",
7645
7645
  max: "1",
@@ -7654,11 +7654,11 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7654
7654
  { number: !0 }
7655
7655
  ]
7656
7656
  ]),
7657
- g("span", dc, he(i.metalness.toFixed(2)), 1)
7657
+ g("span", dc, ue(i.metalness.toFixed(2)), 1)
7658
7658
  ]),
7659
7659
  g("div", fc, [
7660
7660
  y[35] || (y[35] = g("span", { class: "slider-label" }, "粗糙度", -1)),
7661
- j(g("input", {
7661
+ k(g("input", {
7662
7662
  type: "range",
7663
7663
  min: "0",
7664
7664
  max: "1",
@@ -7673,11 +7673,11 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7673
7673
  { number: !0 }
7674
7674
  ]
7675
7675
  ]),
7676
- g("span", hc, he(i.roughness.toFixed(2)), 1)
7676
+ g("span", hc, ue(i.roughness.toFixed(2)), 1)
7677
7677
  ]),
7678
7678
  g("div", pc, [
7679
7679
  y[36] || (y[36] = g("span", { class: "slider-label" }, "透明度", -1)),
7680
- j(g("input", {
7680
+ k(g("input", {
7681
7681
  type: "range",
7682
7682
  min: "0",
7683
7683
  max: "1",
@@ -7692,12 +7692,12 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7692
7692
  { number: !0 }
7693
7693
  ]
7694
7694
  ]),
7695
- g("span", Ac, he(i.opacity.toFixed(2)), 1)
7695
+ g("span", Ac, ue(i.opacity.toFixed(2)), 1)
7696
7696
  ]),
7697
7697
  g("div", mc, [
7698
7698
  y[39] || (y[39] = g("span", { class: "slider-label" }, "法线贴图", -1)),
7699
7699
  g("div", gc, [
7700
- l.value ? (H(), k(Ee, { key: 1 }, [
7700
+ l.value ? (H(), j(Ee, { key: 1 }, [
7701
7701
  g("label", bc, [
7702
7702
  g("input", {
7703
7703
  type: "file",
@@ -7705,7 +7705,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7705
7705
  onChange: Z,
7706
7706
  class: "texture-file-input"
7707
7707
  }, null, 32),
7708
- g("span", xc, he(c.value), 1),
7708
+ g("span", xc, ue(c.value), 1),
7709
7709
  y[38] || (y[38] = g("span", { class: "modify-hint" }, "修改", -1))
7710
7710
  ]),
7711
7711
  g("button", {
@@ -7713,7 +7713,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7713
7713
  title: "移除法线贴图",
7714
7714
  onClick: ne
7715
7715
  }, " ✕ ")
7716
- ], 64)) : (H(), k("label", yc, [
7716
+ ], 64)) : (H(), j("label", yc, [
7717
7717
  g("input", {
7718
7718
  type: "file",
7719
7719
  accept: "image/*",
@@ -7724,9 +7724,9 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7724
7724
  ]))
7725
7725
  ])
7726
7726
  ]),
7727
- l.value ? (H(), k("div", Ic, [
7727
+ l.value ? (H(), j("div", Ic, [
7728
7728
  y[40] || (y[40] = g("span", { class: "slider-label" }, "法线强度", -1)),
7729
- j(g("input", {
7729
+ k(g("input", {
7730
7730
  type: "range",
7731
7731
  min: "0",
7732
7732
  max: "5",
@@ -7741,12 +7741,12 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7741
7741
  { number: !0 }
7742
7742
  ]
7743
7743
  ]),
7744
- g("span", Cc, he(i.normalScale.toFixed(2)), 1)
7744
+ g("span", Cc, ue(i.normalScale.toFixed(2)), 1)
7745
7745
  ])) : re("", !0),
7746
7746
  g("div", wc, [
7747
7747
  y[43] || (y[43] = g("span", { class: "slider-label" }, "AO 贴图", -1)),
7748
7748
  g("div", vc, [
7749
- b.value ? (H(), k(Ee, { key: 1 }, [
7749
+ b.value ? (H(), j(Ee, { key: 1 }, [
7750
7750
  g("label", Tc, [
7751
7751
  g("input", {
7752
7752
  type: "file",
@@ -7754,7 +7754,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7754
7754
  onChange: X,
7755
7755
  class: "texture-file-input"
7756
7756
  }, null, 32),
7757
- g("span", Ec, he(h.value), 1),
7757
+ g("span", Ec, ue(h.value), 1),
7758
7758
  y[42] || (y[42] = g("span", { class: "modify-hint" }, "修改", -1))
7759
7759
  ]),
7760
7760
  g("button", {
@@ -7762,7 +7762,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7762
7762
  title: "移除 AO 贴图",
7763
7763
  onClick: Oe
7764
7764
  }, " ✕ ")
7765
- ], 64)) : (H(), k("label", Mc, [
7765
+ ], 64)) : (H(), j("label", Mc, [
7766
7766
  g("input", {
7767
7767
  type: "file",
7768
7768
  accept: "image/*",
@@ -7773,9 +7773,9 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7773
7773
  ]))
7774
7774
  ])
7775
7775
  ]),
7776
- b.value ? (H(), k("div", Dc, [
7776
+ b.value ? (H(), j("div", Dc, [
7777
7777
  y[44] || (y[44] = g("span", { class: "slider-label" }, "AO 强度", -1)),
7778
- j(g("input", {
7778
+ k(g("input", {
7779
7779
  type: "range",
7780
7780
  min: "0",
7781
7781
  max: "1",
@@ -7790,12 +7790,12 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7790
7790
  { number: !0 }
7791
7791
  ]
7792
7792
  ]),
7793
- g("span", Oc, he(i.aoIntensity.toFixed(2)), 1)
7793
+ g("span", Oc, ue(i.aoIntensity.toFixed(2)), 1)
7794
7794
  ])) : re("", !0),
7795
7795
  g("div", Rc, [
7796
7796
  y[47] || (y[47] = g("span", { class: "slider-label" }, "模型贴图", -1)),
7797
7797
  g("div", Pc, [
7798
- u.value ? (H(), k(Ee, { key: 1 }, [
7798
+ u.value ? (H(), j(Ee, { key: 1 }, [
7799
7799
  g("label", Lc, [
7800
7800
  g("input", {
7801
7801
  type: "file",
@@ -7803,7 +7803,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7803
7803
  onChange: N,
7804
7804
  class: "texture-file-input"
7805
7805
  }, null, 32),
7806
- g("span", Nc, he(A.value), 1),
7806
+ g("span", Nc, ue(A.value), 1),
7807
7807
  y[46] || (y[46] = g("span", { class: "modify-hint" }, "修改", -1))
7808
7808
  ]),
7809
7809
  g("button", {
@@ -7811,7 +7811,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7811
7811
  title: "移除模型贴图",
7812
7812
  onClick: G
7813
7813
  }, " ✕ ")
7814
- ], 64)) : (H(), k("label", Sc, [
7814
+ ], 64)) : (H(), j("label", Sc, [
7815
7815
  g("input", {
7816
7816
  type: "file",
7817
7817
  accept: "image/*",
@@ -7822,9 +7822,9 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7822
7822
  ]))
7823
7823
  ])
7824
7824
  ]),
7825
- a.value ? re("", !0) : (H(), k("div", Hc, " ⚠️ 当前材质不支持金属度/粗糙度(仅支持 Standard/Phong) "))
7825
+ a.value ? re("", !0) : (H(), j("div", Hc, " ⚠️ 当前材质不支持金属度/粗糙度(仅支持 Standard/Phong) "))
7826
7826
  ])) : re("", !0),
7827
- Xe.value ? (H(), k("div", kc, [
7827
+ Xe.value ? (H(), j("div", kc, [
7828
7828
  y[54] || (y[54] = g("label", null, "水体属性", -1)),
7829
7829
  g("div", jc, [
7830
7830
  y[49] || (y[49] = g("span", { class: "slider-label" }, "水体颜色", -1)),
@@ -7844,7 +7844,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7844
7844
  ]),
7845
7845
  g("div", zc, [
7846
7846
  y[50] || (y[50] = g("span", { class: "slider-label" }, "浑浊度", -1)),
7847
- j(g("input", {
7847
+ k(g("input", {
7848
7848
  type: "range",
7849
7849
  min: "0",
7850
7850
  max: "1",
@@ -7859,7 +7859,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7859
7859
  { number: !0 }
7860
7860
  ]
7861
7861
  ]),
7862
- j(g("input", {
7862
+ k(g("input", {
7863
7863
  type: "number",
7864
7864
  min: "0",
7865
7865
  max: "1",
@@ -7879,7 +7879,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7879
7879
  g("div", Wc, [
7880
7880
  y[52] || (y[52] = g("span", { class: "slider-label" }, "实时反射", -1)),
7881
7881
  g("label", Gc, [
7882
- j(g("input", {
7882
+ k(g("input", {
7883
7883
  type: "checkbox",
7884
7884
  "onUpdate:modelValue": y[18] || (y[18] = (T) => ct.value = T),
7885
7885
  onChange: Zi
@@ -7894,7 +7894,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7894
7894
  ])) : re("", !0)
7895
7895
  ]));
7896
7896
  }
7897
- }), Xc = /* @__PURE__ */ Qe(Bc, [["__scopeId", "data-v-9676ce99"]]), qc = { class: "userdata-tab" }, Vc = { class: "property-group userdata-group" }, Yc = { class: "userdata-add-row" }, Kc = ["onKeyup"], Zc = {
7897
+ }), Xc = /* @__PURE__ */ Je(Bc, [["__scopeId", "data-v-fab33ce4"]]), qc = { class: "userdata-tab" }, Vc = { class: "property-group userdata-group" }, Yc = { class: "userdata-add-row" }, Kc = ["onKeyup"], Zc = {
7898
7898
  key: 0,
7899
7899
  class: "userdata-list"
7900
7900
  }, Qc = { class: "ud-key" }, Jc = {
@@ -7907,139 +7907,139 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7907
7907
  }, tu = { class: "ud-json-actions" }, su = ["onClick"], nu = ["onClick"], iu = {
7908
7908
  key: 1,
7909
7909
  class: "userdata-empty"
7910
- }, ou = /* @__PURE__ */ Ze({
7910
+ }, ou = /* @__PURE__ */ Qe({
7911
7911
  __name: "UserDataTab",
7912
7912
  props: {
7913
7913
  selectedObject: {}
7914
7914
  },
7915
7915
  setup(r) {
7916
7916
  const e = r, t = W(""), n = W(""), s = W(null), i = W(""), o = W(null), a = W([]);
7917
- function l(x) {
7918
- if (x === null) return "null";
7919
- if (x === void 0) return "undefined";
7920
- if (Array.isArray(x)) return "array";
7921
- const f = typeof x;
7922
- return f === "object" ? "object" : f === "number" ? "number" : f === "boolean" ? "boolean" : "string";
7923
- }
7924
- function c(x) {
7925
- const f = [];
7926
- if (x.userData)
7927
- for (const [v, M] of Object.entries(x.userData))
7928
- typeof v == "string" && !v.startsWith("_") && f.push({
7929
- key: v,
7917
+ function l(w) {
7918
+ if (w === null) return "null";
7919
+ if (w === void 0) return "undefined";
7920
+ if (Array.isArray(w)) return "array";
7921
+ const d = typeof w;
7922
+ return d === "object" ? "object" : d === "number" ? "number" : d === "boolean" ? "boolean" : "string";
7923
+ }
7924
+ function c(w) {
7925
+ const d = [];
7926
+ if (w.userData)
7927
+ for (const [x, M] of Object.entries(w.userData))
7928
+ typeof x == "string" && !x.startsWith("_") && d.push({
7929
+ key: x,
7930
7930
  value: typeof M == "object" ? JSON.stringify(M) : String(M),
7931
7931
  rawType: l(M)
7932
7932
  });
7933
- a.value = f;
7934
- }
7935
- function d(x) {
7936
- const f = x.trim();
7937
- if (f === "true") return !0;
7938
- if (f === "false") return !1;
7939
- if (f === "null") return null;
7940
- if (f === "undefined") return;
7941
- const v = Number(f);
7942
- if (f !== "" && !isNaN(v))
7943
- return String(v) !== f ? f : v;
7944
- if (f.startsWith("{") && f.endsWith("}") || f.startsWith("[") && f.endsWith("]"))
7933
+ a.value = d;
7934
+ }
7935
+ function f(w) {
7936
+ const d = w.trim();
7937
+ if (d === "true") return !0;
7938
+ if (d === "false") return !1;
7939
+ if (d === "null") return null;
7940
+ if (d === "undefined") return;
7941
+ const x = Number(d);
7942
+ if (d !== "" && !isNaN(x))
7943
+ return String(x) !== d ? d : x;
7944
+ if (d.startsWith("{") && d.endsWith("}") || d.startsWith("[") && d.endsWith("]"))
7945
7945
  try {
7946
- return JSON.parse(f);
7946
+ return JSON.parse(d);
7947
7947
  } catch {
7948
7948
  }
7949
- return f;
7949
+ return d;
7950
7950
  }
7951
7951
  function u() {
7952
7952
  if (!e.selectedObject || !t.value.trim()) return;
7953
- const x = t.value.trim();
7954
- if (x === "isMovable") {
7953
+ const w = t.value.trim();
7954
+ if (w === "isMovable") {
7955
7955
  t.value = "";
7956
7956
  return;
7957
7957
  }
7958
- const f = d(n.value);
7959
- e.selectedObject.userData[x] = f, c(e.selectedObject), t.value = "", n.value = "";
7958
+ const d = f(n.value);
7959
+ e.selectedObject.userData[w] = d, c(e.selectedObject), t.value = "", n.value = "";
7960
7960
  }
7961
- function A(x, f) {
7962
- e.selectedObject && (delete e.selectedObject.userData[x], c(e.selectedObject));
7961
+ function A(w, d) {
7962
+ e.selectedObject && (delete e.selectedObject.userData[w], c(e.selectedObject));
7963
7963
  }
7964
- function m(x) {
7965
- return x.length <= 28 ? x : x.substring(0, 28) + "…";
7964
+ function m(w) {
7965
+ return w.length <= 28 ? w : w.substring(0, 28) + "…";
7966
7966
  }
7967
- function b(x) {
7968
- s.value = x;
7969
- const f = e.selectedObject;
7970
- if (!f) return;
7971
- const v = f.userData[x];
7967
+ function b(w) {
7968
+ s.value = w;
7969
+ const d = e.selectedObject;
7970
+ if (!d) return;
7971
+ const x = d.userData[w];
7972
7972
  try {
7973
- i.value = JSON.stringify(v, null, 2);
7973
+ i.value = JSON.stringify(x, null, 2);
7974
7974
  } catch {
7975
- i.value = String(v);
7975
+ i.value = String(x);
7976
7976
  }
7977
7977
  h();
7978
7978
  }
7979
7979
  function h() {
7980
- const x = i.value.trim();
7981
- if (!x) {
7980
+ const w = i.value.trim();
7981
+ if (!w) {
7982
7982
  o.value = null;
7983
7983
  return;
7984
7984
  }
7985
- if (!x.startsWith("{") && !x.startsWith("[")) {
7985
+ if (!w.startsWith("{") && !w.startsWith("[")) {
7986
7986
  o.value = "提示:当前输入不是 JSON 格式,将作为普通字符串保存";
7987
7987
  return;
7988
7988
  }
7989
7989
  try {
7990
- JSON.parse(x), o.value = null;
7991
- } catch (f) {
7992
- o.value = "JSON 格式错误:" + f.message;
7990
+ JSON.parse(w), o.value = null;
7991
+ } catch (d) {
7992
+ o.value = "JSON 格式错误:" + d.message;
7993
7993
  }
7994
7994
  }
7995
- function p(x) {
7996
- const f = e.selectedObject;
7997
- if (!f) return;
7998
- const v = i.value.trim();
7995
+ function p(w) {
7996
+ const d = e.selectedObject;
7997
+ if (!d) return;
7998
+ const x = i.value.trim();
7999
7999
  try {
8000
- const M = JSON.parse(v);
8001
- f.userData[x] = M, c(f), s.value = null, i.value = "";
8000
+ const M = JSON.parse(x);
8001
+ d.userData[w] = M, c(d), s.value = null, i.value = "";
8002
8002
  } catch {
8003
- f.userData[x] = v, c(f), s.value = null, i.value = "";
8003
+ d.userData[w] = x, c(d), s.value = null, i.value = "";
8004
8004
  }
8005
8005
  }
8006
- function w() {
8006
+ function C() {
8007
8007
  s.value = null, i.value = "";
8008
8008
  }
8009
- function I() {
8010
- const x = e.selectedObject;
8011
- if (!x) return;
8012
- const f = Gs();
8013
- f && (x.userData.closeUpView = {
8014
- x: f.position.x,
8015
- y: f.position.y,
8016
- z: f.position.z
8017
- }, c(x));
8009
+ function v() {
8010
+ const w = e.selectedObject;
8011
+ if (!w) return;
8012
+ const d = Gs();
8013
+ d && (w.userData.closeUpView = {
8014
+ x: d.position.x,
8015
+ y: d.position.y,
8016
+ z: d.position.z
8017
+ }, c(w));
8018
8018
  }
8019
8019
  return Me(
8020
8020
  () => e.selectedObject,
8021
- (x) => {
8022
- x ? c(x) : a.value = [], s.value = null, i.value = "";
8021
+ (w) => {
8022
+ w ? c(w) : a.value = [], s.value = null, i.value = "";
8023
8023
  },
8024
8024
  { immediate: !0 }
8025
- ), (x, f) => (H(), k("div", qc, [
8025
+ ), (w, d) => (H(), j("div", qc, [
8026
8026
  g("div", Vc, [
8027
- f[3] || (f[3] = g("label", null, "userData 属性", -1)),
8027
+ d[3] || (d[3] = g("label", null, "userData 属性", -1)),
8028
8028
  g("div", Yc, [
8029
- j(g("input", {
8029
+ k(g("input", {
8030
8030
  type: "text",
8031
- "onUpdate:modelValue": f[0] || (f[0] = (v) => t.value = v),
8031
+ "onUpdate:modelValue": d[0] || (d[0] = (x) => t.value = x),
8032
8032
  placeholder: "属性名",
8033
8033
  class: "ud-input",
8034
8034
  onKeyup: dt(u, ["enter"])
8035
8035
  }, null, 544), [
8036
8036
  [B, t.value]
8037
8037
  ]),
8038
- j(g("textarea", {
8039
- "onUpdate:modelValue": f[1] || (f[1] = (v) => n.value = v),
8038
+ k(g("textarea", {
8039
+ "onUpdate:modelValue": d[1] || (d[1] = (x) => n.value = x),
8040
8040
  placeholder: "值",
8041
8041
  class: "ud-input ud-textarea",
8042
- onKeyup: dt(os(u, ["prevent"]), ["enter"])
8042
+ onKeyup: dt(St(u, ["prevent"]), ["enter"])
8043
8043
  }, null, 40, Kc), [
8044
8044
  [B, n.value]
8045
8045
  ]),
@@ -8049,27 +8049,27 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8049
8049
  onClick: u
8050
8050
  }, " + ")
8051
8051
  ]),
8052
- a.value.length > 0 ? (H(), k("div", Zc, [
8053
- (H(!0), k(Ee, null, mt(a.value, (v, M) => (H(), k("div", {
8054
- key: v.key,
8052
+ a.value.length > 0 ? (H(), j("div", Zc, [
8053
+ (H(!0), j(Ee, null, mt(a.value, (x, M) => (H(), j("div", {
8054
+ key: x.key,
8055
8055
  class: Pe(["userdata-item", {
8056
- readonly: v.key === "isMovable",
8057
- "editing-json": s.value === v.key
8056
+ readonly: x.key === "isMovable",
8057
+ "editing-json": s.value === x.key
8058
8058
  }])
8059
8059
  }, [
8060
- g("span", Qc, he(v.key), 1),
8061
- v.key === "isMovable" ? (H(), k("span", Jc, he(String(v.value)) + " 🔒 ", 1)) : v.key !== "isMovable" ? (H(), k(Ee, { key: 1 }, [
8062
- s.value !== v.key ? (H(), k(Ee, { key: 0 }, [
8063
- g("span", _c, he(m(v.value)), 1),
8060
+ g("span", Qc, ue(x.key), 1),
8061
+ x.key === "isMovable" ? (H(), j("span", Jc, ue(String(x.value)) + " 🔒 ", 1)) : x.key !== "isMovable" ? (H(), j(Ee, { key: 1 }, [
8062
+ s.value !== x.key ? (H(), j(Ee, { key: 0 }, [
8063
+ g("span", _c, ue(m(x.value)), 1),
8064
8064
  g("button", {
8065
8065
  class: "ud-btn edit-json-btn",
8066
8066
  title: "编辑对象",
8067
- onClick: (D) => b(v.key)
8067
+ onClick: (D) => b(x.key)
8068
8068
  }, " ✎ ", 8, $c)
8069
- ], 64)) : (H(), k(Ee, { key: 1 }, [
8070
- o.value ? (H(), k("div", eu, " ⚠ " + he(o.value), 1)) : re("", !0),
8071
- j(g("textarea", {
8072
- "onUpdate:modelValue": f[2] || (f[2] = (D) => i.value = D),
8069
+ ], 64)) : (H(), j(Ee, { key: 1 }, [
8070
+ o.value ? (H(), j("div", eu, " ⚠ " + ue(o.value), 1)) : re("", !0),
8071
+ k(g("textarea", {
8072
+ "onUpdate:modelValue": d[2] || (d[2] = (D) => i.value = D),
8073
8073
  class: Pe(["ud-json-textarea", { "has-error": o.value }]),
8074
8074
  rows: "3",
8075
8075
  onInput: h
@@ -8080,120 +8080,120 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8080
8080
  g("button", {
8081
8081
  class: "ud-btn apply-btn",
8082
8082
  title: "应用修改",
8083
- onClick: (D) => p(v.key)
8083
+ onClick: (D) => p(x.key)
8084
8084
  }, " ✓ ", 8, su),
8085
8085
  g("button", {
8086
8086
  class: "ud-btn cancel-btn",
8087
8087
  title: "取消编辑",
8088
- onClick: w
8088
+ onClick: C
8089
8089
  }, " ✕ ")
8090
8090
  ])
8091
8091
  ], 64)),
8092
- s.value !== v.key ? (H(), k("button", {
8092
+ s.value !== x.key ? (H(), j("button", {
8093
8093
  key: 2,
8094
8094
  class: "ud-btn del-btn",
8095
8095
  title: "删除",
8096
- onClick: (D) => A(v.key)
8096
+ onClick: (D) => A(x.key)
8097
8097
  }, " ✕ ", 8, nu)) : re("", !0)
8098
8098
  ], 64)) : re("", !0)
8099
8099
  ], 2))), 128))
8100
- ])) : (H(), k("div", iu, "暂无自定义数据")),
8100
+ ])) : (H(), j("div", iu, "暂无自定义数据")),
8101
8101
  g("button", {
8102
8102
  class: "get-camera-btn",
8103
- onClick: I
8103
+ onClick: v
8104
8104
  }, " 添加当前相机位置 ")
8105
8105
  ])
8106
8106
  ]));
8107
8107
  }
8108
- }), ru = /* @__PURE__ */ Qe(ou, [["__scopeId", "data-v-4e117415"]]), au = { class: "datapanel-tab" }, lu = { class: "property-group" }, cu = { class: "dp-section" }, uu = { class: "dp-visibility-row" }, du = { class: "dp-toggle" }, fu = { class: "dp-visibility-text" }, hu = { class: "dp-section" }, pu = { class: "dp-section" }, Au = { class: "dp-size-row" }, mu = { class: "dp-size-value" }, gu = { class: "dp-section" }, yu = { class: "dp-size-row" }, bu = { class: "dp-section" }, xu = { class: "dp-size-row" }, Iu = { class: "dp-section" }, Cu = { class: "dp-size-row" }, wu = { class: "dp-section" }, vu = { class: "dp-list" }, Mu = ["onUpdate:modelValue"], Tu = ["onUpdate:modelValue"], Eu = ["onUpdate:modelValue"], Du = ["onUpdate:modelValue"], Ou = ["onClick"], Ru = { class: "dp-add-row" }, Pu = /* @__PURE__ */ Ze({
8108
+ }), ru = /* @__PURE__ */ Je(ou, [["__scopeId", "data-v-4e117415"]]), au = { class: "datapanel-tab" }, lu = { class: "property-group" }, cu = { class: "dp-section" }, uu = { class: "dp-visibility-row" }, du = { class: "dp-toggle" }, fu = { class: "dp-visibility-text" }, hu = { class: "dp-section" }, pu = { class: "dp-section" }, Au = { class: "dp-size-row" }, mu = { class: "dp-size-value" }, gu = { class: "dp-section" }, yu = { class: "dp-size-row" }, bu = { class: "dp-section" }, xu = { class: "dp-size-row" }, Iu = { class: "dp-section" }, Cu = { class: "dp-size-row" }, wu = { class: "dp-section" }, vu = { class: "dp-list" }, Mu = ["onUpdate:modelValue"], Tu = ["onUpdate:modelValue"], Eu = ["onUpdate:modelValue"], Du = ["onUpdate:modelValue"], Ou = ["onClick"], Ru = { class: "dp-add-row" }, Pu = /* @__PURE__ */ Qe({
8109
8109
  __name: "DataPanelTab",
8110
8110
  props: {
8111
8111
  selectedObject: {}
8112
8112
  },
8113
8113
  setup(r) {
8114
- 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("");
8114
+ 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(""), f = W(""), u = W(""), A = W("");
8115
8115
  let m = h(), b = !1;
8116
8116
  function h() {
8117
- const x = e.selectedObject;
8118
- return x ? Ft(hs(x)) : null;
8119
- }
8120
- Me(s, (x) => {
8121
- b || !m || (m.visible = x);
8122
- }), Me(l, (x) => {
8123
- b || !m || m.setWidth(`${x}em`);
8124
- }), Me(o, (x) => {
8125
- b || !m || m.setOffsetX(x);
8126
- }), Me(i, (x) => {
8127
- b || !m || m.setOffsetY(x);
8128
- }), Me(a, (x) => {
8129
- b || !m || m.setOffsetZ(x);
8117
+ const w = e.selectedObject;
8118
+ return w ? Ut(hs(w)) : null;
8119
+ }
8120
+ Me(s, (w) => {
8121
+ b || !m || (m.visible = w);
8122
+ }), Me(l, (w) => {
8123
+ b || !m || m.setWidth(`${w}em`);
8124
+ }), Me(o, (w) => {
8125
+ b || !m || m.setOffsetX(w);
8126
+ }), Me(i, (w) => {
8127
+ b || !m || m.setOffsetY(w);
8128
+ }), Me(a, (w) => {
8129
+ b || !m || m.setOffsetZ(w);
8130
8130
  });
8131
8131
  function p() {
8132
8132
  b || !m || (m.setTitle(t.value), m.setItems([...n.value]));
8133
8133
  }
8134
8134
  Me(t, () => p()), Me(n, () => p(), { deep: !0 });
8135
- function w(x) {
8136
- n.value = n.value.filter((f, v) => v !== x), p();
8135
+ function C(w) {
8136
+ n.value = n.value.filter((d, x) => x !== w), p();
8137
8137
  }
8138
- function I() {
8139
- !c.value.trim() || !d.value.trim() || (n.value = [
8138
+ function v() {
8139
+ !c.value.trim() || !f.value.trim() || (n.value = [
8140
8140
  ...n.value,
8141
8141
  {
8142
8142
  label: c.value.trim(),
8143
- value: d.value.trim(),
8143
+ value: f.value.trim(),
8144
8144
  unit: u.value.trim() || void 0,
8145
8145
  code: A.value.trim() || void 0
8146
8146
  }
8147
- ], p(), c.value = "", d.value = "", u.value = "", A.value = "");
8147
+ ], p(), c.value = "", f.value = "", u.value = "", A.value = "");
8148
8148
  }
8149
8149
  return Me(
8150
8150
  () => e.selectedObject,
8151
8151
  () => {
8152
- b = !0, m = h(), m ? (t.value = m.getTitle(), n.value = m.getItems(), s.value = m.visible, i.value = m.getOffsetY(), o.value = m.getOffsetX(), a.value = m.getOffsetZ(), l.value = parseFloat(m.getWidth()) || 20) : (t.value = "", n.value = [], s.value = !0, i.value = 0.1, o.value = 0, a.value = 0, l.value = 20), c.value = "", d.value = "", u.value = "", A.value = "", setTimeout(() => {
8152
+ b = !0, m = h(), m ? (t.value = m.getTitle(), n.value = m.getItems(), s.value = m.visible, i.value = m.getOffsetY(), o.value = m.getOffsetX(), a.value = m.getOffsetZ(), l.value = parseFloat(m.getWidth()) || 20) : (t.value = "", n.value = [], s.value = !0, i.value = 0.1, o.value = 0, a.value = 0, l.value = 20), c.value = "", f.value = "", u.value = "", A.value = "", setTimeout(() => {
8153
8153
  b = !1;
8154
8154
  }, 0);
8155
8155
  },
8156
8156
  { immediate: !0 }
8157
- ), (x, f) => (H(), k("div", au, [
8157
+ ), (w, d) => (H(), j("div", au, [
8158
8158
  g("div", lu, [
8159
- f[29] || (f[29] = g("label", null, "📊 数据面板", -1)),
8159
+ d[29] || (d[29] = g("label", null, "📊 数据面板", -1)),
8160
8160
  g("div", cu, [
8161
- f[14] || (f[14] = g("span", { class: "dp-label-sm" }, "可见性", -1)),
8161
+ d[14] || (d[14] = g("span", { class: "dp-label-sm" }, "可见性", -1)),
8162
8162
  g("div", uu, [
8163
8163
  g("label", du, [
8164
- j(g("input", {
8164
+ k(g("input", {
8165
8165
  type: "checkbox",
8166
- "onUpdate:modelValue": f[0] || (f[0] = (v) => s.value = v)
8166
+ "onUpdate:modelValue": d[0] || (d[0] = (x) => s.value = x)
8167
8167
  }, null, 512), [
8168
8168
  [Gn, s.value]
8169
8169
  ]),
8170
- f[13] || (f[13] = g("span", { class: "dp-toggle-slider" }, null, -1))
8170
+ d[13] || (d[13] = g("span", { class: "dp-toggle-slider" }, null, -1))
8171
8171
  ]),
8172
- g("span", fu, he(s.value ? "显示中" : "已隐藏"), 1)
8172
+ g("span", fu, ue(s.value ? "显示中" : "已隐藏"), 1)
8173
8173
  ])
8174
8174
  ]),
8175
8175
  g("div", hu, [
8176
- f[15] || (f[15] = g("span", { class: "dp-label-sm" }, "标题", -1)),
8177
- j(g("input", {
8176
+ d[15] || (d[15] = g("span", { class: "dp-label-sm" }, "标题", -1)),
8177
+ k(g("input", {
8178
8178
  type: "text",
8179
8179
  class: "dp-input",
8180
- "onUpdate:modelValue": f[1] || (f[1] = (v) => t.value = v),
8180
+ "onUpdate:modelValue": d[1] || (d[1] = (x) => t.value = x),
8181
8181
  placeholder: "面板标题"
8182
8182
  }, null, 512), [
8183
8183
  [B, t.value]
8184
8184
  ])
8185
8185
  ]),
8186
8186
  g("div", pu, [
8187
- f[18] || (f[18] = g("span", { class: "dp-label-sm" }, "面板宽度", -1)),
8187
+ d[18] || (d[18] = g("span", { class: "dp-label-sm" }, "面板宽度", -1)),
8188
8188
  g("div", Au, [
8189
- f[16] || (f[16] = g("span", { class: "dp-range-label" }, "窄", -1)),
8190
- j(g("input", {
8189
+ d[16] || (d[16] = g("span", { class: "dp-range-label" }, "窄", -1)),
8190
+ k(g("input", {
8191
8191
  type: "range",
8192
8192
  class: "dp-range",
8193
8193
  min: "10",
8194
8194
  max: "40",
8195
8195
  step: "1",
8196
- "onUpdate:modelValue": f[2] || (f[2] = (v) => l.value = v)
8196
+ "onUpdate:modelValue": d[2] || (d[2] = (x) => l.value = x)
8197
8197
  }, null, 512), [
8198
8198
  [
8199
8199
  B,
@@ -8202,21 +8202,21 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8202
8202
  { number: !0 }
8203
8203
  ]
8204
8204
  ]),
8205
- f[17] || (f[17] = g("span", { class: "dp-range-label" }, "宽", -1)),
8206
- g("span", mu, he(l.value) + "em", 1)
8205
+ d[17] || (d[17] = g("span", { class: "dp-range-label" }, "宽", -1)),
8206
+ g("span", mu, ue(l.value) + "em", 1)
8207
8207
  ])
8208
8208
  ]),
8209
8209
  g("div", gu, [
8210
- f[21] || (f[21] = g("span", { class: "dp-label-sm" }, "面板左右位置", -1)),
8210
+ d[21] || (d[21] = g("span", { class: "dp-label-sm" }, "面板左右位置", -1)),
8211
8211
  g("div", yu, [
8212
- f[19] || (f[19] = g("span", { class: "dp-range-label" }, "偏左", -1)),
8213
- j(g("input", {
8212
+ d[19] || (d[19] = g("span", { class: "dp-range-label" }, "偏左", -1)),
8213
+ k(g("input", {
8214
8214
  type: "range",
8215
8215
  class: "dp-range",
8216
8216
  min: "-5",
8217
8217
  max: "5",
8218
8218
  step: "0.01",
8219
- "onUpdate:modelValue": f[3] || (f[3] = (v) => o.value = v)
8219
+ "onUpdate:modelValue": d[3] || (d[3] = (x) => o.value = x)
8220
8220
  }, null, 512), [
8221
8221
  [
8222
8222
  B,
@@ -8225,11 +8225,11 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8225
8225
  { number: !0 }
8226
8226
  ]
8227
8227
  ]),
8228
- f[20] || (f[20] = g("span", { class: "dp-range-label" }, "偏右", -1)),
8229
- j(g("input", {
8228
+ d[20] || (d[20] = g("span", { class: "dp-range-label" }, "偏右", -1)),
8229
+ k(g("input", {
8230
8230
  type: "number",
8231
8231
  class: "dp-input dp-input-number",
8232
- "onUpdate:modelValue": f[4] || (f[4] = (v) => o.value = v),
8232
+ "onUpdate:modelValue": d[4] || (d[4] = (x) => o.value = x),
8233
8233
  step: "0.01"
8234
8234
  }, null, 512), [
8235
8235
  [
@@ -8242,16 +8242,16 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8242
8242
  ])
8243
8243
  ]),
8244
8244
  g("div", bu, [
8245
- f[24] || (f[24] = g("span", { class: "dp-label-sm" }, "面板上下位置", -1)),
8245
+ d[24] || (d[24] = g("span", { class: "dp-label-sm" }, "面板上下位置", -1)),
8246
8246
  g("div", xu, [
8247
- f[22] || (f[22] = g("span", { class: "dp-range-label" }, "偏下", -1)),
8248
- j(g("input", {
8247
+ d[22] || (d[22] = g("span", { class: "dp-range-label" }, "偏下", -1)),
8248
+ k(g("input", {
8249
8249
  type: "range",
8250
8250
  class: "dp-range",
8251
8251
  min: "-5",
8252
8252
  max: "5",
8253
8253
  step: "0.01",
8254
- "onUpdate:modelValue": f[5] || (f[5] = (v) => i.value = v)
8254
+ "onUpdate:modelValue": d[5] || (d[5] = (x) => i.value = x)
8255
8255
  }, null, 512), [
8256
8256
  [
8257
8257
  B,
@@ -8260,11 +8260,11 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8260
8260
  { number: !0 }
8261
8261
  ]
8262
8262
  ]),
8263
- f[23] || (f[23] = g("span", { class: "dp-range-label" }, "偏上", -1)),
8264
- j(g("input", {
8263
+ d[23] || (d[23] = g("span", { class: "dp-range-label" }, "偏上", -1)),
8264
+ k(g("input", {
8265
8265
  type: "number",
8266
8266
  class: "dp-input dp-input-number",
8267
- "onUpdate:modelValue": f[6] || (f[6] = (v) => i.value = v),
8267
+ "onUpdate:modelValue": d[6] || (d[6] = (x) => i.value = x),
8268
8268
  step: "0.01"
8269
8269
  }, null, 512), [
8270
8270
  [
@@ -8277,16 +8277,16 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8277
8277
  ])
8278
8278
  ]),
8279
8279
  g("div", Iu, [
8280
- f[27] || (f[27] = g("span", { class: "dp-label-sm" }, "面板前后位置", -1)),
8280
+ d[27] || (d[27] = g("span", { class: "dp-label-sm" }, "面板前后位置", -1)),
8281
8281
  g("div", Cu, [
8282
- f[25] || (f[25] = g("span", { class: "dp-range-label" }, "近", -1)),
8283
- j(g("input", {
8282
+ d[25] || (d[25] = g("span", { class: "dp-range-label" }, "近", -1)),
8283
+ k(g("input", {
8284
8284
  type: "range",
8285
8285
  class: "dp-range",
8286
8286
  min: "-5",
8287
8287
  max: "5",
8288
8288
  step: "0.01",
8289
- "onUpdate:modelValue": f[7] || (f[7] = (v) => a.value = v)
8289
+ "onUpdate:modelValue": d[7] || (d[7] = (x) => a.value = x)
8290
8290
  }, null, 512), [
8291
8291
  [
8292
8292
  B,
@@ -8295,11 +8295,11 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8295
8295
  { number: !0 }
8296
8296
  ]
8297
8297
  ]),
8298
- f[26] || (f[26] = g("span", { class: "dp-range-label" }, "远", -1)),
8299
- j(g("input", {
8298
+ d[26] || (d[26] = g("span", { class: "dp-range-label" }, "远", -1)),
8299
+ k(g("input", {
8300
8300
  type: "number",
8301
8301
  class: "dp-input dp-input-number",
8302
- "onUpdate:modelValue": f[8] || (f[8] = (v) => a.value = v),
8302
+ "onUpdate:modelValue": d[8] || (d[8] = (x) => a.value = x),
8303
8303
  step: "0.01"
8304
8304
  }, null, 512), [
8305
8305
  [
@@ -8312,91 +8312,91 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8312
8312
  ])
8313
8313
  ]),
8314
8314
  g("div", wu, [
8315
- f[28] || (f[28] = g("span", { class: "dp-label-sm" }, "数据项", -1)),
8315
+ d[28] || (d[28] = g("span", { class: "dp-label-sm" }, "数据项", -1)),
8316
8316
  g("div", vu, [
8317
- (H(!0), k(Ee, null, mt(n.value, (v, M) => (H(), k("div", {
8317
+ (H(!0), j(Ee, null, mt(n.value, (x, M) => (H(), j("div", {
8318
8318
  key: M,
8319
8319
  class: "dp-item"
8320
8320
  }, [
8321
- j(g("input", {
8321
+ k(g("input", {
8322
8322
  type: "text",
8323
8323
  class: "dp-input dp-input-sm",
8324
- "onUpdate:modelValue": (D) => v.label = D,
8324
+ "onUpdate:modelValue": (D) => x.label = D,
8325
8325
  placeholder: "标签"
8326
8326
  }, null, 8, Mu), [
8327
- [B, v.label]
8327
+ [B, x.label]
8328
8328
  ]),
8329
- j(g("input", {
8329
+ k(g("input", {
8330
8330
  type: "text",
8331
8331
  class: "dp-input dp-input-sm",
8332
- "onUpdate:modelValue": (D) => v.value = D,
8332
+ "onUpdate:modelValue": (D) => x.value = D,
8333
8333
  placeholder: "值"
8334
8334
  }, null, 8, Tu), [
8335
- [B, v.value]
8335
+ [B, x.value]
8336
8336
  ]),
8337
- j(g("input", {
8337
+ k(g("input", {
8338
8338
  type: "text",
8339
8339
  class: "dp-input dp-input-xs",
8340
- "onUpdate:modelValue": (D) => v.unit = D,
8340
+ "onUpdate:modelValue": (D) => x.unit = D,
8341
8341
  placeholder: "单位"
8342
8342
  }, null, 8, Eu), [
8343
- [B, v.unit]
8343
+ [B, x.unit]
8344
8344
  ]),
8345
- j(g("input", {
8345
+ k(g("input", {
8346
8346
  type: "text",
8347
8347
  class: "dp-input dp-input-xs",
8348
- "onUpdate:modelValue": (D) => v.code = D,
8348
+ "onUpdate:modelValue": (D) => x.code = D,
8349
8349
  placeholder: "编码"
8350
8350
  }, null, 8, Du), [
8351
- [B, v.code]
8351
+ [B, x.code]
8352
8352
  ]),
8353
8353
  g("button", {
8354
8354
  class: "dp-btn dp-btn-del",
8355
- onClick: (D) => w(M),
8355
+ onClick: (D) => C(M),
8356
8356
  title: "删除此项"
8357
8357
  }, "✕", 8, Ou)
8358
8358
  ]))), 128))
8359
8359
  ]),
8360
8360
  g("div", Ru, [
8361
- j(g("input", {
8361
+ k(g("input", {
8362
8362
  type: "text",
8363
8363
  class: "dp-input dp-input-sm",
8364
- "onUpdate:modelValue": f[9] || (f[9] = (v) => c.value = v),
8364
+ "onUpdate:modelValue": d[9] || (d[9] = (x) => c.value = x),
8365
8365
  placeholder: "标签",
8366
- onKeyup: dt(I, ["enter"])
8366
+ onKeyup: dt(v, ["enter"])
8367
8367
  }, null, 544), [
8368
8368
  [B, c.value]
8369
8369
  ]),
8370
- j(g("input", {
8370
+ k(g("input", {
8371
8371
  type: "text",
8372
8372
  class: "dp-input dp-input-sm",
8373
- "onUpdate:modelValue": f[10] || (f[10] = (v) => d.value = v),
8373
+ "onUpdate:modelValue": d[10] || (d[10] = (x) => f.value = x),
8374
8374
  placeholder: "值",
8375
- onKeyup: dt(I, ["enter"])
8375
+ onKeyup: dt(v, ["enter"])
8376
8376
  }, null, 544), [
8377
- [B, d.value]
8377
+ [B, f.value]
8378
8378
  ]),
8379
- j(g("input", {
8379
+ k(g("input", {
8380
8380
  type: "text",
8381
8381
  class: "dp-input dp-input-xs",
8382
- "onUpdate:modelValue": f[11] || (f[11] = (v) => u.value = v),
8382
+ "onUpdate:modelValue": d[11] || (d[11] = (x) => u.value = x),
8383
8383
  placeholder: "单位",
8384
- onKeyup: dt(I, ["enter"])
8384
+ onKeyup: dt(v, ["enter"])
8385
8385
  }, null, 544), [
8386
8386
  [B, u.value]
8387
8387
  ]),
8388
- j(g("input", {
8388
+ k(g("input", {
8389
8389
  type: "text",
8390
8390
  class: "dp-input dp-input-xs",
8391
- "onUpdate:modelValue": f[12] || (f[12] = (v) => A.value = v),
8391
+ "onUpdate:modelValue": d[12] || (d[12] = (x) => A.value = x),
8392
8392
  placeholder: "编码",
8393
- onKeyup: dt(I, ["enter"])
8393
+ onKeyup: dt(v, ["enter"])
8394
8394
  }, null, 544), [
8395
8395
  [B, A.value]
8396
8396
  ]),
8397
8397
  g("button", {
8398
8398
  class: "dp-btn dp-btn-add",
8399
- onClick: I,
8399
+ onClick: v,
8400
8400
  title: "添加"
8401
8401
  }, "+")
8402
8402
  ])
@@ -8404,7 +8404,7 @@ const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8404
8404
  ])
8405
8405
  ]));
8406
8406
  }
8407
- }), Su = /* @__PURE__ */ Qe(Pu, [["__scopeId", "data-v-b4c7c7dc"]]);
8407
+ }), Su = /* @__PURE__ */ Je(Pu, [["__scopeId", "data-v-b4c7c7dc"]]);
8408
8408
  function Lu(r) {
8409
8409
  const e = W(/* @__PURE__ */ new Set()), t = (s) => {
8410
8410
  const i = new Set(e.value);
@@ -8431,22 +8431,22 @@ const Nu = {
8431
8431
  }, Hu = { class: "property-group tree-group" }, ku = { class: "tree-container" }, ju = {
8432
8432
  key: 0,
8433
8433
  class: "tree-empty"
8434
- }, Fu = { class: "property-group" }, Uu = { class: "transform-mode-row" }, zu = { class: "script-editor" }, Wu = { class: "script-item-header" }, Gu = ["onUpdate:modelValue"], Bu = ["onClick"], Xu = ["onUpdate:modelValue"], qu = {
8434
+ }, Fu = { class: "property-group" }, Uu = { class: "transform-mode-row" }, zu = { class: "script-editor" }, Wu = { class: "script-collapse-arrow" }, Gu = { class: "script-editor-body" }, Bu = { class: "script-item-header" }, Xu = ["onUpdate:modelValue"], qu = ["onClick"], Vu = ["onUpdate:modelValue"], Yu = {
8435
8435
  key: 0,
8436
8436
  class: "script-empty"
8437
- }, Vu = {
8437
+ }, Ku = {
8438
8438
  key: 0,
8439
8439
  class: "object-name-row"
8440
- }, Yu = {
8440
+ }, Zu = {
8441
8441
  key: 1,
8442
8442
  class: "tabs"
8443
- }, Ku = {
8443
+ }, Qu = {
8444
8444
  key: 2,
8445
8445
  class: "tab-content"
8446
- }, Zu = {
8446
+ }, Ju = {
8447
8447
  key: 1,
8448
8448
  class: "property-panel empty"
8449
- }, Qu = /* @__PURE__ */ Ze({
8449
+ }, _u = /* @__PURE__ */ Qe({
8450
8450
  __name: "index",
8451
8451
  props: {
8452
8452
  transform: {},
@@ -8456,16 +8456,16 @@ const Nu = {
8456
8456
  emits: ["propertyChange", "treeSelect", "treeDelete", "transformModeChange"],
8457
8457
  setup(r, { emit: e }) {
8458
8458
  const t = r, n = e, s = W("translate");
8459
- function i(I) {
8460
- s.value = I, n("transformModeChange", I);
8459
+ function i(d) {
8460
+ s.value = d, n("transformModeChange", d);
8461
8461
  }
8462
- const o = () => n("propertyChange"), a = W("transform"), l = tt(() => {
8463
- var I;
8464
- return !!(t.selectedObject && ((I = t.selectedObject.userData) != null && I._hasDataPanel));
8465
- }), c = W(0), d = no(t, "selectedObject"), { expandedSet: u, toggleExpand: A } = Lu(d);
8462
+ const o = () => n("propertyChange"), a = W("transform"), l = st(() => {
8463
+ var d;
8464
+ return !!(t.selectedObject && ((d = t.selectedObject.userData) != null && d._hasDataPanel));
8465
+ }), c = W(0), f = no(t, "selectedObject"), { expandedSet: u, toggleExpand: A } = Lu(f);
8466
8466
  io("treeExpand", { expandedSet: u, toggleExpand: A });
8467
- const m = (I) => {
8468
- c.value++, n("treeDelete", I);
8467
+ const m = (d) => {
8468
+ c.value++, n("treeDelete", d);
8469
8469
  }, b = () => {
8470
8470
  qa({
8471
8471
  name: "",
@@ -8475,32 +8475,34 @@ if (selectedObject) {
8475
8475
  moveTo(selectedObject, { x: 0, y: 2, z: 0 }, 1000);
8476
8476
  }`
8477
8477
  });
8478
- }, h = (I) => Va(I), p = W("");
8478
+ }, h = (d) => Va(d), p = W(!1), C = () => {
8479
+ p.value = !p.value;
8480
+ }, v = W("");
8479
8481
  Me(
8480
8482
  () => t.selectedObject,
8481
- (I) => {
8482
- p.value = (I == null ? void 0 : I.name) ?? "";
8483
+ (d) => {
8484
+ v.value = (d == null ? void 0 : d.name) ?? "";
8483
8485
  },
8484
8486
  { immediate: !0 }
8485
8487
  );
8486
8488
  const w = () => {
8487
8489
  if (!t.selectedObject) return;
8488
- const I = p.value.trim();
8489
- t.selectedObject.name = I || "未命名", p.value = t.selectedObject.name, c.value++;
8490
+ const d = v.value.trim();
8491
+ t.selectedObject.name = d || "未命名", v.value = t.selectedObject.name, c.value++;
8490
8492
  };
8491
- return (I, x) => I.transform ? (H(), k("div", Nu, [
8493
+ return (d, x) => d.transform ? (H(), j("div", Nu, [
8492
8494
  g("div", Hu, [
8493
8495
  x[8] || (x[8] = g("label", null, "场景物体", -1)),
8494
8496
  g("div", ku, [
8495
- (H(!0), k(Ee, null, mt(I.treeData, (f) => (H(), Mt(Jl, {
8496
- key: f.uuid,
8497
- node: f,
8498
- "selected-object": I.selectedObject,
8497
+ (H(!0), j(Ee, null, mt(d.treeData, (M) => (H(), Mt(Jl, {
8498
+ key: M.uuid,
8499
+ node: M,
8500
+ "selected-object": d.selectedObject,
8499
8501
  version: c.value,
8500
- onSelect: x[0] || (x[0] = (v) => n("treeSelect", v)),
8502
+ onSelect: x[0] || (x[0] = (D) => n("treeSelect", D)),
8501
8503
  onDelete: m
8502
8504
  }, null, 8, ["node", "selected-object", "version"]))), 128)),
8503
- I.treeData.length === 0 ? (H(), k("div", ju, "暂无物体")) : re("", !0)
8505
+ d.treeData.length === 0 ? (H(), j("div", ju, "暂无物体")) : re("", !0)
8504
8506
  ])
8505
8507
  ]),
8506
8508
  g("div", Fu, [
@@ -8509,53 +8511,58 @@ if (selectedObject) {
8509
8511
  g("button", {
8510
8512
  class: Pe(["mode-btn", { active: s.value === "translate" }]),
8511
8513
  title: "移动 (W)",
8512
- onClick: x[1] || (x[1] = (f) => i("translate"))
8514
+ onClick: x[1] || (x[1] = (M) => i("translate"))
8513
8515
  }, " ↕ 移动 ", 2),
8514
8516
  g("button", {
8515
8517
  class: Pe(["mode-btn", { active: s.value === "rotate" }]),
8516
8518
  title: "旋转 (E)",
8517
- onClick: x[2] || (x[2] = (f) => i("rotate"))
8519
+ onClick: x[2] || (x[2] = (M) => i("rotate"))
8518
8520
  }, " ↻ 旋转 ", 2),
8519
8521
  g("button", {
8520
8522
  class: Pe(["mode-btn", { active: s.value === "scale" }]),
8521
8523
  title: "缩放 (R)",
8522
- onClick: x[3] || (x[3] = (f) => i("scale"))
8524
+ onClick: x[3] || (x[3] = (M) => i("scale"))
8523
8525
  }, " ⤡ 缩放 ", 2)
8524
8526
  ]),
8525
8527
  g("div", zu, [
8526
- g("div", { class: "script-editor-header" }, [
8528
+ g("div", {
8529
+ class: "script-editor-header",
8530
+ onClick: C
8531
+ }, [
8532
+ g("span", Wu, ue(p.value ? "▶" : "▼"), 1),
8527
8533
  x[9] || (x[9] = g("span", { class: "script-title" }, "脚本(按钮显示在画布底部)", -1)),
8528
8534
  g("button", {
8529
8535
  class: "add-script-btn",
8530
- onClick: b,
8536
+ onClick: St(b, ["stop"]),
8531
8537
  title: "新增一个脚本"
8532
8538
  }, " + 添加脚本 ")
8533
8539
  ]),
8534
- (H(!0), k(Ee, null, mt(rs(Se).scripts, (f) => (H(), k("div", {
8535
- key: f.id,
8536
- class: "script-item"
8537
- }, [
8538
- g("div", Wu, [
8539
- j(g("input", {
8540
- "onUpdate:modelValue": (v) => f.name = v,
8541
- class: "script-name-input",
8542
- placeholder: "函数名称(按钮显示文字)",
8543
- spellcheck: "false"
8544
- }, null, 8, Gu), [
8545
- [B, f.name]
8540
+ k(g("div", Gu, [
8541
+ (H(!0), j(Ee, null, mt(rs(Se).scripts, (M) => (H(), j("div", {
8542
+ key: M.id,
8543
+ class: "script-item"
8544
+ }, [
8545
+ g("div", Bu, [
8546
+ k(g("input", {
8547
+ "onUpdate:modelValue": (D) => M.name = D,
8548
+ class: "script-name-input",
8549
+ placeholder: "函数名称(按钮显示文字)",
8550
+ spellcheck: "false"
8551
+ }, null, 8, Xu), [
8552
+ [B, M.name]
8553
+ ]),
8554
+ g("button", {
8555
+ class: "script-del-btn",
8556
+ title: "删除该脚本",
8557
+ onClick: (D) => h(M.id)
8558
+ }, "✕", 8, qu)
8546
8559
  ]),
8547
- g("button", {
8548
- class: "script-del-btn",
8549
- title: "删除该脚本",
8550
- onClick: (v) => h(f.id)
8551
- }, "", 8, Bu)
8552
- ]),
8553
- j(g("textarea", {
8554
- "onUpdate:modelValue": (v) => f.code = v,
8555
- class: "script-code-input",
8556
- rows: "6",
8557
- spellcheck: "false",
8558
- placeholder: `填写 JS 函数体或完整函数定义,例如:
8560
+ k(g("textarea", {
8561
+ "onUpdate:modelValue": (D) => M.code = D,
8562
+ class: "script-code-input",
8563
+ rows: "6",
8564
+ spellcheck: "false",
8565
+ placeholder: `填写 JS 函数体或完整函数定义,例如:
8559
8566
  rotateTo(selectedObject, { y: degToRad(90) }, 1500); // 旋转动画(弧度)
8560
8567
  moveTo(selectedObject, { x: 0, y: 2, z: 0 }, 1000); // 移动动画
8561
8568
  scaleTo(selectedObject, { x: 2 }, 800); // 缩放动画
@@ -8578,60 +8585,63 @@ function myFunc() {
8578
8585
  脚本内可直接使用:THREE、scene、camera、renderer、selectedObject
8579
8586
  动画 API:animateTo / moveTo / rotateTo / scaleTo / fadeTo / stopAnimations / degToRad
8580
8587
  其他:addModel/removeModel/selectObject 等编辑器 API`
8581
- }, null, 8, Xu), [
8582
- [B, f.code]
8583
- ])
8584
- ]))), 128)),
8585
- rs(Se).scripts.length === 0 ? (H(), k("div", qu, " 暂无脚本,点击“+ 添加脚本”创建(画布底部会为每个脚本生成一个触发按钮) ")) : re("", !0)
8588
+ }, null, 8, Vu), [
8589
+ [B, M.code]
8590
+ ])
8591
+ ]))), 128)),
8592
+ rs(Se).scripts.length === 0 ? (H(), j("div", Yu, " 暂无脚本,点击“+ 添加脚本”创建(画布底部会为每个脚本生成一个触发按钮) ")) : re("", !0)
8593
+ ], 512), [
8594
+ [Ye, !p.value]
8595
+ ])
8586
8596
  ])
8587
8597
  ]),
8588
- I.selectedObject ? (H(), k("div", Vu, [
8598
+ d.selectedObject ? (H(), j("div", Ku, [
8589
8599
  x[11] || (x[11] = g("label", null, "物体名称", -1)),
8590
- j(g("input", {
8591
- "onUpdate:modelValue": x[4] || (x[4] = (f) => p.value = f),
8600
+ k(g("input", {
8601
+ "onUpdate:modelValue": x[4] || (x[4] = (M) => v.value = M),
8592
8602
  class: "object-name-input",
8593
8603
  placeholder: "输入名称,脚本中可用 scene.getObjectByName() 查找",
8594
8604
  spellcheck: "false",
8595
8605
  onChange: w
8596
8606
  }, null, 544), [
8597
- [B, p.value]
8607
+ [B, v.value]
8598
8608
  ])
8599
8609
  ])) : re("", !0),
8600
- I.selectedObject ? (H(), k("div", Yu, [
8610
+ d.selectedObject ? (H(), j("div", Zu, [
8601
8611
  g("button", {
8602
8612
  class: Pe(["tab-btn", { active: a.value === "transform" }]),
8603
- onClick: x[5] || (x[5] = (f) => a.value = "transform")
8613
+ onClick: x[5] || (x[5] = (M) => a.value = "transform")
8604
8614
  }, " 🔄 变换 ", 2),
8605
8615
  g("button", {
8606
8616
  class: Pe(["tab-btn", { active: a.value === "userdata" }]),
8607
- onClick: x[6] || (x[6] = (f) => a.value = "userdata")
8617
+ onClick: x[6] || (x[6] = (M) => a.value = "userdata")
8608
8618
  }, " 📋 自定义数据 ", 2),
8609
- l.value ? (H(), k("button", {
8619
+ l.value ? (H(), j("button", {
8610
8620
  key: 0,
8611
8621
  class: Pe(["tab-btn", { active: a.value === "datapanel" }]),
8612
- onClick: x[7] || (x[7] = (f) => a.value = "datapanel")
8622
+ onClick: x[7] || (x[7] = (M) => a.value = "datapanel")
8613
8623
  }, " 📊 数据面板 ", 2)) : re("", !0)
8614
8624
  ])) : re("", !0),
8615
- I.selectedObject ? (H(), k("div", Ku, [
8616
- j(bs(Xc, {
8617
- transform: I.transform,
8618
- "selected-object": I.selectedObject,
8625
+ d.selectedObject ? (H(), j("div", Qu, [
8626
+ k(bs(Xc, {
8627
+ transform: d.transform,
8628
+ "selected-object": d.selectedObject,
8619
8629
  onPropertyChange: o
8620
8630
  }, null, 8, ["transform", "selected-object"]), [
8621
- [st, a.value === "transform"]
8631
+ [Ye, a.value === "transform"]
8622
8632
  ]),
8623
- j(bs(ru, { "selected-object": I.selectedObject }, null, 8, ["selected-object"]), [
8624
- [st, a.value === "userdata"]
8633
+ k(bs(ru, { "selected-object": d.selectedObject }, null, 8, ["selected-object"]), [
8634
+ [Ye, a.value === "userdata"]
8625
8635
  ]),
8626
- j(bs(Su, { "selected-object": I.selectedObject }, null, 8, ["selected-object"]), [
8627
- [st, a.value === "datapanel"]
8636
+ k(bs(Su, { "selected-object": d.selectedObject }, null, 8, ["selected-object"]), [
8637
+ [Ye, a.value === "datapanel"]
8628
8638
  ])
8629
8639
  ])) : re("", !0)
8630
- ])) : (H(), k("div", Zu, x[12] || (x[12] = [
8640
+ ])) : (H(), j("div", Ju, x[12] || (x[12] = [
8631
8641
  g("p", null, "未选中任何模型", -1)
8632
8642
  ])));
8633
8643
  }
8634
- }), Ju = /* @__PURE__ */ Qe(Qu, [["__scopeId", "data-v-30dd0f48"]]), _u = { class: "top-bar" }, $u = { class: "left-section" }, ed = { class: "dropdown-menu" }, td = { class: "dropdown-menu sub-menu" }, sd = { class: "dropdown-menu sub-menu" }, nd = { class: "dropdown-menu" }, id = /* @__PURE__ */ Ze({
8644
+ }), $u = /* @__PURE__ */ Je(_u, [["__scopeId", "data-v-7acd33b7"]]), ed = { class: "top-bar" }, td = { class: "left-section" }, sd = { class: "dropdown-menu" }, nd = { class: "dropdown-menu sub-menu" }, id = { class: "dropdown-menu sub-menu" }, od = { class: "dropdown-menu" }, rd = /* @__PURE__ */ Qe({
8635
8645
  __name: "TopBar",
8636
8646
  emits: ["addModel", "importModel"],
8637
8647
  setup(r, { emit: e }) {
@@ -8641,74 +8651,74 @@ function myFunc() {
8641
8651
  }, c = (h) => {
8642
8652
  const p = h.target;
8643
8653
  p.files && p.files.length > 0 && (o("importModel", p.files[0]), p.value = "");
8644
- }, d = () => console.log("撤销"), u = () => console.log("删除物体"), A = async () => {
8654
+ }, f = () => console.log("撤销"), u = () => console.log("删除物体"), A = async () => {
8645
8655
  const h = await Sl();
8646
8656
  console.log("scene GLB 字节数:", h.scene.byteLength), console.log("camera:", h.camera), console.log("dataPanels:", h.dataPanels), console.log("waters:", h.waters), console.log("textures:", h.textures), console.log("ambientLight:", h.ambientLight);
8647
8657
  }, m = () => {
8648
8658
  if (!localStorage.getItem("test_id")) return localStorage.setItem("test_id", "123");
8649
8659
  Ci(localStorage.getItem("test_id"));
8650
8660
  }, b = () => gi();
8651
- return (h, p) => (H(), k("div", _u, [
8652
- g("div", $u, [
8661
+ return (h, p) => (H(), j("div", ed, [
8662
+ g("div", td, [
8653
8663
  g("div", {
8654
8664
  class: "dropdown-wrapper",
8655
- onMouseenter: p[11] || (p[11] = (w) => n.value = !0),
8656
- onMouseleave: p[12] || (p[12] = (w) => n.value = !1)
8665
+ onMouseenter: p[11] || (p[11] = (C) => n.value = !0),
8666
+ onMouseleave: p[12] || (p[12] = (C) => n.value = !1)
8657
8667
  }, [
8658
8668
  p[17] || (p[17] = g("button", { class: "menu-btn" }, "添加", -1)),
8659
- j(g("div", ed, [
8669
+ k(g("div", sd, [
8660
8670
  g("div", {
8661
8671
  class: "menu-item",
8662
- onClick: d
8672
+ onClick: f
8663
8673
  }, "组"),
8664
8674
  g("div", {
8665
8675
  class: "menu-item dropdown-wrapper sub-trigger",
8666
- onMouseenter: p[5] || (p[5] = (w) => s.value = !0),
8667
- onMouseleave: p[6] || (p[6] = (w) => s.value = !1)
8676
+ onMouseenter: p[5] || (p[5] = (C) => s.value = !0),
8677
+ onMouseleave: p[6] || (p[6] = (C) => s.value = !1)
8668
8678
  }, [
8669
8679
  p[15] || (p[15] = g("span", null, "网格", -1)),
8670
- j(g("div", td, [
8680
+ k(g("div", nd, [
8671
8681
  g("div", {
8672
8682
  class: "menu-item",
8673
- onClick: p[0] || (p[0] = (w) => o("addModel", "box"))
8683
+ onClick: p[0] || (p[0] = (C) => o("addModel", "box"))
8674
8684
  }, " 正方体 "),
8675
8685
  g("div", {
8676
8686
  class: "menu-item",
8677
- onClick: p[1] || (p[1] = (w) => o("addModel", "sphere"))
8687
+ onClick: p[1] || (p[1] = (C) => o("addModel", "sphere"))
8678
8688
  }, " 球体 "),
8679
8689
  g("div", {
8680
8690
  class: "menu-item",
8681
- onClick: p[2] || (p[2] = (w) => o("addModel", "water"))
8691
+ onClick: p[2] || (p[2] = (C) => o("addModel", "water"))
8682
8692
  }, " 水体(Water.js) "),
8683
8693
  g("div", {
8684
8694
  class: "menu-item",
8685
- onClick: p[3] || (p[3] = (w) => o("addModel", "waterCylinder"))
8695
+ onClick: p[3] || (p[3] = (C) => o("addModel", "waterCylinder"))
8686
8696
  }, " 水体(圆柱) "),
8687
8697
  g("div", {
8688
8698
  class: "menu-item",
8689
- onClick: p[4] || (p[4] = (w) => o("addModel", "waterPlane"))
8699
+ onClick: p[4] || (p[4] = (C) => o("addModel", "waterPlane"))
8690
8700
  }, " 水面(标准材质) "),
8691
8701
  g("div", {
8692
8702
  class: "menu-item",
8693
8703
  onClick: l
8694
8704
  }, "导入")
8695
8705
  ], 512), [
8696
- [st, s.value]
8706
+ [Ye, s.value]
8697
8707
  ])
8698
8708
  ], 32),
8699
8709
  g("div", {
8700
8710
  class: "menu-item dropdown-wrapper sub-trigger",
8701
- onMouseenter: p[8] || (p[8] = (w) => i.value = !0),
8702
- onMouseleave: p[9] || (p[9] = (w) => i.value = !1)
8711
+ onMouseenter: p[8] || (p[8] = (C) => i.value = !0),
8712
+ onMouseleave: p[9] || (p[9] = (C) => i.value = !1)
8703
8713
  }, [
8704
8714
  p[16] || (p[16] = g("span", null, "光源", -1)),
8705
- j(g("div", sd, [
8715
+ k(g("div", id, [
8706
8716
  g("div", {
8707
8717
  class: "menu-item",
8708
- onClick: p[7] || (p[7] = (w) => o("addModel", "directionalLight"))
8718
+ onClick: p[7] || (p[7] = (C) => o("addModel", "directionalLight"))
8709
8719
  }, " 平行光 ")
8710
8720
  ], 512), [
8711
- [st, i.value]
8721
+ [Ye, i.value]
8712
8722
  ])
8713
8723
  ], 32),
8714
8724
  g("div", {
@@ -8717,19 +8727,19 @@ function myFunc() {
8717
8727
  }, "摄像机"),
8718
8728
  g("div", {
8719
8729
  class: "menu-item",
8720
- onClick: p[10] || (p[10] = (w) => o("addModel", "dataPanel"))
8730
+ onClick: p[10] || (p[10] = (C) => o("addModel", "dataPanel"))
8721
8731
  }, " 数据面板 ")
8722
8732
  ], 512), [
8723
- [st, n.value]
8733
+ [Ye, n.value]
8724
8734
  ])
8725
8735
  ], 32),
8726
8736
  g("div", {
8727
8737
  class: "dropdown-wrapper",
8728
- onMouseenter: p[13] || (p[13] = (w) => t.value = !0),
8729
- onMouseleave: p[14] || (p[14] = (w) => t.value = !1)
8738
+ onMouseenter: p[13] || (p[13] = (C) => t.value = !0),
8739
+ onMouseleave: p[14] || (p[14] = (C) => t.value = !1)
8730
8740
  }, [
8731
8741
  p[19] || (p[19] = g("button", { class: "menu-btn" }, "帮助", -1)),
8732
- j(g("div", nd, [
8742
+ k(g("div", od, [
8733
8743
  g("div", {
8734
8744
  class: "menu-item",
8735
8745
  onClick: A
@@ -8744,7 +8754,7 @@ function myFunc() {
8744
8754
  }, " 重置相机位置 "),
8745
8755
  p[18] || (p[18] = g("div", { class: "menu-divider" }, null, -1))
8746
8756
  ], 512), [
8747
- [st, t.value]
8757
+ [Ye, t.value]
8748
8758
  ])
8749
8759
  ], 32)
8750
8760
  ]),
@@ -8761,10 +8771,10 @@ function myFunc() {
8761
8771
  }, null, 544)
8762
8772
  ]));
8763
8773
  }
8764
- }), od = /* @__PURE__ */ Qe(id, [["__scopeId", "data-v-9cee44a7"]]), rd = { class: "bottom-bar" }, ad = /* @__PURE__ */ Ze({
8774
+ }), ad = /* @__PURE__ */ Je(rd, [["__scopeId", "data-v-9cee44a7"]]), ld = { class: "bottom-bar" }, cd = /* @__PURE__ */ Qe({
8765
8775
  __name: "BottomBar",
8766
8776
  setup(r) {
8767
- return (e, t) => (H(), k("div", rd, t[0] || (t[0] = [
8777
+ return (e, t) => (H(), j("div", ld, t[0] || (t[0] = [
8768
8778
  g("div", { class: "status-left" }, [
8769
8779
  g("span", null, "就绪")
8770
8780
  ], -1),
@@ -8773,10 +8783,10 @@ function myFunc() {
8773
8783
  ], -1)
8774
8784
  ])));
8775
8785
  }
8776
- }), ld = /* @__PURE__ */ Qe(ad, [["__scopeId", "data-v-3427bb27"]]), cd = { class: "app-layout" }, ud = {
8786
+ }), ud = /* @__PURE__ */ Je(cd, [["__scopeId", "data-v-3427bb27"]]), dd = { class: "app-layout" }, fd = {
8777
8787
  key: 0,
8778
8788
  class: "loading-overlay"
8779
- }, dd = ["title", "onClick"], fd = /* @__PURE__ */ Ze({
8789
+ }, hd = ["title", "onClick"], pd = /* @__PURE__ */ Qe({
8780
8790
  __name: "DrawingBoard",
8781
8791
  props: {
8782
8792
  mode: { default: "edit" },
@@ -8787,7 +8797,7 @@ function myFunc() {
8787
8797
  cl((M) => {
8788
8798
  t.value = M;
8789
8799
  });
8790
- const n = en(null), s = is({
8800
+ const n = en(null), s = os({
8791
8801
  position: { x: 0, y: 0, z: 0 },
8792
8802
  rotation: { x: 0, y: 0, z: 0 },
8793
8803
  scale: { x: 1, y: 1, z: 1 }
@@ -8820,37 +8830,37 @@ function myFunc() {
8820
8830
  } catch (D) {
8821
8831
  console.error("导入失败:", D), alert("导入失败:" + D.message);
8822
8832
  }
8823
- }, d = en([]);
8833
+ }, f = en([]);
8824
8834
  xl((M) => {
8825
- d.value = M;
8835
+ f.value = M;
8826
8836
  });
8827
8837
  const u = () => {
8828
8838
  const M = Ei();
8829
- M && (d.value = M);
8839
+ M && (f.value = M);
8830
8840
  }, A = (M) => ps(M), m = (M) => Ti(M.uuid), b = (M) => {
8831
8841
  xi(M);
8832
- }, h = (M) => Za(M), p = tt(
8842
+ }, h = (M) => Za(M), p = st(
8833
8843
  () => Se.scripts.filter((M) => !mi(M))
8834
- ), w = W(13);
8835
- function I() {
8844
+ ), C = W(13);
8845
+ function v() {
8836
8846
  const Z = window.innerWidth / 1920, _ = Math.min(Math.max(Z, 0.6), 4);
8837
8847
  return Math.round(13 * _);
8838
8848
  }
8839
- const x = () => {
8840
- w.value = I();
8841
- }, f = W(null), v = async () => {
8842
- f.value && await _a(f.value, e.mode, e.sceneData), u();
8849
+ const w = () => {
8850
+ C.value = v();
8851
+ }, d = W(null), x = async () => {
8852
+ d.value && await _a(d.value, e.mode, e.sceneData), u();
8843
8853
  };
8844
8854
  return oo(() => {
8845
- v(), f.value && Hr(f.value), w.value = I(), window.addEventListener("resize", x);
8855
+ x(), d.value && Hr(d.value), C.value = v(), window.addEventListener("resize", w);
8846
8856
  }), ro(() => {
8847
- console.log("endset_three_editor destroy"), window.removeEventListener("resize", x), Hl();
8848
- }), (M, D) => (H(), k("div", cd, [
8849
- t.value ? (H(), k("div", ud, D[0] || (D[0] = [
8857
+ console.log("endset_three_editor destroy"), window.removeEventListener("resize", w), Hl();
8858
+ }), (M, D) => (H(), j("div", dd, [
8859
+ t.value ? (H(), j("div", fd, D[0] || (D[0] = [
8850
8860
  g("div", { class: "loading-spinner" }, null, -1),
8851
8861
  g("div", { class: "loading-text" }, "加载中...", -1)
8852
8862
  ]))) : re("", !0),
8853
- M.mode === "edit" ? (H(), Mt(od, {
8863
+ M.mode === "edit" ? (H(), Mt(ad, {
8854
8864
  key: 1,
8855
8865
  onAddModel: l,
8856
8866
  onImportModel: c
@@ -8861,25 +8871,25 @@ function myFunc() {
8861
8871
  g("div", {
8862
8872
  class: Pe(`canvas canvas-mode-${M.mode}`),
8863
8873
  ref_key: "containerRef",
8864
- ref: f
8874
+ ref: d
8865
8875
  }, [
8866
- p.value.length > 0 ? (H(), k("div", {
8876
+ p.value.length > 0 ? (H(), j("div", {
8867
8877
  key: 0,
8868
8878
  class: "script-bar",
8869
- style: ao({ fontSize: w.value + "px" })
8879
+ style: ao({ fontSize: C.value + "px" })
8870
8880
  }, [
8871
- (H(!0), k(Ee, null, mt(p.value, (E, U) => (H(), k("button", {
8881
+ (H(!0), j(Ee, null, mt(p.value, (E, U) => (H(), j("button", {
8872
8882
  key: E.id,
8873
8883
  class: "script-trigger-btn",
8874
8884
  title: E.code,
8875
- onClick: os((Z) => h(E.id), ["stop"])
8876
- }, " ▶ " + he(rs(Qa)(E, U)), 9, dd))), 128))
8885
+ onClick: St((Z) => h(E.id), ["stop"])
8886
+ }, " ▶ " + ue(rs(Qa)(E, U)), 9, hd))), 128))
8877
8887
  ], 4)) : re("", !0)
8878
8888
  ], 2),
8879
- M.mode === "edit" ? (H(), Mt(Ju, {
8889
+ M.mode === "edit" ? (H(), Mt($u, {
8880
8890
  key: 0,
8881
8891
  transform: s,
8882
- "tree-data": d.value,
8892
+ "tree-data": f.value,
8883
8893
  "selected-object": n.value,
8884
8894
  onPropertyChange: a,
8885
8895
  onTreeSelect: A,
@@ -8887,16 +8897,16 @@ function myFunc() {
8887
8897
  onTransformModeChange: b
8888
8898
  }, null, 8, ["transform", "tree-data", "selected-object"])) : re("", !0)
8889
8899
  ], 2),
8890
- M.mode === "edit" ? (H(), Mt(ld, { key: 2 })) : re("", !0)
8900
+ M.mode === "edit" ? (H(), Mt(ud, { key: 2 })) : re("", !0)
8891
8901
  ]));
8892
8902
  }
8893
- }), Pd = /* @__PURE__ */ Qe(fd, [["__scopeId", "data-v-79b9d552"]]);
8903
+ }), Ld = /* @__PURE__ */ Je(pd, [["__scopeId", "data-v-79b9d552"]]);
8894
8904
  export {
8895
- ld as BottomBar,
8905
+ ud as BottomBar,
8896
8906
  us as DataPanel,
8897
- Pd as DrawingBoard,
8898
- Ju as PropertyPanel,
8899
- od as TopBar,
8907
+ Ld as DrawingBoard,
8908
+ $u as PropertyPanel,
8909
+ ad as TopBar,
8900
8910
  Jl as TreeItem,
8901
8911
  Ni as addBox,
8902
8912
  Gi as addDataPanel,
@@ -8912,9 +8922,9 @@ export {
8912
8922
  Fr as disposeCSS2DRenderer,
8913
8923
  Sl as exportSceneToJSON,
8914
8924
  wi as focusOnObject,
8915
- gd as getCSS2DRenderer,
8925
+ bd as getCSS2DRenderer,
8916
8926
  Gs as getCamera,
8917
- Ft as getDataPanel,
8927
+ Ut as getDataPanel,
8918
8928
  jn as getRenderer,
8919
8929
  kn as getScene,
8920
8930
  Ei as getSceneObjects,