endset_three_editor 0.6.2 → 0.6.4

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 gn = Object.defineProperty;
2
2
  var bn = (r, e, t) => e in r ? gn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
3
  var Ue = (r, e, t) => bn(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { toRaw as Wt, defineComponent as ve, ref as W, inject as Cn, computed as $e, watchEffect as In, resolveComponent as yn, openBlock as R, createElementBlock as P, createElementVNode as C, normalizeClass as oe, withModifiers as Yt, unref as xn, toDisplayString as ne, Fragment as Pe, renderList as jt, createBlock as nt, createCommentVNode as Z, reactive as _t, watch as be, withDirectives as k, vModelText as D, withKeys as ze, vModelCheckbox as vn, toRef as Sn, provide as Tn, createVNode as zt, vShow as Le, shallowRef as ms, onMounted as Mn, onBeforeUnmount as wn } from "vue";
4
+ import { toRaw as Wt, defineComponent as ve, ref as N, inject as Cn, computed as $e, watchEffect as In, resolveComponent as yn, openBlock as R, createElementBlock as P, createElementVNode as b, normalizeClass as oe, withModifiers as Yt, unref as xn, toDisplayString as B, Fragment as Pe, renderList as jt, createBlock as nt, createCommentVNode as X, reactive as _t, watch as le, withDirectives as k, vModelText as O, withKeys as ze, vModelCheckbox as vn, toRef as Sn, provide as Tn, createVNode as zt, vShow as Le, shallowRef as ms, onMounted as Mn, onBeforeUnmount as wn } from "vue";
5
5
  import * as w from "three";
6
- import { Controls as qs, Vector3 as T, MOUSE as Ke, TOUCH as Ge, Quaternion as J, Spherical as gs, Vector2 as F, Ray as Rn, Plane as En, MathUtils as Vs, Raycaster as kn, 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 Pn, Euler as Ln, Matrix4 as fe, PlaneGeometry as Nn, DoubleSide as Pt, OrthographicCamera as Js, ShaderMaterial as ke, UniformsUtils as ls, WebGLRenderTarget as ge, HalfFloatType as Re, NoBlending as $t, Timer as On, Color as B, RawShaderMaterial as Dn, ColorManagement as Lt, SRGBTransfer as Wn, LinearToneMapping as jn, ReinhardToneMapping as Fn, CineonToneMapping as Un, ACESFilmicToneMapping as Hn, AgXToneMapping as zn, NeutralToneMapping as Gn, CustomToneMapping as Kn, MeshDepthMaterial as Bn, RGBADepthPacking as Zn, AdditiveBlending as Xn, Loader as As, FileLoader as ct, SRGBColorSpace as he, Group as Tt, Material as ot, PointsMaterial as et, MeshPhongMaterial as qn, LineSegments as es, Points as Mt, TrianglesDrawMode as Vn, TriangleFanDrawMode as ts, TriangleStripDrawMode as Qs, LoaderUtils as rt, MeshPhysicalMaterial as ce, LinearSRGBColorSpace as Ae, SpotLight as Jn, PointLight as Qn, DirectionalLight as Yn, InstancedMesh as _n, InstancedBufferAttribute as $n, TextureLoader as ei, ImageBitmapLoader as ti, BufferAttribute as at, InterleavedBuffer as Ys, InterleavedBufferAttribute as _s, LinearMipmapLinearFilter as $s, NearestMipmapLinearFilter as si, LinearMipmapNearestFilter as ni, NearestMipmapNearestFilter as ii, LinearFilter as ss, NearestFilter as en, RepeatWrapping as ns, MirroredRepeatWrapping as oi, ClampToEdgeWrapping as ri, MeshStandardMaterial as tn, PropertyBinding as ai, SkinnedMesh as li, LineLoop as Ai, PerspectiveCamera as ci, Skeleton as ui, AnimationClip as di, Bone as hi, InterpolateDiscrete as fi, InterpolateLinear as sn, Texture as bs, VectorKeyframeTrack as Cs, NumberKeyframeTrack as Is, QuaternionKeyframeTrack as ys, FrontSide as pi, Interpolant as mi, Box3 as gi, Sphere as bi } from "three";
6
+ import { Controls as qs, Vector3 as M, MOUSE as Ke, TOUCH as Ge, Quaternion as Q, Spherical as gs, Vector2 as F, Ray as Rn, Plane as En, MathUtils as Vs, Raycaster as kn, Object3D as Ze, MeshBasicMaterial as Oe, LineBasicMaterial as it, CylinderGeometry as V, BoxGeometry as K, BufferGeometry as De, Float32BufferAttribute as Ae, Mesh as T, OctahedronGeometry as gt, Line as he, TorusGeometry as Ve, SphereGeometry as Pn, Euler as Ln, Matrix4 as pe, PlaneGeometry as On, DoubleSide as Pt, OrthographicCamera as Js, ShaderMaterial as ke, UniformsUtils as ls, WebGLRenderTarget as be, HalfFloatType as Re, NoBlending as $t, Timer as Nn, Color as Z, RawShaderMaterial as Dn, ColorManagement as Lt, SRGBTransfer as Wn, LinearToneMapping as jn, ReinhardToneMapping as Fn, CineonToneMapping as Un, ACESFilmicToneMapping as Hn, AgXToneMapping as zn, NeutralToneMapping as Gn, CustomToneMapping as Kn, MeshDepthMaterial as Bn, RGBADepthPacking as Zn, AdditiveBlending as Xn, Loader as As, FileLoader as ct, SRGBColorSpace as fe, Group as Tt, Material as ot, PointsMaterial as et, MeshPhongMaterial as qn, LineSegments as es, Points as Mt, TrianglesDrawMode as Vn, TriangleFanDrawMode as ts, TriangleStripDrawMode as Qs, LoaderUtils as rt, MeshPhysicalMaterial as ue, LinearSRGBColorSpace as ce, SpotLight as Jn, PointLight as Qn, DirectionalLight as Yn, InstancedMesh as _n, InstancedBufferAttribute as $n, TextureLoader as ei, ImageBitmapLoader as ti, BufferAttribute as at, InterleavedBuffer as Ys, InterleavedBufferAttribute as _s, LinearMipmapLinearFilter as $s, NearestMipmapLinearFilter as si, LinearMipmapNearestFilter as ni, NearestMipmapNearestFilter as ii, LinearFilter as ss, NearestFilter as en, RepeatWrapping as ns, MirroredRepeatWrapping as oi, ClampToEdgeWrapping as ri, MeshStandardMaterial as tn, PropertyBinding as ai, SkinnedMesh as li, LineLoop as Ai, PerspectiveCamera as ci, Skeleton as ui, AnimationClip as di, Bone as hi, InterpolateDiscrete as fi, InterpolateLinear as sn, Texture as bs, VectorKeyframeTrack as Cs, NumberKeyframeTrack as Is, QuaternionKeyframeTrack as ys, FrontSide as pi, Interpolant as mi, Box3 as gi, Sphere as bi } from "three";
7
7
  import ut from "@tweenjs/tween.js";
8
- const xs = { type: "change" }, cs = { type: "start" }, nn = { type: "end" }, bt = new Rn(), vs = new En(), Ci = Math.cos(70 * Vs.DEG2RAD), z = new T(), V = 2 * Math.PI, N = {
8
+ const xs = { type: "change" }, cs = { type: "start" }, nn = { type: "end" }, bt = new Rn(), vs = new En(), Ci = Math.cos(70 * Vs.DEG2RAD), z = new M(), J = 2 * Math.PI, D = {
9
9
  NONE: -1,
10
10
  ROTATE: 0,
11
11
  DOLLY: 1,
@@ -23,7 +23,7 @@ class Ii extends qs {
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 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 gs(), this._sphericalDelta = new gs(), 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 = xi.bind(this), this._onPointerDown = yi.bind(this), this._onPointerUp = vi.bind(this), this._onContextMenu = ki.bind(this), this._onMouseWheel = Mi.bind(this), this._onKeyDown = wi.bind(this), this._onTouchStart = Ri.bind(this), this._onTouchMove = Ei.bind(this), this._onMouseDown = Si.bind(this), this._onMouseMove = Ti.bind(this), this._interceptControlDown = Pi.bind(this), this._interceptControlUp = Li.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
26
+ super(e, t), this.state = D.NONE, this.target = new M(), this.cursor = new M(), 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 M(), this._lastQuaternion = new Q(), this._lastTargetPosition = new M(), this._quat = new Q().setFromUnitVectors(e.up, new M(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new gs(), this._sphericalDelta = new gs(), this._scale = 1, this._panOffset = new M(), 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 M(), this._mouse = new F(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = xi.bind(this), this._onPointerDown = yi.bind(this), this._onPointerUp = vi.bind(this), this._onContextMenu = ki.bind(this), this._onMouseWheel = Mi.bind(this), this._onKeyDown = wi.bind(this), this._onTouchStart = Ri.bind(this), this._onTouchMove = Ei.bind(this), this._onMouseDown = Si.bind(this), this._onMouseMove = Ti.bind(this), this._interceptControlDown = Pi.bind(this), this._interceptControlUp = Li.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
27
27
  }
28
28
  /**
29
29
  * Defines the visual representation of the cursor.
@@ -96,7 +96,7 @@ class Ii extends qs {
96
96
  * was called, or the initial state.
97
97
  */
98
98
  reset() {
99
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(xs), this.update(), this.state = N.NONE;
99
+ this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(xs), this.update(), this.state = D.NONE;
100
100
  }
101
101
  /**
102
102
  * Programmatically pan the camera.
@@ -141,9 +141,9 @@ class Ii extends qs {
141
141
  }
142
142
  update(e = null) {
143
143
  const t = this.object.position;
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);
144
+ z.copy(t).sub(this.target), z.applyQuaternion(this._quat), this._spherical.setFromVector3(z), this.autoRotate && this.state === D.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 += 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);
146
+ isFinite(n) && isFinite(s) && (n < -Math.PI ? n += J : n > Math.PI && (n -= J), s < -Math.PI ? s += J : s > Math.PI && (s -= J), 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);
@@ -159,11 +159,11 @@ class Ii extends qs {
159
159
  const l = a - o;
160
160
  this.object.position.addScaledVector(this._dollyDirection, l), this.object.updateMatrixWorld(), i = !!l;
161
161
  } else if (this.object.isOrthographicCamera) {
162
- const a = new T(this._mouse.x, this._mouse.y, 0);
162
+ const a = new M(this._mouse.x, this._mouse.y, 0);
163
163
  a.unproject(this.object);
164
164
  const l = this.object.zoom;
165
165
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), i = l !== this.object.zoom;
166
- const A = new T(this._mouse.x, this._mouse.y, 0);
166
+ const A = new M(this._mouse.x, this._mouse.y, 0);
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;
@@ -175,7 +175,7 @@ class Ii extends qs {
175
175
  return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) > Gt || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Gt || this._lastTargetPosition.distanceToSquared(this.target) > Gt ? (this.dispatchEvent(xs), 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 ? V / 60 * this.autoRotateSpeed * e : V / 60 / 60 * this.autoRotateSpeed;
178
+ return e !== null ? J / 60 * this.autoRotateSpeed * e : J / 60 / 60 * this.autoRotateSpeed;
179
179
  }
180
180
  _getZoomScale(e) {
181
181
  const t = Math.abs(e * 0.01);
@@ -234,7 +234,7 @@ class Ii extends qs {
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(V * this._rotateDelta.x / t.clientHeight), this._rotateUp(V * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
237
+ this._rotateLeft(J * this._rotateDelta.x / t.clientHeight), this._rotateUp(J * 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 Ii extends qs {
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(V * 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(J * 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(-V * 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(-J * 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(V * 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(J * 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(-V * 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(-J * 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 Ii extends qs {
298
298
  }
299
299
  this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
300
300
  const t = this.domElement;
301
- this._rotateLeft(V * this._rotateDelta.x / t.clientHeight), this._rotateUp(V * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd);
301
+ this._rotateLeft(J * this._rotateDelta.x / t.clientHeight), this._rotateUp(J * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd);
302
302
  }
303
303
  _handleTouchMovePan(e) {
304
304
  if (this._pointers.length === 1)
@@ -373,7 +373,7 @@ function xi(r) {
373
373
  function vi(r) {
374
374
  switch (this._removePointer(r), this._pointers.length) {
375
375
  case 0:
376
- this.domElement.releasePointerCapture(r.pointerId), this.domElement.ownerDocument.removeEventListener("pointermove", this._onPointerMove), this.domElement.ownerDocument.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(nn), this.state = N.NONE, this._cursorStyle === "grab" && (this.domElement.style.cursor = "grab");
376
+ this.domElement.releasePointerCapture(r.pointerId), this.domElement.ownerDocument.removeEventListener("pointermove", this._onPointerMove), this.domElement.ownerDocument.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(nn), this.state = D.NONE, this._cursorStyle === "grab" && (this.domElement.style.cursor = "grab");
377
377
  break;
378
378
  case 1:
379
379
  const e = this._pointers[0], t = this._pointerPositions[e];
@@ -399,49 +399,49 @@ function Si(r) {
399
399
  switch (e) {
400
400
  case Ke.DOLLY:
401
401
  if (this.enableZoom === !1) return;
402
- this._handleMouseDownDolly(r), this.state = N.DOLLY;
402
+ this._handleMouseDownDolly(r), this.state = D.DOLLY;
403
403
  break;
404
404
  case Ke.ROTATE:
405
405
  if (r.ctrlKey || r.metaKey || r.shiftKey) {
406
406
  if (this.enablePan === !1) return;
407
- this._handleMouseDownPan(r), this.state = N.PAN;
407
+ this._handleMouseDownPan(r), this.state = D.PAN;
408
408
  } else {
409
409
  if (this.enableRotate === !1) return;
410
- this._handleMouseDownRotate(r), this.state = N.ROTATE;
410
+ this._handleMouseDownRotate(r), this.state = D.ROTATE;
411
411
  }
412
412
  break;
413
413
  case Ke.PAN:
414
414
  if (r.ctrlKey || r.metaKey || r.shiftKey) {
415
415
  if (this.enableRotate === !1) return;
416
- this._handleMouseDownRotate(r), this.state = N.ROTATE;
416
+ this._handleMouseDownRotate(r), this.state = D.ROTATE;
417
417
  } else {
418
418
  if (this.enablePan === !1) return;
419
- this._handleMouseDownPan(r), this.state = N.PAN;
419
+ this._handleMouseDownPan(r), this.state = D.PAN;
420
420
  }
421
421
  break;
422
422
  default:
423
- this.state = N.NONE;
423
+ this.state = D.NONE;
424
424
  }
425
- this.state !== N.NONE && this.dispatchEvent(cs);
425
+ this.state !== D.NONE && this.dispatchEvent(cs);
426
426
  }
427
427
  function Ti(r) {
428
428
  switch (this.state) {
429
- case N.ROTATE:
429
+ case D.ROTATE:
430
430
  if (this.enableRotate === !1) return;
431
431
  this._handleMouseMoveRotate(r);
432
432
  break;
433
- case N.DOLLY:
433
+ case D.DOLLY:
434
434
  if (this.enableZoom === !1) return;
435
435
  this._handleMouseMoveDolly(r);
436
436
  break;
437
- case N.PAN:
437
+ case D.PAN:
438
438
  if (this.enablePan === !1) return;
439
439
  this._handleMouseMovePan(r);
440
440
  break;
441
441
  }
442
442
  }
443
443
  function Mi(r) {
444
- this.enabled === !1 || this.enableZoom === !1 || this.state !== N.NONE || (r.preventDefault(), this.dispatchEvent(cs), this._handleMouseWheel(this._customWheelEvent(r)), this.dispatchEvent(nn));
444
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== D.NONE || (r.preventDefault(), this.dispatchEvent(cs), this._handleMouseWheel(this._customWheelEvent(r)), this.dispatchEvent(nn));
445
445
  }
446
446
  function wi(r) {
447
447
  this.enabled !== !1 && this._handleKeyDown(r);
@@ -452,55 +452,55 @@ function Ri(r) {
452
452
  switch (this.touches.ONE) {
453
453
  case Ge.ROTATE:
454
454
  if (this.enableRotate === !1) return;
455
- this._handleTouchStartRotate(r), this.state = N.TOUCH_ROTATE;
455
+ this._handleTouchStartRotate(r), this.state = D.TOUCH_ROTATE;
456
456
  break;
457
457
  case Ge.PAN:
458
458
  if (this.enablePan === !1) return;
459
- this._handleTouchStartPan(r), this.state = N.TOUCH_PAN;
459
+ this._handleTouchStartPan(r), this.state = D.TOUCH_PAN;
460
460
  break;
461
461
  default:
462
- this.state = N.NONE;
462
+ this.state = D.NONE;
463
463
  }
464
464
  break;
465
465
  case 2:
466
466
  switch (this.touches.TWO) {
467
467
  case Ge.DOLLY_PAN:
468
468
  if (this.enableZoom === !1 && this.enablePan === !1) return;
469
- this._handleTouchStartDollyPan(r), this.state = N.TOUCH_DOLLY_PAN;
469
+ this._handleTouchStartDollyPan(r), this.state = D.TOUCH_DOLLY_PAN;
470
470
  break;
471
471
  case Ge.DOLLY_ROTATE:
472
472
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
473
- this._handleTouchStartDollyRotate(r), this.state = N.TOUCH_DOLLY_ROTATE;
473
+ this._handleTouchStartDollyRotate(r), this.state = D.TOUCH_DOLLY_ROTATE;
474
474
  break;
475
475
  default:
476
- this.state = N.NONE;
476
+ this.state = D.NONE;
477
477
  }
478
478
  break;
479
479
  default:
480
- this.state = N.NONE;
480
+ this.state = D.NONE;
481
481
  }
482
- this.state !== N.NONE && this.dispatchEvent(cs);
482
+ this.state !== D.NONE && this.dispatchEvent(cs);
483
483
  }
484
484
  function Ei(r) {
485
485
  switch (this._trackPointer(r), this.state) {
486
- case N.TOUCH_ROTATE:
486
+ case D.TOUCH_ROTATE:
487
487
  if (this.enableRotate === !1) return;
488
488
  this._handleTouchMoveRotate(r), this.update();
489
489
  break;
490
- case N.TOUCH_PAN:
490
+ case D.TOUCH_PAN:
491
491
  if (this.enablePan === !1) return;
492
492
  this._handleTouchMovePan(r), this.update();
493
493
  break;
494
- case N.TOUCH_DOLLY_PAN:
494
+ case D.TOUCH_DOLLY_PAN:
495
495
  if (this.enableZoom === !1 && this.enablePan === !1) return;
496
496
  this._handleTouchMoveDollyPan(r), this.update();
497
497
  break;
498
- case N.TOUCH_DOLLY_ROTATE:
498
+ case D.TOUCH_DOLLY_ROTATE:
499
499
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
500
500
  this._handleTouchMoveDollyRotate(r), this.update();
501
501
  break;
502
502
  default:
503
- this.state = N.NONE;
503
+ this.state = D.NONE;
504
504
  }
505
505
  }
506
506
  function ki(r) {
@@ -512,12 +512,12 @@ function Pi(r) {
512
512
  function Li(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 kn(), G = new T(), pe = new T(), j = new J(), Ss = {
516
- X: new T(1, 0, 0),
517
- Y: new T(0, 1, 0),
518
- Z: new T(0, 0, 1)
515
+ const Me = new kn(), G = new M(), me = new M(), j = new Q(), Ss = {
516
+ X: new M(1, 0, 0),
517
+ Y: new M(0, 1, 0),
518
+ Z: new M(0, 0, 1)
519
519
  }, Kt = { type: "change" }, Ts = { type: "mouseDown", mode: null }, Ms = { type: "mouseUp", mode: null }, ws = { type: "objectChange" };
520
- class Ni extends qs {
520
+ class Oi extends qs {
521
521
  /**
522
522
  * Constructs a new controls instance.
523
523
  *
@@ -533,20 +533,20 @@ class Ni extends qs {
533
533
  const i = new zi();
534
534
  this._plane = i, n.add(i);
535
535
  const o = this;
536
- function a(x, y) {
536
+ function a(I, y) {
537
537
  let v = y;
538
- Object.defineProperty(o, x, {
538
+ Object.defineProperty(o, I, {
539
539
  get: function() {
540
540
  return v !== void 0 ? v : y;
541
541
  },
542
- set: function(M) {
543
- v !== M && (v = M, i[x] = M, s[x] = M, o.dispatchEvent({ type: x + "-changed", value: M }), o.dispatchEvent(Kt));
542
+ set: function(S) {
543
+ v !== S && (v = S, i[I] = S, s[I] = S, o.dispatchEvent({ type: I + "-changed", value: S }), o.dispatchEvent(Kt));
544
544
  }
545
- }), o[x] = y, i[x] = y, s[x] = y;
545
+ }), o[I] = y, i[I] = y, s[I] = 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(), 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 = Oi.bind(this), this._onPointerDown = Wi.bind(this), this._onPointerHover = Di.bind(this), this._onPointerMove = ji.bind(this), this._onPointerUp = Fi.bind(this), t !== null && this.connect(t);
548
+ const l = new M(), A = new M(), d = new Q(), u = new Q(), c = new M(), h = new Q(), p = new M(), f = new M(), m = new M(), g = 0, x = new M();
549
+ a("worldPosition", l), a("worldPositionStart", A), a("worldQuaternion", d), a("worldQuaternionStart", u), a("cameraPosition", c), a("cameraQuaternion", h), a("pointStart", p), a("pointEnd", f), a("rotationAxis", m), a("rotationAngle", g), a("eye", x), this._offset = new M(), this._startNorm = new M(), this._endNorm = new M(), this._cameraScale = new M(), this._parentPosition = new M(), this._parentQuaternion = new Q(), this._parentQuaternionInv = new Q(), this._parentScale = new M(), this._worldScaleStart = new M(), this._worldQuaternionInv = new Q(), this._worldScale = new M(), this._positionStart = new M(), this._quaternionStart = new Q(), this._scaleStart = new M(), this._getPointer = Ni.bind(this), this._onPointerDown = Wi.bind(this), this._onPointerHover = Di.bind(this), this._onPointerMove = ji.bind(this), this._onPointerUp = Fi.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";
@@ -588,10 +588,10 @@ class Ni extends qs {
588
588
  else if (n === "scale") {
589
589
  if (t.search("XYZ") !== -1) {
590
590
  let a = this.pointEnd.length() / this.pointStart.length();
591
- this.pointEnd.dot(this.pointStart) < 0 && (a *= -1), pe.set(a, a, a);
591
+ this.pointEnd.dot(this.pointStart) < 0 && (a *= -1), me.set(a, a, a);
592
592
  } else
593
- G.copy(this.pointStart), pe.copy(this.pointEnd), G.applyQuaternion(this._worldQuaternionInv), pe.applyQuaternion(this._worldQuaternionInv), pe.divide(G), t.search("X") === -1 && (pe.x = 1), t.search("Y") === -1 && (pe.y = 1), t.search("Z") === -1 && (pe.z = 1);
594
- s.scale.copy(this._scaleStart).multiply(pe), this.scaleSnap && (t.search("X") !== -1 && (s.scale.x = Math.round(s.scale.x / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Y") !== -1 && (s.scale.y = Math.round(s.scale.y / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Z") !== -1 && (s.scale.z = Math.round(s.scale.z / this.scaleSnap) * this.scaleSnap || this.scaleSnap));
593
+ G.copy(this.pointStart), me.copy(this.pointEnd), G.applyQuaternion(this._worldQuaternionInv), me.applyQuaternion(this._worldQuaternionInv), me.divide(G), t.search("X") === -1 && (me.x = 1), t.search("Y") === -1 && (me.y = 1), t.search("Z") === -1 && (me.z = 1);
594
+ s.scale.copy(this._scaleStart).multiply(me), this.scaleSnap && (t.search("X") !== -1 && (s.scale.x = Math.round(s.scale.x / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Y") !== -1 && (s.scale.y = Math.round(s.scale.y / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Z") !== -1 && (s.scale.z = Math.round(s.scale.z / this.scaleSnap) * this.scaleSnap || this.scaleSnap));
595
595
  } else if (n === "rotate") {
596
596
  this._offset.copy(this.pointEnd).sub(this.pointStart);
597
597
  const a = 20 / this.worldPosition.distanceTo(G.setFromMatrixPosition(this.camera.matrixWorld));
@@ -708,7 +708,7 @@ class Ni extends qs {
708
708
  i.xAxis.color.set(e), i.yAxis.color.set(t), i.zAxis.color.set(n), i.active.color.set(s), i.xAxisTransparent.color.set(e), i.yAxisTransparent.color.set(t), i.zAxisTransparent.color.set(n), i.activeTransparent.color.set(s), i.xAxis._color && i.xAxis._color.set(e), i.yAxis._color && i.yAxis._color.set(t), i.zAxis._color && i.zAxis._color.set(n), i.active._color && i.active._color.set(s), i.xAxisTransparent._color && i.xAxisTransparent._color.set(e), i.yAxisTransparent._color && i.yAxisTransparent._color.set(t), i.zAxisTransparent._color && i.zAxisTransparent._color.set(n), i.activeTransparent._color && i.activeTransparent._color.set(s);
709
709
  }
710
710
  }
711
- function Oi(r) {
711
+ function Ni(r) {
712
712
  if (this.domElement.ownerDocument.pointerLockElement)
713
713
  return {
714
714
  x: 0,
@@ -749,7 +749,7 @@ function Bt(r, e, t) {
749
749
  return n[s];
750
750
  return !1;
751
751
  }
752
- const Ct = new Ln(), O = new T(0, 1, 0), Rs = new T(0, 0, 0), Es = new fe(), It = new J(), wt = new J(), re = new T(), ks = 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();
752
+ const Ct = new Ln(), W = new M(0, 1, 0), Rs = new M(0, 0, 0), Es = new pe(), It = new Q(), wt = new Q(), re = new M(), ks = new pe(), tt = new M(1, 0, 0), Ee = new M(0, 1, 0), st = new M(0, 0, 1), yt = new M(), Je = new M(), Qe = new M();
753
753
  class Ui extends Ze {
754
754
  constructor(e) {
755
755
  super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
@@ -768,7 +768,7 @@ class Ui extends Ze {
768
768
  class Hi extends Ze {
769
769
  constructor() {
770
770
  super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
771
- const e = new Ne({
771
+ const e = new Oe({
772
772
  depthTest: !1,
773
773
  depthWrite: !1,
774
774
  fog: !1,
@@ -796,14 +796,14 @@ class Hi extends Ze {
796
796
  A.color.setHex(65280), A.opacity = 0.5;
797
797
  const d = e.clone();
798
798
  d.color.setHex(255), d.opacity = 0.5;
799
- const c = e.clone();
800
- c.opacity = 0.25;
801
799
  const u = e.clone();
802
- u.color.setHex(16776960), u.opacity = 0.25;
800
+ u.opacity = 0.25;
801
+ const c = e.clone();
802
+ c.color.setHex(16776960), c.opacity = 0.25;
803
803
  const h = e.clone();
804
804
  h.color.setHex(16776960);
805
- const m = e.clone();
806
- m.color.setHex(7895160), this.materialLib = {
805
+ const p = e.clone();
806
+ p.color.setHex(7895160), this.materialLib = {
807
807
  xAxis: i,
808
808
  yAxis: o,
809
809
  zAxis: a,
@@ -811,208 +811,208 @@ class Hi extends Ze {
811
811
  xAxisTransparent: l,
812
812
  yAxisTransparent: A,
813
813
  zAxisTransparent: d,
814
- activeTransparent: u
814
+ activeTransparent: c
815
815
  };
816
- const f = new q(0, 0.04, 0.1, 12);
816
+ const f = new V(0, 0.04, 0.1, 12);
817
817
  f.translate(0, 0.05, 0);
818
- const g = new K(0.08, 0.08, 0.08);
819
- g.translate(0, 0.04, 0);
820
- const p = new De();
821
- p.setAttribute("position", new le([0, 0, 0, 1, 0, 0], 3));
822
- const I = new q(75e-4, 75e-4, 0.5, 3);
823
- I.translate(0, 0.25, 0);
824
- function x(ee, ht) {
825
- const ie = new Ve(ee, 75e-4, 3, 64, ht * Math.PI * 2);
818
+ const m = new K(0.08, 0.08, 0.08);
819
+ m.translate(0, 0.04, 0);
820
+ const g = new De();
821
+ g.setAttribute("position", new Ae([0, 0, 0, 1, 0, 0], 3));
822
+ const x = new V(75e-4, 75e-4, 0.5, 3);
823
+ x.translate(0, 0.25, 0);
824
+ function I(te, ht) {
825
+ const ie = new Ve(te, 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() {
829
- const ee = new De();
830
- return ee.setAttribute("position", new le([0, 0, 0, 1, 1, 1], 3)), ee;
829
+ const te = new De();
830
+ return te.setAttribute("position", new Ae([0, 0, 0, 1, 1, 1], 3)), te;
831
831
  }
832
832
  const v = {
833
833
  X: [
834
- [new S(f, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
835
- [new S(f, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]],
836
- [new S(I, i), [0, 0, 0], [0, 0, -Math.PI / 2]]
834
+ [new T(f, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
835
+ [new T(f, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]],
836
+ [new T(x, i), [0, 0, 0], [0, 0, -Math.PI / 2]]
837
837
  ],
838
838
  Y: [
839
- [new S(f, o), [0, 0.5, 0]],
840
- [new S(f, o), [0, -0.5, 0], [Math.PI, 0, 0]],
841
- [new S(I, o)]
839
+ [new T(f, o), [0, 0.5, 0]],
840
+ [new T(f, o), [0, -0.5, 0], [Math.PI, 0, 0]],
841
+ [new T(x, o)]
842
842
  ],
843
843
  Z: [
844
- [new S(f, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
845
- [new S(f, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]],
846
- [new S(I, a), null, [Math.PI / 2, 0, 0]]
844
+ [new T(f, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
845
+ [new T(f, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]],
846
+ [new T(x, a), null, [Math.PI / 2, 0, 0]]
847
847
  ],
848
848
  XYZ: [
849
- [new S(new gt(0.1, 0), c), [0, 0, 0]]
849
+ [new T(new gt(0.1, 0), u), [0, 0, 0]]
850
850
  ],
851
851
  XY: [
852
- [new S(new K(0.15, 0.15, 0.01), d), [0.15, 0.15, 0]]
852
+ [new T(new K(0.15, 0.15, 0.01), d), [0.15, 0.15, 0]]
853
853
  ],
854
854
  YZ: [
855
- [new S(new K(0.15, 0.15, 0.01), l), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
855
+ [new T(new K(0.15, 0.15, 0.01), l), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
856
856
  ],
857
857
  XZ: [
858
- [new S(new K(0.15, 0.15, 0.01), A), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
858
+ [new T(new K(0.15, 0.15, 0.01), A), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
859
859
  ]
860
- }, M = {
860
+ }, S = {
861
861
  X: [
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]]
862
+ [new T(new V(0.2, 0, 0.6, 4), n), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
863
+ [new T(new V(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 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]]
866
+ [new T(new V(0.2, 0, 0.6, 4), n), [0, 0.3, 0]],
867
+ [new T(new V(0.2, 0, 0.6, 4), n), [0, -0.3, 0], [0, 0, Math.PI]]
868
868
  ],
869
869
  Z: [
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]]
870
+ [new T(new V(0.2, 0, 0.6, 4), n), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
871
+ [new T(new V(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 gt(0.2, 0), n)]
874
+ [new T(new gt(0.2, 0), n)]
875
875
  ],
876
876
  XY: [
877
- [new S(new K(0.2, 0.2, 0.01), n), [0.15, 0.15, 0]]
877
+ [new T(new K(0.2, 0.2, 0.01), n), [0.15, 0.15, 0]]
878
878
  ],
879
879
  YZ: [
880
- [new S(new K(0.2, 0.2, 0.01), n), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
880
+ [new T(new K(0.2, 0.2, 0.01), n), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
881
881
  ],
882
882
  XZ: [
883
- [new S(new K(0.2, 0.2, 0.01), n), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
883
+ [new T(new K(0.2, 0.2, 0.01), n), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
884
884
  ]
885
885
  }, L = {
886
886
  START: [
887
- [new S(new gt(0.01, 2), s), null, null, null, "helper"]
887
+ [new T(new gt(0.01, 2), s), null, null, null, "helper"]
888
888
  ],
889
889
  END: [
890
- [new S(new gt(0.01, 2), s), null, null, null, "helper"]
890
+ [new T(new gt(0.01, 2), s), null, null, null, "helper"]
891
891
  ],
892
892
  DELTA: [
893
- [new de(y(), s), null, null, null, "helper"]
893
+ [new he(y(), s), null, null, null, "helper"]
894
894
  ],
895
895
  X: [
896
- [new de(p, s), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
896
+ [new he(g, s), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
897
897
  ],
898
898
  Y: [
899
- [new de(p, s), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
899
+ [new he(g, s), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
900
900
  ],
901
901
  Z: [
902
- [new de(p, s), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
902
+ [new he(g, s), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
903
903
  ]
904
- }, Q = {
904
+ }, Y = {
905
905
  XYZE: [
906
- [new S(x(0.5, 1), m), null, [0, Math.PI / 2, 0]]
906
+ [new T(I(0.5, 1), p), null, [0, Math.PI / 2, 0]]
907
907
  ],
908
908
  X: [
909
- [new S(x(0.5, 0.5), i)]
909
+ [new T(I(0.5, 0.5), i)]
910
910
  ],
911
911
  Y: [
912
- [new S(x(0.5, 0.5), o), null, [0, 0, -Math.PI / 2]]
912
+ [new T(I(0.5, 0.5), o), null, [0, 0, -Math.PI / 2]]
913
913
  ],
914
914
  Z: [
915
- [new S(x(0.5, 0.5), a), null, [0, Math.PI / 2, 0]]
915
+ [new T(I(0.5, 0.5), a), null, [0, Math.PI / 2, 0]]
916
916
  ],
917
917
  E: [
918
- [new S(x(0.75, 1), u), null, [0, Math.PI / 2, 0]]
918
+ [new T(I(0.75, 1), c), null, [0, Math.PI / 2, 0]]
919
919
  ]
920
- }, $ = {
920
+ }, ee = {
921
921
  AXIS: [
922
- [new de(p, s), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
922
+ [new he(g, s), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
923
923
  ]
924
- }, Y = {
924
+ }, _ = {
925
925
  XYZE: [
926
- [new S(new Pn(0.25, 10, 8), n)]
926
+ [new T(new Pn(0.25, 10, 8), n)]
927
927
  ],
928
928
  X: [
929
- [new S(new Ve(0.5, 0.1, 4, 24), n), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
929
+ [new T(new Ve(0.5, 0.1, 4, 24), n), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
930
930
  ],
931
931
  Y: [
932
- [new S(new Ve(0.5, 0.1, 4, 24), n), [0, 0, 0], [Math.PI / 2, 0, 0]]
932
+ [new T(new Ve(0.5, 0.1, 4, 24), n), [0, 0, 0], [Math.PI / 2, 0, 0]]
933
933
  ],
934
934
  Z: [
935
- [new S(new Ve(0.5, 0.1, 4, 24), n), [0, 0, 0], [0, 0, -Math.PI / 2]]
935
+ [new T(new Ve(0.5, 0.1, 4, 24), n), [0, 0, 0], [0, 0, -Math.PI / 2]]
936
936
  ],
937
937
  E: [
938
- [new S(new Ve(0.75, 0.1, 2, 24), n)]
938
+ [new T(new Ve(0.75, 0.1, 2, 24), n)]
939
939
  ]
940
940
  }, Te = {
941
941
  X: [
942
- [new S(g, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
943
- [new S(I, i), [0, 0, 0], [0, 0, -Math.PI / 2]],
944
- [new S(g, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]]
942
+ [new T(m, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
943
+ [new T(x, i), [0, 0, 0], [0, 0, -Math.PI / 2]],
944
+ [new T(m, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]]
945
945
  ],
946
946
  Y: [
947
- [new S(g, o), [0, 0.5, 0]],
948
- [new S(I, o)],
949
- [new S(g, o), [0, -0.5, 0], [0, 0, Math.PI]]
947
+ [new T(m, o), [0, 0.5, 0]],
948
+ [new T(x, o)],
949
+ [new T(m, o), [0, -0.5, 0], [0, 0, Math.PI]]
950
950
  ],
951
951
  Z: [
952
- [new S(g, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
953
- [new S(I, a), [0, 0, 0], [Math.PI / 2, 0, 0]],
954
- [new S(g, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]]
952
+ [new T(m, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
953
+ [new T(x, a), [0, 0, 0], [Math.PI / 2, 0, 0]],
954
+ [new T(m, 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), d), [0.15, 0.15, 0]]
957
+ [new T(new K(0.15, 0.15, 0.01), d), [0.15, 0.15, 0]]
958
958
  ],
959
959
  YZ: [
960
- [new S(new K(0.15, 0.15, 0.01), l), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
960
+ [new T(new K(0.15, 0.15, 0.01), l), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
961
961
  ],
962
962
  XZ: [
963
- [new S(new K(0.15, 0.15, 0.01), A), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
963
+ [new T(new K(0.15, 0.15, 0.01), A), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
964
964
  ],
965
965
  XYZ: [
966
- [new S(new K(0.1, 0.1, 0.1), c)]
966
+ [new T(new K(0.1, 0.1, 0.1), u)]
967
967
  ]
968
968
  }, Ht = {
969
969
  X: [
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]]
970
+ [new T(new V(0.2, 0, 0.6, 4), n), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
971
+ [new T(new V(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 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]]
974
+ [new T(new V(0.2, 0, 0.6, 4), n), [0, 0.3, 0]],
975
+ [new T(new V(0.2, 0, 0.6, 4), n), [0, -0.3, 0], [0, 0, Math.PI]]
976
976
  ],
977
977
  Z: [
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]]
978
+ [new T(new V(0.2, 0, 0.6, 4), n), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
979
+ [new T(new V(0.2, 0, 0.6, 4), n), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
980
980
  ],
981
981
  XY: [
982
- [new S(new K(0.2, 0.2, 0.01), n), [0.15, 0.15, 0]]
982
+ [new T(new K(0.2, 0.2, 0.01), n), [0.15, 0.15, 0]]
983
983
  ],
984
984
  YZ: [
985
- [new S(new K(0.2, 0.2, 0.01), n), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
985
+ [new T(new K(0.2, 0.2, 0.01), n), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
986
986
  ],
987
987
  XZ: [
988
- [new S(new K(0.2, 0.2, 0.01), n), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
988
+ [new T(new K(0.2, 0.2, 0.01), n), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
989
989
  ],
990
990
  XYZ: [
991
- [new S(new K(0.2, 0.2, 0.2), n), [0, 0, 0]]
991
+ [new T(new K(0.2, 0.2, 0.2), n), [0, 0, 0]]
992
992
  ]
993
993
  }, pn = {
994
994
  X: [
995
- [new de(p, s), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
995
+ [new he(g, s), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
996
996
  ],
997
997
  Y: [
998
- [new de(p, s), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
998
+ [new he(g, s), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
999
999
  ],
1000
1000
  Z: [
1001
- [new de(p, s), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
1001
+ [new he(g, s), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
1002
1002
  ]
1003
1003
  };
1004
- function ue(ee) {
1004
+ function de(te) {
1005
1005
  const ht = new Ze();
1006
- for (const ie in ee)
1007
- for (let Fe = ee[ie].length; Fe--; ) {
1008
- const X = ee[ie][Fe][0].clone(), ft = ee[ie][Fe][1], pt = ee[ie][Fe][2], mt = ee[ie][Fe][3], mn = ee[ie][Fe][4];
1009
- X.name = ie, X.tag = mn, 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 ps = X.geometry.clone();
1011
- ps.applyMatrix4(X.matrix), X.geometry = ps, 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);
1006
+ for (const ie in te)
1007
+ for (let Fe = te[ie].length; Fe--; ) {
1008
+ const q = te[ie][Fe][0].clone(), ft = te[ie][Fe][1], pt = te[ie][Fe][2], mt = te[ie][Fe][3], mn = te[ie][Fe][4];
1009
+ q.name = ie, q.tag = mn, ft && q.position.set(ft[0], ft[1], ft[2]), pt && q.rotation.set(pt[0], pt[1], pt[2]), mt && q.scale.set(mt[0], mt[1], mt[2]), q.updateMatrix();
1010
+ const ps = q.geometry.clone();
1011
+ ps.applyMatrix4(q.matrix), q.geometry = ps, q.renderOrder = 1 / 0, q.position.set(0, 0, 0), q.rotation.set(0, 0, 0), q.scale.set(1, 1, 1), ht.add(q);
1012
1012
  }
1013
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(Ht)), this.add(this.helper.translate = ue(L)), this.add(this.helper.rotate = ue($)), this.add(this.helper.scale = ue(pn)), 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 = de(v)), this.add(this.gizmo.rotate = de(Y)), this.add(this.gizmo.scale = de(Te)), this.add(this.picker.translate = de(S)), this.add(this.picker.rotate = de(_)), this.add(this.picker.scale = de(Ht)), this.add(this.helper.translate = de(L)), this.add(this.helper.rotate = de(ee)), this.add(this.helper.scale = de(pn)), 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,37 +1025,37 @@ class Hi 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(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(Es.lookAt(Rs, 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(W.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(W.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(W.copy(st).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "XYZE" && (j.setFromEuler(Ct.set(0, Math.PI / 2, 0)), W.copy(this.rotationAxis), o.quaternion.setFromRotationMatrix(Es.lookAt(Rs, W, 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" && (It.copy(n), O.copy(this.eye).applyQuaternion(j.copy(n).invert()), o.name.search("E") !== -1 && o.quaternion.setFromRotationMatrix(Es.lookAt(this.eye, Rs, 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) {
1031
+ o.quaternion.copy(n), this.mode === "translate" || this.mode === "scale" ? (o.name === "X" && Math.abs(W.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(W.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(W.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(W.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(W.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(W.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), W.copy(this.eye).applyQuaternion(j.copy(n).invert()), o.name.search("E") !== -1 && o.quaternion.setFromRotationMatrix(Es.lookAt(this.eye, Rs, Ee)), o.name === "X" && (j.setFromAxisAngle(tt, Math.atan2(-W.y, W.z)), j.multiplyQuaternions(It, j), o.quaternion.copy(j)), o.name === "Y" && (j.setFromAxisAngle(Ee, Math.atan2(W.x, W.z)), j.multiplyQuaternions(It, j), o.quaternion.copy(j)), o.name === "Z" && (j.setFromAxisAngle(st, Math.atan2(W.y, W.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
  }
1035
1035
  super.updateMatrixWorld(e);
1036
1036
  }
1037
1037
  }
1038
- class zi extends S {
1038
+ class zi extends T {
1039
1039
  constructor() {
1040
1040
  super(
1041
- new Nn(1e5, 1e5, 2, 2),
1042
- new Ne({ visible: !1, wireframe: !0, side: Pt, transparent: !0, opacity: 0.1, toneMapped: !1 })
1041
+ new On(1e5, 1e5, 2, 2),
1042
+ new Oe({ 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"), 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) {
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), W.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(yt), re.copy(yt).cross(O);
1052
+ W.copy(this.eye).cross(yt), re.copy(yt).cross(W);
1053
1053
  break;
1054
1054
  case "Y":
1055
- O.copy(this.eye).cross(Je), re.copy(Je).cross(O);
1055
+ W.copy(this.eye).cross(Je), re.copy(Je).cross(W);
1056
1056
  break;
1057
1057
  case "Z":
1058
- O.copy(this.eye).cross(Qe), re.copy(Qe).cross(O);
1058
+ W.copy(this.eye).cross(Qe), re.copy(Qe).cross(W);
1059
1059
  break;
1060
1060
  case "XY":
1061
1061
  re.copy(Qe);
@@ -1064,7 +1064,7 @@ class zi extends S {
1064
1064
  re.copy(yt);
1065
1065
  break;
1066
1066
  case "XZ":
1067
- O.copy(Qe), re.copy(Je);
1067
+ W.copy(Qe), re.copy(Je);
1068
1068
  break;
1069
1069
  case "XYZ":
1070
1070
  case "E":
@@ -1076,7 +1076,7 @@ class zi extends S {
1076
1076
  default:
1077
1077
  re.set(0, 0, 0);
1078
1078
  }
1079
- re.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (ks.lookAt(G.set(0, 0, 0), re, O), this.quaternion.setFromRotationMatrix(ks)), super.updateMatrixWorld(e);
1079
+ re.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (ks.lookAt(G.set(0, 0, 0), re, W), this.quaternion.setFromRotationMatrix(ks)), super.updateMatrixWorld(e);
1080
1080
  }
1081
1081
  }
1082
1082
  const on = {
@@ -1160,7 +1160,7 @@ class qe {
1160
1160
  const Gi = new Js(-1, 1, 1, -1, 0, 1);
1161
1161
  class Ki extends De {
1162
1162
  constructor() {
1163
- super(), this.setAttribute("position", new le([-1, 3, 0, -1, -1, 0, 3, -1, 0], 3)), this.setAttribute("uv", new le([0, 2, 0, 0, 2, 0], 2));
1163
+ super(), this.setAttribute("position", new Ae([-1, 3, 0, -1, -1, 0, 3, -1, 0], 3)), this.setAttribute("uv", new Ae([0, 2, 0, 0, 2, 0], 2));
1164
1164
  }
1165
1165
  }
1166
1166
  const Bi = new Ki();
@@ -1171,7 +1171,7 @@ class us {
1171
1171
  * @param {?Material} material - The material to render te full screen quad with.
1172
1172
  */
1173
1173
  constructor(e) {
1174
- this._mesh = new S(Bi, e);
1174
+ this._mesh = new T(Bi, e);
1175
1175
  }
1176
1176
  /**
1177
1177
  * Frees the GPU-related resources allocated by this instance. Call this
@@ -1302,10 +1302,10 @@ class qi {
1302
1302
  constructor(e, t) {
1303
1303
  if (this.renderer = e, this._pixelRatio = e.getPixelRatio(), t === void 0) {
1304
1304
  const n = e.getSize(new F());
1305
- this._width = n.width, this._height = n.height, t = new ge(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: Re }), t.texture.name = "EffectComposer.rt1";
1305
+ this._width = n.width, this._height = n.height, t = new be(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: Re }), t.texture.name = "EffectComposer.rt1";
1306
1306
  } else
1307
1307
  this._width = t.width, this._height = t.height;
1308
- this.renderTarget1 = t, this.renderTarget2 = t.clone(), this.renderTarget2.texture.name = "EffectComposer.rt2", this.writeBuffer = this.renderTarget1, this.readBuffer = this.renderTarget2, this.renderToScreen = !0, this.passes = [], this.copyPass = new Zi(on), this.copyPass.material.blending = $t, this.timer = new On();
1308
+ this.renderTarget1 = t, this.renderTarget2 = t.clone(), this.renderTarget2.texture.name = "EffectComposer.rt2", this.writeBuffer = this.renderTarget1, this.readBuffer = this.renderTarget2, this.renderToScreen = !0, this.passes = [], this.copyPass = new Zi(on), this.copyPass.material.blending = $t, this.timer = new Nn();
1309
1309
  }
1310
1310
  /**
1311
1311
  * Swaps the internal read/write buffers.
@@ -1433,7 +1433,7 @@ class Vi extends qe {
1433
1433
  * @param {?number} [clearAlpha=null] - The clear alpha of the render pass.
1434
1434
  */
1435
1435
  constructor(e, t, n = null, s = null, i = null) {
1436
- super(), this.scene = e, this.camera = t, this.overrideMaterial = n, this.clearColor = s, this.clearAlpha = i, this.clear = !0, this.clearDepth = !1, this.needsSwap = !1, this.isRenderPass = !0, this._oldClearColor = new B();
1436
+ super(), this.scene = e, this.camera = t, this.overrideMaterial = n, this.clearColor = s, this.clearAlpha = i, this.clear = !0, this.clearDepth = !1, this.needsSwap = !1, this.isRenderPass = !0, this._oldClearColor = new Z();
1437
1437
  }
1438
1438
  /**
1439
1439
  * Performs a beauty pass with the configured scene and camera.
@@ -1584,9 +1584,9 @@ class Ce extends qe {
1584
1584
  *
1585
1585
  */
1586
1586
  constructor(e, t, n, s) {
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);
1587
+ super(), this.renderScene = t, this.renderCamera = n, this.selectedObjects = s !== void 0 ? s : [], this.visibleEdgeColor = new Z(1, 1, 1), this.hiddenEdgeColor = new Z(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 Bn(), this.depthMaterial.side = Pt, this.depthMaterial.depthPacking = Zn, this.depthMaterial.blending = $t, 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;
1589
+ this.renderTargetMaskBuffer = new be(this.resolution.x, this.resolution.y), this.renderTargetMaskBuffer.texture.name = "OutlinePass.mask", this.renderTargetMaskBuffer.texture.generateMipmaps = !1, this.depthMaterial = new Bn(), this.depthMaterial.side = Pt, this.depthMaterial.depthPacking = Zn, this.depthMaterial.blending = $t, this.prepareMaskMaterial = this._getPrepareMaskMaterial(), this.prepareMaskMaterial.side = Pt, this.prepareMaskMaterial.fragmentShader = d(this.prepareMaskMaterial.fragmentShader, this.renderCamera), this.renderTargetDepthBuffer = new be(this.resolution.x, this.resolution.y, { type: Re }), this.renderTargetDepthBuffer.texture.name = "OutlinePass.depth", this.renderTargetDepthBuffer.texture.generateMipmaps = !1, this.renderTargetMaskDownSampleBuffer = new be(i, o, { type: Re }), this.renderTargetMaskDownSampleBuffer.texture.name = "OutlinePass.depthDownSample", this.renderTargetMaskDownSampleBuffer.texture.generateMipmaps = !1, this.renderTargetBlurBuffer1 = new be(i, o, { type: Re }), this.renderTargetBlurBuffer1.texture.name = "OutlinePass.blur1", this.renderTargetBlurBuffer1.texture.generateMipmaps = !1, this.renderTargetBlurBuffer2 = new be(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 be(i, o, { type: Re }), this.renderTargetEdgeBuffer1.texture.name = "OutlinePass.edge1", this.renderTargetEdgeBuffer1.texture.generateMipmaps = !1, this.renderTargetEdgeBuffer2 = new be(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 = on;
@@ -1597,10 +1597,10 @@ class Ce extends qe {
1597
1597
  blending: $t,
1598
1598
  depthTest: !1,
1599
1599
  depthWrite: !1
1600
- }), this.enabled = !0, this.needsSwap = !1, this._oldClearColor = new B(), this.oldClearAlpha = 1, this._fsQuad = new us(null), this.tempPulseColor1 = new B(), this.tempPulseColor2 = new B(), this.textureMatrix = new fe();
1601
- function d(c, u) {
1602
- const h = u.isPerspectiveCamera ? "perspective" : "orthographic";
1603
- return c.replace(/DEPTH_TO_VIEW_Z/g, h + "DepthToViewZ");
1600
+ }), this.enabled = !0, this.needsSwap = !1, this._oldClearColor = new Z(), this.oldClearAlpha = 1, this._fsQuad = new us(null), this.tempPulseColor1 = new Z(), this.tempPulseColor2 = new Z(), this.textureMatrix = new pe();
1601
+ function d(u, c) {
1602
+ const h = c.isPerspectiveCamera ? "perspective" : "orthographic";
1603
+ return u.replace(/DEPTH_TO_VIEW_Z/g, h + "DepthToViewZ");
1604
1604
  }
1605
1605
  }
1606
1606
  /**
@@ -1753,8 +1753,8 @@ class Ce extends qe {
1753
1753
  uniforms: {
1754
1754
  maskTexture: { value: null },
1755
1755
  texSize: { value: new F(0.5, 0.5) },
1756
- visibleEdgeColor: { value: new T(1, 1, 1) },
1757
- hiddenEdgeColor: { value: new T(1, 1, 1) }
1756
+ visibleEdgeColor: { value: new M(1, 1, 1) },
1757
+ hiddenEdgeColor: { value: new M(1, 1, 1) }
1758
1758
  },
1759
1759
  vertexShader: `varying vec2 vUv;
1760
1760
 
@@ -1901,7 +1901,7 @@ class Yi extends Ze {
1901
1901
  return super.copy(e, t), this.element = e.element.cloneNode(!0), this.center = e.center, this;
1902
1902
  }
1903
1903
  }
1904
- const He = new T(), Ls = new fe(), Ns = new fe(), Os = new T(), Ds = new T();
1904
+ const He = new M(), Ls = new pe(), Os = new pe(), Ns = new M(), Ds = new M();
1905
1905
  class _i {
1906
1906
  /**
1907
1907
  * Constructs a new CSS2D renderer.
@@ -1919,51 +1919,51 @@ class _i {
1919
1919
  width: n,
1920
1920
  height: s
1921
1921
  };
1922
- }, this.render = function(m, f) {
1923
- m.matrixWorldAutoUpdate === !0 && m.updateMatrixWorld(), f.parent === null && f.matrixWorldAutoUpdate === !0 && f.updateMatrixWorld(), Ls.copy(f.matrixWorldInverse), Ns.multiplyMatrices(f.projectionMatrix, Ls), 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";
1922
+ }, this.render = function(p, f) {
1923
+ p.matrixWorldAutoUpdate === !0 && p.updateMatrixWorld(), f.parent === null && f.matrixWorldAutoUpdate === !0 && f.updateMatrixWorld(), Ls.copy(f.matrixWorldInverse), Os.multiplyMatrices(f.projectionMatrix, Ls), d(p, p, f), this.sortObjects && h(p);
1924
+ }, this.setSize = function(p, f) {
1925
+ n = p, s = f, i = n / 2, o = s / 2, l.style.width = p + "px", l.style.height = f + "px";
1926
1926
  };
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]);
1927
+ function A(p) {
1928
+ p.isCSS2DObject && (p.element.style.display = "none");
1929
+ for (let f = 0, m = p.children.length; f < m; f++)
1930
+ A(p.children[f]);
1931
1931
  }
1932
- function d(m, f, g) {
1933
- if (m.visible === !1) {
1934
- A(m);
1932
+ function d(p, f, m) {
1933
+ if (p.visible === !1) {
1934
+ A(p);
1935
1935
  return;
1936
1936
  }
1937
- if (m.isCSS2DObject) {
1938
- He.setFromMatrixPosition(m.matrixWorld), He.applyMatrix4(Ns);
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
- const x = {
1942
- distanceToCameraSquared: c(g, m)
1937
+ if (p.isCSS2DObject) {
1938
+ He.setFromMatrixPosition(p.matrixWorld), He.applyMatrix4(Os);
1939
+ const g = He.z >= -1 && He.z <= 1 && p.layers.test(m.layers) === !0, x = p.element;
1940
+ x.style.display = g === !0 ? "" : "none", g === !0 && (p.onBeforeRender(t, f, m), x.style.transform = "translate(" + -100 * p.center.x + "%," + -100 * p.center.y + "%)translate(" + (He.x * i + i) + "px," + (-He.y * o + o) + "px)", x.parentNode !== l && l.appendChild(x), p.onAfterRender(t, f, m));
1941
+ const I = {
1942
+ distanceToCameraSquared: u(m, p)
1943
1943
  };
1944
- a.objects.set(m, x);
1944
+ a.objects.set(p, I);
1945
1945
  }
1946
- for (let p = 0, I = m.children.length; p < I; p++)
1947
- d(m.children[p], f, g);
1946
+ for (let g = 0, x = p.children.length; g < x; g++)
1947
+ d(p.children[g], f, m);
1948
1948
  }
1949
- function c(m, f) {
1950
- return Os.setFromMatrixPosition(m.matrixWorld), Ds.setFromMatrixPosition(f.matrixWorld), Os.distanceToSquared(Ds);
1949
+ function u(p, f) {
1950
+ return Ns.setFromMatrixPosition(p.matrixWorld), Ds.setFromMatrixPosition(f.matrixWorld), Ns.distanceToSquared(Ds);
1951
1951
  }
1952
- function u(m) {
1952
+ function c(p) {
1953
1953
  const f = [];
1954
- return m.traverseVisible(function(g) {
1955
- g.isCSS2DObject && f.push(g);
1954
+ return p.traverseVisible(function(m) {
1955
+ m.isCSS2DObject && f.push(m);
1956
1956
  }), f;
1957
1957
  }
1958
- function h(m) {
1959
- const f = u(m).sort(function(p, I) {
1960
- if (p.renderOrder !== I.renderOrder)
1961
- return I.renderOrder - p.renderOrder;
1962
- const x = a.objects.get(p).distanceToCameraSquared, y = a.objects.get(I).distanceToCameraSquared;
1963
- return x - y;
1964
- }), g = f.length;
1965
- for (let p = 0, I = f.length; p < I; p++)
1966
- f[p].element.style.zIndex = g - p;
1958
+ function h(p) {
1959
+ const f = c(p).sort(function(g, x) {
1960
+ if (g.renderOrder !== x.renderOrder)
1961
+ return x.renderOrder - g.renderOrder;
1962
+ const I = a.objects.get(g).distanceToCameraSquared, y = a.objects.get(x).distanceToCameraSquared;
1963
+ return I - y;
1964
+ }), m = f.length;
1965
+ for (let g = 0, x = f.length; g < x; g++)
1966
+ f[g].element.style.zIndex = m - g;
1967
1967
  }
1968
1968
  }
1969
1969
  }
@@ -1992,6 +1992,7 @@ class dt {
1992
1992
  title: e.title || "",
1993
1993
  items: e.items || [],
1994
1994
  offsetY: e.offsetY ?? 0.1,
1995
+ offsetX: e.offsetX ?? 0,
1995
1996
  fontSize: e.fontSize || "13px",
1996
1997
  width: e.width || "220px",
1997
1998
  backgroundColor: e.backgroundColor || "linear-gradient(135deg, rgba(6, 16, 42, 0.55) 0%, rgba(2, 6, 18, 0.40) 100%)",
@@ -2089,7 +2090,7 @@ class dt {
2089
2090
  const n = new w.Box3().setFromObject(e), s = new w.Vector3(), i = new w.Vector3();
2090
2091
  n.getCenter(s), n.getSize(i);
2091
2092
  const a = n.max.y - t.y + this.options.offsetY;
2092
- this.css2dObject || (this.css2dObject = new Yi(this.container), this.css2dObject.name = `DataPanel_${e.name || e.uuid}`, this.css2dObject.center.set(0.5, 1)), this.css2dObject.position.set(0, a, 0), e.add(this.css2dObject), this.attachedObject = e;
2093
+ this.css2dObject || (this.css2dObject = new Yi(this.container), this.css2dObject.name = `DataPanel_${e.name || e.uuid}`, this.css2dObject.center.set(0.5, 1)), this.css2dObject.position.set(this.options.offsetX, a, 0), e.add(this.css2dObject), this.attachedObject = e;
2093
2094
  }
2094
2095
  /**
2095
2096
  * 从附着的物体上移除面板
@@ -2197,9 +2198,17 @@ class dt {
2197
2198
  const t = new w.Vector3();
2198
2199
  this.attachedObject.getWorldPosition(t);
2199
2200
  const s = new w.Box3().setFromObject(this.attachedObject).max.y - t.y;
2200
- this.css2dObject.position.set(0, s + e, 0);
2201
+ this.css2dObject.position.set(this.options.offsetX ?? 0, s + e, 0);
2201
2202
  }
2202
2203
  }
2204
+ /** 获取面板 X 轴偏移 */
2205
+ getOffsetX() {
2206
+ return this.options.offsetX ?? 0;
2207
+ }
2208
+ /** 更新面板 X 轴偏移(轻量,不重建 DOM) */
2209
+ setOffsetX(e) {
2210
+ this.options.offsetX = e, this.css2dObject && this.attachedObject && (this.css2dObject.position.x = e);
2211
+ }
2203
2212
  /** 获取面板宽度 */
2204
2213
  getWidth() {
2205
2214
  return this.options.width || "200px";
@@ -2230,23 +2239,23 @@ class dt {
2230
2239
  this.detach(), (e = this.container) != null && e.parentNode && this.container.parentNode.removeChild(this.container), this.css2dObject = null, this.container = null, this.attachedObject = null;
2231
2240
  }
2232
2241
  }
2233
- const Nt = /* @__PURE__ */ new WeakMap();
2242
+ const Ot = /* @__PURE__ */ new WeakMap();
2234
2243
  function rn(r, e) {
2235
2244
  const t = Wt(r);
2236
- Nt.set(t, e), t.userData._hasDataPanel = !0;
2245
+ Ot.set(t, e), t.userData._hasDataPanel = !0;
2237
2246
  }
2238
2247
  function Ft(r) {
2239
- return Nt.get(Wt(r)) || null;
2248
+ return Ot.get(Wt(r)) || null;
2240
2249
  }
2241
2250
  function ao(r) {
2242
- const e = Wt(r), t = Nt.get(e);
2243
- t && (t.dispose(), Nt.delete(e)), e.userData._hasDataPanel = void 0;
2251
+ const e = Wt(r), t = Ot.get(e);
2252
+ t && (t.dispose(), Ot.delete(e)), e.userData._hasDataPanel = void 0;
2244
2253
  }
2245
2254
  let U = null;
2246
2255
  function lo(r) {
2247
2256
  return U ? (U.domElement.parentNode !== r && r.appendChild(U.domElement), U) : (U = new _i(), U.setSize(r.clientWidth, r.clientHeight), U.domElement.style.position = "absolute", U.domElement.style.top = "0", U.domElement.style.left = "0", U.domElement.style.pointerEvents = "none", r.appendChild(U.domElement), U);
2248
2257
  }
2249
- function wl() {
2258
+ function Ol() {
2250
2259
  return U;
2251
2260
  }
2252
2261
  function Ao(r, e) {
@@ -2258,7 +2267,7 @@ function co(r, e) {
2258
2267
  function uo() {
2259
2268
  U && (U.domElement.parentNode && U.domElement.parentNode.removeChild(U.domElement), U = null);
2260
2269
  }
2261
- const b = {
2270
+ const C = {
2262
2271
  /** 场景模式 */
2263
2272
  mode: "",
2264
2273
  /** 控制器模式 */
@@ -2284,28 +2293,28 @@ const b = {
2284
2293
  };
2285
2294
  let Rt = !1, We = !1, Ie = null, ye = null;
2286
2295
  const ho = 16755200, Ws = 16733440;
2287
- let is = [], vt = [], Ot = !0, Oe = null, os = null, Et = null, xe = [];
2296
+ let is = [], vt = [], Nt = !0, Ne = null, os = null, Et = null, xe = [];
2288
2297
  const je = /* @__PURE__ */ new Map();
2289
2298
  let Dt, kt = null, lt = null, At = null;
2290
2299
  function fo(r, e = "edit", t) {
2291
- b.container = r, b.mode = e, mo(), bo(), Io(), t && (Xo(t.scene, e, t.dataPanels), t != null && t.camera && (b.defaultMainCamera = t.camera, an(!0))), xo(), yo(), Dt && b.orbitControls && (b.orbitControls.target.fromArray(Dt), b.orbitControls.update()), go(), Fo(), ln(), lt = (n) => wo(n), At = () => So(), e === "edit" && r.addEventListener("click", lt), window.addEventListener("resize", At), t || vo(), e === "edit" && Co();
2300
+ C.container = r, C.mode = e, mo(), bo(), Io(), t && (Xo(t.scene, e, t.dataPanels), t != null && t.camera && (C.defaultMainCamera = t.camera, an(!0))), xo(), yo(), Dt && C.orbitControls && (C.orbitControls.target.fromArray(Dt), C.orbitControls.update()), go(), Fo(), ln(), lt = (n) => wo(n), At = () => So(), e === "edit" && r.addEventListener("click", lt), window.addEventListener("resize", At), t || vo(), e === "edit" && Co();
2292
2301
  }
2293
2302
  function po() {
2294
2303
  var i, o;
2295
- const r = window.devicePixelRatio, e = ((i = b.container) == null ? void 0 : i.clientWidth) || window.innerWidth, t = ((o = b.container) == null ? void 0 : o.clientHeight) || window.innerHeight, n = e * r * t * r;
2304
+ const r = window.devicePixelRatio, e = ((i = C.container) == null ? void 0 : i.clientWidth) || window.innerWidth, t = ((o = C.container) == null ? void 0 : o.clientHeight) || window.innerHeight, n = e * r * t * r;
2296
2305
  let s;
2297
2306
  return n <= 5e6 ? s = Math.min(r, 2) : n <= 12e6 ? s = Math.min(r, 1.5) : n <= 2e7 ? s = Math.min(r, 1.3) : s = Math.min(r, 1), s;
2298
2307
  }
2299
2308
  function mo() {
2300
2309
  const r = po(), e = new w.WebGLRenderer({ antialias: !0, alpha: !0 });
2301
- e.setSize(b.container.clientWidth, b.container.clientHeight), e.setPixelRatio(r), console.log(
2302
- `[Renderer] css=${b.container.clientWidth}×${b.container.clientHeight}, dpr=${window.devicePixelRatio}, targetRatio=${r}, antialias=true`
2303
- ), e.shadowMap.enabled = !0, e.shadowMap.type = w.PCFSoftShadowMap, b.container.appendChild(e.domElement), b.renderer = e;
2310
+ e.setSize(C.container.clientWidth, C.container.clientHeight), e.setPixelRatio(r), console.log(
2311
+ `[Renderer] css=${C.container.clientWidth}×${C.container.clientHeight}, dpr=${window.devicePixelRatio}, targetRatio=${r}, antialias=true`
2312
+ ), e.shadowMap.enabled = !0, e.shadowMap.type = w.PCFSoftShadowMap, C.container.appendChild(e.domElement), C.renderer = e;
2304
2313
  }
2305
2314
  function go() {
2306
- if (!b.renderer || !b.scene || !b.camera) return;
2307
- const r = new qi(b.renderer);
2308
- r.addPass(new Vi(b.scene, b.camera)), r.addPass(new Ji());
2315
+ if (!C.renderer || !C.scene || !C.camera) return;
2316
+ const r = new qi(C.renderer);
2317
+ r.addPass(new Vi(C.scene, C.camera)), r.addPass(new Ji());
2309
2318
  const e = window.innerWidth * window.devicePixelRatio, t = window.innerWidth * window.devicePixelRatio * window.innerHeight * window.devicePixelRatio, s = e / 1920, o = Math.round(
2310
2319
  4 * Math.min(Math.max(s, 0.6), 8)
2311
2320
  ), a = t > 25e6 ? 1 : t > 12e6 ? 1.5 : 2;
@@ -2314,20 +2323,20 @@ function go() {
2314
2323
  );
2315
2324
  const l = new Ce(
2316
2325
  new w.Vector2(
2317
- b.container.clientWidth,
2318
- b.container.clientHeight
2326
+ C.container.clientWidth,
2327
+ C.container.clientHeight
2319
2328
  ),
2320
- b.scene,
2321
- b.camera
2329
+ C.scene,
2330
+ C.camera
2322
2331
  );
2323
2332
  l.edgeStrength = 8, l.edgeGlow = 1.5, l.edgeThickness = o, l.visibleEdgeColor.set(Ws), l.hiddenEdgeColor.set(Ws), l.downSampleRatio = a, l.pulsePeriod = 2, r.addPass(l), Ie = r, ye = l;
2324
2333
  }
2325
2334
  function bo() {
2326
- b.scene = new w.Scene(), b.scene.name = "sl_scene", new w.TextureLoader().load(
2335
+ C.scene = new w.Scene(), C.scene.name = "sl_scene", new w.TextureLoader().load(
2327
2336
  Qi,
2328
2337
  (e) => {
2329
- const t = new w.PMREMGenerator(b.renderer), n = t.fromEquirectangular(e).texture;
2330
- b.scene.environment = n, t.dispose();
2338
+ const t = new w.PMREMGenerator(C.renderer), n = t.fromEquirectangular(e).texture;
2339
+ C.scene.environment = n, t.dispose();
2331
2340
  },
2332
2341
  void 0,
2333
2342
  (e) => console.error("背景图加载失败:", e)
@@ -2335,40 +2344,40 @@ function bo() {
2335
2344
  }
2336
2345
  function Co() {
2337
2346
  const r = new w.GridHelper(30, 30, 8956671, 3364232);
2338
- r.name = "地板", r.userData.type = "initFloor", b.scene.add(r), b.gridHelper = r;
2347
+ r.name = "地板", r.userData.type = "initFloor", C.scene.add(r), C.gridHelper = r;
2339
2348
  const e = new w.PlaneGeometry(30, 30), t = new w.ShadowMaterial({
2340
2349
  opacity: 0.3,
2341
2350
  color: 0
2342
2351
  }), n = new w.Mesh(e, t);
2343
- n.rotation.x = -Math.PI / 2, n.position.y = -0.01, n.name = "阴影接收平面", n.userData.type = "initFloor", n.receiveShadow = !0, b.scene.add(n);
2352
+ n.rotation.x = -Math.PI / 2, n.position.y = -0.01, n.name = "阴影接收平面", n.userData.type = "initFloor", n.receiveShadow = !0, C.scene.add(n);
2344
2353
  }
2345
2354
  function Io() {
2346
- const r = b.container, e = r.clientWidth / r.clientHeight, t = new w.PerspectiveCamera(45, e, 0.1, 1e3);
2347
- t.position.set(0, 6, 15), t.lookAt(0, 0, 0), b.camera = t;
2355
+ const r = C.container, e = r.clientWidth / r.clientHeight, t = new w.PerspectiveCamera(45, e, 0.1, 1e3);
2356
+ t.position.set(0, 6, 15), t.lookAt(0, 0, 0), C.camera = t;
2348
2357
  }
2349
2358
  function an(r = !1) {
2350
- if (!b.defaultMainCamera) return;
2351
- const e = b.defaultMainCamera;
2359
+ if (!C.defaultMainCamera) return;
2360
+ const e = C.defaultMainCamera;
2352
2361
  if (r) {
2353
- b.camera.position.set(
2362
+ C.camera.position.set(
2354
2363
  e.position[0],
2355
2364
  e.position[1],
2356
2365
  e.position[2]
2357
- ), b.camera.rotation.set(
2366
+ ), C.camera.rotation.set(
2358
2367
  e.rotation[0],
2359
2368
  e.rotation[1],
2360
2369
  e.rotation[2]
2361
- ), b.camera.updateProjectionMatrix(), Dt = e.target;
2370
+ ), C.camera.updateProjectionMatrix(), Dt = e.target;
2362
2371
  return;
2363
2372
  } else
2364
2373
  cn(""), hs();
2365
- if (!b.camera || !b.orbitControls) return;
2366
- const t = b.camera.position.clone(), n = b.orbitControls.target.clone(), s = new w.Vector3(
2374
+ if (!C.camera || !C.orbitControls) return;
2375
+ const t = C.camera.position.clone(), n = C.orbitControls.target.clone(), s = new w.Vector3(
2367
2376
  e.position[0],
2368
2377
  e.position[1],
2369
2378
  e.position[2]
2370
2379
  ), i = e.target ? new w.Vector3(e.target[0], e.target[1], e.target[2]) : new w.Vector3(0, 0, 0);
2371
- b.orbitControls.enabled = !1, new ut.Tween({
2380
+ C.orbitControls.enabled = !1, new ut.Tween({
2372
2381
  x: t.x,
2373
2382
  y: t.y,
2374
2383
  z: t.z,
@@ -2386,13 +2395,13 @@ function an(r = !1) {
2386
2395
  },
2387
2396
  1e3
2388
2397
  ).easing(ut.Easing.Quadratic.InOut).onUpdate((o) => {
2389
- b.camera.position.set(o.x, o.y, o.z), b.orbitControls.target.set(o.tx, o.ty, o.tz), b.orbitControls.update();
2398
+ C.camera.position.set(o.x, o.y, o.z), C.orbitControls.target.set(o.tx, o.ty, o.tz), C.orbitControls.update();
2390
2399
  }).onComplete(() => {
2391
- Dt = e.target, b.orbitControls.enabled = !0;
2400
+ Dt = e.target, C.orbitControls.enabled = !0;
2392
2401
  }).start();
2393
2402
  }
2394
2403
  function yo() {
2395
- const r = new Ii(b.camera, b.renderer.domElement);
2404
+ const r = new Ii(C.camera, C.renderer.domElement);
2396
2405
  r.minDistance = 0, r.maxDistance = 1 / 0, r.addEventListener("start", () => {
2397
2406
  Rt = !1;
2398
2407
  }), r.addEventListener("change", () => {
@@ -2401,34 +2410,34 @@ function yo() {
2401
2410
  Rt && (We = !0, setTimeout(() => {
2402
2411
  We = !1;
2403
2412
  }, 200));
2404
- }), b.orbitControls = r;
2413
+ }), C.orbitControls = r;
2405
2414
  }
2406
2415
  function xo() {
2407
- const r = new Ni(
2408
- b.camera,
2409
- b.renderer.domElement
2416
+ const r = new Oi(
2417
+ C.camera,
2418
+ C.renderer.domElement
2410
2419
  );
2411
2420
  r.addEventListener("dragging-changed", (e) => {
2412
- b.orbitControls.enabled = !e.value, e.value || (We = !0, setTimeout(() => {
2421
+ C.orbitControls.enabled = !e.value, e.value || (We = !0, setTimeout(() => {
2413
2422
  We = !1;
2414
2423
  }, 200));
2415
2424
  }), r.addEventListener("objectChange", () => {
2416
- const e = b.selectedObject;
2425
+ const e = C.selectedObject;
2417
2426
  if (os && e && os(e), e && e.type === "DirectionalLight") {
2418
2427
  const t = e.userData.helper;
2419
2428
  t && t.update && t.update();
2420
2429
  }
2421
- }), b.scene.add(r.getHelper()), b.transformControls = r;
2430
+ }), C.scene.add(r.getHelper()), C.transformControls = r;
2422
2431
  }
2423
2432
  function vo() {
2424
2433
  const r = new w.AmbientLight(16777215, 1);
2425
- b.scene.add(r);
2434
+ C.scene.add(r);
2426
2435
  }
2427
2436
  function ln() {
2428
2437
  var e, t;
2429
- kt = requestAnimationFrame(ln), 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 && Ao(b.scene, b.camera), Ot && b.scene && (vt = [], b.scene.traverse((n) => {
2438
+ kt = requestAnimationFrame(ln), ut.update(), (e = C.orbitControls) == null || e.update(), C.mode === "run" && Ie && C.scene && C.camera ? Ie.render() : (t = C.renderer) == null || t.render(C.scene, C.camera), C.scene && C.camera && Ao(C.scene, C.camera), Nt && C.scene && (vt = [], C.scene.traverse((n) => {
2430
2439
  n.userData.isWater && n.type === "Mesh" && vt.push(n);
2431
- }), Ot = !1);
2440
+ }), Nt = !1);
2432
2441
  for (let n = 0; n < vt.length; n++) {
2433
2442
  const s = vt[n], i = s.material;
2434
2443
  if (i.normalMap) {
@@ -2438,25 +2447,25 @@ function ln() {
2438
2447
  }
2439
2448
  }
2440
2449
  function So() {
2441
- if (!b.container || !b.camera || !b.renderer) return;
2442
- const r = b.container.clientWidth, e = b.container.clientHeight;
2443
- r === 0 || e === 0 || (b.camera.aspect = r / e, b.camera.updateProjectionMatrix(), b.renderer.setSize(r, e), Ie && Ie.setSize(r, e), ye && ye.resolution.set(r, e), co(r, e));
2450
+ if (!C.container || !C.camera || !C.renderer) return;
2451
+ const r = C.container.clientWidth, e = C.container.clientHeight;
2452
+ r === 0 || e === 0 || (C.camera.aspect = r / e, C.camera.updateProjectionMatrix(), C.renderer.setSize(r, e), Ie && Ie.setSize(r, e), ye && ye.resolution.set(r, e), co(r, e));
2444
2453
  }
2445
2454
  function ds(r) {
2446
- b.selectedObject !== r && (b.selectedObject && b.transformControls.detach(), b.selectedObject = r, b.transformControls.attach(r), b.transformControls.setMode(b.transformControlsMode), b.transformControls.showX = !0, b.transformControls.showY = !0, b.transformControls.showZ = !0, An(r), Oe == null || Oe(r));
2455
+ C.selectedObject !== r && (C.selectedObject && C.transformControls.detach(), C.selectedObject = r, C.transformControls.attach(r), C.transformControls.setMode(C.transformControlsMode), C.transformControls.showX = !0, C.transformControls.showY = !0, C.transformControls.showZ = !0, An(r), Ne == null || Ne(r));
2447
2456
  }
2448
- let _ = null;
2457
+ let $ = null;
2449
2458
  function To(r) {
2450
- _ = r;
2459
+ $ = r;
2451
2460
  }
2452
2461
  function Zt(r) {
2453
- _ == null || _(r);
2462
+ $ == null || $(r);
2454
2463
  }
2455
2464
  function Mo(r) {
2456
- b.transformControlsMode = r, b.transformControls && b.transformControls.setMode(b.transformControlsMode);
2465
+ C.transformControlsMode = r, C.transformControls && C.transformControls.setMode(C.transformControlsMode);
2457
2466
  }
2458
2467
  function An(r) {
2459
- if (b.mode === "edit")
2468
+ if (C.mode === "edit")
2460
2469
  hs(), r.traverse((t) => {
2461
2470
  if (t.isMesh) {
2462
2471
  const n = t, s = new w.EdgesGeometry(n.geometry), i = new w.LineBasicMaterial({
@@ -2475,7 +2484,7 @@ function An(r) {
2475
2484
  }
2476
2485
  }
2477
2486
  function hs() {
2478
- if (b.mode === "edit") {
2487
+ if (C.mode === "edit") {
2479
2488
  for (const r of is)
2480
2489
  r.parent && r.parent.remove(r), r.geometry.dispose(), r.material.dispose();
2481
2490
  is = [];
@@ -2483,7 +2492,7 @@ function hs() {
2483
2492
  ye && (ye.selectedObjects = []);
2484
2493
  }
2485
2494
  function fs() {
2486
- b.selectedObject && (hs(), b.transformControls.detach(), b.selectedObject = null, Oe == null || Oe(null));
2495
+ C.selectedObject && (hs(), C.transformControls.detach(), C.selectedObject = null, Ne == null || Ne(null));
2487
2496
  }
2488
2497
  function cn(r) {
2489
2498
  let e = null;
@@ -2502,13 +2511,13 @@ function wo(r) {
2502
2511
  We = !1;
2503
2512
  return;
2504
2513
  }
2505
- const e = b.renderer.domElement.getBoundingClientRect(), t = new w.Vector2(
2514
+ const e = C.renderer.domElement.getBoundingClientRect(), t = new w.Vector2(
2506
2515
  (r.clientX - e.left) / e.width * 2 - 1,
2507
2516
  -((r.clientY - e.top) / e.height) * 2 + 1
2508
2517
  ), n = new w.Raycaster();
2509
- n.setFromCamera(t, b.camera);
2518
+ n.setFromCamera(t, C.camera);
2510
2519
  const s = [];
2511
- b.scene.traverse((o) => {
2520
+ C.scene.traverse((o) => {
2512
2521
  (o.userData.isMovable || o.userData.type === "lightHelper") && s.push(o);
2513
2522
  });
2514
2523
  const i = n.intersectObjects(s);
@@ -2533,7 +2542,7 @@ function Ro(r) {
2533
2542
  return r;
2534
2543
  }
2535
2544
  function Eo(r, e = 500) {
2536
- if (!b.camera || !b.orbitControls) {
2545
+ if (!C.camera || !C.orbitControls) {
2537
2546
  console.warn(
2538
2547
  "[focusOnObject] 编辑器尚未初始化或已销毁,无法执行聚焦操作。请确保已调用 initEditor()"
2539
2548
  );
@@ -2547,17 +2556,17 @@ function Eo(r, e = 500) {
2547
2556
  r.userData.closeUpView && typeof r.userData.closeUpView.x == "number" && typeof r.userData.closeUpView.y == "number" && typeof r.userData.closeUpView.z == "number" && (t = r.userData.closeUpView);
2548
2557
  const n = new w.Vector3();
2549
2558
  r.getWorldPosition(n);
2550
- 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();
2559
+ 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(C.camera.position).sub(n).normalize();
2551
2560
  l.lengthSq() < 1e-3 && l.set(0, 0, 1);
2552
- const A = n.clone().add(l.multiplyScalar(a)), d = b.camera.position.clone(), c = b.orbitControls.target.clone();
2561
+ const A = n.clone().add(l.multiplyScalar(a)), d = C.camera.position.clone(), u = C.orbitControls.target.clone();
2553
2562
  try {
2554
2563
  new ut.Tween({
2555
2564
  x: d.x,
2556
2565
  y: d.y,
2557
2566
  z: d.z,
2558
- tx: c.x,
2559
- ty: c.y,
2560
- tz: c.z
2567
+ tx: u.x,
2568
+ ty: u.y,
2569
+ tz: u.z
2561
2570
  }).to(
2562
2571
  {
2563
2572
  x: t ? t.x : A.x,
@@ -2568,13 +2577,13 @@ function Eo(r, e = 500) {
2568
2577
  tz: n.z
2569
2578
  },
2570
2579
  e
2571
- ).easing(ut.Easing.Quadratic.InOut).onUpdate((u) => {
2572
- b.camera.position.set(u.x, u.y, u.z), b.orbitControls.target.set(u.tx, u.ty, u.tz), b.orbitControls.update();
2580
+ ).easing(ut.Easing.Quadratic.InOut).onUpdate((c) => {
2581
+ C.camera.position.set(c.x, c.y, c.z), C.orbitControls.target.set(c.tx, c.ty, c.tz), C.orbitControls.update();
2573
2582
  }).start();
2574
- } catch (u) {
2583
+ } catch (c) {
2575
2584
  console.error(
2576
2585
  "[focusOnObject] TWEEN 动画创建失败,请检查 @tweenjs/tween.js 是否已正确安装且版本兼容(^23.1.3):",
2577
- u
2586
+ c
2578
2587
  );
2579
2588
  }
2580
2589
  }
@@ -2593,7 +2602,7 @@ function Lo(r, e) {
2593
2602
  r.userData.id = n, je.set(n, r);
2594
2603
  }
2595
2604
  }
2596
- function No(r) {
2605
+ function Oo(r) {
2597
2606
  r.traverse((e) => {
2598
2607
  if (e.name && e.name.startsWith("DataPanel_")) {
2599
2608
  const t = e;
@@ -2602,17 +2611,17 @@ function No(r) {
2602
2611
  });
2603
2612
  }
2604
2613
  function Xe(r, e = !1) {
2605
- b.scene.add(r), Ot = !0, r.userData.isMovable && (Wo(r), Ut()), e && b.mode === "edit" && ds(r);
2614
+ C.scene.add(r), Nt = !0, r.userData.isMovable && (Wo(r), Ut()), e && C.mode === "edit" && ds(r);
2606
2615
  }
2607
- function Oo(r) {
2608
- b.selectedObject === r && fs(), Ot = !0, No(r), Po(r), r.userData.helper && b.scene.remove(r.userData.helper), r.parent ? r.parent.remove(r) : b.scene.remove(r), jo(r), Ut();
2616
+ function No(r) {
2617
+ C.selectedObject === r && fs(), Nt = !0, Oo(r), Po(r), r.userData.helper && C.scene.remove(r.userData.helper), r.parent ? r.parent.remove(r) : C.scene.remove(r), jo(r), Ut();
2609
2618
  }
2610
2619
  function Do(r) {
2611
- const e = b.scene.getObjectByProperty("uuid", r);
2612
- e && Oo(e);
2620
+ const e = C.scene.getObjectByProperty("uuid", r);
2621
+ e && No(e);
2613
2622
  }
2614
2623
  function Wo(r) {
2615
- r.userData.isMovable && r.parent === b.scene && (xe.includes(r) || xe.push(r));
2624
+ r.userData.isMovable && r.parent === C.scene && (xe.includes(r) || xe.push(r));
2616
2625
  }
2617
2626
  function jo(r) {
2618
2627
  const e = xe.indexOf(r);
@@ -2620,7 +2629,7 @@ function jo(r) {
2620
2629
  }
2621
2630
  function Fo() {
2622
2631
  const r = [];
2623
- b.scene.children.forEach((e) => {
2632
+ C.scene.children.forEach((e) => {
2624
2633
  e.userData.isMovable && r.push(e);
2625
2634
  }), xe = r, Ut();
2626
2635
  }
@@ -2628,7 +2637,7 @@ function Ut() {
2628
2637
  Et == null || Et([...xe]);
2629
2638
  }
2630
2639
  function Uo(r) {
2631
- Oe = r;
2640
+ Ne = r;
2632
2641
  }
2633
2642
  function Ho(r) {
2634
2643
  os = r;
@@ -2640,84 +2649,84 @@ function Go() {
2640
2649
  return xe;
2641
2650
  }
2642
2651
  function Ko() {
2643
- return b.selectedObject;
2652
+ return C.selectedObject;
2644
2653
  }
2645
- function Rl(r, e, t) {
2646
- if (!b.scene) return;
2654
+ function Nl(r, e, t) {
2655
+ if (!C.scene) return;
2647
2656
  const n = je.get(r);
2648
2657
  if (n) {
2649
2658
  const s = Ft(n);
2650
2659
  s && s.updateItemByCode(e, t);
2651
2660
  }
2652
2661
  }
2653
- function El() {
2654
- return b.scene;
2662
+ function Dl() {
2663
+ return C.scene;
2655
2664
  }
2656
2665
  function Bo() {
2657
- return b.camera;
2666
+ return C.camera;
2658
2667
  }
2659
- function kl() {
2660
- return b.renderer;
2668
+ function Wl() {
2669
+ return C.renderer;
2661
2670
  }
2662
2671
  async function Zo() {
2663
- var A, d, c;
2664
- _ == null || _(!0), await new Promise((u) => setTimeout(u, 50)), fs();
2665
- const r = b.scene;
2672
+ var A, d, u;
2673
+ $ == null || $(!0), await new Promise((c) => setTimeout(c, 50)), fs();
2674
+ const r = C.scene;
2666
2675
  if (!r)
2667
- return _ == null || _(!1), "{}";
2676
+ return $ == null || $(!1), "{}";
2668
2677
  const e = [], t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
2669
- r.traverse((u) => {
2678
+ r.traverse((c) => {
2670
2679
  var h;
2671
- 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_")) {
2672
- const m = u;
2673
- if (m.element) {
2674
- const f = m.element.querySelector(
2680
+ if (c.userData.type === "lightHelper" && e.push(c), c.type === "DirectionalLight" && c.userData.helper && (t.set(c, c.userData.helper), c.userData.helper = void 0), c.name && c.name.startsWith("DataPanel_")) {
2681
+ const p = c;
2682
+ if (p.element) {
2683
+ const f = p.element.querySelector(
2675
2684
  "[data-panel-title]"
2676
- ), g = [];
2677
- if (m.element.querySelectorAll(
2685
+ ), m = [];
2686
+ if (p.element.querySelectorAll(
2678
2687
  ".sl-css2d-data-panel-item"
2679
- ).forEach((I) => {
2680
- var v, M, L;
2681
- const x = I.querySelector(".item-label"), y = I.querySelector(".item-value");
2682
- if (x && y) {
2683
- const Q = (x.textContent || "").trim(), $ = ((M = (v = y.childNodes[0]) == null ? void 0 : v.textContent) == null ? void 0 : M.trim()) || "", Y = y.querySelector(
2688
+ ).forEach((x) => {
2689
+ var v, S, L;
2690
+ const I = x.querySelector(".item-label"), y = x.querySelector(".item-value");
2691
+ if (I && y) {
2692
+ const Y = (I.textContent || "").trim(), ee = ((S = (v = y.childNodes[0]) == null ? void 0 : v.textContent) == null ? void 0 : S.trim()) || "", _ = y.querySelector(
2684
2693
  "span"
2685
- ), Te = Y ? (Y.textContent || "").trim() : void 0, Ht = ((L = I.getAttribute("data-item-code")) == null ? void 0 : L.trim()) || void 0;
2686
- g.push({ label: Q, value: $, unit: Te, code: Ht });
2694
+ ), Te = _ ? (_.textContent || "").trim() : void 0, Ht = ((L = x.getAttribute("data-item-code")) == null ? void 0 : L.trim()) || void 0;
2695
+ m.push({ label: Y, value: ee, unit: Te, code: Ht });
2687
2696
  }
2688
- }), u.parent) {
2689
- const I = m.element.style.width || "", x = m.element.style.fontSize || "", y = Ft(u.parent), v = y ? y.getOffsetY() : 0.1;
2697
+ }), c.parent) {
2698
+ const x = p.element.style.width || "", I = p.element.style.fontSize || "", y = Ft(c.parent), v = y ? y.getOffsetY() : 0.1;
2690
2699
  n.set(
2691
- u.parent.userData.id ? u.parent.userData.id : u.parent.uuid,
2700
+ c.parent.userData.id ? c.parent.userData.id : c.parent.uuid,
2692
2701
  {
2693
2702
  title: ((h = f == null ? void 0 : f.textContent) == null ? void 0 : h.trim()) || "",
2694
- items: g,
2695
- width: I,
2696
- fontSize: x,
2703
+ items: m,
2704
+ width: x,
2705
+ fontSize: I,
2697
2706
  offsetY: v
2698
2707
  }
2699
2708
  );
2700
2709
  }
2701
2710
  }
2702
2711
  }
2703
- }), e.forEach((u) => r.remove(u));
2712
+ }), e.forEach((c) => r.remove(c));
2704
2713
  const s = r.clone();
2705
2714
  s.children = s.children.filter(
2706
- (u) => u.userData.type !== "initFloor"
2707
- ), s.traverse((u) => {
2708
- u.name && u.name.startsWith("DataPanel_") && u.parent && u.parent.remove(u);
2715
+ (c) => c.userData.type !== "initFloor"
2716
+ ), s.traverse((c) => {
2717
+ c.name && c.name.startsWith("DataPanel_") && c.parent && c.parent.remove(c);
2709
2718
  });
2710
2719
  const i = s.toJSON();
2711
- e.forEach((u) => r.add(u)), t.forEach((u, h) => {
2712
- h.userData.helper = u;
2720
+ e.forEach((c) => r.add(c)), t.forEach((c, h) => {
2721
+ h.userData.helper = c;
2713
2722
  });
2714
2723
  const o = {
2715
- position: (A = b.camera) == null ? void 0 : A.position.toArray(),
2716
- rotation: (d = b.camera) == null ? void 0 : d.rotation.toArray(),
2717
- target: ((c = b.orbitControls) == null ? void 0 : c.target.toArray()) || [0, 0, 0]
2724
+ position: (A = C.camera) == null ? void 0 : A.position.toArray(),
2725
+ rotation: (d = C.camera) == null ? void 0 : d.rotation.toArray(),
2726
+ target: ((u = C.orbitControls) == null ? void 0 : u.target.toArray()) || [0, 0, 0]
2718
2727
  }, a = {};
2719
- n.forEach((u, h) => {
2720
- a[h] = u;
2728
+ n.forEach((c, h) => {
2729
+ a[h] = c;
2721
2730
  });
2722
2731
  const l = JSON.stringify({
2723
2732
  scene: i,
@@ -2725,28 +2734,28 @@ async function Zo() {
2725
2734
  dataPanels: a
2726
2735
  // lightHelpers: lightHelpers,
2727
2736
  });
2728
- return _ == null || _(!1), l;
2737
+ return $ == null || $(!1), l;
2729
2738
  }
2730
2739
  function Xo(r, e = "edit", t) {
2731
2740
  var o, a, l;
2732
2741
  const n = typeof r == "string" ? JSON.parse(r) : r, i = new w.ObjectLoader().parse(n);
2733
- i.type === "Scene" ? b.scene = i : (o = b.scene) == null || o.add(i), t && ((a = b.scene) == null || a.traverse((A) => {
2734
- const d = A.userData.id || A.uuid, c = t[d];
2735
- if (c && A.userData.isMovable) {
2742
+ i.type === "Scene" ? C.scene = i : (o = C.scene) == null || o.add(i), t && ((a = C.scene) == null || a.traverse((A) => {
2743
+ const d = A.userData.id || A.uuid, u = t[d];
2744
+ if (u && A.userData.isMovable) {
2736
2745
  ko(A);
2737
- const u = new dt({
2738
- title: c.title,
2739
- items: c.items
2746
+ const c = new dt({
2747
+ title: u.title,
2748
+ items: u.items
2740
2749
  });
2741
- 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), rn(A, u);
2750
+ c.attachTo(A), c.visible = !1, u.width && c.setWidth(u.width), u.fontSize && c.setFontSize(u.fontSize), u.offsetY !== void 0 && c.setOffsetY(u.offsetY), rn(A, c);
2742
2751
  }
2743
- })), e === "edit" && ((l = b.scene) == null || l.traverse((A) => {
2752
+ })), e === "edit" && ((l = C.scene) == null || l.traverse((A) => {
2744
2753
  var d;
2745
2754
  if (A.type === "DirectionalLight") {
2746
- const c = A;
2747
- if (!c.userData.helper) {
2748
- const u = new w.DirectionalLightHelper(c, 1);
2749
- u.userData.type = "lightHelper", c.userData.helper = u, (d = b.scene) == null || d.add(u);
2755
+ const u = A;
2756
+ if (!u.userData.helper) {
2757
+ const c = new w.DirectionalLightHelper(u, 1);
2758
+ c.userData.type = "lightHelper", u.userData.helper = c, (d = C.scene) == null || d.add(c);
2750
2759
  }
2751
2760
  }
2752
2761
  }));
@@ -2764,9 +2773,9 @@ function un(r) {
2764
2773
  un(t);
2765
2774
  }
2766
2775
  function qo() {
2767
- 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 && (un(b.scene), b.scene = null), b.renderer && (b.renderer.dispose(), b.renderer.domElement && b.container && b.container.removeChild(b.renderer.domElement), b.renderer = null), uo(), b.camera = null, b.gridHelper = null, b.selectedObject = null, b.container = null, b.mode = "", xe = [], je.clear(), Ut(), Rt = !1, We = !1;
2776
+ kt !== null && (cancelAnimationFrame(kt), kt = null), lt && C.container && (C.container.removeEventListener("click", lt), lt = null), At && (window.removeEventListener("resize", At), At = null), C.orbitControls && (C.orbitControls.dispose(), C.orbitControls = null), C.transformControls && (C.transformControls.dispose(), C.transformControls = null), Ie && (Ie.dispose(), Ie = null, ye = null), C.scene && (un(C.scene), C.scene = null), C.renderer && (C.renderer.dispose(), C.renderer.domElement && C.container && C.container.removeChild(C.renderer.domElement), C.renderer = null), uo(), C.camera = null, C.gridHelper = null, C.selectedObject = null, C.container = null, C.mode = "", xe = [], je.clear(), Ut(), Rt = !1, We = !1;
2768
2777
  }
2769
- const Vo = /^[og]\s*(.+)?/, Jo = /^mtllib /, Qo = /^usemtl /, Yo = /^usemap /, js = /\s+/, Fs = new T(), Xt = new T(), Us = new T(), Hs = new T(), te = new T(), St = new B();
2778
+ const Vo = /^[og]\s*(.+)?/, Jo = /^mtllib /, Qo = /^usemtl /, Yo = /^usemap /, js = /\s+/, Fs = new M(), Xt = new M(), Us = new M(), Hs = new M(), se = new M(), St = new Z();
2770
2779
  function _o() {
2771
2780
  const r = {
2772
2781
  objects: [],
@@ -2876,7 +2885,7 @@ function _o() {
2876
2885
  },
2877
2886
  addFaceNormal: function(e, t, n) {
2878
2887
  const s = this.vertices, i = this.object.geometry.normals;
2879
- Fs.fromArray(s, e), Xt.fromArray(s, t), Us.fromArray(s, n), te.subVectors(Us, Xt), Hs.subVectors(Fs, Xt), te.cross(Hs), te.normalize(), i.push(te.x, te.y, te.z), i.push(te.x, te.y, te.z), i.push(te.x, te.y, te.z);
2888
+ Fs.fromArray(s, e), Xt.fromArray(s, t), Us.fromArray(s, n), se.subVectors(Us, Xt), Hs.subVectors(Fs, Xt), se.cross(Hs), se.normalize(), i.push(se.x, se.y, se.z), i.push(se.x, se.y, se.z), i.push(se.x, se.y, se.z);
2880
2889
  },
2881
2890
  addColor: function(e, t, n) {
2882
2891
  const s = this.colors, i = this.object.geometry.colors;
@@ -2896,15 +2905,15 @@ function _o() {
2896
2905
  },
2897
2906
  addFace: function(e, t, n, s, i, o, a, l, A) {
2898
2907
  const d = this.vertices.length;
2899
- let c = this.parseVertexIndex(e, d), u = this.parseVertexIndex(t, d), h = this.parseVertexIndex(n, d);
2900
- if (this.addVertex(c, u, h), this.addColor(c, u, h), a !== void 0 && a !== "") {
2901
- const m = this.normals.length;
2902
- c = this.parseNormalIndex(a, m), u = this.parseNormalIndex(l, m), h = this.parseNormalIndex(A, m), this.addNormal(c, u, h);
2908
+ let u = this.parseVertexIndex(e, d), c = this.parseVertexIndex(t, d), h = this.parseVertexIndex(n, d);
2909
+ if (this.addVertex(u, c, h), this.addColor(u, c, h), a !== void 0 && a !== "") {
2910
+ const p = this.normals.length;
2911
+ u = this.parseNormalIndex(a, p), c = this.parseNormalIndex(l, p), h = this.parseNormalIndex(A, p), this.addNormal(u, c, h);
2903
2912
  } else
2904
- this.addFaceNormal(c, u, h);
2913
+ this.addFaceNormal(u, c, h);
2905
2914
  if (s !== void 0 && s !== "") {
2906
- const m = this.uvs.length;
2907
- 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;
2915
+ const p = this.uvs.length;
2916
+ u = this.parseUVIndex(s, p), c = this.parseUVIndex(i, p), h = this.parseUVIndex(o, p), this.addUV(u, c, h), this.object.geometry.hasUVIndices = !0;
2908
2917
  } else
2909
2918
  this.addDefaultUV();
2910
2919
  },
@@ -2985,76 +2994,76 @@ class $o extends As {
2985
2994
  const d = A.charAt(0);
2986
2995
  if (d !== "#")
2987
2996
  if (d === "v") {
2988
- const c = A.split(js);
2989
- switch (c[0]) {
2997
+ const u = A.split(js);
2998
+ switch (u[0]) {
2990
2999
  case "v":
2991
3000
  t.vertices.push(
2992
- parseFloat(c[1]),
2993
- parseFloat(c[2]),
2994
- parseFloat(c[3])
2995
- ), c.length >= 7 ? (St.setRGB(
2996
- parseFloat(c[4]),
2997
- parseFloat(c[5]),
2998
- parseFloat(c[6]),
2999
- he
3001
+ parseFloat(u[1]),
3002
+ parseFloat(u[2]),
3003
+ parseFloat(u[3])
3004
+ ), u.length >= 7 ? (St.setRGB(
3005
+ parseFloat(u[4]),
3006
+ parseFloat(u[5]),
3007
+ parseFloat(u[6]),
3008
+ fe
3000
3009
  ), t.colors.push(St.r, St.g, St.b)) : t.colors.push(void 0, void 0, void 0);
3001
3010
  break;
3002
3011
  case "vn":
3003
3012
  t.normals.push(
3004
- parseFloat(c[1]),
3005
- parseFloat(c[2]),
3006
- parseFloat(c[3])
3013
+ parseFloat(u[1]),
3014
+ parseFloat(u[2]),
3015
+ parseFloat(u[3])
3007
3016
  );
3008
3017
  break;
3009
3018
  case "vt":
3010
3019
  t.uvs.push(
3011
- parseFloat(c[1]),
3012
- parseFloat(c[2])
3020
+ parseFloat(u[1]),
3021
+ parseFloat(u[2])
3013
3022
  );
3014
3023
  break;
3015
3024
  }
3016
3025
  } else if (d === "f") {
3017
- const u = A.slice(1).trim().split(js), h = [];
3018
- for (let f = 0, g = u.length; f < g; f++) {
3019
- const p = u[f];
3020
- if (p.length > 0) {
3021
- const I = p.split("/");
3022
- h.push(I);
3026
+ const c = A.slice(1).trim().split(js), h = [];
3027
+ for (let f = 0, m = c.length; f < m; f++) {
3028
+ const g = c[f];
3029
+ if (g.length > 0) {
3030
+ const x = g.split("/");
3031
+ h.push(x);
3023
3032
  }
3024
3033
  }
3025
- const m = h[0];
3026
- for (let f = 1, g = h.length - 1; f < g; f++) {
3027
- const p = h[f], I = h[f + 1];
3034
+ const p = h[0];
3035
+ for (let f = 1, m = h.length - 1; f < m; f++) {
3036
+ const g = h[f], x = h[f + 1];
3028
3037
  t.addFace(
3029
- m[0],
3030
3038
  p[0],
3031
- I[0],
3032
- m[1],
3039
+ g[0],
3040
+ x[0],
3033
3041
  p[1],
3034
- I[1],
3035
- m[2],
3042
+ g[1],
3043
+ x[1],
3036
3044
  p[2],
3037
- I[2]
3045
+ g[2],
3046
+ x[2]
3038
3047
  );
3039
3048
  }
3040
3049
  } else if (d === "l") {
3041
- const c = A.substring(1).trim().split(" ");
3042
- let u = [];
3050
+ const u = A.substring(1).trim().split(" ");
3051
+ let c = [];
3043
3052
  const h = [];
3044
3053
  if (A.indexOf("/") === -1)
3045
- u = c;
3054
+ c = u;
3046
3055
  else
3047
- for (let m = 0, f = c.length; m < f; m++) {
3048
- const g = c[m].split("/");
3049
- g[0] !== "" && u.push(g[0]), g[1] !== "" && h.push(g[1]);
3056
+ for (let p = 0, f = u.length; p < f; p++) {
3057
+ const m = u[p].split("/");
3058
+ m[0] !== "" && c.push(m[0]), m[1] !== "" && h.push(m[1]);
3050
3059
  }
3051
- t.addLineGeometry(u, h);
3060
+ t.addLineGeometry(c, h);
3052
3061
  } else if (d === "p") {
3053
- const u = A.slice(1).trim().split(" ");
3054
- t.addPointGeometry(u);
3062
+ const c = A.slice(1).trim().split(" ");
3063
+ t.addPointGeometry(c);
3055
3064
  } else if ((s = Vo.exec(A)) !== null) {
3056
- const c = (" " + s[0].slice(1).trim()).slice(1);
3057
- t.startObject(c);
3065
+ const u = (" " + s[0].slice(1).trim()).slice(1);
3066
+ t.startObject(u);
3058
3067
  } else if (Qo.test(A))
3059
3068
  t.object.startMaterial(A.substring(7).trim(), t.materialLibraries);
3060
3069
  else if (Jo.test(A))
@@ -3063,12 +3072,12 @@ class $o extends As {
3063
3072
  console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');
3064
3073
  else if (d === "s") {
3065
3074
  if (s = A.split(" "), s.length > 1) {
3066
- const u = s[1].trim().toLowerCase();
3067
- t.object.smooth = u !== "0" && u !== "off";
3075
+ const c = s[1].trim().toLowerCase();
3076
+ t.object.smooth = c !== "0" && c !== "off";
3068
3077
  } else
3069
3078
  t.object.smooth = !0;
3070
- const c = t.object.currentMaterial();
3071
- c && (c.smooth = t.object.smooth);
3079
+ const u = t.object.currentMaterial();
3080
+ u && (u.smooth = t.object.smooth);
3072
3081
  } else {
3073
3082
  if (A === "\0") continue;
3074
3083
  console.warn('THREE.OBJLoader: Unexpected line: "' + A + '"');
@@ -3078,40 +3087,40 @@ class $o extends As {
3078
3087
  const i = new Tt();
3079
3088
  if (i.materialLibraries = [].concat(t.materialLibraries), !(t.objects.length === 1 && t.objects[0].geometry.vertices.length === 0) === !0)
3080
3089
  for (let a = 0, l = t.objects.length; a < l; a++) {
3081
- const A = t.objects[a], d = A.geometry, c = A.materials, u = d.type === "Line", h = d.type === "Points";
3082
- let m = !1;
3090
+ const A = t.objects[a], d = A.geometry, u = A.materials, c = d.type === "Line", h = d.type === "Points";
3091
+ let p = !1;
3083
3092
  if (d.vertices.length === 0) continue;
3084
3093
  const f = new De();
3085
- 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));
3086
- const g = [];
3087
- for (let I = 0, x = c.length; I < x; I++) {
3088
- const y = c[I], v = y.name + "_" + y.smooth + "_" + m;
3089
- let M = t.materials[v];
3094
+ f.setAttribute("position", new Ae(d.vertices, 3)), d.normals.length > 0 && f.setAttribute("normal", new Ae(d.normals, 3)), d.colors.length > 0 && (p = !0, f.setAttribute("color", new Ae(d.colors, 3))), d.hasUVIndices === !0 && f.setAttribute("uv", new Ae(d.uvs, 2));
3095
+ const m = [];
3096
+ for (let x = 0, I = u.length; x < I; x++) {
3097
+ const y = u[x], v = y.name + "_" + y.smooth + "_" + p;
3098
+ let S = t.materials[v];
3090
3099
  if (this.materials !== null) {
3091
- if (M = this.materials.create(y.name), u && M && !(M instanceof it)) {
3100
+ if (S = this.materials.create(y.name), c && S && !(S instanceof it)) {
3092
3101
  const L = new it();
3093
- ot.prototype.copy.call(L, M), L.color.copy(M.color), M = L;
3094
- } else if (h && M && !(M instanceof et)) {
3102
+ ot.prototype.copy.call(L, S), L.color.copy(S.color), S = L;
3103
+ } else if (h && S && !(S instanceof et)) {
3095
3104
  const L = new et({ size: 10, sizeAttenuation: !1 });
3096
- ot.prototype.copy.call(L, M), L.color.copy(M.color), L.map = M.map, M = L;
3105
+ ot.prototype.copy.call(L, S), L.color.copy(S.color), L.map = S.map, S = L;
3097
3106
  }
3098
3107
  }
3099
- M === void 0 && (u ? M = new it() : h ? M = new et({ size: 1, sizeAttenuation: !1 }) : M = new qn(), M.name = y.name, M.flatShading = !y.smooth, M.vertexColors = m, t.materials[v] = M), g.push(M);
3108
+ S === void 0 && (c ? S = new it() : h ? S = new et({ size: 1, sizeAttenuation: !1 }) : S = new qn(), S.name = y.name, S.flatShading = !y.smooth, S.vertexColors = p, t.materials[v] = S), m.push(S);
3100
3109
  }
3101
- let p;
3102
- if (g.length > 1) {
3103
- for (let I = 0, x = c.length; I < x; I++) {
3104
- const y = c[I];
3105
- f.addGroup(y.groupStart, y.groupCount, I);
3110
+ let g;
3111
+ if (m.length > 1) {
3112
+ for (let x = 0, I = u.length; x < I; x++) {
3113
+ const y = u[x];
3114
+ f.addGroup(y.groupStart, y.groupCount, x);
3106
3115
  }
3107
- u ? p = new es(f, g) : h ? p = new Mt(f, g) : p = new S(f, g);
3116
+ c ? g = new es(f, m) : h ? g = new Mt(f, m) : g = new T(f, m);
3108
3117
  } else
3109
- u ? p = new es(f, g[0]) : h ? p = new Mt(f, g[0]) : p = new S(f, g[0]);
3110
- p.name = A.name, i.add(p);
3118
+ c ? g = new es(f, m[0]) : h ? g = new Mt(f, m[0]) : g = new T(f, m[0]);
3119
+ g.name = A.name, i.add(g);
3111
3120
  }
3112
3121
  else if (t.vertices.length > 0) {
3113
3122
  const a = new et({ size: 1, sizeAttenuation: !1 }), l = new De();
3114
- l.setAttribute("position", new le(t.vertices, 3)), t.colors.length > 0 && t.colors[0] !== void 0 && (l.setAttribute("color", new le(t.colors, 3)), a.vertexColors = !0);
3123
+ l.setAttribute("position", new Ae(t.vertices, 3)), t.colors.length > 0 && t.colors[0] !== void 0 && (l.setAttribute("color", new Ae(t.colors, 3)), a.vertexColors = !0);
3115
3124
  const A = new Mt(l, a);
3116
3125
  i.add(A);
3117
3126
  }
@@ -3307,8 +3316,8 @@ class tr extends As {
3307
3316
  if (l.decode(new Uint8Array(e, 0, 4)) === hn) {
3308
3317
  try {
3309
3318
  o[E.KHR_BINARY_GLTF] = new Ir(e);
3310
- } catch (c) {
3311
- s && s(c);
3319
+ } catch (u) {
3320
+ s && s(u);
3312
3321
  return;
3313
3322
  }
3314
3323
  i = JSON.parse(o[E.KHR_BINARY_GLTF].content);
@@ -3320,7 +3329,7 @@ class tr extends As {
3320
3329
  s && s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
3321
3330
  return;
3322
3331
  }
3323
- const A = new Nr(i, {
3332
+ const A = new Or(i, {
3324
3333
  path: t || this.resourcePath || "",
3325
3334
  crossOrigin: this.crossOrigin,
3326
3335
  requestHeader: this.requestHeader,
@@ -3330,27 +3339,27 @@ class tr extends As {
3330
3339
  });
3331
3340
  A.fileLoader.setRequestHeader(this.requestHeader);
3332
3341
  for (let d = 0; d < this.pluginCallbacks.length; d++) {
3333
- const c = this.pluginCallbacks[d](A);
3334
- c.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), a[c.name] = c, o[c.name] = !0;
3342
+ const u = this.pluginCallbacks[d](A);
3343
+ u.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), a[u.name] = u, o[u.name] = !0;
3335
3344
  }
3336
3345
  if (i.extensionsUsed)
3337
3346
  for (let d = 0; d < i.extensionsUsed.length; ++d) {
3338
- const c = i.extensionsUsed[d], u = i.extensionsRequired || [];
3339
- switch (c) {
3347
+ const u = i.extensionsUsed[d], c = i.extensionsRequired || [];
3348
+ switch (u) {
3340
3349
  case E.KHR_MATERIALS_UNLIT:
3341
- o[c] = new ir();
3350
+ o[u] = new ir();
3342
3351
  break;
3343
3352
  case E.KHR_DRACO_MESH_COMPRESSION:
3344
- o[c] = new yr(i, this.dracoLoader);
3353
+ o[u] = new yr(i, this.dracoLoader);
3345
3354
  break;
3346
3355
  case E.KHR_TEXTURE_TRANSFORM:
3347
- o[c] = new xr();
3356
+ o[u] = new xr();
3348
3357
  break;
3349
3358
  case E.KHR_MESH_QUANTIZATION:
3350
- o[c] = new vr();
3359
+ o[u] = new vr();
3351
3360
  break;
3352
3361
  default:
3353
- u.indexOf(c) >= 0 && a[c] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + c + '".');
3362
+ c.indexOf(u) >= 0 && a[u] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + u + '".');
3354
3363
  }
3355
3364
  }
3356
3365
  A.setExtensions(o), A.setPlugins(a), A.parse(n, s);
@@ -3433,18 +3442,18 @@ class nr {
3433
3442
  if (s) return s;
3434
3443
  const i = t.json, l = ((i.extensions && i.extensions[this.name] || {}).lights || [])[e];
3435
3444
  let A;
3436
- const d = new B(16777215);
3437
- l.color !== void 0 && d.setRGB(l.color[0], l.color[1], l.color[2], Ae);
3438
- const c = l.range !== void 0 ? l.range : 0;
3445
+ const d = new Z(16777215);
3446
+ l.color !== void 0 && d.setRGB(l.color[0], l.color[1], l.color[2], ce);
3447
+ const u = l.range !== void 0 ? l.range : 0;
3439
3448
  switch (l.type) {
3440
3449
  case "directional":
3441
3450
  A = new Yn(d), A.target.position.set(0, 0, -1), A.add(A.target);
3442
3451
  break;
3443
3452
  case "point":
3444
- A = new Qn(d), A.distance = c;
3453
+ A = new Qn(d), A.distance = u;
3445
3454
  break;
3446
3455
  case "spot":
3447
- A = new Jn(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);
3456
+ A = new Jn(d), A.distance = u, l.spot = l.spot || {}, l.spot.innerConeAngle = l.spot.innerConeAngle !== void 0 ? l.spot.innerConeAngle : 0, l.spot.outerConeAngle = l.spot.outerConeAngle !== void 0 ? l.spot.outerConeAngle : Math.PI / 4, 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);
3448
3457
  break;
3449
3458
  default:
3450
3459
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + l.type);
@@ -3467,18 +3476,18 @@ class ir {
3467
3476
  this.name = E.KHR_MATERIALS_UNLIT;
3468
3477
  }
3469
3478
  getMaterialType() {
3470
- return Ne;
3479
+ return Oe;
3471
3480
  }
3472
3481
  extendParams(e, t, n) {
3473
3482
  const s = [];
3474
- e.color = new B(1, 1, 1), e.opacity = 1;
3483
+ e.color = new Z(1, 1, 1), e.opacity = 1;
3475
3484
  const i = t.pbrMetallicRoughness;
3476
3485
  if (i) {
3477
3486
  if (Array.isArray(i.baseColorFactor)) {
3478
3487
  const o = i.baseColorFactor;
3479
- e.color.setRGB(o[0], o[1], o[2], Ae), e.opacity = o[3];
3488
+ e.color.setRGB(o[0], o[1], o[2], ce), e.opacity = o[3];
3480
3489
  }
3481
- i.baseColorTexture !== void 0 && s.push(n.assignTexture(e, "map", i.baseColorTexture, he));
3490
+ i.baseColorTexture !== void 0 && s.push(n.assignTexture(e, "map", i.baseColorTexture, fe));
3482
3491
  }
3483
3492
  return Promise.all(s);
3484
3493
  }
@@ -3497,7 +3506,7 @@ class rr {
3497
3506
  this.parser = e, this.name = E.KHR_MATERIALS_CLEARCOAT;
3498
3507
  }
3499
3508
  getMaterialType(e) {
3500
- return H(this.parser, e, this.name) !== null ? ce : null;
3509
+ return H(this.parser, e, this.name) !== null ? ue : null;
3501
3510
  }
3502
3511
  extendMaterialParams(e, t) {
3503
3512
  const n = H(this.parser, e, this.name);
@@ -3515,7 +3524,7 @@ class ar {
3515
3524
  this.parser = e, this.name = E.KHR_MATERIALS_DISPERSION;
3516
3525
  }
3517
3526
  getMaterialType(e) {
3518
- return H(this.parser, e, this.name) !== null ? ce : null;
3527
+ return H(this.parser, e, this.name) !== null ? ue : null;
3519
3528
  }
3520
3529
  extendMaterialParams(e, t) {
3521
3530
  const n = H(this.parser, e, this.name);
@@ -3527,7 +3536,7 @@ class lr {
3527
3536
  this.parser = e, this.name = E.KHR_MATERIALS_IRIDESCENCE;
3528
3537
  }
3529
3538
  getMaterialType(e) {
3530
- return H(this.parser, e, this.name) !== null ? ce : null;
3539
+ return H(this.parser, e, this.name) !== null ? ue : null;
3531
3540
  }
3532
3541
  extendMaterialParams(e, t) {
3533
3542
  const n = H(this.parser, e, this.name);
@@ -3541,17 +3550,17 @@ class Ar {
3541
3550
  this.parser = e, this.name = E.KHR_MATERIALS_SHEEN;
3542
3551
  }
3543
3552
  getMaterialType(e) {
3544
- return H(this.parser, e, this.name) !== null ? ce : null;
3553
+ return H(this.parser, e, this.name) !== null ? ue : null;
3545
3554
  }
3546
3555
  extendMaterialParams(e, t) {
3547
3556
  const n = H(this.parser, e, this.name);
3548
3557
  if (n === null) return Promise.resolve();
3549
3558
  const s = [];
3550
- if (t.sheenColor = new B(0, 0, 0), t.sheenRoughness = 0, t.sheen = 1, n.sheenColorFactor !== void 0) {
3559
+ if (t.sheenColor = new Z(0, 0, 0), t.sheenRoughness = 0, t.sheen = 1, n.sheenColorFactor !== void 0) {
3551
3560
  const i = n.sheenColorFactor;
3552
- t.sheenColor.setRGB(i[0], i[1], i[2], Ae);
3561
+ t.sheenColor.setRGB(i[0], i[1], i[2], ce);
3553
3562
  }
3554
- return n.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = n.sheenRoughnessFactor), n.sheenColorTexture !== void 0 && s.push(this.parser.assignTexture(t, "sheenColorMap", n.sheenColorTexture, he)), n.sheenRoughnessTexture !== void 0 && s.push(this.parser.assignTexture(t, "sheenRoughnessMap", n.sheenRoughnessTexture)), Promise.all(s);
3563
+ return n.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = n.sheenRoughnessFactor), n.sheenColorTexture !== void 0 && s.push(this.parser.assignTexture(t, "sheenColorMap", n.sheenColorTexture, fe)), n.sheenRoughnessTexture !== void 0 && s.push(this.parser.assignTexture(t, "sheenRoughnessMap", n.sheenRoughnessTexture)), Promise.all(s);
3555
3564
  }
3556
3565
  }
3557
3566
  class cr {
@@ -3559,7 +3568,7 @@ class cr {
3559
3568
  this.parser = e, this.name = E.KHR_MATERIALS_TRANSMISSION;
3560
3569
  }
3561
3570
  getMaterialType(e) {
3562
- return H(this.parser, e, this.name) !== null ? ce : null;
3571
+ return H(this.parser, e, this.name) !== null ? ue : null;
3563
3572
  }
3564
3573
  extendMaterialParams(e, t) {
3565
3574
  const n = H(this.parser, e, this.name);
@@ -3573,7 +3582,7 @@ class ur {
3573
3582
  this.parser = e, this.name = E.KHR_MATERIALS_VOLUME;
3574
3583
  }
3575
3584
  getMaterialType(e) {
3576
- return H(this.parser, e, this.name) !== null ? ce : null;
3585
+ return H(this.parser, e, this.name) !== null ? ue : null;
3577
3586
  }
3578
3587
  extendMaterialParams(e, t) {
3579
3588
  const n = H(this.parser, e, this.name);
@@ -3581,7 +3590,7 @@ class ur {
3581
3590
  const s = [];
3582
3591
  t.thickness = n.thicknessFactor !== void 0 ? n.thicknessFactor : 0, n.thicknessTexture !== void 0 && s.push(this.parser.assignTexture(t, "thicknessMap", n.thicknessTexture)), t.attenuationDistance = n.attenuationDistance || 1 / 0;
3583
3592
  const i = n.attenuationColor || [1, 1, 1];
3584
- return t.attenuationColor = new B().setRGB(i[0], i[1], i[2], Ae), Promise.all(s);
3593
+ return t.attenuationColor = new Z().setRGB(i[0], i[1], i[2], ce), Promise.all(s);
3585
3594
  }
3586
3595
  }
3587
3596
  class dr {
@@ -3589,7 +3598,7 @@ class dr {
3589
3598
  this.parser = e, this.name = E.KHR_MATERIALS_IOR;
3590
3599
  }
3591
3600
  getMaterialType(e) {
3592
- return H(this.parser, e, this.name) !== null ? ce : null;
3601
+ return H(this.parser, e, this.name) !== null ? ue : null;
3593
3602
  }
3594
3603
  extendMaterialParams(e, t) {
3595
3604
  const n = H(this.parser, e, this.name);
@@ -3601,7 +3610,7 @@ class hr {
3601
3610
  this.parser = e, this.name = E.KHR_MATERIALS_SPECULAR;
3602
3611
  }
3603
3612
  getMaterialType(e) {
3604
- return H(this.parser, e, this.name) !== null ? ce : null;
3613
+ return H(this.parser, e, this.name) !== null ? ue : null;
3605
3614
  }
3606
3615
  extendMaterialParams(e, t) {
3607
3616
  const n = H(this.parser, e, this.name);
@@ -3609,7 +3618,7 @@ class hr {
3609
3618
  const s = [];
3610
3619
  t.specularIntensity = n.specularFactor !== void 0 ? n.specularFactor : 1, n.specularTexture !== void 0 && s.push(this.parser.assignTexture(t, "specularIntensityMap", n.specularTexture));
3611
3620
  const i = n.specularColorFactor || [1, 1, 1];
3612
- return t.specularColor = new B().setRGB(i[0], i[1], i[2], Ae), n.specularColorTexture !== void 0 && s.push(this.parser.assignTexture(t, "specularColorMap", n.specularColorTexture, he)), Promise.all(s);
3621
+ return t.specularColor = new Z().setRGB(i[0], i[1], i[2], ce), n.specularColorTexture !== void 0 && s.push(this.parser.assignTexture(t, "specularColorMap", n.specularColorTexture, fe)), Promise.all(s);
3613
3622
  }
3614
3623
  }
3615
3624
  class fr {
@@ -3617,7 +3626,7 @@ class fr {
3617
3626
  this.parser = e, this.name = E.EXT_MATERIALS_BUMP;
3618
3627
  }
3619
3628
  getMaterialType(e) {
3620
- return H(this.parser, e, this.name) !== null ? ce : null;
3629
+ return H(this.parser, e, this.name) !== null ? ue : null;
3621
3630
  }
3622
3631
  extendMaterialParams(e, t) {
3623
3632
  const n = H(this.parser, e, this.name);
@@ -3631,7 +3640,7 @@ class pr {
3631
3640
  this.parser = e, this.name = E.KHR_MATERIALS_ANISOTROPY;
3632
3641
  }
3633
3642
  getMaterialType(e) {
3634
- return H(this.parser, e, this.name) !== null ? ce : null;
3643
+ return H(this.parser, e, this.name) !== null ? ue : null;
3635
3644
  }
3636
3645
  extendMaterialParams(e, t) {
3637
3646
  const n = H(this.parser, e, this.name);
@@ -3705,12 +3714,12 @@ class Gs {
3705
3714
  return null;
3706
3715
  }
3707
3716
  return i.then(function(a) {
3708
- const l = s.byteOffset || 0, A = s.byteLength || 0, d = s.count, c = s.byteStride, u = new Uint8Array(a, l, A);
3709
- return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(d, c, u, s.mode, s.filter).then(function(h) {
3717
+ const l = s.byteOffset || 0, A = s.byteLength || 0, d = s.count, u = s.byteStride, c = new Uint8Array(a, l, A);
3718
+ return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(d, u, c, s.mode, s.filter).then(function(h) {
3710
3719
  return h.buffer;
3711
3720
  }) : o.ready.then(function() {
3712
- const h = new ArrayBuffer(d * c);
3713
- return o.decodeGltfBuffer(new Uint8Array(h), d, c, u, s.mode, s.filter), h;
3721
+ const h = new ArrayBuffer(d * u);
3722
+ return o.decodeGltfBuffer(new Uint8Array(h), d, u, c, s.mode, s.filter), h;
3714
3723
  });
3715
3724
  });
3716
3725
  } else
@@ -3727,23 +3736,23 @@ class Cr {
3727
3736
  return null;
3728
3737
  const s = t.meshes[n.mesh];
3729
3738
  for (const A of s.primitives)
3730
- if (A.mode !== se.TRIANGLES && A.mode !== se.TRIANGLE_STRIP && A.mode !== se.TRIANGLE_FAN && A.mode !== void 0)
3739
+ if (A.mode !== ne.TRIANGLES && A.mode !== ne.TRIANGLE_STRIP && A.mode !== ne.TRIANGLE_FAN && A.mode !== void 0)
3731
3740
  return null;
3732
3741
  const o = n.extensions[this.name].attributes, a = [], l = {};
3733
3742
  for (const A in o)
3734
3743
  a.push(this.parser.getDependency("accessor", o[A]).then((d) => (l[A] = d, l[A])));
3735
3744
  return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(e)), Promise.all(a).then((A) => {
3736
- const d = A.pop(), c = d.isGroup ? d.children : [d], u = A[0].count, h = [];
3737
- for (const m of c) {
3738
- const f = new fe(), g = new T(), p = new J(), I = new T(1, 1, 1), x = new _n(m.geometry, m.material, u);
3739
- for (let y = 0; y < u; y++)
3740
- 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));
3745
+ const d = A.pop(), u = d.isGroup ? d.children : [d], c = A[0].count, h = [];
3746
+ for (const p of u) {
3747
+ const f = new pe(), m = new M(), g = new Q(), x = new M(1, 1, 1), I = new _n(p.geometry, p.material, c);
3748
+ for (let y = 0; y < c; y++)
3749
+ l.TRANSLATION && m.fromBufferAttribute(l.TRANSLATION, y), l.ROTATION && g.fromBufferAttribute(l.ROTATION, y), l.SCALE && x.fromBufferAttribute(l.SCALE, y), I.setMatrixAt(y, f.compose(m, g, x));
3741
3750
  for (const y in l)
3742
3751
  if (y === "_COLOR_0") {
3743
3752
  const v = l[y];
3744
- x.instanceColor = new $n(v.array, v.itemSize, v.normalized);
3745
- } else y !== "TRANSLATION" && y !== "ROTATION" && y !== "SCALE" && m.geometry.setAttribute(y, l[y]);
3746
- Ze.prototype.copy.call(x, m), this.parser.assignFinalMaterial(x), h.push(x);
3753
+ I.instanceColor = new $n(v.array, v.itemSize, v.normalized);
3754
+ } else y !== "TRANSLATION" && y !== "ROTATION" && y !== "SCALE" && p.geometry.setAttribute(y, l[y]);
3755
+ Ze.prototype.copy.call(I, p), this.parser.assignFinalMaterial(I), h.push(I);
3747
3756
  }
3748
3757
  return d.isGroup ? (d.clear(), d.add(...h), d) : h[0];
3749
3758
  }));
@@ -3790,25 +3799,25 @@ class yr {
3790
3799
  decodePrimitive(e, t) {
3791
3800
  const n = this.json, s = this.dracoLoader, i = e.extensions[this.name].bufferView, o = e.extensions[this.name].attributes, a = {}, l = {}, A = {};
3792
3801
  for (const d in o) {
3793
- const c = rs[d] || d.toLowerCase();
3794
- a[c] = o[d];
3802
+ const u = rs[d] || d.toLowerCase();
3803
+ a[u] = o[d];
3795
3804
  }
3796
3805
  for (const d in e.attributes) {
3797
- const c = rs[d] || d.toLowerCase();
3806
+ const u = rs[d] || d.toLowerCase();
3798
3807
  if (o[d] !== void 0) {
3799
- const u = n.accessors[e.attributes[d]], h = Be[u.componentType];
3800
- A[c] = h.name, l[c] = u.normalized === !0;
3808
+ const c = n.accessors[e.attributes[d]], h = Be[c.componentType];
3809
+ A[u] = h.name, l[u] = c.normalized === !0;
3801
3810
  }
3802
3811
  }
3803
3812
  return t.getDependency("bufferView", i).then(function(d) {
3804
- return new Promise(function(c, u) {
3813
+ return new Promise(function(u, c) {
3805
3814
  s.decodeDracoFile(d, function(h) {
3806
- for (const m in h.attributes) {
3807
- const f = h.attributes[m], g = l[m];
3808
- g !== void 0 && (f.normalized = g);
3815
+ for (const p in h.attributes) {
3816
+ const f = h.attributes[p], m = l[p];
3817
+ m !== void 0 && (f.normalized = m);
3809
3818
  }
3810
- c(h);
3811
- }, a, A, Ae, u);
3819
+ u(h);
3820
+ }, a, A, ce, c);
3812
3821
  });
3813
3822
  });
3814
3823
  }
@@ -3837,22 +3846,22 @@ class fn extends mi {
3837
3846
  return t;
3838
3847
  }
3839
3848
  interpolate_(e, t, n, s) {
3840
- 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;
3849
+ const i = this.resultBuffer, o = this.sampleValues, a = this.valueSize, l = a * 2, A = a * 3, d = s - t, u = (n - t) / d, c = u * u, h = c * u, p = e * A, f = p - A, m = -2 * h + 3 * c, g = h - c, x = 1 - m, I = g - c + u;
3841
3850
  for (let y = 0; y !== a; y++) {
3842
- const v = o[f + y + a], M = o[f + y + l] * d, L = o[m + y + a], Q = o[m + y] * d;
3843
- i[y] = I * v + x * M + g * L + p * Q;
3851
+ const v = o[f + y + a], S = o[f + y + l] * d, L = o[p + y + a], Y = o[p + y] * d;
3852
+ i[y] = x * v + I * S + m * L + g * Y;
3844
3853
  }
3845
3854
  return i;
3846
3855
  }
3847
3856
  }
3848
- const Sr = new J();
3857
+ const Sr = new Q();
3849
3858
  class Tr extends fn {
3850
3859
  interpolate_(e, t, n, s) {
3851
3860
  const i = super.interpolate_(e, t, n, s);
3852
3861
  return Sr.fromArray(i).normalize().toArray(i), i;
3853
3862
  }
3854
3863
  }
3855
- const se = {
3864
+ const ne = {
3856
3865
  POINTS: 0,
3857
3866
  LINES: 1,
3858
3867
  LINE_LOOP: 2,
@@ -3897,7 +3906,7 @@ const se = {
3897
3906
  COLOR_0: "color",
3898
3907
  WEIGHTS_0: "skinWeight",
3899
3908
  JOINTS_0: "skinIndex"
3900
- }, me = {
3909
+ }, ge = {
3901
3910
  scale: "scale",
3902
3911
  translation: "position",
3903
3912
  rotation: "quaternion",
@@ -3934,24 +3943,24 @@ function ae(r, e) {
3934
3943
  function Rr(r, e, t) {
3935
3944
  let n = !1, s = !1, i = !1;
3936
3945
  for (let A = 0, d = e.length; A < d; A++) {
3937
- const c = e[A];
3938
- if (c.POSITION !== void 0 && (n = !0), c.NORMAL !== void 0 && (s = !0), c.COLOR_0 !== void 0 && (i = !0), n && s && i) break;
3946
+ const u = e[A];
3947
+ if (u.POSITION !== void 0 && (n = !0), u.NORMAL !== void 0 && (s = !0), u.COLOR_0 !== void 0 && (i = !0), n && s && i) break;
3939
3948
  }
3940
3949
  if (!n && !s && !i) return Promise.resolve(r);
3941
3950
  const o = [], a = [], l = [];
3942
3951
  for (let A = 0, d = e.length; A < d; A++) {
3943
- const c = e[A];
3952
+ const u = e[A];
3944
3953
  if (n) {
3945
- const u = c.POSITION !== void 0 ? t.getDependency("accessor", c.POSITION) : r.attributes.position;
3946
- o.push(u);
3954
+ const c = u.POSITION !== void 0 ? t.getDependency("accessor", u.POSITION) : r.attributes.position;
3955
+ o.push(c);
3947
3956
  }
3948
3957
  if (s) {
3949
- const u = c.NORMAL !== void 0 ? t.getDependency("accessor", c.NORMAL) : r.attributes.normal;
3950
- a.push(u);
3958
+ const c = u.NORMAL !== void 0 ? t.getDependency("accessor", u.NORMAL) : r.attributes.normal;
3959
+ a.push(c);
3951
3960
  }
3952
3961
  if (i) {
3953
- const u = c.COLOR_0 !== void 0 ? t.getDependency("accessor", c.COLOR_0) : r.attributes.color;
3954
- l.push(u);
3962
+ const c = u.COLOR_0 !== void 0 ? t.getDependency("accessor", u.COLOR_0) : r.attributes.color;
3963
+ l.push(c);
3955
3964
  }
3956
3965
  }
3957
3966
  return Promise.all([
@@ -3959,8 +3968,8 @@ function Rr(r, e, t) {
3959
3968
  Promise.all(a),
3960
3969
  Promise.all(l)
3961
3970
  ]).then(function(A) {
3962
- const d = A[0], c = A[1], u = A[2];
3963
- return n && (r.morphAttributes.position = d), s && (r.morphAttributes.normal = c), i && (r.morphAttributes.color = u), r.morphTargetsRelative = !0, r;
3971
+ const d = A[0], u = A[1], c = A[2];
3972
+ return n && (r.morphAttributes.position = d), s && (r.morphAttributes.normal = u), i && (r.morphAttributes.color = c), r.morphTargetsRelative = !0, r;
3964
3973
  });
3965
3974
  }
3966
3975
  function Er(r, e) {
@@ -4009,8 +4018,8 @@ function as(r) {
4009
4018
  function Pr(r) {
4010
4019
  return r.search(/\.jpe?g($|\?)/i) > 0 || r.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : r.search(/\.webp($|\?)/i) > 0 || r.search(/^data\:image\/webp/) === 0 ? "image/webp" : r.search(/\.ktx2($|\?)/i) > 0 || r.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
4011
4020
  }
4012
- const Lr = new fe();
4013
- class Nr {
4021
+ const Lr = new pe();
4022
+ class Or {
4014
4023
  constructor(e = {}, t = {}) {
4015
4024
  this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new sr(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
4016
4025
  let n = !1, s = -1, i = !1, o = -1;
@@ -4265,24 +4274,24 @@ class Nr {
4265
4274
  }
4266
4275
  const i = [];
4267
4276
  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) {
4268
- const a = o[0], l = qt[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;
4269
- let f, g;
4270
- if (h && h !== c) {
4271
- const p = Math.floor(u / h), I = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + p + ":" + s.count;
4272
- let x = t.cache.get(I);
4273
- x || (f = new A(a, p * h, s.count * h / d), x = new Ys(f, h / d), t.cache.add(I, x)), g = new _s(x, l, u % h / d, m);
4277
+ const a = o[0], l = qt[s.type], A = Be[s.componentType], d = A.BYTES_PER_ELEMENT, u = d * l, c = s.byteOffset || 0, h = s.bufferView !== void 0 ? n.bufferViews[s.bufferView].byteStride : void 0, p = s.normalized === !0;
4278
+ let f, m;
4279
+ if (h && h !== u) {
4280
+ const g = Math.floor(c / h), x = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + g + ":" + s.count;
4281
+ let I = t.cache.get(x);
4282
+ I || (f = new A(a, g * h, s.count * h / d), I = new Ys(f, h / d), t.cache.add(x, I)), m = new _s(I, l, c % h / d, p);
4274
4283
  } else
4275
- a === null ? f = new A(s.count * l) : f = new A(a, u, s.count * l), g = new at(f, l, m);
4284
+ a === null ? f = new A(s.count * l) : f = new A(a, c, s.count * l), m = new at(f, l, p);
4276
4285
  if (s.sparse !== void 0) {
4277
- const p = qt.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);
4278
- a !== null && (g = new at(g.array.slice(), g.itemSize, g.normalized)), g.normalized = !1;
4279
- for (let L = 0, Q = v.length; L < Q; L++) {
4280
- const $ = v[L];
4281
- 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.");
4286
+ const g = qt.SCALAR, x = Be[s.sparse.indices.componentType], I = s.sparse.indices.byteOffset || 0, y = s.sparse.values.byteOffset || 0, v = new x(o[1], I, s.sparse.count * g), S = new A(o[2], y, s.sparse.count * l);
4287
+ a !== null && (m = new at(m.array.slice(), m.itemSize, m.normalized)), m.normalized = !1;
4288
+ for (let L = 0, Y = v.length; L < Y; L++) {
4289
+ const ee = v[L];
4290
+ if (m.setX(ee, S[L * l]), l >= 2 && m.setY(ee, S[L * l + 1]), l >= 3 && m.setZ(ee, S[L * l + 2]), l >= 4 && m.setW(ee, S[L * l + 3]), l >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
4282
4291
  }
4283
- g.normalized = m;
4292
+ m.normalized = p;
4284
4293
  }
4285
- return g;
4294
+ return m;
4286
4295
  });
4287
4296
  }
4288
4297
  /**
@@ -4307,8 +4316,8 @@ class Nr {
4307
4316
  return this.textureCache[l];
4308
4317
  const A = this.loadImageSource(t, n).then(function(d) {
4309
4318
  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);
4310
- const u = (i.samplers || {})[o.sampler] || {};
4311
- return d.magFilter = Bs[u.magFilter] || ss, d.minFilter = Bs[u.minFilter] || $s, d.wrapS = Zs[u.wrapS] || ns, d.wrapT = Zs[u.wrapT] || ns, d.generateMipmaps = !d.isCompressedTexture && d.minFilter !== en && d.minFilter !== ss, s.associations.set(d, { textures: e }), d;
4319
+ const c = (i.samplers || {})[o.sampler] || {};
4320
+ return d.magFilter = Bs[c.magFilter] || ss, d.minFilter = Bs[c.minFilter] || $s, d.wrapS = Zs[c.wrapS] || ns, d.wrapT = Zs[c.wrapT] || ns, d.generateMipmaps = !d.isCompressedTexture && d.minFilter !== en && d.minFilter !== ss, s.associations.set(d, { textures: e }), d;
4312
4321
  }).catch(function() {
4313
4322
  return null;
4314
4323
  });
@@ -4317,29 +4326,29 @@ class Nr {
4317
4326
  loadImageSource(e, t) {
4318
4327
  const n = this, s = this.json, i = this.options;
4319
4328
  if (this.sourceCache[e] !== void 0)
4320
- return this.sourceCache[e].then((c) => c.clone());
4329
+ return this.sourceCache[e].then((u) => u.clone());
4321
4330
  const o = s.images[e], a = self.URL || self.webkitURL;
4322
4331
  let l = o.uri || "", A = !1;
4323
4332
  if (o.bufferView !== void 0)
4324
- l = n.getDependency("bufferView", o.bufferView).then(function(c) {
4333
+ l = n.getDependency("bufferView", o.bufferView).then(function(u) {
4325
4334
  A = !0;
4326
- const u = new Blob([c], { type: o.mimeType });
4327
- return l = a.createObjectURL(u), l;
4335
+ const c = new Blob([u], { type: o.mimeType });
4336
+ return l = a.createObjectURL(c), l;
4328
4337
  });
4329
4338
  else if (o.uri === void 0)
4330
4339
  throw new Error("THREE.GLTFLoader: Image " + e + " is missing URI and bufferView");
4331
- const d = Promise.resolve(l).then(function(c) {
4332
- return new Promise(function(u, h) {
4333
- let m = u;
4334
- t.isImageBitmapLoader === !0 && (m = function(f) {
4335
- const g = new bs(f);
4336
- g.needsUpdate = !0, u(g);
4337
- }), t.load(rt.resolveURL(c, i.path), m, void 0, h);
4340
+ const d = Promise.resolve(l).then(function(u) {
4341
+ return new Promise(function(c, h) {
4342
+ let p = c;
4343
+ t.isImageBitmapLoader === !0 && (p = function(f) {
4344
+ const m = new bs(f);
4345
+ m.needsUpdate = !0, c(m);
4346
+ }), t.load(rt.resolveURL(u, i.path), p, void 0, h);
4338
4347
  });
4339
- }).then(function(c) {
4340
- return A === !0 && a.revokeObjectURL(l), ae(c, o), c.userData.mimeType = o.mimeType || Pr(o.uri), c;
4341
- }).catch(function(c) {
4342
- throw console.error("THREE.GLTFLoader: Couldn't load texture", l), c;
4348
+ }).then(function(u) {
4349
+ return A === !0 && a.revokeObjectURL(l), ae(u, o), u.userData.mimeType = o.mimeType || Pr(o.uri), u;
4350
+ }).catch(function(u) {
4351
+ throw console.error("THREE.GLTFLoader: Couldn't load texture", l), u;
4343
4352
  });
4344
4353
  return this.sourceCache[e] = d, d;
4345
4354
  }
@@ -4413,33 +4422,33 @@ class Nr {
4413
4422
  let o;
4414
4423
  const a = {}, l = i.extensions || {}, A = [];
4415
4424
  if (l[E.KHR_MATERIALS_UNLIT]) {
4416
- const c = s[E.KHR_MATERIALS_UNLIT];
4417
- o = c.getMaterialType(), A.push(c.extendParams(a, i, t));
4425
+ const u = s[E.KHR_MATERIALS_UNLIT];
4426
+ o = u.getMaterialType(), A.push(u.extendParams(a, i, t));
4418
4427
  } else {
4419
- const c = i.pbrMetallicRoughness || {};
4420
- if (a.color = new B(1, 1, 1), a.opacity = 1, Array.isArray(c.baseColorFactor)) {
4421
- const u = c.baseColorFactor;
4422
- a.color.setRGB(u[0], u[1], u[2], Ae), a.opacity = u[3];
4428
+ const u = i.pbrMetallicRoughness || {};
4429
+ if (a.color = new Z(1, 1, 1), a.opacity = 1, Array.isArray(u.baseColorFactor)) {
4430
+ const c = u.baseColorFactor;
4431
+ a.color.setRGB(c[0], c[1], c[2], ce), a.opacity = c[3];
4423
4432
  }
4424
- 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) {
4425
- return u.getMaterialType && u.getMaterialType(e);
4426
- }), A.push(Promise.all(this._invokeAll(function(u) {
4427
- return u.extendMaterialParams && u.extendMaterialParams(e, a);
4433
+ u.baseColorTexture !== void 0 && A.push(t.assignTexture(a, "map", u.baseColorTexture, fe)), a.metalness = u.metallicFactor !== void 0 ? u.metallicFactor : 1, a.roughness = u.roughnessFactor !== void 0 ? u.roughnessFactor : 1, u.metallicRoughnessTexture !== void 0 && (A.push(t.assignTexture(a, "metalnessMap", u.metallicRoughnessTexture)), A.push(t.assignTexture(a, "roughnessMap", u.metallicRoughnessTexture))), o = this._invokeOne(function(c) {
4434
+ return c.getMaterialType && c.getMaterialType(e);
4435
+ }), A.push(Promise.all(this._invokeAll(function(c) {
4436
+ return c.extendMaterialParams && c.extendMaterialParams(e, a);
4428
4437
  })));
4429
4438
  }
4430
4439
  i.doubleSided === !0 && (a.side = Pt);
4431
4440
  const d = i.alphaMode || Vt.OPAQUE;
4432
- if (d === Vt.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, d === Vt.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)) {
4433
- const c = i.normalTexture.scale;
4434
- a.normalScale.set(c, c);
4441
+ if (d === Vt.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, d === Vt.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== Oe && (A.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new F(1, 1), i.normalTexture.scale !== void 0)) {
4442
+ const u = i.normalTexture.scale;
4443
+ a.normalScale.set(u, u);
4435
4444
  }
4436
- if (i.occlusionTexture !== void 0 && o !== Ne && (A.push(t.assignTexture(a, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && o !== Ne) {
4437
- const c = i.emissiveFactor;
4438
- a.emissive = new B().setRGB(c[0], c[1], c[2], Ae);
4445
+ if (i.occlusionTexture !== void 0 && o !== Oe && (A.push(t.assignTexture(a, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && o !== Oe) {
4446
+ const u = i.emissiveFactor;
4447
+ a.emissive = new Z().setRGB(u[0], u[1], u[2], ce);
4439
4448
  }
4440
- return i.emissiveTexture !== void 0 && o !== Ne && A.push(t.assignTexture(a, "emissiveMap", i.emissiveTexture, he)), Promise.all(A).then(function() {
4441
- const c = new o(a);
4442
- return i.name && (c.name = i.name), ae(c, i), t.associations.set(c, { materials: e }), i.extensions && we(s, c, i), c;
4449
+ return i.emissiveTexture !== void 0 && o !== Oe && A.push(t.assignTexture(a, "emissiveMap", i.emissiveTexture, fe)), Promise.all(A).then(function() {
4450
+ const u = new o(a);
4451
+ return i.name && (u.name = i.name), ae(u, i), t.associations.set(u, { materials: e }), i.extensions && we(s, u, i), u;
4443
4452
  });
4444
4453
  }
4445
4454
  /**
@@ -4471,12 +4480,12 @@ class Nr {
4471
4480
  }
4472
4481
  const o = [];
4473
4482
  for (let a = 0, l = e.length; a < l; a++) {
4474
- const A = e[a], d = kr(A), c = s[d];
4475
- if (c)
4476
- o.push(c.promise);
4483
+ const A = e[a], d = kr(A), u = s[d];
4484
+ if (u)
4485
+ o.push(u.promise);
4477
4486
  else {
4478
- let u;
4479
- A.extensions && A.extensions[E.KHR_DRACO_MESH_COMPRESSION] ? u = i(A) : u = Xs(new De(), A, t), s[d] = { primitive: A, promise: u }, o.push(u);
4487
+ let c;
4488
+ A.extensions && A.extensions[E.KHR_DRACO_MESH_COMPRESSION] ? c = i(A) : c = Xs(new De(), A, t), s[d] = { primitive: A, promise: c }, o.push(c);
4480
4489
  }
4481
4490
  }
4482
4491
  return Promise.all(o);
@@ -4495,37 +4504,37 @@ class Nr {
4495
4504
  a.push(d);
4496
4505
  }
4497
4506
  return a.push(t.loadGeometries(o)), Promise.all(a).then(function(l) {
4498
- const A = l.slice(0, l.length - 1), d = l[l.length - 1], c = [];
4499
- for (let h = 0, m = d.length; h < m; h++) {
4500
- const f = d[h], g = o[h];
4501
- let p;
4502
- const I = A[h];
4503
- if (g.mode === se.TRIANGLES || g.mode === se.TRIANGLE_STRIP || g.mode === se.TRIANGLE_FAN || g.mode === void 0)
4504
- p = i.isSkinnedMesh === !0 ? new li(f, I) : new S(f, I), p.isSkinnedMesh === !0 && p.normalizeSkinWeights(), g.mode === se.TRIANGLE_STRIP ? p.geometry = zs(p.geometry, Qs) : g.mode === se.TRIANGLE_FAN && (p.geometry = zs(p.geometry, ts));
4505
- else if (g.mode === se.LINES)
4506
- p = new es(f, I);
4507
- else if (g.mode === se.LINE_STRIP)
4508
- p = new de(f, I);
4509
- else if (g.mode === se.LINE_LOOP)
4510
- p = new Ai(f, I);
4511
- else if (g.mode === se.POINTS)
4512
- p = new Mt(f, I);
4507
+ const A = l.slice(0, l.length - 1), d = l[l.length - 1], u = [];
4508
+ for (let h = 0, p = d.length; h < p; h++) {
4509
+ const f = d[h], m = o[h];
4510
+ let g;
4511
+ const x = A[h];
4512
+ if (m.mode === ne.TRIANGLES || m.mode === ne.TRIANGLE_STRIP || m.mode === ne.TRIANGLE_FAN || m.mode === void 0)
4513
+ g = i.isSkinnedMesh === !0 ? new li(f, x) : new T(f, x), g.isSkinnedMesh === !0 && g.normalizeSkinWeights(), m.mode === ne.TRIANGLE_STRIP ? g.geometry = zs(g.geometry, Qs) : m.mode === ne.TRIANGLE_FAN && (g.geometry = zs(g.geometry, ts));
4514
+ else if (m.mode === ne.LINES)
4515
+ g = new es(f, x);
4516
+ else if (m.mode === ne.LINE_STRIP)
4517
+ g = new he(f, x);
4518
+ else if (m.mode === ne.LINE_LOOP)
4519
+ g = new Ai(f, x);
4520
+ else if (m.mode === ne.POINTS)
4521
+ g = new Mt(f, x);
4513
4522
  else
4514
- throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + g.mode);
4515
- Object.keys(p.geometry.morphAttributes).length > 0 && Er(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);
4523
+ throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + m.mode);
4524
+ Object.keys(g.geometry.morphAttributes).length > 0 && Er(g, i), g.name = t.createUniqueName(i.name || "mesh_" + e), ae(g, i), m.extensions && we(s, g, m), t.assignFinalMaterial(g), u.push(g);
4516
4525
  }
4517
- for (let h = 0, m = c.length; h < m; h++)
4518
- t.associations.set(c[h], {
4526
+ for (let h = 0, p = u.length; h < p; h++)
4527
+ t.associations.set(u[h], {
4519
4528
  meshes: e,
4520
4529
  primitives: h
4521
4530
  });
4522
- if (c.length === 1)
4523
- return i.extensions && we(s, c[0], i), c[0];
4524
- const u = new Tt();
4525
- i.extensions && we(s, u, i), t.associations.set(u, { meshes: e });
4526
- for (let h = 0, m = c.length; h < m; h++)
4527
- u.add(c[h]);
4528
- return u;
4531
+ if (u.length === 1)
4532
+ return i.extensions && we(s, u[0], i), u[0];
4533
+ const c = new Tt();
4534
+ i.extensions && we(s, c, i), t.associations.set(c, { meshes: e });
4535
+ for (let h = 0, p = u.length; h < p; h++)
4536
+ c.add(u[h]);
4537
+ return c;
4529
4538
  });
4530
4539
  }
4531
4540
  /**
@@ -4558,11 +4567,11 @@ class Nr {
4558
4567
  return t.inverseBindMatrices !== void 0 ? n.push(this.getDependency("accessor", t.inverseBindMatrices)) : n.push(null), Promise.all(n).then(function(s) {
4559
4568
  const i = s.pop(), o = s, a = [], l = [];
4560
4569
  for (let A = 0, d = o.length; A < d; A++) {
4561
- const c = o[A];
4562
- if (c) {
4563
- a.push(c);
4564
- const u = new fe();
4565
- i !== null && u.fromArray(i.array, A * 16), l.push(u);
4570
+ const u = o[A];
4571
+ if (u) {
4572
+ a.push(u);
4573
+ const c = new pe();
4574
+ i !== null && c.fromArray(i.array, A * 16), l.push(c);
4566
4575
  } else
4567
4576
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', t.joints[A]);
4568
4577
  }
@@ -4578,9 +4587,9 @@ class Nr {
4578
4587
  */
4579
4588
  loadAnimation(e) {
4580
4589
  const t = this.json, n = this, s = t.animations[e], i = s.name ? s.name : "animation_" + e, o = [], a = [], l = [], A = [], d = [];
4581
- for (let c = 0, u = s.channels.length; c < u; c++) {
4582
- 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;
4583
- 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));
4590
+ for (let u = 0, c = s.channels.length; u < c; u++) {
4591
+ const h = s.channels[u], p = s.samplers[h.sampler], f = h.target, m = f.node, g = s.parameters !== void 0 ? s.parameters[p.input] : p.input, x = s.parameters !== void 0 ? s.parameters[p.output] : p.output;
4592
+ f.node !== void 0 && (o.push(this.getDependency("node", m)), a.push(this.getDependency("accessor", g)), l.push(this.getDependency("accessor", x)), A.push(p), d.push(f));
4584
4593
  }
4585
4594
  return Promise.all([
4586
4595
  Promise.all(o),
@@ -4588,19 +4597,19 @@ class Nr {
4588
4597
  Promise.all(l),
4589
4598
  Promise.all(A),
4590
4599
  Promise.all(d)
4591
- ]).then(function(c) {
4592
- const u = c[0], h = c[1], m = c[2], f = c[3], g = c[4], p = [];
4593
- for (let x = 0, y = u.length; x < y; x++) {
4594
- const v = u[x], M = h[x], L = m[x], Q = f[x], $ = g[x];
4600
+ ]).then(function(u) {
4601
+ const c = u[0], h = u[1], p = u[2], f = u[3], m = u[4], g = [];
4602
+ for (let I = 0, y = c.length; I < y; I++) {
4603
+ const v = c[I], S = h[I], L = p[I], Y = f[I], ee = m[I];
4595
4604
  if (v === void 0) continue;
4596
4605
  v.updateMatrix && v.updateMatrix();
4597
- const Y = n._createAnimationTracks(v, M, L, Q, $);
4598
- if (Y)
4599
- for (let Te = 0; Te < Y.length; Te++)
4600
- p.push(Y[Te]);
4606
+ const _ = n._createAnimationTracks(v, S, L, Y, ee);
4607
+ if (_)
4608
+ for (let Te = 0; Te < _.length; Te++)
4609
+ g.push(_[Te]);
4601
4610
  }
4602
- const I = new di(i, void 0, p);
4603
- return ae(I, s), I;
4611
+ const x = new di(i, void 0, g);
4612
+ return ae(x, s), x;
4604
4613
  });
4605
4614
  }
4606
4615
  createNodeMesh(e) {
@@ -4631,15 +4640,15 @@ class Nr {
4631
4640
  Promise.all(o),
4632
4641
  l
4633
4642
  ]).then(function(A) {
4634
- const d = A[0], c = A[1], u = A[2];
4635
- u !== null && d.traverse(function(h) {
4636
- h.isSkinnedMesh && h.bind(u, Lr);
4643
+ const d = A[0], u = A[1], c = A[2];
4644
+ c !== null && d.traverse(function(h) {
4645
+ h.isSkinnedMesh && h.bind(c, Lr);
4637
4646
  });
4638
- for (let h = 0, m = c.length; h < m; h++)
4639
- d.add(c[h]);
4640
- if (d.userData.pivot !== void 0 && c.length > 0) {
4641
- const h = d.userData.pivot, m = c[0];
4642
- 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;
4647
+ for (let h = 0, p = u.length; h < p; h++)
4648
+ d.add(u[h]);
4649
+ if (d.userData.pivot !== void 0 && u.length > 0) {
4650
+ const h = d.userData.pivot, p = u[0];
4651
+ d.pivot = new M().fromArray(h), d.position.x -= h[0], d.position.y -= h[1], d.position.z -= h[2], p.position.set(0, 0, 0), delete d.userData.pivot;
4643
4652
  }
4644
4653
  return d;
4645
4654
  });
@@ -4662,18 +4671,18 @@ class Nr {
4662
4671
  }), this.nodeCache[e] = Promise.all(a).then(function(A) {
4663
4672
  let d;
4664
4673
  if (i.isBone === !0 ? d = new hi() : A.length > 1 ? d = new Tt() : A.length === 1 ? d = A[0] : d = new Ze(), d !== A[0])
4665
- for (let c = 0, u = A.length; c < u; c++)
4666
- d.add(A[c]);
4674
+ for (let u = 0, c = A.length; u < c; u++)
4675
+ d.add(A[u]);
4667
4676
  if (i.name && (d.userData.name = i.name, d.name = o), ae(d, i), i.extensions && we(n, d, i), i.matrix !== void 0) {
4668
- const c = new fe();
4669
- c.fromArray(i.matrix), d.applyMatrix4(c);
4677
+ const u = new pe();
4678
+ u.fromArray(i.matrix), d.applyMatrix4(u);
4670
4679
  } else
4671
4680
  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);
4672
4681
  if (!s.associations.has(d))
4673
4682
  s.associations.set(d, {});
4674
4683
  else if (i.mesh !== void 0 && s.meshCache.refs[i.mesh] > 1) {
4675
- const c = s.associations.get(d);
4676
- s.associations.set(d, { ...c });
4684
+ const u = s.associations.get(d);
4685
+ s.associations.set(d, { ...u });
4677
4686
  }
4678
4687
  return s.associations.get(d).nodes = e, d;
4679
4688
  }), this.nodeCache[e];
@@ -4692,18 +4701,18 @@ class Nr {
4692
4701
  for (let l = 0, A = o.length; l < A; l++)
4693
4702
  a.push(s.getDependency("node", o[l]));
4694
4703
  return Promise.all(a).then(function(l) {
4695
- for (let d = 0, c = l.length; d < c; d++) {
4696
- const u = l[d];
4697
- u.parent !== null ? i.add(er(u)) : i.add(u);
4704
+ for (let d = 0, u = l.length; d < u; d++) {
4705
+ const c = l[d];
4706
+ c.parent !== null ? i.add(er(c)) : i.add(c);
4698
4707
  }
4699
4708
  const A = (d) => {
4700
- const c = /* @__PURE__ */ new Map();
4701
- for (const [u, h] of s.associations)
4702
- (u instanceof ot || u instanceof bs) && c.set(u, h);
4703
- return d.traverse((u) => {
4704
- const h = s.associations.get(u);
4705
- h != null && c.set(u, h);
4706
- }), c;
4709
+ const u = /* @__PURE__ */ new Map();
4710
+ for (const [c, h] of s.associations)
4711
+ (c instanceof ot || c instanceof bs) && u.set(c, h);
4712
+ return d.traverse((c) => {
4713
+ const h = s.associations.get(c);
4714
+ h != null && u.set(c, h);
4715
+ }), u;
4707
4716
  };
4708
4717
  return s.associations = A(i), i;
4709
4718
  });
@@ -4713,17 +4722,17 @@ class Nr {
4713
4722
  function A(h) {
4714
4723
  h.morphTargetInfluences && l.push(h.name ? h.name : h.uuid);
4715
4724
  }
4716
- me[i.path] === me.weights ? (A(e), e.isGroup && e.children.forEach(A)) : l.push(a);
4725
+ ge[i.path] === ge.weights ? (A(e), e.isGroup && e.children.forEach(A)) : l.push(a);
4717
4726
  let d;
4718
- switch (me[i.path]) {
4719
- case me.weights:
4727
+ switch (ge[i.path]) {
4728
+ case ge.weights:
4720
4729
  d = Is;
4721
4730
  break;
4722
- case me.rotation:
4731
+ case ge.rotation:
4723
4732
  d = ys;
4724
4733
  break;
4725
- case me.translation:
4726
- case me.scale:
4734
+ case ge.translation:
4735
+ case ge.scale:
4727
4736
  d = Cs;
4728
4737
  break;
4729
4738
  default:
@@ -4739,13 +4748,13 @@ class Nr {
4739
4748
  }
4740
4749
  break;
4741
4750
  }
4742
- const c = s.interpolation !== void 0 ? Mr[s.interpolation] : sn, u = this._getArrayFromAccessor(n);
4743
- for (let h = 0, m = l.length; h < m; h++) {
4751
+ const u = s.interpolation !== void 0 ? Mr[s.interpolation] : sn, c = this._getArrayFromAccessor(n);
4752
+ for (let h = 0, p = l.length; h < p; h++) {
4744
4753
  const f = new d(
4745
- l[h] + "." + me[i.path],
4754
+ l[h] + "." + ge[i.path],
4746
4755
  t.array,
4747
- u,
4748
- c
4756
+ c,
4757
+ u
4749
4758
  );
4750
4759
  s.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(f), o.push(f);
4751
4760
  }
@@ -4768,14 +4777,14 @@ class Nr {
4768
4777
  }, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
4769
4778
  }
4770
4779
  }
4771
- function Or(r, e, t) {
4780
+ function Nr(r, e, t) {
4772
4781
  const n = e.attributes, s = new gi();
4773
4782
  if (n.POSITION !== void 0) {
4774
4783
  const a = t.json.accessors[n.POSITION], l = a.min, A = a.max;
4775
4784
  if (l !== void 0 && A !== void 0) {
4776
4785
  if (s.set(
4777
- new T(l[0], l[1], l[2]),
4778
- new T(A[0], A[1], A[2])
4786
+ new M(l[0], l[1], l[2]),
4787
+ new M(A[0], A[1], A[2])
4779
4788
  ), a.normalized) {
4780
4789
  const d = as(Be[a.componentType]);
4781
4790
  s.min.multiplyScalar(d), s.max.multiplyScalar(d);
@@ -4788,14 +4797,14 @@ function Or(r, e, t) {
4788
4797
  return;
4789
4798
  const i = e.targets;
4790
4799
  if (i !== void 0) {
4791
- const a = new T(), l = new T();
4800
+ const a = new M(), l = new M();
4792
4801
  for (let A = 0, d = i.length; A < d; A++) {
4793
- const c = i[A];
4794
- if (c.POSITION !== void 0) {
4795
- const u = t.json.accessors[c.POSITION], h = u.min, m = u.max;
4796
- if (h !== void 0 && m !== void 0) {
4797
- 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) {
4798
- const f = as(Be[u.componentType]);
4802
+ const u = i[A];
4803
+ if (u.POSITION !== void 0) {
4804
+ const c = t.json.accessors[u.POSITION], h = c.min, p = c.max;
4805
+ if (h !== void 0 && p !== void 0) {
4806
+ if (l.setX(Math.max(Math.abs(h[0]), Math.abs(p[0]))), l.setY(Math.max(Math.abs(h[1]), Math.abs(p[1]))), l.setZ(Math.max(Math.abs(h[2]), Math.abs(p[2]))), c.normalized) {
4807
+ const f = as(Be[c.componentType]);
4799
4808
  l.multiplyScalar(f);
4800
4809
  }
4801
4810
  a.max(l);
@@ -4826,7 +4835,7 @@ function Xs(r, e, t) {
4826
4835
  });
4827
4836
  s.push(o);
4828
4837
  }
4829
- 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), Or(r, e, t), Promise.all(s).then(function() {
4838
+ return Lt.workingColorSpace !== ce && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Lt.workingColorSpace}" not supported.`), ae(r, e), Nr(r, e, t), Promise.all(s).then(function() {
4830
4839
  return e.targets !== void 0 ? Rr(r, e.targets, t) : r;
4831
4840
  });
4832
4841
  }
@@ -4902,10 +4911,10 @@ class Dr extends As {
4902
4911
  */
4903
4912
  parse(e, t, n = () => {
4904
4913
  }) {
4905
- this.decodeDracoFile(e, t, null, null, he, n).catch(n);
4914
+ this.decodeDracoFile(e, t, null, null, fe, n).catch(n);
4906
4915
  }
4907
4916
  //
4908
- decodeDracoFile(e, t, n, s, i = Ae, o = () => {
4917
+ decodeDracoFile(e, t, n, s, i = ce, o = () => {
4909
4918
  }) {
4910
4919
  const a = {
4911
4920
  attributeIDs: n || this.defaultAttributeIDs,
@@ -4954,10 +4963,10 @@ class Dr extends As {
4954
4963
  return t;
4955
4964
  }
4956
4965
  _assignVertexColorSpace(e, t) {
4957
- if (t !== he) return;
4958
- const n = new B();
4966
+ if (t !== fe) return;
4967
+ const n = new Z();
4959
4968
  for (let s = 0, i = e.count; s < i; s++)
4960
- n.fromBufferAttribute(e, s), Lt.colorSpaceToWorking(n, he), e.setXYZ(s, n.r, n.g, n.b);
4969
+ n.fromBufferAttribute(e, s), Lt.colorSpaceToWorking(n, fe), e.setXYZ(s, n.r, n.g, n.b);
4961
4970
  }
4962
4971
  _loadLibrary(e, t) {
4963
4972
  const n = new ct(this.manager);
@@ -5029,82 +5038,82 @@ function Wr() {
5029
5038
  switch (a.type) {
5030
5039
  case "init":
5031
5040
  r = a.decoderConfig, e = new Promise(function(d) {
5032
- r.onModuleLoaded = function(c) {
5033
- d({ draco: c });
5041
+ r.onModuleLoaded = function(u) {
5042
+ d({ draco: u });
5034
5043
  }, DracoDecoderModule(r);
5035
5044
  });
5036
5045
  break;
5037
5046
  case "decode":
5038
5047
  const l = a.buffer, A = a.taskConfig;
5039
5048
  e.then((d) => {
5040
- const c = d.draco, u = new c.Decoder();
5049
+ const u = d.draco, c = new u.Decoder();
5041
5050
  try {
5042
- const h = t(c, u, new Int8Array(l), A), m = h.attributes.map((f) => f.array.buffer);
5043
- h.index && m.push(h.index.array.buffer), self.postMessage({ type: "decode", id: a.id, geometry: h }, m);
5051
+ const h = t(u, c, new Int8Array(l), A), p = h.attributes.map((f) => f.array.buffer);
5052
+ h.index && p.push(h.index.array.buffer), self.postMessage({ type: "decode", id: a.id, geometry: h }, p);
5044
5053
  } catch (h) {
5045
5054
  console.error(h), self.postMessage({ type: "error", id: a.id, error: h.message });
5046
5055
  } finally {
5047
- c.destroy(u);
5056
+ u.destroy(c);
5048
5057
  }
5049
5058
  });
5050
5059
  break;
5051
5060
  }
5052
5061
  };
5053
5062
  function t(o, a, l, A) {
5054
- const d = A.attributeIDs, c = A.attributeTypes;
5055
- let u, h;
5056
- const m = a.GetEncodedGeometryType(l);
5057
- if (m === o.TRIANGULAR_MESH)
5058
- u = new o.Mesh(), h = a.DecodeArrayToMesh(l, l.byteLength, u);
5059
- else if (m === o.POINT_CLOUD)
5060
- u = new o.PointCloud(), h = a.DecodeArrayToPointCloud(l, l.byteLength, u);
5063
+ const d = A.attributeIDs, u = A.attributeTypes;
5064
+ let c, h;
5065
+ const p = a.GetEncodedGeometryType(l);
5066
+ if (p === o.TRIANGULAR_MESH)
5067
+ c = new o.Mesh(), h = a.DecodeArrayToMesh(l, l.byteLength, c);
5068
+ else if (p === o.POINT_CLOUD)
5069
+ c = new o.PointCloud(), h = a.DecodeArrayToPointCloud(l, l.byteLength, c);
5061
5070
  else
5062
5071
  throw new Error("THREE.DRACOLoader: Unexpected geometry type.");
5063
- if (!h.ok() || u.ptr === 0)
5072
+ if (!h.ok() || c.ptr === 0)
5064
5073
  throw new Error("THREE.DRACOLoader: Decoding failed: " + h.error_msg());
5065
5074
  const f = { index: null, attributes: [] };
5066
- for (const g in d) {
5067
- const p = self[c[g]];
5068
- let I, x;
5075
+ for (const m in d) {
5076
+ const g = self[u[m]];
5077
+ let x, I;
5069
5078
  if (A.useUniqueIDs)
5070
- x = d[g], I = a.GetAttributeByUniqueId(u, x);
5079
+ I = d[m], x = a.GetAttributeByUniqueId(c, I);
5071
5080
  else {
5072
- if (x = a.GetAttributeId(u, o[d[g]]), x === -1) continue;
5073
- I = a.GetAttribute(u, x);
5081
+ if (I = a.GetAttributeId(c, o[d[m]]), I === -1) continue;
5082
+ x = a.GetAttribute(c, I);
5074
5083
  }
5075
- const y = s(o, a, u, g, p, I);
5076
- g === "color" && (y.vertexColorSpace = A.vertexColorSpace), f.attributes.push(y);
5084
+ const y = s(o, a, c, m, g, x);
5085
+ m === "color" && (y.vertexColorSpace = A.vertexColorSpace), f.attributes.push(y);
5077
5086
  }
5078
- return m === o.TRIANGULAR_MESH && (f.index = n(o, a, u)), o.destroy(u), f;
5087
+ return p === o.TRIANGULAR_MESH && (f.index = n(o, a, c)), o.destroy(c), f;
5079
5088
  }
5080
5089
  function n(o, a, l) {
5081
- const d = l.num_faces() * 3, c = d * 4, u = o._malloc(c);
5082
- a.GetTrianglesUInt32Array(l, c, u);
5083
- const h = new Uint32Array(o.HEAPF32.buffer, u, d).slice();
5084
- return o._free(u), { array: h, itemSize: 1 };
5085
- }
5086
- function s(o, a, l, A, d, c) {
5087
- 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);
5088
- a.GetAttributeDataArrayForAllPoints(l, c, m, I, y);
5089
- const v = new d(o.HEAPF32.buffer, y, I / d.BYTES_PER_ELEMENT);
5090
- let M;
5091
- if (f === g)
5092
- M = v.slice();
5090
+ const d = l.num_faces() * 3, u = d * 4, c = o._malloc(u);
5091
+ a.GetTrianglesUInt32Array(l, u, c);
5092
+ const h = new Uint32Array(o.HEAPF32.buffer, c, d).slice();
5093
+ return o._free(c), { array: h, itemSize: 1 };
5094
+ }
5095
+ function s(o, a, l, A, d, u) {
5096
+ const c = l.num_points(), h = u.num_components(), p = i(o, d), f = h * d.BYTES_PER_ELEMENT, m = Math.ceil(f / 4) * 4, g = m / d.BYTES_PER_ELEMENT, x = c * f, I = c * m, y = o._malloc(x);
5097
+ a.GetAttributeDataArrayForAllPoints(l, u, p, x, y);
5098
+ const v = new d(o.HEAPF32.buffer, y, x / d.BYTES_PER_ELEMENT);
5099
+ let S;
5100
+ if (f === m)
5101
+ S = v.slice();
5093
5102
  else {
5094
- M = new d(x / d.BYTES_PER_ELEMENT);
5103
+ S = new d(I / d.BYTES_PER_ELEMENT);
5095
5104
  let L = 0;
5096
- for (let Q = 0, $ = v.length; Q < $; Q++) {
5097
- for (let Y = 0; Y < h; Y++)
5098
- M[L + Y] = v[Q * h + Y];
5099
- L += p;
5105
+ for (let Y = 0, ee = v.length; Y < ee; Y++) {
5106
+ for (let _ = 0; _ < h; _++)
5107
+ S[L + _] = v[Y * h + _];
5108
+ L += g;
5100
5109
  }
5101
5110
  }
5102
5111
  return o._free(y), {
5103
5112
  name: A,
5104
- count: u,
5113
+ count: c,
5105
5114
  itemSize: h,
5106
- array: M,
5107
- stride: p
5115
+ array: S,
5116
+ stride: g
5108
5117
  };
5109
5118
  }
5110
5119
  function i(o, a) {
@@ -5155,9 +5164,9 @@ function zr(r) {
5155
5164
  repeatY: l = 4,
5156
5165
  speedX: A = 5e-4,
5157
5166
  speedY: d = 5e-4
5158
- } = r || {}, c = new w.PlaneGeometry(e, t), h = new w.TextureLoader().load(jr, (g) => {
5159
- g.wrapS = g.wrapT = w.RepeatWrapping, g.repeat.set(a, l), g.generateMipmaps = !1, g.minFilter = w.LinearFilter, g.magFilter = w.LinearFilter;
5160
- }), m = new w.MeshStandardMaterial({
5167
+ } = r || {}, u = new w.PlaneGeometry(e, t), h = new w.TextureLoader().load(jr, (m) => {
5168
+ m.wrapS = m.wrapT = w.RepeatWrapping, m.repeat.set(a, l), m.generateMipmaps = !1, m.minFilter = w.LinearFilter, m.magFilter = w.LinearFilter;
5169
+ }), p = new w.MeshStandardMaterial({
5161
5170
  color: n,
5162
5171
  roughness: s,
5163
5172
  metalness: i,
@@ -5167,7 +5176,7 @@ function zr(r) {
5167
5176
  // 双面渲染,避免从侧面或底部看到黑色
5168
5177
  transparent: !0,
5169
5178
  opacity: 0.6
5170
- }), f = new w.Mesh(c, m);
5179
+ }), f = new w.Mesh(u, p);
5171
5180
  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);
5172
5181
  }
5173
5182
  function Gr(r) {
@@ -5209,9 +5218,9 @@ function Kr(r) {
5209
5218
  s,
5210
5219
  (a) => {
5211
5220
  const l = n === "gltf" || n === "glb" ? a.scene : a;
5212
- l.traverse((c) => {
5213
- var u;
5214
- 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);
5221
+ l.traverse((u) => {
5222
+ var c;
5223
+ u.userData.isMovable = !0, u.name || (u.name = u.type), u.type === "Mesh" && (u.frustumCulled = !0, (c = u.geometry) == null || c.computeVertexNormals(), u.castShadow = !0, u.receiveShadow = !0);
5215
5224
  });
5216
5225
  const d = new w.Box3().setFromObject(l).getCenter(new w.Vector3());
5217
5226
  l.position.sub(d), Xe(l, !0), Zt(!1), e(l);
@@ -5257,7 +5266,7 @@ const Zr = {
5257
5266
  },
5258
5267
  emits: ["select", "delete"],
5259
5268
  setup(r, { emit: e }) {
5260
- const t = r, n = e, s = W(null), { expandedSet: i, toggleExpand: o } = Cn("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(
5269
+ const t = r, n = e, s = N(null), { expandedSet: i, toggleExpand: o } = Cn("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(
5261
5270
  (f) => f.userData.isMovable === !0
5262
5271
  ))), d = $e(
5263
5272
  () => {
@@ -5276,44 +5285,44 @@ const Zr = {
5276
5285
  },
5277
5286
  { flush: "post" }
5278
5287
  );
5279
- const c = (f) => {
5288
+ const u = (f) => {
5280
5289
  f.stopPropagation(), n("select", t.node);
5281
- }, u = (f) => {
5290
+ }, c = (f) => {
5282
5291
  f.stopPropagation(), n("delete", t.node);
5283
- }, h = (f) => f.type === "Mesh" || f.type === "Sprite" ? "🟦" : f.type === "Light" ? "💡" : "📦", m = (f) => f.name || `${f.type} (${f.id})`;
5284
- return (f, g) => {
5285
- const p = yn("TreeItem", !0);
5292
+ }, h = (f) => f.type === "Mesh" || f.type === "Sprite" ? "🟦" : f.type === "Light" ? "💡" : "📦", p = (f) => f.name || `${f.type} (${f.id})`;
5293
+ return (f, m) => {
5294
+ const g = yn("TreeItem", !0);
5286
5295
  return R(), P("div", {
5287
5296
  class: "tree-node",
5288
5297
  ref_key: "nodeRef",
5289
5298
  ref: s
5290
5299
  }, [
5291
- C("div", {
5300
+ b("div", {
5292
5301
  class: oe(["tree-item", { selected: d.value }]),
5293
- onClick: c
5302
+ onClick: u
5294
5303
  }, [
5295
5304
  l.value ? (R(), P("span", {
5296
5305
  key: 0,
5297
5306
  class: "toggle-icon",
5298
- onClick: g[0] || (g[0] = Yt((I) => xn(o)(f.node.uuid), ["stop"]))
5299
- }, ne(a.value ? "▼" : "▶"), 1)) : (R(), P("span", Zr)),
5300
- C("span", Xr, ne(h(f.node)), 1),
5301
- C("span", qr, ne(m(f.node)), 1),
5302
- C("button", {
5307
+ onClick: m[0] || (m[0] = Yt((x) => xn(o)(f.node.uuid), ["stop"]))
5308
+ }, B(a.value ? "▼" : "▶"), 1)) : (R(), P("span", Zr)),
5309
+ b("span", Xr, B(h(f.node)), 1),
5310
+ b("span", qr, B(p(f.node)), 1),
5311
+ b("button", {
5303
5312
  class: "tree-delete",
5304
- onClick: Yt(u, ["stop"])
5313
+ onClick: Yt(c, ["stop"])
5305
5314
  }, "×")
5306
5315
  ], 2),
5307
5316
  a.value && l.value ? (R(), P("div", Vr, [
5308
- (R(!0), P(Pe, null, jt(A.value, (I) => (R(), nt(p, {
5309
- key: I.uuid,
5310
- node: I,
5317
+ (R(!0), P(Pe, null, jt(A.value, (x) => (R(), nt(g, {
5318
+ key: x.uuid,
5319
+ node: x,
5311
5320
  "selected-object": f.selectedObject,
5312
5321
  version: f.version,
5313
- onSelect: g[1] || (g[1] = (x) => n("select", x)),
5314
- onDelete: g[2] || (g[2] = (x) => n("delete", x))
5322
+ onSelect: m[1] || (m[1] = (I) => n("select", I)),
5323
+ onDelete: m[2] || (m[2] = (I) => n("delete", I))
5315
5324
  }, null, 8, ["node", "selected-object", "version"]))), 128))
5316
- ])) : Z("", !0)
5325
+ ])) : X("", !0)
5317
5326
  ], 512);
5318
5327
  };
5319
5328
  }
@@ -5343,300 +5352,300 @@ const Zr = {
5343
5352
  metalness: 0,
5344
5353
  roughness: 0.5,
5345
5354
  opacity: 1
5346
- }), o = W(!1), a = _t({
5355
+ }), o = N(!1), a = _t({
5347
5356
  intensity: 1
5348
5357
  });
5349
5358
  function l() {
5350
5359
  t.selectedObject && t.selectedObject.type === "DirectionalLight" && (t.selectedObject.intensity = a.intensity);
5351
5360
  }
5352
- function A(u) {
5361
+ function A(c) {
5353
5362
  let h = null;
5354
- return u.traverse((m) => {
5355
- if (m.type === "Mesh" && !h) {
5356
- const f = m, g = Array.isArray(f.material) ? f.material : [f.material];
5357
- for (const p of g)
5358
- if (p && (p.type === "MeshStandardMaterial" || p.type === "MeshPhongMaterial")) {
5359
- const I = p;
5363
+ return c.traverse((p) => {
5364
+ if (p.type === "Mesh" && !h) {
5365
+ const f = p, m = Array.isArray(f.material) ? f.material : [f.material];
5366
+ for (const g of m)
5367
+ if (g && (g.type === "MeshStandardMaterial" || g.type === "MeshPhongMaterial")) {
5368
+ const x = g;
5360
5369
  h = {
5361
- metalness: I.metalness ?? 0,
5362
- roughness: I.roughness ?? 0.5,
5363
- opacity: p.opacity ?? 1
5370
+ metalness: x.metalness ?? 0,
5371
+ roughness: x.roughness ?? 0.5,
5372
+ opacity: g.opacity ?? 1
5364
5373
  };
5365
5374
  break;
5366
5375
  }
5367
5376
  }
5368
5377
  }), h;
5369
5378
  }
5370
- function d(u, h) {
5371
- let m = !1;
5372
- return u.traverse((f) => {
5379
+ function d(c, h) {
5380
+ let p = !1;
5381
+ return c.traverse((f) => {
5373
5382
  if (f.type === "Mesh") {
5374
- const g = f, p = Array.isArray(g.material) ? g.material : [g.material];
5375
- for (const I of p)
5376
- 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);
5383
+ const m = f, g = Array.isArray(m.material) ? m.material : [m.material];
5384
+ for (const x of g)
5385
+ x && (x.type === "MeshStandardMaterial" || x.type === "MeshPhongMaterial") && (h.metalness !== void 0 && (x.metalness = h.metalness), h.roughness !== void 0 && (x.roughness = h.roughness), h.opacity !== void 0 && (x.opacity = h.opacity, x.transparent = h.opacity < 1), x.needsUpdate = !0, p = !0);
5377
5386
  }
5378
- }), m;
5387
+ }), p;
5379
5388
  }
5380
- function c() {
5389
+ function u() {
5381
5390
  if (t.selectedObject) {
5382
- const u = d(t.selectedObject, {
5391
+ const c = d(t.selectedObject, {
5383
5392
  metalness: i.metalness,
5384
5393
  roughness: i.roughness,
5385
5394
  opacity: i.opacity
5386
5395
  });
5387
- o.value = u;
5396
+ o.value = c;
5388
5397
  }
5389
5398
  }
5390
- return be(
5399
+ return le(
5391
5400
  () => t.selectedObject,
5392
- (u) => {
5393
- if (u) {
5394
- const h = A(u);
5395
- 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);
5401
+ (c) => {
5402
+ if (c) {
5403
+ const h = A(c);
5404
+ 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), c.type === "DirectionalLight" && (a.intensity = c.intensity ?? 1);
5396
5405
  } else
5397
5406
  i.metalness = 0, i.roughness = 0.5, i.opacity = 1, o.value = !1;
5398
5407
  },
5399
5408
  { immediate: !0 }
5400
- ), (u, h) => (R(), P("div", null, [
5401
- C("div", Yr, [
5402
- h[17] || (h[17] = C("label", null, "位置", -1)),
5403
- C("div", _r, [
5404
- h[14] || (h[14] = C("span", null, "X:", -1)),
5405
- k(C("input", {
5409
+ ), (c, h) => (R(), P("div", null, [
5410
+ b("div", Yr, [
5411
+ h[17] || (h[17] = b("label", null, "位置", -1)),
5412
+ b("div", _r, [
5413
+ h[14] || (h[14] = b("span", null, "X:", -1)),
5414
+ k(b("input", {
5406
5415
  type: "number",
5407
- "onUpdate:modelValue": h[0] || (h[0] = (m) => u.transform.position.x = m),
5416
+ "onUpdate:modelValue": h[0] || (h[0] = (p) => c.transform.position.x = p),
5408
5417
  step: "0.01",
5409
5418
  onInput: s
5410
5419
  }, null, 544), [
5411
5420
  [
5412
- D,
5413
- u.transform.position.x,
5421
+ O,
5422
+ c.transform.position.x,
5414
5423
  void 0,
5415
5424
  { number: !0 }
5416
5425
  ]
5417
5426
  ]),
5418
- h[15] || (h[15] = C("span", null, "Y:", -1)),
5419
- k(C("input", {
5427
+ h[15] || (h[15] = b("span", null, "Y:", -1)),
5428
+ k(b("input", {
5420
5429
  type: "number",
5421
- "onUpdate:modelValue": h[1] || (h[1] = (m) => u.transform.position.y = m),
5430
+ "onUpdate:modelValue": h[1] || (h[1] = (p) => c.transform.position.y = p),
5422
5431
  step: "0.01",
5423
5432
  onInput: s
5424
5433
  }, null, 544), [
5425
5434
  [
5426
- D,
5427
- u.transform.position.y,
5435
+ O,
5436
+ c.transform.position.y,
5428
5437
  void 0,
5429
5438
  { number: !0 }
5430
5439
  ]
5431
5440
  ]),
5432
- h[16] || (h[16] = C("span", null, "Z:", -1)),
5433
- k(C("input", {
5441
+ h[16] || (h[16] = b("span", null, "Z:", -1)),
5442
+ k(b("input", {
5434
5443
  type: "number",
5435
- "onUpdate:modelValue": h[2] || (h[2] = (m) => u.transform.position.z = m),
5444
+ "onUpdate:modelValue": h[2] || (h[2] = (p) => c.transform.position.z = p),
5436
5445
  step: "0.01",
5437
5446
  onInput: s
5438
5447
  }, null, 544), [
5439
5448
  [
5440
- D,
5441
- u.transform.position.z,
5449
+ O,
5450
+ c.transform.position.z,
5442
5451
  void 0,
5443
5452
  { number: !0 }
5444
5453
  ]
5445
5454
  ])
5446
5455
  ])
5447
5456
  ]),
5448
- C("div", $r, [
5449
- h[21] || (h[21] = C("label", null, "旋转 (弧度)", -1)),
5450
- C("div", ea, [
5451
- h[18] || (h[18] = C("span", null, "X:", -1)),
5452
- k(C("input", {
5457
+ b("div", $r, [
5458
+ h[21] || (h[21] = b("label", null, "旋转 (弧度)", -1)),
5459
+ b("div", ea, [
5460
+ h[18] || (h[18] = b("span", null, "X:", -1)),
5461
+ k(b("input", {
5453
5462
  type: "number",
5454
- "onUpdate:modelValue": h[3] || (h[3] = (m) => u.transform.rotation.x = m),
5463
+ "onUpdate:modelValue": h[3] || (h[3] = (p) => c.transform.rotation.x = p),
5455
5464
  step: "0.01",
5456
5465
  onInput: s
5457
5466
  }, null, 544), [
5458
5467
  [
5459
- D,
5460
- u.transform.rotation.x,
5468
+ O,
5469
+ c.transform.rotation.x,
5461
5470
  void 0,
5462
5471
  { number: !0 }
5463
5472
  ]
5464
5473
  ]),
5465
- h[19] || (h[19] = C("span", null, "Y:", -1)),
5466
- k(C("input", {
5474
+ h[19] || (h[19] = b("span", null, "Y:", -1)),
5475
+ k(b("input", {
5467
5476
  type: "number",
5468
- "onUpdate:modelValue": h[4] || (h[4] = (m) => u.transform.rotation.y = m),
5477
+ "onUpdate:modelValue": h[4] || (h[4] = (p) => c.transform.rotation.y = p),
5469
5478
  step: "0.01",
5470
5479
  onInput: s
5471
5480
  }, null, 544), [
5472
5481
  [
5473
- D,
5474
- u.transform.rotation.y,
5482
+ O,
5483
+ c.transform.rotation.y,
5475
5484
  void 0,
5476
5485
  { number: !0 }
5477
5486
  ]
5478
5487
  ]),
5479
- h[20] || (h[20] = C("span", null, "Z:", -1)),
5480
- k(C("input", {
5488
+ h[20] || (h[20] = b("span", null, "Z:", -1)),
5489
+ k(b("input", {
5481
5490
  type: "number",
5482
- "onUpdate:modelValue": h[5] || (h[5] = (m) => u.transform.rotation.z = m),
5491
+ "onUpdate:modelValue": h[5] || (h[5] = (p) => c.transform.rotation.z = p),
5483
5492
  step: "0.01",
5484
5493
  onInput: s
5485
5494
  }, null, 544), [
5486
5495
  [
5487
- D,
5488
- u.transform.rotation.z,
5496
+ O,
5497
+ c.transform.rotation.z,
5489
5498
  void 0,
5490
5499
  { number: !0 }
5491
5500
  ]
5492
5501
  ])
5493
5502
  ])
5494
5503
  ]),
5495
- C("div", ta, [
5496
- h[25] || (h[25] = C("label", null, "缩放", -1)),
5497
- C("div", sa, [
5498
- h[22] || (h[22] = C("span", null, "X:", -1)),
5499
- k(C("input", {
5504
+ b("div", ta, [
5505
+ h[25] || (h[25] = b("label", null, "缩放", -1)),
5506
+ b("div", sa, [
5507
+ h[22] || (h[22] = b("span", null, "X:", -1)),
5508
+ k(b("input", {
5500
5509
  type: "number",
5501
- "onUpdate:modelValue": h[6] || (h[6] = (m) => u.transform.scale.x = m),
5510
+ "onUpdate:modelValue": h[6] || (h[6] = (p) => c.transform.scale.x = p),
5502
5511
  step: "0.01",
5503
5512
  onInput: s
5504
5513
  }, null, 544), [
5505
5514
  [
5506
- D,
5507
- u.transform.scale.x,
5515
+ O,
5516
+ c.transform.scale.x,
5508
5517
  void 0,
5509
5518
  { number: !0 }
5510
5519
  ]
5511
5520
  ]),
5512
- h[23] || (h[23] = C("span", null, "Y:", -1)),
5513
- k(C("input", {
5521
+ h[23] || (h[23] = b("span", null, "Y:", -1)),
5522
+ k(b("input", {
5514
5523
  type: "number",
5515
- "onUpdate:modelValue": h[7] || (h[7] = (m) => u.transform.scale.y = m),
5524
+ "onUpdate:modelValue": h[7] || (h[7] = (p) => c.transform.scale.y = p),
5516
5525
  step: "0.01",
5517
5526
  onInput: s
5518
5527
  }, null, 544), [
5519
5528
  [
5520
- D,
5521
- u.transform.scale.y,
5529
+ O,
5530
+ c.transform.scale.y,
5522
5531
  void 0,
5523
5532
  { number: !0 }
5524
5533
  ]
5525
5534
  ]),
5526
- h[24] || (h[24] = C("span", null, "Z:", -1)),
5527
- k(C("input", {
5535
+ h[24] || (h[24] = b("span", null, "Z:", -1)),
5536
+ k(b("input", {
5528
5537
  type: "number",
5529
- "onUpdate:modelValue": h[8] || (h[8] = (m) => u.transform.scale.z = m),
5538
+ "onUpdate:modelValue": h[8] || (h[8] = (p) => c.transform.scale.z = p),
5530
5539
  step: "0.01",
5531
5540
  onInput: s
5532
5541
  }, null, 544), [
5533
5542
  [
5534
- D,
5535
- u.transform.scale.z,
5543
+ O,
5544
+ c.transform.scale.z,
5536
5545
  void 0,
5537
5546
  { number: !0 }
5538
5547
  ]
5539
5548
  ])
5540
5549
  ])
5541
5550
  ]),
5542
- u.selectedObject && u.selectedObject.type === "DirectionalLight" ? (R(), P("div", na, [
5543
- h[27] || (h[27] = C("label", null, "光源属性", -1)),
5544
- C("div", ia, [
5545
- h[26] || (h[26] = C("span", { class: "slider-label" }, "强度", -1)),
5546
- k(C("input", {
5551
+ c.selectedObject && c.selectedObject.type === "DirectionalLight" ? (R(), P("div", na, [
5552
+ h[27] || (h[27] = b("label", null, "光源属性", -1)),
5553
+ b("div", ia, [
5554
+ h[26] || (h[26] = b("span", { class: "slider-label" }, "强度", -1)),
5555
+ k(b("input", {
5547
5556
  type: "range",
5548
5557
  min: "0",
5549
5558
  max: "10",
5550
5559
  step: "0.1",
5551
- "onUpdate:modelValue": h[9] || (h[9] = (m) => a.intensity = m),
5560
+ "onUpdate:modelValue": h[9] || (h[9] = (p) => a.intensity = p),
5552
5561
  onInput: l
5553
5562
  }, null, 544), [
5554
5563
  [
5555
- D,
5564
+ O,
5556
5565
  a.intensity,
5557
5566
  void 0,
5558
5567
  { number: !0 }
5559
5568
  ]
5560
5569
  ]),
5561
- k(C("input", {
5570
+ k(b("input", {
5562
5571
  type: "number",
5563
5572
  min: "0",
5564
5573
  max: "100",
5565
5574
  step: "0.1",
5566
- "onUpdate:modelValue": h[10] || (h[10] = (m) => a.intensity = m),
5575
+ "onUpdate:modelValue": h[10] || (h[10] = (p) => a.intensity = p),
5567
5576
  class: "intensity-input",
5568
5577
  onInput: l
5569
5578
  }, null, 544), [
5570
5579
  [
5571
- D,
5580
+ O,
5572
5581
  a.intensity,
5573
5582
  void 0,
5574
5583
  { number: !0 }
5575
5584
  ]
5576
5585
  ])
5577
5586
  ])
5578
- ])) : Z("", !0),
5579
- u.selectedObject ? (R(), P("div", oa, [
5580
- h[31] || (h[31] = C("label", null, "材质", -1)),
5581
- C("div", ra, [
5582
- h[28] || (h[28] = C("span", { class: "slider-label" }, "金属度", -1)),
5583
- k(C("input", {
5587
+ ])) : X("", !0),
5588
+ c.selectedObject ? (R(), P("div", oa, [
5589
+ h[31] || (h[31] = b("label", null, "材质", -1)),
5590
+ b("div", ra, [
5591
+ h[28] || (h[28] = b("span", { class: "slider-label" }, "金属度", -1)),
5592
+ k(b("input", {
5584
5593
  type: "range",
5585
5594
  min: "0",
5586
5595
  max: "1",
5587
5596
  step: "0.01",
5588
- "onUpdate:modelValue": h[11] || (h[11] = (m) => i.metalness = m),
5589
- onInput: c
5597
+ "onUpdate:modelValue": h[11] || (h[11] = (p) => i.metalness = p),
5598
+ onInput: u
5590
5599
  }, null, 544), [
5591
5600
  [
5592
- D,
5601
+ O,
5593
5602
  i.metalness,
5594
5603
  void 0,
5595
5604
  { number: !0 }
5596
5605
  ]
5597
5606
  ]),
5598
- C("span", aa, ne(i.metalness.toFixed(2)), 1)
5607
+ b("span", aa, B(i.metalness.toFixed(2)), 1)
5599
5608
  ]),
5600
- C("div", la, [
5601
- h[29] || (h[29] = C("span", { class: "slider-label" }, "粗糙度", -1)),
5602
- k(C("input", {
5609
+ b("div", la, [
5610
+ h[29] || (h[29] = b("span", { class: "slider-label" }, "粗糙度", -1)),
5611
+ k(b("input", {
5603
5612
  type: "range",
5604
5613
  min: "0",
5605
5614
  max: "1",
5606
5615
  step: "0.01",
5607
- "onUpdate:modelValue": h[12] || (h[12] = (m) => i.roughness = m),
5608
- onInput: c
5616
+ "onUpdate:modelValue": h[12] || (h[12] = (p) => i.roughness = p),
5617
+ onInput: u
5609
5618
  }, null, 544), [
5610
5619
  [
5611
- D,
5620
+ O,
5612
5621
  i.roughness,
5613
5622
  void 0,
5614
5623
  { number: !0 }
5615
5624
  ]
5616
5625
  ]),
5617
- C("span", Aa, ne(i.roughness.toFixed(2)), 1)
5626
+ b("span", Aa, B(i.roughness.toFixed(2)), 1)
5618
5627
  ]),
5619
- C("div", ca, [
5620
- h[30] || (h[30] = C("span", { class: "slider-label" }, "透明度", -1)),
5621
- k(C("input", {
5628
+ b("div", ca, [
5629
+ h[30] || (h[30] = b("span", { class: "slider-label" }, "透明度", -1)),
5630
+ k(b("input", {
5622
5631
  type: "range",
5623
5632
  min: "0",
5624
5633
  max: "1",
5625
5634
  step: "0.01",
5626
- "onUpdate:modelValue": h[13] || (h[13] = (m) => i.opacity = m),
5627
- onInput: c
5635
+ "onUpdate:modelValue": h[13] || (h[13] = (p) => i.opacity = p),
5636
+ onInput: u
5628
5637
  }, null, 544), [
5629
5638
  [
5630
- D,
5639
+ O,
5631
5640
  i.opacity,
5632
5641
  void 0,
5633
5642
  { number: !0 }
5634
5643
  ]
5635
5644
  ]),
5636
- C("span", ua, ne(i.opacity.toFixed(2)), 1)
5645
+ b("span", ua, B(i.opacity.toFixed(2)), 1)
5637
5646
  ]),
5638
- o.value ? Z("", !0) : (R(), P("div", da, " ⚠️ 当前材质不支持金属度/粗糙度(仅支持 Standard/Phong) "))
5639
- ])) : Z("", !0)
5647
+ o.value ? X("", !0) : (R(), P("div", da, " ⚠️ 当前材质不支持金属度/粗糙度(仅支持 Standard/Phong) "))
5648
+ ])) : X("", !0)
5640
5649
  ]));
5641
5650
  }
5642
5651
  }), fa = /* @__PURE__ */ Se(ha, [["__scopeId", "data-v-4cecf018"]]), pa = { class: "userdata-tab" }, ma = { class: "property-group userdata-group" }, ga = { class: "userdata-add-row" }, ba = ["onKeyup"], Ca = {
@@ -5658,27 +5667,27 @@ const Zr = {
5658
5667
  selectedObject: {}
5659
5668
  },
5660
5669
  setup(r) {
5661
- const e = r, t = W(""), n = W(""), s = W(null), i = W(""), o = W(null), a = W([]);
5662
- function l(x) {
5663
- if (x === null) return "null";
5664
- if (x === void 0) return "undefined";
5665
- if (Array.isArray(x)) return "array";
5666
- const y = typeof x;
5670
+ const e = r, t = N(""), n = N(""), s = N(null), i = N(""), o = N(null), a = N([]);
5671
+ function l(I) {
5672
+ if (I === null) return "null";
5673
+ if (I === void 0) return "undefined";
5674
+ if (Array.isArray(I)) return "array";
5675
+ const y = typeof I;
5667
5676
  return y === "object" ? "object" : y === "number" ? "number" : y === "boolean" ? "boolean" : "string";
5668
5677
  }
5669
- function A(x) {
5678
+ function A(I) {
5670
5679
  const y = [];
5671
- if (x.userData)
5672
- for (const [v, M] of Object.entries(x.userData))
5680
+ if (I.userData)
5681
+ for (const [v, S] of Object.entries(I.userData))
5673
5682
  typeof v == "string" && !v.startsWith("_") && y.push({
5674
5683
  key: v,
5675
- value: typeof M == "object" ? JSON.stringify(M) : String(M),
5676
- rawType: l(M)
5684
+ value: typeof S == "object" ? JSON.stringify(S) : String(S),
5685
+ rawType: l(S)
5677
5686
  });
5678
5687
  a.value = y;
5679
5688
  }
5680
- function d(x) {
5681
- const y = x.trim();
5689
+ function d(I) {
5690
+ const y = I.trim();
5682
5691
  if (y === "true") return !0;
5683
5692
  if (y === "false") return !1;
5684
5693
  if (y === "null") return null;
@@ -5693,27 +5702,27 @@ const Zr = {
5693
5702
  }
5694
5703
  return y;
5695
5704
  }
5696
- function c() {
5705
+ function u() {
5697
5706
  if (!e.selectedObject || !t.value.trim()) return;
5698
- const x = t.value.trim();
5699
- if (x === "isMovable") {
5707
+ const I = t.value.trim();
5708
+ if (I === "isMovable") {
5700
5709
  t.value = "";
5701
5710
  return;
5702
5711
  }
5703
5712
  const y = d(n.value);
5704
- e.selectedObject.userData[x] = y, A(e.selectedObject), t.value = "", n.value = "";
5713
+ e.selectedObject.userData[I] = y, A(e.selectedObject), t.value = "", n.value = "";
5705
5714
  }
5706
- function u(x, y) {
5707
- e.selectedObject && (delete e.selectedObject.userData[x], A(e.selectedObject));
5715
+ function c(I, y) {
5716
+ e.selectedObject && (delete e.selectedObject.userData[I], A(e.selectedObject));
5708
5717
  }
5709
- function h(x) {
5710
- return x.length <= 28 ? x : x.substring(0, 28) + "…";
5718
+ function h(I) {
5719
+ return I.length <= 28 ? I : I.substring(0, 28) + "…";
5711
5720
  }
5712
- function m(x) {
5713
- s.value = x;
5721
+ function p(I) {
5722
+ s.value = I;
5714
5723
  const y = e.selectedObject;
5715
5724
  if (!y) return;
5716
- const v = y.userData[x];
5725
+ const v = y.userData[I];
5717
5726
  try {
5718
5727
  i.value = JSON.stringify(v, null, 2);
5719
5728
  } catch {
@@ -5722,115 +5731,115 @@ const Zr = {
5722
5731
  f();
5723
5732
  }
5724
5733
  function f() {
5725
- const x = i.value.trim();
5726
- if (!x) {
5734
+ const I = i.value.trim();
5735
+ if (!I) {
5727
5736
  o.value = null;
5728
5737
  return;
5729
5738
  }
5730
- if (!x.startsWith("{") && !x.startsWith("[")) {
5739
+ if (!I.startsWith("{") && !I.startsWith("[")) {
5731
5740
  o.value = "提示:当前输入不是 JSON 格式,将作为普通字符串保存";
5732
5741
  return;
5733
5742
  }
5734
5743
  try {
5735
- JSON.parse(x), o.value = null;
5744
+ JSON.parse(I), o.value = null;
5736
5745
  } catch (y) {
5737
5746
  o.value = "JSON 格式错误:" + y.message;
5738
5747
  }
5739
5748
  }
5740
- function g(x) {
5749
+ function m(I) {
5741
5750
  const y = e.selectedObject;
5742
5751
  if (!y) return;
5743
5752
  const v = i.value.trim();
5744
5753
  try {
5745
- const M = JSON.parse(v);
5746
- y.userData[x] = M, A(y), s.value = null, i.value = "";
5754
+ const S = JSON.parse(v);
5755
+ y.userData[I] = S, A(y), s.value = null, i.value = "";
5747
5756
  } catch {
5748
- y.userData[x] = v, A(y), s.value = null, i.value = "";
5757
+ y.userData[I] = v, A(y), s.value = null, i.value = "";
5749
5758
  }
5750
5759
  }
5751
- function p() {
5760
+ function g() {
5752
5761
  s.value = null, i.value = "";
5753
5762
  }
5754
- function I() {
5755
- const x = e.selectedObject;
5756
- if (!x) return;
5763
+ function x() {
5764
+ const I = e.selectedObject;
5765
+ if (!I) return;
5757
5766
  const y = Bo();
5758
- y && (x.userData.closeUpView = {
5767
+ y && (I.userData.closeUpView = {
5759
5768
  x: y.position.x,
5760
5769
  y: y.position.y,
5761
5770
  z: y.position.z
5762
- }, A(x));
5771
+ }, A(I));
5763
5772
  }
5764
- return be(
5773
+ return le(
5765
5774
  () => e.selectedObject,
5766
- (x) => {
5767
- x ? A(x) : a.value = [], s.value = null, i.value = "";
5775
+ (I) => {
5776
+ I ? A(I) : a.value = [], s.value = null, i.value = "";
5768
5777
  },
5769
5778
  { immediate: !0 }
5770
- ), (x, y) => (R(), P("div", pa, [
5771
- C("div", ma, [
5772
- y[3] || (y[3] = C("label", null, "userData 属性", -1)),
5773
- C("div", ga, [
5774
- k(C("input", {
5779
+ ), (I, y) => (R(), P("div", pa, [
5780
+ b("div", ma, [
5781
+ y[3] || (y[3] = b("label", null, "userData 属性", -1)),
5782
+ b("div", ga, [
5783
+ k(b("input", {
5775
5784
  type: "text",
5776
5785
  "onUpdate:modelValue": y[0] || (y[0] = (v) => t.value = v),
5777
5786
  placeholder: "属性名",
5778
5787
  class: "ud-input",
5779
- onKeyup: ze(c, ["enter"])
5788
+ onKeyup: ze(u, ["enter"])
5780
5789
  }, null, 544), [
5781
- [D, t.value]
5790
+ [O, t.value]
5782
5791
  ]),
5783
- k(C("textarea", {
5792
+ k(b("textarea", {
5784
5793
  "onUpdate:modelValue": y[1] || (y[1] = (v) => n.value = v),
5785
5794
  placeholder: "值",
5786
5795
  class: "ud-input ud-textarea",
5787
- onKeyup: ze(Yt(c, ["prevent"]), ["enter"])
5796
+ onKeyup: ze(Yt(u, ["prevent"]), ["enter"])
5788
5797
  }, null, 40, ba), [
5789
- [D, n.value]
5798
+ [O, n.value]
5790
5799
  ]),
5791
- C("button", {
5800
+ b("button", {
5792
5801
  class: "ud-btn add-btn",
5793
5802
  title: "添加",
5794
- onClick: c
5803
+ onClick: u
5795
5804
  }, " + ")
5796
5805
  ]),
5797
5806
  a.value.length > 0 ? (R(), P("div", Ca, [
5798
- (R(!0), P(Pe, null, jt(a.value, (v, M) => (R(), P("div", {
5807
+ (R(!0), P(Pe, null, jt(a.value, (v, S) => (R(), P("div", {
5799
5808
  key: v.key,
5800
5809
  class: oe(["userdata-item", {
5801
5810
  readonly: v.key === "isMovable",
5802
5811
  "editing-json": s.value === v.key
5803
5812
  }])
5804
5813
  }, [
5805
- C("span", Ia, ne(v.key), 1),
5806
- v.key === "isMovable" ? (R(), P("span", ya, ne(String(v.value)) + " 🔒 ", 1)) : v.key !== "isMovable" ? (R(), P(Pe, { key: 1 }, [
5814
+ b("span", Ia, B(v.key), 1),
5815
+ v.key === "isMovable" ? (R(), P("span", ya, B(String(v.value)) + " 🔒 ", 1)) : v.key !== "isMovable" ? (R(), P(Pe, { key: 1 }, [
5807
5816
  s.value !== v.key ? (R(), P(Pe, { key: 0 }, [
5808
- C("span", xa, ne(h(v.value)), 1),
5809
- C("button", {
5817
+ b("span", xa, B(h(v.value)), 1),
5818
+ b("button", {
5810
5819
  class: "ud-btn edit-json-btn",
5811
5820
  title: "编辑对象",
5812
- onClick: (L) => m(v.key)
5821
+ onClick: (L) => p(v.key)
5813
5822
  }, " ✎ ", 8, va)
5814
5823
  ], 64)) : (R(), P(Pe, { key: 1 }, [
5815
- o.value ? (R(), P("div", Sa, " ⚠ " + ne(o.value), 1)) : Z("", !0),
5816
- k(C("textarea", {
5824
+ o.value ? (R(), P("div", Sa, " ⚠ " + B(o.value), 1)) : X("", !0),
5825
+ k(b("textarea", {
5817
5826
  "onUpdate:modelValue": y[2] || (y[2] = (L) => i.value = L),
5818
5827
  class: oe(["ud-json-textarea", { "has-error": o.value }]),
5819
5828
  rows: "3",
5820
5829
  onInput: f
5821
5830
  }, null, 34), [
5822
- [D, i.value]
5831
+ [O, i.value]
5823
5832
  ]),
5824
- C("div", Ta, [
5825
- C("button", {
5833
+ b("div", Ta, [
5834
+ b("button", {
5826
5835
  class: "ud-btn apply-btn",
5827
5836
  title: "应用修改",
5828
- onClick: (L) => g(v.key)
5837
+ onClick: (L) => m(v.key)
5829
5838
  }, " ✓ ", 8, Ma),
5830
- C("button", {
5839
+ b("button", {
5831
5840
  class: "ud-btn cancel-btn",
5832
5841
  title: "取消编辑",
5833
- onClick: p
5842
+ onClick: g
5834
5843
  }, " ✕ ")
5835
5844
  ])
5836
5845
  ], 64)),
@@ -5838,199 +5847,249 @@ const Zr = {
5838
5847
  key: 2,
5839
5848
  class: "ud-btn del-btn",
5840
5849
  title: "删除",
5841
- onClick: (L) => u(v.key)
5842
- }, " ✕ ", 8, wa)) : Z("", !0)
5843
- ], 64)) : Z("", !0)
5850
+ onClick: (L) => c(v.key)
5851
+ }, " ✕ ", 8, wa)) : X("", !0)
5852
+ ], 64)) : X("", !0)
5844
5853
  ], 2))), 128))
5845
5854
  ])) : (R(), P("div", Ra, "暂无自定义数据")),
5846
- C("button", {
5855
+ b("button", {
5847
5856
  class: "get-camera-btn",
5848
- onClick: I
5857
+ onClick: x
5849
5858
  }, " 添加当前相机位置 ")
5850
5859
  ])
5851
5860
  ]));
5852
5861
  }
5853
- }), ka = /* @__PURE__ */ Se(Ea, [["__scopeId", "data-v-4e117415"]]), Pa = { class: "datapanel-tab" }, La = { class: "property-group" }, Na = { class: "dp-section" }, Oa = { class: "dp-visibility-row" }, Da = { class: "dp-toggle" }, Wa = { class: "dp-visibility-text" }, ja = { class: "dp-section" }, Fa = { class: "dp-section" }, Ua = { class: "dp-size-row" }, Ha = { class: "dp-size-value" }, za = { class: "dp-section" }, Ga = { class: "dp-list" }, Ka = ["onUpdate:modelValue"], Ba = ["onUpdate:modelValue"], Za = ["onUpdate:modelValue"], Xa = ["onUpdate:modelValue"], qa = ["onClick"], Va = { class: "dp-add-row" }, Ja = /* @__PURE__ */ ve({
5862
+ }), ka = /* @__PURE__ */ Se(Ea, [["__scopeId", "data-v-4e117415"]]), Pa = { class: "datapanel-tab" }, La = { class: "property-group" }, Oa = { class: "dp-section" }, Na = { class: "dp-visibility-row" }, Da = { class: "dp-toggle" }, Wa = { class: "dp-visibility-text" }, ja = { class: "dp-section" }, Fa = { class: "dp-section" }, Ua = { class: "dp-size-row" }, Ha = { class: "dp-size-value" }, za = { class: "dp-section" }, Ga = { class: "dp-size-row" }, Ka = { class: "dp-size-value" }, Ba = { class: "dp-section" }, Za = { class: "dp-size-row" }, Xa = { class: "dp-size-value" }, qa = { class: "dp-section" }, Va = { class: "dp-list" }, Ja = ["onUpdate:modelValue"], Qa = ["onUpdate:modelValue"], Ya = ["onUpdate:modelValue"], _a = ["onUpdate:modelValue"], $a = ["onClick"], el = { class: "dp-add-row" }, tl = /* @__PURE__ */ ve({
5854
5863
  __name: "DataPanelTab",
5855
5864
  props: {
5856
5865
  selectedObject: {}
5857
5866
  },
5858
5867
  setup(r) {
5859
- const e = r, t = W(""), n = W([]), s = W(!0), i = W(0.1), o = W(""), a = W(""), l = W(""), A = W("");
5860
- let d = u(), c = !1;
5861
- function u() {
5862
- const g = e.selectedObject;
5863
- return g ? Ft(Wt(g)) : null;
5868
+ const e = r, t = N(""), n = N([]), s = N(!0), i = N(0.1), o = N(0), a = N(220), l = N(""), A = N(""), d = N(""), u = N("");
5869
+ let c = p(), h = !1;
5870
+ function p() {
5871
+ const x = e.selectedObject;
5872
+ return x ? Ft(Wt(x)) : null;
5864
5873
  }
5865
- be(s, (g) => {
5866
- c || !d || (d.visible = g);
5867
- }), be(i, (g) => {
5868
- c || !d || d.setOffsetY(g);
5874
+ le(s, (x) => {
5875
+ h || !c || (c.visible = x);
5876
+ }), le(a, (x) => {
5877
+ h || !c || c.setWidth(`${x}px`);
5878
+ }), le(o, (x) => {
5879
+ h || !c || c.setOffsetX(x);
5880
+ }), le(i, (x) => {
5881
+ h || !c || c.setOffsetY(x);
5869
5882
  });
5870
- function h() {
5871
- c || !d || (d.setTitle(t.value), d.setItems([...n.value]));
5883
+ function f() {
5884
+ h || !c || (c.setTitle(t.value), c.setItems([...n.value]));
5872
5885
  }
5873
- be(t, () => h()), be(n, () => h(), { deep: !0 });
5874
- function m(g) {
5875
- n.value = n.value.filter((p, I) => I !== g), h();
5886
+ le(t, () => f()), le(n, () => f(), { deep: !0 });
5887
+ function m(x) {
5888
+ n.value = n.value.filter((I, y) => y !== x), f();
5876
5889
  }
5877
- function f() {
5878
- !o.value.trim() || !a.value.trim() || (n.value = [
5890
+ function g() {
5891
+ !l.value.trim() || !A.value.trim() || (n.value = [
5879
5892
  ...n.value,
5880
5893
  {
5881
- label: o.value.trim(),
5882
- value: a.value.trim(),
5883
- unit: l.value.trim() || void 0,
5884
- code: A.value.trim() || void 0
5894
+ label: l.value.trim(),
5895
+ value: A.value.trim(),
5896
+ unit: d.value.trim() || void 0,
5897
+ code: u.value.trim() || void 0
5885
5898
  }
5886
- ], h(), o.value = "", a.value = "", l.value = "", A.value = "");
5899
+ ], f(), l.value = "", A.value = "", d.value = "", u.value = "");
5887
5900
  }
5888
- return be(
5901
+ return le(
5889
5902
  () => e.selectedObject,
5890
5903
  () => {
5891
- 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(() => {
5892
- c = !1;
5904
+ h = !0, c = p(), c ? (t.value = c.getTitle(), n.value = c.getItems(), s.value = c.visible, i.value = c.getOffsetY(), o.value = c.getOffsetX(), a.value = parseInt(c.getWidth()) || 220) : (t.value = "", n.value = [], s.value = !0, i.value = 0.1, o.value = 0, a.value = 220), l.value = "", A.value = "", d.value = "", u.value = "", setTimeout(() => {
5905
+ h = !1;
5893
5906
  }, 0);
5894
5907
  },
5895
5908
  { immediate: !0 }
5896
- ), (g, p) => (R(), P("div", Pa, [
5897
- C("div", La, [
5898
- p[14] || (p[14] = C("label", null, "📊 数据面板", -1)),
5899
- C("div", Na, [
5900
- p[8] || (p[8] = C("span", { class: "dp-label-sm" }, "可见性", -1)),
5901
- C("div", Oa, [
5902
- C("label", Da, [
5903
- k(C("input", {
5909
+ ), (x, I) => (R(), P("div", Pa, [
5910
+ b("div", La, [
5911
+ I[22] || (I[22] = b("label", null, "📊 数据面板", -1)),
5912
+ b("div", Oa, [
5913
+ I[10] || (I[10] = b("span", { class: "dp-label-sm" }, "可见性", -1)),
5914
+ b("div", Na, [
5915
+ b("label", Da, [
5916
+ k(b("input", {
5904
5917
  type: "checkbox",
5905
- "onUpdate:modelValue": p[0] || (p[0] = (I) => s.value = I)
5918
+ "onUpdate:modelValue": I[0] || (I[0] = (y) => s.value = y)
5906
5919
  }, null, 512), [
5907
5920
  [vn, s.value]
5908
5921
  ]),
5909
- p[7] || (p[7] = C("span", { class: "dp-toggle-slider" }, null, -1))
5922
+ I[9] || (I[9] = b("span", { class: "dp-toggle-slider" }, null, -1))
5910
5923
  ]),
5911
- C("span", Wa, ne(s.value ? "显示中" : "已隐藏"), 1)
5924
+ b("span", Wa, B(s.value ? "显示中" : "已隐藏"), 1)
5912
5925
  ])
5913
5926
  ]),
5914
- C("div", ja, [
5915
- p[9] || (p[9] = C("span", { class: "dp-label-sm" }, "标题", -1)),
5916
- k(C("input", {
5927
+ b("div", ja, [
5928
+ I[11] || (I[11] = b("span", { class: "dp-label-sm" }, "标题", -1)),
5929
+ k(b("input", {
5917
5930
  type: "text",
5918
5931
  class: "dp-input",
5919
- "onUpdate:modelValue": p[1] || (p[1] = (I) => t.value = I),
5932
+ "onUpdate:modelValue": I[1] || (I[1] = (y) => t.value = y),
5920
5933
  placeholder: "面板标题"
5921
5934
  }, null, 512), [
5922
- [D, t.value]
5935
+ [O, t.value]
5923
5936
  ])
5924
5937
  ]),
5925
- C("div", Fa, [
5926
- p[12] || (p[12] = C("span", { class: "dp-label-sm" }, "面板离模型距离", -1)),
5927
- C("div", Ua, [
5928
- p[10] || (p[10] = C("span", { class: "dp-range-label" }, "", -1)),
5929
- k(C("input", {
5938
+ b("div", Fa, [
5939
+ I[14] || (I[14] = b("span", { class: "dp-label-sm" }, "面板宽度", -1)),
5940
+ b("div", Ua, [
5941
+ I[12] || (I[12] = b("span", { class: "dp-range-label" }, "", -1)),
5942
+ k(b("input", {
5943
+ type: "range",
5944
+ class: "dp-range",
5945
+ min: "120",
5946
+ max: "600",
5947
+ step: "10",
5948
+ "onUpdate:modelValue": I[2] || (I[2] = (y) => a.value = y)
5949
+ }, null, 512), [
5950
+ [
5951
+ O,
5952
+ a.value,
5953
+ void 0,
5954
+ { number: !0 }
5955
+ ]
5956
+ ]),
5957
+ I[13] || (I[13] = b("span", { class: "dp-range-label" }, "宽", -1)),
5958
+ b("span", Ha, B(a.value), 1)
5959
+ ])
5960
+ ]),
5961
+ b("div", za, [
5962
+ I[17] || (I[17] = b("span", { class: "dp-label-sm" }, "面板左右位置", -1)),
5963
+ b("div", Ga, [
5964
+ I[15] || (I[15] = b("span", { class: "dp-range-label" }, "偏左", -1)),
5965
+ k(b("input", {
5966
+ type: "range",
5967
+ class: "dp-range",
5968
+ min: "-20",
5969
+ max: "20",
5970
+ step: "0.1",
5971
+ "onUpdate:modelValue": I[3] || (I[3] = (y) => o.value = y)
5972
+ }, null, 512), [
5973
+ [
5974
+ O,
5975
+ o.value,
5976
+ void 0,
5977
+ { number: !0 }
5978
+ ]
5979
+ ]),
5980
+ I[16] || (I[16] = b("span", { class: "dp-range-label" }, "偏右", -1)),
5981
+ b("span", Ka, B(o.value > 0 ? "+" : "") + B(o.value), 1)
5982
+ ])
5983
+ ]),
5984
+ b("div", Ba, [
5985
+ I[20] || (I[20] = b("span", { class: "dp-label-sm" }, "面板离模型距离", -1)),
5986
+ b("div", Za, [
5987
+ I[18] || (I[18] = b("span", { class: "dp-range-label" }, "近", -1)),
5988
+ k(b("input", {
5930
5989
  type: "range",
5931
5990
  class: "dp-range",
5932
5991
  min: "-0.5",
5933
5992
  max: "0.5",
5934
5993
  step: "0.01",
5935
- "onUpdate:modelValue": p[2] || (p[2] = (I) => i.value = I)
5994
+ "onUpdate:modelValue": I[4] || (I[4] = (y) => i.value = y)
5936
5995
  }, null, 512), [
5937
5996
  [
5938
- D,
5997
+ O,
5939
5998
  i.value,
5940
5999
  void 0,
5941
6000
  { number: !0 }
5942
6001
  ]
5943
6002
  ]),
5944
- p[11] || (p[11] = C("span", { class: "dp-range-label" }, "远", -1)),
5945
- C("span", Ha, ne((i.value * 100).toFixed(0)), 1)
6003
+ I[19] || (I[19] = b("span", { class: "dp-range-label" }, "远", -1)),
6004
+ b("span", Xa, B((i.value * 100).toFixed(0)), 1)
5946
6005
  ])
5947
6006
  ]),
5948
- C("div", za, [
5949
- p[13] || (p[13] = C("span", { class: "dp-label-sm" }, "数据项", -1)),
5950
- C("div", Ga, [
5951
- (R(!0), P(Pe, null, jt(n.value, (I, x) => (R(), P("div", {
5952
- key: x,
6007
+ b("div", qa, [
6008
+ I[21] || (I[21] = b("span", { class: "dp-label-sm" }, "数据项", -1)),
6009
+ b("div", Va, [
6010
+ (R(!0), P(Pe, null, jt(n.value, (y, v) => (R(), P("div", {
6011
+ key: v,
5953
6012
  class: "dp-item"
5954
6013
  }, [
5955
- k(C("input", {
6014
+ k(b("input", {
5956
6015
  type: "text",
5957
6016
  class: "dp-input dp-input-sm",
5958
- "onUpdate:modelValue": (y) => I.label = y,
6017
+ "onUpdate:modelValue": (S) => y.label = S,
5959
6018
  placeholder: "标签"
5960
- }, null, 8, Ka), [
5961
- [D, I.label]
6019
+ }, null, 8, Ja), [
6020
+ [O, y.label]
5962
6021
  ]),
5963
- k(C("input", {
6022
+ k(b("input", {
5964
6023
  type: "text",
5965
6024
  class: "dp-input dp-input-sm",
5966
- "onUpdate:modelValue": (y) => I.value = y,
6025
+ "onUpdate:modelValue": (S) => y.value = S,
5967
6026
  placeholder: "值"
5968
- }, null, 8, Ba), [
5969
- [D, I.value]
6027
+ }, null, 8, Qa), [
6028
+ [O, y.value]
5970
6029
  ]),
5971
- k(C("input", {
6030
+ k(b("input", {
5972
6031
  type: "text",
5973
6032
  class: "dp-input dp-input-xs",
5974
- "onUpdate:modelValue": (y) => I.unit = y,
6033
+ "onUpdate:modelValue": (S) => y.unit = S,
5975
6034
  placeholder: "单位"
5976
- }, null, 8, Za), [
5977
- [D, I.unit]
6035
+ }, null, 8, Ya), [
6036
+ [O, y.unit]
5978
6037
  ]),
5979
- k(C("input", {
6038
+ k(b("input", {
5980
6039
  type: "text",
5981
6040
  class: "dp-input dp-input-xs",
5982
- "onUpdate:modelValue": (y) => I.code = y,
6041
+ "onUpdate:modelValue": (S) => y.code = S,
5983
6042
  placeholder: "编码"
5984
- }, null, 8, Xa), [
5985
- [D, I.code]
6043
+ }, null, 8, _a), [
6044
+ [O, y.code]
5986
6045
  ]),
5987
- C("button", {
6046
+ b("button", {
5988
6047
  class: "dp-btn dp-btn-del",
5989
- onClick: (y) => m(x),
6048
+ onClick: (S) => m(v),
5990
6049
  title: "删除此项"
5991
- }, "✕", 8, qa)
6050
+ }, "✕", 8, $a)
5992
6051
  ]))), 128))
5993
6052
  ]),
5994
- C("div", Va, [
5995
- k(C("input", {
6053
+ b("div", el, [
6054
+ k(b("input", {
5996
6055
  type: "text",
5997
6056
  class: "dp-input dp-input-sm",
5998
- "onUpdate:modelValue": p[3] || (p[3] = (I) => o.value = I),
6057
+ "onUpdate:modelValue": I[5] || (I[5] = (y) => l.value = y),
5999
6058
  placeholder: "标签",
6000
- onKeyup: ze(f, ["enter"])
6059
+ onKeyup: ze(g, ["enter"])
6001
6060
  }, null, 544), [
6002
- [D, o.value]
6061
+ [O, l.value]
6003
6062
  ]),
6004
- k(C("input", {
6063
+ k(b("input", {
6005
6064
  type: "text",
6006
6065
  class: "dp-input dp-input-sm",
6007
- "onUpdate:modelValue": p[4] || (p[4] = (I) => a.value = I),
6066
+ "onUpdate:modelValue": I[6] || (I[6] = (y) => A.value = y),
6008
6067
  placeholder: "值",
6009
- onKeyup: ze(f, ["enter"])
6068
+ onKeyup: ze(g, ["enter"])
6010
6069
  }, null, 544), [
6011
- [D, a.value]
6070
+ [O, A.value]
6012
6071
  ]),
6013
- k(C("input", {
6072
+ k(b("input", {
6014
6073
  type: "text",
6015
6074
  class: "dp-input dp-input-xs",
6016
- "onUpdate:modelValue": p[5] || (p[5] = (I) => l.value = I),
6075
+ "onUpdate:modelValue": I[7] || (I[7] = (y) => d.value = y),
6017
6076
  placeholder: "单位",
6018
- onKeyup: ze(f, ["enter"])
6077
+ onKeyup: ze(g, ["enter"])
6019
6078
  }, null, 544), [
6020
- [D, l.value]
6079
+ [O, d.value]
6021
6080
  ]),
6022
- k(C("input", {
6081
+ k(b("input", {
6023
6082
  type: "text",
6024
6083
  class: "dp-input dp-input-xs",
6025
- "onUpdate:modelValue": p[6] || (p[6] = (I) => A.value = I),
6084
+ "onUpdate:modelValue": I[8] || (I[8] = (y) => u.value = y),
6026
6085
  placeholder: "编码",
6027
- onKeyup: ze(f, ["enter"])
6086
+ onKeyup: ze(g, ["enter"])
6028
6087
  }, null, 544), [
6029
- [D, A.value]
6088
+ [O, u.value]
6030
6089
  ]),
6031
- C("button", {
6090
+ b("button", {
6032
6091
  class: "dp-btn dp-btn-add",
6033
- onClick: f,
6092
+ onClick: g,
6034
6093
  title: "添加"
6035
6094
  }, "+")
6036
6095
  ])
@@ -6038,9 +6097,9 @@ const Zr = {
6038
6097
  ])
6039
6098
  ]));
6040
6099
  }
6041
- }), Qa = /* @__PURE__ */ Se(Ja, [["__scopeId", "data-v-0e6261f3"]]);
6042
- function Ya(r) {
6043
- const e = W(/* @__PURE__ */ new Set()), t = (s) => {
6100
+ }), sl = /* @__PURE__ */ Se(tl, [["__scopeId", "data-v-1badeb81"]]);
6101
+ function nl(r) {
6102
+ const e = N(/* @__PURE__ */ new Set()), t = (s) => {
6044
6103
  const i = new Set(e.value);
6045
6104
  i.has(s) ? i.delete(s) : i.add(s), e.value = i;
6046
6105
  }, n = (s) => {
@@ -6051,7 +6110,7 @@ function Ya(r) {
6051
6110
  i.add(o.uuid), o = o.parent;
6052
6111
  e.value = i;
6053
6112
  };
6054
- return be(
6113
+ return le(
6055
6114
  r,
6056
6115
  (s) => {
6057
6116
  s && n(s);
@@ -6059,22 +6118,22 @@ function Ya(r) {
6059
6118
  { immediate: !0 }
6060
6119
  ), { expandedSet: e, toggleExpand: t };
6061
6120
  }
6062
- const _a = {
6121
+ const il = {
6063
6122
  key: 0,
6064
6123
  class: "property-panel"
6065
- }, $a = { class: "property-group tree-group" }, el = { class: "tree-container" }, tl = {
6124
+ }, ol = { class: "property-group tree-group" }, rl = { class: "tree-container" }, al = {
6066
6125
  key: 0,
6067
6126
  class: "tree-empty"
6068
- }, sl = { class: "property-group" }, nl = { class: "transform-mode-row" }, il = {
6127
+ }, ll = { class: "property-group" }, Al = { class: "transform-mode-row" }, cl = {
6069
6128
  key: 0,
6070
6129
  class: "tabs"
6071
- }, ol = {
6130
+ }, ul = {
6072
6131
  key: 1,
6073
6132
  class: "tab-content"
6074
- }, rl = {
6133
+ }, dl = {
6075
6134
  key: 1,
6076
6135
  class: "property-panel empty"
6077
- }, al = /* @__PURE__ */ ve({
6136
+ }, hl = /* @__PURE__ */ ve({
6078
6137
  __name: "index",
6079
6138
  props: {
6080
6139
  transform: {},
@@ -6083,137 +6142,137 @@ const _a = {
6083
6142
  },
6084
6143
  emits: ["propertyChange", "treeSelect", "treeDelete", "transformModeChange"],
6085
6144
  setup(r, { emit: e }) {
6086
- const t = r, n = e, s = W("translate");
6087
- function i(m) {
6088
- s.value = m, n("transformModeChange", m);
6145
+ const t = r, n = e, s = N("translate");
6146
+ function i(p) {
6147
+ s.value = p, n("transformModeChange", p);
6089
6148
  }
6090
- const o = () => n("propertyChange"), a = W("transform"), l = $e(() => {
6091
- var m;
6092
- return !!(t.selectedObject && ((m = t.selectedObject.userData) != null && m._hasDataPanel));
6093
- }), A = W(0), d = Sn(t, "selectedObject"), { expandedSet: c, toggleExpand: u } = Ya(d);
6094
- Tn("treeExpand", { expandedSet: c, toggleExpand: u });
6095
- const h = (m) => {
6096
- A.value++, n("treeDelete", m);
6149
+ const o = () => n("propertyChange"), a = N("transform"), l = $e(() => {
6150
+ var p;
6151
+ return !!(t.selectedObject && ((p = t.selectedObject.userData) != null && p._hasDataPanel));
6152
+ }), A = N(0), d = Sn(t, "selectedObject"), { expandedSet: u, toggleExpand: c } = nl(d);
6153
+ Tn("treeExpand", { expandedSet: u, toggleExpand: c });
6154
+ const h = (p) => {
6155
+ A.value++, n("treeDelete", p);
6097
6156
  };
6098
- return (m, f) => m.transform ? (R(), P("div", _a, [
6099
- C("div", $a, [
6100
- f[7] || (f[7] = C("label", null, "场景物体", -1)),
6101
- C("div", el, [
6102
- (R(!0), P(Pe, null, jt(m.treeData, (g) => (R(), nt(Qr, {
6103
- key: g.uuid,
6104
- node: g,
6105
- "selected-object": m.selectedObject,
6157
+ return (p, f) => p.transform ? (R(), P("div", il, [
6158
+ b("div", ol, [
6159
+ f[7] || (f[7] = b("label", null, "场景物体", -1)),
6160
+ b("div", rl, [
6161
+ (R(!0), P(Pe, null, jt(p.treeData, (m) => (R(), nt(Qr, {
6162
+ key: m.uuid,
6163
+ node: m,
6164
+ "selected-object": p.selectedObject,
6106
6165
  version: A.value,
6107
- onSelect: f[0] || (f[0] = (p) => n("treeSelect", p)),
6166
+ onSelect: f[0] || (f[0] = (g) => n("treeSelect", g)),
6108
6167
  onDelete: h
6109
6168
  }, null, 8, ["node", "selected-object", "version"]))), 128)),
6110
- m.treeData.length === 0 ? (R(), P("div", tl, "暂无物体")) : Z("", !0)
6169
+ p.treeData.length === 0 ? (R(), P("div", al, "暂无物体")) : X("", !0)
6111
6170
  ])
6112
6171
  ]),
6113
- C("div", sl, [
6114
- f[8] || (f[8] = C("label", null, "全局属性", -1)),
6115
- C("div", nl, [
6116
- C("button", {
6172
+ b("div", ll, [
6173
+ f[8] || (f[8] = b("label", null, "全局属性", -1)),
6174
+ b("div", Al, [
6175
+ b("button", {
6117
6176
  class: oe(["mode-btn", { active: s.value === "translate" }]),
6118
6177
  title: "移动 (W)",
6119
- onClick: f[1] || (f[1] = (g) => i("translate"))
6178
+ onClick: f[1] || (f[1] = (m) => i("translate"))
6120
6179
  }, " ↕ 移动 ", 2),
6121
- C("button", {
6180
+ b("button", {
6122
6181
  class: oe(["mode-btn", { active: s.value === "rotate" }]),
6123
6182
  title: "旋转 (E)",
6124
- onClick: f[2] || (f[2] = (g) => i("rotate"))
6183
+ onClick: f[2] || (f[2] = (m) => i("rotate"))
6125
6184
  }, " ↻ 旋转 ", 2),
6126
- C("button", {
6185
+ b("button", {
6127
6186
  class: oe(["mode-btn", { active: s.value === "scale" }]),
6128
6187
  title: "缩放 (R)",
6129
- onClick: f[3] || (f[3] = (g) => i("scale"))
6188
+ onClick: f[3] || (f[3] = (m) => i("scale"))
6130
6189
  }, " ⤡ 缩放 ", 2)
6131
6190
  ])
6132
6191
  ]),
6133
- m.selectedObject ? (R(), P("div", il, [
6134
- C("button", {
6192
+ p.selectedObject ? (R(), P("div", cl, [
6193
+ b("button", {
6135
6194
  class: oe(["tab-btn", { active: a.value === "transform" }]),
6136
- onClick: f[4] || (f[4] = (g) => a.value = "transform")
6195
+ onClick: f[4] || (f[4] = (m) => a.value = "transform")
6137
6196
  }, " 🔄 变换 ", 2),
6138
- C("button", {
6197
+ b("button", {
6139
6198
  class: oe(["tab-btn", { active: a.value === "userdata" }]),
6140
- onClick: f[5] || (f[5] = (g) => a.value = "userdata")
6199
+ onClick: f[5] || (f[5] = (m) => a.value = "userdata")
6141
6200
  }, " 📋 自定义数据 ", 2),
6142
6201
  l.value ? (R(), P("button", {
6143
6202
  key: 0,
6144
6203
  class: oe(["tab-btn", { active: a.value === "datapanel" }]),
6145
- onClick: f[6] || (f[6] = (g) => a.value = "datapanel")
6146
- }, " 📊 数据面板 ", 2)) : Z("", !0)
6147
- ])) : Z("", !0),
6148
- m.selectedObject ? (R(), P("div", ol, [
6204
+ onClick: f[6] || (f[6] = (m) => a.value = "datapanel")
6205
+ }, " 📊 数据面板 ", 2)) : X("", !0)
6206
+ ])) : X("", !0),
6207
+ p.selectedObject ? (R(), P("div", ul, [
6149
6208
  k(zt(fa, {
6150
- transform: m.transform,
6151
- "selected-object": m.selectedObject,
6209
+ transform: p.transform,
6210
+ "selected-object": p.selectedObject,
6152
6211
  onPropertyChange: o
6153
6212
  }, null, 8, ["transform", "selected-object"]), [
6154
6213
  [Le, a.value === "transform"]
6155
6214
  ]),
6156
- k(zt(ka, { "selected-object": m.selectedObject }, null, 8, ["selected-object"]), [
6215
+ k(zt(ka, { "selected-object": p.selectedObject }, null, 8, ["selected-object"]), [
6157
6216
  [Le, a.value === "userdata"]
6158
6217
  ]),
6159
- k(zt(Qa, { "selected-object": m.selectedObject }, null, 8, ["selected-object"]), [
6218
+ k(zt(sl, { "selected-object": p.selectedObject }, null, 8, ["selected-object"]), [
6160
6219
  [Le, a.value === "datapanel"]
6161
6220
  ])
6162
- ])) : Z("", !0)
6163
- ])) : (R(), P("div", rl, f[9] || (f[9] = [
6164
- C("p", null, "未选中任何模型", -1)
6221
+ ])) : X("", !0)
6222
+ ])) : (R(), P("div", dl, f[9] || (f[9] = [
6223
+ b("p", null, "未选中任何模型", -1)
6165
6224
  ])));
6166
6225
  }
6167
- }), ll = /* @__PURE__ */ Se(al, [["__scopeId", "data-v-c92c9fa7"]]), Al = { class: "top-bar" }, cl = { class: "left-section" }, ul = { class: "dropdown-menu" }, dl = { class: "dropdown-menu sub-menu" }, hl = { class: "dropdown-menu sub-menu" }, fl = { class: "dropdown-menu" }, pl = /* @__PURE__ */ ve({
6226
+ }), fl = /* @__PURE__ */ Se(hl, [["__scopeId", "data-v-c92c9fa7"]]), pl = { class: "top-bar" }, ml = { class: "left-section" }, gl = { class: "dropdown-menu" }, bl = { class: "dropdown-menu sub-menu" }, Cl = { class: "dropdown-menu sub-menu" }, Il = { class: "dropdown-menu" }, yl = /* @__PURE__ */ ve({
6168
6227
  __name: "TopBar",
6169
6228
  emits: ["addModel", "importModel"],
6170
6229
  setup(r, { emit: e }) {
6171
- const t = W(!1), n = W(!1), s = W(!1), i = W(!1), o = e, a = W(null), l = () => {
6230
+ const t = N(!1), n = N(!1), s = N(!1), i = N(!1), o = e, a = N(null), l = () => {
6172
6231
  var f;
6173
6232
  return (f = a.value) == null ? void 0 : f.click();
6174
6233
  }, A = (f) => {
6175
- const g = f.target;
6176
- g.files && g.files.length > 0 && (o("importModel", g.files[0]), g.value = "");
6177
- }, d = () => console.log("撤销"), c = () => console.log("删除物体"), u = async () => {
6234
+ const m = f.target;
6235
+ m.files && m.files.length > 0 && (o("importModel", m.files[0]), m.value = "");
6236
+ }, d = () => console.log("撤销"), u = () => console.log("删除物体"), c = async () => {
6178
6237
  const f = Zo();
6179
6238
  console.log(JSON.parse(await f));
6180
6239
  }, h = () => {
6181
6240
  if (!localStorage.getItem("test_id")) return localStorage.setItem("test_id", "123");
6182
6241
  cn(localStorage.getItem("test_id"));
6183
- }, m = () => an();
6184
- return (f, g) => (R(), P("div", Al, [
6185
- C("div", cl, [
6186
- C("div", {
6242
+ }, p = () => an();
6243
+ return (f, m) => (R(), P("div", pl, [
6244
+ b("div", ml, [
6245
+ b("div", {
6187
6246
  class: "dropdown-wrapper",
6188
- onMouseenter: g[9] || (g[9] = (p) => n.value = !0),
6189
- onMouseleave: g[10] || (g[10] = (p) => n.value = !1)
6247
+ onMouseenter: m[9] || (m[9] = (g) => n.value = !0),
6248
+ onMouseleave: m[10] || (m[10] = (g) => n.value = !1)
6190
6249
  }, [
6191
- g[15] || (g[15] = C("button", { class: "menu-btn" }, "添加", -1)),
6192
- k(C("div", ul, [
6193
- C("div", {
6250
+ m[15] || (m[15] = b("button", { class: "menu-btn" }, "添加", -1)),
6251
+ k(b("div", gl, [
6252
+ b("div", {
6194
6253
  class: "menu-item",
6195
6254
  onClick: d
6196
6255
  }, "组"),
6197
- C("div", {
6256
+ b("div", {
6198
6257
  class: "menu-item dropdown-wrapper sub-trigger",
6199
- onMouseenter: g[3] || (g[3] = (p) => s.value = !0),
6200
- onMouseleave: g[4] || (g[4] = (p) => s.value = !1)
6258
+ onMouseenter: m[3] || (m[3] = (g) => s.value = !0),
6259
+ onMouseleave: m[4] || (m[4] = (g) => s.value = !1)
6201
6260
  }, [
6202
- g[13] || (g[13] = C("span", null, "网格", -1)),
6203
- k(C("div", dl, [
6204
- C("div", {
6261
+ m[13] || (m[13] = b("span", null, "网格", -1)),
6262
+ k(b("div", bl, [
6263
+ b("div", {
6205
6264
  class: "menu-item",
6206
- onClick: g[0] || (g[0] = (p) => o("addModel", "box"))
6265
+ onClick: m[0] || (m[0] = (g) => o("addModel", "box"))
6207
6266
  }, " 正方体 "),
6208
- C("div", {
6267
+ b("div", {
6209
6268
  class: "menu-item",
6210
- onClick: g[1] || (g[1] = (p) => o("addModel", "sphere"))
6269
+ onClick: m[1] || (m[1] = (g) => o("addModel", "sphere"))
6211
6270
  }, " 球体 "),
6212
- C("div", {
6271
+ b("div", {
6213
6272
  class: "menu-item",
6214
- onClick: g[2] || (g[2] = (p) => o("addModel", "waterPlane"))
6273
+ onClick: m[2] || (m[2] = (g) => o("addModel", "waterPlane"))
6215
6274
  }, " 水面 "),
6216
- C("div", {
6275
+ b("div", {
6217
6276
  class: "menu-item",
6218
6277
  onClick: l
6219
6278
  }, "导入")
@@ -6221,61 +6280,61 @@ const _a = {
6221
6280
  [Le, s.value]
6222
6281
  ])
6223
6282
  ], 32),
6224
- C("div", {
6283
+ b("div", {
6225
6284
  class: "menu-item dropdown-wrapper sub-trigger",
6226
- onMouseenter: g[6] || (g[6] = (p) => i.value = !0),
6227
- onMouseleave: g[7] || (g[7] = (p) => i.value = !1)
6285
+ onMouseenter: m[6] || (m[6] = (g) => i.value = !0),
6286
+ onMouseleave: m[7] || (m[7] = (g) => i.value = !1)
6228
6287
  }, [
6229
- g[14] || (g[14] = C("span", null, "光源", -1)),
6230
- k(C("div", hl, [
6231
- C("div", {
6288
+ m[14] || (m[14] = b("span", null, "光源", -1)),
6289
+ k(b("div", Cl, [
6290
+ b("div", {
6232
6291
  class: "menu-item",
6233
- onClick: g[5] || (g[5] = (p) => o("addModel", "directionalLight"))
6292
+ onClick: m[5] || (m[5] = (g) => o("addModel", "directionalLight"))
6234
6293
  }, " 平行光 ")
6235
6294
  ], 512), [
6236
6295
  [Le, i.value]
6237
6296
  ])
6238
6297
  ], 32),
6239
- C("div", {
6298
+ b("div", {
6240
6299
  class: "menu-item",
6241
- onClick: c
6300
+ onClick: u
6242
6301
  }, "摄像机"),
6243
- C("div", {
6302
+ b("div", {
6244
6303
  class: "menu-item",
6245
- onClick: g[8] || (g[8] = (p) => o("addModel", "dataPanel"))
6304
+ onClick: m[8] || (m[8] = (g) => o("addModel", "dataPanel"))
6246
6305
  }, " 数据面板 ")
6247
6306
  ], 512), [
6248
6307
  [Le, n.value]
6249
6308
  ])
6250
6309
  ], 32),
6251
- C("div", {
6310
+ b("div", {
6252
6311
  class: "dropdown-wrapper",
6253
- onMouseenter: g[11] || (g[11] = (p) => t.value = !0),
6254
- onMouseleave: g[12] || (g[12] = (p) => t.value = !1)
6312
+ onMouseenter: m[11] || (m[11] = (g) => t.value = !0),
6313
+ onMouseleave: m[12] || (m[12] = (g) => t.value = !1)
6255
6314
  }, [
6256
- g[16] || (g[16] = C("button", { class: "menu-btn" }, "帮助", -1)),
6257
- k(C("div", fl, [
6258
- C("div", {
6315
+ m[16] || (m[16] = b("button", { class: "menu-btn" }, "帮助", -1)),
6316
+ k(b("div", Il, [
6317
+ b("div", {
6259
6318
  class: "menu-item",
6260
- onClick: u
6319
+ onClick: c
6261
6320
  }, "获取场景"),
6262
- C("div", {
6321
+ b("div", {
6263
6322
  class: "menu-item",
6264
6323
  onClick: h
6265
6324
  }, "镜头拉近"),
6266
- C("div", {
6325
+ b("div", {
6267
6326
  class: "menu-item",
6268
- onClick: m
6327
+ onClick: p
6269
6328
  }, " 重置相机位置 ")
6270
6329
  ], 512), [
6271
6330
  [Le, t.value]
6272
6331
  ])
6273
6332
  ], 32)
6274
6333
  ]),
6275
- g[17] || (g[17] = C("div", { class: "right-section" }, [
6276
- C("span", { class: "app-title" }, "3D 模型编辑器")
6334
+ m[17] || (m[17] = b("div", { class: "right-section" }, [
6335
+ b("span", { class: "app-title" }, "3D 模型编辑器")
6277
6336
  ], -1)),
6278
- C("input", {
6337
+ b("input", {
6279
6338
  type: "file",
6280
6339
  ref_key: "fileInput",
6281
6340
  ref: a,
@@ -6285,120 +6344,120 @@ const _a = {
6285
6344
  }, null, 544)
6286
6345
  ]));
6287
6346
  }
6288
- }), ml = /* @__PURE__ */ Se(pl, [["__scopeId", "data-v-45df3361"]]), gl = { class: "bottom-bar" }, bl = /* @__PURE__ */ ve({
6347
+ }), xl = /* @__PURE__ */ Se(yl, [["__scopeId", "data-v-45df3361"]]), vl = { class: "bottom-bar" }, Sl = /* @__PURE__ */ ve({
6289
6348
  __name: "BottomBar",
6290
6349
  setup(r) {
6291
- return (e, t) => (R(), P("div", gl, t[0] || (t[0] = [
6292
- C("div", { class: "status-left" }, [
6293
- C("span", null, "就绪")
6350
+ return (e, t) => (R(), P("div", vl, t[0] || (t[0] = [
6351
+ b("div", { class: "status-left" }, [
6352
+ b("span", null, "就绪")
6294
6353
  ], -1),
6295
- C("div", { class: "status-right" }, [
6296
- C("span", null, "顶点: 0 | 面: 0")
6354
+ b("div", { class: "status-right" }, [
6355
+ b("span", null, "顶点: 0 | 面: 0")
6297
6356
  ], -1)
6298
6357
  ])));
6299
6358
  }
6300
- }), Cl = /* @__PURE__ */ Se(bl, [["__scopeId", "data-v-3427bb27"]]), Il = { class: "app-layout" }, yl = {
6359
+ }), Tl = /* @__PURE__ */ Se(Sl, [["__scopeId", "data-v-3427bb27"]]), Ml = { class: "app-layout" }, wl = {
6301
6360
  key: 0,
6302
6361
  class: "loading-overlay"
6303
- }, xl = /* @__PURE__ */ ve({
6362
+ }, Rl = /* @__PURE__ */ ve({
6304
6363
  __name: "DrawingBoard",
6305
6364
  props: {
6306
6365
  mode: { default: "edit" },
6307
6366
  sceneData: { default: null }
6308
6367
  },
6309
6368
  setup(r) {
6310
- const e = r, t = W(!1);
6311
- To((p) => {
6312
- t.value = p;
6369
+ const e = r, t = N(!1);
6370
+ To((g) => {
6371
+ t.value = g;
6313
6372
  });
6314
6373
  const n = ms(null), s = _t({
6315
6374
  position: { x: 0, y: 0, z: 0 },
6316
6375
  rotation: { x: 0, y: 0, z: 0 },
6317
6376
  scale: { x: 1, y: 1, z: 1 }
6318
- }), i = (p) => {
6319
- s.position.x = Number(p.position.x.toFixed(3)), s.position.y = Number(p.position.y.toFixed(3)), s.position.z = Number(p.position.z.toFixed(3)), s.rotation.x = Number(p.rotation.x.toFixed(3)), s.rotation.y = Number(p.rotation.y.toFixed(3)), s.rotation.z = Number(p.rotation.z.toFixed(3)), s.scale.x = Number(p.scale.x.toFixed(3)), s.scale.y = Number(p.scale.y.toFixed(3)), s.scale.z = Number(p.scale.z.toFixed(3));
6320
- }, o = (p) => {
6321
- p.position.set(
6377
+ }), i = (g) => {
6378
+ s.position.x = Number(g.position.x.toFixed(3)), s.position.y = Number(g.position.y.toFixed(3)), s.position.z = Number(g.position.z.toFixed(3)), s.rotation.x = Number(g.rotation.x.toFixed(3)), s.rotation.y = Number(g.rotation.y.toFixed(3)), s.rotation.z = Number(g.rotation.z.toFixed(3)), s.scale.x = Number(g.scale.x.toFixed(3)), s.scale.y = Number(g.scale.y.toFixed(3)), s.scale.z = Number(g.scale.z.toFixed(3));
6379
+ }, o = (g) => {
6380
+ g.position.set(
6322
6381
  s.position.x,
6323
6382
  s.position.y,
6324
6383
  s.position.z
6325
- ), p.rotation.set(
6384
+ ), g.rotation.set(
6326
6385
  s.rotation.x,
6327
6386
  s.rotation.y,
6328
6387
  s.rotation.z
6329
- ), p.scale.set(s.scale.x, s.scale.y, s.scale.z);
6388
+ ), g.scale.set(s.scale.x, s.scale.y, s.scale.z);
6330
6389
  };
6331
- Uo((p) => {
6332
- n.value = p, p && i(p);
6333
- }), Ho((p) => {
6334
- i(p);
6390
+ Uo((g) => {
6391
+ n.value = g, g && i(g);
6392
+ }), Ho((g) => {
6393
+ i(g);
6335
6394
  });
6336
6395
  const a = () => {
6337
6396
  if (n.value && (o(n.value), n.value.type === "DirectionalLight")) {
6338
- const p = n.value.userData.helper;
6339
- p && typeof p.update == "function" && p.update();
6397
+ const g = n.value.userData.helper;
6398
+ g && typeof g.update == "function" && g.update();
6340
6399
  }
6341
- }, l = (p) => Br(p), A = async (p) => {
6400
+ }, l = (g) => Br(g), A = async (g) => {
6342
6401
  try {
6343
- await Kr(p);
6344
- } catch (I) {
6345
- console.error("导入失败:", I), alert("导入失败:" + I.message);
6402
+ await Kr(g);
6403
+ } catch (x) {
6404
+ console.error("导入失败:", x), alert("导入失败:" + x.message);
6346
6405
  }
6347
6406
  }, d = ms([]);
6348
- zo((p) => {
6349
- d.value = p;
6407
+ zo((g) => {
6408
+ d.value = g;
6350
6409
  });
6351
- const c = () => {
6352
- const p = Go();
6353
- p && (d.value = p);
6354
- }, u = (p) => ds(p), h = (p) => Do(p.uuid), m = (p) => {
6355
- Mo(p);
6356
- }, f = W(null), g = () => {
6357
- f.value && fo(f.value, e.mode, e.sceneData), c();
6410
+ const u = () => {
6411
+ const g = Go();
6412
+ g && (d.value = g);
6413
+ }, c = (g) => ds(g), h = (g) => Do(g.uuid), p = (g) => {
6414
+ Mo(g);
6415
+ }, f = N(null), m = () => {
6416
+ f.value && fo(f.value, e.mode, e.sceneData), u();
6358
6417
  };
6359
6418
  return Mn(() => {
6360
- g(), f.value && lo(f.value);
6419
+ m(), f.value && lo(f.value);
6361
6420
  }), wn(() => {
6362
6421
  console.log("endset_three_editor destroy"), qo();
6363
- }), (p, I) => (R(), P("div", Il, [
6364
- t.value ? (R(), P("div", yl, I[0] || (I[0] = [
6365
- C("div", { class: "loading-spinner" }, null, -1),
6366
- C("div", { class: "loading-text" }, "加载中...", -1)
6367
- ]))) : Z("", !0),
6368
- p.mode === "edit" ? (R(), nt(ml, {
6422
+ }), (g, x) => (R(), P("div", Ml, [
6423
+ t.value ? (R(), P("div", wl, x[0] || (x[0] = [
6424
+ b("div", { class: "loading-spinner" }, null, -1),
6425
+ b("div", { class: "loading-text" }, "加载中...", -1)
6426
+ ]))) : X("", !0),
6427
+ g.mode === "edit" ? (R(), nt(xl, {
6369
6428
  key: 1,
6370
6429
  onAddModel: l,
6371
6430
  onImportModel: A
6372
- })) : Z("", !0),
6373
- C("div", {
6374
- class: oe(`editor-container editor-container-mode-${p.mode}`)
6431
+ })) : X("", !0),
6432
+ b("div", {
6433
+ class: oe(`editor-container editor-container-mode-${g.mode}`)
6375
6434
  }, [
6376
- C("div", {
6377
- class: oe(`canvas canvas-mode-${p.mode}`),
6435
+ b("div", {
6436
+ class: oe(`canvas canvas-mode-${g.mode}`),
6378
6437
  ref_key: "containerRef",
6379
6438
  ref: f
6380
6439
  }, null, 2),
6381
- p.mode === "edit" ? (R(), nt(ll, {
6440
+ g.mode === "edit" ? (R(), nt(fl, {
6382
6441
  key: 0,
6383
6442
  transform: s,
6384
6443
  "tree-data": d.value,
6385
6444
  "selected-object": n.value,
6386
6445
  onPropertyChange: a,
6387
- onTreeSelect: u,
6446
+ onTreeSelect: c,
6388
6447
  onTreeDelete: h,
6389
- onTransformModeChange: m
6390
- }, null, 8, ["transform", "tree-data", "selected-object"])) : Z("", !0)
6448
+ onTransformModeChange: p
6449
+ }, null, 8, ["transform", "tree-data", "selected-object"])) : X("", !0)
6391
6450
  ], 2),
6392
- p.mode === "edit" ? (R(), nt(Cl, { key: 2 })) : Z("", !0)
6451
+ g.mode === "edit" ? (R(), nt(Tl, { key: 2 })) : X("", !0)
6393
6452
  ]));
6394
6453
  }
6395
- }), Pl = /* @__PURE__ */ Se(xl, [["__scopeId", "data-v-b3d90c56"]]);
6454
+ }), jl = /* @__PURE__ */ Se(Rl, [["__scopeId", "data-v-b3d90c56"]]);
6396
6455
  export {
6397
- Cl as BottomBar,
6456
+ Tl as BottomBar,
6398
6457
  dt as DataPanel,
6399
- Pl as DrawingBoard,
6400
- ll as PropertyPanel,
6401
- ml as TopBar,
6458
+ jl as DrawingBoard,
6459
+ fl as PropertyPanel,
6460
+ xl as TopBar,
6402
6461
  Qr as TreeItem,
6403
6462
  Fr as addBox,
6404
6463
  Gr as addDataPanel,
@@ -6412,11 +6471,11 @@ export {
6412
6471
  uo as disposeCSS2DRenderer,
6413
6472
  Zo as exportSceneToJSON,
6414
6473
  Eo as focusOnObject,
6415
- wl as getCSS2DRenderer,
6474
+ Ol as getCSS2DRenderer,
6416
6475
  Bo as getCamera,
6417
6476
  Ft as getDataPanel,
6418
- kl as getRenderer,
6419
- El as getScene,
6477
+ Wl as getRenderer,
6478
+ Dl as getScene,
6420
6479
  Go as getSceneObjects,
6421
6480
  Ko as getSelectedObject,
6422
6481
  Kr as importModelFromFile,
@@ -6426,7 +6485,7 @@ export {
6426
6485
  zo as onSceneObjectsChangeCallback,
6427
6486
  Lo as registerModelDataPanel,
6428
6487
  ao as removeDataPanel,
6429
- Oo as removeModel,
6488
+ No as removeModel,
6430
6489
  Do as removeModelById,
6431
6490
  Ao as renderCSS2D,
6432
6491
  co as resizeCSS2DRenderer,
@@ -6437,7 +6496,7 @@ export {
6437
6496
  Uo as setSelectedObjectCallback,
6438
6497
  Ho as setTransformChangeCallback,
6439
6498
  Mo as setTransformMode,
6440
- Rl as updateDataPanelValue,
6441
- Ya as useTreeExpand
6499
+ Nl as updateDataPanelValue,
6500
+ nl as useTreeExpand
6442
6501
  };
6443
6502
  //# sourceMappingURL=three-editor.es.js.map