endset_three_editor 0.6.0 → 0.6.1

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 Cn = Object.defineProperty;
2
2
  var In = (r, e, t) => e in r ? Cn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
3
  var Ue = (r, e, t) => In(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { toRaw as Ft, defineComponent as ve, ref as W, inject as yn, computed as $e, watchEffect as xn, resolveComponent as vn, openBlock as R, createElementBlock as P, createElementVNode as C, normalizeClass as oe, withModifiers as $t, unref as Sn, toDisplayString as ne, Fragment as Pe, renderList as Ut, createBlock as Pt, createCommentVNode as J, reactive as es, watch as be, withDirectives as k, vModelText as D, withKeys as ze, vModelCheckbox as Tn, toRef as Mn, provide as wn, createVNode as St, vShow as Le, shallowRef as bs, onMounted as Rn, onBeforeUnmount as En } from "vue";
4
+ import { toRaw as jt, defineComponent as ve, ref as W, inject as yn, computed as $e, watchEffect as xn, resolveComponent as vn, openBlock as R, createElementBlock as P, createElementVNode as C, normalizeClass as oe, withModifiers as $t, unref as Sn, toDisplayString as ne, Fragment as Pe, renderList as Ft, createBlock as nt, createCommentVNode as Z, reactive as es, watch as be, withDirectives as k, vModelText as D, withKeys as ze, vModelCheckbox as Tn, toRef as Mn, provide as wn, createVNode as Gt, vShow as Le, shallowRef as bs, onMounted as Rn, onBeforeUnmount as En } from "vue";
5
5
  import * as w from "three";
6
- import { Controls as Js, Vector3 as T, MOUSE as Ke, TOUCH as Ge, Quaternion as V, Spherical as Cs, Vector2 as F, Ray as kn, Plane as Pn, MathUtils as Qs, Raycaster as Ln, Object3D as Ze, MeshBasicMaterial as Ne, LineBasicMaterial as nt, CylinderGeometry as X, BoxGeometry as K, BufferGeometry as De, Float32BufferAttribute as le, Mesh as S, OctahedronGeometry as mt, Line as de, TorusGeometry as Ve, SphereGeometry as Nn, Euler as On, Matrix4 as fe, PlaneGeometry as Dn, DoubleSide as Lt, OrthographicCamera as Ys, ShaderMaterial as ke, UniformsUtils as cs, WebGLRenderTarget as ge, HalfFloatType as Re, NoBlending as ts, Timer as Wn, Color as B, RawShaderMaterial as jn, ColorManagement as Nt, SRGBTransfer as Fn, LinearToneMapping as Un, ReinhardToneMapping as Hn, CineonToneMapping as zn, ACESFilmicToneMapping as Gn, AgXToneMapping as Kn, NeutralToneMapping as Bn, CustomToneMapping as Zn, MeshDepthMaterial as Xn, RGBADepthPacking as qn, AdditiveBlending as Vn, Loader as us, FileLoader as At, SRGBColorSpace as he, Group as Tt, Material as it, PointsMaterial as et, MeshPhongMaterial as Jn, LineSegments as ss, Points as Mt, TrianglesDrawMode as Qn, TriangleFanDrawMode as ns, TriangleStripDrawMode as _s, LoaderUtils as ot, MeshPhysicalMaterial as ce, LinearSRGBColorSpace as Ae, SpotLight as Yn, PointLight as _n, DirectionalLight as $n, InstancedMesh as ei, InstancedBufferAttribute as ti, TextureLoader as si, ImageBitmapLoader as ni, BufferAttribute as rt, InterleavedBuffer as $s, InterleavedBufferAttribute as en, LinearMipmapLinearFilter as tn, NearestMipmapLinearFilter as ii, LinearMipmapNearestFilter as oi, NearestMipmapNearestFilter as ri, LinearFilter as is, NearestFilter as sn, RepeatWrapping as os, MirroredRepeatWrapping as ai, ClampToEdgeWrapping as li, MeshStandardMaterial as nn, PropertyBinding as Ai, SkinnedMesh as ci, LineLoop as ui, PerspectiveCamera as di, Skeleton as hi, AnimationClip as fi, Bone as pi, InterpolateDiscrete as mi, InterpolateLinear as on, Texture as Is, VectorKeyframeTrack as ys, NumberKeyframeTrack as xs, QuaternionKeyframeTrack as vs, FrontSide as gi, Interpolant as bi, Box3 as Ci, Sphere as Ii } from "three";
7
- import ct from "@tweenjs/tween.js";
8
- const Ss = { type: "change" }, ds = { type: "start" }, rn = { type: "end" }, gt = new kn(), Ts = new Pn(), yi = Math.cos(70 * Qs.DEG2RAD), z = new T(), q = 2 * Math.PI, N = {
6
+ import { Controls as Js, Vector3 as T, MOUSE as Ke, TOUCH as Ge, Quaternion as J, Spherical as Cs, Vector2 as F, Ray as kn, Plane as Pn, MathUtils as Qs, Raycaster as Ln, Object3D as Ze, MeshBasicMaterial as Ne, LineBasicMaterial as it, CylinderGeometry as q, BoxGeometry as K, BufferGeometry as De, Float32BufferAttribute as le, Mesh as S, OctahedronGeometry as gt, Line as de, TorusGeometry as Ve, SphereGeometry as Nn, Euler as On, Matrix4 as fe, PlaneGeometry as Dn, DoubleSide as Pt, OrthographicCamera as Ys, ShaderMaterial as ke, UniformsUtils as cs, WebGLRenderTarget as ge, HalfFloatType as Re, NoBlending as ts, Timer as Wn, Color as B, RawShaderMaterial as jn, ColorManagement as Lt, SRGBTransfer as Fn, LinearToneMapping as Un, ReinhardToneMapping as Hn, CineonToneMapping as zn, ACESFilmicToneMapping as Gn, AgXToneMapping as Kn, NeutralToneMapping as Bn, CustomToneMapping as Zn, MeshDepthMaterial as Xn, RGBADepthPacking as qn, AdditiveBlending as Vn, Loader as us, FileLoader as ct, SRGBColorSpace as he, Group as Tt, Material as ot, PointsMaterial as et, MeshPhongMaterial as Jn, LineSegments as ss, Points as Mt, TrianglesDrawMode as Qn, TriangleFanDrawMode as ns, TriangleStripDrawMode as _s, LoaderUtils as rt, MeshPhysicalMaterial as ce, LinearSRGBColorSpace as Ae, SpotLight as Yn, PointLight as _n, DirectionalLight as $n, InstancedMesh as ei, InstancedBufferAttribute as ti, TextureLoader as si, ImageBitmapLoader as ni, BufferAttribute as at, InterleavedBuffer as $s, InterleavedBufferAttribute as en, LinearMipmapLinearFilter as tn, NearestMipmapLinearFilter as ii, LinearMipmapNearestFilter as oi, NearestMipmapNearestFilter as ri, LinearFilter as is, NearestFilter as sn, RepeatWrapping as os, MirroredRepeatWrapping as ai, ClampToEdgeWrapping as li, MeshStandardMaterial as nn, PropertyBinding as Ai, SkinnedMesh as ci, LineLoop as ui, PerspectiveCamera as di, Skeleton as hi, AnimationClip as fi, Bone as pi, InterpolateDiscrete as mi, InterpolateLinear as on, Texture as Is, VectorKeyframeTrack as ys, NumberKeyframeTrack as xs, QuaternionKeyframeTrack as vs, FrontSide as gi, Interpolant as bi, Box3 as Ci, Sphere as Ii } from "three";
7
+ import ut from "@tweenjs/tween.js";
8
+ const Ss = { type: "change" }, ds = { type: "start" }, rn = { type: "end" }, bt = new kn(), Ts = new Pn(), yi = Math.cos(70 * Qs.DEG2RAD), z = new T(), V = 2 * Math.PI, N = {
9
9
  NONE: -1,
10
10
  ROTATE: 0,
11
11
  DOLLY: 1,
@@ -23,7 +23,7 @@ class xi extends Js {
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 = N.NONE, this.target = new T(), this.cursor = new T(), 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: Ke.ROTATE, MIDDLE: Ke.DOLLY, RIGHT: Ke.PAN }, this.touches = { ONE: Ge.ROTATE, TWO: Ge.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 T(), this._lastQuaternion = new V(), this._lastTargetPosition = new T(), this._quat = new V().setFromUnitVectors(e.up, new T(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Cs(), this._sphericalDelta = new Cs(), this._scale = 1, this._panOffset = new T(), this._rotateStart = new F(), this._rotateEnd = new F(), this._rotateDelta = new F(), this._panStart = new F(), this._panEnd = new F(), this._panDelta = new F(), this._dollyStart = new F(), this._dollyEnd = new F(), this._dollyDelta = new F(), this._dollyDirection = new T(), this._mouse = new F(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Si.bind(this), this._onPointerDown = vi.bind(this), this._onPointerUp = Ti.bind(this), this._onContextMenu = Li.bind(this), this._onMouseWheel = Ri.bind(this), this._onKeyDown = Ei.bind(this), this._onTouchStart = ki.bind(this), this._onTouchMove = Pi.bind(this), this._onMouseDown = Mi.bind(this), this._onMouseMove = wi.bind(this), this._interceptControlDown = Ni.bind(this), this._interceptControlUp = Oi.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
26
+ super(e, t), this.state = N.NONE, this.target = new T(), this.cursor = new T(), 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: Ke.ROTATE, MIDDLE: Ke.DOLLY, RIGHT: Ke.PAN }, this.touches = { ONE: Ge.ROTATE, TWO: Ge.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 T(), this._lastQuaternion = new J(), this._lastTargetPosition = new T(), this._quat = new J().setFromUnitVectors(e.up, new T(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Cs(), this._sphericalDelta = new Cs(), this._scale = 1, this._panOffset = new T(), this._rotateStart = new F(), this._rotateEnd = new F(), this._rotateDelta = new F(), this._panStart = new F(), this._panEnd = new F(), this._panDelta = new F(), this._dollyStart = new F(), this._dollyEnd = new F(), this._dollyDelta = new F(), this._dollyDirection = new T(), this._mouse = new F(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Si.bind(this), this._onPointerDown = vi.bind(this), this._onPointerUp = Ti.bind(this), this._onContextMenu = Li.bind(this), this._onMouseWheel = Ri.bind(this), this._onKeyDown = Ei.bind(this), this._onTouchStart = ki.bind(this), this._onTouchMove = Pi.bind(this), this._onMouseDown = Mi.bind(this), this._onMouseMove = wi.bind(this), this._interceptControlDown = Ni.bind(this), this._interceptControlUp = Oi.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
27
27
  }
28
28
  /**
29
29
  * Defines the visual representation of the cursor.
@@ -143,7 +143,7 @@ class xi extends Js {
143
143
  const t = this.object.position;
144
144
  z.copy(t).sub(this.target), z.applyQuaternion(this._quat), this._spherical.setFromVector3(z), this.autoRotate && this.state === N.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
145
145
  let n = this.minAzimuthAngle, s = this.maxAzimuthAngle;
146
- isFinite(n) && isFinite(s) && (n < -Math.PI ? n += q : n > Math.PI && (n -= q), s < -Math.PI ? s += q : s > Math.PI && (s -= q), n <= s ? this._spherical.theta = Math.max(n, Math.min(s, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (n + s) / 2 ? Math.max(n, this._spherical.theta) : Math.min(s, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
146
+ isFinite(n) && isFinite(s) && (n < -Math.PI ? n += V : n > Math.PI && (n -= V), s < -Math.PI ? s += V : s > Math.PI && (s -= V), n <= s ? this._spherical.theta = Math.max(n, Math.min(s, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (n + s) / 2 ? Math.max(n, this._spherical.theta) : Math.min(s, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
147
147
  let i = !1;
148
148
  if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera)
149
149
  this._spherical.radius = this._clampDistance(this._spherical.radius);
@@ -167,7 +167,7 @@ class xi extends Js {
167
167
  A.unproject(this.object), this.object.position.sub(A).add(a), this.object.updateMatrixWorld(), o = z.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) : (gt.origin.copy(this.object.position), gt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(gt.direction)) < yi ? this.object.lookAt(this.target) : (Ts.setFromNormalAndCoplanarPoint(this.object.up, this.target), gt.intersectPlane(Ts, this.target))));
170
+ o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (bt.origin.copy(this.object.position), bt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(bt.direction)) < yi ? this.object.lookAt(this.target) : (Ts.setFromNormalAndCoplanarPoint(this.object.up, this.target), bt.intersectPlane(Ts, 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);
@@ -175,7 +175,7 @@ class xi extends Js {
175
175
  return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) > Kt || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Kt || this._lastTargetPosition.distanceToSquared(this.target) > Kt ? (this.dispatchEvent(Ss), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
176
176
  }
177
177
  _getAutoRotationAngle(e) {
178
- return e !== null ? q / 60 * this.autoRotateSpeed * e : q / 60 / 60 * this.autoRotateSpeed;
178
+ return e !== null ? V / 60 * this.autoRotateSpeed * e : V / 60 / 60 * this.autoRotateSpeed;
179
179
  }
180
180
  _getZoomScale(e) {
181
181
  const t = Math.abs(e * 0.01);
@@ -234,7 +234,7 @@ class xi extends Js {
234
234
  _handleMouseMoveRotate(e) {
235
235
  this._rotateEnd.set(e.clientX, e.clientY), this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
236
236
  const t = this.domElement;
237
- this._rotateLeft(q * this._rotateDelta.x / t.clientHeight), this._rotateUp(q * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
237
+ this._rotateLeft(V * this._rotateDelta.x / t.clientHeight), this._rotateUp(V * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
238
238
  }
239
239
  _handleMouseMoveDolly(e) {
240
240
  this._dollyEnd.set(e.clientX, e.clientY), this._dollyDelta.subVectors(this._dollyEnd, this._dollyStart), this._dollyDelta.y > 0 ? this._dollyOut(this._getZoomScale(this._dollyDelta.y)) : this._dollyDelta.y < 0 && this._dollyIn(this._getZoomScale(this._dollyDelta.y)), this._dollyStart.copy(this._dollyEnd), this.update();
@@ -249,16 +249,16 @@ class xi extends Js {
249
249
  let t = !1;
250
250
  switch (e.code) {
251
251
  case this.keys.UP:
252
- e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(q * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, this.keyPanSpeed), t = !0;
252
+ e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(V * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, this.keyPanSpeed), t = !0;
253
253
  break;
254
254
  case this.keys.BOTTOM:
255
- e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(-q * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, -this.keyPanSpeed), t = !0;
255
+ e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(-V * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, -this.keyPanSpeed), t = !0;
256
256
  break;
257
257
  case this.keys.LEFT:
258
- e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(q * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(this.keyPanSpeed, 0), t = !0;
258
+ e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(V * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(this.keyPanSpeed, 0), t = !0;
259
259
  break;
260
260
  case this.keys.RIGHT:
261
- e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(-q * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(-this.keyPanSpeed, 0), t = !0;
261
+ e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(-V * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(-this.keyPanSpeed, 0), t = !0;
262
262
  break;
263
263
  }
264
264
  t && (e.preventDefault(), this.update());
@@ -298,7 +298,7 @@ class xi extends Js {
298
298
  }
299
299
  this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
300
300
  const t = this.domElement;
301
- this._rotateLeft(q * this._rotateDelta.x / t.clientHeight), this._rotateUp(q * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd);
301
+ this._rotateLeft(V * this._rotateDelta.x / t.clientHeight), this._rotateUp(V * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd);
302
302
  }
303
303
  _handleTouchMovePan(e) {
304
304
  if (this._pointers.length === 1)
@@ -512,7 +512,7 @@ function Ni(r) {
512
512
  function Oi(r) {
513
513
  r.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
514
514
  }
515
- const Me = new Ln(), G = new T(), pe = new T(), j = new V(), Ms = {
515
+ const Me = new Ln(), G = new T(), pe = new T(), j = new J(), Ms = {
516
516
  X: new T(1, 0, 0),
517
517
  Y: new T(0, 1, 0),
518
518
  Z: new T(0, 0, 1)
@@ -545,8 +545,8 @@ class Di extends Js {
545
545
  }), o[x] = y, i[x] = y, s[x] = y;
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 T(), A = new T(), u = new V(), c = new V(), h = new T(), d = new V(), g = new T(), f = new T(), m = new T(), p = 0, I = new T();
549
- a("worldPosition", l), a("worldPositionStart", A), a("worldQuaternion", u), a("worldQuaternionStart", c), a("cameraPosition", h), a("cameraQuaternion", d), a("pointStart", g), a("pointEnd", f), a("rotationAxis", m), a("rotationAngle", p), a("eye", I), this._offset = new T(), this._startNorm = new T(), this._endNorm = new T(), this._cameraScale = new T(), this._parentPosition = new T(), this._parentQuaternion = new V(), this._parentQuaternionInv = new V(), this._parentScale = new T(), this._worldScaleStart = new T(), this._worldQuaternionInv = new V(), this._worldScale = new T(), this._positionStart = new T(), this._quaternionStart = new V(), this._scaleStart = new T(), this._getPointer = Wi.bind(this), this._onPointerDown = Fi.bind(this), this._onPointerHover = ji.bind(this), this._onPointerMove = Ui.bind(this), this._onPointerUp = Hi.bind(this), t !== null && this.connect(t);
548
+ const l = new T(), A = new T(), d = new J(), c = new J(), u = new T(), h = new J(), m = new T(), f = new T(), g = new T(), p = 0, I = new T();
549
+ a("worldPosition", l), a("worldPositionStart", A), a("worldQuaternion", d), a("worldQuaternionStart", c), a("cameraPosition", u), a("cameraQuaternion", h), a("pointStart", m), a("pointEnd", f), a("rotationAxis", g), a("rotationAngle", p), a("eye", I), this._offset = new T(), this._startNorm = new T(), this._endNorm = new T(), this._cameraScale = new T(), this._parentPosition = new T(), this._parentQuaternion = new J(), this._parentQuaternionInv = new J(), this._parentScale = new T(), this._worldScaleStart = new T(), this._worldQuaternionInv = new J(), this._worldScale = new T(), this._positionStart = new T(), this._quaternionStart = new J(), this._scaleStart = new T(), this._getPointer = Wi.bind(this), this._onPointerDown = Fi.bind(this), this._onPointerHover = ji.bind(this), this._onPointerMove = Ui.bind(this), this._onPointerUp = Hi.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";
@@ -749,7 +749,7 @@ function Zt(r, e, t) {
749
749
  return n[s];
750
750
  return !1;
751
751
  }
752
- const bt = new On(), O = new T(0, 1, 0), ks = new T(0, 0, 0), Ps = new fe(), Ct = new V(), wt = new V(), re = new T(), Ls = new fe(), tt = new T(1, 0, 0), Ee = new T(0, 1, 0), st = new T(0, 0, 1), It = new T(), Je = new T(), Qe = new T();
752
+ const Ct = new On(), O = new T(0, 1, 0), ks = new T(0, 0, 0), Ps = new fe(), It = new J(), wt = new J(), re = new T(), Ls = new fe(), tt = new T(1, 0, 0), Ee = new T(0, 1, 0), st = new T(0, 0, 1), yt = new T(), Je = new T(), Qe = new T();
753
753
  class zi extends Ze {
754
754
  constructor(e) {
755
755
  super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
@@ -774,7 +774,7 @@ class Gi extends Ze {
774
774
  fog: !1,
775
775
  toneMapped: !1,
776
776
  transparent: !0
777
- }), t = new nt({
777
+ }), t = new it({
778
778
  depthTest: !1,
779
779
  depthWrite: !1,
780
780
  fog: !1,
@@ -794,35 +794,35 @@ class Gi extends Ze {
794
794
  l.color.setHex(16711680), l.opacity = 0.5;
795
795
  const A = e.clone();
796
796
  A.color.setHex(65280), A.opacity = 0.5;
797
- const u = e.clone();
798
- u.color.setHex(255), u.opacity = 0.5;
797
+ const d = e.clone();
798
+ d.color.setHex(255), d.opacity = 0.5;
799
799
  const c = e.clone();
800
800
  c.opacity = 0.25;
801
+ const u = e.clone();
802
+ u.color.setHex(16776960), u.opacity = 0.25;
801
803
  const h = e.clone();
802
- h.color.setHex(16776960), h.opacity = 0.25;
803
- const d = e.clone();
804
- d.color.setHex(16776960);
805
- const g = e.clone();
806
- g.color.setHex(7895160), this.materialLib = {
804
+ h.color.setHex(16776960);
805
+ const m = e.clone();
806
+ m.color.setHex(7895160), this.materialLib = {
807
807
  xAxis: i,
808
808
  yAxis: o,
809
809
  zAxis: a,
810
- active: d,
810
+ active: h,
811
811
  xAxisTransparent: l,
812
812
  yAxisTransparent: A,
813
- zAxisTransparent: u,
814
- activeTransparent: h
813
+ zAxisTransparent: d,
814
+ activeTransparent: u
815
815
  };
816
- const f = new X(0, 0.04, 0.1, 12);
816
+ const f = new q(0, 0.04, 0.1, 12);
817
817
  f.translate(0, 0.05, 0);
818
- const m = new K(0.08, 0.08, 0.08);
819
- m.translate(0, 0.04, 0);
818
+ const g = new K(0.08, 0.08, 0.08);
819
+ g.translate(0, 0.04, 0);
820
820
  const p = new De();
821
821
  p.setAttribute("position", new le([0, 0, 0, 1, 0, 0], 3));
822
- const I = new X(75e-4, 75e-4, 0.5, 3);
822
+ const I = new q(75e-4, 75e-4, 0.5, 3);
823
823
  I.translate(0, 0.25, 0);
824
- function x(ee, dt) {
825
- const ie = new Ve(ee, 75e-4, 3, 64, dt * Math.PI * 2);
824
+ function x(ee, ht) {
825
+ const ie = new Ve(ee, 75e-4, 3, 64, ht * Math.PI * 2);
826
826
  return ie.rotateY(Math.PI / 2), ie.rotateX(Math.PI / 2), ie;
827
827
  }
828
828
  function y() {
@@ -846,10 +846,10 @@ class Gi extends Ze {
846
846
  [new S(I, a), null, [Math.PI / 2, 0, 0]]
847
847
  ],
848
848
  XYZ: [
849
- [new S(new mt(0.1, 0), c), [0, 0, 0]]
849
+ [new S(new gt(0.1, 0), c), [0, 0, 0]]
850
850
  ],
851
851
  XY: [
852
- [new S(new K(0.15, 0.15, 0.01), u), [0.15, 0.15, 0]]
852
+ [new S(new K(0.15, 0.15, 0.01), d), [0.15, 0.15, 0]]
853
853
  ],
854
854
  YZ: [
855
855
  [new S(new K(0.15, 0.15, 0.01), l), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
@@ -859,19 +859,19 @@ class Gi extends Ze {
859
859
  ]
860
860
  }, M = {
861
861
  X: [
862
- [new S(new X(0.2, 0, 0.6, 4), n), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
863
- [new S(new X(0.2, 0, 0.6, 4), n), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
862
+ [new S(new q(0.2, 0, 0.6, 4), n), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
863
+ [new S(new q(0.2, 0, 0.6, 4), n), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
864
864
  ],
865
865
  Y: [
866
- [new S(new X(0.2, 0, 0.6, 4), n), [0, 0.3, 0]],
867
- [new S(new X(0.2, 0, 0.6, 4), n), [0, -0.3, 0], [0, 0, Math.PI]]
866
+ [new S(new q(0.2, 0, 0.6, 4), n), [0, 0.3, 0]],
867
+ [new S(new q(0.2, 0, 0.6, 4), n), [0, -0.3, 0], [0, 0, Math.PI]]
868
868
  ],
869
869
  Z: [
870
- [new S(new X(0.2, 0, 0.6, 4), n), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
871
- [new S(new X(0.2, 0, 0.6, 4), n), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
870
+ [new S(new q(0.2, 0, 0.6, 4), n), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
871
+ [new S(new q(0.2, 0, 0.6, 4), n), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
872
872
  ],
873
873
  XYZ: [
874
- [new S(new mt(0.2, 0), n)]
874
+ [new S(new gt(0.2, 0), n)]
875
875
  ],
876
876
  XY: [
877
877
  [new S(new K(0.2, 0.2, 0.01), n), [0.15, 0.15, 0]]
@@ -884,10 +884,10 @@ class Gi extends Ze {
884
884
  ]
885
885
  }, L = {
886
886
  START: [
887
- [new S(new mt(0.01, 2), s), null, null, null, "helper"]
887
+ [new S(new gt(0.01, 2), s), null, null, null, "helper"]
888
888
  ],
889
889
  END: [
890
- [new S(new mt(0.01, 2), s), null, null, null, "helper"]
890
+ [new S(new gt(0.01, 2), s), null, null, null, "helper"]
891
891
  ],
892
892
  DELTA: [
893
893
  [new de(y(), s), null, null, null, "helper"]
@@ -903,7 +903,7 @@ class Gi extends Ze {
903
903
  ]
904
904
  }, Q = {
905
905
  XYZE: [
906
- [new S(x(0.5, 1), g), null, [0, Math.PI / 2, 0]]
906
+ [new S(x(0.5, 1), m), null, [0, Math.PI / 2, 0]]
907
907
  ],
908
908
  X: [
909
909
  [new S(x(0.5, 0.5), i)]
@@ -915,7 +915,7 @@ class Gi extends Ze {
915
915
  [new S(x(0.5, 0.5), a), null, [0, Math.PI / 2, 0]]
916
916
  ],
917
917
  E: [
918
- [new S(x(0.75, 1), h), null, [0, Math.PI / 2, 0]]
918
+ [new S(x(0.75, 1), u), null, [0, Math.PI / 2, 0]]
919
919
  ]
920
920
  }, $ = {
921
921
  AXIS: [
@@ -939,22 +939,22 @@ class Gi extends Ze {
939
939
  ]
940
940
  }, Te = {
941
941
  X: [
942
- [new S(m, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
942
+ [new S(g, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
943
943
  [new S(I, i), [0, 0, 0], [0, 0, -Math.PI / 2]],
944
- [new S(m, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]]
944
+ [new S(g, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]]
945
945
  ],
946
946
  Y: [
947
- [new S(m, o), [0, 0.5, 0]],
947
+ [new S(g, o), [0, 0.5, 0]],
948
948
  [new S(I, o)],
949
- [new S(m, o), [0, -0.5, 0], [0, 0, Math.PI]]
949
+ [new S(g, o), [0, -0.5, 0], [0, 0, Math.PI]]
950
950
  ],
951
951
  Z: [
952
- [new S(m, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
952
+ [new S(g, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
953
953
  [new S(I, a), [0, 0, 0], [Math.PI / 2, 0, 0]],
954
- [new S(m, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]]
954
+ [new S(g, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]]
955
955
  ],
956
956
  XY: [
957
- [new S(new K(0.15, 0.15, 0.01), u), [0.15, 0.15, 0]]
957
+ [new S(new K(0.15, 0.15, 0.01), d), [0.15, 0.15, 0]]
958
958
  ],
959
959
  YZ: [
960
960
  [new S(new K(0.15, 0.15, 0.01), l), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
@@ -965,18 +965,18 @@ class Gi extends Ze {
965
965
  XYZ: [
966
966
  [new S(new K(0.1, 0.1, 0.1), c)]
967
967
  ]
968
- }, Gt = {
968
+ }, zt = {
969
969
  X: [
970
- [new S(new X(0.2, 0, 0.6, 4), n), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
971
- [new S(new X(0.2, 0, 0.6, 4), n), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
970
+ [new S(new q(0.2, 0, 0.6, 4), n), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
971
+ [new S(new q(0.2, 0, 0.6, 4), n), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
972
972
  ],
973
973
  Y: [
974
- [new S(new X(0.2, 0, 0.6, 4), n), [0, 0.3, 0]],
975
- [new S(new X(0.2, 0, 0.6, 4), n), [0, -0.3, 0], [0, 0, Math.PI]]
974
+ [new S(new q(0.2, 0, 0.6, 4), n), [0, 0.3, 0]],
975
+ [new S(new q(0.2, 0, 0.6, 4), n), [0, -0.3, 0], [0, 0, Math.PI]]
976
976
  ],
977
977
  Z: [
978
- [new S(new X(0.2, 0, 0.6, 4), n), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
979
- [new S(new X(0.2, 0, 0.6, 4), n), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
978
+ [new S(new q(0.2, 0, 0.6, 4), n), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
979
+ [new S(new q(0.2, 0, 0.6, 4), n), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
980
980
  ],
981
981
  XY: [
982
982
  [new S(new K(0.2, 0.2, 0.01), n), [0.15, 0.15, 0]]
@@ -1002,17 +1002,17 @@ class Gi extends Ze {
1002
1002
  ]
1003
1003
  };
1004
1004
  function ue(ee) {
1005
- const dt = new Ze();
1005
+ const ht = new Ze();
1006
1006
  for (const ie in ee)
1007
1007
  for (let Fe = ee[ie].length; Fe--; ) {
1008
- const Z = ee[ie][Fe][0].clone(), ht = ee[ie][Fe][1], ft = ee[ie][Fe][2], pt = ee[ie][Fe][3], bn = ee[ie][Fe][4];
1009
- Z.name = ie, Z.tag = bn, ht && Z.position.set(ht[0], ht[1], ht[2]), ft && Z.rotation.set(ft[0], ft[1], ft[2]), pt && Z.scale.set(pt[0], pt[1], pt[2]), Z.updateMatrix();
1010
- const gs = Z.geometry.clone();
1011
- gs.applyMatrix4(Z.matrix), Z.geometry = gs, Z.renderOrder = 1 / 0, Z.position.set(0, 0, 0), Z.rotation.set(0, 0, 0), Z.scale.set(1, 1, 1), dt.add(Z);
1008
+ const X = ee[ie][Fe][0].clone(), ft = ee[ie][Fe][1], pt = ee[ie][Fe][2], mt = ee[ie][Fe][3], bn = ee[ie][Fe][4];
1009
+ X.name = ie, X.tag = bn, ft && X.position.set(ft[0], ft[1], ft[2]), pt && X.rotation.set(pt[0], pt[1], pt[2]), mt && X.scale.set(mt[0], mt[1], mt[2]), X.updateMatrix();
1010
+ const gs = X.geometry.clone();
1011
+ gs.applyMatrix4(X.matrix), X.geometry = gs, X.renderOrder = 1 / 0, X.position.set(0, 0, 0), X.rotation.set(0, 0, 0), X.scale.set(1, 1, 1), ht.add(X);
1012
1012
  }
1013
- return dt;
1013
+ return ht;
1014
1014
  }
1015
- this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = ue(v)), this.add(this.gizmo.rotate = ue(Q)), this.add(this.gizmo.scale = ue(Te)), this.add(this.picker.translate = ue(M)), this.add(this.picker.rotate = ue(Y)), this.add(this.picker.scale = ue(Gt)), this.add(this.helper.translate = ue(L)), this.add(this.helper.rotate = ue($)), this.add(this.helper.scale = ue(gn)), 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 = ue(v)), this.add(this.gizmo.rotate = ue(Q)), this.add(this.gizmo.scale = ue(Te)), this.add(this.picker.translate = ue(M)), this.add(this.picker.rotate = ue(Y)), this.add(this.picker.scale = ue(zt)), this.add(this.helper.translate = ue(L)), this.add(this.helper.rotate = ue($)), this.add(this.helper.scale = ue(gn)), 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) {
@@ -1025,10 +1025,10 @@ class Gi extends Ze {
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" && (j.setFromEuler(bt.set(0, 0, 0)), o.quaternion.copy(n).multiply(j), Math.abs(O.copy(tt).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Y" && (j.setFromEuler(bt.set(0, 0, Math.PI / 2)), o.quaternion.copy(n).multiply(j), Math.abs(O.copy(Ee).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Z" && (j.setFromEuler(bt.set(0, Math.PI / 2, 0)), o.quaternion.copy(n).multiply(j), Math.abs(O.copy(st).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "XYZE" && (j.setFromEuler(bt.set(0, Math.PI / 2, 0)), O.copy(this.rotationAxis), o.quaternion.setFromRotationMatrix(Ps.lookAt(ks, O, Ee)), o.quaternion.multiply(j), 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), G.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), G.applyQuaternion(this.worldQuaternionStart.clone().invert()), o.scale.copy(G), 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" && (j.setFromEuler(Ct.set(0, 0, 0)), o.quaternion.copy(n).multiply(j), Math.abs(O.copy(tt).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Y" && (j.setFromEuler(Ct.set(0, 0, Math.PI / 2)), o.quaternion.copy(n).multiply(j), Math.abs(O.copy(Ee).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Z" && (j.setFromEuler(Ct.set(0, Math.PI / 2, 0)), o.quaternion.copy(n).multiply(j), Math.abs(O.copy(st).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "XYZE" && (j.setFromEuler(Ct.set(0, Math.PI / 2, 0)), O.copy(this.rotationAxis), o.quaternion.setFromRotationMatrix(Ps.lookAt(ks, O, Ee)), o.quaternion.multiply(j), 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), G.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), G.applyQuaternion(this.worldQuaternionStart.clone().invert()), o.scale.copy(G), 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(O.copy(tt).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Y" && Math.abs(O.copy(Ee).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Z" && Math.abs(O.copy(st).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XY" && Math.abs(O.copy(st).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "YZ" && Math.abs(O.copy(tt).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XZ" && Math.abs(O.copy(Ee).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1)) : this.mode === "rotate" && (Ct.copy(n), O.copy(this.eye).applyQuaternion(j.copy(n).invert()), o.name.search("E") !== -1 && o.quaternion.setFromRotationMatrix(Ps.lookAt(this.eye, ks, Ee)), o.name === "X" && (j.setFromAxisAngle(tt, Math.atan2(-O.y, O.z)), j.multiplyQuaternions(Ct, j), o.quaternion.copy(j)), o.name === "Y" && (j.setFromAxisAngle(Ee, Math.atan2(O.x, O.z)), j.multiplyQuaternions(Ct, j), o.quaternion.copy(j)), o.name === "Z" && (j.setFromAxisAngle(st, Math.atan2(O.y, O.x)), j.multiplyQuaternions(Ct, j), o.quaternion.copy(j))), 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(O.copy(tt).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Y" && Math.abs(O.copy(Ee).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Z" && Math.abs(O.copy(st).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XY" && Math.abs(O.copy(st).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "YZ" && Math.abs(O.copy(tt).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XZ" && Math.abs(O.copy(Ee).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1)) : this.mode === "rotate" && (It.copy(n), O.copy(this.eye).applyQuaternion(j.copy(n).invert()), o.name.search("E") !== -1 && o.quaternion.setFromRotationMatrix(Ps.lookAt(this.eye, ks, Ee)), o.name === "X" && (j.setFromAxisAngle(tt, Math.atan2(-O.y, O.z)), j.multiplyQuaternions(It, j), o.quaternion.copy(j)), o.name === "Y" && (j.setFromAxisAngle(Ee, Math.atan2(O.x, O.z)), j.multiplyQuaternions(It, j), o.quaternion.copy(j)), o.name === "Z" && (j.setFromAxisAngle(st, Math.atan2(O.y, O.x)), j.multiplyQuaternions(It, j), o.quaternion.copy(j))), 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
  }
@@ -1039,17 +1039,17 @@ class Ki extends S {
1039
1039
  constructor() {
1040
1040
  super(
1041
1041
  new Dn(1e5, 1e5, 2, 2),
1042
- new Ne({ visible: !1, wireframe: !0, side: Lt, transparent: !0, opacity: 0.1, toneMapped: !1 })
1042
+ new Ne({ visible: !1, wireframe: !0, side: Pt, transparent: !0, opacity: 0.1, toneMapped: !1 })
1043
1043
  ), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
1044
1044
  }
1045
1045
  updateMatrixWorld(e) {
1046
1046
  let t = this.space;
1047
- switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), It.copy(tt).applyQuaternion(t === "local" ? this.worldQuaternion : wt), Je.copy(Ee).applyQuaternion(t === "local" ? this.worldQuaternion : wt), Qe.copy(st).applyQuaternion(t === "local" ? this.worldQuaternion : wt), O.copy(Je), this.mode) {
1047
+ switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), yt.copy(tt).applyQuaternion(t === "local" ? this.worldQuaternion : wt), Je.copy(Ee).applyQuaternion(t === "local" ? this.worldQuaternion : wt), Qe.copy(st).applyQuaternion(t === "local" ? this.worldQuaternion : wt), O.copy(Je), this.mode) {
1048
1048
  case "translate":
1049
1049
  case "scale":
1050
1050
  switch (this.axis) {
1051
1051
  case "X":
1052
- O.copy(this.eye).cross(It), re.copy(It).cross(O);
1052
+ O.copy(this.eye).cross(yt), re.copy(yt).cross(O);
1053
1053
  break;
1054
1054
  case "Y":
1055
1055
  O.copy(this.eye).cross(Je), re.copy(Je).cross(O);
@@ -1061,7 +1061,7 @@ class Ki extends S {
1061
1061
  re.copy(Qe);
1062
1062
  break;
1063
1063
  case "YZ":
1064
- re.copy(It);
1064
+ re.copy(yt);
1065
1065
  break;
1066
1066
  case "XZ":
1067
1067
  O.copy(Qe), re.copy(Je);
@@ -1453,7 +1453,7 @@ class Qi extends qe {
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 yt = {
1456
+ const xt = {
1457
1457
  name: "OutputShader",
1458
1458
  uniforms: {
1459
1459
  tDiffuse: { value: null },
@@ -1544,11 +1544,11 @@ class Yi extends qe {
1544
1544
  * Constructs a new output pass.
1545
1545
  */
1546
1546
  constructor() {
1547
- super(), this.isOutputPass = !0, this.uniforms = cs.clone(yt.uniforms), this.material = new jn({
1548
- name: yt.name,
1547
+ super(), this.isOutputPass = !0, this.uniforms = cs.clone(xt.uniforms), this.material = new jn({
1548
+ name: xt.name,
1549
1549
  uniforms: this.uniforms,
1550
- vertexShader: yt.vertexShader,
1551
- fragmentShader: yt.fragmentShader
1550
+ vertexShader: xt.vertexShader,
1551
+ fragmentShader: xt.fragmentShader
1552
1552
  }), this._fsQuad = new hs(this.material), this._outputColorSpace = null, this._toneMapping = null;
1553
1553
  }
1554
1554
  /**
@@ -1563,7 +1563,7 @@ class Yi extends qe {
1563
1563
  * @param {boolean} maskActive - Whether masking is active or not.
1564
1564
  */
1565
1565
  render(e, t, n) {
1566
- this.uniforms.tDiffuse.value = n.texture, this.uniforms.toneMappingExposure.value = e.toneMappingExposure, (this._outputColorSpace !== e.outputColorSpace || this._toneMapping !== e.toneMapping) && (this._outputColorSpace = e.outputColorSpace, this._toneMapping = e.toneMapping, this.material.defines = {}, Nt.getTransfer(this._outputColorSpace) === Fn && (this.material.defines.SRGB_TRANSFER = ""), this._toneMapping === Un ? this.material.defines.LINEAR_TONE_MAPPING = "" : this._toneMapping === Hn ? this.material.defines.REINHARD_TONE_MAPPING = "" : this._toneMapping === zn ? this.material.defines.CINEON_TONE_MAPPING = "" : this._toneMapping === Gn ? this.material.defines.ACES_FILMIC_TONE_MAPPING = "" : this._toneMapping === Kn ? this.material.defines.AGX_TONE_MAPPING = "" : this._toneMapping === Bn ? this.material.defines.NEUTRAL_TONE_MAPPING = "" : this._toneMapping === Zn && (this.material.defines.CUSTOM_TONE_MAPPING = ""), this.material.needsUpdate = !0), this.renderToScreen === !0 ? (e.setRenderTarget(null), this._fsQuad.render(e)) : (e.setRenderTarget(t), this.clear && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), this._fsQuad.render(e));
1566
+ this.uniforms.tDiffuse.value = n.texture, this.uniforms.toneMappingExposure.value = e.toneMappingExposure, (this._outputColorSpace !== e.outputColorSpace || this._toneMapping !== e.toneMapping) && (this._outputColorSpace = e.outputColorSpace, this._toneMapping = e.toneMapping, this.material.defines = {}, Lt.getTransfer(this._outputColorSpace) === Fn && (this.material.defines.SRGB_TRANSFER = ""), this._toneMapping === Un ? this.material.defines.LINEAR_TONE_MAPPING = "" : this._toneMapping === Hn ? this.material.defines.REINHARD_TONE_MAPPING = "" : this._toneMapping === zn ? this.material.defines.CINEON_TONE_MAPPING = "" : this._toneMapping === Gn ? this.material.defines.ACES_FILMIC_TONE_MAPPING = "" : this._toneMapping === Kn ? this.material.defines.AGX_TONE_MAPPING = "" : this._toneMapping === Bn ? this.material.defines.NEUTRAL_TONE_MAPPING = "" : this._toneMapping === Zn && (this.material.defines.CUSTOM_TONE_MAPPING = ""), this.material.needsUpdate = !0), this.renderToScreen === !0 ? (e.setRenderTarget(null), this._fsQuad.render(e)) : (e.setRenderTarget(t), this.clear && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), this._fsQuad.render(e));
1567
1567
  }
1568
1568
  /**
1569
1569
  * Frees the GPU-related resources allocated by this instance. Call this
@@ -1586,7 +1586,7 @@ class Ce extends qe {
1586
1586
  constructor(e, t, n, s) {
1587
1587
  super(), this.renderScene = t, this.renderCamera = n, this.selectedObjects = s !== void 0 ? s : [], this.visibleEdgeColor = new B(1, 1, 1), this.hiddenEdgeColor = new B(0.1, 0.04, 0.02), this.edgeGlow = 0, this.usePatternTexture = !1, this.patternTexture = null, this.edgeThickness = 1, this.edgeStrength = 3, this.downSampleRatio = 2, this.pulsePeriod = 0, this._visibilityCache = /* @__PURE__ */ new Map(), this._selectionCache = /* @__PURE__ */ new Set(), this.resolution = e !== void 0 ? new F(e.x, e.y) : new F(256, 256);
1588
1588
  const i = Math.round(this.resolution.x / this.downSampleRatio), o = Math.round(this.resolution.y / this.downSampleRatio);
1589
- this.renderTargetMaskBuffer = new ge(this.resolution.x, this.resolution.y), this.renderTargetMaskBuffer.texture.name = "OutlinePass.mask", this.renderTargetMaskBuffer.texture.generateMipmaps = !1, this.depthMaterial = new Xn(), this.depthMaterial.side = Lt, this.depthMaterial.depthPacking = qn, this.depthMaterial.blending = ts, this.prepareMaskMaterial = this._getPrepareMaskMaterial(), this.prepareMaskMaterial.side = Lt, this.prepareMaskMaterial.fragmentShader = u(this.prepareMaskMaterial.fragmentShader, this.renderCamera), this.renderTargetDepthBuffer = new ge(this.resolution.x, this.resolution.y, { type: Re }), this.renderTargetDepthBuffer.texture.name = "OutlinePass.depth", this.renderTargetDepthBuffer.texture.generateMipmaps = !1, this.renderTargetMaskDownSampleBuffer = new ge(i, o, { type: Re }), this.renderTargetMaskDownSampleBuffer.texture.name = "OutlinePass.depthDownSample", this.renderTargetMaskDownSampleBuffer.texture.generateMipmaps = !1, this.renderTargetBlurBuffer1 = new ge(i, o, { type: Re }), this.renderTargetBlurBuffer1.texture.name = "OutlinePass.blur1", this.renderTargetBlurBuffer1.texture.generateMipmaps = !1, this.renderTargetBlurBuffer2 = new ge(Math.round(i / 2), Math.round(o / 2), { type: Re }), this.renderTargetBlurBuffer2.texture.name = "OutlinePass.blur2", this.renderTargetBlurBuffer2.texture.generateMipmaps = !1, this.edgeDetectionMaterial = this._getEdgeDetectionMaterial(), this.renderTargetEdgeBuffer1 = new ge(i, o, { type: Re }), this.renderTargetEdgeBuffer1.texture.name = "OutlinePass.edge1", this.renderTargetEdgeBuffer1.texture.generateMipmaps = !1, this.renderTargetEdgeBuffer2 = new ge(Math.round(i / 2), Math.round(o / 2), { type: Re }), this.renderTargetEdgeBuffer2.texture.name = "OutlinePass.edge2", this.renderTargetEdgeBuffer2.texture.generateMipmaps = !1;
1589
+ this.renderTargetMaskBuffer = new ge(this.resolution.x, this.resolution.y), this.renderTargetMaskBuffer.texture.name = "OutlinePass.mask", this.renderTargetMaskBuffer.texture.generateMipmaps = !1, this.depthMaterial = new Xn(), this.depthMaterial.side = Pt, this.depthMaterial.depthPacking = qn, this.depthMaterial.blending = ts, this.prepareMaskMaterial = this._getPrepareMaskMaterial(), this.prepareMaskMaterial.side = Pt, this.prepareMaskMaterial.fragmentShader = d(this.prepareMaskMaterial.fragmentShader, this.renderCamera), this.renderTargetDepthBuffer = new ge(this.resolution.x, this.resolution.y, { type: Re }), this.renderTargetDepthBuffer.texture.name = "OutlinePass.depth", this.renderTargetDepthBuffer.texture.generateMipmaps = !1, this.renderTargetMaskDownSampleBuffer = new ge(i, o, { type: Re }), this.renderTargetMaskDownSampleBuffer.texture.name = "OutlinePass.depthDownSample", this.renderTargetMaskDownSampleBuffer.texture.generateMipmaps = !1, this.renderTargetBlurBuffer1 = new ge(i, o, { type: Re }), this.renderTargetBlurBuffer1.texture.name = "OutlinePass.blur1", this.renderTargetBlurBuffer1.texture.generateMipmaps = !1, this.renderTargetBlurBuffer2 = new ge(Math.round(i / 2), Math.round(o / 2), { type: Re }), this.renderTargetBlurBuffer2.texture.name = "OutlinePass.blur2", this.renderTargetBlurBuffer2.texture.generateMipmaps = !1, this.edgeDetectionMaterial = this._getEdgeDetectionMaterial(), this.renderTargetEdgeBuffer1 = new ge(i, o, { type: Re }), this.renderTargetEdgeBuffer1.texture.name = "OutlinePass.edge1", this.renderTargetEdgeBuffer1.texture.generateMipmaps = !1, this.renderTargetEdgeBuffer2 = new ge(Math.round(i / 2), Math.round(o / 2), { type: Re }), this.renderTargetEdgeBuffer2.texture.name = "OutlinePass.edge2", this.renderTargetEdgeBuffer2.texture.generateMipmaps = !1;
1590
1590
  const a = 4, l = 4;
1591
1591
  this.separableBlurMaterial1 = this._getSeparableBlurMaterial(a), this.separableBlurMaterial1.uniforms.texSize.value.set(i, o), this.separableBlurMaterial1.uniforms.kernelRadius.value = 1, this.separableBlurMaterial2 = this._getSeparableBlurMaterial(l), this.separableBlurMaterial2.uniforms.texSize.value.set(Math.round(i / 2), Math.round(o / 2)), this.separableBlurMaterial2.uniforms.kernelRadius.value = l, this.overlayMaterial = this._getOverlayMaterial();
1592
1592
  const A = an;
@@ -1598,9 +1598,9 @@ class Ce extends qe {
1598
1598
  depthTest: !1,
1599
1599
  depthWrite: !1
1600
1600
  }), this.enabled = !0, this.needsSwap = !1, this._oldClearColor = new B(), this.oldClearAlpha = 1, this._fsQuad = new hs(null), this.tempPulseColor1 = new B(), this.tempPulseColor2 = new B(), this.textureMatrix = new fe();
1601
- function u(c, h) {
1602
- const d = h.isPerspectiveCamera ? "perspective" : "orthographic";
1603
- return c.replace(/DEPTH_TO_VIEW_Z/g, d + "DepthToViewZ");
1601
+ function d(c, u) {
1602
+ const h = u.isPerspectiveCamera ? "perspective" : "orthographic";
1603
+ return c.replace(/DEPTH_TO_VIEW_Z/g, h + "DepthToViewZ");
1604
1604
  }
1605
1605
  }
1606
1606
  /**
@@ -1919,51 +1919,51 @@ class eo {
1919
1919
  width: n,
1920
1920
  height: s
1921
1921
  };
1922
- }, this.render = function(g, f) {
1923
- g.matrixWorldAutoUpdate === !0 && g.updateMatrixWorld(), f.parent === null && f.matrixWorldAutoUpdate === !0 && f.updateMatrixWorld(), Os.copy(f.matrixWorldInverse), Ds.multiplyMatrices(f.projectionMatrix, Os), u(g, g, f), this.sortObjects && d(g);
1924
- }, this.setSize = function(g, f) {
1925
- n = g, s = f, i = n / 2, o = s / 2, l.style.width = g + "px", l.style.height = f + "px";
1922
+ }, this.render = function(m, f) {
1923
+ m.matrixWorldAutoUpdate === !0 && m.updateMatrixWorld(), f.parent === null && f.matrixWorldAutoUpdate === !0 && f.updateMatrixWorld(), Os.copy(f.matrixWorldInverse), Ds.multiplyMatrices(f.projectionMatrix, Os), d(m, m, f), this.sortObjects && h(m);
1924
+ }, this.setSize = function(m, f) {
1925
+ n = m, s = f, i = n / 2, o = s / 2, l.style.width = m + "px", l.style.height = f + "px";
1926
1926
  };
1927
- function A(g) {
1928
- g.isCSS2DObject && (g.element.style.display = "none");
1929
- for (let f = 0, m = g.children.length; f < m; f++)
1930
- A(g.children[f]);
1927
+ function A(m) {
1928
+ m.isCSS2DObject && (m.element.style.display = "none");
1929
+ for (let f = 0, g = m.children.length; f < g; f++)
1930
+ A(m.children[f]);
1931
1931
  }
1932
- function u(g, f, m) {
1933
- if (g.visible === !1) {
1934
- A(g);
1932
+ function d(m, f, g) {
1933
+ if (m.visible === !1) {
1934
+ A(m);
1935
1935
  return;
1936
1936
  }
1937
- if (g.isCSS2DObject) {
1938
- He.setFromMatrixPosition(g.matrixWorld), He.applyMatrix4(Ds);
1939
- const p = He.z >= -1 && He.z <= 1 && g.layers.test(m.layers) === !0, I = g.element;
1940
- I.style.display = p === !0 ? "" : "none", p === !0 && (g.onBeforeRender(t, f, m), I.style.transform = "translate(" + -100 * g.center.x + "%," + -100 * g.center.y + "%)translate(" + (He.x * i + i) + "px," + (-He.y * o + o) + "px)", I.parentNode !== l && l.appendChild(I), g.onAfterRender(t, f, m));
1937
+ if (m.isCSS2DObject) {
1938
+ He.setFromMatrixPosition(m.matrixWorld), He.applyMatrix4(Ds);
1939
+ const p = He.z >= -1 && He.z <= 1 && m.layers.test(g.layers) === !0, I = m.element;
1940
+ I.style.display = p === !0 ? "" : "none", p === !0 && (m.onBeforeRender(t, f, g), I.style.transform = "translate(" + -100 * m.center.x + "%," + -100 * m.center.y + "%)translate(" + (He.x * i + i) + "px," + (-He.y * o + o) + "px)", I.parentNode !== l && l.appendChild(I), m.onAfterRender(t, f, g));
1941
1941
  const x = {
1942
- distanceToCameraSquared: c(m, g)
1942
+ distanceToCameraSquared: c(g, m)
1943
1943
  };
1944
- a.objects.set(g, x);
1944
+ a.objects.set(m, x);
1945
1945
  }
1946
- for (let p = 0, I = g.children.length; p < I; p++)
1947
- u(g.children[p], f, m);
1946
+ for (let p = 0, I = m.children.length; p < I; p++)
1947
+ d(m.children[p], f, g);
1948
1948
  }
1949
- function c(g, f) {
1950
- return Ws.setFromMatrixPosition(g.matrixWorld), js.setFromMatrixPosition(f.matrixWorld), Ws.distanceToSquared(js);
1949
+ function c(m, f) {
1950
+ return Ws.setFromMatrixPosition(m.matrixWorld), js.setFromMatrixPosition(f.matrixWorld), Ws.distanceToSquared(js);
1951
1951
  }
1952
- function h(g) {
1952
+ function u(m) {
1953
1953
  const f = [];
1954
- return g.traverseVisible(function(m) {
1955
- m.isCSS2DObject && f.push(m);
1954
+ return m.traverseVisible(function(g) {
1955
+ g.isCSS2DObject && f.push(g);
1956
1956
  }), f;
1957
1957
  }
1958
- function d(g) {
1959
- const f = h(g).sort(function(p, I) {
1958
+ function h(m) {
1959
+ const f = u(m).sort(function(p, I) {
1960
1960
  if (p.renderOrder !== I.renderOrder)
1961
1961
  return I.renderOrder - p.renderOrder;
1962
1962
  const x = a.objects.get(p).distanceToCameraSquared, y = a.objects.get(I).distanceToCameraSquared;
1963
1963
  return x - y;
1964
- }), m = f.length;
1964
+ }), g = f.length;
1965
1965
  for (let p = 0, I = f.length; p < I; p++)
1966
- f[p].element.style.zIndex = m - p;
1966
+ f[p].element.style.zIndex = g - p;
1967
1967
  }
1968
1968
  }
1969
1969
  }
@@ -1976,7 +1976,7 @@ const Ye = {
1976
1976
  arrow: "sl-css2d-data-panel-arrow",
1977
1977
  item: "sl-css2d-data-panel-item"
1978
1978
  }, lo = "--sl-css2d-base-font-size";
1979
- class ut {
1979
+ class dt {
1980
1980
  constructor(e = {}) {
1981
1981
  /** CSS2DObject 实例 */
1982
1982
  Ue(this, "css2dObject", null);
@@ -2007,7 +2007,7 @@ class ut {
2007
2007
  // ─── 构建面板 DOM ───
2008
2008
  /** 根据当前 options 构建面板 DOM 结构(全部使用 em 单位,font-size 由 JS 动态控制) */
2009
2009
  buildPanel() {
2010
- const e = this.options, t = ut.pxToEm, n = document.createElement("div");
2010
+ const e = this.options, t = dt.pxToEm, n = document.createElement("div");
2011
2011
  n.className = `${Ye.panel} ${e.className}`.trim();
2012
2012
  const s = e.backgroundColor.includes("gradient") ? e.backgroundColor : `linear-gradient(135deg, ${e.backgroundColor} 0%, rgba(2, 6, 18, 0.40) 100%)`;
2013
2013
  if (n.style.cssText = `
@@ -2056,7 +2056,7 @@ class ut {
2056
2056
  }
2057
2057
  /** 渲染数据项到 DOM 列表 */
2058
2058
  renderItems(e, t) {
2059
- const n = ut.pxToEm;
2059
+ const n = dt.pxToEm;
2060
2060
  e.innerHTML = "", t.forEach((s) => {
2061
2061
  const i = document.createElement("div");
2062
2062
  i.className = `${Ye.item} ${s.className || ""}`.trim(), i.style.cssText = `
@@ -2230,17 +2230,17 @@ class ut {
2230
2230
  this.detach(), (e = this.container) != null && e.parentNode && this.container.parentNode.removeChild(this.container), this.css2dObject = null, this.container = null, this.attachedObject = null;
2231
2231
  }
2232
2232
  }
2233
- const Ot = /* @__PURE__ */ new WeakMap();
2233
+ const Nt = /* @__PURE__ */ new WeakMap();
2234
2234
  function ln(r, e) {
2235
- const t = Ft(r);
2236
- Ot.set(t, e), t.userData._hasDataPanel = !0;
2235
+ const t = jt(r);
2236
+ Nt.set(t, e), t.userData._hasDataPanel = !0;
2237
2237
  }
2238
- function Ht(r) {
2239
- return Ot.get(Ft(r)) || null;
2238
+ function Ut(r) {
2239
+ return Nt.get(jt(r)) || null;
2240
2240
  }
2241
2241
  function Ao(r) {
2242
- const e = Ft(r), t = Ot.get(e);
2243
- t && (t.dispose(), Ot.delete(e)), e.userData._hasDataPanel = void 0;
2242
+ const e = jt(r), t = Nt.get(e);
2243
+ t && (t.dispose(), Nt.delete(e)), e.userData._hasDataPanel = void 0;
2244
2244
  }
2245
2245
  let U = null;
2246
2246
  function co(r) {
@@ -2283,12 +2283,12 @@ const b = {
2283
2283
  selectedObject: null
2284
2284
  };
2285
2285
  let Rt = !1, We = !1, Ie = null, ye = null;
2286
- const po = 16755200, Fs = 16755200;
2287
- let rs = [], xt = [], Dt = !0, Xt = [], Wt = !0, Oe = null, as = null, Et = null, xe = [];
2286
+ const po = 16755200, Fs = 16733440;
2287
+ let rs = [], vt = [], Ot = !0, Xt = [], Dt = !0, Oe = null, as = null, Et = null, xe = [];
2288
2288
  const je = /* @__PURE__ */ new Map();
2289
- let jt, kt = null, at = null, lt = null;
2289
+ let Wt, kt = null, lt = null, At = null;
2290
2290
  function mo(r, e = "edit", t) {
2291
- b.container = r, b.mode = e, bo(), Io(), xo(), t && (Vo(t.scene, e, t.dataPanels), t != null && t.camera && (b.defaultMainCamera = t.camera, An(!0))), So(), vo(), jt && b.orbitControls && (b.orbitControls.target.fromArray(jt), b.orbitControls.update()), Co(), Ho(), cn(), at = (n) => Eo(n), lt = () => Mo(), e === "edit" && r.addEventListener("click", at), window.addEventListener("resize", lt), t || To(), e === "edit" && yo();
2291
+ b.container = r, b.mode = e, bo(), Io(), xo(), t && (Vo(t.scene, e, t.dataPanels), t != null && t.camera && (b.defaultMainCamera = t.camera, An(!0))), So(), vo(), Wt && b.orbitControls && (b.orbitControls.target.fromArray(Wt), b.orbitControls.update()), Co(), Ho(), cn(), lt = (n) => Eo(n), At = () => Mo(), e === "edit" && r.addEventListener("click", lt), window.addEventListener("resize", At), t || To(), e === "edit" && yo();
2292
2292
  }
2293
2293
  function go() {
2294
2294
  var i, o;
@@ -2298,7 +2298,7 @@ function go() {
2298
2298
  }
2299
2299
  function bo() {
2300
2300
  const r = go(), e = new w.WebGLRenderer({ antialias: !0, alpha: !0 });
2301
- e.setSize(b.container.clientWidth, b.container.clientHeight), e.setPixelRatio(r), console.log(`[Renderer] css=${b.container.clientWidth}×${b.container.clientHeight}, dpr=${window.devicePixelRatio}, targetRatio=${r}, antialias=true`), b.container.appendChild(e.domElement), b.renderer = e;
2301
+ e.setSize(b.container.clientWidth, b.container.clientHeight), console.log("pixelRatio", r), e.setPixelRatio(r), console.log(`[Renderer] css=${b.container.clientWidth}×${b.container.clientHeight}, dpr=${window.devicePixelRatio}, targetRatio=${r}, antialias=true`), e.shadowMap.enabled = !0, e.shadowMap.type = w.PCFSoftShadowMap, b.container.appendChild(e.domElement), b.renderer = e;
2302
2302
  }
2303
2303
  function Co() {
2304
2304
  if (!b.renderer || !b.scene || !b.camera) return;
@@ -2352,7 +2352,7 @@ function An(r = !1) {
2352
2352
  e.rotation[0],
2353
2353
  e.rotation[1],
2354
2354
  e.rotation[2]
2355
- ), b.camera.updateProjectionMatrix(), jt = e.target;
2355
+ ), b.camera.updateProjectionMatrix(), Wt = e.target;
2356
2356
  return;
2357
2357
  } else
2358
2358
  dn(""), ps();
@@ -2362,7 +2362,7 @@ function An(r = !1) {
2362
2362
  e.position[1],
2363
2363
  e.position[2]
2364
2364
  ), i = e.target ? new w.Vector3(e.target[0], e.target[1], e.target[2]) : new w.Vector3(0, 0, 0);
2365
- b.orbitControls.enabled = !1, new ct.Tween({
2365
+ b.orbitControls.enabled = !1, new ut.Tween({
2366
2366
  x: t.x,
2367
2367
  y: t.y,
2368
2368
  z: t.z,
@@ -2379,10 +2379,10 @@ function An(r = !1) {
2379
2379
  tz: i.z
2380
2380
  },
2381
2381
  1e3
2382
- ).easing(ct.Easing.Quadratic.InOut).onUpdate((o) => {
2382
+ ).easing(ut.Easing.Quadratic.InOut).onUpdate((o) => {
2383
2383
  b.camera.position.set(o.x, o.y, o.z), b.orbitControls.target.set(o.tx, o.ty, o.tz), b.orbitControls.update();
2384
2384
  }).onComplete(() => {
2385
- jt = e.target, b.orbitControls.enabled = !0;
2385
+ Wt = e.target, b.orbitControls.enabled = !0;
2386
2386
  }).start();
2387
2387
  }
2388
2388
  function vo() {
@@ -2420,11 +2420,11 @@ function To() {
2420
2420
  }
2421
2421
  function cn() {
2422
2422
  var e, t;
2423
- kt = requestAnimationFrame(cn), ct.update(), (e = b.orbitControls) == null || e.update(), b.mode === "run" && Ie && b.scene && b.camera ? Ie.render() : (t = b.renderer) == null || t.render(b.scene, b.camera), b.scene && b.camera && uo(b.scene, b.camera), Dt && b.scene && (xt = [], b.scene.traverse((n) => {
2424
- n.userData.isWater && n.type === "Mesh" && xt.push(n);
2425
- }), Dt = !1);
2426
- for (let n = 0; n < xt.length; n++) {
2427
- const s = xt[n], i = s.material;
2423
+ kt = requestAnimationFrame(cn), ut.update(), (e = b.orbitControls) == null || e.update(), b.mode === "run" && Ie && b.scene && b.camera ? Ie.render() : (t = b.renderer) == null || t.render(b.scene, b.camera), b.scene && b.camera && uo(b.scene, b.camera), Ot && b.scene && (vt = [], b.scene.traverse((n) => {
2424
+ n.userData.isWater && n.type === "Mesh" && vt.push(n);
2425
+ }), Ot = !1);
2426
+ for (let n = 0; n < vt.length; n++) {
2427
+ const s = vt[n], i = s.material;
2428
2428
  if (i.normalMap) {
2429
2429
  const o = s.userData.waterSpeed || { x: 5e-3, y: 3e-3 };
2430
2430
  i.normalMap.offset.x += o.x, i.normalMap.offset.y += o.y;
@@ -2498,9 +2498,9 @@ function Eo(r) {
2498
2498
  (r.clientX - e.left) / e.width * 2 - 1,
2499
2499
  -((r.clientY - e.top) / e.height) * 2 + 1
2500
2500
  ), n = new w.Raycaster();
2501
- n.setFromCamera(t, b.camera), Wt && b.scene && (Xt = [], b.scene.traverse((i) => {
2501
+ n.setFromCamera(t, b.camera), Dt && b.scene && (Xt = [], b.scene.traverse((i) => {
2502
2502
  (i.userData.isMovable || i.userData.type === "lightHelper") && Xt.push(i);
2503
- }), Wt = !1);
2503
+ }), Dt = !1);
2504
2504
  const s = n.intersectObjects(Xt);
2505
2505
  if (s.length > 0) {
2506
2506
  let i = ko(s[0].object);
@@ -2541,12 +2541,12 @@ function Po(r, e = 500) {
2541
2541
  r.getWorldPosition(n);
2542
2542
  const i = new w.Box3().setFromObject(r).getSize(new w.Vector3()), o = Math.max(i.x, i.y, i.z) * 0.5, a = Math.max(o * 3.5, 5), l = new w.Vector3().copy(b.camera.position).sub(n).normalize();
2543
2543
  l.lengthSq() < 1e-3 && l.set(0, 0, 1);
2544
- const A = n.clone().add(l.multiplyScalar(a)), u = b.camera.position.clone(), c = b.orbitControls.target.clone();
2544
+ const A = n.clone().add(l.multiplyScalar(a)), d = b.camera.position.clone(), c = b.orbitControls.target.clone();
2545
2545
  try {
2546
- new ct.Tween({
2547
- x: u.x,
2548
- y: u.y,
2549
- z: u.z,
2546
+ new ut.Tween({
2547
+ x: d.x,
2548
+ y: d.y,
2549
+ z: d.z,
2550
2550
  tx: c.x,
2551
2551
  ty: c.y,
2552
2552
  tz: c.z
@@ -2560,13 +2560,13 @@ function Po(r, e = 500) {
2560
2560
  tz: n.z
2561
2561
  },
2562
2562
  e
2563
- ).easing(ct.Easing.Quadratic.InOut).onUpdate((h) => {
2564
- b.camera.position.set(h.x, h.y, h.z), b.orbitControls.target.set(h.tx, h.ty, h.tz), b.orbitControls.update();
2563
+ ).easing(ut.Easing.Quadratic.InOut).onUpdate((u) => {
2564
+ b.camera.position.set(u.x, u.y, u.z), b.orbitControls.target.set(u.tx, u.ty, u.tz), b.orbitControls.update();
2565
2565
  }).start();
2566
- } catch (h) {
2566
+ } catch (u) {
2567
2567
  console.error(
2568
2568
  "[focusOnObject] TWEEN 动画创建失败,请检查 @tweenjs/tween.js 是否已正确安装且版本兼容(^23.1.3):",
2569
- h
2569
+ u
2570
2570
  );
2571
2571
  }
2572
2572
  }
@@ -2594,10 +2594,10 @@ function Do(r) {
2594
2594
  });
2595
2595
  }
2596
2596
  function Xe(r, e = !1) {
2597
- b.scene.add(r), Dt = !0, Wt = !0, r.userData.isMovable && (Fo(r), zt()), e && b.mode === "edit" && fs(r);
2597
+ b.scene.add(r), Ot = !0, Dt = !0, r.userData.isMovable && (Fo(r), Ht()), e && b.mode === "edit" && fs(r);
2598
2598
  }
2599
2599
  function Wo(r) {
2600
- b.selectedObject === r && ms(), Dt = !0, Wt = !0, Do(r), No(r), r.userData.helper && b.scene.remove(r.userData.helper), r.parent ? r.parent.remove(r) : b.scene.remove(r), Uo(r), zt();
2600
+ b.selectedObject === r && ms(), Ot = !0, Dt = !0, Do(r), No(r), r.userData.helper && b.scene.remove(r.userData.helper), r.parent ? r.parent.remove(r) : b.scene.remove(r), Uo(r), Ht();
2601
2601
  }
2602
2602
  function jo(r) {
2603
2603
  const e = b.scene.getObjectByProperty("uuid", r);
@@ -2614,9 +2614,9 @@ function Ho() {
2614
2614
  const r = [];
2615
2615
  b.scene.children.forEach((e) => {
2616
2616
  e.userData.isMovable && r.push(e);
2617
- }), xe = r, zt();
2617
+ }), xe = r, Ht();
2618
2618
  }
2619
- function zt() {
2619
+ function Ht() {
2620
2620
  Et == null || Et([...xe]);
2621
2621
  }
2622
2622
  function zo(r) {
@@ -2638,7 +2638,7 @@ function kl(r, e, t) {
2638
2638
  if (!b.scene) return;
2639
2639
  const n = je.get(r);
2640
2640
  if (n) {
2641
- const s = Ht(n);
2641
+ const s = Ut(n);
2642
2642
  s && s.updateItemByCode(e, t);
2643
2643
  }
2644
2644
  }
@@ -2652,21 +2652,21 @@ function Ll() {
2652
2652
  return b.renderer;
2653
2653
  }
2654
2654
  async function qo() {
2655
- var A, u, c;
2656
- _ == null || _(!0), await new Promise((h) => setTimeout(h, 50)), ms();
2655
+ var A, d, c;
2656
+ _ == null || _(!0), await new Promise((u) => setTimeout(u, 50)), ms();
2657
2657
  const r = b.scene;
2658
2658
  if (!r)
2659
2659
  return _ == null || _(!1), "{}";
2660
2660
  const e = [], t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
2661
- r.traverse((h) => {
2662
- var d;
2663
- if (h.userData.type === "lightHelper" && e.push(h), h.type === "DirectionalLight" && h.userData.helper && (t.set(h, h.userData.helper), h.userData.helper = void 0), h.name && h.name.startsWith("DataPanel_")) {
2664
- const g = h;
2665
- if (g.element) {
2666
- const f = g.element.querySelector(
2661
+ r.traverse((u) => {
2662
+ var h;
2663
+ if (u.userData.type === "lightHelper" && e.push(u), u.type === "DirectionalLight" && u.userData.helper && (t.set(u, u.userData.helper), u.userData.helper = void 0), u.name && u.name.startsWith("DataPanel_")) {
2664
+ const m = u;
2665
+ if (m.element) {
2666
+ const f = m.element.querySelector(
2667
2667
  "[data-panel-title]"
2668
- ), m = [];
2669
- if (g.element.querySelectorAll(
2668
+ ), g = [];
2669
+ if (m.element.querySelectorAll(
2670
2670
  ".sl-css2d-data-panel-item"
2671
2671
  ).forEach((I) => {
2672
2672
  var v, M, L;
@@ -2674,16 +2674,16 @@ async function qo() {
2674
2674
  if (x && y) {
2675
2675
  const Q = (x.textContent || "").trim(), $ = ((M = (v = y.childNodes[0]) == null ? void 0 : v.textContent) == null ? void 0 : M.trim()) || "", Y = y.querySelector(
2676
2676
  "span"
2677
- ), Te = Y ? (Y.textContent || "").trim() : void 0, Gt = ((L = I.getAttribute("data-item-code")) == null ? void 0 : L.trim()) || void 0;
2678
- m.push({ label: Q, value: $, unit: Te, code: Gt });
2677
+ ), Te = Y ? (Y.textContent || "").trim() : void 0, zt = ((L = I.getAttribute("data-item-code")) == null ? void 0 : L.trim()) || void 0;
2678
+ g.push({ label: Q, value: $, unit: Te, code: zt });
2679
2679
  }
2680
- }), h.parent) {
2681
- const I = g.element.style.width || "", x = g.element.style.fontSize || "", y = Ht(h.parent), v = y ? y.getOffsetY() : 0.1;
2680
+ }), u.parent) {
2681
+ const I = m.element.style.width || "", x = m.element.style.fontSize || "", y = Ut(u.parent), v = y ? y.getOffsetY() : 0.1;
2682
2682
  n.set(
2683
- h.parent.userData.id ? h.parent.userData.id : h.parent.uuid,
2683
+ u.parent.userData.id ? u.parent.userData.id : u.parent.uuid,
2684
2684
  {
2685
- title: ((d = f == null ? void 0 : f.textContent) == null ? void 0 : d.trim()) || "",
2686
- items: m,
2685
+ title: ((h = f == null ? void 0 : f.textContent) == null ? void 0 : h.trim()) || "",
2686
+ items: g,
2687
2687
  width: I,
2688
2688
  fontSize: x,
2689
2689
  offsetY: v
@@ -2692,24 +2692,24 @@ async function qo() {
2692
2692
  }
2693
2693
  }
2694
2694
  }
2695
- }), e.forEach((h) => r.remove(h));
2695
+ }), e.forEach((u) => r.remove(u));
2696
2696
  const s = r.clone();
2697
2697
  s.children = s.children.filter(
2698
- (h) => h.userData.type !== "initFloor"
2699
- ), s.traverse((h) => {
2700
- h.name && h.name.startsWith("DataPanel_") && h.parent && h.parent.remove(h);
2698
+ (u) => u.userData.type !== "initFloor"
2699
+ ), s.traverse((u) => {
2700
+ u.name && u.name.startsWith("DataPanel_") && u.parent && u.parent.remove(u);
2701
2701
  });
2702
2702
  const i = s.toJSON();
2703
- e.forEach((h) => r.add(h)), t.forEach((h, d) => {
2704
- d.userData.helper = h;
2703
+ e.forEach((u) => r.add(u)), t.forEach((u, h) => {
2704
+ h.userData.helper = u;
2705
2705
  });
2706
2706
  const o = {
2707
2707
  position: (A = b.camera) == null ? void 0 : A.position.toArray(),
2708
- rotation: (u = b.camera) == null ? void 0 : u.rotation.toArray(),
2708
+ rotation: (d = b.camera) == null ? void 0 : d.rotation.toArray(),
2709
2709
  target: ((c = b.orbitControls) == null ? void 0 : c.target.toArray()) || [0, 0, 0]
2710
2710
  }, a = {};
2711
- n.forEach((h, d) => {
2712
- a[d] = h;
2711
+ n.forEach((u, h) => {
2712
+ a[h] = u;
2713
2713
  });
2714
2714
  const l = JSON.stringify({
2715
2715
  scene: i,
@@ -2723,22 +2723,22 @@ function Vo(r, e = "edit", t) {
2723
2723
  var o, a, l;
2724
2724
  const n = typeof r == "string" ? JSON.parse(r) : r, i = new w.ObjectLoader().parse(n);
2725
2725
  i.type === "Scene" ? b.scene = i : (o = b.scene) == null || o.add(i), t && ((a = b.scene) == null || a.traverse((A) => {
2726
- const u = A.userData.id || A.uuid, c = t[u];
2726
+ const d = A.userData.id || A.uuid, c = t[d];
2727
2727
  if (c && A.userData.isMovable) {
2728
2728
  Lo(A);
2729
- const h = new ut({
2729
+ const u = new dt({
2730
2730
  title: c.title,
2731
2731
  items: c.items
2732
2732
  });
2733
- h.attachTo(A), h.visible = !1, c.width && h.setWidth(c.width), c.fontSize && h.setFontSize(c.fontSize), c.offsetY !== void 0 && h.setOffsetY(c.offsetY), ln(A, h);
2733
+ u.attachTo(A), u.visible = !1, c.width && u.setWidth(c.width), c.fontSize && u.setFontSize(c.fontSize), c.offsetY !== void 0 && u.setOffsetY(c.offsetY), ln(A, u);
2734
2734
  }
2735
2735
  })), e === "edit" && ((l = b.scene) == null || l.traverse((A) => {
2736
- var u;
2736
+ var d;
2737
2737
  if (A.type === "DirectionalLight") {
2738
2738
  const c = A;
2739
2739
  if (!c.userData.helper) {
2740
- const h = new w.DirectionalLightHelper(c, 1);
2741
- h.userData.type = "lightHelper", c.userData.helper = h, (u = b.scene) == null || u.add(h);
2740
+ const u = new w.DirectionalLightHelper(c, 1);
2741
+ u.userData.type = "lightHelper", c.userData.helper = u, (d = b.scene) == null || d.add(u);
2742
2742
  }
2743
2743
  }
2744
2744
  }));
@@ -2756,9 +2756,9 @@ function hn(r) {
2756
2756
  hn(t);
2757
2757
  }
2758
2758
  function Jo() {
2759
- kt !== null && (cancelAnimationFrame(kt), kt = null), at && b.container && (b.container.removeEventListener("click", at), at = null), lt && (window.removeEventListener("resize", lt), lt = null), b.orbitControls && (b.orbitControls.dispose(), b.orbitControls = null), b.transformControls && (b.transformControls.dispose(), b.transformControls = null), Ie && (Ie.dispose(), Ie = null, ye = null), b.scene && (hn(b.scene), b.scene = null), b.renderer && (b.renderer.dispose(), b.renderer.domElement && b.container && b.container.removeChild(b.renderer.domElement), b.renderer = null), fo(), b.camera = null, b.gridHelper = null, b.selectedObject = null, b.container = null, b.mode = "", xe = [], je.clear(), zt(), Rt = !1, We = !1;
2759
+ kt !== null && (cancelAnimationFrame(kt), kt = null), lt && b.container && (b.container.removeEventListener("click", lt), lt = null), At && (window.removeEventListener("resize", At), At = null), b.orbitControls && (b.orbitControls.dispose(), b.orbitControls = null), b.transformControls && (b.transformControls.dispose(), b.transformControls = null), Ie && (Ie.dispose(), Ie = null, ye = null), b.scene && (hn(b.scene), b.scene = null), b.renderer && (b.renderer.dispose(), b.renderer.domElement && b.container && b.container.removeChild(b.renderer.domElement), b.renderer = null), fo(), b.camera = null, b.gridHelper = null, b.selectedObject = null, b.container = null, b.mode = "", xe = [], je.clear(), Ht(), Rt = !1, We = !1;
2760
2760
  }
2761
- const Qo = /^[og]\s*(.+)?/, Yo = /^mtllib /, _o = /^usemtl /, $o = /^usemap /, Us = /\s+/, Hs = new T(), Vt = new T(), zs = new T(), Gs = new T(), te = new T(), vt = new B();
2761
+ const Qo = /^[og]\s*(.+)?/, Yo = /^mtllib /, _o = /^usemtl /, $o = /^usemap /, Us = /\s+/, Hs = new T(), Vt = new T(), zs = new T(), Gs = new T(), te = new T(), St = new B();
2762
2762
  function er() {
2763
2763
  const r = {
2764
2764
  objects: [],
@@ -2887,16 +2887,16 @@ function er() {
2887
2887
  this.object.geometry.uvs.push(t[e + 0], t[e + 1]);
2888
2888
  },
2889
2889
  addFace: function(e, t, n, s, i, o, a, l, A) {
2890
- const u = this.vertices.length;
2891
- let c = this.parseVertexIndex(e, u), h = this.parseVertexIndex(t, u), d = this.parseVertexIndex(n, u);
2892
- if (this.addVertex(c, h, d), this.addColor(c, h, d), a !== void 0 && a !== "") {
2893
- const g = this.normals.length;
2894
- c = this.parseNormalIndex(a, g), h = this.parseNormalIndex(l, g), d = this.parseNormalIndex(A, g), this.addNormal(c, h, d);
2890
+ const d = this.vertices.length;
2891
+ let c = this.parseVertexIndex(e, d), u = this.parseVertexIndex(t, d), h = this.parseVertexIndex(n, d);
2892
+ if (this.addVertex(c, u, h), this.addColor(c, u, h), a !== void 0 && a !== "") {
2893
+ const m = this.normals.length;
2894
+ c = this.parseNormalIndex(a, m), u = this.parseNormalIndex(l, m), h = this.parseNormalIndex(A, m), this.addNormal(c, u, h);
2895
2895
  } else
2896
- this.addFaceNormal(c, h, d);
2896
+ this.addFaceNormal(c, u, h);
2897
2897
  if (s !== void 0 && s !== "") {
2898
- const g = this.uvs.length;
2899
- c = this.parseUVIndex(s, g), h = this.parseUVIndex(i, g), d = this.parseUVIndex(o, g), this.addUV(c, h, d), this.object.geometry.hasUVIndices = !0;
2898
+ const m = this.uvs.length;
2899
+ c = this.parseUVIndex(s, m), u = this.parseUVIndex(i, m), h = this.parseUVIndex(o, m), this.addUV(c, u, h), this.object.geometry.hasUVIndices = !0;
2900
2900
  } else
2901
2901
  this.addDefaultUV();
2902
2902
  },
@@ -2938,7 +2938,7 @@ class tr extends us {
2938
2938
  * @param {onErrorCallback} onError - Executed when errors occur.
2939
2939
  */
2940
2940
  load(e, t, n, s) {
2941
- const i = this, o = new At(this.manager);
2941
+ const i = this, o = new ct(this.manager);
2942
2942
  o.setPath(this.path), o.setRequestHeader(this.requestHeader), o.setWithCredentials(this.withCredentials), o.load(e, function(a) {
2943
2943
  try {
2944
2944
  t(i.parse(a));
@@ -2974,9 +2974,9 @@ class tr extends us {
2974
2974
  for (let a = 0, l = n.length; a < l; a++) {
2975
2975
  const A = n[a].trimStart();
2976
2976
  if (A.length === 0) continue;
2977
- const u = A.charAt(0);
2978
- if (u !== "#")
2979
- if (u === "v") {
2977
+ const d = A.charAt(0);
2978
+ if (d !== "#")
2979
+ if (d === "v") {
2980
2980
  const c = A.split(Us);
2981
2981
  switch (c[0]) {
2982
2982
  case "v":
@@ -2984,12 +2984,12 @@ class tr extends us {
2984
2984
  parseFloat(c[1]),
2985
2985
  parseFloat(c[2]),
2986
2986
  parseFloat(c[3])
2987
- ), c.length >= 7 ? (vt.setRGB(
2987
+ ), c.length >= 7 ? (St.setRGB(
2988
2988
  parseFloat(c[4]),
2989
2989
  parseFloat(c[5]),
2990
2990
  parseFloat(c[6]),
2991
2991
  he
2992
- ), t.colors.push(vt.r, vt.g, vt.b)) : t.colors.push(void 0, void 0, void 0);
2992
+ ), t.colors.push(St.r, St.g, St.b)) : t.colors.push(void 0, void 0, void 0);
2993
2993
  break;
2994
2994
  case "vn":
2995
2995
  t.normals.push(
@@ -3005,45 +3005,45 @@ class tr extends us {
3005
3005
  );
3006
3006
  break;
3007
3007
  }
3008
- } else if (u === "f") {
3009
- const h = A.slice(1).trim().split(Us), d = [];
3010
- for (let f = 0, m = h.length; f < m; f++) {
3011
- const p = h[f];
3008
+ } else if (d === "f") {
3009
+ const u = A.slice(1).trim().split(Us), h = [];
3010
+ for (let f = 0, g = u.length; f < g; f++) {
3011
+ const p = u[f];
3012
3012
  if (p.length > 0) {
3013
3013
  const I = p.split("/");
3014
- d.push(I);
3014
+ h.push(I);
3015
3015
  }
3016
3016
  }
3017
- const g = d[0];
3018
- for (let f = 1, m = d.length - 1; f < m; f++) {
3019
- const p = d[f], I = d[f + 1];
3017
+ const m = h[0];
3018
+ for (let f = 1, g = h.length - 1; f < g; f++) {
3019
+ const p = h[f], I = h[f + 1];
3020
3020
  t.addFace(
3021
- g[0],
3021
+ m[0],
3022
3022
  p[0],
3023
3023
  I[0],
3024
- g[1],
3024
+ m[1],
3025
3025
  p[1],
3026
3026
  I[1],
3027
- g[2],
3027
+ m[2],
3028
3028
  p[2],
3029
3029
  I[2]
3030
3030
  );
3031
3031
  }
3032
- } else if (u === "l") {
3032
+ } else if (d === "l") {
3033
3033
  const c = A.substring(1).trim().split(" ");
3034
- let h = [];
3035
- const d = [];
3034
+ let u = [];
3035
+ const h = [];
3036
3036
  if (A.indexOf("/") === -1)
3037
- h = c;
3037
+ u = c;
3038
3038
  else
3039
- for (let g = 0, f = c.length; g < f; g++) {
3040
- const m = c[g].split("/");
3041
- m[0] !== "" && h.push(m[0]), m[1] !== "" && d.push(m[1]);
3039
+ for (let m = 0, f = c.length; m < f; m++) {
3040
+ const g = c[m].split("/");
3041
+ g[0] !== "" && u.push(g[0]), g[1] !== "" && h.push(g[1]);
3042
3042
  }
3043
- t.addLineGeometry(h, d);
3044
- } else if (u === "p") {
3045
- const h = A.slice(1).trim().split(" ");
3046
- t.addPointGeometry(h);
3043
+ t.addLineGeometry(u, h);
3044
+ } else if (d === "p") {
3045
+ const u = A.slice(1).trim().split(" ");
3046
+ t.addPointGeometry(u);
3047
3047
  } else if ((s = Qo.exec(A)) !== null) {
3048
3048
  const c = (" " + s[0].slice(1).trim()).slice(1);
3049
3049
  t.startObject(c);
@@ -3053,10 +3053,10 @@ class tr extends us {
3053
3053
  t.materialLibraries.push(A.substring(7).trim());
3054
3054
  else if ($o.test(A))
3055
3055
  console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');
3056
- else if (u === "s") {
3056
+ else if (d === "s") {
3057
3057
  if (s = A.split(" "), s.length > 1) {
3058
- const h = s[1].trim().toLowerCase();
3059
- t.object.smooth = h !== "0" && h !== "off";
3058
+ const u = s[1].trim().toLowerCase();
3059
+ t.object.smooth = u !== "0" && u !== "off";
3060
3060
  } else
3061
3061
  t.object.smooth = !0;
3062
3062
  const c = t.object.currentMaterial();
@@ -3070,35 +3070,35 @@ class tr extends us {
3070
3070
  const i = new Tt();
3071
3071
  if (i.materialLibraries = [].concat(t.materialLibraries), !(t.objects.length === 1 && t.objects[0].geometry.vertices.length === 0) === !0)
3072
3072
  for (let a = 0, l = t.objects.length; a < l; a++) {
3073
- const A = t.objects[a], u = A.geometry, c = A.materials, h = u.type === "Line", d = u.type === "Points";
3074
- let g = !1;
3075
- if (u.vertices.length === 0) continue;
3073
+ const A = t.objects[a], d = A.geometry, c = A.materials, u = d.type === "Line", h = d.type === "Points";
3074
+ let m = !1;
3075
+ if (d.vertices.length === 0) continue;
3076
3076
  const f = new De();
3077
- f.setAttribute("position", new le(u.vertices, 3)), u.normals.length > 0 && f.setAttribute("normal", new le(u.normals, 3)), u.colors.length > 0 && (g = !0, f.setAttribute("color", new le(u.colors, 3))), u.hasUVIndices === !0 && f.setAttribute("uv", new le(u.uvs, 2));
3078
- const m = [];
3077
+ f.setAttribute("position", new le(d.vertices, 3)), d.normals.length > 0 && f.setAttribute("normal", new le(d.normals, 3)), d.colors.length > 0 && (m = !0, f.setAttribute("color", new le(d.colors, 3))), d.hasUVIndices === !0 && f.setAttribute("uv", new le(d.uvs, 2));
3078
+ const g = [];
3079
3079
  for (let I = 0, x = c.length; I < x; I++) {
3080
- const y = c[I], v = y.name + "_" + y.smooth + "_" + g;
3080
+ const y = c[I], v = y.name + "_" + y.smooth + "_" + m;
3081
3081
  let M = t.materials[v];
3082
3082
  if (this.materials !== null) {
3083
- if (M = this.materials.create(y.name), h && M && !(M instanceof nt)) {
3084
- const L = new nt();
3085
- it.prototype.copy.call(L, M), L.color.copy(M.color), M = L;
3086
- } else if (d && M && !(M instanceof et)) {
3083
+ if (M = this.materials.create(y.name), u && M && !(M instanceof it)) {
3084
+ const L = new it();
3085
+ ot.prototype.copy.call(L, M), L.color.copy(M.color), M = L;
3086
+ } else if (h && M && !(M instanceof et)) {
3087
3087
  const L = new et({ size: 10, sizeAttenuation: !1 });
3088
- it.prototype.copy.call(L, M), L.color.copy(M.color), L.map = M.map, M = L;
3088
+ ot.prototype.copy.call(L, M), L.color.copy(M.color), L.map = M.map, M = L;
3089
3089
  }
3090
3090
  }
3091
- M === void 0 && (h ? M = new nt() : d ? M = new et({ size: 1, sizeAttenuation: !1 }) : M = new Jn(), M.name = y.name, M.flatShading = !y.smooth, M.vertexColors = g, t.materials[v] = M), m.push(M);
3091
+ M === void 0 && (u ? M = new it() : h ? M = new et({ size: 1, sizeAttenuation: !1 }) : M = new Jn(), M.name = y.name, M.flatShading = !y.smooth, M.vertexColors = m, t.materials[v] = M), g.push(M);
3092
3092
  }
3093
3093
  let p;
3094
- if (m.length > 1) {
3094
+ if (g.length > 1) {
3095
3095
  for (let I = 0, x = c.length; I < x; I++) {
3096
3096
  const y = c[I];
3097
3097
  f.addGroup(y.groupStart, y.groupCount, I);
3098
3098
  }
3099
- h ? p = new ss(f, m) : d ? p = new Mt(f, m) : p = new S(f, m);
3099
+ u ? p = new ss(f, g) : h ? p = new Mt(f, g) : p = new S(f, g);
3100
3100
  } else
3101
- h ? p = new ss(f, m[0]) : d ? p = new Mt(f, m[0]) : p = new S(f, m[0]);
3101
+ u ? p = new ss(f, g[0]) : h ? p = new Mt(f, g[0]) : p = new S(f, g[0]);
3102
3102
  p.name = A.name, i.add(p);
3103
3103
  }
3104
3104
  else if (t.vertices.length > 0) {
@@ -3214,21 +3214,21 @@ class nr extends us {
3214
3214
  if (this.resourcePath !== "")
3215
3215
  o = this.resourcePath;
3216
3216
  else if (this.path !== "") {
3217
- const A = ot.extractUrlBase(e);
3218
- o = ot.resolveURL(A, this.path);
3217
+ const A = rt.extractUrlBase(e);
3218
+ o = rt.resolveURL(A, this.path);
3219
3219
  } else
3220
- o = ot.extractUrlBase(e);
3220
+ o = rt.extractUrlBase(e);
3221
3221
  this.manager.itemStart(e);
3222
3222
  const a = function(A) {
3223
3223
  s ? s(A) : console.error(A), i.manager.itemError(e), i.manager.itemEnd(e);
3224
- }, l = new At(this.manager);
3224
+ }, l = new ct(this.manager);
3225
3225
  l.setPath(this.path), l.setResponseType("arraybuffer"), l.setRequestHeader(this.requestHeader), l.setWithCredentials(this.withCredentials), l.load(e, function(A) {
3226
3226
  try {
3227
- i.parse(A, o, function(u) {
3228
- t(u), i.manager.itemEnd(e);
3227
+ i.parse(A, o, function(d) {
3228
+ t(d), i.manager.itemEnd(e);
3229
3229
  }, a);
3230
- } catch (u) {
3231
- a(u);
3230
+ } catch (d) {
3231
+ a(d);
3232
3232
  }
3233
3233
  }, n, a);
3234
3234
  }
@@ -3321,13 +3321,13 @@ class nr extends us {
3321
3321
  meshoptDecoder: this.meshoptDecoder
3322
3322
  });
3323
3323
  A.fileLoader.setRequestHeader(this.requestHeader);
3324
- for (let u = 0; u < this.pluginCallbacks.length; u++) {
3325
- const c = this.pluginCallbacks[u](A);
3324
+ for (let d = 0; d < this.pluginCallbacks.length; d++) {
3325
+ const c = this.pluginCallbacks[d](A);
3326
3326
  c.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), a[c.name] = c, o[c.name] = !0;
3327
3327
  }
3328
3328
  if (i.extensionsUsed)
3329
- for (let u = 0; u < i.extensionsUsed.length; ++u) {
3330
- const c = i.extensionsUsed[u], h = i.extensionsRequired || [];
3329
+ for (let d = 0; d < i.extensionsUsed.length; ++d) {
3330
+ const c = i.extensionsUsed[d], u = i.extensionsRequired || [];
3331
3331
  switch (c) {
3332
3332
  case E.KHR_MATERIALS_UNLIT:
3333
3333
  o[c] = new rr();
@@ -3342,7 +3342,7 @@ class nr extends us {
3342
3342
  o[c] = new Tr();
3343
3343
  break;
3344
3344
  default:
3345
- h.indexOf(c) >= 0 && a[c] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + c + '".');
3345
+ u.indexOf(c) >= 0 && a[c] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + c + '".');
3346
3346
  }
3347
3347
  }
3348
3348
  A.setExtensions(o), A.setPlugins(a), A.parse(n, s);
@@ -3425,18 +3425,18 @@ class or {
3425
3425
  if (s) return s;
3426
3426
  const i = t.json, l = ((i.extensions && i.extensions[this.name] || {}).lights || [])[e];
3427
3427
  let A;
3428
- const u = new B(16777215);
3429
- l.color !== void 0 && u.setRGB(l.color[0], l.color[1], l.color[2], Ae);
3428
+ const d = new B(16777215);
3429
+ l.color !== void 0 && d.setRGB(l.color[0], l.color[1], l.color[2], Ae);
3430
3430
  const c = l.range !== void 0 ? l.range : 0;
3431
3431
  switch (l.type) {
3432
3432
  case "directional":
3433
- A = new $n(u), A.target.position.set(0, 0, -1), A.add(A.target);
3433
+ A = new $n(d), A.target.position.set(0, 0, -1), A.add(A.target);
3434
3434
  break;
3435
3435
  case "point":
3436
- A = new _n(u), A.distance = c;
3436
+ A = new _n(d), A.distance = c;
3437
3437
  break;
3438
3438
  case "spot":
3439
- A = new Yn(u), A.distance = c, 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, A.angle = l.spot.outerConeAngle, A.penumbra = 1 - l.spot.innerConeAngle / l.spot.outerConeAngle, A.target.position.set(0, 0, -1), A.add(A.target);
3439
+ A = new Yn(d), A.distance = c, 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, A.angle = l.spot.outerConeAngle, A.penumbra = 1 - l.spot.innerConeAngle / l.spot.outerConeAngle, A.target.position.set(0, 0, -1), A.add(A.target);
3440
3440
  break;
3441
3441
  default:
3442
3442
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + l.type);
@@ -3697,12 +3697,12 @@ class Bs {
3697
3697
  return null;
3698
3698
  }
3699
3699
  return i.then(function(a) {
3700
- const l = s.byteOffset || 0, A = s.byteLength || 0, u = s.count, c = s.byteStride, h = new Uint8Array(a, l, A);
3701
- return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(u, c, h, s.mode, s.filter).then(function(d) {
3702
- return d.buffer;
3700
+ const l = s.byteOffset || 0, A = s.byteLength || 0, d = s.count, c = s.byteStride, u = new Uint8Array(a, l, A);
3701
+ return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(d, c, u, s.mode, s.filter).then(function(h) {
3702
+ return h.buffer;
3703
3703
  }) : o.ready.then(function() {
3704
- const d = new ArrayBuffer(u * c);
3705
- return o.decodeGltfBuffer(new Uint8Array(d), u, c, h, s.mode, s.filter), d;
3704
+ const h = new ArrayBuffer(d * c);
3705
+ return o.decodeGltfBuffer(new Uint8Array(h), d, c, u, s.mode, s.filter), h;
3706
3706
  });
3707
3707
  });
3708
3708
  } else
@@ -3723,21 +3723,21 @@ class yr {
3723
3723
  return null;
3724
3724
  const o = n.extensions[this.name].attributes, a = [], l = {};
3725
3725
  for (const A in o)
3726
- a.push(this.parser.getDependency("accessor", o[A]).then((u) => (l[A] = u, l[A])));
3726
+ a.push(this.parser.getDependency("accessor", o[A]).then((d) => (l[A] = d, l[A])));
3727
3727
  return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(e)), Promise.all(a).then((A) => {
3728
- const u = A.pop(), c = u.isGroup ? u.children : [u], h = A[0].count, d = [];
3729
- for (const g of c) {
3730
- const f = new fe(), m = new T(), p = new V(), I = new T(1, 1, 1), x = new ei(g.geometry, g.material, h);
3731
- for (let y = 0; y < h; y++)
3732
- l.TRANSLATION && m.fromBufferAttribute(l.TRANSLATION, y), l.ROTATION && p.fromBufferAttribute(l.ROTATION, y), l.SCALE && I.fromBufferAttribute(l.SCALE, y), x.setMatrixAt(y, f.compose(m, p, I));
3728
+ const d = A.pop(), c = d.isGroup ? d.children : [d], u = A[0].count, h = [];
3729
+ for (const m of c) {
3730
+ const f = new fe(), g = new T(), p = new J(), I = new T(1, 1, 1), x = new ei(m.geometry, m.material, u);
3731
+ for (let y = 0; y < u; y++)
3732
+ l.TRANSLATION && g.fromBufferAttribute(l.TRANSLATION, y), l.ROTATION && p.fromBufferAttribute(l.ROTATION, y), l.SCALE && I.fromBufferAttribute(l.SCALE, y), x.setMatrixAt(y, f.compose(g, p, I));
3733
3733
  for (const y in l)
3734
3734
  if (y === "_COLOR_0") {
3735
3735
  const v = l[y];
3736
3736
  x.instanceColor = new ti(v.array, v.itemSize, v.normalized);
3737
- } else y !== "TRANSLATION" && y !== "ROTATION" && y !== "SCALE" && g.geometry.setAttribute(y, l[y]);
3738
- Ze.prototype.copy.call(x, g), this.parser.assignFinalMaterial(x), d.push(x);
3737
+ } else y !== "TRANSLATION" && y !== "ROTATION" && y !== "SCALE" && m.geometry.setAttribute(y, l[y]);
3738
+ Ze.prototype.copy.call(x, m), this.parser.assignFinalMaterial(x), h.push(x);
3739
3739
  }
3740
- return u.isGroup ? (u.clear(), u.add(...d), u) : d[0];
3740
+ return d.isGroup ? (d.clear(), d.add(...h), d) : h[0];
3741
3741
  }));
3742
3742
  }
3743
3743
  }
@@ -3781,26 +3781,26 @@ class vr {
3781
3781
  }
3782
3782
  decodePrimitive(e, t) {
3783
3783
  const n = this.json, s = this.dracoLoader, i = e.extensions[this.name].bufferView, o = e.extensions[this.name].attributes, a = {}, l = {}, A = {};
3784
- for (const u in o) {
3785
- const c = ls[u] || u.toLowerCase();
3786
- a[c] = o[u];
3784
+ for (const d in o) {
3785
+ const c = ls[d] || d.toLowerCase();
3786
+ a[c] = o[d];
3787
3787
  }
3788
- for (const u in e.attributes) {
3789
- const c = ls[u] || u.toLowerCase();
3790
- if (o[u] !== void 0) {
3791
- const h = n.accessors[e.attributes[u]], d = Be[h.componentType];
3792
- A[c] = d.name, l[c] = h.normalized === !0;
3788
+ for (const d in e.attributes) {
3789
+ const c = ls[d] || d.toLowerCase();
3790
+ if (o[d] !== void 0) {
3791
+ const u = n.accessors[e.attributes[d]], h = Be[u.componentType];
3792
+ A[c] = h.name, l[c] = u.normalized === !0;
3793
3793
  }
3794
3794
  }
3795
- return t.getDependency("bufferView", i).then(function(u) {
3796
- return new Promise(function(c, h) {
3797
- s.decodeDracoFile(u, function(d) {
3798
- for (const g in d.attributes) {
3799
- const f = d.attributes[g], m = l[g];
3800
- m !== void 0 && (f.normalized = m);
3795
+ return t.getDependency("bufferView", i).then(function(d) {
3796
+ return new Promise(function(c, u) {
3797
+ s.decodeDracoFile(d, function(h) {
3798
+ for (const m in h.attributes) {
3799
+ const f = h.attributes[m], g = l[m];
3800
+ g !== void 0 && (f.normalized = g);
3801
3801
  }
3802
- c(d);
3803
- }, a, A, Ae, h);
3802
+ c(h);
3803
+ }, a, A, Ae, u);
3804
3804
  });
3805
3805
  });
3806
3806
  }
@@ -3829,15 +3829,15 @@ class mn extends bi {
3829
3829
  return t;
3830
3830
  }
3831
3831
  interpolate_(e, t, n, s) {
3832
- const i = this.resultBuffer, o = this.sampleValues, a = this.valueSize, l = a * 2, A = a * 3, u = s - t, c = (n - t) / u, h = c * c, d = h * c, g = e * A, f = g - A, m = -2 * d + 3 * h, p = d - h, I = 1 - m, x = p - h + c;
3832
+ const i = this.resultBuffer, o = this.sampleValues, a = this.valueSize, l = a * 2, A = a * 3, d = s - t, c = (n - t) / d, u = c * c, h = u * c, m = e * A, f = m - A, g = -2 * h + 3 * u, p = h - u, I = 1 - g, x = p - u + c;
3833
3833
  for (let y = 0; y !== a; y++) {
3834
- const v = o[f + y + a], M = o[f + y + l] * u, L = o[g + y + a], Q = o[g + y] * u;
3835
- i[y] = I * v + x * M + m * L + p * Q;
3834
+ const v = o[f + y + a], M = o[f + y + l] * d, L = o[m + y + a], Q = o[m + y] * d;
3835
+ i[y] = I * v + x * M + g * L + p * Q;
3836
3836
  }
3837
3837
  return i;
3838
3838
  }
3839
3839
  }
3840
- const Mr = new V();
3840
+ const Mr = new J();
3841
3841
  class wr extends mn {
3842
3842
  interpolate_(e, t, n, s) {
3843
3843
  const i = super.interpolate_(e, t, n, s);
@@ -3925,25 +3925,25 @@ function ae(r, e) {
3925
3925
  }
3926
3926
  function kr(r, e, t) {
3927
3927
  let n = !1, s = !1, i = !1;
3928
- for (let A = 0, u = e.length; A < u; A++) {
3928
+ for (let A = 0, d = e.length; A < d; A++) {
3929
3929
  const c = e[A];
3930
3930
  if (c.POSITION !== void 0 && (n = !0), c.NORMAL !== void 0 && (s = !0), c.COLOR_0 !== void 0 && (i = !0), n && s && i) break;
3931
3931
  }
3932
3932
  if (!n && !s && !i) return Promise.resolve(r);
3933
3933
  const o = [], a = [], l = [];
3934
- for (let A = 0, u = e.length; A < u; A++) {
3934
+ for (let A = 0, d = e.length; A < d; A++) {
3935
3935
  const c = e[A];
3936
3936
  if (n) {
3937
- const h = c.POSITION !== void 0 ? t.getDependency("accessor", c.POSITION) : r.attributes.position;
3938
- o.push(h);
3937
+ const u = c.POSITION !== void 0 ? t.getDependency("accessor", c.POSITION) : r.attributes.position;
3938
+ o.push(u);
3939
3939
  }
3940
3940
  if (s) {
3941
- const h = c.NORMAL !== void 0 ? t.getDependency("accessor", c.NORMAL) : r.attributes.normal;
3942
- a.push(h);
3941
+ const u = c.NORMAL !== void 0 ? t.getDependency("accessor", c.NORMAL) : r.attributes.normal;
3942
+ a.push(u);
3943
3943
  }
3944
3944
  if (i) {
3945
- const h = c.COLOR_0 !== void 0 ? t.getDependency("accessor", c.COLOR_0) : r.attributes.color;
3946
- l.push(h);
3945
+ const u = c.COLOR_0 !== void 0 ? t.getDependency("accessor", c.COLOR_0) : r.attributes.color;
3946
+ l.push(u);
3947
3947
  }
3948
3948
  }
3949
3949
  return Promise.all([
@@ -3951,8 +3951,8 @@ function kr(r, e, t) {
3951
3951
  Promise.all(a),
3952
3952
  Promise.all(l)
3953
3953
  ]).then(function(A) {
3954
- const u = A[0], c = A[1], h = A[2];
3955
- return n && (r.morphAttributes.position = u), s && (r.morphAttributes.normal = c), i && (r.morphAttributes.color = h), r.morphTargetsRelative = !0, r;
3954
+ const d = A[0], c = A[1], u = A[2];
3955
+ return n && (r.morphAttributes.position = d), s && (r.morphAttributes.normal = c), i && (r.morphAttributes.color = u), r.morphTargetsRelative = !0, r;
3956
3956
  });
3957
3957
  }
3958
3958
  function Pr(r, e) {
@@ -4012,7 +4012,7 @@ class Dr {
4012
4012
  const l = a.match(/Version\/(\d+)/);
4013
4013
  s = n && l ? parseInt(l[1], 10) : -1, i = a.indexOf("Firefox") > -1, o = i ? a.match(/Firefox\/([0-9]+)\./)[1] : -1;
4014
4014
  }
4015
- typeof createImageBitmap > "u" || n && s < 17 || i && o < 98 ? this.textureLoader = new si(this.options.manager) : this.textureLoader = new ni(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new At(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
4015
+ typeof createImageBitmap > "u" || n && s < 17 || i && o < 98 ? this.textureLoader = new si(this.options.manager) : this.textureLoader = new ni(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new ct(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
4016
4016
  }
4017
4017
  setExtensions(e) {
4018
4018
  this.extensions = e;
@@ -4098,8 +4098,8 @@ class Dr {
4098
4098
  const s = n.clone(), i = (o, a) => {
4099
4099
  const l = this.associations.get(o);
4100
4100
  l != null && this.associations.set(a, l);
4101
- for (const [A, u] of o.children.entries())
4102
- i(u, a.children[A]);
4101
+ for (const [A, d] of o.children.entries())
4102
+ i(d, a.children[A]);
4103
4103
  };
4104
4104
  return i(n, s), s.name += "_instance_" + e.uses[t]++, s;
4105
4105
  }
@@ -4223,7 +4223,7 @@ class Dr {
4223
4223
  return Promise.resolve(this.extensions[E.KHR_BINARY_GLTF].body);
4224
4224
  const s = this.options;
4225
4225
  return new Promise(function(i, o) {
4226
- n.load(ot.resolveURL(t.uri, s.path), i, void 0, function() {
4226
+ n.load(rt.resolveURL(t.uri, s.path), i, void 0, function() {
4227
4227
  o(new Error('THREE.GLTFLoader: Failed to load buffer "' + t.uri + '".'));
4228
4228
  });
4229
4229
  });
@@ -4253,28 +4253,28 @@ class Dr {
4253
4253
  const t = this, n = this.json, s = this.json.accessors[e];
4254
4254
  if (s.bufferView === void 0 && s.sparse === void 0) {
4255
4255
  const o = Jt[s.type], a = Be[s.componentType], l = s.normalized === !0, A = new a(s.count * o);
4256
- return Promise.resolve(new rt(A, o, l));
4256
+ return Promise.resolve(new at(A, o, l));
4257
4257
  }
4258
4258
  const i = [];
4259
4259
  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) {
4260
- const a = o[0], l = Jt[s.type], A = Be[s.componentType], u = A.BYTES_PER_ELEMENT, c = u * l, h = s.byteOffset || 0, d = s.bufferView !== void 0 ? n.bufferViews[s.bufferView].byteStride : void 0, g = s.normalized === !0;
4261
- let f, m;
4262
- if (d && d !== c) {
4263
- const p = Math.floor(h / d), I = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + p + ":" + s.count;
4260
+ const a = o[0], l = Jt[s.type], A = Be[s.componentType], d = A.BYTES_PER_ELEMENT, c = d * l, u = s.byteOffset || 0, h = s.bufferView !== void 0 ? n.bufferViews[s.bufferView].byteStride : void 0, m = s.normalized === !0;
4261
+ let f, g;
4262
+ if (h && h !== c) {
4263
+ const p = Math.floor(u / h), I = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + p + ":" + s.count;
4264
4264
  let x = t.cache.get(I);
4265
- x || (f = new A(a, p * d, s.count * d / u), x = new $s(f, d / u), t.cache.add(I, x)), m = new en(x, l, h % d / u, g);
4265
+ x || (f = new A(a, p * h, s.count * h / d), x = new $s(f, h / d), t.cache.add(I, x)), g = new en(x, l, u % h / d, m);
4266
4266
  } else
4267
- a === null ? f = new A(s.count * l) : f = new A(a, h, s.count * l), m = new rt(f, l, g);
4267
+ a === null ? f = new A(s.count * l) : f = new A(a, u, s.count * l), g = new at(f, l, m);
4268
4268
  if (s.sparse !== void 0) {
4269
4269
  const p = Jt.SCALAR, I = Be[s.sparse.indices.componentType], x = s.sparse.indices.byteOffset || 0, y = s.sparse.values.byteOffset || 0, v = new I(o[1], x, s.sparse.count * p), M = new A(o[2], y, s.sparse.count * l);
4270
- a !== null && (m = new rt(m.array.slice(), m.itemSize, m.normalized)), m.normalized = !1;
4270
+ a !== null && (g = new at(g.array.slice(), g.itemSize, g.normalized)), g.normalized = !1;
4271
4271
  for (let L = 0, Q = v.length; L < Q; L++) {
4272
4272
  const $ = v[L];
4273
- if (m.setX($, M[L * l]), l >= 2 && m.setY($, M[L * l + 1]), l >= 3 && m.setZ($, M[L * l + 2]), l >= 4 && m.setW($, M[L * l + 3]), l >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
4273
+ if (g.setX($, M[L * l]), l >= 2 && g.setY($, M[L * l + 1]), l >= 3 && g.setZ($, M[L * l + 2]), l >= 4 && g.setW($, M[L * l + 3]), l >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
4274
4274
  }
4275
- m.normalized = g;
4275
+ g.normalized = m;
4276
4276
  }
4277
- return m;
4277
+ return g;
4278
4278
  });
4279
4279
  }
4280
4280
  /**
@@ -4297,10 +4297,10 @@ class Dr {
4297
4297
  const s = this, i = this.json, o = i.textures[e], a = i.images[t], l = (a.uri || a.bufferView) + ":" + o.sampler;
4298
4298
  if (this.textureCache[l])
4299
4299
  return this.textureCache[l];
4300
- const A = this.loadImageSource(t, n).then(function(u) {
4301
- u.flipY = !1, u.name = o.name || a.name || "", u.name === "" && typeof a.uri == "string" && a.uri.startsWith("data:image/") === !1 && (u.name = a.uri);
4302
- const h = (i.samplers || {})[o.sampler] || {};
4303
- return u.magFilter = Xs[h.magFilter] || is, u.minFilter = Xs[h.minFilter] || tn, u.wrapS = qs[h.wrapS] || os, u.wrapT = qs[h.wrapT] || os, u.generateMipmaps = !u.isCompressedTexture && u.minFilter !== sn && u.minFilter !== is, s.associations.set(u, { textures: e }), u;
4300
+ const A = this.loadImageSource(t, n).then(function(d) {
4301
+ 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);
4302
+ const u = (i.samplers || {})[o.sampler] || {};
4303
+ return d.magFilter = Xs[u.magFilter] || is, d.minFilter = Xs[u.minFilter] || tn, d.wrapS = qs[u.wrapS] || os, d.wrapT = qs[u.wrapT] || os, d.generateMipmaps = !d.isCompressedTexture && d.minFilter !== sn && d.minFilter !== is, s.associations.set(d, { textures: e }), d;
4304
4304
  }).catch(function() {
4305
4305
  return null;
4306
4306
  });
@@ -4315,25 +4315,25 @@ class Dr {
4315
4315
  if (o.bufferView !== void 0)
4316
4316
  l = n.getDependency("bufferView", o.bufferView).then(function(c) {
4317
4317
  A = !0;
4318
- const h = new Blob([c], { type: o.mimeType });
4319
- return l = a.createObjectURL(h), l;
4318
+ const u = new Blob([c], { type: o.mimeType });
4319
+ return l = a.createObjectURL(u), l;
4320
4320
  });
4321
4321
  else if (o.uri === void 0)
4322
4322
  throw new Error("THREE.GLTFLoader: Image " + e + " is missing URI and bufferView");
4323
- const u = Promise.resolve(l).then(function(c) {
4324
- return new Promise(function(h, d) {
4325
- let g = h;
4326
- t.isImageBitmapLoader === !0 && (g = function(f) {
4327
- const m = new Is(f);
4328
- m.needsUpdate = !0, h(m);
4329
- }), t.load(ot.resolveURL(c, i.path), g, void 0, d);
4323
+ const d = Promise.resolve(l).then(function(c) {
4324
+ return new Promise(function(u, h) {
4325
+ let m = u;
4326
+ t.isImageBitmapLoader === !0 && (m = function(f) {
4327
+ const g = new Is(f);
4328
+ g.needsUpdate = !0, u(g);
4329
+ }), t.load(rt.resolveURL(c, i.path), m, void 0, h);
4330
4330
  });
4331
4331
  }).then(function(c) {
4332
4332
  return A === !0 && a.revokeObjectURL(l), ae(c, o), c.userData.mimeType = o.mimeType || Nr(o.uri), c;
4333
4333
  }).catch(function(c) {
4334
4334
  throw console.error("THREE.GLTFLoader: Couldn't load texture", l), c;
4335
4335
  });
4336
- return this.sourceCache[e] = u, u;
4336
+ return this.sourceCache[e] = d, d;
4337
4337
  }
4338
4338
  /**
4339
4339
  * Asynchronously assigns a texture to the given material parameters.
@@ -4376,11 +4376,11 @@ class Dr {
4376
4376
  if (e.isPoints) {
4377
4377
  const a = "PointsMaterial:" + n.uuid;
4378
4378
  let l = this.cache.get(a);
4379
- l || (l = new et(), it.prototype.copy.call(l, n), l.color.copy(n.color), l.map = n.map, l.sizeAttenuation = !1, this.cache.add(a, l)), n = l;
4379
+ l || (l = new et(), ot.prototype.copy.call(l, n), l.color.copy(n.color), l.map = n.map, l.sizeAttenuation = !1, this.cache.add(a, l)), n = l;
4380
4380
  } else if (e.isLine) {
4381
4381
  const a = "LineBasicMaterial:" + n.uuid;
4382
4382
  let l = this.cache.get(a);
4383
- l || (l = new nt(), it.prototype.copy.call(l, n), l.color.copy(n.color), l.map = n.map, this.cache.add(a, l)), n = l;
4383
+ l || (l = new it(), ot.prototype.copy.call(l, n), l.color.copy(n.color), l.map = n.map, this.cache.add(a, l)), n = l;
4384
4384
  }
4385
4385
  if (s || i || o) {
4386
4386
  let a = "ClonedMaterial:" + n.uuid + ":";
@@ -4410,18 +4410,18 @@ class Dr {
4410
4410
  } else {
4411
4411
  const c = i.pbrMetallicRoughness || {};
4412
4412
  if (a.color = new B(1, 1, 1), a.opacity = 1, Array.isArray(c.baseColorFactor)) {
4413
- const h = c.baseColorFactor;
4414
- a.color.setRGB(h[0], h[1], h[2], Ae), a.opacity = h[3];
4413
+ const u = c.baseColorFactor;
4414
+ a.color.setRGB(u[0], u[1], u[2], Ae), a.opacity = u[3];
4415
4415
  }
4416
- c.baseColorTexture !== void 0 && A.push(t.assignTexture(a, "map", c.baseColorTexture, he)), a.metalness = c.metallicFactor !== void 0 ? c.metallicFactor : 1, a.roughness = c.roughnessFactor !== void 0 ? c.roughnessFactor : 1, c.metallicRoughnessTexture !== void 0 && (A.push(t.assignTexture(a, "metalnessMap", c.metallicRoughnessTexture)), A.push(t.assignTexture(a, "roughnessMap", c.metallicRoughnessTexture))), o = this._invokeOne(function(h) {
4417
- return h.getMaterialType && h.getMaterialType(e);
4418
- }), A.push(Promise.all(this._invokeAll(function(h) {
4419
- return h.extendMaterialParams && h.extendMaterialParams(e, a);
4416
+ c.baseColorTexture !== void 0 && A.push(t.assignTexture(a, "map", c.baseColorTexture, he)), a.metalness = c.metallicFactor !== void 0 ? c.metallicFactor : 1, a.roughness = c.roughnessFactor !== void 0 ? c.roughnessFactor : 1, c.metallicRoughnessTexture !== void 0 && (A.push(t.assignTexture(a, "metalnessMap", c.metallicRoughnessTexture)), A.push(t.assignTexture(a, "roughnessMap", c.metallicRoughnessTexture))), o = this._invokeOne(function(u) {
4417
+ return u.getMaterialType && u.getMaterialType(e);
4418
+ }), A.push(Promise.all(this._invokeAll(function(u) {
4419
+ return u.extendMaterialParams && u.extendMaterialParams(e, a);
4420
4420
  })));
4421
4421
  }
4422
- i.doubleSided === !0 && (a.side = Lt);
4423
- const u = i.alphaMode || Qt.OPAQUE;
4424
- if (u === Qt.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, u === Qt.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== Ne && (A.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new F(1, 1), i.normalTexture.scale !== void 0)) {
4422
+ i.doubleSided === !0 && (a.side = Pt);
4423
+ const d = i.alphaMode || Qt.OPAQUE;
4424
+ if (d === Qt.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, d === Qt.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== Ne && (A.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new F(1, 1), i.normalTexture.scale !== void 0)) {
4425
4425
  const c = i.normalTexture.scale;
4426
4426
  a.normalScale.set(c, c);
4427
4427
  }
@@ -4463,12 +4463,12 @@ class Dr {
4463
4463
  }
4464
4464
  const o = [];
4465
4465
  for (let a = 0, l = e.length; a < l; a++) {
4466
- const A = e[a], u = Lr(A), c = s[u];
4466
+ const A = e[a], d = Lr(A), c = s[d];
4467
4467
  if (c)
4468
4468
  o.push(c.promise);
4469
4469
  else {
4470
- let h;
4471
- A.extensions && A.extensions[E.KHR_DRACO_MESH_COMPRESSION] ? h = i(A) : h = Vs(new De(), A, t), s[u] = { primitive: A, promise: h }, o.push(h);
4470
+ let u;
4471
+ A.extensions && A.extensions[E.KHR_DRACO_MESH_COMPRESSION] ? u = i(A) : u = Vs(new De(), A, t), s[d] = { primitive: A, promise: u }, o.push(u);
4472
4472
  }
4473
4473
  }
4474
4474
  return Promise.all(o);
@@ -4483,41 +4483,41 @@ class Dr {
4483
4483
  loadMesh(e) {
4484
4484
  const t = this, n = this.json, s = this.extensions, i = n.meshes[e], o = i.primitives, a = [];
4485
4485
  for (let l = 0, A = o.length; l < A; l++) {
4486
- const u = o[l].material === void 0 ? Er(this.cache) : this.getDependency("material", o[l].material);
4487
- a.push(u);
4486
+ const d = o[l].material === void 0 ? Er(this.cache) : this.getDependency("material", o[l].material);
4487
+ a.push(d);
4488
4488
  }
4489
4489
  return a.push(t.loadGeometries(o)), Promise.all(a).then(function(l) {
4490
- const A = l.slice(0, l.length - 1), u = l[l.length - 1], c = [];
4491
- for (let d = 0, g = u.length; d < g; d++) {
4492
- const f = u[d], m = o[d];
4490
+ const A = l.slice(0, l.length - 1), d = l[l.length - 1], c = [];
4491
+ for (let h = 0, m = d.length; h < m; h++) {
4492
+ const f = d[h], g = o[h];
4493
4493
  let p;
4494
- const I = A[d];
4495
- if (m.mode === se.TRIANGLES || m.mode === se.TRIANGLE_STRIP || m.mode === se.TRIANGLE_FAN || m.mode === void 0)
4496
- p = i.isSkinnedMesh === !0 ? new ci(f, I) : new S(f, I), p.isSkinnedMesh === !0 && p.normalizeSkinWeights(), m.mode === se.TRIANGLE_STRIP ? p.geometry = Ks(p.geometry, _s) : m.mode === se.TRIANGLE_FAN && (p.geometry = Ks(p.geometry, ns));
4497
- else if (m.mode === se.LINES)
4494
+ const I = A[h];
4495
+ if (g.mode === se.TRIANGLES || g.mode === se.TRIANGLE_STRIP || g.mode === se.TRIANGLE_FAN || g.mode === void 0)
4496
+ p = i.isSkinnedMesh === !0 ? new ci(f, I) : new S(f, I), p.isSkinnedMesh === !0 && p.normalizeSkinWeights(), g.mode === se.TRIANGLE_STRIP ? p.geometry = Ks(p.geometry, _s) : g.mode === se.TRIANGLE_FAN && (p.geometry = Ks(p.geometry, ns));
4497
+ else if (g.mode === se.LINES)
4498
4498
  p = new ss(f, I);
4499
- else if (m.mode === se.LINE_STRIP)
4499
+ else if (g.mode === se.LINE_STRIP)
4500
4500
  p = new de(f, I);
4501
- else if (m.mode === se.LINE_LOOP)
4501
+ else if (g.mode === se.LINE_LOOP)
4502
4502
  p = new ui(f, I);
4503
- else if (m.mode === se.POINTS)
4503
+ else if (g.mode === se.POINTS)
4504
4504
  p = new Mt(f, I);
4505
4505
  else
4506
- throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + m.mode);
4507
- Object.keys(p.geometry.morphAttributes).length > 0 && Pr(p, i), p.name = t.createUniqueName(i.name || "mesh_" + e), ae(p, i), m.extensions && we(s, p, m), t.assignFinalMaterial(p), c.push(p);
4506
+ throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + g.mode);
4507
+ Object.keys(p.geometry.morphAttributes).length > 0 && Pr(p, i), p.name = t.createUniqueName(i.name || "mesh_" + e), ae(p, i), g.extensions && we(s, p, g), t.assignFinalMaterial(p), c.push(p);
4508
4508
  }
4509
- for (let d = 0, g = c.length; d < g; d++)
4510
- t.associations.set(c[d], {
4509
+ for (let h = 0, m = c.length; h < m; h++)
4510
+ t.associations.set(c[h], {
4511
4511
  meshes: e,
4512
- primitives: d
4512
+ primitives: h
4513
4513
  });
4514
4514
  if (c.length === 1)
4515
4515
  return i.extensions && we(s, c[0], i), c[0];
4516
- const h = new Tt();
4517
- i.extensions && we(s, h, i), t.associations.set(h, { meshes: e });
4518
- for (let d = 0, g = c.length; d < g; d++)
4519
- h.add(c[d]);
4520
- return h;
4516
+ const u = new Tt();
4517
+ i.extensions && we(s, u, i), t.associations.set(u, { meshes: e });
4518
+ for (let h = 0, m = c.length; h < m; h++)
4519
+ u.add(c[h]);
4520
+ return u;
4521
4521
  });
4522
4522
  }
4523
4523
  /**
@@ -4549,12 +4549,12 @@ class Dr {
4549
4549
  n.push(this._loadNodeShallow(t.joints[s]));
4550
4550
  return t.inverseBindMatrices !== void 0 ? n.push(this.getDependency("accessor", t.inverseBindMatrices)) : n.push(null), Promise.all(n).then(function(s) {
4551
4551
  const i = s.pop(), o = s, a = [], l = [];
4552
- for (let A = 0, u = o.length; A < u; A++) {
4552
+ for (let A = 0, d = o.length; A < d; A++) {
4553
4553
  const c = o[A];
4554
4554
  if (c) {
4555
4555
  a.push(c);
4556
- const h = new fe();
4557
- i !== null && h.fromArray(i.array, A * 16), l.push(h);
4556
+ const u = new fe();
4557
+ i !== null && u.fromArray(i.array, A * 16), l.push(u);
4558
4558
  } else
4559
4559
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', t.joints[A]);
4560
4560
  }
@@ -4569,21 +4569,21 @@ class Dr {
4569
4569
  * @return {Promise<AnimationClip>}
4570
4570
  */
4571
4571
  loadAnimation(e) {
4572
- const t = this.json, n = this, s = t.animations[e], i = s.name ? s.name : "animation_" + e, o = [], a = [], l = [], A = [], u = [];
4573
- for (let c = 0, h = s.channels.length; c < h; c++) {
4574
- const d = s.channels[c], g = s.samplers[d.sampler], f = d.target, m = f.node, p = s.parameters !== void 0 ? s.parameters[g.input] : g.input, I = s.parameters !== void 0 ? s.parameters[g.output] : g.output;
4575
- f.node !== void 0 && (o.push(this.getDependency("node", m)), a.push(this.getDependency("accessor", p)), l.push(this.getDependency("accessor", I)), A.push(g), u.push(f));
4572
+ const t = this.json, n = this, s = t.animations[e], i = s.name ? s.name : "animation_" + e, o = [], a = [], l = [], A = [], d = [];
4573
+ for (let c = 0, u = s.channels.length; c < u; c++) {
4574
+ const h = s.channels[c], m = s.samplers[h.sampler], f = h.target, g = f.node, p = s.parameters !== void 0 ? s.parameters[m.input] : m.input, I = s.parameters !== void 0 ? s.parameters[m.output] : m.output;
4575
+ f.node !== void 0 && (o.push(this.getDependency("node", g)), a.push(this.getDependency("accessor", p)), l.push(this.getDependency("accessor", I)), A.push(m), d.push(f));
4576
4576
  }
4577
4577
  return Promise.all([
4578
4578
  Promise.all(o),
4579
4579
  Promise.all(a),
4580
4580
  Promise.all(l),
4581
4581
  Promise.all(A),
4582
- Promise.all(u)
4582
+ Promise.all(d)
4583
4583
  ]).then(function(c) {
4584
- const h = c[0], d = c[1], g = c[2], f = c[3], m = c[4], p = [];
4585
- for (let x = 0, y = h.length; x < y; x++) {
4586
- const v = h[x], M = d[x], L = g[x], Q = f[x], $ = m[x];
4584
+ const u = c[0], h = c[1], m = c[2], f = c[3], g = c[4], p = [];
4585
+ for (let x = 0, y = u.length; x < y; x++) {
4586
+ const v = u[x], M = h[x], L = m[x], Q = f[x], $ = g[x];
4587
4587
  if (v === void 0) continue;
4588
4588
  v.updateMatrix && v.updateMatrix();
4589
4589
  const Y = n._createAnimationTracks(v, M, L, Q, $);
@@ -4615,7 +4615,7 @@ class Dr {
4615
4615
  */
4616
4616
  loadNode(e) {
4617
4617
  const t = this.json, n = this, s = t.nodes[e], i = n._loadNodeShallow(e), o = [], a = s.children || [];
4618
- for (let A = 0, u = a.length; A < u; A++)
4618
+ for (let A = 0, d = a.length; A < d; A++)
4619
4619
  o.push(n.getDependency("node", a[A]));
4620
4620
  const l = s.skin === void 0 ? Promise.resolve(null) : n.getDependency("skin", s.skin);
4621
4621
  return Promise.all([
@@ -4623,17 +4623,17 @@ class Dr {
4623
4623
  Promise.all(o),
4624
4624
  l
4625
4625
  ]).then(function(A) {
4626
- const u = A[0], c = A[1], h = A[2];
4627
- h !== null && u.traverse(function(d) {
4628
- d.isSkinnedMesh && d.bind(h, Or);
4626
+ const d = A[0], c = A[1], u = A[2];
4627
+ u !== null && d.traverse(function(h) {
4628
+ h.isSkinnedMesh && h.bind(u, Or);
4629
4629
  });
4630
- for (let d = 0, g = c.length; d < g; d++)
4631
- u.add(c[d]);
4632
- if (u.userData.pivot !== void 0 && c.length > 0) {
4633
- const d = u.userData.pivot, g = c[0];
4634
- u.pivot = new T().fromArray(d), u.position.x -= d[0], u.position.y -= d[1], u.position.z -= d[2], g.position.set(0, 0, 0), delete u.userData.pivot;
4630
+ for (let h = 0, m = c.length; h < m; h++)
4631
+ d.add(c[h]);
4632
+ if (d.userData.pivot !== void 0 && c.length > 0) {
4633
+ const h = d.userData.pivot, m = c[0];
4634
+ d.pivot = new T().fromArray(h), d.position.x -= h[0], d.position.y -= h[1], d.position.z -= h[2], m.position.set(0, 0, 0), delete d.userData.pivot;
4635
4635
  }
4636
- return u;
4636
+ return d;
4637
4637
  });
4638
4638
  }
4639
4639
  // ._loadNodeShallow() parses a single node.
@@ -4652,22 +4652,22 @@ class Dr {
4652
4652
  }).forEach(function(A) {
4653
4653
  a.push(A);
4654
4654
  }), this.nodeCache[e] = Promise.all(a).then(function(A) {
4655
- let u;
4656
- if (i.isBone === !0 ? u = new pi() : A.length > 1 ? u = new Tt() : A.length === 1 ? u = A[0] : u = new Ze(), u !== A[0])
4657
- for (let c = 0, h = A.length; c < h; c++)
4658
- u.add(A[c]);
4659
- if (i.name && (u.userData.name = i.name, u.name = o), ae(u, i), i.extensions && we(n, u, i), i.matrix !== void 0) {
4655
+ let d;
4656
+ if (i.isBone === !0 ? d = new pi() : A.length > 1 ? d = new Tt() : A.length === 1 ? d = A[0] : d = new Ze(), d !== A[0])
4657
+ for (let c = 0, u = A.length; c < u; c++)
4658
+ d.add(A[c]);
4659
+ if (i.name && (d.userData.name = i.name, d.name = o), ae(d, i), i.extensions && we(n, d, i), i.matrix !== void 0) {
4660
4660
  const c = new fe();
4661
- c.fromArray(i.matrix), u.applyMatrix4(c);
4661
+ c.fromArray(i.matrix), d.applyMatrix4(c);
4662
4662
  } else
4663
- i.translation !== void 0 && u.position.fromArray(i.translation), i.rotation !== void 0 && u.quaternion.fromArray(i.rotation), i.scale !== void 0 && u.scale.fromArray(i.scale);
4664
- if (!s.associations.has(u))
4665
- s.associations.set(u, {});
4663
+ 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);
4664
+ if (!s.associations.has(d))
4665
+ s.associations.set(d, {});
4666
4666
  else if (i.mesh !== void 0 && s.meshCache.refs[i.mesh] > 1) {
4667
- const c = s.associations.get(u);
4668
- s.associations.set(u, { ...c });
4667
+ const c = s.associations.get(d);
4668
+ s.associations.set(d, { ...c });
4669
4669
  }
4670
- return s.associations.get(u).nodes = e, u;
4670
+ return s.associations.get(d).nodes = e, d;
4671
4671
  }), this.nodeCache[e];
4672
4672
  }
4673
4673
  /**
@@ -4684,17 +4684,17 @@ class Dr {
4684
4684
  for (let l = 0, A = o.length; l < A; l++)
4685
4685
  a.push(s.getDependency("node", o[l]));
4686
4686
  return Promise.all(a).then(function(l) {
4687
- for (let u = 0, c = l.length; u < c; u++) {
4688
- const h = l[u];
4689
- h.parent !== null ? i.add(sr(h)) : i.add(h);
4687
+ for (let d = 0, c = l.length; d < c; d++) {
4688
+ const u = l[d];
4689
+ u.parent !== null ? i.add(sr(u)) : i.add(u);
4690
4690
  }
4691
- const A = (u) => {
4691
+ const A = (d) => {
4692
4692
  const c = /* @__PURE__ */ new Map();
4693
- for (const [h, d] of s.associations)
4694
- (h instanceof it || h instanceof Is) && c.set(h, d);
4695
- return u.traverse((h) => {
4696
- const d = s.associations.get(h);
4697
- d != null && c.set(h, d);
4693
+ for (const [u, h] of s.associations)
4694
+ (u instanceof ot || u instanceof Is) && c.set(u, h);
4695
+ return d.traverse((u) => {
4696
+ const h = s.associations.get(u);
4697
+ h != null && c.set(u, h);
4698
4698
  }), c;
4699
4699
  };
4700
4700
  return s.associations = A(i), i;
@@ -4702,41 +4702,41 @@ class Dr {
4702
4702
  }
4703
4703
  _createAnimationTracks(e, t, n, s, i) {
4704
4704
  const o = [], a = e.name ? e.name : e.uuid, l = [];
4705
- function A(d) {
4706
- d.morphTargetInfluences && l.push(d.name ? d.name : d.uuid);
4705
+ function A(h) {
4706
+ h.morphTargetInfluences && l.push(h.name ? h.name : h.uuid);
4707
4707
  }
4708
4708
  me[i.path] === me.weights ? (A(e), e.isGroup && e.children.forEach(A)) : l.push(a);
4709
- let u;
4709
+ let d;
4710
4710
  switch (me[i.path]) {
4711
4711
  case me.weights:
4712
- u = xs;
4712
+ d = xs;
4713
4713
  break;
4714
4714
  case me.rotation:
4715
- u = vs;
4715
+ d = vs;
4716
4716
  break;
4717
4717
  case me.translation:
4718
4718
  case me.scale:
4719
- u = ys;
4719
+ d = ys;
4720
4720
  break;
4721
4721
  default:
4722
4722
  switch (n.itemSize) {
4723
4723
  case 1:
4724
- u = xs;
4724
+ d = xs;
4725
4725
  break;
4726
4726
  case 2:
4727
4727
  case 3:
4728
4728
  default:
4729
- u = ys;
4729
+ d = ys;
4730
4730
  break;
4731
4731
  }
4732
4732
  break;
4733
4733
  }
4734
- const c = s.interpolation !== void 0 ? Rr[s.interpolation] : on, h = this._getArrayFromAccessor(n);
4735
- for (let d = 0, g = l.length; d < g; d++) {
4736
- const f = new u(
4737
- l[d] + "." + me[i.path],
4734
+ const c = s.interpolation !== void 0 ? Rr[s.interpolation] : on, u = this._getArrayFromAccessor(n);
4735
+ for (let h = 0, m = l.length; h < m; h++) {
4736
+ const f = new d(
4737
+ l[h] + "." + me[i.path],
4738
4738
  t.array,
4739
- h,
4739
+ u,
4740
4740
  c
4741
4741
  );
4742
4742
  s.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(f), o.push(f);
@@ -4769,8 +4769,8 @@ function Wr(r, e, t) {
4769
4769
  new T(l[0], l[1], l[2]),
4770
4770
  new T(A[0], A[1], A[2])
4771
4771
  ), a.normalized) {
4772
- const u = As(Be[a.componentType]);
4773
- s.min.multiplyScalar(u), s.max.multiplyScalar(u);
4772
+ const d = As(Be[a.componentType]);
4773
+ s.min.multiplyScalar(d), s.max.multiplyScalar(d);
4774
4774
  }
4775
4775
  } else {
4776
4776
  console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
@@ -4781,13 +4781,13 @@ function Wr(r, e, t) {
4781
4781
  const i = e.targets;
4782
4782
  if (i !== void 0) {
4783
4783
  const a = new T(), l = new T();
4784
- for (let A = 0, u = i.length; A < u; A++) {
4784
+ for (let A = 0, d = i.length; A < d; A++) {
4785
4785
  const c = i[A];
4786
4786
  if (c.POSITION !== void 0) {
4787
- const h = t.json.accessors[c.POSITION], d = h.min, g = h.max;
4788
- if (d !== void 0 && g !== void 0) {
4789
- if (l.setX(Math.max(Math.abs(d[0]), Math.abs(g[0]))), l.setY(Math.max(Math.abs(d[1]), Math.abs(g[1]))), l.setZ(Math.max(Math.abs(d[2]), Math.abs(g[2]))), h.normalized) {
4790
- const f = As(Be[h.componentType]);
4787
+ const u = t.json.accessors[c.POSITION], h = u.min, m = u.max;
4788
+ if (h !== void 0 && m !== void 0) {
4789
+ if (l.setX(Math.max(Math.abs(h[0]), Math.abs(m[0]))), l.setY(Math.max(Math.abs(h[1]), Math.abs(m[1]))), l.setZ(Math.max(Math.abs(h[2]), Math.abs(m[2]))), u.normalized) {
4790
+ const f = As(Be[u.componentType]);
4791
4791
  l.multiplyScalar(f);
4792
4792
  }
4793
4793
  a.max(l);
@@ -4818,7 +4818,7 @@ function Vs(r, e, t) {
4818
4818
  });
4819
4819
  s.push(o);
4820
4820
  }
4821
- return Nt.workingColorSpace !== Ae && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Nt.workingColorSpace}" not supported.`), ae(r, e), Wr(r, e, t), Promise.all(s).then(function() {
4821
+ return Lt.workingColorSpace !== Ae && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Lt.workingColorSpace}" not supported.`), ae(r, e), Wr(r, e, t), Promise.all(s).then(function() {
4822
4822
  return e.targets !== void 0 ? kr(r, e.targets, t) : r;
4823
4823
  });
4824
4824
  }
@@ -4880,7 +4880,7 @@ class jr extends us {
4880
4880
  * @param {onErrorCallback} onError - Executed when errors occur.
4881
4881
  */
4882
4882
  load(e, t, n, s) {
4883
- const i = new At(this.manager);
4883
+ const i = new ct(this.manager);
4884
4884
  i.setPath(this.path), i.setResponseType("arraybuffer"), i.setRequestHeader(this.requestHeader), i.setWithCredentials(this.withCredentials), i.load(e, (o) => {
4885
4885
  this.parse(o, t, s);
4886
4886
  }, n, s);
@@ -4919,8 +4919,8 @@ class jr extends us {
4919
4919
  );
4920
4920
  }
4921
4921
  let s;
4922
- const i = this.workerNextTaskID++, o = e.byteLength, a = this._getWorker(i, o).then((l) => (s = l, new Promise((A, u) => {
4923
- s._callbacks[i] = { resolve: A, reject: u }, s.postMessage({ type: "decode", id: i, taskConfig: t, buffer: e }, [e]);
4922
+ const i = this.workerNextTaskID++, o = e.byteLength, a = this._getWorker(i, o).then((l) => (s = l, new Promise((A, d) => {
4923
+ s._callbacks[i] = { resolve: A, reject: d }, s.postMessage({ type: "decode", id: i, taskConfig: t, buffer: e }, [e]);
4924
4924
  }))).then((l) => this._createGeometry(l.geometry));
4925
4925
  return a.catch(() => !0).then(() => {
4926
4926
  s && i && this._releaseTask(s, i);
@@ -4931,15 +4931,15 @@ class jr extends us {
4931
4931
  }
4932
4932
  _createGeometry(e) {
4933
4933
  const t = new De();
4934
- e.index && t.setIndex(new rt(e.index.array, 1));
4934
+ e.index && t.setIndex(new at(e.index.array, 1));
4935
4935
  for (let n = 0; n < e.attributes.length; n++) {
4936
4936
  const { name: s, array: i, itemSize: o, stride: a, vertexColorSpace: l } = e.attributes[n];
4937
4937
  let A;
4938
4938
  if (o === a)
4939
- A = new rt(i, o);
4939
+ A = new at(i, o);
4940
4940
  else {
4941
- const u = new $s(i, a);
4942
- A = new en(u, o, 0);
4941
+ const d = new $s(i, a);
4942
+ A = new en(d, o, 0);
4943
4943
  }
4944
4944
  s === "color" && (this._assignVertexColorSpace(A, l), A.normalized = !(i instanceof Float32Array)), t.setAttribute(s, A);
4945
4945
  }
@@ -4949,10 +4949,10 @@ class jr extends us {
4949
4949
  if (t !== he) return;
4950
4950
  const n = new B();
4951
4951
  for (let s = 0, i = e.count; s < i; s++)
4952
- n.fromBufferAttribute(e, s), Nt.colorSpaceToWorking(n, he), e.setXYZ(s, n.r, n.g, n.b);
4952
+ n.fromBufferAttribute(e, s), Lt.colorSpaceToWorking(n, he), e.setXYZ(s, n.r, n.g, n.b);
4953
4953
  }
4954
4954
  _loadLibrary(e, t) {
4955
- const n = new At(this.manager);
4955
+ const n = new ct(this.manager);
4956
4956
  return n.setPath(this.decoderPath), n.setResponseType(t), n.setWithCredentials(this.withCredentials), new Promise((s, i) => {
4957
4957
  n.load(e, s, void 0, i);
4958
4958
  });
@@ -5020,81 +5020,81 @@ function Fr() {
5020
5020
  const a = o.data;
5021
5021
  switch (a.type) {
5022
5022
  case "init":
5023
- r = a.decoderConfig, e = new Promise(function(u) {
5023
+ r = a.decoderConfig, e = new Promise(function(d) {
5024
5024
  r.onModuleLoaded = function(c) {
5025
- u({ draco: c });
5025
+ d({ draco: c });
5026
5026
  }, DracoDecoderModule(r);
5027
5027
  });
5028
5028
  break;
5029
5029
  case "decode":
5030
5030
  const l = a.buffer, A = a.taskConfig;
5031
- e.then((u) => {
5032
- const c = u.draco, h = new c.Decoder();
5031
+ e.then((d) => {
5032
+ const c = d.draco, u = new c.Decoder();
5033
5033
  try {
5034
- const d = t(c, h, new Int8Array(l), A), g = d.attributes.map((f) => f.array.buffer);
5035
- d.index && g.push(d.index.array.buffer), self.postMessage({ type: "decode", id: a.id, geometry: d }, g);
5036
- } catch (d) {
5037
- console.error(d), self.postMessage({ type: "error", id: a.id, error: d.message });
5034
+ const h = t(c, u, new Int8Array(l), A), m = h.attributes.map((f) => f.array.buffer);
5035
+ h.index && m.push(h.index.array.buffer), self.postMessage({ type: "decode", id: a.id, geometry: h }, m);
5036
+ } catch (h) {
5037
+ console.error(h), self.postMessage({ type: "error", id: a.id, error: h.message });
5038
5038
  } finally {
5039
- c.destroy(h);
5039
+ c.destroy(u);
5040
5040
  }
5041
5041
  });
5042
5042
  break;
5043
5043
  }
5044
5044
  };
5045
5045
  function t(o, a, l, A) {
5046
- const u = A.attributeIDs, c = A.attributeTypes;
5047
- let h, d;
5048
- const g = a.GetEncodedGeometryType(l);
5049
- if (g === o.TRIANGULAR_MESH)
5050
- h = new o.Mesh(), d = a.DecodeArrayToMesh(l, l.byteLength, h);
5051
- else if (g === o.POINT_CLOUD)
5052
- h = new o.PointCloud(), d = a.DecodeArrayToPointCloud(l, l.byteLength, h);
5046
+ const d = A.attributeIDs, c = A.attributeTypes;
5047
+ let u, h;
5048
+ const m = a.GetEncodedGeometryType(l);
5049
+ if (m === o.TRIANGULAR_MESH)
5050
+ u = new o.Mesh(), h = a.DecodeArrayToMesh(l, l.byteLength, u);
5051
+ else if (m === o.POINT_CLOUD)
5052
+ u = new o.PointCloud(), h = a.DecodeArrayToPointCloud(l, l.byteLength, u);
5053
5053
  else
5054
5054
  throw new Error("THREE.DRACOLoader: Unexpected geometry type.");
5055
- if (!d.ok() || h.ptr === 0)
5056
- throw new Error("THREE.DRACOLoader: Decoding failed: " + d.error_msg());
5055
+ if (!h.ok() || u.ptr === 0)
5056
+ throw new Error("THREE.DRACOLoader: Decoding failed: " + h.error_msg());
5057
5057
  const f = { index: null, attributes: [] };
5058
- for (const m in u) {
5059
- const p = self[c[m]];
5058
+ for (const g in d) {
5059
+ const p = self[c[g]];
5060
5060
  let I, x;
5061
5061
  if (A.useUniqueIDs)
5062
- x = u[m], I = a.GetAttributeByUniqueId(h, x);
5062
+ x = d[g], I = a.GetAttributeByUniqueId(u, x);
5063
5063
  else {
5064
- if (x = a.GetAttributeId(h, o[u[m]]), x === -1) continue;
5065
- I = a.GetAttribute(h, x);
5064
+ if (x = a.GetAttributeId(u, o[d[g]]), x === -1) continue;
5065
+ I = a.GetAttribute(u, x);
5066
5066
  }
5067
- const y = s(o, a, h, m, p, I);
5068
- m === "color" && (y.vertexColorSpace = A.vertexColorSpace), f.attributes.push(y);
5067
+ const y = s(o, a, u, g, p, I);
5068
+ g === "color" && (y.vertexColorSpace = A.vertexColorSpace), f.attributes.push(y);
5069
5069
  }
5070
- return g === o.TRIANGULAR_MESH && (f.index = n(o, a, h)), o.destroy(h), f;
5070
+ return m === o.TRIANGULAR_MESH && (f.index = n(o, a, u)), o.destroy(u), f;
5071
5071
  }
5072
5072
  function n(o, a, l) {
5073
- const u = l.num_faces() * 3, c = u * 4, h = o._malloc(c);
5074
- a.GetTrianglesUInt32Array(l, c, h);
5075
- const d = new Uint32Array(o.HEAPF32.buffer, h, u).slice();
5076
- return o._free(h), { array: d, itemSize: 1 };
5077
- }
5078
- function s(o, a, l, A, u, c) {
5079
- const h = l.num_points(), d = c.num_components(), g = i(o, u), f = d * u.BYTES_PER_ELEMENT, m = Math.ceil(f / 4) * 4, p = m / u.BYTES_PER_ELEMENT, I = h * f, x = h * m, y = o._malloc(I);
5080
- a.GetAttributeDataArrayForAllPoints(l, c, g, I, y);
5081
- const v = new u(o.HEAPF32.buffer, y, I / u.BYTES_PER_ELEMENT);
5073
+ const d = l.num_faces() * 3, c = d * 4, u = o._malloc(c);
5074
+ a.GetTrianglesUInt32Array(l, c, u);
5075
+ const h = new Uint32Array(o.HEAPF32.buffer, u, d).slice();
5076
+ return o._free(u), { array: h, itemSize: 1 };
5077
+ }
5078
+ function s(o, a, l, A, d, c) {
5079
+ const u = l.num_points(), h = c.num_components(), m = i(o, d), f = h * d.BYTES_PER_ELEMENT, g = Math.ceil(f / 4) * 4, p = g / d.BYTES_PER_ELEMENT, I = u * f, x = u * g, y = o._malloc(I);
5080
+ a.GetAttributeDataArrayForAllPoints(l, c, m, I, y);
5081
+ const v = new d(o.HEAPF32.buffer, y, I / d.BYTES_PER_ELEMENT);
5082
5082
  let M;
5083
- if (f === m)
5083
+ if (f === g)
5084
5084
  M = v.slice();
5085
5085
  else {
5086
- M = new u(x / u.BYTES_PER_ELEMENT);
5086
+ M = new d(x / d.BYTES_PER_ELEMENT);
5087
5087
  let L = 0;
5088
5088
  for (let Q = 0, $ = v.length; Q < $; Q++) {
5089
- for (let Y = 0; Y < d; Y++)
5090
- M[L + Y] = v[Q * d + Y];
5089
+ for (let Y = 0; Y < h; Y++)
5090
+ M[L + Y] = v[Q * h + Y];
5091
5091
  L += p;
5092
5092
  }
5093
5093
  }
5094
5094
  return o._free(y), {
5095
5095
  name: A,
5096
- count: h,
5097
- itemSize: d,
5096
+ count: u,
5097
+ itemSize: h,
5098
5098
  array: M,
5099
5099
  stride: p
5100
5100
  };
@@ -5146,34 +5146,34 @@ function Kr(r) {
5146
5146
  repeatX: a = 4,
5147
5147
  repeatY: l = 4,
5148
5148
  speedX: A = 5e-4,
5149
- speedY: u = 5e-4
5150
- } = r || {}, c = new w.PlaneGeometry(e, t), d = new w.TextureLoader().load(Ur, (m) => {
5151
- m.wrapS = m.wrapT = w.RepeatWrapping, m.repeat.set(a, l), m.generateMipmaps = !1, m.minFilter = w.LinearFilter, m.magFilter = w.LinearFilter;
5152
- }), g = new w.MeshStandardMaterial({
5149
+ speedY: d = 5e-4
5150
+ } = r || {}, c = new w.PlaneGeometry(e, t), h = new w.TextureLoader().load(Ur, (g) => {
5151
+ g.wrapS = g.wrapT = w.RepeatWrapping, g.repeat.set(a, l), g.generateMipmaps = !1, g.minFilter = w.LinearFilter, g.magFilter = w.LinearFilter;
5152
+ }), m = new w.MeshStandardMaterial({
5153
5153
  color: n,
5154
5154
  roughness: s,
5155
5155
  metalness: i,
5156
- normalMap: d,
5156
+ normalMap: h,
5157
5157
  normalScale: new w.Vector2(o, o),
5158
5158
  side: w.DoubleSide,
5159
5159
  // 双面渲染,避免从侧面或底部看到黑色
5160
5160
  transparent: !0,
5161
5161
  opacity: 0.6
5162
- }), f = new w.Mesh(c, g);
5163
- f.rotation.x = -Math.PI / 2, f.position.y = 0, f.name = "水面(标准材质)", f.userData.isWater = !0, f.userData.isMovable = !0, f.userData.waterSpeed = { x: A, y: u }, Xe(f);
5162
+ }), f = new w.Mesh(c, m);
5163
+ f.rotation.x = -Math.PI / 2, f.position.y = 0, f.name = "水面(标准材质)", f.userData.isWater = !0, f.userData.isMovable = !0, f.userData.waterSpeed = { x: A, y: d }, Xe(f);
5164
5164
  }
5165
5165
  function Br(r) {
5166
5166
  const e = Zo();
5167
5167
  if (!e)
5168
5168
  return console.warn("请先选中一个模型,再添加数据面板"), null;
5169
- const t = Ht(e);
5169
+ const t = Ut(e);
5170
5170
  t && (t.dispose(), Ao(e));
5171
5171
  const n = [
5172
5172
  { label: "温度", value: "30", unit: "℃" },
5173
5173
  { label: "湿度", value: "65", unit: "%" },
5174
5174
  { label: "压力", value: "101.3", unit: "kPa" },
5175
5175
  { label: "名称", value: e.name || "未命名" }
5176
- ], s = new ut({
5176
+ ], s = new dt({
5177
5177
  title: (r == null ? void 0 : r.title) || "数据面板",
5178
5178
  items: (r == null ? void 0 : r.items) || n
5179
5179
  });
@@ -5202,11 +5202,11 @@ function Zr(r) {
5202
5202
  (a) => {
5203
5203
  const l = n === "gltf" || n === "glb" ? a.scene : a;
5204
5204
  l.traverse((c) => {
5205
- var h;
5206
- c.userData.isMovable = !0, c.name || (c.name = c.type), c.type === "Mesh" && (c.frustumCulled = !0, (h = c.geometry) == null || h.computeVertexNormals(), c.castShadow = !0, c.receiveShadow = !0);
5205
+ var u;
5206
+ c.userData.isMovable = !0, c.name || (c.name = c.type), c.type === "Mesh" && (c.frustumCulled = !0, (u = c.geometry) == null || u.computeVertexNormals(), c.castShadow = !0, c.receiveShadow = !0);
5207
5207
  });
5208
- const u = new w.Box3().setFromObject(l).getCenter(new w.Vector3());
5209
- l.position.sub(u), Xe(l, !0), qt(!1), e(l);
5208
+ const d = new w.Box3().setFromObject(l).getCenter(new w.Vector3());
5209
+ l.position.sub(d), Xe(l, !0), qt(!1), e(l);
5210
5210
  },
5211
5211
  void 0,
5212
5212
  (a) => {
@@ -5251,7 +5251,7 @@ const qr = {
5251
5251
  setup(r, { emit: e }) {
5252
5252
  const t = r, n = e, s = W(null), { expandedSet: i, toggleExpand: o } = yn("treeExpand"), a = $e(() => i.value.has(t.node.uuid)), l = $e(() => (t.version, t.node.children.some((f) => f.userData.isMovable === !0))), A = $e(() => (t.version, t.node.children.filter(
5253
5253
  (f) => f.userData.isMovable === !0
5254
- ))), u = $e(
5254
+ ))), d = $e(
5255
5255
  () => {
5256
5256
  var f;
5257
5257
  return ((f = t.selectedObject) == null ? void 0 : f.uuid) === t.node.uuid;
@@ -5259,7 +5259,7 @@ const qr = {
5259
5259
  );
5260
5260
  xn(
5261
5261
  () => {
5262
- u.value && s.value && s.value.scrollIntoView({
5262
+ d.value && s.value && s.value.scrollIntoView({
5263
5263
  block: "nearest",
5264
5264
  // 仅当元素不在可视区域时才滚动
5265
5265
  behavior: "smooth"
@@ -5270,10 +5270,10 @@ const qr = {
5270
5270
  );
5271
5271
  const c = (f) => {
5272
5272
  f.stopPropagation(), n("select", t.node);
5273
- }, h = (f) => {
5273
+ }, u = (f) => {
5274
5274
  f.stopPropagation(), n("delete", t.node);
5275
- }, d = (f) => f.type === "Mesh" || f.type === "Sprite" ? "🟦" : f.type === "Light" ? "💡" : "📦", g = (f) => f.name || `${f.type} (${f.id})`;
5276
- return (f, m) => {
5275
+ }, h = (f) => f.type === "Mesh" || f.type === "Sprite" ? "🟦" : f.type === "Light" ? "💡" : "📦", m = (f) => f.name || `${f.type} (${f.id})`;
5276
+ return (f, g) => {
5277
5277
  const p = vn("TreeItem", !0);
5278
5278
  return R(), P("div", {
5279
5279
  class: "tree-node",
@@ -5281,31 +5281,31 @@ const qr = {
5281
5281
  ref: s
5282
5282
  }, [
5283
5283
  C("div", {
5284
- class: oe(["tree-item", { selected: u.value }]),
5284
+ class: oe(["tree-item", { selected: d.value }]),
5285
5285
  onClick: c
5286
5286
  }, [
5287
5287
  l.value ? (R(), P("span", {
5288
5288
  key: 0,
5289
5289
  class: "toggle-icon",
5290
- onClick: m[0] || (m[0] = $t((I) => Sn(o)(r.node.uuid), ["stop"]))
5290
+ onClick: g[0] || (g[0] = $t((I) => Sn(o)(f.node.uuid), ["stop"]))
5291
5291
  }, ne(a.value ? "▼" : "▶"), 1)) : (R(), P("span", qr)),
5292
- C("span", Vr, ne(d(r.node)), 1),
5293
- C("span", Jr, ne(g(r.node)), 1),
5292
+ C("span", Vr, ne(h(f.node)), 1),
5293
+ C("span", Jr, ne(m(f.node)), 1),
5294
5294
  C("button", {
5295
5295
  class: "tree-delete",
5296
- onClick: $t(h, ["stop"])
5296
+ onClick: $t(u, ["stop"])
5297
5297
  }, "×")
5298
5298
  ], 2),
5299
5299
  a.value && l.value ? (R(), P("div", Qr, [
5300
- (R(!0), P(Pe, null, Ut(A.value, (I) => (R(), Pt(p, {
5300
+ (R(!0), P(Pe, null, Ft(A.value, (I) => (R(), nt(p, {
5301
5301
  key: I.uuid,
5302
5302
  node: I,
5303
- "selected-object": r.selectedObject,
5304
- version: r.version,
5305
- onSelect: m[1] || (m[1] = (x) => n("select", x)),
5306
- onDelete: m[2] || (m[2] = (x) => n("delete", x))
5303
+ "selected-object": f.selectedObject,
5304
+ version: f.version,
5305
+ onSelect: g[1] || (g[1] = (x) => n("select", x)),
5306
+ onDelete: g[2] || (g[2] = (x) => n("delete", x))
5307
5307
  }, null, 8, ["node", "selected-object", "version"]))), 128))
5308
- ])) : J("", !0)
5308
+ ])) : Z("", !0)
5309
5309
  ], 512);
5310
5310
  };
5311
5311
  }
@@ -5341,15 +5341,15 @@ const qr = {
5341
5341
  function l() {
5342
5342
  t.selectedObject && t.selectedObject.type === "DirectionalLight" && (t.selectedObject.intensity = a.intensity);
5343
5343
  }
5344
- function A(h) {
5345
- let d = null;
5346
- return h.traverse((g) => {
5347
- if (g.type === "Mesh" && !d) {
5348
- const f = g, m = Array.isArray(f.material) ? f.material : [f.material];
5349
- for (const p of m)
5344
+ function A(u) {
5345
+ let h = null;
5346
+ return u.traverse((m) => {
5347
+ if (m.type === "Mesh" && !h) {
5348
+ const f = m, g = Array.isArray(f.material) ? f.material : [f.material];
5349
+ for (const p of g)
5350
5350
  if (p && (p.type === "MeshStandardMaterial" || p.type === "MeshPhongMaterial")) {
5351
5351
  const I = p;
5352
- d = {
5352
+ h = {
5353
5353
  metalness: I.metalness ?? 0,
5354
5354
  roughness: I.roughness ?? 0.5,
5355
5355
  opacity: p.opacity ?? 1
@@ -5357,80 +5357,80 @@ const qr = {
5357
5357
  break;
5358
5358
  }
5359
5359
  }
5360
- }), d;
5360
+ }), h;
5361
5361
  }
5362
- function u(h, d) {
5363
- let g = !1;
5364
- return h.traverse((f) => {
5362
+ function d(u, h) {
5363
+ let m = !1;
5364
+ return u.traverse((f) => {
5365
5365
  if (f.type === "Mesh") {
5366
- const m = f, p = Array.isArray(m.material) ? m.material : [m.material];
5366
+ const g = f, p = Array.isArray(g.material) ? g.material : [g.material];
5367
5367
  for (const I of p)
5368
- I && (I.type === "MeshStandardMaterial" || I.type === "MeshPhongMaterial") && (d.metalness !== void 0 && (I.metalness = d.metalness), d.roughness !== void 0 && (I.roughness = d.roughness), d.opacity !== void 0 && (I.opacity = d.opacity, I.transparent = d.opacity < 1), I.needsUpdate = !0, g = !0);
5368
+ I && (I.type === "MeshStandardMaterial" || I.type === "MeshPhongMaterial") && (h.metalness !== void 0 && (I.metalness = h.metalness), h.roughness !== void 0 && (I.roughness = h.roughness), h.opacity !== void 0 && (I.opacity = h.opacity, I.transparent = h.opacity < 1), I.needsUpdate = !0, m = !0);
5369
5369
  }
5370
- }), g;
5370
+ }), m;
5371
5371
  }
5372
5372
  function c() {
5373
5373
  if (t.selectedObject) {
5374
- const h = u(t.selectedObject, {
5374
+ const u = d(t.selectedObject, {
5375
5375
  metalness: i.metalness,
5376
5376
  roughness: i.roughness,
5377
5377
  opacity: i.opacity
5378
5378
  });
5379
- o.value = h;
5379
+ o.value = u;
5380
5380
  }
5381
5381
  }
5382
5382
  return be(
5383
5383
  () => t.selectedObject,
5384
- (h) => {
5385
- if (h) {
5386
- const d = A(h);
5387
- d ? (i.metalness = d.metalness, i.roughness = d.roughness, i.opacity = d.opacity, o.value = !0) : (i.metalness = 0, i.roughness = 0.5, i.opacity = 1, o.value = !1), h.type === "DirectionalLight" && (a.intensity = h.intensity ?? 1);
5384
+ (u) => {
5385
+ if (u) {
5386
+ const h = A(u);
5387
+ h ? (i.metalness = h.metalness, i.roughness = h.roughness, i.opacity = h.opacity, o.value = !0) : (i.metalness = 0, i.roughness = 0.5, i.opacity = 1, o.value = !1), u.type === "DirectionalLight" && (a.intensity = u.intensity ?? 1);
5388
5388
  } else
5389
5389
  i.metalness = 0, i.roughness = 0.5, i.opacity = 1, o.value = !1;
5390
5390
  },
5391
5391
  { immediate: !0 }
5392
- ), (h, d) => (R(), P("div", null, [
5392
+ ), (u, h) => (R(), P("div", null, [
5393
5393
  C("div", $r, [
5394
- d[17] || (d[17] = C("label", null, "位置", -1)),
5394
+ h[17] || (h[17] = C("label", null, "位置", -1)),
5395
5395
  C("div", ea, [
5396
- d[14] || (d[14] = C("span", null, "X:", -1)),
5396
+ h[14] || (h[14] = C("span", null, "X:", -1)),
5397
5397
  k(C("input", {
5398
5398
  type: "number",
5399
- "onUpdate:modelValue": d[0] || (d[0] = (g) => r.transform.position.x = g),
5399
+ "onUpdate:modelValue": h[0] || (h[0] = (m) => u.transform.position.x = m),
5400
5400
  step: "0.01",
5401
5401
  onInput: s
5402
5402
  }, null, 544), [
5403
5403
  [
5404
5404
  D,
5405
- r.transform.position.x,
5405
+ u.transform.position.x,
5406
5406
  void 0,
5407
5407
  { number: !0 }
5408
5408
  ]
5409
5409
  ]),
5410
- d[15] || (d[15] = C("span", null, "Y:", -1)),
5410
+ h[15] || (h[15] = C("span", null, "Y:", -1)),
5411
5411
  k(C("input", {
5412
5412
  type: "number",
5413
- "onUpdate:modelValue": d[1] || (d[1] = (g) => r.transform.position.y = g),
5413
+ "onUpdate:modelValue": h[1] || (h[1] = (m) => u.transform.position.y = m),
5414
5414
  step: "0.01",
5415
5415
  onInput: s
5416
5416
  }, null, 544), [
5417
5417
  [
5418
5418
  D,
5419
- r.transform.position.y,
5419
+ u.transform.position.y,
5420
5420
  void 0,
5421
5421
  { number: !0 }
5422
5422
  ]
5423
5423
  ]),
5424
- d[16] || (d[16] = C("span", null, "Z:", -1)),
5424
+ h[16] || (h[16] = C("span", null, "Z:", -1)),
5425
5425
  k(C("input", {
5426
5426
  type: "number",
5427
- "onUpdate:modelValue": d[2] || (d[2] = (g) => r.transform.position.z = g),
5427
+ "onUpdate:modelValue": h[2] || (h[2] = (m) => u.transform.position.z = m),
5428
5428
  step: "0.01",
5429
5429
  onInput: s
5430
5430
  }, null, 544), [
5431
5431
  [
5432
5432
  D,
5433
- r.transform.position.z,
5433
+ u.transform.position.z,
5434
5434
  void 0,
5435
5435
  { number: !0 }
5436
5436
  ]
@@ -5438,46 +5438,46 @@ const qr = {
5438
5438
  ])
5439
5439
  ]),
5440
5440
  C("div", ta, [
5441
- d[21] || (d[21] = C("label", null, "旋转 (弧度)", -1)),
5441
+ h[21] || (h[21] = C("label", null, "旋转 (弧度)", -1)),
5442
5442
  C("div", sa, [
5443
- d[18] || (d[18] = C("span", null, "X:", -1)),
5443
+ h[18] || (h[18] = C("span", null, "X:", -1)),
5444
5444
  k(C("input", {
5445
5445
  type: "number",
5446
- "onUpdate:modelValue": d[3] || (d[3] = (g) => r.transform.rotation.x = g),
5446
+ "onUpdate:modelValue": h[3] || (h[3] = (m) => u.transform.rotation.x = m),
5447
5447
  step: "0.01",
5448
5448
  onInput: s
5449
5449
  }, null, 544), [
5450
5450
  [
5451
5451
  D,
5452
- r.transform.rotation.x,
5452
+ u.transform.rotation.x,
5453
5453
  void 0,
5454
5454
  { number: !0 }
5455
5455
  ]
5456
5456
  ]),
5457
- d[19] || (d[19] = C("span", null, "Y:", -1)),
5457
+ h[19] || (h[19] = C("span", null, "Y:", -1)),
5458
5458
  k(C("input", {
5459
5459
  type: "number",
5460
- "onUpdate:modelValue": d[4] || (d[4] = (g) => r.transform.rotation.y = g),
5460
+ "onUpdate:modelValue": h[4] || (h[4] = (m) => u.transform.rotation.y = m),
5461
5461
  step: "0.01",
5462
5462
  onInput: s
5463
5463
  }, null, 544), [
5464
5464
  [
5465
5465
  D,
5466
- r.transform.rotation.y,
5466
+ u.transform.rotation.y,
5467
5467
  void 0,
5468
5468
  { number: !0 }
5469
5469
  ]
5470
5470
  ]),
5471
- d[20] || (d[20] = C("span", null, "Z:", -1)),
5471
+ h[20] || (h[20] = C("span", null, "Z:", -1)),
5472
5472
  k(C("input", {
5473
5473
  type: "number",
5474
- "onUpdate:modelValue": d[5] || (d[5] = (g) => r.transform.rotation.z = g),
5474
+ "onUpdate:modelValue": h[5] || (h[5] = (m) => u.transform.rotation.z = m),
5475
5475
  step: "0.01",
5476
5476
  onInput: s
5477
5477
  }, null, 544), [
5478
5478
  [
5479
5479
  D,
5480
- r.transform.rotation.z,
5480
+ u.transform.rotation.z,
5481
5481
  void 0,
5482
5482
  { number: !0 }
5483
5483
  ]
@@ -5485,62 +5485,62 @@ const qr = {
5485
5485
  ])
5486
5486
  ]),
5487
5487
  C("div", na, [
5488
- d[25] || (d[25] = C("label", null, "缩放", -1)),
5488
+ h[25] || (h[25] = C("label", null, "缩放", -1)),
5489
5489
  C("div", ia, [
5490
- d[22] || (d[22] = C("span", null, "X:", -1)),
5490
+ h[22] || (h[22] = C("span", null, "X:", -1)),
5491
5491
  k(C("input", {
5492
5492
  type: "number",
5493
- "onUpdate:modelValue": d[6] || (d[6] = (g) => r.transform.scale.x = g),
5493
+ "onUpdate:modelValue": h[6] || (h[6] = (m) => u.transform.scale.x = m),
5494
5494
  step: "0.01",
5495
5495
  onInput: s
5496
5496
  }, null, 544), [
5497
5497
  [
5498
5498
  D,
5499
- r.transform.scale.x,
5499
+ u.transform.scale.x,
5500
5500
  void 0,
5501
5501
  { number: !0 }
5502
5502
  ]
5503
5503
  ]),
5504
- d[23] || (d[23] = C("span", null, "Y:", -1)),
5504
+ h[23] || (h[23] = C("span", null, "Y:", -1)),
5505
5505
  k(C("input", {
5506
5506
  type: "number",
5507
- "onUpdate:modelValue": d[7] || (d[7] = (g) => r.transform.scale.y = g),
5507
+ "onUpdate:modelValue": h[7] || (h[7] = (m) => u.transform.scale.y = m),
5508
5508
  step: "0.01",
5509
5509
  onInput: s
5510
5510
  }, null, 544), [
5511
5511
  [
5512
5512
  D,
5513
- r.transform.scale.y,
5513
+ u.transform.scale.y,
5514
5514
  void 0,
5515
5515
  { number: !0 }
5516
5516
  ]
5517
5517
  ]),
5518
- d[24] || (d[24] = C("span", null, "Z:", -1)),
5518
+ h[24] || (h[24] = C("span", null, "Z:", -1)),
5519
5519
  k(C("input", {
5520
5520
  type: "number",
5521
- "onUpdate:modelValue": d[8] || (d[8] = (g) => r.transform.scale.z = g),
5521
+ "onUpdate:modelValue": h[8] || (h[8] = (m) => u.transform.scale.z = m),
5522
5522
  step: "0.01",
5523
5523
  onInput: s
5524
5524
  }, null, 544), [
5525
5525
  [
5526
5526
  D,
5527
- r.transform.scale.z,
5527
+ u.transform.scale.z,
5528
5528
  void 0,
5529
5529
  { number: !0 }
5530
5530
  ]
5531
5531
  ])
5532
5532
  ])
5533
5533
  ]),
5534
- r.selectedObject && r.selectedObject.type === "DirectionalLight" ? (R(), P("div", oa, [
5535
- d[27] || (d[27] = C("label", null, "光源属性", -1)),
5534
+ u.selectedObject && u.selectedObject.type === "DirectionalLight" ? (R(), P("div", oa, [
5535
+ h[27] || (h[27] = C("label", null, "光源属性", -1)),
5536
5536
  C("div", ra, [
5537
- d[26] || (d[26] = C("span", { class: "slider-label" }, "强度", -1)),
5537
+ h[26] || (h[26] = C("span", { class: "slider-label" }, "强度", -1)),
5538
5538
  k(C("input", {
5539
5539
  type: "range",
5540
5540
  min: "0",
5541
5541
  max: "10",
5542
5542
  step: "0.1",
5543
- "onUpdate:modelValue": d[9] || (d[9] = (g) => a.intensity = g),
5543
+ "onUpdate:modelValue": h[9] || (h[9] = (m) => a.intensity = m),
5544
5544
  onInput: l
5545
5545
  }, null, 544), [
5546
5546
  [
@@ -5555,7 +5555,7 @@ const qr = {
5555
5555
  min: "0",
5556
5556
  max: "100",
5557
5557
  step: "0.1",
5558
- "onUpdate:modelValue": d[10] || (d[10] = (g) => a.intensity = g),
5558
+ "onUpdate:modelValue": h[10] || (h[10] = (m) => a.intensity = m),
5559
5559
  class: "intensity-input",
5560
5560
  onInput: l
5561
5561
  }, null, 544), [
@@ -5567,17 +5567,17 @@ const qr = {
5567
5567
  ]
5568
5568
  ])
5569
5569
  ])
5570
- ])) : J("", !0),
5571
- r.selectedObject ? (R(), P("div", aa, [
5572
- d[31] || (d[31] = C("label", null, "材质", -1)),
5570
+ ])) : Z("", !0),
5571
+ u.selectedObject ? (R(), P("div", aa, [
5572
+ h[31] || (h[31] = C("label", null, "材质", -1)),
5573
5573
  C("div", la, [
5574
- d[28] || (d[28] = C("span", { class: "slider-label" }, "金属度", -1)),
5574
+ h[28] || (h[28] = C("span", { class: "slider-label" }, "金属度", -1)),
5575
5575
  k(C("input", {
5576
5576
  type: "range",
5577
5577
  min: "0",
5578
5578
  max: "1",
5579
5579
  step: "0.01",
5580
- "onUpdate:modelValue": d[11] || (d[11] = (g) => i.metalness = g),
5580
+ "onUpdate:modelValue": h[11] || (h[11] = (m) => i.metalness = m),
5581
5581
  onInput: c
5582
5582
  }, null, 544), [
5583
5583
  [
@@ -5590,13 +5590,13 @@ const qr = {
5590
5590
  C("span", Aa, ne(i.metalness.toFixed(2)), 1)
5591
5591
  ]),
5592
5592
  C("div", ca, [
5593
- d[29] || (d[29] = C("span", { class: "slider-label" }, "粗糙度", -1)),
5593
+ h[29] || (h[29] = C("span", { class: "slider-label" }, "粗糙度", -1)),
5594
5594
  k(C("input", {
5595
5595
  type: "range",
5596
5596
  min: "0",
5597
5597
  max: "1",
5598
5598
  step: "0.01",
5599
- "onUpdate:modelValue": d[12] || (d[12] = (g) => i.roughness = g),
5599
+ "onUpdate:modelValue": h[12] || (h[12] = (m) => i.roughness = m),
5600
5600
  onInput: c
5601
5601
  }, null, 544), [
5602
5602
  [
@@ -5609,13 +5609,13 @@ const qr = {
5609
5609
  C("span", ua, ne(i.roughness.toFixed(2)), 1)
5610
5610
  ]),
5611
5611
  C("div", da, [
5612
- d[30] || (d[30] = C("span", { class: "slider-label" }, "透明度", -1)),
5612
+ h[30] || (h[30] = C("span", { class: "slider-label" }, "透明度", -1)),
5613
5613
  k(C("input", {
5614
5614
  type: "range",
5615
5615
  min: "0",
5616
5616
  max: "1",
5617
5617
  step: "0.01",
5618
- "onUpdate:modelValue": d[13] || (d[13] = (g) => i.opacity = g),
5618
+ "onUpdate:modelValue": h[13] || (h[13] = (m) => i.opacity = m),
5619
5619
  onInput: c
5620
5620
  }, null, 544), [
5621
5621
  [
@@ -5627,8 +5627,8 @@ const qr = {
5627
5627
  ]),
5628
5628
  C("span", ha, ne(i.opacity.toFixed(2)), 1)
5629
5629
  ]),
5630
- o.value ? J("", !0) : (R(), P("div", fa, " ⚠️ 当前材质不支持金属度/粗糙度(仅支持 Standard/Phong) "))
5631
- ])) : J("", !0)
5630
+ o.value ? Z("", !0) : (R(), P("div", fa, " ⚠️ 当前材质不支持金属度/粗糙度(仅支持 Standard/Phong) "))
5631
+ ])) : Z("", !0)
5632
5632
  ]));
5633
5633
  }
5634
5634
  }), ma = /* @__PURE__ */ Se(pa, [["__scopeId", "data-v-4cecf018"]]), ga = { class: "userdata-tab" }, ba = { class: "property-group userdata-group" }, Ca = { class: "userdata-add-row" }, Ia = ["onKeyup"], ya = {
@@ -5669,7 +5669,7 @@ const qr = {
5669
5669
  });
5670
5670
  a.value = y;
5671
5671
  }
5672
- function u(x) {
5672
+ function d(x) {
5673
5673
  const y = x.trim();
5674
5674
  if (y === "true") return !0;
5675
5675
  if (y === "false") return !1;
@@ -5692,16 +5692,16 @@ const qr = {
5692
5692
  t.value = "";
5693
5693
  return;
5694
5694
  }
5695
- const y = u(n.value);
5695
+ const y = d(n.value);
5696
5696
  e.selectedObject.userData[x] = y, A(e.selectedObject), t.value = "", n.value = "";
5697
5697
  }
5698
- function h(x, y) {
5698
+ function u(x, y) {
5699
5699
  e.selectedObject && (delete e.selectedObject.userData[x], A(e.selectedObject));
5700
5700
  }
5701
- function d(x) {
5701
+ function h(x) {
5702
5702
  return x.length <= 28 ? x : x.substring(0, 28) + "…";
5703
5703
  }
5704
- function g(x) {
5704
+ function m(x) {
5705
5705
  s.value = x;
5706
5706
  const y = e.selectedObject;
5707
5707
  if (!y) return;
@@ -5729,7 +5729,7 @@ const qr = {
5729
5729
  o.value = "JSON 格式错误:" + y.message;
5730
5730
  }
5731
5731
  }
5732
- function m(x) {
5732
+ function g(x) {
5733
5733
  const y = e.selectedObject;
5734
5734
  if (!y) return;
5735
5735
  const v = i.value.trim();
@@ -5787,7 +5787,7 @@ const qr = {
5787
5787
  }, " + ")
5788
5788
  ]),
5789
5789
  a.value.length > 0 ? (R(), P("div", ya, [
5790
- (R(!0), P(Pe, null, Ut(a.value, (v, M) => (R(), P("div", {
5790
+ (R(!0), P(Pe, null, Ft(a.value, (v, M) => (R(), P("div", {
5791
5791
  key: v.key,
5792
5792
  class: oe(["userdata-item", {
5793
5793
  readonly: v.key === "isMovable",
@@ -5797,14 +5797,14 @@ const qr = {
5797
5797
  C("span", xa, ne(v.key), 1),
5798
5798
  v.key === "isMovable" ? (R(), P("span", va, ne(String(v.value)) + " 🔒 ", 1)) : v.key !== "isMovable" ? (R(), P(Pe, { key: 1 }, [
5799
5799
  s.value !== v.key ? (R(), P(Pe, { key: 0 }, [
5800
- C("span", Sa, ne(d(v.value)), 1),
5800
+ C("span", Sa, ne(h(v.value)), 1),
5801
5801
  C("button", {
5802
5802
  class: "ud-btn edit-json-btn",
5803
5803
  title: "编辑对象",
5804
- onClick: (L) => g(v.key)
5804
+ onClick: (L) => m(v.key)
5805
5805
  }, " ✎ ", 8, Ta)
5806
5806
  ], 64)) : (R(), P(Pe, { key: 1 }, [
5807
- o.value ? (R(), P("div", Ma, " ⚠ " + ne(o.value), 1)) : J("", !0),
5807
+ o.value ? (R(), P("div", Ma, " ⚠ " + ne(o.value), 1)) : Z("", !0),
5808
5808
  k(C("textarea", {
5809
5809
  "onUpdate:modelValue": y[2] || (y[2] = (L) => i.value = L),
5810
5810
  class: oe(["ud-json-textarea", { "has-error": o.value }]),
@@ -5817,7 +5817,7 @@ const qr = {
5817
5817
  C("button", {
5818
5818
  class: "ud-btn apply-btn",
5819
5819
  title: "应用修改",
5820
- onClick: (L) => m(v.key)
5820
+ onClick: (L) => g(v.key)
5821
5821
  }, " ✓ ", 8, Ra),
5822
5822
  C("button", {
5823
5823
  class: "ud-btn cancel-btn",
@@ -5830,9 +5830,9 @@ const qr = {
5830
5830
  key: 2,
5831
5831
  class: "ud-btn del-btn",
5832
5832
  title: "删除",
5833
- onClick: (L) => h(v.key)
5834
- }, " ✕ ", 8, Ea)) : J("", !0)
5835
- ], 64)) : J("", !0)
5833
+ onClick: (L) => u(v.key)
5834
+ }, " ✕ ", 8, Ea)) : Z("", !0)
5835
+ ], 64)) : Z("", !0)
5836
5836
  ], 2))), 128))
5837
5837
  ])) : (R(), P("div", ka, "暂无自定义数据")),
5838
5838
  C("button", {
@@ -5849,22 +5849,22 @@ const qr = {
5849
5849
  },
5850
5850
  setup(r) {
5851
5851
  const e = r, t = W(""), n = W([]), s = W(!0), i = W(0.1), o = W(""), a = W(""), l = W(""), A = W("");
5852
- let u = h(), c = !1;
5853
- function h() {
5854
- const m = e.selectedObject;
5855
- return m ? Ht(Ft(m)) : null;
5852
+ let d = u(), c = !1;
5853
+ function u() {
5854
+ const g = e.selectedObject;
5855
+ return g ? Ut(jt(g)) : null;
5856
5856
  }
5857
- be(s, (m) => {
5858
- c || !u || (u.visible = m);
5859
- }), be(i, (m) => {
5860
- c || !u || u.setOffsetY(m);
5857
+ be(s, (g) => {
5858
+ c || !d || (d.visible = g);
5859
+ }), be(i, (g) => {
5860
+ c || !d || d.setOffsetY(g);
5861
5861
  });
5862
- function d() {
5863
- c || !u || (u.setTitle(t.value), u.setItems([...n.value]));
5862
+ function h() {
5863
+ c || !d || (d.setTitle(t.value), d.setItems([...n.value]));
5864
5864
  }
5865
- be(t, () => d()), be(n, () => d(), { deep: !0 });
5866
- function g(m) {
5867
- n.value = n.value.filter((p, I) => I !== m), d();
5865
+ be(t, () => h()), be(n, () => h(), { deep: !0 });
5866
+ function m(g) {
5867
+ n.value = n.value.filter((p, I) => I !== g), h();
5868
5868
  }
5869
5869
  function f() {
5870
5870
  !o.value.trim() || !a.value.trim() || (n.value = [
@@ -5875,17 +5875,17 @@ const qr = {
5875
5875
  unit: l.value.trim() || void 0,
5876
5876
  code: A.value.trim() || void 0
5877
5877
  }
5878
- ], d(), o.value = "", a.value = "", l.value = "", A.value = "");
5878
+ ], h(), o.value = "", a.value = "", l.value = "", A.value = "");
5879
5879
  }
5880
5880
  return be(
5881
5881
  () => e.selectedObject,
5882
5882
  () => {
5883
- c = !0, u = h(), u ? (t.value = u.getTitle(), n.value = u.getItems(), s.value = u.visible, i.value = u.getOffsetY()) : (t.value = "", n.value = [], s.value = !0, i.value = 0.1), o.value = "", a.value = "", l.value = "", A.value = "", setTimeout(() => {
5883
+ c = !0, d = u(), d ? (t.value = d.getTitle(), n.value = d.getItems(), s.value = d.visible, i.value = d.getOffsetY()) : (t.value = "", n.value = [], s.value = !0, i.value = 0.1), o.value = "", a.value = "", l.value = "", A.value = "", setTimeout(() => {
5884
5884
  c = !1;
5885
5885
  }, 0);
5886
5886
  },
5887
5887
  { immediate: !0 }
5888
- ), (m, p) => (R(), P("div", Na, [
5888
+ ), (g, p) => (R(), P("div", Na, [
5889
5889
  C("div", Oa, [
5890
5890
  p[14] || (p[14] = C("label", null, "📊 数据面板", -1)),
5891
5891
  C("div", Da, [
@@ -5940,7 +5940,7 @@ const qr = {
5940
5940
  C("div", Ka, [
5941
5941
  p[13] || (p[13] = C("span", { class: "dp-label-sm" }, "数据项", -1)),
5942
5942
  C("div", Ba, [
5943
- (R(!0), P(Pe, null, Ut(n.value, (I, x) => (R(), P("div", {
5943
+ (R(!0), P(Pe, null, Ft(n.value, (I, x) => (R(), P("div", {
5944
5944
  key: x,
5945
5945
  class: "dp-item"
5946
5946
  }, [
@@ -5978,7 +5978,7 @@ const qr = {
5978
5978
  ]),
5979
5979
  C("button", {
5980
5980
  class: "dp-btn dp-btn-del",
5981
- onClick: (y) => g(x),
5981
+ onClick: (y) => m(x),
5982
5982
  title: "删除此项"
5983
5983
  }, "✕", 8, Ja)
5984
5984
  ]))), 128))
@@ -6076,30 +6076,30 @@ const el = {
6076
6076
  emits: ["propertyChange", "treeSelect", "treeDelete", "transformModeChange"],
6077
6077
  setup(r, { emit: e }) {
6078
6078
  const t = r, n = e, s = W("translate");
6079
- function i(g) {
6080
- s.value = g, n("transformModeChange", g);
6079
+ function i(m) {
6080
+ s.value = m, n("transformModeChange", m);
6081
6081
  }
6082
6082
  const o = () => n("propertyChange"), a = W("transform"), l = $e(() => {
6083
- var g;
6084
- return !!(t.selectedObject && ((g = t.selectedObject.userData) != null && g._hasDataPanel));
6085
- }), A = W(0), u = Mn(t, "selectedObject"), { expandedSet: c, toggleExpand: h } = $a(u);
6086
- wn("treeExpand", { expandedSet: c, toggleExpand: h });
6087
- const d = (g) => {
6088
- A.value++, n("treeDelete", g);
6083
+ var m;
6084
+ return !!(t.selectedObject && ((m = t.selectedObject.userData) != null && m._hasDataPanel));
6085
+ }), A = W(0), d = Mn(t, "selectedObject"), { expandedSet: c, toggleExpand: u } = $a(d);
6086
+ wn("treeExpand", { expandedSet: c, toggleExpand: u });
6087
+ const h = (m) => {
6088
+ A.value++, n("treeDelete", m);
6089
6089
  };
6090
- return (g, f) => r.transform ? (R(), P("div", el, [
6090
+ return (m, f) => m.transform ? (R(), P("div", el, [
6091
6091
  C("div", tl, [
6092
6092
  f[7] || (f[7] = C("label", null, "场景物体", -1)),
6093
6093
  C("div", sl, [
6094
- (R(!0), P(Pe, null, Ut(r.treeData, (m) => (R(), Pt(_r, {
6095
- key: m.uuid,
6096
- node: m,
6097
- "selected-object": r.selectedObject,
6094
+ (R(!0), P(Pe, null, Ft(m.treeData, (g) => (R(), nt(_r, {
6095
+ key: g.uuid,
6096
+ node: g,
6097
+ "selected-object": m.selectedObject,
6098
6098
  version: A.value,
6099
6099
  onSelect: f[0] || (f[0] = (p) => n("treeSelect", p)),
6100
- onDelete: d
6100
+ onDelete: h
6101
6101
  }, null, 8, ["node", "selected-object", "version"]))), 128)),
6102
- r.treeData.length === 0 ? (R(), P("div", nl, "暂无物体")) : J("", !0)
6102
+ m.treeData.length === 0 ? (R(), P("div", nl, "暂无物体")) : Z("", !0)
6103
6103
  ])
6104
6104
  ]),
6105
6105
  C("div", il, [
@@ -6108,53 +6108,53 @@ const el = {
6108
6108
  C("button", {
6109
6109
  class: oe(["mode-btn", { active: s.value === "translate" }]),
6110
6110
  title: "移动 (W)",
6111
- onClick: f[1] || (f[1] = (m) => i("translate"))
6111
+ onClick: f[1] || (f[1] = (g) => i("translate"))
6112
6112
  }, " ↕ 移动 ", 2),
6113
6113
  C("button", {
6114
6114
  class: oe(["mode-btn", { active: s.value === "rotate" }]),
6115
6115
  title: "旋转 (E)",
6116
- onClick: f[2] || (f[2] = (m) => i("rotate"))
6116
+ onClick: f[2] || (f[2] = (g) => i("rotate"))
6117
6117
  }, " ↻ 旋转 ", 2),
6118
6118
  C("button", {
6119
6119
  class: oe(["mode-btn", { active: s.value === "scale" }]),
6120
6120
  title: "缩放 (R)",
6121
- onClick: f[3] || (f[3] = (m) => i("scale"))
6121
+ onClick: f[3] || (f[3] = (g) => i("scale"))
6122
6122
  }, " ⤡ 缩放 ", 2)
6123
6123
  ])
6124
6124
  ]),
6125
- r.selectedObject ? (R(), P("div", rl, [
6125
+ m.selectedObject ? (R(), P("div", rl, [
6126
6126
  C("button", {
6127
6127
  class: oe(["tab-btn", { active: a.value === "transform" }]),
6128
- onClick: f[4] || (f[4] = (m) => a.value = "transform")
6128
+ onClick: f[4] || (f[4] = (g) => a.value = "transform")
6129
6129
  }, " 🔄 变换 ", 2),
6130
6130
  C("button", {
6131
6131
  class: oe(["tab-btn", { active: a.value === "userdata" }]),
6132
- onClick: f[5] || (f[5] = (m) => a.value = "userdata")
6132
+ onClick: f[5] || (f[5] = (g) => a.value = "userdata")
6133
6133
  }, " 📋 自定义数据 ", 2),
6134
6134
  l.value ? (R(), P("button", {
6135
6135
  key: 0,
6136
6136
  class: oe(["tab-btn", { active: a.value === "datapanel" }]),
6137
- onClick: f[6] || (f[6] = (m) => a.value = "datapanel")
6138
- }, " 📊 数据面板 ", 2)) : J("", !0)
6139
- ])) : J("", !0),
6140
- r.selectedObject ? (R(), P("div", al, [
6141
- k(St(ma, {
6142
- transform: r.transform,
6143
- "selected-object": r.selectedObject,
6137
+ onClick: f[6] || (f[6] = (g) => a.value = "datapanel")
6138
+ }, " 📊 数据面板 ", 2)) : Z("", !0)
6139
+ ])) : Z("", !0),
6140
+ m.selectedObject ? (R(), P("div", al, [
6141
+ k(Gt(ma, {
6142
+ transform: m.transform,
6143
+ "selected-object": m.selectedObject,
6144
6144
  onPropertyChange: o
6145
6145
  }, null, 8, ["transform", "selected-object"]), [
6146
6146
  [Le, a.value === "transform"]
6147
6147
  ]),
6148
- k(St(La, { "selected-object": r.selectedObject }, null, 8, ["selected-object"]), [
6148
+ k(Gt(La, { "selected-object": m.selectedObject }, null, 8, ["selected-object"]), [
6149
6149
  [Le, a.value === "userdata"]
6150
6150
  ]),
6151
- k(St(_a, { "selected-object": r.selectedObject }, null, 8, ["selected-object"]), [
6151
+ k(Gt(_a, { "selected-object": m.selectedObject }, null, 8, ["selected-object"]), [
6152
6152
  [Le, a.value === "datapanel"]
6153
6153
  ])
6154
- ])) : J("", !0)
6155
- ])) : (R(), P("div", ll, [...f[9] || (f[9] = [
6154
+ ])) : Z("", !0)
6155
+ ])) : (R(), P("div", ll, f[9] || (f[9] = [
6156
6156
  C("p", null, "未选中任何模型", -1)
6157
- ])]));
6157
+ ])));
6158
6158
  }
6159
6159
  }), cl = /* @__PURE__ */ Se(Al, [["__scopeId", "data-v-c92c9fa7"]]), ul = { class: "top-bar" }, dl = { class: "left-section" }, hl = { class: "dropdown-menu" }, fl = { class: "dropdown-menu sub-menu" }, pl = { class: "dropdown-menu sub-menu" }, ml = { class: "dropdown-menu" }, gl = /* @__PURE__ */ ve({
6160
6160
  __name: "TopBar",
@@ -6164,46 +6164,46 @@ const el = {
6164
6164
  var f;
6165
6165
  return (f = a.value) == null ? void 0 : f.click();
6166
6166
  }, A = (f) => {
6167
- const m = f.target;
6168
- m.files && m.files.length > 0 && (o("importModel", m.files[0]), m.value = "");
6169
- }, u = () => console.log("撤销"), c = () => console.log("删除物体"), h = async () => {
6167
+ const g = f.target;
6168
+ g.files && g.files.length > 0 && (o("importModel", g.files[0]), g.value = "");
6169
+ }, d = () => console.log("撤销"), c = () => console.log("删除物体"), u = async () => {
6170
6170
  const f = qo();
6171
6171
  console.log(JSON.parse(await f));
6172
- }, d = () => {
6172
+ }, h = () => {
6173
6173
  if (!localStorage.getItem("test_id")) return localStorage.setItem("test_id", "123");
6174
6174
  dn(localStorage.getItem("test_id"));
6175
- }, g = () => An();
6176
- return (f, m) => (R(), P("div", ul, [
6175
+ }, m = () => An();
6176
+ return (f, g) => (R(), P("div", ul, [
6177
6177
  C("div", dl, [
6178
6178
  C("div", {
6179
6179
  class: "dropdown-wrapper",
6180
- onMouseenter: m[9] || (m[9] = (p) => n.value = !0),
6181
- onMouseleave: m[10] || (m[10] = (p) => n.value = !1)
6180
+ onMouseenter: g[9] || (g[9] = (p) => n.value = !0),
6181
+ onMouseleave: g[10] || (g[10] = (p) => n.value = !1)
6182
6182
  }, [
6183
- m[15] || (m[15] = C("button", { class: "menu-btn" }, "添加", -1)),
6183
+ g[15] || (g[15] = C("button", { class: "menu-btn" }, "添加", -1)),
6184
6184
  k(C("div", hl, [
6185
6185
  C("div", {
6186
6186
  class: "menu-item",
6187
- onClick: u
6187
+ onClick: d
6188
6188
  }, "组"),
6189
6189
  C("div", {
6190
6190
  class: "menu-item dropdown-wrapper sub-trigger",
6191
- onMouseenter: m[3] || (m[3] = (p) => s.value = !0),
6192
- onMouseleave: m[4] || (m[4] = (p) => s.value = !1)
6191
+ onMouseenter: g[3] || (g[3] = (p) => s.value = !0),
6192
+ onMouseleave: g[4] || (g[4] = (p) => s.value = !1)
6193
6193
  }, [
6194
- m[13] || (m[13] = C("span", null, "网格", -1)),
6194
+ g[13] || (g[13] = C("span", null, "网格", -1)),
6195
6195
  k(C("div", fl, [
6196
6196
  C("div", {
6197
6197
  class: "menu-item",
6198
- onClick: m[0] || (m[0] = (p) => o("addModel", "box"))
6198
+ onClick: g[0] || (g[0] = (p) => o("addModel", "box"))
6199
6199
  }, " 正方体 "),
6200
6200
  C("div", {
6201
6201
  class: "menu-item",
6202
- onClick: m[1] || (m[1] = (p) => o("addModel", "sphere"))
6202
+ onClick: g[1] || (g[1] = (p) => o("addModel", "sphere"))
6203
6203
  }, " 球体 "),
6204
6204
  C("div", {
6205
6205
  class: "menu-item",
6206
- onClick: m[2] || (m[2] = (p) => o("addModel", "waterPlane"))
6206
+ onClick: g[2] || (g[2] = (p) => o("addModel", "waterPlane"))
6207
6207
  }, " 水面 "),
6208
6208
  C("div", {
6209
6209
  class: "menu-item",
@@ -6215,14 +6215,14 @@ const el = {
6215
6215
  ], 32),
6216
6216
  C("div", {
6217
6217
  class: "menu-item dropdown-wrapper sub-trigger",
6218
- onMouseenter: m[6] || (m[6] = (p) => i.value = !0),
6219
- onMouseleave: m[7] || (m[7] = (p) => i.value = !1)
6218
+ onMouseenter: g[6] || (g[6] = (p) => i.value = !0),
6219
+ onMouseleave: g[7] || (g[7] = (p) => i.value = !1)
6220
6220
  }, [
6221
- m[14] || (m[14] = C("span", null, "光源", -1)),
6221
+ g[14] || (g[14] = C("span", null, "光源", -1)),
6222
6222
  k(C("div", pl, [
6223
6223
  C("div", {
6224
6224
  class: "menu-item",
6225
- onClick: m[5] || (m[5] = (p) => o("addModel", "directionalLight"))
6225
+ onClick: g[5] || (g[5] = (p) => o("addModel", "directionalLight"))
6226
6226
  }, " 平行光 ")
6227
6227
  ], 512), [
6228
6228
  [Le, i.value]
@@ -6234,7 +6234,7 @@ const el = {
6234
6234
  }, "摄像机"),
6235
6235
  C("div", {
6236
6236
  class: "menu-item",
6237
- onClick: m[8] || (m[8] = (p) => o("addModel", "dataPanel"))
6237
+ onClick: g[8] || (g[8] = (p) => o("addModel", "dataPanel"))
6238
6238
  }, " 数据面板 ")
6239
6239
  ], 512), [
6240
6240
  [Le, n.value]
@@ -6242,29 +6242,29 @@ const el = {
6242
6242
  ], 32),
6243
6243
  C("div", {
6244
6244
  class: "dropdown-wrapper",
6245
- onMouseenter: m[11] || (m[11] = (p) => t.value = !0),
6246
- onMouseleave: m[12] || (m[12] = (p) => t.value = !1)
6245
+ onMouseenter: g[11] || (g[11] = (p) => t.value = !0),
6246
+ onMouseleave: g[12] || (g[12] = (p) => t.value = !1)
6247
6247
  }, [
6248
- m[16] || (m[16] = C("button", { class: "menu-btn" }, "帮助", -1)),
6248
+ g[16] || (g[16] = C("button", { class: "menu-btn" }, "帮助", -1)),
6249
6249
  k(C("div", ml, [
6250
6250
  C("div", {
6251
6251
  class: "menu-item",
6252
- onClick: h
6252
+ onClick: u
6253
6253
  }, "获取场景"),
6254
6254
  C("div", {
6255
6255
  class: "menu-item",
6256
- onClick: d
6256
+ onClick: h
6257
6257
  }, "镜头拉近"),
6258
6258
  C("div", {
6259
6259
  class: "menu-item",
6260
- onClick: g
6260
+ onClick: m
6261
6261
  }, " 重置相机位置 ")
6262
6262
  ], 512), [
6263
6263
  [Le, t.value]
6264
6264
  ])
6265
6265
  ], 32)
6266
6266
  ]),
6267
- m[17] || (m[17] = C("div", { class: "right-section" }, [
6267
+ g[17] || (g[17] = C("div", { class: "right-section" }, [
6268
6268
  C("span", { class: "app-title" }, "3D 模型编辑器")
6269
6269
  ], -1)),
6270
6270
  C("input", {
@@ -6280,14 +6280,14 @@ const el = {
6280
6280
  }), bl = /* @__PURE__ */ Se(gl, [["__scopeId", "data-v-45df3361"]]), Cl = { class: "bottom-bar" }, Il = /* @__PURE__ */ ve({
6281
6281
  __name: "BottomBar",
6282
6282
  setup(r) {
6283
- return (e, t) => (R(), P("div", Cl, [...t[0] || (t[0] = [
6283
+ return (e, t) => (R(), P("div", Cl, t[0] || (t[0] = [
6284
6284
  C("div", { class: "status-left" }, [
6285
6285
  C("span", null, "就绪")
6286
6286
  ], -1),
6287
6287
  C("div", { class: "status-right" }, [
6288
6288
  C("span", null, "顶点: 0 | 面: 0")
6289
6289
  ], -1)
6290
- ])]));
6290
+ ])));
6291
6291
  }
6292
6292
  }), yl = /* @__PURE__ */ Se(Il, [["__scopeId", "data-v-3427bb27"]]), xl = { class: "app-layout" }, vl = {
6293
6293
  key: 0,
@@ -6336,57 +6336,58 @@ const el = {
6336
6336
  } catch (I) {
6337
6337
  console.error("导入失败:", I), alert("导入失败:" + I.message);
6338
6338
  }
6339
- }, u = bs([]);
6339
+ }, d = bs([]);
6340
6340
  Ko((p) => {
6341
- u.value = p;
6341
+ d.value = p;
6342
6342
  });
6343
6343
  const c = () => {
6344
6344
  const p = Bo();
6345
- p && (u.value = p);
6346
- }, h = (p) => fs(p), d = (p) => jo(p.uuid), g = (p) => {
6345
+ p && (d.value = p);
6346
+ }, u = (p) => fs(p), h = (p) => jo(p.uuid), m = (p) => {
6347
6347
  Ro(p);
6348
- }, f = W(null), m = () => {
6348
+ }, f = W(null), g = () => {
6349
6349
  f.value && mo(f.value, e.mode, e.sceneData), c();
6350
6350
  };
6351
6351
  return Rn(() => {
6352
- m(), f.value && co(f.value);
6352
+ g(), f.value && co(f.value);
6353
6353
  }), En(() => {
6354
6354
  console.log("endset_three_editor destroy"), Jo();
6355
6355
  }), (p, I) => (R(), P("div", xl, [
6356
- t.value ? (R(), P("div", vl, [...I[0] || (I[0] = [
6356
+ t.value ? (R(), P("div", vl, I[0] || (I[0] = [
6357
6357
  C("div", { class: "loading-spinner" }, null, -1),
6358
6358
  C("div", { class: "loading-text" }, "加载中...", -1)
6359
- ])])) : J("", !0),
6360
- St(bl, {
6359
+ ]))) : Z("", !0),
6360
+ p.mode === "edit" ? (R(), nt(bl, {
6361
+ key: 1,
6361
6362
  onAddModel: l,
6362
6363
  onImportModel: A
6363
- }),
6364
+ })) : Z("", !0),
6364
6365
  C("div", {
6365
- class: oe(`editor-container editor-container-mode-${r.mode}`)
6366
+ class: oe(`editor-container editor-container-mode-${p.mode}`)
6366
6367
  }, [
6367
6368
  C("div", {
6368
- class: oe(`canvas canvas-mode-${r.mode}`),
6369
+ class: oe(`canvas canvas-mode-${p.mode}`),
6369
6370
  ref_key: "containerRef",
6370
6371
  ref: f
6371
6372
  }, null, 2),
6372
- r.mode === "edit" ? (R(), Pt(cl, {
6373
+ p.mode === "edit" ? (R(), nt(cl, {
6373
6374
  key: 0,
6374
6375
  transform: s,
6375
- "tree-data": u.value,
6376
+ "tree-data": d.value,
6376
6377
  "selected-object": n.value,
6377
6378
  onPropertyChange: a,
6378
- onTreeSelect: h,
6379
- onTreeDelete: d,
6380
- onTransformModeChange: g
6381
- }, null, 8, ["transform", "tree-data", "selected-object"])) : J("", !0)
6379
+ onTreeSelect: u,
6380
+ onTreeDelete: h,
6381
+ onTransformModeChange: m
6382
+ }, null, 8, ["transform", "tree-data", "selected-object"])) : Z("", !0)
6382
6383
  ], 2),
6383
- r.mode === "edit" ? (R(), Pt(yl, { key: 1 })) : J("", !0)
6384
+ p.mode === "edit" ? (R(), nt(yl, { key: 2 })) : Z("", !0)
6384
6385
  ]));
6385
6386
  }
6386
- }), Nl = /* @__PURE__ */ Se(Sl, [["__scopeId", "data-v-4d46879e"]]);
6387
+ }), Nl = /* @__PURE__ */ Se(Sl, [["__scopeId", "data-v-b3d90c56"]]);
6387
6388
  export {
6388
6389
  yl as BottomBar,
6389
- ut as DataPanel,
6390
+ dt as DataPanel,
6390
6391
  Nl as DrawingBoard,
6391
6392
  cl as PropertyPanel,
6392
6393
  bl as TopBar,
@@ -6405,7 +6406,7 @@ export {
6405
6406
  Po as focusOnObject,
6406
6407
  El as getCSS2DRenderer,
6407
6408
  Xo as getCamera,
6408
- Ht as getDataPanel,
6409
+ Ut as getDataPanel,
6409
6410
  Ll as getRenderer,
6410
6411
  Pl as getScene,
6411
6412
  Bo as getSceneObjects,