endset_three_editor 0.4.9 → 0.5.0

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
- var $n = Object.defineProperty;
2
- var es = (r, e, t) => e in r ? $n(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var Re = (r, e, t) => es(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { toRaw as vt, defineComponent as be, ref as j, inject as ts, computed as Ue, watchEffect as ns, resolveComponent as ss, openBlock as T, createElementBlock as R, createElementVNode as b, normalizeClass as se, withModifiers as Wt, unref as is, toDisplayString as ie, Fragment as ve, renderList as Mt, createBlock as Ze, createCommentVNode as X, reactive as zt, watch as Me, withDirectives as E, vModelText as N, withKeys as He, vModelCheckbox as os, toRef as rs, provide as as, createVNode as Tt, vShow as De, shallowRef as nn, onMounted as ls, onBeforeUnmount as cs } from "vue";
1
+ var es = Object.defineProperty;
2
+ var ts = (r, e, t) => e in r ? es(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var Re = (r, e, t) => ts(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { toRaw as vt, defineComponent as be, ref as j, inject as ns, computed as Ue, watchEffect as ss, resolveComponent as is, openBlock as T, createElementBlock as R, createElementVNode as b, normalizeClass as se, withModifiers as Wt, unref as os, toDisplayString as ie, Fragment as ve, renderList as Mt, createBlock as Ze, createCommentVNode as X, reactive as zt, watch as Me, withDirectives as E, vModelText as N, withKeys as He, vModelCheckbox as rs, toRef as as, provide as ls, createVNode as Tt, vShow as De, shallowRef as nn, onMounted as cs, onBeforeUnmount as us } from "vue";
5
5
  import * as P from "three";
6
- import { Controls as Sn, Vector3 as M, MOUSE as Ne, TOUCH as Le, Quaternion as K, Spherical as sn, Vector2 as Y, Ray as us, Plane as As, MathUtils as Hn, Raycaster as ds, Object3D as ke, MeshBasicMaterial as Pe, LineBasicMaterial as Qe, CylinderGeometry as U, BoxGeometry as q, BufferGeometry as We, Float32BufferAttribute as pe, Mesh as v, OctahedronGeometry as ut, Line as ue, TorusGeometry as Ge, SphereGeometry as hs, Euler as fs, Matrix4 as me, PlaneGeometry as ps, DoubleSide as Ln, Loader as Zt, FileLoader as nt, Color as de, SRGBColorSpace as Ae, Group as mt, Material as Je, PointsMaterial as Ve, MeshPhongMaterial as ms, LineSegments as Gt, Points as gt, TrianglesDrawMode as gs, TriangleFanDrawMode as Ft, TriangleStripDrawMode as Nn, LoaderUtils as _e, MeshPhysicalMaterial as le, LinearSRGBColorSpace as ae, SpotLight as bs, PointLight as Is, DirectionalLight as ys, InstancedMesh as Cs, InstancedBufferAttribute as xs, TextureLoader as ws, ImageBitmapLoader as vs, BufferAttribute as $e, InterleavedBuffer as jn, InterleavedBufferAttribute as kn, LinearMipmapLinearFilter as Wn, NearestMipmapLinearFilter as Ms, LinearMipmapNearestFilter as Ds, NearestMipmapNearestFilter as Ps, LinearFilter as qt, NearestFilter as zn, RepeatWrapping as Xt, MirroredRepeatWrapping as Ts, ClampToEdgeWrapping as Os, MeshStandardMaterial as Gn, PropertyBinding as Es, SkinnedMesh as Rs, LineLoop as Ss, PerspectiveCamera as Hs, OrthographicCamera as Ls, Skeleton as Ns, AnimationClip as js, Bone as ks, InterpolateDiscrete as Ws, InterpolateLinear as Fn, Texture as on, VectorKeyframeTrack as rn, NumberKeyframeTrack as an, QuaternionKeyframeTrack as ln, ColorManagement as Bt, FrontSide as zs, Interpolant as Gs, Box3 as Fs, Sphere as qs } from "three";
6
+ import { Controls as Sn, Vector3 as M, MOUSE as Ne, TOUCH as Le, Quaternion as K, Spherical as sn, Vector2 as Y, Ray as As, Plane as ds, MathUtils as Hn, Raycaster as hs, Object3D as ke, MeshBasicMaterial as Pe, LineBasicMaterial as Qe, CylinderGeometry as U, BoxGeometry as q, BufferGeometry as We, Float32BufferAttribute as pe, Mesh as v, OctahedronGeometry as ut, Line as ue, TorusGeometry as Ge, SphereGeometry as fs, Euler as ps, Matrix4 as me, PlaneGeometry as ms, DoubleSide as Ln, Loader as Zt, FileLoader as nt, Color as de, SRGBColorSpace as Ae, Group as mt, Material as Je, PointsMaterial as Ve, MeshPhongMaterial as gs, LineSegments as Gt, Points as gt, TrianglesDrawMode as bs, TriangleFanDrawMode as Ft, TriangleStripDrawMode as Nn, LoaderUtils as _e, MeshPhysicalMaterial as le, LinearSRGBColorSpace as ae, SpotLight as Is, PointLight as ys, DirectionalLight as Cs, InstancedMesh as xs, InstancedBufferAttribute as ws, TextureLoader as vs, ImageBitmapLoader as Ms, BufferAttribute as $e, InterleavedBuffer as jn, InterleavedBufferAttribute as kn, LinearMipmapLinearFilter as Wn, NearestMipmapLinearFilter as Ds, LinearMipmapNearestFilter as Ps, NearestMipmapNearestFilter as Ts, LinearFilter as qt, NearestFilter as zn, RepeatWrapping as Xt, MirroredRepeatWrapping as Os, ClampToEdgeWrapping as Es, MeshStandardMaterial as Gn, PropertyBinding as Rs, SkinnedMesh as Ss, LineLoop as Hs, PerspectiveCamera as Ls, OrthographicCamera as Ns, Skeleton as js, AnimationClip as ks, Bone as Ws, InterpolateDiscrete as zs, InterpolateLinear as Fn, Texture as on, VectorKeyframeTrack as rn, NumberKeyframeTrack as an, QuaternionKeyframeTrack as ln, ColorManagement as Bt, FrontSide as Gs, Interpolant as Fs, Box3 as qs, Sphere as Xs } from "three";
7
7
  import st from "@tweenjs/tween.js";
8
- const cn = { type: "change" }, Qt = { type: "start" }, qn = { type: "end" }, At = new us(), un = new As(), Xs = Math.cos(70 * Hn.DEG2RAD), G = new M(), V = 2 * Math.PI, H = {
8
+ const cn = { type: "change" }, Qt = { type: "start" }, qn = { type: "end" }, At = new As(), un = new ds(), Bs = Math.cos(70 * Hn.DEG2RAD), G = new M(), V = 2 * Math.PI, H = {
9
9
  NONE: -1,
10
10
  ROTATE: 0,
11
11
  DOLLY: 1,
@@ -15,7 +15,7 @@ const cn = { type: "change" }, Qt = { type: "start" }, qn = { type: "end" }, At
15
15
  TOUCH_DOLLY_PAN: 5,
16
16
  TOUCH_DOLLY_ROTATE: 6
17
17
  }, Ot = 1e-6;
18
- class Bs extends Sn {
18
+ class Us extends Sn {
19
19
  /**
20
20
  * Constructs a new controls instance.
21
21
  *
@@ -23,7 +23,7 @@ class Bs extends Sn {
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 = H.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: Ne.ROTATE, MIDDLE: Ne.DOLLY, RIGHT: Ne.PAN }, this.touches = { ONE: Le.ROTATE, TWO: Le.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 K(), this._lastTargetPosition = new M(), this._quat = new K().setFromUnitVectors(e.up, new M(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new sn(), this._sphericalDelta = new sn(), this._scale = 1, this._panOffset = new M(), this._rotateStart = new Y(), this._rotateEnd = new Y(), this._rotateDelta = new Y(), this._panStart = new Y(), this._panEnd = new Y(), this._panDelta = new Y(), this._dollyStart = new Y(), this._dollyEnd = new Y(), this._dollyDelta = new Y(), this._dollyDirection = new M(), this._mouse = new Y(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Vs.bind(this), this._onPointerDown = Us.bind(this), this._onPointerUp = Ys.bind(this), this._onContextMenu = ei.bind(this), this._onMouseWheel = Qs.bind(this), this._onKeyDown = Js.bind(this), this._onTouchStart = _s.bind(this), this._onTouchMove = $s.bind(this), this._onMouseDown = Ks.bind(this), this._onMouseMove = Zs.bind(this), this._interceptControlDown = ti.bind(this), this._interceptControlUp = ni.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
26
+ super(e, t), this.state = H.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: Ne.ROTATE, MIDDLE: Ne.DOLLY, RIGHT: Ne.PAN }, this.touches = { ONE: Le.ROTATE, TWO: Le.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 K(), this._lastTargetPosition = new M(), this._quat = new K().setFromUnitVectors(e.up, new M(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new sn(), this._sphericalDelta = new sn(), this._scale = 1, this._panOffset = new M(), this._rotateStart = new Y(), this._rotateEnd = new Y(), this._rotateDelta = new Y(), this._panStart = new Y(), this._panEnd = new Y(), this._panDelta = new Y(), this._dollyStart = new Y(), this._dollyEnd = new Y(), this._dollyDelta = new Y(), this._dollyDirection = new M(), this._mouse = new Y(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Ys.bind(this), this._onPointerDown = Vs.bind(this), this._onPointerUp = Ks.bind(this), this._onContextMenu = ti.bind(this), this._onMouseWheel = Js.bind(this), this._onKeyDown = _s.bind(this), this._onTouchStart = $s.bind(this), this._onTouchMove = ei.bind(this), this._onMouseDown = Zs.bind(this), this._onMouseMove = Qs.bind(this), this._interceptControlDown = ni.bind(this), this._interceptControlUp = si.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
27
27
  }
28
28
  /**
29
29
  * Defines the visual representation of the cursor.
@@ -167,7 +167,7 @@ class Bs extends Sn {
167
167
  c.unproject(this.object), this.object.position.sub(c).add(a), this.object.updateMatrixWorld(), o = G.length();
168
168
  } else
169
169
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
170
- o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (At.origin.copy(this.object.position), At.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(At.direction)) < Xs ? this.object.lookAt(this.target) : (un.setFromNormalAndCoplanarPoint(this.object.up, this.target), At.intersectPlane(un, this.target))));
170
+ o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (At.origin.copy(this.object.position), At.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(At.direction)) < Bs ? this.object.lookAt(this.target) : (un.setFromNormalAndCoplanarPoint(this.object.up, this.target), At.intersectPlane(un, this.target))));
171
171
  } else if (this.object.isOrthographicCamera) {
172
172
  const o = this.object.zoom;
173
173
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), o !== this.object.zoom && (this.object.updateProjectionMatrix(), i = !0);
@@ -364,13 +364,13 @@ class Bs extends Sn {
364
364
  return e.ctrlKey && !this._controlActive && (s.deltaY *= 10), s;
365
365
  }
366
366
  }
367
- function Us(r) {
367
+ function Vs(r) {
368
368
  this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(r.pointerId), this.domElement.ownerDocument.addEventListener("pointermove", this._onPointerMove), this.domElement.ownerDocument.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(r) && (this._addPointer(r), r.pointerType === "touch" ? this._onTouchStart(r) : this._onMouseDown(r), this._cursorStyle === "grab" && (this.domElement.style.cursor = "grabbing")));
369
369
  }
370
- function Vs(r) {
370
+ function Ys(r) {
371
371
  this.enabled !== !1 && (r.pointerType === "touch" ? this._onTouchMove(r) : this._onMouseMove(r));
372
372
  }
373
- function Ys(r) {
373
+ function Ks(r) {
374
374
  switch (this._removePointer(r), this._pointers.length) {
375
375
  case 0:
376
376
  this.domElement.releasePointerCapture(r.pointerId), this.domElement.ownerDocument.removeEventListener("pointermove", this._onPointerMove), this.domElement.ownerDocument.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(qn), this.state = H.NONE, this._cursorStyle === "grab" && (this.domElement.style.cursor = "grab");
@@ -381,7 +381,7 @@ function Ys(r) {
381
381
  break;
382
382
  }
383
383
  }
384
- function Ks(r) {
384
+ function Zs(r) {
385
385
  let e;
386
386
  switch (r.button) {
387
387
  case 0:
@@ -424,7 +424,7 @@ function Ks(r) {
424
424
  }
425
425
  this.state !== H.NONE && this.dispatchEvent(Qt);
426
426
  }
427
- function Zs(r) {
427
+ function Qs(r) {
428
428
  switch (this.state) {
429
429
  case H.ROTATE:
430
430
  if (this.enableRotate === !1) return;
@@ -440,13 +440,13 @@ function Zs(r) {
440
440
  break;
441
441
  }
442
442
  }
443
- function Qs(r) {
443
+ function Js(r) {
444
444
  this.enabled === !1 || this.enableZoom === !1 || this.state !== H.NONE || (r.preventDefault(), this.dispatchEvent(Qt), this._handleMouseWheel(this._customWheelEvent(r)), this.dispatchEvent(qn));
445
445
  }
446
- function Js(r) {
446
+ function _s(r) {
447
447
  this.enabled !== !1 && this._handleKeyDown(r);
448
448
  }
449
- function _s(r) {
449
+ function $s(r) {
450
450
  switch (this._trackPointer(r), this._pointers.length) {
451
451
  case 1:
452
452
  switch (this.touches.ONE) {
@@ -481,7 +481,7 @@ function _s(r) {
481
481
  }
482
482
  this.state !== H.NONE && this.dispatchEvent(Qt);
483
483
  }
484
- function $s(r) {
484
+ function ei(r) {
485
485
  switch (this._trackPointer(r), this.state) {
486
486
  case H.TOUCH_ROTATE:
487
487
  if (this.enableRotate === !1) return;
@@ -503,21 +503,21 @@ function $s(r) {
503
503
  this.state = H.NONE;
504
504
  }
505
505
  }
506
- function ei(r) {
506
+ function ti(r) {
507
507
  this.enabled !== !1 && r.preventDefault();
508
508
  }
509
- function ti(r) {
509
+ function ni(r) {
510
510
  r.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
511
511
  }
512
- function ni(r) {
512
+ function si(r) {
513
513
  r.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
514
514
  }
515
- const Ce = new ds(), F = new M(), he = new M(), k = new K(), An = {
515
+ const Ce = new hs(), F = new M(), he = new M(), k = new K(), An = {
516
516
  X: new M(1, 0, 0),
517
517
  Y: new M(0, 1, 0),
518
518
  Z: new M(0, 0, 1)
519
519
  }, Et = { type: "change" }, dn = { type: "mouseDown", mode: null }, hn = { type: "mouseUp", mode: null }, fn = { type: "objectChange" };
520
- class si extends Sn {
520
+ class ii extends Sn {
521
521
  /**
522
522
  * Constructs a new controls instance.
523
523
  *
@@ -526,11 +526,11 @@ class si extends Sn {
526
526
  */
527
527
  constructor(e, t = null) {
528
528
  super(void 0, t);
529
- const s = new ci(this);
529
+ const s = new ui(this);
530
530
  this._root = s;
531
- const n = new ui();
531
+ const n = new Ai();
532
532
  this._gizmo = n, s.add(n);
533
- const i = new Ai();
533
+ const i = new di();
534
534
  this._plane = i, s.add(i);
535
535
  const o = this;
536
536
  function a(y, C) {
@@ -546,7 +546,7 @@ class si extends Sn {
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
548
  const l = new M(), c = new M(), A = new K(), u = new K(), h = new M(), d = new K(), p = new M(), m = new M(), f = new M(), g = 0, x = new M();
549
- a("worldPosition", l), a("worldPositionStart", c), a("worldQuaternion", A), a("worldQuaternionStart", u), a("cameraPosition", h), a("cameraQuaternion", d), a("pointStart", p), a("pointEnd", m), a("rotationAxis", f), 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 K(), this._parentQuaternionInv = new K(), this._parentScale = new M(), this._worldScaleStart = new M(), this._worldQuaternionInv = new K(), this._worldScale = new M(), this._positionStart = new M(), this._quaternionStart = new K(), this._scaleStart = new M(), this._getPointer = ii.bind(this), this._onPointerDown = ri.bind(this), this._onPointerHover = oi.bind(this), this._onPointerMove = ai.bind(this), this._onPointerUp = li.bind(this), t !== null && this.connect(t);
549
+ a("worldPosition", l), a("worldPositionStart", c), a("worldQuaternion", A), a("worldQuaternionStart", u), a("cameraPosition", h), a("cameraQuaternion", d), a("pointStart", p), a("pointEnd", m), a("rotationAxis", f), 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 K(), this._parentQuaternionInv = new K(), this._parentScale = new M(), this._worldScaleStart = new M(), this._worldQuaternionInv = new K(), this._worldScale = new M(), this._positionStart = new M(), this._quaternionStart = new K(), this._scaleStart = new M(), this._getPointer = oi.bind(this), this._onPointerDown = ai.bind(this), this._onPointerHover = ri.bind(this), this._onPointerMove = li.bind(this), this._onPointerUp = ci.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";
@@ -708,7 +708,7 @@ class si extends Sn {
708
708
  i.xAxis.color.set(e), i.yAxis.color.set(t), i.zAxis.color.set(s), i.active.color.set(n), i.xAxisTransparent.color.set(e), i.yAxisTransparent.color.set(t), i.zAxisTransparent.color.set(s), i.activeTransparent.color.set(n), i.xAxis._color && i.xAxis._color.set(e), i.yAxis._color && i.yAxis._color.set(t), i.zAxis._color && i.zAxis._color.set(s), i.active._color && i.active._color.set(n), i.xAxisTransparent._color && i.xAxisTransparent._color.set(e), i.yAxisTransparent._color && i.yAxisTransparent._color.set(t), i.zAxisTransparent._color && i.zAxisTransparent._color.set(s), i.activeTransparent._color && i.activeTransparent._color.set(n);
709
709
  }
710
710
  }
711
- function ii(r) {
711
+ function oi(r) {
712
712
  if (this.domElement.ownerDocument.pointerLockElement)
713
713
  return {
714
714
  x: 0,
@@ -724,7 +724,7 @@ function ii(r) {
724
724
  };
725
725
  }
726
726
  }
727
- function oi(r) {
727
+ function ri(r) {
728
728
  if (this.enabled)
729
729
  switch (r.pointerType) {
730
730
  case "mouse":
@@ -733,13 +733,13 @@ function oi(r) {
733
733
  break;
734
734
  }
735
735
  }
736
- function ri(r) {
736
+ function ai(r) {
737
737
  this.enabled && (document.pointerLockElement || this.domElement.setPointerCapture(r.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.pointerHover(this._getPointer(r)), this.pointerDown(this._getPointer(r)));
738
738
  }
739
- function ai(r) {
739
+ function li(r) {
740
740
  this.enabled && this.pointerMove(this._getPointer(r));
741
741
  }
742
- function li(r) {
742
+ function ci(r) {
743
743
  this.enabled && (this.domElement.releasePointerCapture(r.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(r)));
744
744
  }
745
745
  function Rt(r, e, t) {
@@ -749,8 +749,8 @@ function Rt(r, e, t) {
749
749
  return s[n];
750
750
  return !1;
751
751
  }
752
- const dt = new fs(), L = new M(0, 1, 0), pn = new M(0, 0, 0), mn = new me(), ht = new K(), bt = new K(), oe = new M(), gn = new me(), Ye = new M(1, 0, 0), we = new M(0, 1, 0), Ke = new M(0, 0, 1), ft = new M(), Fe = new M(), qe = new M();
753
- class ci extends ke {
752
+ const dt = new ps(), L = new M(0, 1, 0), pn = new M(0, 0, 0), mn = new me(), ht = new K(), bt = new K(), oe = new M(), gn = new me(), Ye = new M(1, 0, 0), we = new M(0, 1, 0), Ke = new M(0, 0, 1), ft = new M(), Fe = new M(), qe = new M();
753
+ class ui extends ke {
754
754
  constructor(e) {
755
755
  super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
756
756
  }
@@ -765,7 +765,7 @@ class ci extends ke {
765
765
  });
766
766
  }
767
767
  }
768
- class ui extends ke {
768
+ class Ai extends ke {
769
769
  constructor() {
770
770
  super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
771
771
  const e = new Pe({
@@ -923,7 +923,7 @@ class ui extends ke {
923
923
  ]
924
924
  }, Q = {
925
925
  XYZE: [
926
- [new v(new hs(0.25, 10, 8), s)]
926
+ [new v(new fs(0.25, 10, 8), s)]
927
927
  ],
928
928
  X: [
929
929
  [new v(new Ge(0.5, 0.1, 4, 24), s), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
@@ -990,7 +990,7 @@ class ui extends ke {
990
990
  XYZ: [
991
991
  [new v(new q(0.2, 0.2, 0.2), s), [0, 0, 0]]
992
992
  ]
993
- }, Jn = {
993
+ }, _n = {
994
994
  X: [
995
995
  [new ue(g, n), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
996
996
  ],
@@ -1005,14 +1005,14 @@ class ui extends ke {
1005
1005
  const rt = new ke();
1006
1006
  for (const ne in $)
1007
1007
  for (let Ee = $[ne].length; Ee--; ) {
1008
- const B = $[ne][Ee][0].clone(), at = $[ne][Ee][1], lt = $[ne][Ee][2], ct = $[ne][Ee][3], _n = $[ne][Ee][4];
1009
- B.name = ne, B.tag = _n, at && B.position.set(at[0], at[1], at[2]), lt && B.rotation.set(lt[0], lt[1], lt[2]), ct && B.scale.set(ct[0], ct[1], ct[2]), B.updateMatrix();
1008
+ const B = $[ne][Ee][0].clone(), at = $[ne][Ee][1], lt = $[ne][Ee][2], ct = $[ne][Ee][3], $n = $[ne][Ee][4];
1009
+ B.name = ne, B.tag = $n, at && B.position.set(at[0], at[1], at[2]), lt && B.rotation.set(lt[0], lt[1], lt[2]), ct && B.scale.set(ct[0], ct[1], ct[2]), B.updateMatrix();
1010
1010
  const tn = B.geometry.clone();
1011
1011
  tn.applyMatrix4(B.matrix), B.geometry = tn, B.renderOrder = 1 / 0, B.position.set(0, 0, 0), B.rotation.set(0, 0, 0), B.scale.set(1, 1, 1), rt.add(B);
1012
1012
  }
1013
1013
  return rt;
1014
1014
  }
1015
- this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = ce(w)), this.add(this.gizmo.rotate = ce(Z)), this.add(this.gizmo.scale = ce(ye)), this.add(this.picker.translate = ce(D)), this.add(this.picker.rotate = ce(Q)), this.add(this.picker.scale = ce(Pt)), this.add(this.helper.translate = ce(S)), this.add(this.helper.rotate = ce(_)), this.add(this.helper.scale = ce(Jn)), 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 = ce(w)), this.add(this.gizmo.rotate = ce(Z)), this.add(this.gizmo.scale = ce(ye)), this.add(this.picker.translate = ce(D)), this.add(this.picker.rotate = ce(Q)), this.add(this.picker.scale = ce(Pt)), this.add(this.helper.translate = ce(S)), this.add(this.helper.rotate = ce(_)), this.add(this.helper.scale = ce(_n)), 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) {
@@ -1035,10 +1035,10 @@ class ui extends ke {
1035
1035
  super.updateMatrixWorld(e);
1036
1036
  }
1037
1037
  }
1038
- class Ai extends v {
1038
+ class di extends v {
1039
1039
  constructor() {
1040
1040
  super(
1041
- new ps(1e5, 1e5, 2, 2),
1041
+ new ms(1e5, 1e5, 2, 2),
1042
1042
  new Pe({ visible: !1, wireframe: !0, side: Ln, transparent: !0, opacity: 0.1, toneMapped: !1 })
1043
1043
  ), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
1044
1044
  }
@@ -1079,7 +1079,7 @@ class Ai extends v {
1079
1079
  oe.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (gn.lookAt(F.set(0, 0, 0), oe, L), this.quaternion.setFromRotationMatrix(gn)), super.updateMatrixWorld(e);
1080
1080
  }
1081
1081
  }
1082
- class di extends ke {
1082
+ class hi extends ke {
1083
1083
  /**
1084
1084
  * Constructs a new CSS2D object.
1085
1085
  *
@@ -1097,7 +1097,7 @@ class di extends ke {
1097
1097
  }
1098
1098
  }
1099
1099
  const Se = new M(), bn = new me(), In = new me(), yn = new M(), Cn = new M();
1100
- class hi {
1100
+ class fi {
1101
1101
  /**
1102
1102
  * Constructs a new CSS2D renderer.
1103
1103
  *
@@ -1162,15 +1162,15 @@ class hi {
1162
1162
  }
1163
1163
  }
1164
1164
  }
1165
- const fi = 1920, pi = 13, mi = 0.6, gi = 4, bi = window.innerWidth / fi, Ii = Math.min(Math.max(bi, mi), gi), yi = Math.round(pi * Ii);
1166
- document.documentElement.style.setProperty("--sl-css2d-base-font-size", yi + "px");
1165
+ const pi = 1920, mi = 13, gi = 0.6, bi = 4, Ii = window.innerWidth / pi, yi = Math.min(Math.max(Ii, gi), bi), Ci = Math.round(mi * yi);
1166
+ document.documentElement.style.setProperty("--sl-css2d-base-font-size", Ci + "px");
1167
1167
  const Xe = {
1168
1168
  panel: "sl-css2d-data-panel",
1169
1169
  title: "sl-css2d-data-panel-title",
1170
1170
  list: "sl-css2d-data-panel-list",
1171
1171
  arrow: "sl-css2d-data-panel-arrow",
1172
1172
  item: "sl-css2d-data-panel-item"
1173
- }, Ci = "--sl-css2d-base-font-size";
1173
+ }, xi = "--sl-css2d-base-font-size";
1174
1174
  class it {
1175
1175
  constructor(e = {}) {
1176
1176
  /** CSS2DObject 实例 */
@@ -1211,7 +1211,7 @@ class it {
1211
1211
  border-radius: ${t(8)}em;
1212
1212
  padding: ${t(10)}em ${t(14)}em;
1213
1213
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
1214
- font-size: var(${Ci}, 13px);
1214
+ font-size: var(${xi}, 13px);
1215
1215
  line-height: 1.7;
1216
1216
  box-shadow: 0 ${t(4)}em ${t(16)}em rgba(0, 0, 0, 0.4);
1217
1217
  backdrop-filter: blur(4px);
@@ -1275,7 +1275,7 @@ class it {
1275
1275
  const t = new P.Box3().setFromObject(e), s = new P.Vector3();
1276
1276
  t.getSize(s);
1277
1277
  const n = s.y / 2 + this.options.offsetY;
1278
- this.css2dObject || (this.css2dObject = new di(this.container), this.css2dObject.name = `DataPanel_${e.name || e.uuid}`, this.css2dObject.center.set(0.5, 1)), this.css2dObject.position.set(0, n, 0), e.add(this.css2dObject), this.attachedObject = e;
1278
+ this.css2dObject || (this.css2dObject = new hi(this.container), this.css2dObject.name = `DataPanel_${e.name || e.uuid}`, this.css2dObject.center.set(0.5, 1)), this.css2dObject.position.set(0, n, 0), e.add(this.css2dObject), this.attachedObject = e;
1279
1279
  }
1280
1280
  /**
1281
1281
  * 从附着的物体上移除面板
@@ -1418,24 +1418,24 @@ function Xn(r, e) {
1418
1418
  function Jt(r) {
1419
1419
  return xt.get(vt(r)) || null;
1420
1420
  }
1421
- function xi(r) {
1421
+ function wi(r) {
1422
1422
  const e = vt(r), t = xt.get(e);
1423
1423
  t && (t.dispose(), xt.delete(e)), e.userData._hasDataPanel = void 0;
1424
1424
  }
1425
1425
  let W = null;
1426
- function wi(r) {
1427
- return W ? (W.domElement.parentNode !== r && r.appendChild(W.domElement), W) : (W = new hi(), W.setSize(r.clientWidth, r.clientHeight), W.domElement.style.position = "absolute", W.domElement.style.top = "0", W.domElement.style.left = "0", W.domElement.style.pointerEvents = "none", r.appendChild(W.domElement), W);
1426
+ function vi(r) {
1427
+ return W ? (W.domElement.parentNode !== r && r.appendChild(W.domElement), W) : (W = new fi(), W.setSize(r.clientWidth, r.clientHeight), W.domElement.style.position = "absolute", W.domElement.style.top = "0", W.domElement.style.left = "0", W.domElement.style.pointerEvents = "none", r.appendChild(W.domElement), W);
1428
1428
  }
1429
1429
  function ka() {
1430
1430
  return W;
1431
1431
  }
1432
- function vi(r, e) {
1432
+ function Mi(r, e) {
1433
1433
  W && W.render(r, e);
1434
1434
  }
1435
- function Mi(r, e) {
1435
+ function Di(r, e) {
1436
1436
  W && W.setSize(r, e);
1437
1437
  }
1438
- function Di() {
1438
+ function Pi() {
1439
1439
  W && (W.domElement.parentNode && W.domElement.parentNode.removeChild(W.domElement), W = null);
1440
1440
  }
1441
1441
  const I = {
@@ -1463,21 +1463,21 @@ const I = {
1463
1463
  selectedObject: null
1464
1464
  };
1465
1465
  let It = !1, Oe = !1, Ut = [];
1466
- const Pi = 16755200;
1466
+ const Ti = 16755200;
1467
1467
  let Te = null, Vt = null, yt = null, ge = [];
1468
1468
  const ot = /* @__PURE__ */ new Map();
1469
1469
  let wt, Ct = null, et = null, tt = null;
1470
- function Ti(r, e = "edit", t) {
1471
- I.container = r, I.mode = e, Oi(), Ei(), Si(), t && (io(t.scene, e, t.dataPanels), t != null && t.camera && (I.defaultMainCamera = t.camera, Bn(!0))), Li(), Hi(), wt && I.orbitControls && (I.orbitControls.target.fromArray(wt), I.orbitControls.update()), Qi(), Un(), et = (s) => Gi(s), tt = () => ji(), e === "edit" && r.addEventListener("click", et), window.addEventListener("resize", tt), t || Ni(), e === "edit" && Ri();
1470
+ function Oi(r, e = "edit", t) {
1471
+ I.container = r, I.mode = e, Ei(), Ri(), Hi(), t && (io(t.scene, e, t.dataPanels), t != null && t.camera && (I.defaultMainCamera = t.camera, Bn(!0))), Ni(), Li(), wt && I.orbitControls && (I.orbitControls.target.fromArray(wt), I.orbitControls.update()), Qi(), Un(), et = (s) => Gi(s), tt = () => ki(), e === "edit" && r.addEventListener("click", et), window.addEventListener("resize", tt), t || ji(), e === "edit" && Si();
1472
1472
  }
1473
- function Oi() {
1473
+ function Ei() {
1474
1474
  const r = new P.WebGLRenderer({ antialias: !0, alpha: !0 });
1475
1475
  r.setSize(I.container.clientWidth, I.container.clientHeight), r.setPixelRatio(Math.min(window.devicePixelRatio, 2)), r.shadowMap.enabled = !0, r.shadowMap.type = P.PCFSoftShadowMap, I.container.appendChild(r.domElement), I.renderer = r;
1476
1476
  }
1477
- function Ei() {
1477
+ function Ri() {
1478
1478
  I.scene = new P.Scene(), I.scene.name = "sl_scene";
1479
1479
  }
1480
- function Ri() {
1480
+ function Si() {
1481
1481
  const r = new P.GridHelper(30, 30, 8956671, 3364232);
1482
1482
  r.name = "地板", r.userData.type = "initFloor", I.scene.add(r), I.gridHelper = r;
1483
1483
  const e = new P.PlaneGeometry(30, 30), t = new P.ShadowMaterial({
@@ -1486,13 +1486,12 @@ function Ri() {
1486
1486
  }), s = new P.Mesh(e, t);
1487
1487
  s.rotation.x = -Math.PI / 2, s.position.y = -0.01, s.name = "阴影接收平面", s.userData.type = "initFloor", s.receiveShadow = !0, I.scene.add(s);
1488
1488
  }
1489
- function Si() {
1489
+ function Hi() {
1490
1490
  const r = I.container, e = r.clientWidth / r.clientHeight, t = new P.PerspectiveCamera(45, e, 0.1, 1e3);
1491
1491
  t.position.set(0, 6, 15), t.lookAt(0, 0, 0), I.camera = t;
1492
1492
  }
1493
1493
  function Bn(r = !1) {
1494
1494
  if (!I.defaultMainCamera) return;
1495
- $t();
1496
1495
  const e = I.defaultMainCamera;
1497
1496
  if (r) {
1498
1497
  I.camera.position.set(
@@ -1505,7 +1504,8 @@ function Bn(r = !1) {
1505
1504
  e.rotation[2]
1506
1505
  ), I.camera.updateProjectionMatrix(), wt = e.target;
1507
1506
  return;
1508
- }
1507
+ } else
1508
+ Yn(""), $t();
1509
1509
  if (!I.camera || !I.orbitControls) return;
1510
1510
  const t = I.camera.position.clone(), s = I.orbitControls.target.clone(), n = new P.Vector3(
1511
1511
  e.position[0],
@@ -1535,8 +1535,8 @@ function Bn(r = !1) {
1535
1535
  wt = e.target, I.orbitControls.enabled = !0;
1536
1536
  }).start();
1537
1537
  }
1538
- function Hi() {
1539
- const r = new Bs(I.camera, I.renderer.domElement);
1538
+ function Li() {
1539
+ const r = new Us(I.camera, I.renderer.domElement);
1540
1540
  r.minDistance = 0, r.maxDistance = 1 / 0, r.addEventListener("start", () => {
1541
1541
  It = !1;
1542
1542
  }), r.addEventListener("change", () => {
@@ -1547,8 +1547,8 @@ function Hi() {
1547
1547
  }, 200));
1548
1548
  }), I.orbitControls = r;
1549
1549
  }
1550
- function Li() {
1551
- const r = new si(
1550
+ function Ni() {
1551
+ const r = new ii(
1552
1552
  I.camera,
1553
1553
  I.renderer.domElement
1554
1554
  );
@@ -1564,13 +1564,13 @@ function Li() {
1564
1564
  }
1565
1565
  }), I.scene.add(r.getHelper()), I.transformControls = r;
1566
1566
  }
1567
- function Ni() {
1567
+ function ji() {
1568
1568
  const r = new P.AmbientLight(16777215, 1);
1569
1569
  I.scene.add(r);
1570
1570
  }
1571
1571
  function Un() {
1572
1572
  var r, e;
1573
- Ct = requestAnimationFrame(Un), st.update(), (r = I.orbitControls) == null || r.update(), (e = I.renderer) == null || e.render(I.scene, I.camera), I.scene && I.camera && vi(I.scene, I.camera), I.scene && I.scene.traverse((t) => {
1573
+ Ct = requestAnimationFrame(Un), st.update(), (r = I.orbitControls) == null || r.update(), (e = I.renderer) == null || e.render(I.scene, I.camera), I.scene && I.camera && Mi(I.scene, I.camera), I.scene && I.scene.traverse((t) => {
1574
1574
  if (t.userData.isWater && t.type === "Mesh") {
1575
1575
  const s = t, n = s.material;
1576
1576
  if (n.normalMap) {
@@ -1580,29 +1580,29 @@ function Un() {
1580
1580
  }
1581
1581
  });
1582
1582
  }
1583
- function ji() {
1583
+ function ki() {
1584
1584
  if (!I.container || !I.camera || !I.renderer) return;
1585
1585
  const r = I.container.clientWidth, e = I.container.clientHeight;
1586
- r === 0 || e === 0 || (I.camera.aspect = r / e, I.camera.updateProjectionMatrix(), I.renderer.setSize(r, e), Mi(r, e));
1586
+ r === 0 || e === 0 || (I.camera.aspect = r / e, I.camera.updateProjectionMatrix(), I.renderer.setSize(r, e), Di(r, e));
1587
1587
  }
1588
1588
  function _t(r) {
1589
1589
  I.selectedObject !== r && (I.selectedObject && I.transformControls.detach(), I.selectedObject = r, I.transformControls.attach(r), I.transformControls.setMode(I.transformControlsMode), I.transformControls.showX = !0, I.transformControls.showY = !0, I.transformControls.showZ = !0, Vn(r), console.log("选中", I.selectedObject), Te == null || Te(r));
1590
1590
  }
1591
1591
  let J = null;
1592
- function ki(r) {
1592
+ function Wi(r) {
1593
1593
  J = r;
1594
1594
  }
1595
1595
  function St(r) {
1596
1596
  J == null || J(r);
1597
1597
  }
1598
- function Wi(r) {
1598
+ function zi(r) {
1599
1599
  I.transformControlsMode = r, I.transformControls && I.transformControls.setMode(I.transformControlsMode);
1600
1600
  }
1601
1601
  function Vn(r) {
1602
1602
  $t(), r.traverse((e) => {
1603
1603
  if (e.isMesh) {
1604
1604
  const t = e, s = new P.EdgesGeometry(t.geometry), n = new P.LineBasicMaterial({
1605
- color: Pi,
1605
+ color: Ti,
1606
1606
  depthTest: !0
1607
1607
  }), i = new P.LineSegments(s, n);
1608
1608
  e.add(i), Ut.push(i);
@@ -1617,7 +1617,7 @@ function $t() {
1617
1617
  function en() {
1618
1618
  I.selectedObject && ($t(), I.transformControls.detach(), I.selectedObject = null, Te == null || Te(null));
1619
1619
  }
1620
- function zi(r) {
1620
+ function Yn(r) {
1621
1621
  let e = null;
1622
1622
  ot.forEach((t) => {
1623
1623
  t.userData.id == r && (e = t), t.children && t.children.forEach((s) => {
@@ -1875,7 +1875,7 @@ function io(r, e = "edit", t) {
1875
1875
  }
1876
1876
  }));
1877
1877
  }
1878
- function Yn(r) {
1878
+ function Kn(r) {
1879
1879
  if (!r) return;
1880
1880
  if (r.type === "Mesh") {
1881
1881
  const t = r;
@@ -1885,10 +1885,10 @@ function Yn(r) {
1885
1885
  }
1886
1886
  const e = r.children.slice();
1887
1887
  for (const t of e)
1888
- Yn(t);
1888
+ Kn(t);
1889
1889
  }
1890
1890
  function oo() {
1891
- Ct !== null && (cancelAnimationFrame(Ct), Ct = null), et && I.container && (I.container.removeEventListener("click", et), et = null), tt && (window.removeEventListener("resize", tt), tt = null), I.orbitControls && (I.orbitControls.dispose(), I.orbitControls = null), I.transformControls && (I.transformControls.dispose(), I.transformControls = null), I.scene && (Yn(I.scene), I.scene = null), I.renderer && (I.renderer.dispose(), I.renderer.domElement && I.container && I.container.removeChild(I.renderer.domElement), I.renderer = null), Di(), I.camera = null, I.gridHelper = null, I.selectedObject = null, I.container = null, I.mode = "", ge = [], ot.clear(), Dt(), It = !1, Oe = !1;
1891
+ Ct !== null && (cancelAnimationFrame(Ct), Ct = null), et && I.container && (I.container.removeEventListener("click", et), et = null), tt && (window.removeEventListener("resize", tt), tt = null), I.orbitControls && (I.orbitControls.dispose(), I.orbitControls = null), I.transformControls && (I.transformControls.dispose(), I.transformControls = null), I.scene && (Kn(I.scene), I.scene = null), I.renderer && (I.renderer.dispose(), I.renderer.domElement && I.container && I.container.removeChild(I.renderer.domElement), I.renderer = null), Pi(), I.camera = null, I.gridHelper = null, I.selectedObject = null, I.container = null, I.mode = "", ge = [], ot.clear(), Dt(), It = !1, Oe = !1;
1892
1892
  }
1893
1893
  const ro = /^[og]\s*(.+)?/, ao = /^mtllib /, lo = /^usemtl /, co = /^usemap /, xn = /\s+/, wn = new M(), Ht = new M(), vn = new M(), Mn = new M(), ee = new M(), pt = new de();
1894
1894
  function uo() {
@@ -2220,7 +2220,7 @@ class Ao extends Zt {
2220
2220
  Je.prototype.copy.call(S, D), S.color.copy(D.color), S.map = D.map, D = S;
2221
2221
  }
2222
2222
  }
2223
- D === void 0 && (h ? D = new Qe() : d ? D = new Ve({ size: 1, sizeAttenuation: !1 }) : D = new ms(), D.name = C.name, D.flatShading = !C.smooth, D.vertexColors = p, t.materials[w] = D), f.push(D);
2223
+ D === void 0 && (h ? D = new Qe() : d ? D = new Ve({ size: 1, sizeAttenuation: !1 }) : D = new gs(), D.name = C.name, D.flatShading = !C.smooth, D.vertexColors = p, t.materials[w] = D), f.push(D);
2224
2224
  }
2225
2225
  let g;
2226
2226
  if (f.length > 1) {
@@ -2243,7 +2243,7 @@ class Ao extends Zt {
2243
2243
  }
2244
2244
  }
2245
2245
  function Dn(r, e) {
2246
- if (e === gs)
2246
+ if (e === bs)
2247
2247
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), r;
2248
2248
  if (e === Ft || e === Nn) {
2249
2249
  let t = r.getIndex();
@@ -2271,7 +2271,7 @@ function Dn(r, e) {
2271
2271
  }
2272
2272
  function ho(r) {
2273
2273
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), s = r.clone();
2274
- return Kn(r, s, function(n, i) {
2274
+ return Zn(r, s, function(n, i) {
2275
2275
  e.set(i, n), t.set(n, i);
2276
2276
  }), s.traverse(function(n) {
2277
2277
  if (!n.isSkinnedMesh) return;
@@ -2281,10 +2281,10 @@ function ho(r) {
2281
2281
  }), i.bind(i.skeleton, i.bindMatrix);
2282
2282
  }), s;
2283
2283
  }
2284
- function Kn(r, e, t) {
2284
+ function Zn(r, e, t) {
2285
2285
  t(r, e);
2286
2286
  for (let s = 0; s < r.children.length; s++)
2287
- Kn(r.children[s], e.children[s], t);
2287
+ Zn(r.children[s], e.children[s], t);
2288
2288
  }
2289
2289
  class fo extends Zt {
2290
2290
  /**
@@ -2428,7 +2428,7 @@ class fo extends Zt {
2428
2428
  if (typeof e == "string")
2429
2429
  i = JSON.parse(e);
2430
2430
  else if (e instanceof ArrayBuffer)
2431
- if (l.decode(new Uint8Array(e, 0, 4)) === Zn) {
2431
+ if (l.decode(new Uint8Array(e, 0, 4)) === Qn) {
2432
2432
  try {
2433
2433
  o[O.KHR_BINARY_GLTF] = new Ho(e);
2434
2434
  } catch (u) {
@@ -2562,13 +2562,13 @@ class mo {
2562
2562
  const u = l.range !== void 0 ? l.range : 0;
2563
2563
  switch (l.type) {
2564
2564
  case "directional":
2565
- c = new ys(A), c.target.position.set(0, 0, -1), c.add(c.target);
2565
+ c = new Cs(A), c.target.position.set(0, 0, -1), c.add(c.target);
2566
2566
  break;
2567
2567
  case "point":
2568
- c = new Is(A), c.distance = u;
2568
+ c = new ys(A), c.distance = u;
2569
2569
  break;
2570
2570
  case "spot":
2571
- c = new bs(A), c.distance = u, l.spot = l.spot || {}, l.spot.innerConeAngle = l.spot.innerConeAngle !== void 0 ? l.spot.innerConeAngle : 0, l.spot.outerConeAngle = l.spot.outerConeAngle !== void 0 ? l.spot.outerConeAngle : Math.PI / 4, c.angle = l.spot.outerConeAngle, c.penumbra = 1 - l.spot.innerConeAngle / l.spot.outerConeAngle, c.target.position.set(0, 0, -1), c.add(c.target);
2571
+ c = new Is(A), c.distance = u, l.spot = l.spot || {}, l.spot.innerConeAngle = l.spot.innerConeAngle !== void 0 ? l.spot.innerConeAngle : 0, l.spot.outerConeAngle = l.spot.outerConeAngle !== void 0 ? l.spot.outerConeAngle : Math.PI / 4, c.angle = l.spot.outerConeAngle, c.penumbra = 1 - l.spot.innerConeAngle / l.spot.outerConeAngle, c.target.position.set(0, 0, -1), c.add(c.target);
2572
2572
  break;
2573
2573
  default:
2574
2574
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + l.type);
@@ -2859,13 +2859,13 @@ class So {
2859
2859
  return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(e)), Promise.all(a).then((c) => {
2860
2860
  const A = c.pop(), u = A.isGroup ? A.children : [A], h = c[0].count, d = [];
2861
2861
  for (const p of u) {
2862
- const m = new me(), f = new M(), g = new K(), x = new M(1, 1, 1), y = new Cs(p.geometry, p.material, h);
2862
+ const m = new me(), f = new M(), g = new K(), x = new M(1, 1, 1), y = new xs(p.geometry, p.material, h);
2863
2863
  for (let C = 0; C < h; C++)
2864
2864
  l.TRANSLATION && f.fromBufferAttribute(l.TRANSLATION, C), l.ROTATION && g.fromBufferAttribute(l.ROTATION, C), l.SCALE && x.fromBufferAttribute(l.SCALE, C), y.setMatrixAt(C, m.compose(f, g, x));
2865
2865
  for (const C in l)
2866
2866
  if (C === "_COLOR_0") {
2867
2867
  const w = l[C];
2868
- y.instanceColor = new xs(w.array, w.itemSize, w.normalized);
2868
+ y.instanceColor = new ws(w.array, w.itemSize, w.normalized);
2869
2869
  } else C !== "TRANSLATION" && C !== "ROTATION" && C !== "SCALE" && p.geometry.setAttribute(C, l[C]);
2870
2870
  ke.prototype.copy.call(y, p), this.parser.assignFinalMaterial(y), d.push(y);
2871
2871
  }
@@ -2873,7 +2873,7 @@ class So {
2873
2873
  }));
2874
2874
  }
2875
2875
  }
2876
- const Zn = "glTF", Be = 12, Tn = { JSON: 1313821514, BIN: 5130562 };
2876
+ const Qn = "glTF", Be = 12, Tn = { JSON: 1313821514, BIN: 5130562 };
2877
2877
  class Ho {
2878
2878
  constructor(e) {
2879
2879
  this.name = O.KHR_BINARY_GLTF, this.content = null, this.body = null;
@@ -2882,7 +2882,7 @@ class Ho {
2882
2882
  magic: s.decode(new Uint8Array(e.slice(0, 4))),
2883
2883
  version: t.getUint32(4, !0),
2884
2884
  length: t.getUint32(8, !0)
2885
- }, this.header.magic !== Zn)
2885
+ }, this.header.magic !== Qn)
2886
2886
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
2887
2887
  if (this.header.version < 2)
2888
2888
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
@@ -2950,7 +2950,7 @@ class jo {
2950
2950
  this.name = O.KHR_MESH_QUANTIZATION;
2951
2951
  }
2952
2952
  }
2953
- class Qn extends Gs {
2953
+ class Jn extends Fs {
2954
2954
  constructor(e, t, s, n) {
2955
2955
  super(e, t, s, n);
2956
2956
  }
@@ -2970,7 +2970,7 @@ class Qn extends Gs {
2970
2970
  }
2971
2971
  }
2972
2972
  const ko = new K();
2973
- class Wo extends Qn {
2973
+ class Wo extends Jn {
2974
2974
  interpolate_(e, t, s, n) {
2975
2975
  const i = super.interpolate_(e, t, s, n);
2976
2976
  return ko.fromArray(i).normalize().toArray(i), i;
@@ -2994,13 +2994,13 @@ const te = {
2994
2994
  }, On = {
2995
2995
  9728: zn,
2996
2996
  9729: qt,
2997
- 9984: Ps,
2998
- 9985: Ds,
2999
- 9986: Ms,
2997
+ 9984: Ts,
2998
+ 9985: Ps,
2999
+ 9986: Ds,
3000
3000
  9987: Wn
3001
3001
  }, En = {
3002
- 33071: Os,
3003
- 33648: Ts,
3002
+ 33071: Es,
3003
+ 33648: Os,
3004
3004
  10497: Xt
3005
3005
  }, Lt = {
3006
3006
  SCALAR: 1,
@@ -3031,7 +3031,7 @@ const te = {
3031
3031
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
3032
3032
  // keyframe track will be initialized with a default interpolation type, then modified.
3033
3033
  LINEAR: Fn,
3034
- STEP: Ws
3034
+ STEP: zs
3035
3035
  }, Nt = {
3036
3036
  OPAQUE: "OPAQUE",
3037
3037
  MASK: "MASK",
@@ -3045,7 +3045,7 @@ function Go(r) {
3045
3045
  roughness: 1,
3046
3046
  transparent: !1,
3047
3047
  depthTest: !0,
3048
- side: zs
3048
+ side: Gs
3049
3049
  })), r.DefaultMaterial;
3050
3050
  }
3051
3051
  function xe(r, e, t) {
@@ -3144,7 +3144,7 @@ class Vo {
3144
3144
  const l = a.match(/Version\/(\d+)/);
3145
3145
  n = s && l ? parseInt(l[1], 10) : -1, i = a.indexOf("Firefox") > -1, o = i ? a.match(/Firefox\/([0-9]+)\./)[1] : -1;
3146
3146
  }
3147
- typeof createImageBitmap > "u" || s && n < 17 || i && o < 98 ? this.textureLoader = new ws(this.options.manager) : this.textureLoader = new vs(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new nt(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
3147
+ typeof createImageBitmap > "u" || s && n < 17 || i && o < 98 ? this.textureLoader = new vs(this.options.manager) : this.textureLoader = new Ms(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new nt(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
3148
3148
  }
3149
3149
  setExtensions(e) {
3150
3150
  this.extensions = e;
@@ -3574,7 +3574,7 @@ class Vo {
3574
3574
  * @return {string}
3575
3575
  */
3576
3576
  createUniqueName(e) {
3577
- const t = Es.sanitizeNodeName(e || "");
3577
+ const t = Rs.sanitizeNodeName(e || "");
3578
3578
  return t in this.nodeNamesUsed ? t + "_" + ++this.nodeNamesUsed[t] : (this.nodeNamesUsed[t] = 0, t);
3579
3579
  }
3580
3580
  /**
@@ -3625,13 +3625,13 @@ class Vo {
3625
3625
  let g;
3626
3626
  const x = c[d];
3627
3627
  if (f.mode === te.TRIANGLES || f.mode === te.TRIANGLE_STRIP || f.mode === te.TRIANGLE_FAN || f.mode === void 0)
3628
- g = i.isSkinnedMesh === !0 ? new Rs(m, x) : new v(m, x), g.isSkinnedMesh === !0 && g.normalizeSkinWeights(), f.mode === te.TRIANGLE_STRIP ? g.geometry = Dn(g.geometry, Nn) : f.mode === te.TRIANGLE_FAN && (g.geometry = Dn(g.geometry, Ft));
3628
+ g = i.isSkinnedMesh === !0 ? new Ss(m, x) : new v(m, x), g.isSkinnedMesh === !0 && g.normalizeSkinWeights(), f.mode === te.TRIANGLE_STRIP ? g.geometry = Dn(g.geometry, Nn) : f.mode === te.TRIANGLE_FAN && (g.geometry = Dn(g.geometry, Ft));
3629
3629
  else if (f.mode === te.LINES)
3630
3630
  g = new Gt(m, x);
3631
3631
  else if (f.mode === te.LINE_STRIP)
3632
3632
  g = new ue(m, x);
3633
3633
  else if (f.mode === te.LINE_LOOP)
3634
- g = new Ss(m, x);
3634
+ g = new Hs(m, x);
3635
3635
  else if (f.mode === te.POINTS)
3636
3636
  g = new gt(m, x);
3637
3637
  else
@@ -3666,7 +3666,7 @@ class Vo {
3666
3666
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
3667
3667
  return;
3668
3668
  }
3669
- return s.type === "perspective" ? t = new Hs(Hn.radToDeg(n.yfov), n.aspectRatio || 1, n.znear || 1, n.zfar || 2e6) : s.type === "orthographic" && (t = new Ls(-n.xmag, n.xmag, n.ymag, -n.ymag, n.znear, n.zfar)), s.name && (t.name = this.createUniqueName(s.name)), re(t, s), Promise.resolve(t);
3669
+ return s.type === "perspective" ? t = new Ls(Hn.radToDeg(n.yfov), n.aspectRatio || 1, n.znear || 1, n.zfar || 2e6) : s.type === "orthographic" && (t = new Ns(-n.xmag, n.xmag, n.ymag, -n.ymag, n.znear, n.zfar)), s.name && (t.name = this.createUniqueName(s.name)), re(t, s), Promise.resolve(t);
3670
3670
  }
3671
3671
  /**
3672
3672
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
@@ -3690,7 +3690,7 @@ class Vo {
3690
3690
  } else
3691
3691
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', t.joints[c]);
3692
3692
  }
3693
- return new Ns(a, l);
3693
+ return new js(a, l);
3694
3694
  });
3695
3695
  }
3696
3696
  /**
@@ -3723,7 +3723,7 @@ class Vo {
3723
3723
  for (let ye = 0; ye < Q.length; ye++)
3724
3724
  g.push(Q[ye]);
3725
3725
  }
3726
- const x = new js(i, void 0, g);
3726
+ const x = new ks(i, void 0, g);
3727
3727
  return re(x, n), x;
3728
3728
  });
3729
3729
  }
@@ -3785,7 +3785,7 @@ class Vo {
3785
3785
  a.push(c);
3786
3786
  }), this.nodeCache[e] = Promise.all(a).then(function(c) {
3787
3787
  let A;
3788
- if (i.isBone === !0 ? A = new ks() : c.length > 1 ? A = new mt() : c.length === 1 ? A = c[0] : A = new ke(), A !== c[0])
3788
+ if (i.isBone === !0 ? A = new Ws() : c.length > 1 ? A = new mt() : c.length === 1 ? A = c[0] : A = new ke(), A !== c[0])
3789
3789
  for (let u = 0, h = c.length; u < h; u++)
3790
3790
  A.add(c[u]);
3791
3791
  if (i.name && (A.userData.name = i.name, A.name = o), re(A, i), i.extensions && xe(s, A, i), i.matrix !== void 0) {
@@ -3887,13 +3887,13 @@ class Vo {
3887
3887
  }
3888
3888
  _createCubicSplineTrackInterpolant(e) {
3889
3889
  e.createInterpolant = function(s) {
3890
- const n = this instanceof ln ? Wo : Qn;
3890
+ const n = this instanceof ln ? Wo : Jn;
3891
3891
  return new n(this.times, this.values, this.getValueSize() / 3, s);
3892
3892
  }, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
3893
3893
  }
3894
3894
  }
3895
3895
  function Yo(r, e, t) {
3896
- const s = e.attributes, n = new Fs();
3896
+ const s = e.attributes, n = new qs();
3897
3897
  if (s.POSITION !== void 0) {
3898
3898
  const a = t.json.accessors[s.POSITION], l = a.min, c = a.max;
3899
3899
  if (l !== void 0 && c !== void 0) {
@@ -3930,7 +3930,7 @@ function Yo(r, e, t) {
3930
3930
  n.expandByVector(a);
3931
3931
  }
3932
3932
  r.boundingBox = n;
3933
- const o = new qs();
3933
+ const o = new Xs();
3934
3934
  n.getCenter(o.center), o.radius = n.min.distanceTo(n.max) / 2, r.boundingSphere = o;
3935
3935
  }
3936
3936
  function Rn(r, e, t) {
@@ -4354,7 +4354,7 @@ function sr(r) {
4354
4354
  if (!e)
4355
4355
  return console.warn("请先选中一个模型,再添加数据面板"), null;
4356
4356
  const t = Jt(e);
4357
- t && (t.dispose(), xi(e));
4357
+ t && (t.dispose(), wi(e));
4358
4358
  const s = [
4359
4359
  { label: "温度", value: "30", unit: "℃" },
4360
4360
  { label: "湿度", value: "65", unit: "%" },
@@ -4381,7 +4381,7 @@ const ir = {
4381
4381
  },
4382
4382
  emits: ["select", "delete"],
4383
4383
  setup(r, { emit: e }) {
4384
- const t = r, s = e, n = j(null), { expandedSet: i, toggleExpand: o } = ts("treeExpand"), a = Ue(() => i.value.has(t.node.uuid)), l = Ue(() => (t.version, t.node.children.some((m) => m.userData.isMovable === !0))), c = Ue(() => (t.version, t.node.children.filter(
4384
+ const t = r, s = e, n = j(null), { expandedSet: i, toggleExpand: o } = ns("treeExpand"), a = Ue(() => i.value.has(t.node.uuid)), l = Ue(() => (t.version, t.node.children.some((m) => m.userData.isMovable === !0))), c = Ue(() => (t.version, t.node.children.filter(
4385
4385
  (m) => m.userData.isMovable === !0
4386
4386
  ))), A = Ue(
4387
4387
  () => {
@@ -4389,7 +4389,7 @@ const ir = {
4389
4389
  return ((m = t.selectedObject) == null ? void 0 : m.uuid) === t.node.uuid;
4390
4390
  }
4391
4391
  );
4392
- ns(
4392
+ ss(
4393
4393
  () => {
4394
4394
  A.value && n.value && n.value.scrollIntoView({
4395
4395
  block: "nearest",
@@ -4406,7 +4406,7 @@ const ir = {
4406
4406
  m.stopPropagation(), s("delete", t.node);
4407
4407
  }, d = (m) => m.type === "Mesh" || m.type === "Sprite" ? "🟦" : m.type === "Light" ? "💡" : "📦", p = (m) => m.name || `${m.type} (${m.id})`;
4408
4408
  return (m, f) => {
4409
- const g = ss("TreeItem", !0);
4409
+ const g = is("TreeItem", !0);
4410
4410
  return T(), R("div", {
4411
4411
  class: "tree-node",
4412
4412
  ref_key: "nodeRef",
@@ -4419,7 +4419,7 @@ const ir = {
4419
4419
  l.value ? (T(), R("span", {
4420
4420
  key: 0,
4421
4421
  class: "toggle-icon",
4422
- onClick: f[0] || (f[0] = Wt((x) => is(o)(r.node.uuid), ["stop"]))
4422
+ onClick: f[0] || (f[0] = Wt((x) => os(o)(r.node.uuid), ["stop"]))
4423
4423
  }, ie(a.value ? "▼" : "▶"), 1)) : (T(), R("span", ir)),
4424
4424
  b("span", or, ie(d(r.node)), 1),
4425
4425
  b("span", rr, ie(p(r.node)), 1),
@@ -5026,7 +5026,7 @@ const ir = {
5026
5026
  type: "checkbox",
5027
5027
  "onUpdate:modelValue": f[0] || (f[0] = (g) => n.value = g)
5028
5028
  }, null, 512), [
5029
- [os, n.value]
5029
+ [rs, n.value]
5030
5030
  ]),
5031
5031
  f[6] || (f[6] = b("span", { class: "dp-toggle-slider" }, null, -1))
5032
5032
  ]),
@@ -5189,8 +5189,8 @@ const la = {
5189
5189
  const o = () => s("propertyChange"), a = j("transform"), l = Ue(() => {
5190
5190
  var p;
5191
5191
  return !!(t.selectedObject && ((p = t.selectedObject.userData) != null && p._hasDataPanel));
5192
- }), c = j(0), A = rs(t, "selectedObject"), { expandedSet: u, toggleExpand: h } = aa(A);
5193
- as("treeExpand", { expandedSet: u, toggleExpand: h });
5192
+ }), c = j(0), A = as(t, "selectedObject"), { expandedSet: u, toggleExpand: h } = aa(A);
5193
+ ls("treeExpand", { expandedSet: u, toggleExpand: h });
5194
5194
  const d = (p) => {
5195
5195
  c.value++, s("treeDelete", p);
5196
5196
  };
@@ -5278,7 +5278,7 @@ const la = {
5278
5278
  console.log(JSON.parse(await m));
5279
5279
  }, d = () => {
5280
5280
  if (!localStorage.getItem("test_id")) return localStorage.setItem("test_id", "123");
5281
- zi(localStorage.getItem("test_id"));
5281
+ Yn(localStorage.getItem("test_id"));
5282
5282
  }, p = () => Bn();
5283
5283
  return (m, f) => (T(), R("div", Ia, [
5284
5284
  b("div", ya, [
@@ -5407,7 +5407,7 @@ const la = {
5407
5407
  },
5408
5408
  setup(r) {
5409
5409
  const e = r, t = j(!1);
5410
- ki((g) => {
5410
+ Wi((g) => {
5411
5411
  t.value = g;
5412
5412
  });
5413
5413
  const s = nn(null), n = zt({
@@ -5451,13 +5451,13 @@ const la = {
5451
5451
  const g = eo();
5452
5452
  g && (A.value = g);
5453
5453
  }, h = (g) => _t(g), d = (g) => Yi(g.uuid), p = (g) => {
5454
- Wi(g);
5454
+ zi(g);
5455
5455
  }, m = j(null), f = () => {
5456
- m.value && Ti(m.value, e.mode, e.sceneData), u();
5456
+ m.value && Oi(m.value, e.mode, e.sceneData), u();
5457
5457
  };
5458
- return ls(() => {
5459
- f(), m.value && wi(m.value);
5460
- }), cs(() => {
5458
+ return cs(() => {
5459
+ f(), m.value && vi(m.value);
5460
+ }), us(() => {
5461
5461
  console.log("endset_three_editor destroy"), oo();
5462
5462
  }), (g, x) => (T(), R("div", Ea, [
5463
5463
  t.value ? (T(), R("div", Ra, [...x[0] || (x[0] = [
@@ -5506,9 +5506,9 @@ export {
5506
5506
  nr as addModelByType,
5507
5507
  _o as addSphere,
5508
5508
  er as addWaterPlane,
5509
- wi as createCSS2DRenderer,
5509
+ vi as createCSS2DRenderer,
5510
5510
  oo as destroyEditor,
5511
- Di as disposeCSS2DRenderer,
5511
+ Pi as disposeCSS2DRenderer,
5512
5512
  so as exportSceneToJSON,
5513
5513
  qi as focusOnObject,
5514
5514
  ka as getCSS2DRenderer,
@@ -5520,21 +5520,21 @@ export {
5520
5520
  to as getSelectedObject,
5521
5521
  tr as importModelFromFile,
5522
5522
  Bn as initDefaultMainCamera,
5523
- Ti as initEditor,
5523
+ Oi as initEditor,
5524
5524
  io as loadSceneFromJSON,
5525
5525
  $i as onSceneObjectsChangeCallback,
5526
- xi as removeDataPanel,
5526
+ wi as removeDataPanel,
5527
5527
  Vi as removeModel,
5528
5528
  Yi as removeModelById,
5529
- vi as renderCSS2D,
5530
- Mi as resizeCSS2DRenderer,
5531
- zi as selectModelHandle,
5529
+ Mi as renderCSS2D,
5530
+ Di as resizeCSS2DRenderer,
5531
+ Yn as selectModelHandle,
5532
5532
  _t as selectObject,
5533
5533
  St as setLoading,
5534
- ki as setLoadingCallback,
5534
+ Wi as setLoadingCallback,
5535
5535
  Ji as setSelectedObjectCallback,
5536
5536
  _i as setTransformChangeCallback,
5537
- Wi as setTransformMode,
5537
+ zi as setTransformMode,
5538
5538
  Wa as updateDataPanelValue,
5539
5539
  aa as useTreeExpand
5540
5540
  };