endset_three_editor 0.1.6 → 0.1.7

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,8 +1,8 @@
1
- import { defineComponent as Fe, ref as K, inject as bn, computed as Be, watchEffect as wn, resolveComponent as Tn, openBlock as Y, createElementBlock as q, createElementVNode as g, normalizeClass as xn, withModifiers as vt, unref as En, toDisplayString as st, Fragment as $t, renderList as Jt, createBlock as en, createCommentVNode as tn, watch as Mn, toRef as Sn, provide as vn, withDirectives as H, vModelText as oe, vShow as pe, reactive as Rn, shallowRef as An, onMounted as Pn, createVNode as it } from "vue";
2
- import * as N from "three";
3
- import { Controls as nn, Vector3 as E, MOUSE as xe, TOUCH as Te, Quaternion as X, Spherical as Rt, Vector2 as B, Ray as Ln, Plane as In, MathUtils as sn, Raycaster as On, Object3D as je, MeshBasicMaterial as ye, LineBasicMaterial as De, CylinderGeometry as z, BoxGeometry as F, BufferGeometry as He, Float32BufferAttribute as he, Mesh as b, OctahedronGeometry as Ke, Line as re, TorusGeometry as Re, SphereGeometry as Cn, Euler as Dn, Matrix4 as Me, PlaneGeometry as Nn, DoubleSide as on, Loader as rn, FileLoader as Tt, Color as ue, SRGBColorSpace as Se, Group as $e, Material as Ne, PointsMaterial as Ie, MeshPhongMaterial as kn, LineSegments as ft, Points as Je, TrianglesDrawMode as jn, TriangleFanDrawMode as mt, TriangleStripDrawMode as an, LoaderUtils as ke, MeshPhysicalMaterial as ne, LinearSRGBColorSpace as ae, SpotLight as Hn, PointLight as Fn, DirectionalLight as Un, InstancedMesh as zn, InstancedBufferAttribute as Gn, TextureLoader as Xn, ImageBitmapLoader as Yn, BufferAttribute as ot, InterleavedBuffer as Bn, InterleavedBufferAttribute as Kn, LinearMipmapLinearFilter as ln, NearestMipmapLinearFilter as Vn, LinearMipmapNearestFilter as Zn, NearestMipmapNearestFilter as Qn, LinearFilter as gt, NearestFilter as cn, RepeatWrapping as yt, MirroredRepeatWrapping as qn, ClampToEdgeWrapping as Wn, MeshStandardMaterial as hn, PropertyBinding as $n, SkinnedMesh as Jn, LineLoop as es, PerspectiveCamera as ts, OrthographicCamera as ns, Skeleton as ss, AnimationClip as is, Bone as os, InterpolateDiscrete as rs, InterpolateLinear as un, Texture as At, VectorKeyframeTrack as Pt, NumberKeyframeTrack as Lt, QuaternionKeyframeTrack as It, ColorManagement as Ot, FrontSide as as, Interpolant as ls, Box3 as cs, Sphere as hs } from "three";
1
+ import { defineComponent as Ge, ref as G, inject as Tn, computed as Ze, watchEffect as xn, resolveComponent as En, openBlock as N, createElementBlock as U, createElementVNode as g, normalizeClass as Fe, withModifiers as At, unref as Mn, toDisplayString as Ee, Fragment as en, renderList as tn, createBlock as ot, createCommentVNode as de, watch as nn, toRef as vn, provide as Sn, reactive as sn, withDirectives as D, vModelText as Q, vShow as he, shallowRef as Rn, onMounted as An, createVNode as Pn } from "vue";
2
+ import * as k from "three";
3
+ import { Controls as on, Vector3 as M, MOUSE as Me, TOUCH as xe, Quaternion as K, Spherical as Pt, Vector2 as V, Ray as Ln, Plane as In, MathUtils as rn, Raycaster as On, Object3D as Ue, MeshBasicMaterial as _e, LineBasicMaterial as ke, CylinderGeometry as Y, BoxGeometry as z, BufferGeometry as ze, Float32BufferAttribute as ue, Mesh as w, OctahedronGeometry as Qe, Line as re, TorusGeometry as Pe, SphereGeometry as Cn, Euler as Dn, Matrix4 as Se, PlaneGeometry as Nn, DoubleSide as an, Loader as ln, FileLoader as Et, Color as pe, SRGBColorSpace as Re, Group as tt, Material as je, PointsMaterial as Ce, MeshPhongMaterial as kn, LineSegments as gt, Points as nt, TrianglesDrawMode as jn, TriangleFanDrawMode as yt, TriangleStripDrawMode as cn, LoaderUtils as He, MeshPhysicalMaterial as se, LinearSRGBColorSpace as ae, SpotLight as Hn, PointLight as Fn, DirectionalLight as Un, InstancedMesh as zn, InstancedBufferAttribute as Gn, TextureLoader as Xn, ImageBitmapLoader as Yn, BufferAttribute as at, InterleavedBuffer as Bn, InterleavedBufferAttribute as Kn, LinearMipmapLinearFilter as hn, NearestMipmapLinearFilter as Vn, LinearMipmapNearestFilter as Zn, NearestMipmapNearestFilter as Qn, LinearFilter as _t, NearestFilter as un, RepeatWrapping as bt, MirroredRepeatWrapping as qn, ClampToEdgeWrapping as Wn, MeshStandardMaterial as dn, PropertyBinding as $n, SkinnedMesh as Jn, LineLoop as es, PerspectiveCamera as ts, OrthographicCamera as ns, Skeleton as ss, AnimationClip as is, Bone as os, InterpolateDiscrete as rs, InterpolateLinear as pn, Texture as Lt, VectorKeyframeTrack as It, NumberKeyframeTrack as Ot, QuaternionKeyframeTrack as Ct, ColorManagement as Dt, FrontSide as as, Interpolant as ls, Box3 as cs, Sphere as hs } from "three";
4
4
  import us from "@tweenjs/tween.js";
5
- const Ct = { type: "change" }, xt = { type: "start" }, dn = { type: "end" }, Ve = new Ln(), Dt = new In(), ds = Math.cos(70 * sn.DEG2RAD), D = new E(), G = 2 * Math.PI, A = {
5
+ const Nt = { type: "change" }, Mt = { type: "start" }, fn = { type: "end" }, qe = new Ln(), kt = new In(), ds = Math.cos(70 * rn.DEG2RAD), j = new M(), B = 2 * Math.PI, P = {
6
6
  NONE: -1,
7
7
  ROTATE: 0,
8
8
  DOLLY: 1,
@@ -11,8 +11,8 @@ const Ct = { type: "change" }, xt = { type: "start" }, dn = { type: "end" }, Ve
11
11
  TOUCH_PAN: 4,
12
12
  TOUCH_DOLLY_PAN: 5,
13
13
  TOUCH_DOLLY_ROTATE: 6
14
- }, rt = 1e-6;
15
- class ps extends nn {
14
+ }, lt = 1e-6;
15
+ class ps extends on {
16
16
  /**
17
17
  * Constructs a new controls instance.
18
18
  *
@@ -20,7 +20,7 @@ class ps extends nn {
20
20
  * @param {?HTMLElement} domElement - The HTML element used for event listeners.
21
21
  */
22
22
  constructor(e, t = null) {
23
- super(e, t), this.state = A.NONE, this.target = new E(), this.cursor = new E(), 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: xe.ROTATE, MIDDLE: xe.DOLLY, RIGHT: xe.PAN }, this.touches = { ONE: Te.ROTATE, TWO: Te.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 E(), this._lastQuaternion = new X(), this._lastTargetPosition = new E(), this._quat = new X().setFromUnitVectors(e.up, new E(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Rt(), this._sphericalDelta = new Rt(), this._scale = 1, this._panOffset = new E(), this._rotateStart = new B(), this._rotateEnd = new B(), this._rotateDelta = new B(), this._panStart = new B(), this._panEnd = new B(), this._panDelta = new B(), this._dollyStart = new B(), this._dollyEnd = new B(), this._dollyDelta = new B(), this._dollyDirection = new E(), this._mouse = new B(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = ms.bind(this), this._onPointerDown = fs.bind(this), this._onPointerUp = gs.bind(this), this._onContextMenu = Es.bind(this), this._onMouseWheel = bs.bind(this), this._onKeyDown = ws.bind(this), this._onTouchStart = Ts.bind(this), this._onTouchMove = xs.bind(this), this._onMouseDown = ys.bind(this), this._onMouseMove = _s.bind(this), this._interceptControlDown = Ms.bind(this), this._interceptControlUp = Ss.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
23
+ super(e, t), this.state = P.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: Me.ROTATE, MIDDLE: Me.DOLLY, RIGHT: Me.PAN }, this.touches = { ONE: xe.ROTATE, TWO: xe.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 Pt(), this._sphericalDelta = new Pt(), this._scale = 1, this._panOffset = new M(), this._rotateStart = new V(), this._rotateEnd = new V(), this._rotateDelta = new V(), this._panStart = new V(), this._panEnd = new V(), this._panDelta = new V(), this._dollyStart = new V(), this._dollyEnd = new V(), this._dollyDelta = new V(), this._dollyDirection = new M(), this._mouse = new V(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = ms.bind(this), this._onPointerDown = fs.bind(this), this._onPointerUp = gs.bind(this), this._onContextMenu = Es.bind(this), this._onMouseWheel = bs.bind(this), this._onKeyDown = ws.bind(this), this._onTouchStart = Ts.bind(this), this._onTouchMove = xs.bind(this), this._onMouseDown = ys.bind(this), this._onMouseMove = _s.bind(this), this._interceptControlDown = Ms.bind(this), this._interceptControlUp = vs.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
24
24
  }
25
25
  /**
26
26
  * Defines the visual representation of the cursor.
@@ -93,7 +93,7 @@ class ps extends nn {
93
93
  * was called, or the initial state.
94
94
  */
95
95
  reset() {
96
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Ct), this.update(), this.state = A.NONE;
96
+ this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Nt), this.update(), this.state = P.NONE;
97
97
  }
98
98
  /**
99
99
  * Programmatically pan the camera.
@@ -138,9 +138,9 @@ class ps extends nn {
138
138
  }
139
139
  update(e = null) {
140
140
  const t = this.object.position;
141
- D.copy(t).sub(this.target), D.applyQuaternion(this._quat), this._spherical.setFromVector3(D), this.autoRotate && this.state === A.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);
141
+ j.copy(t).sub(this.target), j.applyQuaternion(this._quat), this._spherical.setFromVector3(j), this.autoRotate && this.state === P.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);
142
142
  let s = this.minAzimuthAngle, n = this.maxAzimuthAngle;
143
- isFinite(s) && isFinite(n) && (s < -Math.PI ? s += G : s > Math.PI && (s -= G), n < -Math.PI ? n += G : n > Math.PI && (n -= G), s <= n ? this._spherical.theta = Math.max(s, Math.min(n, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (s + n) / 2 ? Math.max(s, this._spherical.theta) : Math.min(n, 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);
143
+ isFinite(s) && isFinite(n) && (s < -Math.PI ? s += B : s > Math.PI && (s -= B), n < -Math.PI ? n += B : n > Math.PI && (n -= B), s <= n ? this._spherical.theta = Math.max(s, Math.min(n, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (s + n) / 2 ? Math.max(s, this._spherical.theta) : Math.min(n, 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);
144
144
  let i = !1;
145
145
  if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera)
146
146
  this._spherical.radius = this._clampDistance(this._spherical.radius);
@@ -148,31 +148,31 @@ class ps extends nn {
148
148
  const o = this._spherical.radius;
149
149
  this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), i = o != this._spherical.radius;
150
150
  }
151
- if (D.setFromSpherical(this._spherical), D.applyQuaternion(this._quatInverse), t.copy(this.target).add(D), this.object.lookAt(this.target), this.enableDamping === !0 ? (this._sphericalDelta.theta *= 1 - this.dampingFactor, this._sphericalDelta.phi *= 1 - this.dampingFactor, this._panOffset.multiplyScalar(1 - this.dampingFactor)) : (this._sphericalDelta.set(0, 0, 0), this._panOffset.set(0, 0, 0)), this.zoomToCursor && this._performCursorZoom) {
151
+ if (j.setFromSpherical(this._spherical), j.applyQuaternion(this._quatInverse), t.copy(this.target).add(j), this.object.lookAt(this.target), this.enableDamping === !0 ? (this._sphericalDelta.theta *= 1 - this.dampingFactor, this._sphericalDelta.phi *= 1 - this.dampingFactor, this._panOffset.multiplyScalar(1 - this.dampingFactor)) : (this._sphericalDelta.set(0, 0, 0), this._panOffset.set(0, 0, 0)), this.zoomToCursor && this._performCursorZoom) {
152
152
  let o = null;
153
153
  if (this.object.isPerspectiveCamera) {
154
- const a = D.length();
154
+ const a = j.length();
155
155
  o = this._clampDistance(a * this._scale);
156
156
  const l = a - o;
157
157
  this.object.position.addScaledVector(this._dollyDirection, l), this.object.updateMatrixWorld(), i = !!l;
158
158
  } else if (this.object.isOrthographicCamera) {
159
- const a = new E(this._mouse.x, this._mouse.y, 0);
159
+ const a = new M(this._mouse.x, this._mouse.y, 0);
160
160
  a.unproject(this.object);
161
161
  const l = this.object.zoom;
162
162
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), i = l !== this.object.zoom;
163
- const h = new E(this._mouse.x, this._mouse.y, 0);
164
- h.unproject(this.object), this.object.position.sub(h).add(a), this.object.updateMatrixWorld(), o = D.length();
163
+ const h = new M(this._mouse.x, this._mouse.y, 0);
164
+ h.unproject(this.object), this.object.position.sub(h).add(a), this.object.updateMatrixWorld(), o = j.length();
165
165
  } else
166
166
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
167
- o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (Ve.origin.copy(this.object.position), Ve.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Ve.direction)) < ds ? this.object.lookAt(this.target) : (Dt.setFromNormalAndCoplanarPoint(this.object.up, this.target), Ve.intersectPlane(Dt, this.target))));
167
+ o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (qe.origin.copy(this.object.position), qe.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(qe.direction)) < ds ? this.object.lookAt(this.target) : (kt.setFromNormalAndCoplanarPoint(this.object.up, this.target), qe.intersectPlane(kt, this.target))));
168
168
  } else if (this.object.isOrthographicCamera) {
169
169
  const o = this.object.zoom;
170
170
  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);
171
171
  }
172
- return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) > rt || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > rt || this._lastTargetPosition.distanceToSquared(this.target) > rt ? (this.dispatchEvent(Ct), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
172
+ return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) > lt || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > lt || this._lastTargetPosition.distanceToSquared(this.target) > lt ? (this.dispatchEvent(Nt), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
173
173
  }
174
174
  _getAutoRotationAngle(e) {
175
- return e !== null ? G / 60 * this.autoRotateSpeed * e : G / 60 / 60 * this.autoRotateSpeed;
175
+ return e !== null ? B / 60 * this.autoRotateSpeed * e : B / 60 / 60 * this.autoRotateSpeed;
176
176
  }
177
177
  _getZoomScale(e) {
178
178
  const t = Math.abs(e * 0.01);
@@ -185,18 +185,18 @@ class ps extends nn {
185
185
  this._sphericalDelta.phi -= e;
186
186
  }
187
187
  _panLeft(e, t) {
188
- D.setFromMatrixColumn(t, 0), D.multiplyScalar(-e), this._panOffset.add(D);
188
+ j.setFromMatrixColumn(t, 0), j.multiplyScalar(-e), this._panOffset.add(j);
189
189
  }
190
190
  _panUp(e, t) {
191
- this.screenSpacePanning === !0 ? D.setFromMatrixColumn(t, 1) : (D.setFromMatrixColumn(t, 0), D.crossVectors(this.object.up, D)), D.multiplyScalar(e), this._panOffset.add(D);
191
+ this.screenSpacePanning === !0 ? j.setFromMatrixColumn(t, 1) : (j.setFromMatrixColumn(t, 0), j.crossVectors(this.object.up, j)), j.multiplyScalar(e), this._panOffset.add(j);
192
192
  }
193
193
  // deltaX and deltaY are in pixels; right and down are positive
194
194
  _pan(e, t) {
195
195
  const s = this.domElement;
196
196
  if (this.object.isPerspectiveCamera) {
197
197
  const n = this.object.position;
198
- D.copy(n).sub(this.target);
199
- let i = D.length();
198
+ j.copy(n).sub(this.target);
199
+ let i = j.length();
200
200
  i *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * e * i / s.clientHeight, this.object.matrix), this._panUp(2 * t * i / s.clientHeight, this.object.matrix);
201
201
  } else this.object.isOrthographicCamera ? (this._panLeft(e * (this.object.right - this.object.left) / this.object.zoom / s.clientWidth, this.object.matrix), this._panUp(t * (this.object.top - this.object.bottom) / this.object.zoom / s.clientHeight, this.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), this.enablePan = !1);
202
202
  }
@@ -231,7 +231,7 @@ class ps extends nn {
231
231
  _handleMouseMoveRotate(e) {
232
232
  this._rotateEnd.set(e.clientX, e.clientY), this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
233
233
  const t = this.domElement;
234
- this._rotateLeft(G * this._rotateDelta.x / t.clientHeight), this._rotateUp(G * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
234
+ this._rotateLeft(B * this._rotateDelta.x / t.clientHeight), this._rotateUp(B * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
235
235
  }
236
236
  _handleMouseMoveDolly(e) {
237
237
  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();
@@ -246,16 +246,16 @@ class ps extends nn {
246
246
  let t = !1;
247
247
  switch (e.code) {
248
248
  case this.keys.UP:
249
- e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(G * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, this.keyPanSpeed), t = !0;
249
+ e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(B * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, this.keyPanSpeed), t = !0;
250
250
  break;
251
251
  case this.keys.BOTTOM:
252
- e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(-G * 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(-B * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, -this.keyPanSpeed), t = !0;
253
253
  break;
254
254
  case this.keys.LEFT:
255
- e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(G * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(this.keyPanSpeed, 0), t = !0;
255
+ e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(B * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(this.keyPanSpeed, 0), t = !0;
256
256
  break;
257
257
  case this.keys.RIGHT:
258
- e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(-G * 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(-B * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(-this.keyPanSpeed, 0), t = !0;
259
259
  break;
260
260
  }
261
261
  t && (e.preventDefault(), this.update());
@@ -295,7 +295,7 @@ class ps extends nn {
295
295
  }
296
296
  this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
297
297
  const t = this.domElement;
298
- this._rotateLeft(G * this._rotateDelta.x / t.clientHeight), this._rotateUp(G * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd);
298
+ this._rotateLeft(B * this._rotateDelta.x / t.clientHeight), this._rotateUp(B * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd);
299
299
  }
300
300
  _handleTouchMovePan(e) {
301
301
  if (this._pointers.length === 1)
@@ -337,7 +337,7 @@ class ps extends nn {
337
337
  }
338
338
  _trackPointer(e) {
339
339
  let t = this._pointerPositions[e.pointerId];
340
- t === void 0 && (t = new B(), this._pointerPositions[e.pointerId] = t), t.set(e.pageX, e.pageY);
340
+ t === void 0 && (t = new V(), this._pointerPositions[e.pointerId] = t), t.set(e.pageX, e.pageY);
341
341
  }
342
342
  _getSecondPointerPosition(e) {
343
343
  const t = e.pointerId === this._pointers[0] ? this._pointers[1] : this._pointers[0];
@@ -370,7 +370,7 @@ function ms(r) {
370
370
  function gs(r) {
371
371
  switch (this._removePointer(r), this._pointers.length) {
372
372
  case 0:
373
- this.domElement.releasePointerCapture(r.pointerId), this.domElement.ownerDocument.removeEventListener("pointermove", this._onPointerMove), this.domElement.ownerDocument.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(dn), this.state = A.NONE, this._cursorStyle === "grab" && (this.domElement.style.cursor = "grab");
373
+ this.domElement.releasePointerCapture(r.pointerId), this.domElement.ownerDocument.removeEventListener("pointermove", this._onPointerMove), this.domElement.ownerDocument.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(fn), this.state = P.NONE, this._cursorStyle === "grab" && (this.domElement.style.cursor = "grab");
374
374
  break;
375
375
  case 1:
376
376
  const e = this._pointers[0], t = this._pointerPositions[e];
@@ -394,51 +394,51 @@ function ys(r) {
394
394
  e = -1;
395
395
  }
396
396
  switch (e) {
397
- case xe.DOLLY:
397
+ case Me.DOLLY:
398
398
  if (this.enableZoom === !1) return;
399
- this._handleMouseDownDolly(r), this.state = A.DOLLY;
399
+ this._handleMouseDownDolly(r), this.state = P.DOLLY;
400
400
  break;
401
- case xe.ROTATE:
401
+ case Me.ROTATE:
402
402
  if (r.ctrlKey || r.metaKey || r.shiftKey) {
403
403
  if (this.enablePan === !1) return;
404
- this._handleMouseDownPan(r), this.state = A.PAN;
404
+ this._handleMouseDownPan(r), this.state = P.PAN;
405
405
  } else {
406
406
  if (this.enableRotate === !1) return;
407
- this._handleMouseDownRotate(r), this.state = A.ROTATE;
407
+ this._handleMouseDownRotate(r), this.state = P.ROTATE;
408
408
  }
409
409
  break;
410
- case xe.PAN:
410
+ case Me.PAN:
411
411
  if (r.ctrlKey || r.metaKey || r.shiftKey) {
412
412
  if (this.enableRotate === !1) return;
413
- this._handleMouseDownRotate(r), this.state = A.ROTATE;
413
+ this._handleMouseDownRotate(r), this.state = P.ROTATE;
414
414
  } else {
415
415
  if (this.enablePan === !1) return;
416
- this._handleMouseDownPan(r), this.state = A.PAN;
416
+ this._handleMouseDownPan(r), this.state = P.PAN;
417
417
  }
418
418
  break;
419
419
  default:
420
- this.state = A.NONE;
420
+ this.state = P.NONE;
421
421
  }
422
- this.state !== A.NONE && this.dispatchEvent(xt);
422
+ this.state !== P.NONE && this.dispatchEvent(Mt);
423
423
  }
424
424
  function _s(r) {
425
425
  switch (this.state) {
426
- case A.ROTATE:
426
+ case P.ROTATE:
427
427
  if (this.enableRotate === !1) return;
428
428
  this._handleMouseMoveRotate(r);
429
429
  break;
430
- case A.DOLLY:
430
+ case P.DOLLY:
431
431
  if (this.enableZoom === !1) return;
432
432
  this._handleMouseMoveDolly(r);
433
433
  break;
434
- case A.PAN:
434
+ case P.PAN:
435
435
  if (this.enablePan === !1) return;
436
436
  this._handleMouseMovePan(r);
437
437
  break;
438
438
  }
439
439
  }
440
440
  function bs(r) {
441
- this.enabled === !1 || this.enableZoom === !1 || this.state !== A.NONE || (r.preventDefault(), this.dispatchEvent(xt), this._handleMouseWheel(this._customWheelEvent(r)), this.dispatchEvent(dn));
441
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== P.NONE || (r.preventDefault(), this.dispatchEvent(Mt), this._handleMouseWheel(this._customWheelEvent(r)), this.dispatchEvent(fn));
442
442
  }
443
443
  function ws(r) {
444
444
  this.enabled !== !1 && this._handleKeyDown(r);
@@ -447,57 +447,57 @@ function Ts(r) {
447
447
  switch (this._trackPointer(r), this._pointers.length) {
448
448
  case 1:
449
449
  switch (this.touches.ONE) {
450
- case Te.ROTATE:
450
+ case xe.ROTATE:
451
451
  if (this.enableRotate === !1) return;
452
- this._handleTouchStartRotate(r), this.state = A.TOUCH_ROTATE;
452
+ this._handleTouchStartRotate(r), this.state = P.TOUCH_ROTATE;
453
453
  break;
454
- case Te.PAN:
454
+ case xe.PAN:
455
455
  if (this.enablePan === !1) return;
456
- this._handleTouchStartPan(r), this.state = A.TOUCH_PAN;
456
+ this._handleTouchStartPan(r), this.state = P.TOUCH_PAN;
457
457
  break;
458
458
  default:
459
- this.state = A.NONE;
459
+ this.state = P.NONE;
460
460
  }
461
461
  break;
462
462
  case 2:
463
463
  switch (this.touches.TWO) {
464
- case Te.DOLLY_PAN:
464
+ case xe.DOLLY_PAN:
465
465
  if (this.enableZoom === !1 && this.enablePan === !1) return;
466
- this._handleTouchStartDollyPan(r), this.state = A.TOUCH_DOLLY_PAN;
466
+ this._handleTouchStartDollyPan(r), this.state = P.TOUCH_DOLLY_PAN;
467
467
  break;
468
- case Te.DOLLY_ROTATE:
468
+ case xe.DOLLY_ROTATE:
469
469
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
470
- this._handleTouchStartDollyRotate(r), this.state = A.TOUCH_DOLLY_ROTATE;
470
+ this._handleTouchStartDollyRotate(r), this.state = P.TOUCH_DOLLY_ROTATE;
471
471
  break;
472
472
  default:
473
- this.state = A.NONE;
473
+ this.state = P.NONE;
474
474
  }
475
475
  break;
476
476
  default:
477
- this.state = A.NONE;
477
+ this.state = P.NONE;
478
478
  }
479
- this.state !== A.NONE && this.dispatchEvent(xt);
479
+ this.state !== P.NONE && this.dispatchEvent(Mt);
480
480
  }
481
481
  function xs(r) {
482
482
  switch (this._trackPointer(r), this.state) {
483
- case A.TOUCH_ROTATE:
483
+ case P.TOUCH_ROTATE:
484
484
  if (this.enableRotate === !1) return;
485
485
  this._handleTouchMoveRotate(r), this.update();
486
486
  break;
487
- case A.TOUCH_PAN:
487
+ case P.TOUCH_PAN:
488
488
  if (this.enablePan === !1) return;
489
489
  this._handleTouchMovePan(r), this.update();
490
490
  break;
491
- case A.TOUCH_DOLLY_PAN:
491
+ case P.TOUCH_DOLLY_PAN:
492
492
  if (this.enableZoom === !1 && this.enablePan === !1) return;
493
493
  this._handleTouchMoveDollyPan(r), this.update();
494
494
  break;
495
- case A.TOUCH_DOLLY_ROTATE:
495
+ case P.TOUCH_DOLLY_ROTATE:
496
496
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
497
497
  this._handleTouchMoveDollyRotate(r), this.update();
498
498
  break;
499
499
  default:
500
- this.state = A.NONE;
500
+ this.state = P.NONE;
501
501
  }
502
502
  }
503
503
  function Es(r) {
@@ -506,15 +506,15 @@ function Es(r) {
506
506
  function Ms(r) {
507
507
  r.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
508
508
  }
509
- function Ss(r) {
509
+ function vs(r) {
510
510
  r.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
511
511
  }
512
- const fe = new On(), j = new E(), le = new E(), O = new X(), Nt = {
513
- X: new E(1, 0, 0),
514
- Y: new E(0, 1, 0),
515
- Z: new E(0, 0, 1)
516
- }, at = { type: "change" }, kt = { type: "mouseDown", mode: null }, jt = { type: "mouseUp", mode: null }, Ht = { type: "objectChange" };
517
- class vs extends nn {
512
+ const me = new On(), F = new M(), le = new M(), O = new K(), jt = {
513
+ X: new M(1, 0, 0),
514
+ Y: new M(0, 1, 0),
515
+ Z: new M(0, 0, 1)
516
+ }, ct = { type: "change" }, Ht = { type: "mouseDown", mode: null }, Ft = { type: "mouseUp", mode: null }, Ut = { type: "objectChange" };
517
+ class Ss extends on {
518
518
  /**
519
519
  * Constructs a new controls instance.
520
520
  *
@@ -530,20 +530,20 @@ class vs extends nn {
530
530
  const i = new Ds();
531
531
  this._plane = i, s.add(i);
532
532
  const o = this;
533
- function a(M, S) {
534
- let L = S;
535
- Object.defineProperty(o, M, {
533
+ function a(x, S) {
534
+ let A = S;
535
+ Object.defineProperty(o, x, {
536
536
  get: function() {
537
- return L !== void 0 ? L : S;
537
+ return A !== void 0 ? A : S;
538
538
  },
539
539
  set: function(v) {
540
- L !== v && (L = v, i[M] = v, n[M] = v, o.dispatchEvent({ type: M + "-changed", value: v }), o.dispatchEvent(at));
540
+ A !== v && (A = v, i[x] = v, n[x] = v, o.dispatchEvent({ type: x + "-changed", value: v }), o.dispatchEvent(ct));
541
541
  }
542
- }), o[M] = S, i[M] = S, n[M] = S;
542
+ }), o[x] = S, i[x] = S, n[x] = S;
543
543
  }
544
544
  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);
545
- const l = new E(), h = new E(), u = new X(), c = new X(), d = new E(), p = new X(), f = new E(), m = new E(), y = new E(), _ = 0, x = new E();
546
- a("worldPosition", l), a("worldPositionStart", h), a("worldQuaternion", u), a("worldQuaternionStart", c), a("cameraPosition", d), a("cameraQuaternion", p), a("pointStart", f), a("pointEnd", m), a("rotationAxis", y), a("rotationAngle", _), a("eye", x), this._offset = new E(), this._startNorm = new E(), this._endNorm = new E(), this._cameraScale = new E(), this._parentPosition = new E(), this._parentQuaternion = new X(), this._parentQuaternionInv = new X(), this._parentScale = new E(), this._worldScaleStart = new E(), this._worldQuaternionInv = new X(), this._worldScale = new E(), this._positionStart = new E(), this._quaternionStart = new X(), this._scaleStart = new E(), this._getPointer = Rs.bind(this), this._onPointerDown = Ps.bind(this), this._onPointerHover = As.bind(this), this._onPointerMove = Ls.bind(this), this._onPointerUp = Is.bind(this), t !== null && this.connect(t);
545
+ const l = new M(), h = new M(), u = new K(), c = new K(), p = new M(), m = new K(), b = new M(), f = new M(), y = new M(), d = 0, _ = new M();
546
+ a("worldPosition", l), a("worldPositionStart", h), a("worldQuaternion", u), a("worldQuaternionStart", c), a("cameraPosition", p), a("cameraQuaternion", m), a("pointStart", b), a("pointEnd", f), a("rotationAxis", y), a("rotationAngle", d), a("eye", _), 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 = Rs.bind(this), this._onPointerDown = Ps.bind(this), this._onPointerHover = As.bind(this), this._onPointerMove = Ls.bind(this), this._onPointerUp = Is.bind(this), t !== null && this.connect(t);
547
547
  }
548
548
  connect(e) {
549
549
  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";
@@ -562,44 +562,44 @@ class vs extends nn {
562
562
  }
563
563
  pointerHover(e) {
564
564
  if (this.object === void 0 || this.dragging === !0) return;
565
- e !== null && fe.setFromCamera(e, this.camera);
566
- const t = lt(this._gizmo.picker[this.mode], fe);
565
+ e !== null && me.setFromCamera(e, this.camera);
566
+ const t = ht(this._gizmo.picker[this.mode], me);
567
567
  t ? this.axis = t.object.name : this.axis = null;
568
568
  }
569
569
  pointerDown(e) {
570
570
  if (!(this.object === void 0 || this.dragging === !0 || e != null && e.button !== 0) && this.axis !== null) {
571
- e !== null && fe.setFromCamera(e, this.camera);
572
- const t = lt(this._plane, fe, !0);
573
- t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, kt.mode = this.mode, this.dispatchEvent(kt);
571
+ e !== null && me.setFromCamera(e, this.camera);
572
+ const t = ht(this._plane, me, !0);
573
+ t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, Ht.mode = this.mode, this.dispatchEvent(Ht);
574
574
  }
575
575
  }
576
576
  pointerMove(e) {
577
577
  const t = this.axis, s = this.mode, n = this.object;
578
578
  let i = this.space;
579
579
  if (s === "scale" ? i = "local" : (t === "E" || t === "XYZE" || t === "XYZ") && (i = "world"), n === void 0 || t === null || this.dragging === !1 || e !== null && e.button !== -1) return;
580
- e !== null && fe.setFromCamera(e, this.camera);
581
- const o = lt(this._plane, fe, !0);
580
+ e !== null && me.setFromCamera(e, this.camera);
581
+ const o = ht(this._plane, me, !0);
582
582
  if (o) {
583
583
  if (this.pointEnd.copy(o.point).sub(this.worldPositionStart), s === "translate")
584
- this._offset.copy(this.pointEnd).sub(this.pointStart), i === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), i === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), n.position.copy(this._offset).add(this._positionStart), this.translationSnap && (i === "local" && (n.position.applyQuaternion(O.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.position.applyQuaternion(this._quaternionStart)), i === "world" && (n.parent && n.position.add(j.setFromMatrixPosition(n.parent.matrixWorld)), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.parent && n.position.sub(j.setFromMatrixPosition(n.parent.matrixWorld)))), n.position.x = Math.max(this.minX, Math.min(this.maxX, n.position.x)), n.position.y = Math.max(this.minY, Math.min(this.maxY, n.position.y)), n.position.z = Math.max(this.minZ, Math.min(this.maxZ, n.position.z));
584
+ this._offset.copy(this.pointEnd).sub(this.pointStart), i === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), i === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), n.position.copy(this._offset).add(this._positionStart), this.translationSnap && (i === "local" && (n.position.applyQuaternion(O.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.position.applyQuaternion(this._quaternionStart)), i === "world" && (n.parent && n.position.add(F.setFromMatrixPosition(n.parent.matrixWorld)), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.parent && n.position.sub(F.setFromMatrixPosition(n.parent.matrixWorld)))), n.position.x = Math.max(this.minX, Math.min(this.maxX, n.position.x)), n.position.y = Math.max(this.minY, Math.min(this.maxY, n.position.y)), n.position.z = Math.max(this.minZ, Math.min(this.maxZ, n.position.z));
585
585
  else if (s === "scale") {
586
586
  if (t.search("XYZ") !== -1) {
587
587
  let a = this.pointEnd.length() / this.pointStart.length();
588
588
  this.pointEnd.dot(this.pointStart) < 0 && (a *= -1), le.set(a, a, a);
589
589
  } else
590
- j.copy(this.pointStart), le.copy(this.pointEnd), j.applyQuaternion(this._worldQuaternionInv), le.applyQuaternion(this._worldQuaternionInv), le.divide(j), t.search("X") === -1 && (le.x = 1), t.search("Y") === -1 && (le.y = 1), t.search("Z") === -1 && (le.z = 1);
590
+ F.copy(this.pointStart), le.copy(this.pointEnd), F.applyQuaternion(this._worldQuaternionInv), le.applyQuaternion(this._worldQuaternionInv), le.divide(F), t.search("X") === -1 && (le.x = 1), t.search("Y") === -1 && (le.y = 1), t.search("Z") === -1 && (le.z = 1);
591
591
  n.scale.copy(this._scaleStart).multiply(le), this.scaleSnap && (t.search("X") !== -1 && (n.scale.x = Math.round(n.scale.x / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Y") !== -1 && (n.scale.y = Math.round(n.scale.y / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Z") !== -1 && (n.scale.z = Math.round(n.scale.z / this.scaleSnap) * this.scaleSnap || this.scaleSnap));
592
592
  } else if (s === "rotate") {
593
593
  this._offset.copy(this.pointEnd).sub(this.pointStart);
594
- const a = 20 / this.worldPosition.distanceTo(j.setFromMatrixPosition(this.camera.matrixWorld));
594
+ const a = 20 / this.worldPosition.distanceTo(F.setFromMatrixPosition(this.camera.matrixWorld));
595
595
  let l = !1;
596
- t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(j.copy(this.rotationAxis).cross(this.eye)) * a) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(Nt[t]), j.copy(Nt[t]), i === "local" && j.applyQuaternion(this.worldQuaternion), j.cross(this.eye), j.length() === 0 ? l = !0 : this.rotationAngle = this._offset.dot(j.normalize()) * a), (t === "E" || l) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), i === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(O.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), n.quaternion.copy(O.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), n.quaternion.multiply(this._quaternionStart).normalize());
596
+ t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(F.copy(this.rotationAxis).cross(this.eye)) * a) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(jt[t]), F.copy(jt[t]), i === "local" && F.applyQuaternion(this.worldQuaternion), F.cross(this.eye), F.length() === 0 ? l = !0 : this.rotationAngle = this._offset.dot(F.normalize()) * a), (t === "E" || l) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), i === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(O.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), n.quaternion.copy(O.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), n.quaternion.multiply(this._quaternionStart).normalize());
597
597
  }
598
- this.dispatchEvent(at), this.dispatchEvent(Ht);
598
+ this.dispatchEvent(ct), this.dispatchEvent(Ut);
599
599
  }
600
600
  }
601
601
  pointerUp(e) {
602
- e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (jt.mode = this.mode, this.dispatchEvent(jt)), this.dragging = !1, this.axis = null);
602
+ e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (Ft.mode = this.mode, this.dispatchEvent(Ft)), this.dragging = !1, this.axis = null);
603
603
  }
604
604
  dispose() {
605
605
  this.disconnect(), this._root.dispose();
@@ -625,7 +625,7 @@ class vs extends nn {
625
625
  * Resets the object's position, rotation and scale to when the current transform began.
626
626
  */
627
627
  reset() {
628
- this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(at), this.dispatchEvent(Ht), this.pointStart.copy(this.pointEnd));
628
+ this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(ct), this.dispatchEvent(Ut), this.pointStart.copy(this.pointEnd));
629
629
  }
630
630
  /**
631
631
  * Returns the raycaster that is used for user interaction. This object is shared between all
@@ -634,7 +634,7 @@ class vs extends nn {
634
634
  * @returns {Raycaster} The internal raycaster.
635
635
  */
636
636
  getRaycaster() {
637
- return fe;
637
+ return me;
638
638
  }
639
639
  /**
640
640
  * Returns the transformation mode.
@@ -739,15 +739,15 @@ function Ls(r) {
739
739
  function Is(r) {
740
740
  this.enabled && (this.domElement.releasePointerCapture(r.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(r)));
741
741
  }
742
- function lt(r, e, t) {
742
+ function ht(r, e, t) {
743
743
  const s = e.intersectObject(r, !0);
744
744
  for (let n = 0; n < s.length; n++)
745
745
  if (s[n].object.visible || t)
746
746
  return s[n];
747
747
  return !1;
748
748
  }
749
- const Ze = new Dn(), P = new E(0, 1, 0), Ft = new E(0, 0, 0), Ut = new Me(), Qe = new X(), et = new X(), ee = new E(), zt = new Me(), Oe = new E(1, 0, 0), ge = new E(0, 1, 0), Ce = new E(0, 0, 1), qe = new E(), Ae = new E(), Pe = new E();
750
- class Os extends je {
749
+ const We = new Dn(), L = new M(0, 1, 0), zt = new M(0, 0, 0), Gt = new Se(), $e = new K(), st = new K(), te = new M(), Xt = new Se(), De = new M(1, 0, 0), ye = new M(0, 1, 0), Ne = new M(0, 0, 1), Je = new M(), Le = new M(), Ie = new M();
750
+ class Os extends Ue {
751
751
  constructor(e) {
752
752
  super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
753
753
  }
@@ -762,16 +762,16 @@ class Os extends je {
762
762
  });
763
763
  }
764
764
  }
765
- class Cs extends je {
765
+ class Cs extends Ue {
766
766
  constructor() {
767
767
  super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
768
- const e = new ye({
768
+ const e = new _e({
769
769
  depthTest: !1,
770
770
  depthWrite: !1,
771
771
  fog: !1,
772
772
  toneMapped: !1,
773
773
  transparent: !0
774
- }), t = new De({
774
+ }), t = new ke({
775
775
  depthTest: !1,
776
776
  depthWrite: !1,
777
777
  fog: !1,
@@ -795,225 +795,225 @@ class Cs extends je {
795
795
  u.color.setHex(255), u.opacity = 0.5;
796
796
  const c = e.clone();
797
797
  c.opacity = 0.25;
798
- const d = e.clone();
799
- d.color.setHex(16776960), d.opacity = 0.25;
800
798
  const p = e.clone();
801
- p.color.setHex(16776960);
802
- const f = e.clone();
803
- f.color.setHex(7895160), this.materialLib = {
799
+ p.color.setHex(16776960), p.opacity = 0.25;
800
+ const m = e.clone();
801
+ m.color.setHex(16776960);
802
+ const b = e.clone();
803
+ b.color.setHex(7895160), this.materialLib = {
804
804
  xAxis: i,
805
805
  yAxis: o,
806
806
  zAxis: a,
807
- active: p,
807
+ active: m,
808
808
  xAxisTransparent: l,
809
809
  yAxisTransparent: h,
810
810
  zAxisTransparent: u,
811
- activeTransparent: d
811
+ activeTransparent: p
812
812
  };
813
- const m = new z(0, 0.04, 0.1, 12);
814
- m.translate(0, 0.05, 0);
815
- const y = new F(0.08, 0.08, 0.08);
813
+ const f = new Y(0, 0.04, 0.1, 12);
814
+ f.translate(0, 0.05, 0);
815
+ const y = new z(0.08, 0.08, 0.08);
816
816
  y.translate(0, 0.04, 0);
817
- const _ = new He();
818
- _.setAttribute("position", new he([0, 0, 0, 1, 0, 0], 3));
819
- const x = new z(75e-4, 75e-4, 0.5, 3);
820
- x.translate(0, 0.25, 0);
821
- function M(V, ze) {
822
- const $ = new Re(V, 75e-4, 3, 64, ze * Math.PI * 2);
823
- return $.rotateY(Math.PI / 2), $.rotateX(Math.PI / 2), $;
817
+ const d = new ze();
818
+ d.setAttribute("position", new ue([0, 0, 0, 1, 0, 0], 3));
819
+ const _ = new Y(75e-4, 75e-4, 0.5, 3);
820
+ _.translate(0, 0.25, 0);
821
+ function x(Z, Ye) {
822
+ const J = new Pe(Z, 75e-4, 3, 64, Ye * Math.PI * 2);
823
+ return J.rotateY(Math.PI / 2), J.rotateX(Math.PI / 2), J;
824
824
  }
825
825
  function S() {
826
- const V = new He();
827
- return V.setAttribute("position", new he([0, 0, 0, 1, 1, 1], 3)), V;
826
+ const Z = new ze();
827
+ return Z.setAttribute("position", new ue([0, 0, 0, 1, 1, 1], 3)), Z;
828
828
  }
829
- const L = {
829
+ const A = {
830
830
  X: [
831
- [new b(m, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
832
- [new b(m, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]],
833
- [new b(x, i), [0, 0, 0], [0, 0, -Math.PI / 2]]
831
+ [new w(f, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
832
+ [new w(f, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]],
833
+ [new w(_, i), [0, 0, 0], [0, 0, -Math.PI / 2]]
834
834
  ],
835
835
  Y: [
836
- [new b(m, o), [0, 0.5, 0]],
837
- [new b(m, o), [0, -0.5, 0], [Math.PI, 0, 0]],
838
- [new b(x, o)]
836
+ [new w(f, o), [0, 0.5, 0]],
837
+ [new w(f, o), [0, -0.5, 0], [Math.PI, 0, 0]],
838
+ [new w(_, o)]
839
839
  ],
840
840
  Z: [
841
- [new b(m, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
842
- [new b(m, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]],
843
- [new b(x, a), null, [Math.PI / 2, 0, 0]]
841
+ [new w(f, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
842
+ [new w(f, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]],
843
+ [new w(_, a), null, [Math.PI / 2, 0, 0]]
844
844
  ],
845
845
  XYZ: [
846
- [new b(new Ke(0.1, 0), c), [0, 0, 0]]
846
+ [new w(new Qe(0.1, 0), c), [0, 0, 0]]
847
847
  ],
848
848
  XY: [
849
- [new b(new F(0.15, 0.15, 0.01), u), [0.15, 0.15, 0]]
849
+ [new w(new z(0.15, 0.15, 0.01), u), [0.15, 0.15, 0]]
850
850
  ],
851
851
  YZ: [
852
- [new b(new F(0.15, 0.15, 0.01), l), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
852
+ [new w(new z(0.15, 0.15, 0.01), l), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
853
853
  ],
854
854
  XZ: [
855
- [new b(new F(0.15, 0.15, 0.01), h), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
855
+ [new w(new z(0.15, 0.15, 0.01), h), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
856
856
  ]
857
857
  }, v = {
858
858
  X: [
859
- [new b(new z(0.2, 0, 0.6, 4), s), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
860
- [new b(new z(0.2, 0, 0.6, 4), s), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
859
+ [new w(new Y(0.2, 0, 0.6, 4), s), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
860
+ [new w(new Y(0.2, 0, 0.6, 4), s), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
861
861
  ],
862
862
  Y: [
863
- [new b(new z(0.2, 0, 0.6, 4), s), [0, 0.3, 0]],
864
- [new b(new z(0.2, 0, 0.6, 4), s), [0, -0.3, 0], [0, 0, Math.PI]]
863
+ [new w(new Y(0.2, 0, 0.6, 4), s), [0, 0.3, 0]],
864
+ [new w(new Y(0.2, 0, 0.6, 4), s), [0, -0.3, 0], [0, 0, Math.PI]]
865
865
  ],
866
866
  Z: [
867
- [new b(new z(0.2, 0, 0.6, 4), s), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
868
- [new b(new z(0.2, 0, 0.6, 4), s), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
867
+ [new w(new Y(0.2, 0, 0.6, 4), s), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
868
+ [new w(new Y(0.2, 0, 0.6, 4), s), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
869
869
  ],
870
870
  XYZ: [
871
- [new b(new Ke(0.2, 0), s)]
871
+ [new w(new Qe(0.2, 0), s)]
872
872
  ],
873
873
  XY: [
874
- [new b(new F(0.2, 0.2, 0.01), s), [0.15, 0.15, 0]]
874
+ [new w(new z(0.2, 0.2, 0.01), s), [0.15, 0.15, 0]]
875
875
  ],
876
876
  YZ: [
877
- [new b(new F(0.2, 0.2, 0.01), s), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
877
+ [new w(new z(0.2, 0.2, 0.01), s), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
878
878
  ],
879
879
  XZ: [
880
- [new b(new F(0.2, 0.2, 0.01), s), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
880
+ [new w(new z(0.2, 0.2, 0.01), s), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
881
881
  ]
882
882
  }, I = {
883
883
  START: [
884
- [new b(new Ke(0.01, 2), n), null, null, null, "helper"]
884
+ [new w(new Qe(0.01, 2), n), null, null, null, "helper"]
885
885
  ],
886
886
  END: [
887
- [new b(new Ke(0.01, 2), n), null, null, null, "helper"]
887
+ [new w(new Qe(0.01, 2), n), null, null, null, "helper"]
888
888
  ],
889
889
  DELTA: [
890
890
  [new re(S(), n), null, null, null, "helper"]
891
891
  ],
892
892
  X: [
893
- [new re(_, n), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
893
+ [new re(d, n), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
894
894
  ],
895
895
  Y: [
896
- [new re(_, n), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
896
+ [new re(d, n), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
897
897
  ],
898
898
  Z: [
899
- [new re(_, n), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
899
+ [new re(d, n), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
900
900
  ]
901
- }, se = {
901
+ }, ie = {
902
902
  XYZE: [
903
- [new b(M(0.5, 1), f), null, [0, Math.PI / 2, 0]]
903
+ [new w(x(0.5, 1), b), null, [0, Math.PI / 2, 0]]
904
904
  ],
905
905
  X: [
906
- [new b(M(0.5, 0.5), i)]
906
+ [new w(x(0.5, 0.5), i)]
907
907
  ],
908
908
  Y: [
909
- [new b(M(0.5, 0.5), o), null, [0, 0, -Math.PI / 2]]
909
+ [new w(x(0.5, 0.5), o), null, [0, 0, -Math.PI / 2]]
910
910
  ],
911
911
  Z: [
912
- [new b(M(0.5, 0.5), a), null, [0, Math.PI / 2, 0]]
912
+ [new w(x(0.5, 0.5), a), null, [0, Math.PI / 2, 0]]
913
913
  ],
914
914
  E: [
915
- [new b(M(0.75, 1), d), null, [0, Math.PI / 2, 0]]
915
+ [new w(x(0.75, 1), p), null, [0, Math.PI / 2, 0]]
916
916
  ]
917
- }, J = {
917
+ }, ee = {
918
918
  AXIS: [
919
- [new re(_, n), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
919
+ [new re(d, n), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
920
920
  ]
921
- }, de = {
921
+ }, fe = {
922
922
  XYZE: [
923
- [new b(new Cn(0.25, 10, 8), s)]
923
+ [new w(new Cn(0.25, 10, 8), s)]
924
924
  ],
925
925
  X: [
926
- [new b(new Re(0.5, 0.1, 4, 24), s), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
926
+ [new w(new Pe(0.5, 0.1, 4, 24), s), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
927
927
  ],
928
928
  Y: [
929
- [new b(new Re(0.5, 0.1, 4, 24), s), [0, 0, 0], [Math.PI / 2, 0, 0]]
929
+ [new w(new Pe(0.5, 0.1, 4, 24), s), [0, 0, 0], [Math.PI / 2, 0, 0]]
930
930
  ],
931
931
  Z: [
932
- [new b(new Re(0.5, 0.1, 4, 24), s), [0, 0, 0], [0, 0, -Math.PI / 2]]
932
+ [new w(new Pe(0.5, 0.1, 4, 24), s), [0, 0, 0], [0, 0, -Math.PI / 2]]
933
933
  ],
934
934
  E: [
935
- [new b(new Re(0.75, 0.1, 2, 24), s)]
935
+ [new w(new Pe(0.75, 0.1, 2, 24), s)]
936
936
  ]
937
- }, W = {
937
+ }, $ = {
938
938
  X: [
939
- [new b(y, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
940
- [new b(x, i), [0, 0, 0], [0, 0, -Math.PI / 2]],
941
- [new b(y, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]]
939
+ [new w(y, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
940
+ [new w(_, i), [0, 0, 0], [0, 0, -Math.PI / 2]],
941
+ [new w(y, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]]
942
942
  ],
943
943
  Y: [
944
- [new b(y, o), [0, 0.5, 0]],
945
- [new b(x, o)],
946
- [new b(y, o), [0, -0.5, 0], [0, 0, Math.PI]]
944
+ [new w(y, o), [0, 0.5, 0]],
945
+ [new w(_, o)],
946
+ [new w(y, o), [0, -0.5, 0], [0, 0, Math.PI]]
947
947
  ],
948
948
  Z: [
949
- [new b(y, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
950
- [new b(x, a), [0, 0, 0], [Math.PI / 2, 0, 0]],
951
- [new b(y, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]]
949
+ [new w(y, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
950
+ [new w(_, a), [0, 0, 0], [Math.PI / 2, 0, 0]],
951
+ [new w(y, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]]
952
952
  ],
953
953
  XY: [
954
- [new b(new F(0.15, 0.15, 0.01), u), [0.15, 0.15, 0]]
954
+ [new w(new z(0.15, 0.15, 0.01), u), [0.15, 0.15, 0]]
955
955
  ],
956
956
  YZ: [
957
- [new b(new F(0.15, 0.15, 0.01), l), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
957
+ [new w(new z(0.15, 0.15, 0.01), l), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
958
958
  ],
959
959
  XZ: [
960
- [new b(new F(0.15, 0.15, 0.01), h), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
960
+ [new w(new z(0.15, 0.15, 0.01), h), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
961
961
  ],
962
962
  XYZ: [
963
- [new b(new F(0.1, 0.1, 0.1), c)]
963
+ [new w(new z(0.1, 0.1, 0.1), c)]
964
964
  ]
965
- }, T = {
965
+ }, E = {
966
966
  X: [
967
- [new b(new z(0.2, 0, 0.6, 4), s), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
968
- [new b(new z(0.2, 0, 0.6, 4), s), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
967
+ [new w(new Y(0.2, 0, 0.6, 4), s), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
968
+ [new w(new Y(0.2, 0, 0.6, 4), s), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
969
969
  ],
970
970
  Y: [
971
- [new b(new z(0.2, 0, 0.6, 4), s), [0, 0.3, 0]],
972
- [new b(new z(0.2, 0, 0.6, 4), s), [0, -0.3, 0], [0, 0, Math.PI]]
971
+ [new w(new Y(0.2, 0, 0.6, 4), s), [0, 0.3, 0]],
972
+ [new w(new Y(0.2, 0, 0.6, 4), s), [0, -0.3, 0], [0, 0, Math.PI]]
973
973
  ],
974
974
  Z: [
975
- [new b(new z(0.2, 0, 0.6, 4), s), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
976
- [new b(new z(0.2, 0, 0.6, 4), s), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
975
+ [new w(new Y(0.2, 0, 0.6, 4), s), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
976
+ [new w(new Y(0.2, 0, 0.6, 4), s), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
977
977
  ],
978
978
  XY: [
979
- [new b(new F(0.2, 0.2, 0.01), s), [0.15, 0.15, 0]]
979
+ [new w(new z(0.2, 0.2, 0.01), s), [0.15, 0.15, 0]]
980
980
  ],
981
981
  YZ: [
982
- [new b(new F(0.2, 0.2, 0.01), s), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
982
+ [new w(new z(0.2, 0.2, 0.01), s), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
983
983
  ],
984
984
  XZ: [
985
- [new b(new F(0.2, 0.2, 0.01), s), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
985
+ [new w(new z(0.2, 0.2, 0.01), s), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
986
986
  ],
987
987
  XYZ: [
988
- [new b(new F(0.2, 0.2, 0.2), s), [0, 0, 0]]
988
+ [new w(new z(0.2, 0.2, 0.2), s), [0, 0, 0]]
989
989
  ]
990
- }, k = {
990
+ }, H = {
991
991
  X: [
992
- [new re(_, n), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
992
+ [new re(d, n), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
993
993
  ],
994
994
  Y: [
995
- [new re(_, n), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
995
+ [new re(d, n), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
996
996
  ],
997
997
  Z: [
998
- [new re(_, n), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
998
+ [new re(d, n), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
999
999
  ]
1000
1000
  };
1001
- function ie(V) {
1002
- const ze = new je();
1003
- for (const $ in V)
1004
- for (let we = V[$].length; we--; ) {
1005
- const U = V[$][we][0].clone(), Ge = V[$][we][1], Xe = V[$][we][2], Ye = V[$][we][3], _n = V[$][we][4];
1006
- U.name = $, U.tag = _n, Ge && U.position.set(Ge[0], Ge[1], Ge[2]), Xe && U.rotation.set(Xe[0], Xe[1], Xe[2]), Ye && U.scale.set(Ye[0], Ye[1], Ye[2]), U.updateMatrix();
1007
- const St = U.geometry.clone();
1008
- St.applyMatrix4(U.matrix), U.geometry = St, U.renderOrder = 1 / 0, U.position.set(0, 0, 0), U.rotation.set(0, 0, 0), U.scale.set(1, 1, 1), ze.add(U);
1001
+ function oe(Z) {
1002
+ const Ye = new Ue();
1003
+ for (const J in Z)
1004
+ for (let Te = Z[J].length; Te--; ) {
1005
+ const X = Z[J][Te][0].clone(), Be = Z[J][Te][1], Ke = Z[J][Te][2], Ve = Z[J][Te][3], wn = Z[J][Te][4];
1006
+ X.name = J, X.tag = wn, Be && X.position.set(Be[0], Be[1], Be[2]), Ke && X.rotation.set(Ke[0], Ke[1], Ke[2]), Ve && X.scale.set(Ve[0], Ve[1], Ve[2]), X.updateMatrix();
1007
+ const Rt = X.geometry.clone();
1008
+ Rt.applyMatrix4(X.matrix), X.geometry = Rt, X.renderOrder = 1 / 0, X.position.set(0, 0, 0), X.rotation.set(0, 0, 0), X.scale.set(1, 1, 1), Ye.add(X);
1009
1009
  }
1010
- return ze;
1010
+ return Ye;
1011
1011
  }
1012
- this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = ie(L)), this.add(this.gizmo.rotate = ie(se)), this.add(this.gizmo.scale = ie(W)), this.add(this.picker.translate = ie(v)), this.add(this.picker.rotate = ie(de)), this.add(this.picker.scale = ie(T)), this.add(this.helper.translate = ie(I)), this.add(this.helper.rotate = ie(J)), this.add(this.helper.scale = ie(k)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
1012
+ this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = oe(A)), this.add(this.gizmo.rotate = oe(ie)), this.add(this.gizmo.scale = oe($)), this.add(this.picker.translate = oe(v)), this.add(this.picker.rotate = oe(fe)), this.add(this.picker.scale = oe(E)), this.add(this.helper.translate = oe(I)), this.add(this.helper.rotate = oe(ee)), this.add(this.helper.scale = oe(H)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
1013
1013
  }
1014
1014
  // updateMatrixWorld will update transformations and appearance of individual handles
1015
1015
  updateMatrixWorld(e) {
1016
- const s = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : et;
1016
+ const s = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : st;
1017
1017
  this.gizmo.translate.visible = this.mode === "translate", this.gizmo.rotate.visible = this.mode === "rotate", this.gizmo.scale.visible = this.mode === "scale", this.helper.translate.visible = this.mode === "translate", this.helper.rotate.visible = this.mode === "rotate", this.helper.scale.visible = this.mode === "scale";
1018
1018
  let n = [];
1019
1019
  n = n.concat(this.picker[this.mode].children), n = n.concat(this.gizmo[this.mode].children), n = n.concat(this.helper[this.mode].children);
@@ -1022,61 +1022,62 @@ class Cs extends je {
1022
1022
  o.visible = !0, o.rotation.set(0, 0, 0), o.position.copy(this.worldPosition);
1023
1023
  let a;
1024
1024
  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") {
1025
- o.visible = !1, o.name === "AXIS" ? (o.visible = !!this.axis, this.axis === "X" && (O.setFromEuler(Ze.set(0, 0, 0)), o.quaternion.copy(s).multiply(O), Math.abs(P.copy(Oe).applyQuaternion(s).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Y" && (O.setFromEuler(Ze.set(0, 0, Math.PI / 2)), o.quaternion.copy(s).multiply(O), Math.abs(P.copy(ge).applyQuaternion(s).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Z" && (O.setFromEuler(Ze.set(0, Math.PI / 2, 0)), o.quaternion.copy(s).multiply(O), Math.abs(P.copy(Ce).applyQuaternion(s).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "XYZE" && (O.setFromEuler(Ze.set(0, Math.PI / 2, 0)), P.copy(this.rotationAxis), o.quaternion.setFromRotationMatrix(Ut.lookAt(Ft, P, ge)), o.quaternion.multiply(O), 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), j.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), j.applyQuaternion(this.worldQuaternionStart.clone().invert()), o.scale.copy(j), o.visible = this.dragging) : (o.quaternion.copy(s), this.dragging ? o.position.copy(this.worldPositionStart) : o.position.copy(this.worldPosition), this.axis && (o.visible = this.axis.search(o.name) !== -1));
1025
+ o.visible = !1, o.name === "AXIS" ? (o.visible = !!this.axis, this.axis === "X" && (O.setFromEuler(We.set(0, 0, 0)), o.quaternion.copy(s).multiply(O), Math.abs(L.copy(De).applyQuaternion(s).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Y" && (O.setFromEuler(We.set(0, 0, Math.PI / 2)), o.quaternion.copy(s).multiply(O), Math.abs(L.copy(ye).applyQuaternion(s).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Z" && (O.setFromEuler(We.set(0, Math.PI / 2, 0)), o.quaternion.copy(s).multiply(O), Math.abs(L.copy(Ne).applyQuaternion(s).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "XYZE" && (O.setFromEuler(We.set(0, Math.PI / 2, 0)), L.copy(this.rotationAxis), o.quaternion.setFromRotationMatrix(Gt.lookAt(zt, L, ye)), o.quaternion.multiply(O), 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), F.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), F.applyQuaternion(this.worldQuaternionStart.clone().invert()), o.scale.copy(F), o.visible = this.dragging) : (o.quaternion.copy(s), this.dragging ? o.position.copy(this.worldPositionStart) : o.position.copy(this.worldPosition), this.axis && (o.visible = this.axis.search(o.name) !== -1));
1026
1026
  continue;
1027
1027
  }
1028
- o.quaternion.copy(s), this.mode === "translate" || this.mode === "scale" ? (o.name === "X" && Math.abs(P.copy(Oe).applyQuaternion(s).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Y" && Math.abs(P.copy(ge).applyQuaternion(s).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Z" && Math.abs(P.copy(Ce).applyQuaternion(s).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XY" && Math.abs(P.copy(Ce).applyQuaternion(s).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "YZ" && Math.abs(P.copy(Oe).applyQuaternion(s).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XZ" && Math.abs(P.copy(ge).applyQuaternion(s).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1)) : this.mode === "rotate" && (Qe.copy(s), P.copy(this.eye).applyQuaternion(O.copy(s).invert()), o.name.search("E") !== -1 && o.quaternion.setFromRotationMatrix(Ut.lookAt(this.eye, Ft, ge)), o.name === "X" && (O.setFromAxisAngle(Oe, Math.atan2(-P.y, P.z)), O.multiplyQuaternions(Qe, O), o.quaternion.copy(O)), o.name === "Y" && (O.setFromAxisAngle(ge, Math.atan2(P.x, P.z)), O.multiplyQuaternions(Qe, O), o.quaternion.copy(O)), o.name === "Z" && (O.setFromAxisAngle(Ce, Math.atan2(P.y, P.x)), O.multiplyQuaternions(Qe, O), o.quaternion.copy(O))), 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) {
1028
+ o.quaternion.copy(s), this.mode === "translate" || this.mode === "scale" ? (o.name === "X" && Math.abs(L.copy(De).applyQuaternion(s).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Y" && Math.abs(L.copy(ye).applyQuaternion(s).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Z" && Math.abs(L.copy(Ne).applyQuaternion(s).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XY" && Math.abs(L.copy(Ne).applyQuaternion(s).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "YZ" && Math.abs(L.copy(De).applyQuaternion(s).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XZ" && Math.abs(L.copy(ye).applyQuaternion(s).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1)) : this.mode === "rotate" && ($e.copy(s), L.copy(this.eye).applyQuaternion(O.copy(s).invert()), o.name.search("E") !== -1 && o.quaternion.setFromRotationMatrix(Gt.lookAt(this.eye, zt, ye)), o.name === "X" && (O.setFromAxisAngle(De, Math.atan2(-L.y, L.z)), O.multiplyQuaternions($e, O), o.quaternion.copy(O)), o.name === "Y" && (O.setFromAxisAngle(ye, Math.atan2(L.x, L.z)), O.multiplyQuaternions($e, O), o.quaternion.copy(O)), o.name === "Z" && (O.setFromAxisAngle(Ne, Math.atan2(L.y, L.x)), O.multiplyQuaternions($e, O), o.quaternion.copy(O))), 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) {
1029
1029
  return o.name === l;
1030
1030
  }) && (o.material.color.copy(this.materialLib.active.color), o.material.opacity = 1));
1031
1031
  }
1032
1032
  super.updateMatrixWorld(e);
1033
1033
  }
1034
1034
  }
1035
- class Ds extends b {
1035
+ class Ds extends w {
1036
1036
  constructor() {
1037
1037
  super(
1038
1038
  new Nn(1e5, 1e5, 2, 2),
1039
- new ye({ visible: !1, wireframe: !0, side: on, transparent: !0, opacity: 0.1, toneMapped: !1 })
1039
+ new _e({ visible: !1, wireframe: !0, side: an, transparent: !0, opacity: 0.1, toneMapped: !1 })
1040
1040
  ), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
1041
1041
  }
1042
1042
  updateMatrixWorld(e) {
1043
1043
  let t = this.space;
1044
- switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), qe.copy(Oe).applyQuaternion(t === "local" ? this.worldQuaternion : et), Ae.copy(ge).applyQuaternion(t === "local" ? this.worldQuaternion : et), Pe.copy(Ce).applyQuaternion(t === "local" ? this.worldQuaternion : et), P.copy(Ae), this.mode) {
1044
+ switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Je.copy(De).applyQuaternion(t === "local" ? this.worldQuaternion : st), Le.copy(ye).applyQuaternion(t === "local" ? this.worldQuaternion : st), Ie.copy(Ne).applyQuaternion(t === "local" ? this.worldQuaternion : st), L.copy(Le), this.mode) {
1045
1045
  case "translate":
1046
1046
  case "scale":
1047
1047
  switch (this.axis) {
1048
1048
  case "X":
1049
- P.copy(this.eye).cross(qe), ee.copy(qe).cross(P);
1049
+ L.copy(this.eye).cross(Je), te.copy(Je).cross(L);
1050
1050
  break;
1051
1051
  case "Y":
1052
- P.copy(this.eye).cross(Ae), ee.copy(Ae).cross(P);
1052
+ L.copy(this.eye).cross(Le), te.copy(Le).cross(L);
1053
1053
  break;
1054
1054
  case "Z":
1055
- P.copy(this.eye).cross(Pe), ee.copy(Pe).cross(P);
1055
+ L.copy(this.eye).cross(Ie), te.copy(Ie).cross(L);
1056
1056
  break;
1057
1057
  case "XY":
1058
- ee.copy(Pe);
1058
+ te.copy(Ie);
1059
1059
  break;
1060
1060
  case "YZ":
1061
- ee.copy(qe);
1061
+ te.copy(Je);
1062
1062
  break;
1063
1063
  case "XZ":
1064
- P.copy(Pe), ee.copy(Ae);
1064
+ L.copy(Ie), te.copy(Le);
1065
1065
  break;
1066
1066
  case "XYZ":
1067
1067
  case "E":
1068
- ee.set(0, 0, 0);
1068
+ te.set(0, 0, 0);
1069
1069
  break;
1070
1070
  }
1071
1071
  break;
1072
1072
  case "rotate":
1073
1073
  default:
1074
- ee.set(0, 0, 0);
1074
+ te.set(0, 0, 0);
1075
1075
  }
1076
- ee.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (zt.lookAt(j.set(0, 0, 0), ee, P), this.quaternion.setFromRotationMatrix(zt)), super.updateMatrixWorld(e);
1076
+ te.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (Xt.lookAt(F.set(0, 0, 0), te, L), this.quaternion.setFromRotationMatrix(Xt)), super.updateMatrixWorld(e);
1077
1077
  }
1078
1078
  }
1079
- const w = {
1079
+ const T = {
1080
+ mode: "",
1080
1081
  /** Three.js 场景 */
1081
1082
  scene: null,
1082
1083
  /** 透视相机 */
@@ -1094,138 +1095,153 @@ const w = {
1094
1095
  /** 当前选中的物体 */
1095
1096
  selectedObject: null
1096
1097
  };
1097
- let ct = !1, ve = !1, _e = null, _t = null, tt = null, be = [];
1098
- function Ns(r) {
1099
- w.container = r, ks(), js(), Hs(), Fs(), zs(), Us(), Qs(), Gs(), pn(), r.addEventListener("click", Ys), window.addEventListener("resize", Xs);
1098
+ let ut = !1, Ae = !1, be = null, wt = null, it = null, we = [];
1099
+ function Ns(r, e = "edit") {
1100
+ T.container = r, T.mode = e, ks(), js(), e === "edit" && Hs(), Fs(), zs(), Us(), Qs(), Gs(), mn(), e === "edit" && r.addEventListener("click", Ys), window.addEventListener("resize", Xs);
1100
1101
  }
1101
1102
  function ks() {
1102
- const r = new N.WebGLRenderer({ antialias: !0, alpha: !0 });
1103
- r.setSize(w.container.clientWidth, w.container.clientHeight), r.setPixelRatio(Math.min(window.devicePixelRatio, 2)), w.container.appendChild(r.domElement), w.renderer = r;
1103
+ const r = new k.WebGLRenderer({ antialias: !0, alpha: !0 });
1104
+ r.setSize(T.container.clientWidth, T.container.clientHeight), r.setPixelRatio(Math.min(window.devicePixelRatio, 2)), T.container.appendChild(r.domElement), T.renderer = r;
1104
1105
  }
1105
1106
  function js() {
1106
- w.scene = new N.Scene(), w.scene.name = "sl_scene";
1107
+ T.scene = new k.Scene(), T.scene.name = "sl_scene";
1107
1108
  }
1108
1109
  function Hs() {
1109
- const r = new N.GridHelper(30, 30, 8956671, 3364232);
1110
- r.name = "地板", w.scene.add(r), w.gridHelper = r;
1110
+ const r = new k.GridHelper(30, 30, 8956671, 3364232);
1111
+ r.name = "地板", T.scene.add(r), T.gridHelper = r;
1111
1112
  }
1112
1113
  function Fs() {
1113
- const r = w.container, e = r.clientWidth / r.clientHeight, t = new N.PerspectiveCamera(45, e, 0.1, 1e3);
1114
- t.position.set(0, 6, 15), t.lookAt(0, 0, 0), w.camera = t;
1114
+ const r = T.container, e = r.clientWidth / r.clientHeight, t = new k.PerspectiveCamera(45, e, 0.1, 1e3);
1115
+ t.position.set(0, 6, 15), t.lookAt(0, 0, 0), T.camera = t;
1115
1116
  }
1116
1117
  function Us() {
1117
- const r = new ps(w.camera, w.renderer.domElement);
1118
+ const r = new ps(T.camera, T.renderer.domElement);
1118
1119
  r.minDistance = 0, r.maxDistance = 1 / 0, r.addEventListener("start", () => {
1119
- ct = !1;
1120
+ ut = !1;
1120
1121
  }), r.addEventListener("change", () => {
1121
- ct = !0;
1122
+ ut = !0;
1122
1123
  }), r.addEventListener("end", () => {
1123
- ct && (ve = !0, setTimeout(() => {
1124
- ve = !1;
1124
+ ut && (Ae = !0, setTimeout(() => {
1125
+ Ae = !1;
1125
1126
  }, 200));
1126
- }), w.orbitControls = r;
1127
+ }), T.orbitControls = r;
1127
1128
  }
1128
1129
  function zs() {
1129
- const r = new vs(
1130
- w.camera,
1131
- w.renderer.domElement
1130
+ const r = new Ss(
1131
+ T.camera,
1132
+ T.renderer.domElement
1132
1133
  );
1133
1134
  r.addEventListener("dragging-changed", (e) => {
1134
- w.orbitControls.enabled = !e.value, e.value || (ve = !0, setTimeout(() => {
1135
- ve = !1;
1135
+ T.orbitControls.enabled = !e.value, e.value || (Ae = !0, setTimeout(() => {
1136
+ Ae = !1;
1136
1137
  }, 200));
1137
1138
  }), r.addEventListener("objectChange", () => {
1138
- _t && w.selectedObject && _t(w.selectedObject);
1139
- }), w.scene.add(r.getHelper()), w.transformControls = r;
1139
+ wt && T.selectedObject && wt(T.selectedObject);
1140
+ }), T.scene.add(r.getHelper()), T.transformControls = r;
1140
1141
  }
1141
1142
  function Gs() {
1142
- const r = new N.AmbientLight(16777215, 2);
1143
- w.scene.add(r);
1144
- const e = new N.DirectionalLight(16777215, 3);
1145
- e.position.set(48, 104, 138), w.scene.add(e);
1146
- const t = new N.BoxGeometry(1, 1, 1), s = new N.MeshStandardMaterial({ color: 16777215 }), n = new N.Mesh(t, s);
1147
- n.position.y = 1, n.userData.isMovable = !0, n.name = "默认立方体", nt(n, !0);
1148
- }
1149
- function pn() {
1143
+ const r = new k.AmbientLight(16777215, 2);
1144
+ T.scene.add(r);
1145
+ const e = new k.DirectionalLight(16777215, 3);
1146
+ e.position.set(48, 104, 138), T.scene.add(e);
1147
+ const t = new k.BoxGeometry(1, 1, 1), s = new k.MeshStandardMaterial({ color: 16777215 }), n = new k.Mesh(t, s);
1148
+ n.position.y = 1, n.userData.isMovable = !0, n.name = "默认立方体", rt(n, !0);
1149
+ }
1150
+ function mn() {
1150
1151
  var r, e;
1151
- requestAnimationFrame(pn), us.update(), (r = w.orbitControls) == null || r.update(), (e = w.renderer) == null || e.render(w.scene, w.camera);
1152
+ requestAnimationFrame(mn), us.update(), (r = T.orbitControls) == null || r.update(), (e = T.renderer) == null || e.render(T.scene, T.camera);
1152
1153
  }
1153
1154
  function Xs() {
1154
- if (!w.container || !w.camera || !w.renderer) return;
1155
- const r = w.container.clientWidth, e = w.container.clientHeight;
1156
- r === 0 || e === 0 || (w.camera.aspect = r / e, w.camera.updateProjectionMatrix(), w.renderer.setSize(r, e));
1155
+ if (!T.container || !T.camera || !T.renderer) return;
1156
+ const r = T.container.clientWidth, e = T.container.clientHeight;
1157
+ r === 0 || e === 0 || (T.camera.aspect = r / e, T.camera.updateProjectionMatrix(), T.renderer.setSize(r, e));
1157
1158
  }
1158
- function Et(r) {
1159
- w.selectedObject !== r && (w.selectedObject && w.transformControls.detach(), w.selectedObject = r, w.transformControls.attach(r), w.transformControls.setMode("translate"), w.transformControls.showX = !0, w.transformControls.showY = !0, w.transformControls.showZ = !0, _e == null || _e(r));
1159
+ function vt(r) {
1160
+ T.selectedObject !== r && (T.selectedObject && T.transformControls.detach(), T.selectedObject = r, T.transformControls.attach(r), T.transformControls.setMode("translate"), T.transformControls.showX = !0, T.transformControls.showY = !0, T.transformControls.showZ = !0, be == null || be(r));
1160
1161
  }
1161
- function fn() {
1162
- w.selectedObject && (w.transformControls.detach(), w.selectedObject = null, _e == null || _e(null));
1162
+ function gn() {
1163
+ T.selectedObject && (T.transformControls.detach(), T.selectedObject = null, be == null || be(null));
1163
1164
  }
1164
1165
  function Ys(r) {
1165
- if (ve) {
1166
- ve = !1;
1166
+ if (Ae) {
1167
+ Ae = !1;
1167
1168
  return;
1168
1169
  }
1169
- const e = w.renderer.domElement.getBoundingClientRect(), t = new N.Vector2(
1170
+ const e = T.renderer.domElement.getBoundingClientRect(), t = new k.Vector2(
1170
1171
  (r.clientX - e.left) / e.width * 2 - 1,
1171
1172
  -((r.clientY - e.top) / e.height) * 2 + 1
1172
- ), s = new N.Raycaster();
1173
- s.setFromCamera(t, w.camera);
1173
+ ), s = new k.Raycaster();
1174
+ s.setFromCamera(t, T.camera);
1174
1175
  const n = [];
1175
- w.scene.traverse((o) => {
1176
+ T.scene.traverse((o) => {
1176
1177
  o.type === "Mesh" && o.userData.isMovable && n.push(o);
1177
1178
  });
1178
1179
  const i = s.intersectObjects(n);
1179
- i.length > 0 ? Et(i[0].object) : fn();
1180
+ i.length > 0 ? vt(i[0].object) : gn();
1180
1181
  }
1181
- function nt(r, e = !1) {
1182
- w.scene.add(r), r.userData.isMovable && (Vs(r), Mt()), e && Et(r);
1182
+ function rt(r, e = !1) {
1183
+ T.scene.add(r), r.userData.isMovable && (Vs(r), St()), e && T.mode === "edit" && vt(r);
1183
1184
  }
1184
1185
  function Bs(r) {
1185
- w.selectedObject === r && fn(), r.parent ? r.parent.remove(r) : w.scene.remove(r), Zs(r), Mt();
1186
+ T.selectedObject === r && gn(), r.parent ? r.parent.remove(r) : T.scene.remove(r), Zs(r), St();
1186
1187
  }
1187
1188
  function Ks(r) {
1188
- const e = w.scene.getObjectByProperty("uuid", r);
1189
+ const e = T.scene.getObjectByProperty("uuid", r);
1189
1190
  e && Bs(e);
1190
1191
  }
1191
1192
  function Vs(r) {
1192
- r.userData.isMovable && r.parent === w.scene && (be.includes(r) || be.push(r));
1193
+ r.userData.isMovable && r.parent === T.scene && (we.includes(r) || we.push(r));
1193
1194
  }
1194
1195
  function Zs(r) {
1195
- const e = be.indexOf(r);
1196
- e !== -1 && be.splice(e, 1);
1196
+ const e = we.indexOf(r);
1197
+ e !== -1 && we.splice(e, 1);
1197
1198
  }
1198
1199
  function Qs() {
1199
1200
  const r = [];
1200
- w.scene.children.forEach((e) => {
1201
+ T.scene.children.forEach((e) => {
1201
1202
  e.userData.isMovable && r.push(e);
1202
- }), be = r, Mt();
1203
+ }), we = r, St();
1203
1204
  }
1204
- function Mt() {
1205
- tt == null || tt([...be]);
1205
+ function St() {
1206
+ it == null || it([...we]);
1206
1207
  }
1207
1208
  function qs(r) {
1208
- _e = r;
1209
+ be = r;
1209
1210
  }
1210
1211
  function Ws(r) {
1211
- _t = r;
1212
+ wt = r;
1212
1213
  }
1213
1214
  function $s(r) {
1214
- tt = r;
1215
+ it = r;
1215
1216
  }
1216
1217
  function Js() {
1217
- return be;
1218
+ return we;
1218
1219
  }
1219
- function Oo() {
1220
- return w.scene;
1220
+ function zo() {
1221
+ return T.scene;
1221
1222
  }
1222
- function Co() {
1223
- return w.camera;
1223
+ function Go() {
1224
+ return T.camera;
1224
1225
  }
1225
- function Do() {
1226
- return w.renderer;
1226
+ function Xo() {
1227
+ return T.renderer;
1227
1228
  }
1228
- const ei = /^[og]\s*(.+)?/, ti = /^mtllib /, ni = /^usemtl /, si = /^usemap /, Gt = /\s+/, Xt = new E(), ht = new E(), Yt = new E(), Bt = new E(), Z = new E(), We = new ue();
1229
+ function Yo(r) {
1230
+ const e = T.scene;
1231
+ if (!e) return "{}";
1232
+ const { includeHelpers: t = !1 } = r || {};
1233
+ let s = e;
1234
+ t || (s = e.clone(), s.children = s.children.filter(
1235
+ (i) => i.userData.isMovable === !0
1236
+ ));
1237
+ const n = s.toJSON();
1238
+ return JSON.stringify(n, null);
1239
+ }
1240
+ function Bo(r) {
1241
+ const e = typeof r == "string" ? JSON.parse(r) : r;
1242
+ return new k.ObjectLoader().parse(e);
1243
+ }
1244
+ const ei = /^[og]\s*(.+)?/, ti = /^mtllib /, ni = /^usemtl /, si = /^usemap /, Yt = /\s+/, Bt = new M(), dt = new M(), Kt = new M(), Vt = new M(), q = new M(), et = new pe();
1229
1245
  function ii() {
1230
1246
  const r = {
1231
1247
  objects: [],
@@ -1335,7 +1351,7 @@ function ii() {
1335
1351
  },
1336
1352
  addFaceNormal: function(e, t, s) {
1337
1353
  const n = this.vertices, i = this.object.geometry.normals;
1338
- Xt.fromArray(n, e), ht.fromArray(n, t), Yt.fromArray(n, s), Z.subVectors(Yt, ht), Bt.subVectors(Xt, ht), Z.cross(Bt), Z.normalize(), i.push(Z.x, Z.y, Z.z), i.push(Z.x, Z.y, Z.z), i.push(Z.x, Z.y, Z.z);
1354
+ Bt.fromArray(n, e), dt.fromArray(n, t), Kt.fromArray(n, s), q.subVectors(Kt, dt), Vt.subVectors(Bt, dt), q.cross(Vt), q.normalize(), i.push(q.x, q.y, q.z), i.push(q.x, q.y, q.z), i.push(q.x, q.y, q.z);
1339
1355
  },
1340
1356
  addColor: function(e, t, s) {
1341
1357
  const n = this.colors, i = this.object.geometry.colors;
@@ -1355,15 +1371,15 @@ function ii() {
1355
1371
  },
1356
1372
  addFace: function(e, t, s, n, i, o, a, l, h) {
1357
1373
  const u = this.vertices.length;
1358
- let c = this.parseVertexIndex(e, u), d = this.parseVertexIndex(t, u), p = this.parseVertexIndex(s, u);
1359
- if (this.addVertex(c, d, p), this.addColor(c, d, p), a !== void 0 && a !== "") {
1360
- const f = this.normals.length;
1361
- c = this.parseNormalIndex(a, f), d = this.parseNormalIndex(l, f), p = this.parseNormalIndex(h, f), this.addNormal(c, d, p);
1374
+ let c = this.parseVertexIndex(e, u), p = this.parseVertexIndex(t, u), m = this.parseVertexIndex(s, u);
1375
+ if (this.addVertex(c, p, m), this.addColor(c, p, m), a !== void 0 && a !== "") {
1376
+ const b = this.normals.length;
1377
+ c = this.parseNormalIndex(a, b), p = this.parseNormalIndex(l, b), m = this.parseNormalIndex(h, b), this.addNormal(c, p, m);
1362
1378
  } else
1363
- this.addFaceNormal(c, d, p);
1379
+ this.addFaceNormal(c, p, m);
1364
1380
  if (n !== void 0 && n !== "") {
1365
- const f = this.uvs.length;
1366
- c = this.parseUVIndex(n, f), d = this.parseUVIndex(i, f), p = this.parseUVIndex(o, f), this.addUV(c, d, p), this.object.geometry.hasUVIndices = !0;
1381
+ const b = this.uvs.length;
1382
+ c = this.parseUVIndex(n, b), p = this.parseUVIndex(i, b), m = this.parseUVIndex(o, b), this.addUV(c, p, m), this.object.geometry.hasUVIndices = !0;
1367
1383
  } else
1368
1384
  this.addDefaultUV();
1369
1385
  },
@@ -1386,7 +1402,7 @@ function ii() {
1386
1402
  };
1387
1403
  return r.startObject("", !1), r;
1388
1404
  }
1389
- class oi extends rn {
1405
+ class oi extends ln {
1390
1406
  /**
1391
1407
  * Constructs a new OBJ loader.
1392
1408
  *
@@ -1405,7 +1421,7 @@ class oi extends rn {
1405
1421
  * @param {onErrorCallback} onError - Executed when errors occur.
1406
1422
  */
1407
1423
  load(e, t, s, n) {
1408
- const i = this, o = new Tt(this.manager);
1424
+ const i = this, o = new Et(this.manager);
1409
1425
  o.setPath(this.path), o.setRequestHeader(this.requestHeader), o.setWithCredentials(this.withCredentials), o.load(e, function(a) {
1410
1426
  try {
1411
1427
  t(i.parse(a));
@@ -1444,19 +1460,19 @@ class oi extends rn {
1444
1460
  const u = h.charAt(0);
1445
1461
  if (u !== "#")
1446
1462
  if (u === "v") {
1447
- const c = h.split(Gt);
1463
+ const c = h.split(Yt);
1448
1464
  switch (c[0]) {
1449
1465
  case "v":
1450
1466
  t.vertices.push(
1451
1467
  parseFloat(c[1]),
1452
1468
  parseFloat(c[2]),
1453
1469
  parseFloat(c[3])
1454
- ), c.length >= 7 ? (We.setRGB(
1470
+ ), c.length >= 7 ? (et.setRGB(
1455
1471
  parseFloat(c[4]),
1456
1472
  parseFloat(c[5]),
1457
1473
  parseFloat(c[6]),
1458
- Se
1459
- ), t.colors.push(We.r, We.g, We.b)) : t.colors.push(void 0, void 0, void 0);
1474
+ Re
1475
+ ), t.colors.push(et.r, et.g, et.b)) : t.colors.push(void 0, void 0, void 0);
1460
1476
  break;
1461
1477
  case "vn":
1462
1478
  t.normals.push(
@@ -1473,44 +1489,44 @@ class oi extends rn {
1473
1489
  break;
1474
1490
  }
1475
1491
  } else if (u === "f") {
1476
- const d = h.slice(1).trim().split(Gt), p = [];
1477
- for (let m = 0, y = d.length; m < y; m++) {
1478
- const _ = d[m];
1479
- if (_.length > 0) {
1480
- const x = _.split("/");
1481
- p.push(x);
1492
+ const p = h.slice(1).trim().split(Yt), m = [];
1493
+ for (let f = 0, y = p.length; f < y; f++) {
1494
+ const d = p[f];
1495
+ if (d.length > 0) {
1496
+ const _ = d.split("/");
1497
+ m.push(_);
1482
1498
  }
1483
1499
  }
1484
- const f = p[0];
1485
- for (let m = 1, y = p.length - 1; m < y; m++) {
1486
- const _ = p[m], x = p[m + 1];
1500
+ const b = m[0];
1501
+ for (let f = 1, y = m.length - 1; f < y; f++) {
1502
+ const d = m[f], _ = m[f + 1];
1487
1503
  t.addFace(
1488
- f[0],
1504
+ b[0],
1505
+ d[0],
1489
1506
  _[0],
1490
- x[0],
1491
- f[1],
1507
+ b[1],
1508
+ d[1],
1492
1509
  _[1],
1493
- x[1],
1494
- f[2],
1495
- _[2],
1496
- x[2]
1510
+ b[2],
1511
+ d[2],
1512
+ _[2]
1497
1513
  );
1498
1514
  }
1499
1515
  } else if (u === "l") {
1500
1516
  const c = h.substring(1).trim().split(" ");
1501
- let d = [];
1502
- const p = [];
1517
+ let p = [];
1518
+ const m = [];
1503
1519
  if (h.indexOf("/") === -1)
1504
- d = c;
1520
+ p = c;
1505
1521
  else
1506
- for (let f = 0, m = c.length; f < m; f++) {
1507
- const y = c[f].split("/");
1508
- y[0] !== "" && d.push(y[0]), y[1] !== "" && p.push(y[1]);
1522
+ for (let b = 0, f = c.length; b < f; b++) {
1523
+ const y = c[b].split("/");
1524
+ y[0] !== "" && p.push(y[0]), y[1] !== "" && m.push(y[1]);
1509
1525
  }
1510
- t.addLineGeometry(d, p);
1526
+ t.addLineGeometry(p, m);
1511
1527
  } else if (u === "p") {
1512
- const d = h.slice(1).trim().split(" ");
1513
- t.addPointGeometry(d);
1528
+ const p = h.slice(1).trim().split(" ");
1529
+ t.addPointGeometry(p);
1514
1530
  } else if ((n = ei.exec(h)) !== null) {
1515
1531
  const c = (" " + n[0].slice(1).trim()).slice(1);
1516
1532
  t.startObject(c);
@@ -1522,8 +1538,8 @@ class oi extends rn {
1522
1538
  console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');
1523
1539
  else if (u === "s") {
1524
1540
  if (n = h.split(" "), n.length > 1) {
1525
- const d = n[1].trim().toLowerCase();
1526
- t.object.smooth = d !== "0" && d !== "off";
1541
+ const p = n[1].trim().toLowerCase();
1542
+ t.object.smooth = p !== "0" && p !== "off";
1527
1543
  } else
1528
1544
  t.object.smooth = !0;
1529
1545
  const c = t.object.currentMaterial();
@@ -1534,53 +1550,53 @@ class oi extends rn {
1534
1550
  }
1535
1551
  }
1536
1552
  t.finalize();
1537
- const i = new $e();
1553
+ const i = new tt();
1538
1554
  if (i.materialLibraries = [].concat(t.materialLibraries), !(t.objects.length === 1 && t.objects[0].geometry.vertices.length === 0) === !0)
1539
1555
  for (let a = 0, l = t.objects.length; a < l; a++) {
1540
- const h = t.objects[a], u = h.geometry, c = h.materials, d = u.type === "Line", p = u.type === "Points";
1541
- let f = !1;
1556
+ const h = t.objects[a], u = h.geometry, c = h.materials, p = u.type === "Line", m = u.type === "Points";
1557
+ let b = !1;
1542
1558
  if (u.vertices.length === 0) continue;
1543
- const m = new He();
1544
- m.setAttribute("position", new he(u.vertices, 3)), u.normals.length > 0 && m.setAttribute("normal", new he(u.normals, 3)), u.colors.length > 0 && (f = !0, m.setAttribute("color", new he(u.colors, 3))), u.hasUVIndices === !0 && m.setAttribute("uv", new he(u.uvs, 2));
1559
+ const f = new ze();
1560
+ f.setAttribute("position", new ue(u.vertices, 3)), u.normals.length > 0 && f.setAttribute("normal", new ue(u.normals, 3)), u.colors.length > 0 && (b = !0, f.setAttribute("color", new ue(u.colors, 3))), u.hasUVIndices === !0 && f.setAttribute("uv", new ue(u.uvs, 2));
1545
1561
  const y = [];
1546
- for (let x = 0, M = c.length; x < M; x++) {
1547
- const S = c[x], L = S.name + "_" + S.smooth + "_" + f;
1548
- let v = t.materials[L];
1562
+ for (let _ = 0, x = c.length; _ < x; _++) {
1563
+ const S = c[_], A = S.name + "_" + S.smooth + "_" + b;
1564
+ let v = t.materials[A];
1549
1565
  if (this.materials !== null) {
1550
- if (v = this.materials.create(S.name), d && v && !(v instanceof De)) {
1551
- const I = new De();
1552
- Ne.prototype.copy.call(I, v), I.color.copy(v.color), v = I;
1553
- } else if (p && v && !(v instanceof Ie)) {
1554
- const I = new Ie({ size: 10, sizeAttenuation: !1 });
1555
- Ne.prototype.copy.call(I, v), I.color.copy(v.color), I.map = v.map, v = I;
1566
+ if (v = this.materials.create(S.name), p && v && !(v instanceof ke)) {
1567
+ const I = new ke();
1568
+ je.prototype.copy.call(I, v), I.color.copy(v.color), v = I;
1569
+ } else if (m && v && !(v instanceof Ce)) {
1570
+ const I = new Ce({ size: 10, sizeAttenuation: !1 });
1571
+ je.prototype.copy.call(I, v), I.color.copy(v.color), I.map = v.map, v = I;
1556
1572
  }
1557
1573
  }
1558
- v === void 0 && (d ? v = new De() : p ? v = new Ie({ size: 1, sizeAttenuation: !1 }) : v = new kn(), v.name = S.name, v.flatShading = !S.smooth, v.vertexColors = f, t.materials[L] = v), y.push(v);
1574
+ v === void 0 && (p ? v = new ke() : m ? v = new Ce({ size: 1, sizeAttenuation: !1 }) : v = new kn(), v.name = S.name, v.flatShading = !S.smooth, v.vertexColors = b, t.materials[A] = v), y.push(v);
1559
1575
  }
1560
- let _;
1576
+ let d;
1561
1577
  if (y.length > 1) {
1562
- for (let x = 0, M = c.length; x < M; x++) {
1563
- const S = c[x];
1564
- m.addGroup(S.groupStart, S.groupCount, x);
1578
+ for (let _ = 0, x = c.length; _ < x; _++) {
1579
+ const S = c[_];
1580
+ f.addGroup(S.groupStart, S.groupCount, _);
1565
1581
  }
1566
- d ? _ = new ft(m, y) : p ? _ = new Je(m, y) : _ = new b(m, y);
1582
+ p ? d = new gt(f, y) : m ? d = new nt(f, y) : d = new w(f, y);
1567
1583
  } else
1568
- d ? _ = new ft(m, y[0]) : p ? _ = new Je(m, y[0]) : _ = new b(m, y[0]);
1569
- _.name = h.name, i.add(_);
1584
+ p ? d = new gt(f, y[0]) : m ? d = new nt(f, y[0]) : d = new w(f, y[0]);
1585
+ d.name = h.name, i.add(d);
1570
1586
  }
1571
1587
  else if (t.vertices.length > 0) {
1572
- const a = new Ie({ size: 1, sizeAttenuation: !1 }), l = new He();
1573
- l.setAttribute("position", new he(t.vertices, 3)), t.colors.length > 0 && t.colors[0] !== void 0 && (l.setAttribute("color", new he(t.colors, 3)), a.vertexColors = !0);
1574
- const h = new Je(l, a);
1588
+ const a = new Ce({ size: 1, sizeAttenuation: !1 }), l = new ze();
1589
+ l.setAttribute("position", new ue(t.vertices, 3)), t.colors.length > 0 && t.colors[0] !== void 0 && (l.setAttribute("color", new ue(t.colors, 3)), a.vertexColors = !0);
1590
+ const h = new nt(l, a);
1575
1591
  i.add(h);
1576
1592
  }
1577
1593
  return i;
1578
1594
  }
1579
1595
  }
1580
- function Kt(r, e) {
1596
+ function Zt(r, e) {
1581
1597
  if (e === jn)
1582
1598
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), r;
1583
- if (e === mt || e === an) {
1599
+ if (e === yt || e === cn) {
1584
1600
  let t = r.getIndex();
1585
1601
  if (t === null) {
1586
1602
  const o = [], a = r.getAttribute("position");
@@ -1592,7 +1608,7 @@ function Kt(r, e) {
1592
1608
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), r;
1593
1609
  }
1594
1610
  const s = t.count - 2, n = [];
1595
- if (e === mt)
1611
+ if (e === yt)
1596
1612
  for (let o = 1; o <= s; o++)
1597
1613
  n.push(t.getX(0)), n.push(t.getX(o)), n.push(t.getX(o + 1));
1598
1614
  else
@@ -1606,7 +1622,7 @@ function Kt(r, e) {
1606
1622
  }
1607
1623
  function ri(r) {
1608
1624
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), s = r.clone();
1609
- return mn(r, s, function(n, i) {
1625
+ return yn(r, s, function(n, i) {
1610
1626
  e.set(i, n), t.set(n, i);
1611
1627
  }), s.traverse(function(n) {
1612
1628
  if (!n.isSkinnedMesh) return;
@@ -1616,12 +1632,12 @@ function ri(r) {
1616
1632
  }), i.bind(i.skeleton, i.bindMatrix);
1617
1633
  }), s;
1618
1634
  }
1619
- function mn(r, e, t) {
1635
+ function yn(r, e, t) {
1620
1636
  t(r, e);
1621
1637
  for (let s = 0; s < r.children.length; s++)
1622
- mn(r.children[s], e.children[s], t);
1638
+ yn(r.children[s], e.children[s], t);
1623
1639
  }
1624
- class ai extends rn {
1640
+ class ai extends ln {
1625
1641
  /**
1626
1642
  * Constructs a new glTF loader.
1627
1643
  *
@@ -1659,11 +1675,11 @@ class ai extends rn {
1659
1675
  }), this.register(function(t) {
1660
1676
  return new ci(t);
1661
1677
  }), this.register(function(t) {
1662
- return new Vt(t, R.EXT_MESHOPT_COMPRESSION);
1678
+ return new Qt(t, R.EXT_MESHOPT_COMPRESSION);
1663
1679
  }), this.register(function(t) {
1664
- return new Vt(t, R.KHR_MESHOPT_COMPRESSION);
1680
+ return new Qt(t, R.KHR_MESHOPT_COMPRESSION);
1665
1681
  }), this.register(function(t) {
1666
- return new Si(t);
1682
+ return new vi(t);
1667
1683
  });
1668
1684
  }
1669
1685
  /**
@@ -1681,14 +1697,14 @@ class ai extends rn {
1681
1697
  if (this.resourcePath !== "")
1682
1698
  o = this.resourcePath;
1683
1699
  else if (this.path !== "") {
1684
- const h = ke.extractUrlBase(e);
1685
- o = ke.resolveURL(h, this.path);
1700
+ const h = He.extractUrlBase(e);
1701
+ o = He.resolveURL(h, this.path);
1686
1702
  } else
1687
- o = ke.extractUrlBase(e);
1703
+ o = He.extractUrlBase(e);
1688
1704
  this.manager.itemStart(e);
1689
1705
  const a = function(h) {
1690
1706
  n ? n(h) : console.error(h), i.manager.itemError(e), i.manager.itemEnd(e);
1691
- }, l = new Tt(this.manager);
1707
+ }, l = new Et(this.manager);
1692
1708
  l.setPath(this.path), l.setResponseType("arraybuffer"), l.setRequestHeader(this.requestHeader), l.setWithCredentials(this.withCredentials), l.load(e, function(h) {
1693
1709
  try {
1694
1710
  i.parse(h, o, function(u) {
@@ -1763,9 +1779,9 @@ class ai extends rn {
1763
1779
  if (typeof e == "string")
1764
1780
  i = JSON.parse(e);
1765
1781
  else if (e instanceof ArrayBuffer)
1766
- if (l.decode(new Uint8Array(e, 0, 4)) === gn) {
1782
+ if (l.decode(new Uint8Array(e, 0, 4)) === _n) {
1767
1783
  try {
1768
- o[R.KHR_BINARY_GLTF] = new vi(e);
1784
+ o[R.KHR_BINARY_GLTF] = new Si(e);
1769
1785
  } catch (c) {
1770
1786
  n && n(c);
1771
1787
  return;
@@ -1794,7 +1810,7 @@ class ai extends rn {
1794
1810
  }
1795
1811
  if (i.extensionsUsed)
1796
1812
  for (let u = 0; u < i.extensionsUsed.length; ++u) {
1797
- const c = i.extensionsUsed[u], d = i.extensionsRequired || [];
1813
+ const c = i.extensionsUsed[u], p = i.extensionsRequired || [];
1798
1814
  switch (c) {
1799
1815
  case R.KHR_MATERIALS_UNLIT:
1800
1816
  o[c] = new hi();
@@ -1809,7 +1825,7 @@ class ai extends rn {
1809
1825
  o[c] = new Pi();
1810
1826
  break;
1811
1827
  default:
1812
- d.indexOf(c) >= 0 && a[c] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + c + '".');
1828
+ p.indexOf(c) >= 0 && a[c] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + c + '".');
1813
1829
  }
1814
1830
  }
1815
1831
  h.setExtensions(o), h.setPlugins(a), h.parse(s, n);
@@ -1892,7 +1908,7 @@ class ci {
1892
1908
  if (n) return n;
1893
1909
  const i = t.json, l = ((i.extensions && i.extensions[this.name] || {}).lights || [])[e];
1894
1910
  let h;
1895
- const u = new ue(16777215);
1911
+ const u = new pe(16777215);
1896
1912
  l.color !== void 0 && u.setRGB(l.color[0], l.color[1], l.color[2], ae);
1897
1913
  const c = l.range !== void 0 ? l.range : 0;
1898
1914
  switch (l.type) {
@@ -1908,7 +1924,7 @@ class ci {
1908
1924
  default:
1909
1925
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + l.type);
1910
1926
  }
1911
- return h.position.set(0, 0, 0), te(h, l), l.intensity !== void 0 && (h.intensity = l.intensity), h.name = t.createUniqueName(l.name || "light_" + e), n = Promise.resolve(h), t.cache.add(s, n), n;
1927
+ return h.position.set(0, 0, 0), ne(h, l), l.intensity !== void 0 && (h.intensity = l.intensity), h.name = t.createUniqueName(l.name || "light_" + e), n = Promise.resolve(h), t.cache.add(s, n), n;
1912
1928
  }
1913
1929
  getDependency(e, t) {
1914
1930
  if (e === "light")
@@ -1926,18 +1942,18 @@ class hi {
1926
1942
  this.name = R.KHR_MATERIALS_UNLIT;
1927
1943
  }
1928
1944
  getMaterialType() {
1929
- return ye;
1945
+ return _e;
1930
1946
  }
1931
1947
  extendParams(e, t, s) {
1932
1948
  const n = [];
1933
- e.color = new ue(1, 1, 1), e.opacity = 1;
1949
+ e.color = new pe(1, 1, 1), e.opacity = 1;
1934
1950
  const i = t.pbrMetallicRoughness;
1935
1951
  if (i) {
1936
1952
  if (Array.isArray(i.baseColorFactor)) {
1937
1953
  const o = i.baseColorFactor;
1938
1954
  e.color.setRGB(o[0], o[1], o[2], ae), e.opacity = o[3];
1939
1955
  }
1940
- i.baseColorTexture !== void 0 && n.push(s.assignTexture(e, "map", i.baseColorTexture, Se));
1956
+ i.baseColorTexture !== void 0 && n.push(s.assignTexture(e, "map", i.baseColorTexture, Re));
1941
1957
  }
1942
1958
  return Promise.all(n);
1943
1959
  }
@@ -1956,7 +1972,7 @@ class di {
1956
1972
  this.parser = e, this.name = R.KHR_MATERIALS_CLEARCOAT;
1957
1973
  }
1958
1974
  getMaterialType(e) {
1959
- return C(this.parser, e, this.name) !== null ? ne : null;
1975
+ return C(this.parser, e, this.name) !== null ? se : null;
1960
1976
  }
1961
1977
  extendMaterialParams(e, t) {
1962
1978
  const s = C(this.parser, e, this.name);
@@ -1964,7 +1980,7 @@ class di {
1964
1980
  const n = [];
1965
1981
  if (s.clearcoatFactor !== void 0 && (t.clearcoat = s.clearcoatFactor), s.clearcoatTexture !== void 0 && n.push(this.parser.assignTexture(t, "clearcoatMap", s.clearcoatTexture)), s.clearcoatRoughnessFactor !== void 0 && (t.clearcoatRoughness = s.clearcoatRoughnessFactor), s.clearcoatRoughnessTexture !== void 0 && n.push(this.parser.assignTexture(t, "clearcoatRoughnessMap", s.clearcoatRoughnessTexture)), s.clearcoatNormalTexture !== void 0 && (n.push(this.parser.assignTexture(t, "clearcoatNormalMap", s.clearcoatNormalTexture)), s.clearcoatNormalTexture.scale !== void 0)) {
1966
1982
  const i = s.clearcoatNormalTexture.scale;
1967
- t.clearcoatNormalScale = new B(i, i);
1983
+ t.clearcoatNormalScale = new V(i, i);
1968
1984
  }
1969
1985
  return Promise.all(n);
1970
1986
  }
@@ -1974,7 +1990,7 @@ class pi {
1974
1990
  this.parser = e, this.name = R.KHR_MATERIALS_DISPERSION;
1975
1991
  }
1976
1992
  getMaterialType(e) {
1977
- return C(this.parser, e, this.name) !== null ? ne : null;
1993
+ return C(this.parser, e, this.name) !== null ? se : null;
1978
1994
  }
1979
1995
  extendMaterialParams(e, t) {
1980
1996
  const s = C(this.parser, e, this.name);
@@ -1986,7 +2002,7 @@ class fi {
1986
2002
  this.parser = e, this.name = R.KHR_MATERIALS_IRIDESCENCE;
1987
2003
  }
1988
2004
  getMaterialType(e) {
1989
- return C(this.parser, e, this.name) !== null ? ne : null;
2005
+ return C(this.parser, e, this.name) !== null ? se : null;
1990
2006
  }
1991
2007
  extendMaterialParams(e, t) {
1992
2008
  const s = C(this.parser, e, this.name);
@@ -2000,17 +2016,17 @@ class mi {
2000
2016
  this.parser = e, this.name = R.KHR_MATERIALS_SHEEN;
2001
2017
  }
2002
2018
  getMaterialType(e) {
2003
- return C(this.parser, e, this.name) !== null ? ne : null;
2019
+ return C(this.parser, e, this.name) !== null ? se : null;
2004
2020
  }
2005
2021
  extendMaterialParams(e, t) {
2006
2022
  const s = C(this.parser, e, this.name);
2007
2023
  if (s === null) return Promise.resolve();
2008
2024
  const n = [];
2009
- if (t.sheenColor = new ue(0, 0, 0), t.sheenRoughness = 0, t.sheen = 1, s.sheenColorFactor !== void 0) {
2025
+ if (t.sheenColor = new pe(0, 0, 0), t.sheenRoughness = 0, t.sheen = 1, s.sheenColorFactor !== void 0) {
2010
2026
  const i = s.sheenColorFactor;
2011
2027
  t.sheenColor.setRGB(i[0], i[1], i[2], ae);
2012
2028
  }
2013
- return s.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = s.sheenRoughnessFactor), s.sheenColorTexture !== void 0 && n.push(this.parser.assignTexture(t, "sheenColorMap", s.sheenColorTexture, Se)), s.sheenRoughnessTexture !== void 0 && n.push(this.parser.assignTexture(t, "sheenRoughnessMap", s.sheenRoughnessTexture)), Promise.all(n);
2029
+ return s.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = s.sheenRoughnessFactor), s.sheenColorTexture !== void 0 && n.push(this.parser.assignTexture(t, "sheenColorMap", s.sheenColorTexture, Re)), s.sheenRoughnessTexture !== void 0 && n.push(this.parser.assignTexture(t, "sheenRoughnessMap", s.sheenRoughnessTexture)), Promise.all(n);
2014
2030
  }
2015
2031
  }
2016
2032
  class gi {
@@ -2018,7 +2034,7 @@ class gi {
2018
2034
  this.parser = e, this.name = R.KHR_MATERIALS_TRANSMISSION;
2019
2035
  }
2020
2036
  getMaterialType(e) {
2021
- return C(this.parser, e, this.name) !== null ? ne : null;
2037
+ return C(this.parser, e, this.name) !== null ? se : null;
2022
2038
  }
2023
2039
  extendMaterialParams(e, t) {
2024
2040
  const s = C(this.parser, e, this.name);
@@ -2032,7 +2048,7 @@ class yi {
2032
2048
  this.parser = e, this.name = R.KHR_MATERIALS_VOLUME;
2033
2049
  }
2034
2050
  getMaterialType(e) {
2035
- return C(this.parser, e, this.name) !== null ? ne : null;
2051
+ return C(this.parser, e, this.name) !== null ? se : null;
2036
2052
  }
2037
2053
  extendMaterialParams(e, t) {
2038
2054
  const s = C(this.parser, e, this.name);
@@ -2040,7 +2056,7 @@ class yi {
2040
2056
  const n = [];
2041
2057
  t.thickness = s.thicknessFactor !== void 0 ? s.thicknessFactor : 0, s.thicknessTexture !== void 0 && n.push(this.parser.assignTexture(t, "thicknessMap", s.thicknessTexture)), t.attenuationDistance = s.attenuationDistance || 1 / 0;
2042
2058
  const i = s.attenuationColor || [1, 1, 1];
2043
- return t.attenuationColor = new ue().setRGB(i[0], i[1], i[2], ae), Promise.all(n);
2059
+ return t.attenuationColor = new pe().setRGB(i[0], i[1], i[2], ae), Promise.all(n);
2044
2060
  }
2045
2061
  }
2046
2062
  class _i {
@@ -2048,7 +2064,7 @@ class _i {
2048
2064
  this.parser = e, this.name = R.KHR_MATERIALS_IOR;
2049
2065
  }
2050
2066
  getMaterialType(e) {
2051
- return C(this.parser, e, this.name) !== null ? ne : null;
2067
+ return C(this.parser, e, this.name) !== null ? se : null;
2052
2068
  }
2053
2069
  extendMaterialParams(e, t) {
2054
2070
  const s = C(this.parser, e, this.name);
@@ -2060,7 +2076,7 @@ class bi {
2060
2076
  this.parser = e, this.name = R.KHR_MATERIALS_SPECULAR;
2061
2077
  }
2062
2078
  getMaterialType(e) {
2063
- return C(this.parser, e, this.name) !== null ? ne : null;
2079
+ return C(this.parser, e, this.name) !== null ? se : null;
2064
2080
  }
2065
2081
  extendMaterialParams(e, t) {
2066
2082
  const s = C(this.parser, e, this.name);
@@ -2068,7 +2084,7 @@ class bi {
2068
2084
  const n = [];
2069
2085
  t.specularIntensity = s.specularFactor !== void 0 ? s.specularFactor : 1, s.specularTexture !== void 0 && n.push(this.parser.assignTexture(t, "specularIntensityMap", s.specularTexture));
2070
2086
  const i = s.specularColorFactor || [1, 1, 1];
2071
- return t.specularColor = new ue().setRGB(i[0], i[1], i[2], ae), s.specularColorTexture !== void 0 && n.push(this.parser.assignTexture(t, "specularColorMap", s.specularColorTexture, Se)), Promise.all(n);
2087
+ return t.specularColor = new pe().setRGB(i[0], i[1], i[2], ae), s.specularColorTexture !== void 0 && n.push(this.parser.assignTexture(t, "specularColorMap", s.specularColorTexture, Re)), Promise.all(n);
2072
2088
  }
2073
2089
  }
2074
2090
  class wi {
@@ -2076,7 +2092,7 @@ class wi {
2076
2092
  this.parser = e, this.name = R.EXT_MATERIALS_BUMP;
2077
2093
  }
2078
2094
  getMaterialType(e) {
2079
- return C(this.parser, e, this.name) !== null ? ne : null;
2095
+ return C(this.parser, e, this.name) !== null ? se : null;
2080
2096
  }
2081
2097
  extendMaterialParams(e, t) {
2082
2098
  const s = C(this.parser, e, this.name);
@@ -2090,7 +2106,7 @@ class Ti {
2090
2106
  this.parser = e, this.name = R.KHR_MATERIALS_ANISOTROPY;
2091
2107
  }
2092
2108
  getMaterialType(e) {
2093
- return C(this.parser, e, this.name) !== null ? ne : null;
2109
+ return C(this.parser, e, this.name) !== null ? se : null;
2094
2110
  }
2095
2111
  extendMaterialParams(e, t) {
2096
2112
  const s = C(this.parser, e, this.name);
@@ -2150,7 +2166,7 @@ class Mi {
2150
2166
  return s.loadTextureImage(e, o.source, l);
2151
2167
  }
2152
2168
  }
2153
- class Vt {
2169
+ class Qt {
2154
2170
  constructor(e, t) {
2155
2171
  this.name = t, this.parser = e;
2156
2172
  }
@@ -2164,19 +2180,19 @@ class Vt {
2164
2180
  return null;
2165
2181
  }
2166
2182
  return i.then(function(a) {
2167
- const l = n.byteOffset || 0, h = n.byteLength || 0, u = n.count, c = n.byteStride, d = new Uint8Array(a, l, h);
2168
- return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(u, c, d, n.mode, n.filter).then(function(p) {
2169
- return p.buffer;
2183
+ const l = n.byteOffset || 0, h = n.byteLength || 0, u = n.count, c = n.byteStride, p = new Uint8Array(a, l, h);
2184
+ return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(u, c, p, n.mode, n.filter).then(function(m) {
2185
+ return m.buffer;
2170
2186
  }) : o.ready.then(function() {
2171
- const p = new ArrayBuffer(u * c);
2172
- return o.decodeGltfBuffer(new Uint8Array(p), u, c, d, n.mode, n.filter), p;
2187
+ const m = new ArrayBuffer(u * c);
2188
+ return o.decodeGltfBuffer(new Uint8Array(m), u, c, p, n.mode, n.filter), m;
2173
2189
  });
2174
2190
  });
2175
2191
  } else
2176
2192
  return null;
2177
2193
  }
2178
2194
  }
2179
- class Si {
2195
+ class vi {
2180
2196
  constructor(e) {
2181
2197
  this.name = R.EXT_MESH_GPU_INSTANCING, this.parser = e;
2182
2198
  }
@@ -2186,52 +2202,52 @@ class Si {
2186
2202
  return null;
2187
2203
  const n = t.meshes[s.mesh];
2188
2204
  for (const h of n.primitives)
2189
- if (h.mode !== Q.TRIANGLES && h.mode !== Q.TRIANGLE_STRIP && h.mode !== Q.TRIANGLE_FAN && h.mode !== void 0)
2205
+ if (h.mode !== W.TRIANGLES && h.mode !== W.TRIANGLE_STRIP && h.mode !== W.TRIANGLE_FAN && h.mode !== void 0)
2190
2206
  return null;
2191
2207
  const o = s.extensions[this.name].attributes, a = [], l = {};
2192
2208
  for (const h in o)
2193
2209
  a.push(this.parser.getDependency("accessor", o[h]).then((u) => (l[h] = u, l[h])));
2194
2210
  return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(e)), Promise.all(a).then((h) => {
2195
- const u = h.pop(), c = u.isGroup ? u.children : [u], d = h[0].count, p = [];
2196
- for (const f of c) {
2197
- const m = new Me(), y = new E(), _ = new X(), x = new E(1, 1, 1), M = new zn(f.geometry, f.material, d);
2198
- for (let S = 0; S < d; S++)
2199
- l.TRANSLATION && y.fromBufferAttribute(l.TRANSLATION, S), l.ROTATION && _.fromBufferAttribute(l.ROTATION, S), l.SCALE && x.fromBufferAttribute(l.SCALE, S), M.setMatrixAt(S, m.compose(y, _, x));
2211
+ const u = h.pop(), c = u.isGroup ? u.children : [u], p = h[0].count, m = [];
2212
+ for (const b of c) {
2213
+ const f = new Se(), y = new M(), d = new K(), _ = new M(1, 1, 1), x = new zn(b.geometry, b.material, p);
2214
+ for (let S = 0; S < p; S++)
2215
+ l.TRANSLATION && y.fromBufferAttribute(l.TRANSLATION, S), l.ROTATION && d.fromBufferAttribute(l.ROTATION, S), l.SCALE && _.fromBufferAttribute(l.SCALE, S), x.setMatrixAt(S, f.compose(y, d, _));
2200
2216
  for (const S in l)
2201
2217
  if (S === "_COLOR_0") {
2202
- const L = l[S];
2203
- M.instanceColor = new Gn(L.array, L.itemSize, L.normalized);
2204
- } else S !== "TRANSLATION" && S !== "ROTATION" && S !== "SCALE" && f.geometry.setAttribute(S, l[S]);
2205
- je.prototype.copy.call(M, f), this.parser.assignFinalMaterial(M), p.push(M);
2218
+ const A = l[S];
2219
+ x.instanceColor = new Gn(A.array, A.itemSize, A.normalized);
2220
+ } else S !== "TRANSLATION" && S !== "ROTATION" && S !== "SCALE" && b.geometry.setAttribute(S, l[S]);
2221
+ Ue.prototype.copy.call(x, b), this.parser.assignFinalMaterial(x), m.push(x);
2206
2222
  }
2207
- return u.isGroup ? (u.clear(), u.add(...p), u) : p[0];
2223
+ return u.isGroup ? (u.clear(), u.add(...m), u) : m[0];
2208
2224
  }));
2209
2225
  }
2210
2226
  }
2211
- const gn = "glTF", Le = 12, Zt = { JSON: 1313821514, BIN: 5130562 };
2212
- class vi {
2227
+ const _n = "glTF", Oe = 12, qt = { JSON: 1313821514, BIN: 5130562 };
2228
+ class Si {
2213
2229
  constructor(e) {
2214
2230
  this.name = R.KHR_BINARY_GLTF, this.content = null, this.body = null;
2215
- const t = new DataView(e, 0, Le), s = new TextDecoder();
2231
+ const t = new DataView(e, 0, Oe), s = new TextDecoder();
2216
2232
  if (this.header = {
2217
2233
  magic: s.decode(new Uint8Array(e.slice(0, 4))),
2218
2234
  version: t.getUint32(4, !0),
2219
2235
  length: t.getUint32(8, !0)
2220
- }, this.header.magic !== gn)
2236
+ }, this.header.magic !== _n)
2221
2237
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
2222
2238
  if (this.header.version < 2)
2223
2239
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
2224
- const n = this.header.length - Le, i = new DataView(e, Le);
2240
+ const n = this.header.length - Oe, i = new DataView(e, Oe);
2225
2241
  let o = 0;
2226
2242
  for (; o < n; ) {
2227
2243
  const a = i.getUint32(o, !0);
2228
2244
  o += 4;
2229
2245
  const l = i.getUint32(o, !0);
2230
- if (o += 4, l === Zt.JSON) {
2231
- const h = new Uint8Array(e, Le + o, a);
2246
+ if (o += 4, l === qt.JSON) {
2247
+ const h = new Uint8Array(e, Oe + o, a);
2232
2248
  this.content = s.decode(h);
2233
- } else if (l === Zt.BIN) {
2234
- const h = Le + o;
2249
+ } else if (l === qt.BIN) {
2250
+ const h = Oe + o;
2235
2251
  this.body = e.slice(h, h + a);
2236
2252
  }
2237
2253
  o += a;
@@ -2249,25 +2265,25 @@ class Ri {
2249
2265
  decodePrimitive(e, t) {
2250
2266
  const s = this.json, n = this.dracoLoader, i = e.extensions[this.name].bufferView, o = e.extensions[this.name].attributes, a = {}, l = {}, h = {};
2251
2267
  for (const u in o) {
2252
- const c = bt[u] || u.toLowerCase();
2268
+ const c = Tt[u] || u.toLowerCase();
2253
2269
  a[c] = o[u];
2254
2270
  }
2255
2271
  for (const u in e.attributes) {
2256
- const c = bt[u] || u.toLowerCase();
2272
+ const c = Tt[u] || u.toLowerCase();
2257
2273
  if (o[u] !== void 0) {
2258
- const d = s.accessors[e.attributes[u]], p = Ee[d.componentType];
2259
- h[c] = p.name, l[c] = d.normalized === !0;
2274
+ const p = s.accessors[e.attributes[u]], m = ve[p.componentType];
2275
+ h[c] = m.name, l[c] = p.normalized === !0;
2260
2276
  }
2261
2277
  }
2262
2278
  return t.getDependency("bufferView", i).then(function(u) {
2263
- return new Promise(function(c, d) {
2264
- n.decodeDracoFile(u, function(p) {
2265
- for (const f in p.attributes) {
2266
- const m = p.attributes[f], y = l[f];
2267
- y !== void 0 && (m.normalized = y);
2279
+ return new Promise(function(c, p) {
2280
+ n.decodeDracoFile(u, function(m) {
2281
+ for (const b in m.attributes) {
2282
+ const f = m.attributes[b], y = l[b];
2283
+ y !== void 0 && (f.normalized = y);
2268
2284
  }
2269
- c(p);
2270
- }, a, h, ae, d);
2285
+ c(m);
2286
+ }, a, h, ae, p);
2271
2287
  });
2272
2288
  });
2273
2289
  }
@@ -2285,7 +2301,7 @@ class Pi {
2285
2301
  this.name = R.KHR_MESH_QUANTIZATION;
2286
2302
  }
2287
2303
  }
2288
- class yn extends ls {
2304
+ class bn extends ls {
2289
2305
  constructor(e, t, s, n) {
2290
2306
  super(e, t, s, n);
2291
2307
  }
@@ -2296,22 +2312,22 @@ class yn extends ls {
2296
2312
  return t;
2297
2313
  }
2298
2314
  interpolate_(e, t, s, n) {
2299
- const i = this.resultBuffer, o = this.sampleValues, a = this.valueSize, l = a * 2, h = a * 3, u = n - t, c = (s - t) / u, d = c * c, p = d * c, f = e * h, m = f - h, y = -2 * p + 3 * d, _ = p - d, x = 1 - y, M = _ - d + c;
2315
+ const i = this.resultBuffer, o = this.sampleValues, a = this.valueSize, l = a * 2, h = a * 3, u = n - t, c = (s - t) / u, p = c * c, m = p * c, b = e * h, f = b - h, y = -2 * m + 3 * p, d = m - p, _ = 1 - y, x = d - p + c;
2300
2316
  for (let S = 0; S !== a; S++) {
2301
- const L = o[m + S + a], v = o[m + S + l] * u, I = o[f + S + a], se = o[f + S] * u;
2302
- i[S] = x * L + M * v + y * I + _ * se;
2317
+ const A = o[f + S + a], v = o[f + S + l] * u, I = o[b + S + a], ie = o[b + S] * u;
2318
+ i[S] = _ * A + x * v + y * I + d * ie;
2303
2319
  }
2304
2320
  return i;
2305
2321
  }
2306
2322
  }
2307
- const Li = new X();
2308
- class Ii extends yn {
2323
+ const Li = new K();
2324
+ class Ii extends bn {
2309
2325
  interpolate_(e, t, s, n) {
2310
2326
  const i = super.interpolate_(e, t, s, n);
2311
2327
  return Li.fromArray(i).normalize().toArray(i), i;
2312
2328
  }
2313
2329
  }
2314
- const Q = {
2330
+ const W = {
2315
2331
  POINTS: 0,
2316
2332
  LINES: 1,
2317
2333
  LINE_LOOP: 2,
@@ -2319,25 +2335,25 @@ const Q = {
2319
2335
  TRIANGLES: 4,
2320
2336
  TRIANGLE_STRIP: 5,
2321
2337
  TRIANGLE_FAN: 6
2322
- }, Ee = {
2338
+ }, ve = {
2323
2339
  5120: Int8Array,
2324
2340
  5121: Uint8Array,
2325
2341
  5122: Int16Array,
2326
2342
  5123: Uint16Array,
2327
2343
  5125: Uint32Array,
2328
2344
  5126: Float32Array
2329
- }, Qt = {
2330
- 9728: cn,
2331
- 9729: gt,
2345
+ }, Wt = {
2346
+ 9728: un,
2347
+ 9729: _t,
2332
2348
  9984: Qn,
2333
2349
  9985: Zn,
2334
2350
  9986: Vn,
2335
- 9987: ln
2336
- }, qt = {
2351
+ 9987: hn
2352
+ }, $t = {
2337
2353
  33071: Wn,
2338
2354
  33648: qn,
2339
- 10497: yt
2340
- }, ut = {
2355
+ 10497: bt
2356
+ }, pt = {
2341
2357
  SCALAR: 1,
2342
2358
  VEC2: 2,
2343
2359
  VEC3: 3,
@@ -2345,7 +2361,7 @@ const Q = {
2345
2361
  MAT2: 4,
2346
2362
  MAT3: 9,
2347
2363
  MAT4: 16
2348
- }, bt = {
2364
+ }, Tt = {
2349
2365
  POSITION: "position",
2350
2366
  NORMAL: "normal",
2351
2367
  TANGENT: "tangent",
@@ -2365,15 +2381,15 @@ const Q = {
2365
2381
  CUBICSPLINE: void 0,
2366
2382
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
2367
2383
  // keyframe track will be initialized with a default interpolation type, then modified.
2368
- LINEAR: un,
2384
+ LINEAR: pn,
2369
2385
  STEP: rs
2370
- }, dt = {
2386
+ }, ft = {
2371
2387
  OPAQUE: "OPAQUE",
2372
2388
  MASK: "MASK",
2373
2389
  BLEND: "BLEND"
2374
2390
  };
2375
2391
  function Ci(r) {
2376
- return r.DefaultMaterial === void 0 && (r.DefaultMaterial = new hn({
2392
+ return r.DefaultMaterial === void 0 && (r.DefaultMaterial = new dn({
2377
2393
  color: 16777215,
2378
2394
  emissive: 0,
2379
2395
  metalness: 1,
@@ -2383,11 +2399,11 @@ function Ci(r) {
2383
2399
  side: as
2384
2400
  })), r.DefaultMaterial;
2385
2401
  }
2386
- function me(r, e, t) {
2402
+ function ge(r, e, t) {
2387
2403
  for (const s in t.extensions)
2388
2404
  r[s] === void 0 && (e.userData.gltfExtensions = e.userData.gltfExtensions || {}, e.userData.gltfExtensions[s] = t.extensions[s]);
2389
2405
  }
2390
- function te(r, e) {
2406
+ function ne(r, e) {
2391
2407
  e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(r.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
2392
2408
  }
2393
2409
  function Di(r, e, t) {
@@ -2401,16 +2417,16 @@ function Di(r, e, t) {
2401
2417
  for (let h = 0, u = e.length; h < u; h++) {
2402
2418
  const c = e[h];
2403
2419
  if (s) {
2404
- const d = c.POSITION !== void 0 ? t.getDependency("accessor", c.POSITION) : r.attributes.position;
2405
- o.push(d);
2420
+ const p = c.POSITION !== void 0 ? t.getDependency("accessor", c.POSITION) : r.attributes.position;
2421
+ o.push(p);
2406
2422
  }
2407
2423
  if (n) {
2408
- const d = c.NORMAL !== void 0 ? t.getDependency("accessor", c.NORMAL) : r.attributes.normal;
2409
- a.push(d);
2424
+ const p = c.NORMAL !== void 0 ? t.getDependency("accessor", c.NORMAL) : r.attributes.normal;
2425
+ a.push(p);
2410
2426
  }
2411
2427
  if (i) {
2412
- const d = c.COLOR_0 !== void 0 ? t.getDependency("accessor", c.COLOR_0) : r.attributes.color;
2413
- l.push(d);
2428
+ const p = c.COLOR_0 !== void 0 ? t.getDependency("accessor", c.COLOR_0) : r.attributes.color;
2429
+ l.push(p);
2414
2430
  }
2415
2431
  }
2416
2432
  return Promise.all([
@@ -2418,8 +2434,8 @@ function Di(r, e, t) {
2418
2434
  Promise.all(a),
2419
2435
  Promise.all(l)
2420
2436
  ]).then(function(h) {
2421
- const u = h[0], c = h[1], d = h[2];
2422
- return s && (r.morphAttributes.position = u), n && (r.morphAttributes.normal = c), i && (r.morphAttributes.color = d), r.morphTargetsRelative = !0, r;
2437
+ const u = h[0], c = h[1], p = h[2];
2438
+ return s && (r.morphAttributes.position = u), n && (r.morphAttributes.normal = c), i && (r.morphAttributes.color = p), r.morphTargetsRelative = !0, r;
2423
2439
  });
2424
2440
  }
2425
2441
  function Ni(r, e) {
@@ -2439,19 +2455,19 @@ function Ni(r, e) {
2439
2455
  function ki(r) {
2440
2456
  let e;
2441
2457
  const t = r.extensions && r.extensions[R.KHR_DRACO_MESH_COMPRESSION];
2442
- if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + pt(t.attributes) : e = r.indices + ":" + pt(r.attributes) + ":" + r.mode, r.targets !== void 0)
2458
+ if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + mt(t.attributes) : e = r.indices + ":" + mt(r.attributes) + ":" + r.mode, r.targets !== void 0)
2443
2459
  for (let s = 0, n = r.targets.length; s < n; s++)
2444
- e += ":" + pt(r.targets[s]);
2460
+ e += ":" + mt(r.targets[s]);
2445
2461
  return e;
2446
2462
  }
2447
- function pt(r) {
2463
+ function mt(r) {
2448
2464
  let e = "";
2449
2465
  const t = Object.keys(r).sort();
2450
2466
  for (let s = 0, n = t.length; s < n; s++)
2451
2467
  e += t[s] + ":" + r[t[s]] + ";";
2452
2468
  return e;
2453
2469
  }
2454
- function wt(r) {
2470
+ function xt(r) {
2455
2471
  switch (r) {
2456
2472
  case Int8Array:
2457
2473
  return 1 / 127;
@@ -2468,7 +2484,7 @@ function wt(r) {
2468
2484
  function ji(r) {
2469
2485
  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";
2470
2486
  }
2471
- const Hi = new Me();
2487
+ const Hi = new Se();
2472
2488
  class Fi {
2473
2489
  constructor(e = {}, t = {}) {
2474
2490
  this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new li(), 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 = {};
@@ -2479,7 +2495,7 @@ class Fi {
2479
2495
  const l = a.match(/Version\/(\d+)/);
2480
2496
  n = s && l ? parseInt(l[1], 10) : -1, i = a.indexOf("Firefox") > -1, o = i ? a.match(/Firefox\/([0-9]+)\./)[1] : -1;
2481
2497
  }
2482
- typeof createImageBitmap > "u" || s && n < 17 || i && o < 98 ? this.textureLoader = new Xn(this.options.manager) : this.textureLoader = new Yn(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Tt(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
2498
+ typeof createImageBitmap > "u" || s && n < 17 || i && o < 98 ? this.textureLoader = new Xn(this.options.manager) : this.textureLoader = new Yn(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Et(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
2483
2499
  }
2484
2500
  setExtensions(e) {
2485
2501
  this.extensions = e;
@@ -2509,7 +2525,7 @@ class Fi {
2509
2525
  parser: s,
2510
2526
  userData: {}
2511
2527
  };
2512
- return me(i, a, n), te(a, n), Promise.all(s._invokeAll(function(l) {
2528
+ return ge(i, a, n), ne(a, n), Promise.all(s._invokeAll(function(l) {
2513
2529
  return l.afterRoot && l.afterRoot(a);
2514
2530
  })).then(function() {
2515
2531
  for (const l of a.scenes)
@@ -2690,7 +2706,7 @@ class Fi {
2690
2706
  return Promise.resolve(this.extensions[R.KHR_BINARY_GLTF].body);
2691
2707
  const n = this.options;
2692
2708
  return new Promise(function(i, o) {
2693
- s.load(ke.resolveURL(t.uri, n.path), i, void 0, function() {
2709
+ s.load(He.resolveURL(t.uri, n.path), i, void 0, function() {
2694
2710
  o(new Error('THREE.GLTFLoader: Failed to load buffer "' + t.uri + '".'));
2695
2711
  });
2696
2712
  });
@@ -2719,27 +2735,27 @@ class Fi {
2719
2735
  loadAccessor(e) {
2720
2736
  const t = this, s = this.json, n = this.json.accessors[e];
2721
2737
  if (n.bufferView === void 0 && n.sparse === void 0) {
2722
- const o = ut[n.type], a = Ee[n.componentType], l = n.normalized === !0, h = new a(n.count * o);
2723
- return Promise.resolve(new ot(h, o, l));
2738
+ const o = pt[n.type], a = ve[n.componentType], l = n.normalized === !0, h = new a(n.count * o);
2739
+ return Promise.resolve(new at(h, o, l));
2724
2740
  }
2725
2741
  const i = [];
2726
2742
  return n.bufferView !== void 0 ? i.push(this.getDependency("bufferView", n.bufferView)) : i.push(null), n.sparse !== void 0 && (i.push(this.getDependency("bufferView", n.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", n.sparse.values.bufferView))), Promise.all(i).then(function(o) {
2727
- const a = o[0], l = ut[n.type], h = Ee[n.componentType], u = h.BYTES_PER_ELEMENT, c = u * l, d = n.byteOffset || 0, p = n.bufferView !== void 0 ? s.bufferViews[n.bufferView].byteStride : void 0, f = n.normalized === !0;
2728
- let m, y;
2729
- if (p && p !== c) {
2730
- const _ = Math.floor(d / p), x = "InterleavedBuffer:" + n.bufferView + ":" + n.componentType + ":" + _ + ":" + n.count;
2731
- let M = t.cache.get(x);
2732
- M || (m = new h(a, _ * p, n.count * p / u), M = new Bn(m, p / u), t.cache.add(x, M)), y = new Kn(M, l, d % p / u, f);
2743
+ const a = o[0], l = pt[n.type], h = ve[n.componentType], u = h.BYTES_PER_ELEMENT, c = u * l, p = n.byteOffset || 0, m = n.bufferView !== void 0 ? s.bufferViews[n.bufferView].byteStride : void 0, b = n.normalized === !0;
2744
+ let f, y;
2745
+ if (m && m !== c) {
2746
+ const d = Math.floor(p / m), _ = "InterleavedBuffer:" + n.bufferView + ":" + n.componentType + ":" + d + ":" + n.count;
2747
+ let x = t.cache.get(_);
2748
+ x || (f = new h(a, d * m, n.count * m / u), x = new Bn(f, m / u), t.cache.add(_, x)), y = new Kn(x, l, p % m / u, b);
2733
2749
  } else
2734
- a === null ? m = new h(n.count * l) : m = new h(a, d, n.count * l), y = new ot(m, l, f);
2750
+ a === null ? f = new h(n.count * l) : f = new h(a, p, n.count * l), y = new at(f, l, b);
2735
2751
  if (n.sparse !== void 0) {
2736
- const _ = ut.SCALAR, x = Ee[n.sparse.indices.componentType], M = n.sparse.indices.byteOffset || 0, S = n.sparse.values.byteOffset || 0, L = new x(o[1], M, n.sparse.count * _), v = new h(o[2], S, n.sparse.count * l);
2737
- a !== null && (y = new ot(y.array.slice(), y.itemSize, y.normalized)), y.normalized = !1;
2738
- for (let I = 0, se = L.length; I < se; I++) {
2739
- const J = L[I];
2740
- if (y.setX(J, v[I * l]), l >= 2 && y.setY(J, v[I * l + 1]), l >= 3 && y.setZ(J, v[I * l + 2]), l >= 4 && y.setW(J, v[I * l + 3]), l >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
2752
+ const d = pt.SCALAR, _ = ve[n.sparse.indices.componentType], x = n.sparse.indices.byteOffset || 0, S = n.sparse.values.byteOffset || 0, A = new _(o[1], x, n.sparse.count * d), v = new h(o[2], S, n.sparse.count * l);
2753
+ a !== null && (y = new at(y.array.slice(), y.itemSize, y.normalized)), y.normalized = !1;
2754
+ for (let I = 0, ie = A.length; I < ie; I++) {
2755
+ const ee = A[I];
2756
+ if (y.setX(ee, v[I * l]), l >= 2 && y.setY(ee, v[I * l + 1]), l >= 3 && y.setZ(ee, v[I * l + 2]), l >= 4 && y.setW(ee, v[I * l + 3]), l >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
2741
2757
  }
2742
- y.normalized = f;
2758
+ y.normalized = b;
2743
2759
  }
2744
2760
  return y;
2745
2761
  });
@@ -2766,8 +2782,8 @@ class Fi {
2766
2782
  return this.textureCache[l];
2767
2783
  const h = this.loadImageSource(t, s).then(function(u) {
2768
2784
  u.flipY = !1, u.name = o.name || a.name || "", u.name === "" && typeof a.uri == "string" && a.uri.startsWith("data:image/") === !1 && (u.name = a.uri);
2769
- const d = (i.samplers || {})[o.sampler] || {};
2770
- return u.magFilter = Qt[d.magFilter] || gt, u.minFilter = Qt[d.minFilter] || ln, u.wrapS = qt[d.wrapS] || yt, u.wrapT = qt[d.wrapT] || yt, u.generateMipmaps = !u.isCompressedTexture && u.minFilter !== cn && u.minFilter !== gt, n.associations.set(u, { textures: e }), u;
2785
+ const p = (i.samplers || {})[o.sampler] || {};
2786
+ return u.magFilter = Wt[p.magFilter] || _t, u.minFilter = Wt[p.minFilter] || hn, u.wrapS = $t[p.wrapS] || bt, u.wrapT = $t[p.wrapT] || bt, u.generateMipmaps = !u.isCompressedTexture && u.minFilter !== un && u.minFilter !== _t, n.associations.set(u, { textures: e }), u;
2771
2787
  }).catch(function() {
2772
2788
  return null;
2773
2789
  });
@@ -2782,21 +2798,21 @@ class Fi {
2782
2798
  if (o.bufferView !== void 0)
2783
2799
  l = s.getDependency("bufferView", o.bufferView).then(function(c) {
2784
2800
  h = !0;
2785
- const d = new Blob([c], { type: o.mimeType });
2786
- return l = a.createObjectURL(d), l;
2801
+ const p = new Blob([c], { type: o.mimeType });
2802
+ return l = a.createObjectURL(p), l;
2787
2803
  });
2788
2804
  else if (o.uri === void 0)
2789
2805
  throw new Error("THREE.GLTFLoader: Image " + e + " is missing URI and bufferView");
2790
2806
  const u = Promise.resolve(l).then(function(c) {
2791
- return new Promise(function(d, p) {
2792
- let f = d;
2793
- t.isImageBitmapLoader === !0 && (f = function(m) {
2794
- const y = new At(m);
2795
- y.needsUpdate = !0, d(y);
2796
- }), t.load(ke.resolveURL(c, i.path), f, void 0, p);
2807
+ return new Promise(function(p, m) {
2808
+ let b = p;
2809
+ t.isImageBitmapLoader === !0 && (b = function(f) {
2810
+ const y = new Lt(f);
2811
+ y.needsUpdate = !0, p(y);
2812
+ }), t.load(He.resolveURL(c, i.path), b, void 0, m);
2797
2813
  });
2798
2814
  }).then(function(c) {
2799
- return h === !0 && a.revokeObjectURL(l), te(c, o), c.userData.mimeType = o.mimeType || ji(o.uri), c;
2815
+ return h === !0 && a.revokeObjectURL(l), ne(c, o), c.userData.mimeType = o.mimeType || ji(o.uri), c;
2800
2816
  }).catch(function(c) {
2801
2817
  throw console.error("THREE.GLTFLoader: Couldn't load texture", l), c;
2802
2818
  });
@@ -2843,11 +2859,11 @@ class Fi {
2843
2859
  if (e.isPoints) {
2844
2860
  const a = "PointsMaterial:" + s.uuid;
2845
2861
  let l = this.cache.get(a);
2846
- l || (l = new Ie(), Ne.prototype.copy.call(l, s), l.color.copy(s.color), l.map = s.map, l.sizeAttenuation = !1, this.cache.add(a, l)), s = l;
2862
+ l || (l = new Ce(), je.prototype.copy.call(l, s), l.color.copy(s.color), l.map = s.map, l.sizeAttenuation = !1, this.cache.add(a, l)), s = l;
2847
2863
  } else if (e.isLine) {
2848
2864
  const a = "LineBasicMaterial:" + s.uuid;
2849
2865
  let l = this.cache.get(a);
2850
- l || (l = new De(), Ne.prototype.copy.call(l, s), l.color.copy(s.color), l.map = s.map, this.cache.add(a, l)), s = l;
2866
+ l || (l = new ke(), je.prototype.copy.call(l, s), l.color.copy(s.color), l.map = s.map, this.cache.add(a, l)), s = l;
2851
2867
  }
2852
2868
  if (n || i || o) {
2853
2869
  let a = "ClonedMaterial:" + s.uuid + ":";
@@ -2858,7 +2874,7 @@ class Fi {
2858
2874
  e.material = s;
2859
2875
  }
2860
2876
  getMaterialType() {
2861
- return hn;
2877
+ return dn;
2862
2878
  }
2863
2879
  /**
2864
2880
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
@@ -2876,29 +2892,29 @@ class Fi {
2876
2892
  o = c.getMaterialType(), h.push(c.extendParams(a, i, t));
2877
2893
  } else {
2878
2894
  const c = i.pbrMetallicRoughness || {};
2879
- if (a.color = new ue(1, 1, 1), a.opacity = 1, Array.isArray(c.baseColorFactor)) {
2880
- const d = c.baseColorFactor;
2881
- a.color.setRGB(d[0], d[1], d[2], ae), a.opacity = d[3];
2895
+ if (a.color = new pe(1, 1, 1), a.opacity = 1, Array.isArray(c.baseColorFactor)) {
2896
+ const p = c.baseColorFactor;
2897
+ a.color.setRGB(p[0], p[1], p[2], ae), a.opacity = p[3];
2882
2898
  }
2883
- c.baseColorTexture !== void 0 && h.push(t.assignTexture(a, "map", c.baseColorTexture, Se)), a.metalness = c.metallicFactor !== void 0 ? c.metallicFactor : 1, a.roughness = c.roughnessFactor !== void 0 ? c.roughnessFactor : 1, c.metallicRoughnessTexture !== void 0 && (h.push(t.assignTexture(a, "metalnessMap", c.metallicRoughnessTexture)), h.push(t.assignTexture(a, "roughnessMap", c.metallicRoughnessTexture))), o = this._invokeOne(function(d) {
2884
- return d.getMaterialType && d.getMaterialType(e);
2885
- }), h.push(Promise.all(this._invokeAll(function(d) {
2886
- return d.extendMaterialParams && d.extendMaterialParams(e, a);
2899
+ c.baseColorTexture !== void 0 && h.push(t.assignTexture(a, "map", c.baseColorTexture, Re)), a.metalness = c.metallicFactor !== void 0 ? c.metallicFactor : 1, a.roughness = c.roughnessFactor !== void 0 ? c.roughnessFactor : 1, c.metallicRoughnessTexture !== void 0 && (h.push(t.assignTexture(a, "metalnessMap", c.metallicRoughnessTexture)), h.push(t.assignTexture(a, "roughnessMap", c.metallicRoughnessTexture))), o = this._invokeOne(function(p) {
2900
+ return p.getMaterialType && p.getMaterialType(e);
2901
+ }), h.push(Promise.all(this._invokeAll(function(p) {
2902
+ return p.extendMaterialParams && p.extendMaterialParams(e, a);
2887
2903
  })));
2888
2904
  }
2889
- i.doubleSided === !0 && (a.side = on);
2890
- const u = i.alphaMode || dt.OPAQUE;
2891
- if (u === dt.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, u === dt.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== ye && (h.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new B(1, 1), i.normalTexture.scale !== void 0)) {
2905
+ i.doubleSided === !0 && (a.side = an);
2906
+ const u = i.alphaMode || ft.OPAQUE;
2907
+ if (u === ft.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, u === ft.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== _e && (h.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new V(1, 1), i.normalTexture.scale !== void 0)) {
2892
2908
  const c = i.normalTexture.scale;
2893
2909
  a.normalScale.set(c, c);
2894
2910
  }
2895
- if (i.occlusionTexture !== void 0 && o !== ye && (h.push(t.assignTexture(a, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && o !== ye) {
2911
+ if (i.occlusionTexture !== void 0 && o !== _e && (h.push(t.assignTexture(a, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && o !== _e) {
2896
2912
  const c = i.emissiveFactor;
2897
- a.emissive = new ue().setRGB(c[0], c[1], c[2], ae);
2913
+ a.emissive = new pe().setRGB(c[0], c[1], c[2], ae);
2898
2914
  }
2899
- return i.emissiveTexture !== void 0 && o !== ye && h.push(t.assignTexture(a, "emissiveMap", i.emissiveTexture, Se)), Promise.all(h).then(function() {
2915
+ return i.emissiveTexture !== void 0 && o !== _e && h.push(t.assignTexture(a, "emissiveMap", i.emissiveTexture, Re)), Promise.all(h).then(function() {
2900
2916
  const c = new o(a);
2901
- return i.name && (c.name = i.name), te(c, i), t.associations.set(c, { materials: e }), i.extensions && me(n, c, i), c;
2917
+ return i.name && (c.name = i.name), ne(c, i), t.associations.set(c, { materials: e }), i.extensions && ge(n, c, i), c;
2902
2918
  });
2903
2919
  }
2904
2920
  /**
@@ -2925,7 +2941,7 @@ class Fi {
2925
2941
  const t = this, s = this.extensions, n = this.primitiveCache;
2926
2942
  function i(a) {
2927
2943
  return s[R.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a, t).then(function(l) {
2928
- return Wt(l, a, t);
2944
+ return Jt(l, a, t);
2929
2945
  });
2930
2946
  }
2931
2947
  const o = [];
@@ -2934,8 +2950,8 @@ class Fi {
2934
2950
  if (c)
2935
2951
  o.push(c.promise);
2936
2952
  else {
2937
- let d;
2938
- h.extensions && h.extensions[R.KHR_DRACO_MESH_COMPRESSION] ? d = i(h) : d = Wt(new He(), h, t), n[u] = { primitive: h, promise: d }, o.push(d);
2953
+ let p;
2954
+ h.extensions && h.extensions[R.KHR_DRACO_MESH_COMPRESSION] ? p = i(h) : p = Jt(new ze(), h, t), n[u] = { primitive: h, promise: p }, o.push(p);
2939
2955
  }
2940
2956
  }
2941
2957
  return Promise.all(o);
@@ -2955,36 +2971,36 @@ class Fi {
2955
2971
  }
2956
2972
  return a.push(t.loadGeometries(o)), Promise.all(a).then(function(l) {
2957
2973
  const h = l.slice(0, l.length - 1), u = l[l.length - 1], c = [];
2958
- for (let p = 0, f = u.length; p < f; p++) {
2959
- const m = u[p], y = o[p];
2960
- let _;
2961
- const x = h[p];
2962
- if (y.mode === Q.TRIANGLES || y.mode === Q.TRIANGLE_STRIP || y.mode === Q.TRIANGLE_FAN || y.mode === void 0)
2963
- _ = i.isSkinnedMesh === !0 ? new Jn(m, x) : new b(m, x), _.isSkinnedMesh === !0 && _.normalizeSkinWeights(), y.mode === Q.TRIANGLE_STRIP ? _.geometry = Kt(_.geometry, an) : y.mode === Q.TRIANGLE_FAN && (_.geometry = Kt(_.geometry, mt));
2964
- else if (y.mode === Q.LINES)
2965
- _ = new ft(m, x);
2966
- else if (y.mode === Q.LINE_STRIP)
2967
- _ = new re(m, x);
2968
- else if (y.mode === Q.LINE_LOOP)
2969
- _ = new es(m, x);
2970
- else if (y.mode === Q.POINTS)
2971
- _ = new Je(m, x);
2974
+ for (let m = 0, b = u.length; m < b; m++) {
2975
+ const f = u[m], y = o[m];
2976
+ let d;
2977
+ const _ = h[m];
2978
+ if (y.mode === W.TRIANGLES || y.mode === W.TRIANGLE_STRIP || y.mode === W.TRIANGLE_FAN || y.mode === void 0)
2979
+ d = i.isSkinnedMesh === !0 ? new Jn(f, _) : new w(f, _), d.isSkinnedMesh === !0 && d.normalizeSkinWeights(), y.mode === W.TRIANGLE_STRIP ? d.geometry = Zt(d.geometry, cn) : y.mode === W.TRIANGLE_FAN && (d.geometry = Zt(d.geometry, yt));
2980
+ else if (y.mode === W.LINES)
2981
+ d = new gt(f, _);
2982
+ else if (y.mode === W.LINE_STRIP)
2983
+ d = new re(f, _);
2984
+ else if (y.mode === W.LINE_LOOP)
2985
+ d = new es(f, _);
2986
+ else if (y.mode === W.POINTS)
2987
+ d = new nt(f, _);
2972
2988
  else
2973
2989
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + y.mode);
2974
- Object.keys(_.geometry.morphAttributes).length > 0 && Ni(_, i), _.name = t.createUniqueName(i.name || "mesh_" + e), te(_, i), y.extensions && me(n, _, y), t.assignFinalMaterial(_), c.push(_);
2990
+ Object.keys(d.geometry.morphAttributes).length > 0 && Ni(d, i), d.name = t.createUniqueName(i.name || "mesh_" + e), ne(d, i), y.extensions && ge(n, d, y), t.assignFinalMaterial(d), c.push(d);
2975
2991
  }
2976
- for (let p = 0, f = c.length; p < f; p++)
2977
- t.associations.set(c[p], {
2992
+ for (let m = 0, b = c.length; m < b; m++)
2993
+ t.associations.set(c[m], {
2978
2994
  meshes: e,
2979
- primitives: p
2995
+ primitives: m
2980
2996
  });
2981
2997
  if (c.length === 1)
2982
- return i.extensions && me(n, c[0], i), c[0];
2983
- const d = new $e();
2984
- i.extensions && me(n, d, i), t.associations.set(d, { meshes: e });
2985
- for (let p = 0, f = c.length; p < f; p++)
2986
- d.add(c[p]);
2987
- return d;
2998
+ return i.extensions && ge(n, c[0], i), c[0];
2999
+ const p = new tt();
3000
+ i.extensions && ge(n, p, i), t.associations.set(p, { meshes: e });
3001
+ for (let m = 0, b = c.length; m < b; m++)
3002
+ p.add(c[m]);
3003
+ return p;
2988
3004
  });
2989
3005
  }
2990
3006
  /**
@@ -3001,7 +3017,7 @@ class Fi {
3001
3017
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
3002
3018
  return;
3003
3019
  }
3004
- return s.type === "perspective" ? t = new ts(sn.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)), te(t, s), Promise.resolve(t);
3020
+ return s.type === "perspective" ? t = new ts(rn.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)), ne(t, s), Promise.resolve(t);
3005
3021
  }
3006
3022
  /**
3007
3023
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
@@ -3020,8 +3036,8 @@ class Fi {
3020
3036
  const c = o[h];
3021
3037
  if (c) {
3022
3038
  a.push(c);
3023
- const d = new Me();
3024
- i !== null && d.fromArray(i.array, h * 16), l.push(d);
3039
+ const p = new Se();
3040
+ i !== null && p.fromArray(i.array, h * 16), l.push(p);
3025
3041
  } else
3026
3042
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', t.joints[h]);
3027
3043
  }
@@ -3037,9 +3053,9 @@ class Fi {
3037
3053
  */
3038
3054
  loadAnimation(e) {
3039
3055
  const t = this.json, s = this, n = t.animations[e], i = n.name ? n.name : "animation_" + e, o = [], a = [], l = [], h = [], u = [];
3040
- for (let c = 0, d = n.channels.length; c < d; c++) {
3041
- const p = n.channels[c], f = n.samplers[p.sampler], m = p.target, y = m.node, _ = n.parameters !== void 0 ? n.parameters[f.input] : f.input, x = n.parameters !== void 0 ? n.parameters[f.output] : f.output;
3042
- m.node !== void 0 && (o.push(this.getDependency("node", y)), a.push(this.getDependency("accessor", _)), l.push(this.getDependency("accessor", x)), h.push(f), u.push(m));
3056
+ for (let c = 0, p = n.channels.length; c < p; c++) {
3057
+ const m = n.channels[c], b = n.samplers[m.sampler], f = m.target, y = f.node, d = n.parameters !== void 0 ? n.parameters[b.input] : b.input, _ = n.parameters !== void 0 ? n.parameters[b.output] : b.output;
3058
+ f.node !== void 0 && (o.push(this.getDependency("node", y)), a.push(this.getDependency("accessor", d)), l.push(this.getDependency("accessor", _)), h.push(b), u.push(f));
3043
3059
  }
3044
3060
  return Promise.all([
3045
3061
  Promise.all(o),
@@ -3048,18 +3064,18 @@ class Fi {
3048
3064
  Promise.all(h),
3049
3065
  Promise.all(u)
3050
3066
  ]).then(function(c) {
3051
- const d = c[0], p = c[1], f = c[2], m = c[3], y = c[4], _ = [];
3052
- for (let M = 0, S = d.length; M < S; M++) {
3053
- const L = d[M], v = p[M], I = f[M], se = m[M], J = y[M];
3054
- if (L === void 0) continue;
3055
- L.updateMatrix && L.updateMatrix();
3056
- const de = s._createAnimationTracks(L, v, I, se, J);
3057
- if (de)
3058
- for (let W = 0; W < de.length; W++)
3059
- _.push(de[W]);
3067
+ const p = c[0], m = c[1], b = c[2], f = c[3], y = c[4], d = [];
3068
+ for (let x = 0, S = p.length; x < S; x++) {
3069
+ const A = p[x], v = m[x], I = b[x], ie = f[x], ee = y[x];
3070
+ if (A === void 0) continue;
3071
+ A.updateMatrix && A.updateMatrix();
3072
+ const fe = s._createAnimationTracks(A, v, I, ie, ee);
3073
+ if (fe)
3074
+ for (let $ = 0; $ < fe.length; $++)
3075
+ d.push(fe[$]);
3060
3076
  }
3061
- const x = new is(i, void 0, _);
3062
- return te(x, n), x;
3077
+ const _ = new is(i, void 0, d);
3078
+ return ne(_, n), _;
3063
3079
  });
3064
3080
  }
3065
3081
  createNodeMesh(e) {
@@ -3090,15 +3106,15 @@ class Fi {
3090
3106
  Promise.all(o),
3091
3107
  l
3092
3108
  ]).then(function(h) {
3093
- const u = h[0], c = h[1], d = h[2];
3094
- d !== null && u.traverse(function(p) {
3095
- p.isSkinnedMesh && p.bind(d, Hi);
3109
+ const u = h[0], c = h[1], p = h[2];
3110
+ p !== null && u.traverse(function(m) {
3111
+ m.isSkinnedMesh && m.bind(p, Hi);
3096
3112
  });
3097
- for (let p = 0, f = c.length; p < f; p++)
3098
- u.add(c[p]);
3113
+ for (let m = 0, b = c.length; m < b; m++)
3114
+ u.add(c[m]);
3099
3115
  if (u.userData.pivot !== void 0 && c.length > 0) {
3100
- const p = u.userData.pivot, f = c[0];
3101
- u.pivot = new E().fromArray(p), u.position.x -= p[0], u.position.y -= p[1], u.position.z -= p[2], f.position.set(0, 0, 0), delete u.userData.pivot;
3116
+ const m = u.userData.pivot, b = c[0];
3117
+ u.pivot = new M().fromArray(m), u.position.x -= m[0], u.position.y -= m[1], u.position.z -= m[2], b.position.set(0, 0, 0), delete u.userData.pivot;
3102
3118
  }
3103
3119
  return u;
3104
3120
  });
@@ -3120,11 +3136,11 @@ class Fi {
3120
3136
  a.push(h);
3121
3137
  }), this.nodeCache[e] = Promise.all(a).then(function(h) {
3122
3138
  let u;
3123
- if (i.isBone === !0 ? u = new os() : h.length > 1 ? u = new $e() : h.length === 1 ? u = h[0] : u = new je(), u !== h[0])
3124
- for (let c = 0, d = h.length; c < d; c++)
3139
+ if (i.isBone === !0 ? u = new os() : h.length > 1 ? u = new tt() : h.length === 1 ? u = h[0] : u = new Ue(), u !== h[0])
3140
+ for (let c = 0, p = h.length; c < p; c++)
3125
3141
  u.add(h[c]);
3126
- if (i.name && (u.userData.name = i.name, u.name = o), te(u, i), i.extensions && me(s, u, i), i.matrix !== void 0) {
3127
- const c = new Me();
3142
+ if (i.name && (u.userData.name = i.name, u.name = o), ne(u, i), i.extensions && ge(s, u, i), i.matrix !== void 0) {
3143
+ const c = new Se();
3128
3144
  c.fromArray(i.matrix), u.applyMatrix4(c);
3129
3145
  } else
3130
3146
  i.translation !== void 0 && u.position.fromArray(i.translation), i.rotation !== void 0 && u.quaternion.fromArray(i.rotation), i.scale !== void 0 && u.scale.fromArray(i.scale);
@@ -3145,23 +3161,23 @@ class Fi {
3145
3161
  * @return {Promise<Group>}
3146
3162
  */
3147
3163
  loadScene(e) {
3148
- const t = this.extensions, s = this.json.scenes[e], n = this, i = new $e();
3149
- s.name && (i.name = n.createUniqueName(s.name)), te(i, s), s.extensions && me(t, i, s);
3164
+ const t = this.extensions, s = this.json.scenes[e], n = this, i = new tt();
3165
+ s.name && (i.name = n.createUniqueName(s.name)), ne(i, s), s.extensions && ge(t, i, s);
3150
3166
  const o = s.nodes || [], a = [];
3151
3167
  for (let l = 0, h = o.length; l < h; l++)
3152
3168
  a.push(n.getDependency("node", o[l]));
3153
3169
  return Promise.all(a).then(function(l) {
3154
3170
  for (let u = 0, c = l.length; u < c; u++) {
3155
- const d = l[u];
3156
- d.parent !== null ? i.add(ri(d)) : i.add(d);
3171
+ const p = l[u];
3172
+ p.parent !== null ? i.add(ri(p)) : i.add(p);
3157
3173
  }
3158
3174
  const h = (u) => {
3159
3175
  const c = /* @__PURE__ */ new Map();
3160
- for (const [d, p] of n.associations)
3161
- (d instanceof Ne || d instanceof At) && c.set(d, p);
3162
- return u.traverse((d) => {
3163
- const p = n.associations.get(d);
3164
- p != null && c.set(d, p);
3176
+ for (const [p, m] of n.associations)
3177
+ (p instanceof je || p instanceof Lt) && c.set(p, m);
3178
+ return u.traverse((p) => {
3179
+ const m = n.associations.get(p);
3180
+ m != null && c.set(p, m);
3165
3181
  }), c;
3166
3182
  };
3167
3183
  return n.associations = h(i), i;
@@ -3169,51 +3185,51 @@ class Fi {
3169
3185
  }
3170
3186
  _createAnimationTracks(e, t, s, n, i) {
3171
3187
  const o = [], a = e.name ? e.name : e.uuid, l = [];
3172
- function h(p) {
3173
- p.morphTargetInfluences && l.push(p.name ? p.name : p.uuid);
3188
+ function h(m) {
3189
+ m.morphTargetInfluences && l.push(m.name ? m.name : m.uuid);
3174
3190
  }
3175
3191
  ce[i.path] === ce.weights ? (h(e), e.isGroup && e.children.forEach(h)) : l.push(a);
3176
3192
  let u;
3177
3193
  switch (ce[i.path]) {
3178
3194
  case ce.weights:
3179
- u = Lt;
3195
+ u = Ot;
3180
3196
  break;
3181
3197
  case ce.rotation:
3182
- u = It;
3198
+ u = Ct;
3183
3199
  break;
3184
3200
  case ce.translation:
3185
3201
  case ce.scale:
3186
- u = Pt;
3202
+ u = It;
3187
3203
  break;
3188
3204
  default:
3189
3205
  switch (s.itemSize) {
3190
3206
  case 1:
3191
- u = Lt;
3207
+ u = Ot;
3192
3208
  break;
3193
3209
  case 2:
3194
3210
  case 3:
3195
3211
  default:
3196
- u = Pt;
3212
+ u = It;
3197
3213
  break;
3198
3214
  }
3199
3215
  break;
3200
3216
  }
3201
- const c = n.interpolation !== void 0 ? Oi[n.interpolation] : un, d = this._getArrayFromAccessor(s);
3202
- for (let p = 0, f = l.length; p < f; p++) {
3203
- const m = new u(
3204
- l[p] + "." + ce[i.path],
3217
+ const c = n.interpolation !== void 0 ? Oi[n.interpolation] : pn, p = this._getArrayFromAccessor(s);
3218
+ for (let m = 0, b = l.length; m < b; m++) {
3219
+ const f = new u(
3220
+ l[m] + "." + ce[i.path],
3205
3221
  t.array,
3206
- d,
3222
+ p,
3207
3223
  c
3208
3224
  );
3209
- n.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(m), o.push(m);
3225
+ n.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(f), o.push(f);
3210
3226
  }
3211
3227
  return o;
3212
3228
  }
3213
3229
  _getArrayFromAccessor(e) {
3214
3230
  let t = e.array;
3215
3231
  if (e.normalized) {
3216
- const s = wt(t.constructor), n = new Float32Array(t.length);
3232
+ const s = xt(t.constructor), n = new Float32Array(t.length);
3217
3233
  for (let i = 0, o = t.length; i < o; i++)
3218
3234
  n[i] = t[i] * s;
3219
3235
  t = n;
@@ -3222,7 +3238,7 @@ class Fi {
3222
3238
  }
3223
3239
  _createCubicSplineTrackInterpolant(e) {
3224
3240
  e.createInterpolant = function(s) {
3225
- const n = this instanceof It ? Ii : yn;
3241
+ const n = this instanceof Ct ? Ii : bn;
3226
3242
  return new n(this.times, this.values, this.getValueSize() / 3, s);
3227
3243
  }, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
3228
3244
  }
@@ -3233,10 +3249,10 @@ function Ui(r, e, t) {
3233
3249
  const a = t.json.accessors[s.POSITION], l = a.min, h = a.max;
3234
3250
  if (l !== void 0 && h !== void 0) {
3235
3251
  if (n.set(
3236
- new E(l[0], l[1], l[2]),
3237
- new E(h[0], h[1], h[2])
3252
+ new M(l[0], l[1], l[2]),
3253
+ new M(h[0], h[1], h[2])
3238
3254
  ), a.normalized) {
3239
- const u = wt(Ee[a.componentType]);
3255
+ const u = xt(ve[a.componentType]);
3240
3256
  n.min.multiplyScalar(u), n.max.multiplyScalar(u);
3241
3257
  }
3242
3258
  } else {
@@ -3247,15 +3263,15 @@ function Ui(r, e, t) {
3247
3263
  return;
3248
3264
  const i = e.targets;
3249
3265
  if (i !== void 0) {
3250
- const a = new E(), l = new E();
3266
+ const a = new M(), l = new M();
3251
3267
  for (let h = 0, u = i.length; h < u; h++) {
3252
3268
  const c = i[h];
3253
3269
  if (c.POSITION !== void 0) {
3254
- const d = t.json.accessors[c.POSITION], p = d.min, f = d.max;
3255
- if (p !== void 0 && f !== void 0) {
3256
- if (l.setX(Math.max(Math.abs(p[0]), Math.abs(f[0]))), l.setY(Math.max(Math.abs(p[1]), Math.abs(f[1]))), l.setZ(Math.max(Math.abs(p[2]), Math.abs(f[2]))), d.normalized) {
3257
- const m = wt(Ee[d.componentType]);
3258
- l.multiplyScalar(m);
3270
+ const p = t.json.accessors[c.POSITION], m = p.min, b = p.max;
3271
+ if (m !== void 0 && b !== void 0) {
3272
+ if (l.setX(Math.max(Math.abs(m[0]), Math.abs(b[0]))), l.setY(Math.max(Math.abs(m[1]), Math.abs(b[1]))), l.setZ(Math.max(Math.abs(m[2]), Math.abs(b[2]))), p.normalized) {
3273
+ const f = xt(ve[p.componentType]);
3274
+ l.multiplyScalar(f);
3259
3275
  }
3260
3276
  a.max(l);
3261
3277
  } else
@@ -3268,7 +3284,7 @@ function Ui(r, e, t) {
3268
3284
  const o = new hs();
3269
3285
  n.getCenter(o.center), o.radius = n.min.distanceTo(n.max) / 2, r.boundingSphere = o;
3270
3286
  }
3271
- function Wt(r, e, t) {
3287
+ function Jt(r, e, t) {
3272
3288
  const s = e.attributes, n = [];
3273
3289
  function i(o, a) {
3274
3290
  return t.getDependency("accessor", o).then(function(l) {
@@ -3276,7 +3292,7 @@ function Wt(r, e, t) {
3276
3292
  });
3277
3293
  }
3278
3294
  for (const o in s) {
3279
- const a = bt[o] || o.toLowerCase();
3295
+ const a = Tt[o] || o.toLowerCase();
3280
3296
  a in r.attributes || n.push(i(s[o], a));
3281
3297
  }
3282
3298
  if (e.indices !== void 0 && !r.index) {
@@ -3285,17 +3301,17 @@ function Wt(r, e, t) {
3285
3301
  });
3286
3302
  n.push(o);
3287
3303
  }
3288
- return Ot.workingColorSpace !== ae && "COLOR_0" in s && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Ot.workingColorSpace}" not supported.`), te(r, e), Ui(r, e, t), Promise.all(n).then(function() {
3304
+ return Dt.workingColorSpace !== ae && "COLOR_0" in s && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Dt.workingColorSpace}" not supported.`), ne(r, e), Ui(r, e, t), Promise.all(n).then(function() {
3289
3305
  return e.targets !== void 0 ? Di(r, e.targets, t) : r;
3290
3306
  });
3291
3307
  }
3292
3308
  function zi() {
3293
- const r = new N.BoxGeometry(1, 1, 1), e = new N.MeshStandardMaterial({ color: 43775 }), t = new N.Mesh(r, e);
3294
- return t.position.y = 0.5, t.userData.isMovable = !0, t.name = "正方体", nt(t, !0), t;
3309
+ const r = new k.BoxGeometry(1, 1, 1), e = new k.MeshStandardMaterial({ color: 43775 }), t = new k.Mesh(r, e);
3310
+ return t.position.y = 0.5, t.userData.isMovable = !0, t.name = "正方体", rt(t, !0), t;
3295
3311
  }
3296
3312
  function Gi() {
3297
- const r = new N.SphereGeometry(0.6, 32, 32), e = new N.MeshStandardMaterial({ color: 16746496 }), t = new N.Mesh(r, e);
3298
- return t.position.y = 0.6, t.userData.isMovable = !0, t.name = "球体", nt(t, !0), t;
3313
+ const r = new k.SphereGeometry(0.6, 32, 32), e = new k.MeshStandardMaterial({ color: 16746496 }), t = new k.Mesh(r, e);
3314
+ return t.position.y = 0.6, t.userData.isMovable = !0, t.name = "球体", rt(t, !0), t;
3299
3315
  }
3300
3316
  function Xi(r) {
3301
3317
  return new Promise((e, t) => {
@@ -3313,11 +3329,11 @@ function Xi(r) {
3313
3329
  (a) => {
3314
3330
  const l = s === "gltf" || s === "glb" ? a.scene : a;
3315
3331
  l.traverse((c) => {
3316
- var d;
3317
- c.userData.isMovable = !0, c.name || (c.name = c.type), c.type === "Mesh" && (c.frustumCulled = !0, (d = c.geometry) == null || d.computeVertexNormals());
3332
+ var p;
3333
+ c.userData.isMovable = !0, c.name || (c.name = c.type), c.type === "Mesh" && (c.frustumCulled = !0, (p = c.geometry) == null || p.computeVertexNormals());
3318
3334
  });
3319
- const u = new N.Box3().setFromObject(l).getCenter(new N.Vector3());
3320
- l.position.sub(u), nt(l, !0), e(l);
3335
+ const u = new k.Box3().setFromObject(l).getCenter(new k.Vector3());
3336
+ l.position.sub(u), rt(l, !0), e(l);
3321
3337
  },
3322
3338
  void 0,
3323
3339
  (a) => t(a)
@@ -3340,7 +3356,7 @@ const Bi = {
3340
3356
  }, Ki = { class: "tree-icon" }, Vi = { class: "tree-name" }, Zi = {
3341
3357
  key: 0,
3342
3358
  class: "tree-children"
3343
- }, Qi = /* @__PURE__ */ Fe({
3359
+ }, Qi = /* @__PURE__ */ Ge({
3344
3360
  __name: "TreeItem",
3345
3361
  props: {
3346
3362
  node: {},
@@ -3349,15 +3365,15 @@ const Bi = {
3349
3365
  },
3350
3366
  emits: ["select", "delete"],
3351
3367
  setup(r, { emit: e }) {
3352
- const t = r, s = e, n = K(null), { expandedSet: i, toggleExpand: o } = bn("treeExpand"), a = Be(() => i.value.has(t.node.uuid)), l = Be(() => (t.version, t.node.children.some((m) => m.userData.isMovable === !0))), h = Be(() => (t.version, t.node.children.filter(
3353
- (m) => m.userData.isMovable === !0
3354
- ))), u = Be(
3368
+ const t = r, s = e, n = G(null), { expandedSet: i, toggleExpand: o } = Tn("treeExpand"), a = Ze(() => i.value.has(t.node.uuid)), l = Ze(() => (t.version, t.node.children.some((f) => f.userData.isMovable === !0))), h = Ze(() => (t.version, t.node.children.filter(
3369
+ (f) => f.userData.isMovable === !0
3370
+ ))), u = Ze(
3355
3371
  () => {
3356
- var m;
3357
- return ((m = t.selectedObject) == null ? void 0 : m.uuid) === t.node.uuid;
3372
+ var f;
3373
+ return ((f = t.selectedObject) == null ? void 0 : f.uuid) === t.node.uuid;
3358
3374
  }
3359
3375
  );
3360
- wn(
3376
+ xn(
3361
3377
  () => {
3362
3378
  u.value && n.value && n.value.scrollIntoView({
3363
3379
  block: "nearest",
@@ -3368,55 +3384,55 @@ const Bi = {
3368
3384
  },
3369
3385
  { flush: "post" }
3370
3386
  );
3371
- const c = (m) => {
3372
- m.stopPropagation(), s("select", t.node);
3373
- }, d = (m) => {
3374
- m.stopPropagation(), s("delete", t.node);
3375
- }, p = (m) => m.type === "Mesh" || m.type === "Sprite" ? "🟦" : m.type === "Light" ? "💡" : "📦", f = (m) => m.name || `${m.type} (${m.id})`;
3376
- return (m, y) => {
3377
- const _ = Tn("TreeItem", !0);
3378
- return Y(), q("div", {
3387
+ const c = (f) => {
3388
+ f.stopPropagation(), s("select", t.node);
3389
+ }, p = (f) => {
3390
+ f.stopPropagation(), s("delete", t.node);
3391
+ }, m = (f) => f.type === "Mesh" || f.type === "Sprite" ? "🟦" : f.type === "Light" ? "💡" : "📦", b = (f) => f.name || `${f.type} (${f.id})`;
3392
+ return (f, y) => {
3393
+ const d = En("TreeItem", !0);
3394
+ return N(), U("div", {
3379
3395
  class: "tree-node",
3380
3396
  ref_key: "nodeRef",
3381
3397
  ref: n
3382
3398
  }, [
3383
3399
  g("div", {
3384
- class: xn(["tree-item", { selected: u.value }]),
3400
+ class: Fe(["tree-item", { selected: u.value }]),
3385
3401
  onClick: c
3386
3402
  }, [
3387
- l.value ? (Y(), q("span", {
3403
+ l.value ? (N(), U("span", {
3388
3404
  key: 0,
3389
3405
  class: "toggle-icon",
3390
- onClick: y[0] || (y[0] = vt((x) => En(o)(r.node.uuid), ["stop"]))
3391
- }, st(a.value ? "▼" : "▶"), 1)) : (Y(), q("span", Bi)),
3392
- g("span", Ki, st(p(r.node)), 1),
3393
- g("span", Vi, st(f(r.node)), 1),
3406
+ onClick: y[0] || (y[0] = At((_) => Mn(o)(r.node.uuid), ["stop"]))
3407
+ }, Ee(a.value ? "▼" : "▶"), 1)) : (N(), U("span", Bi)),
3408
+ g("span", Ki, Ee(m(r.node)), 1),
3409
+ g("span", Vi, Ee(b(r.node)), 1),
3394
3410
  g("button", {
3395
3411
  class: "tree-delete",
3396
- onClick: vt(d, ["stop"])
3412
+ onClick: At(p, ["stop"])
3397
3413
  }, "×")
3398
3414
  ], 2),
3399
- a.value && l.value ? (Y(), q("div", Zi, [
3400
- (Y(!0), q($t, null, Jt(h.value, (x) => (Y(), en(_, {
3401
- key: x.uuid,
3402
- node: x,
3415
+ a.value && l.value ? (N(), U("div", Zi, [
3416
+ (N(!0), U(en, null, tn(h.value, (_) => (N(), ot(d, {
3417
+ key: _.uuid,
3418
+ node: _,
3403
3419
  "selected-object": r.selectedObject,
3404
3420
  version: r.version,
3405
- onSelect: y[1] || (y[1] = (M) => s("select", M)),
3406
- onDelete: y[2] || (y[2] = (M) => s("delete", M))
3421
+ onSelect: y[1] || (y[1] = (x) => s("select", x)),
3422
+ onDelete: y[2] || (y[2] = (x) => s("delete", x))
3407
3423
  }, null, 8, ["node", "selected-object", "version"]))), 128))
3408
- ])) : tn("", !0)
3424
+ ])) : de("", !0)
3409
3425
  ], 512);
3410
3426
  };
3411
3427
  }
3412
- }), Ue = (r, e) => {
3428
+ }), Xe = (r, e) => {
3413
3429
  const t = r.__vccOpts || r;
3414
3430
  for (const [s, n] of e)
3415
3431
  t[s] = n;
3416
3432
  return t;
3417
- }, qi = /* @__PURE__ */ Ue(Qi, [["__scopeId", "data-v-5ad9c842"]]);
3433
+ }, qi = /* @__PURE__ */ Xe(Qi, [["__scopeId", "data-v-5ad9c842"]]);
3418
3434
  function Wi(r) {
3419
- const e = K(/* @__PURE__ */ new Set()), t = (n) => {
3435
+ const e = G(/* @__PURE__ */ new Set()), t = (n) => {
3420
3436
  const i = new Set(e.value);
3421
3437
  i.has(n) ? i.delete(n) : i.add(n), e.value = i;
3422
3438
  }, s = (n) => {
@@ -3427,7 +3443,7 @@ function Wi(r) {
3427
3443
  i.add(o.uuid), o = o.parent;
3428
3444
  e.value = i;
3429
3445
  };
3430
- return Mn(
3446
+ return nn(
3431
3447
  r,
3432
3448
  (n) => {
3433
3449
  n && s(n);
@@ -3441,10 +3457,22 @@ const $i = {
3441
3457
  }, Ji = { class: "property-group tree-group" }, eo = { class: "tree-container" }, to = {
3442
3458
  key: 0,
3443
3459
  class: "tree-empty"
3444
- }, no = { class: "property-group" }, so = { class: "row" }, io = { class: "property-group" }, oo = { class: "row" }, ro = { class: "property-group" }, ao = { class: "row" }, lo = {
3460
+ }, no = {
3461
+ key: 0,
3462
+ class: "tabs"
3463
+ }, so = {
3464
+ key: 1,
3465
+ class: "tab-content"
3466
+ }, io = { class: "property-group" }, oo = { class: "row" }, ro = { class: "property-group" }, ao = { class: "row" }, lo = { class: "property-group" }, co = { class: "row" }, ho = {
3467
+ key: 0,
3468
+ class: "property-group material-group"
3469
+ }, uo = { class: "slider-row" }, po = { class: "slider-value" }, fo = { class: "slider-row" }, mo = { class: "slider-value" }, go = { class: "slider-row" }, yo = { class: "slider-value" }, _o = {
3470
+ key: 0,
3471
+ class: "material-hint"
3472
+ }, bo = {
3445
3473
  key: 1,
3446
3474
  class: "property-panel empty"
3447
- }, co = /* @__PURE__ */ Fe({
3475
+ }, wo = /* @__PURE__ */ Ge({
3448
3476
  __name: "PropertyPanel",
3449
3477
  props: {
3450
3478
  transform: {},
@@ -3453,330 +3481,463 @@ const $i = {
3453
3481
  },
3454
3482
  emits: ["propertyChange", "treeSelect", "treeDelete"],
3455
3483
  setup(r, { emit: e }) {
3456
- const t = r, s = e, n = () => s("propertyChange"), i = K(0), o = Sn(t, "selectedObject"), { expandedSet: a, toggleExpand: l } = Wi(o);
3457
- vn("treeExpand", { expandedSet: a, toggleExpand: l });
3458
- const h = (u) => {
3459
- i.value++, s("treeDelete", u);
3460
- };
3461
- return (u, c) => r.transform ? (Y(), q("div", $i, [
3462
- c[23] || (c[23] = g("h3", null, "属性面板", -1)),
3484
+ const t = r, s = e, n = () => s("propertyChange"), i = G("transform"), o = G(0), a = vn(t, "selectedObject"), { expandedSet: l, toggleExpand: h } = Wi(a);
3485
+ Sn("treeExpand", { expandedSet: l, toggleExpand: h });
3486
+ const u = (y) => {
3487
+ o.value++, s("treeDelete", y);
3488
+ }, c = sn({
3489
+ metalness: 0,
3490
+ roughness: 0.5,
3491
+ opacity: 1
3492
+ }), p = G(!1);
3493
+ function m(y) {
3494
+ let d = null;
3495
+ return y.traverse((_) => {
3496
+ if (_.type === "Mesh" && !d) {
3497
+ const x = _, S = Array.isArray(x.material) ? x.material : [x.material];
3498
+ for (const A of S)
3499
+ if (A && (A.type === "MeshStandardMaterial" || A.type === "MeshPhongMaterial")) {
3500
+ const v = A;
3501
+ d = {
3502
+ metalness: v.metalness ?? 0,
3503
+ roughness: v.roughness ?? 0.5,
3504
+ opacity: A.opacity ?? 1
3505
+ };
3506
+ break;
3507
+ }
3508
+ }
3509
+ }), d;
3510
+ }
3511
+ function b(y, d) {
3512
+ let _ = !1;
3513
+ return y.traverse((x) => {
3514
+ if (x.type === "Mesh") {
3515
+ const S = x, A = Array.isArray(S.material) ? S.material : [S.material];
3516
+ for (const v of A)
3517
+ v && (v.type === "MeshStandardMaterial" || v.type === "MeshPhongMaterial") && (d.metalness !== void 0 && (v.metalness = d.metalness), d.roughness !== void 0 && (v.roughness = d.roughness), d.opacity !== void 0 && (v.opacity = d.opacity, v.transparent = d.opacity < 1), v.needsUpdate = !0, _ = !0);
3518
+ }
3519
+ }), _;
3520
+ }
3521
+ function f() {
3522
+ if (t.selectedObject) {
3523
+ const y = b(t.selectedObject, {
3524
+ metalness: c.metalness,
3525
+ roughness: c.roughness,
3526
+ opacity: c.opacity
3527
+ });
3528
+ p.value = y;
3529
+ }
3530
+ }
3531
+ return nn(
3532
+ () => t.selectedObject,
3533
+ (y) => {
3534
+ if (y) {
3535
+ const d = m(y);
3536
+ d ? (c.metalness = d.metalness, c.roughness = d.roughness, c.opacity = d.opacity, p.value = !0) : (c.metalness = 0, c.roughness = 0.5, c.opacity = 1, p.value = !1);
3537
+ } else
3538
+ c.metalness = 0, c.roughness = 0.5, c.opacity = 1, p.value = !1;
3539
+ },
3540
+ { immediate: !0 }
3541
+ ), (y, d) => r.transform ? (N(), U("div", $i, [
3542
+ d[32] || (d[32] = g("h3", null, "属性面板", -1)),
3463
3543
  g("div", Ji, [
3464
- c[10] || (c[10] = g("label", null, "场景物体", -1)),
3544
+ d[15] || (d[15] = g("label", null, "场景物体", -1)),
3465
3545
  g("div", eo, [
3466
- (Y(!0), q($t, null, Jt(r.treeData, (d) => (Y(), en(qi, {
3467
- key: d.uuid,
3468
- node: d,
3546
+ (N(!0), U(en, null, tn(r.treeData, (_) => (N(), ot(qi, {
3547
+ key: _.uuid,
3548
+ node: _,
3469
3549
  "selected-object": r.selectedObject,
3470
- version: i.value,
3471
- onSelect: c[0] || (c[0] = (p) => s("treeSelect", p)),
3472
- onDelete: h
3550
+ version: o.value,
3551
+ onSelect: d[0] || (d[0] = (x) => s("treeSelect", x)),
3552
+ onDelete: u
3473
3553
  }, null, 8, ["node", "selected-object", "version"]))), 128)),
3474
- r.treeData.length === 0 ? (Y(), q("div", to, "暂无物体")) : tn("", !0)
3554
+ r.treeData.length === 0 ? (N(), U("div", to, "暂无物体")) : de("", !0)
3475
3555
  ])
3476
3556
  ]),
3477
- g("div", no, [
3478
- c[14] || (c[14] = g("label", null, "位置", -1)),
3479
- g("div", so, [
3480
- c[11] || (c[11] = g("span", null, "X:", -1)),
3481
- H(g("input", {
3482
- type: "number",
3483
- "onUpdate:modelValue": c[1] || (c[1] = (d) => r.transform.position.x = d),
3484
- step: "0.01",
3485
- onInput: n
3486
- }, null, 544), [
3487
- [
3488
- oe,
3489
- r.transform.position.x,
3490
- void 0,
3491
- { number: !0 }
3492
- ]
3493
- ]),
3494
- c[12] || (c[12] = g("span", null, "Y:", -1)),
3495
- H(g("input", {
3496
- type: "number",
3497
- "onUpdate:modelValue": c[2] || (c[2] = (d) => r.transform.position.y = d),
3498
- step: "0.01",
3499
- onInput: n
3500
- }, null, 544), [
3501
- [
3502
- oe,
3503
- r.transform.position.y,
3504
- void 0,
3505
- { number: !0 }
3506
- ]
3507
- ]),
3508
- c[13] || (c[13] = g("span", null, "Z:", -1)),
3509
- H(g("input", {
3510
- type: "number",
3511
- "onUpdate:modelValue": c[3] || (c[3] = (d) => r.transform.position.z = d),
3512
- step: "0.01",
3513
- onInput: n
3514
- }, null, 544), [
3515
- [
3516
- oe,
3517
- r.transform.position.z,
3518
- void 0,
3519
- { number: !0 }
3520
- ]
3521
- ])
3522
- ])
3523
- ]),
3524
- g("div", io, [
3525
- c[18] || (c[18] = g("label", null, "旋转 (弧度)", -1)),
3526
- g("div", oo, [
3527
- c[15] || (c[15] = g("span", null, "X:", -1)),
3528
- H(g("input", {
3529
- type: "number",
3530
- "onUpdate:modelValue": c[4] || (c[4] = (d) => r.transform.rotation.x = d),
3531
- step: "0.01",
3532
- onInput: n
3533
- }, null, 544), [
3534
- [
3535
- oe,
3536
- r.transform.rotation.x,
3537
- void 0,
3538
- { number: !0 }
3539
- ]
3540
- ]),
3541
- c[16] || (c[16] = g("span", null, "Y:", -1)),
3542
- H(g("input", {
3543
- type: "number",
3544
- "onUpdate:modelValue": c[5] || (c[5] = (d) => r.transform.rotation.y = d),
3545
- step: "0.01",
3546
- onInput: n
3547
- }, null, 544), [
3548
- [
3549
- oe,
3550
- r.transform.rotation.y,
3551
- void 0,
3552
- { number: !0 }
3553
- ]
3557
+ d[33] || (d[33] = g("div", { class: "property-group" }, [
3558
+ g("label", null, "全局属性"),
3559
+ g("div", { class: "row" })
3560
+ ], -1)),
3561
+ r.selectedObject ? (N(), U("div", no, [
3562
+ g("button", {
3563
+ class: Fe(["tab-btn", { active: i.value === "transform" }]),
3564
+ onClick: d[1] || (d[1] = (_) => i.value = "transform")
3565
+ }, " 🔄 变换 ", 2),
3566
+ g("button", {
3567
+ class: Fe(["tab-btn", { active: i.value === "info" }]),
3568
+ onClick: d[2] || (d[2] = (_) => i.value = "info")
3569
+ }, " ℹ️ 信息 ", 2)
3570
+ ])) : de("", !0),
3571
+ r.selectedObject ? (N(), U("div", so, [
3572
+ D(g("div", null, [
3573
+ g("div", io, [
3574
+ d[19] || (d[19] = g("label", null, "位置", -1)),
3575
+ g("div", oo, [
3576
+ d[16] || (d[16] = g("span", null, "X:", -1)),
3577
+ D(g("input", {
3578
+ type: "number",
3579
+ "onUpdate:modelValue": d[3] || (d[3] = (_) => r.transform.position.x = _),
3580
+ step: "0.01",
3581
+ onInput: n
3582
+ }, null, 544), [
3583
+ [
3584
+ Q,
3585
+ r.transform.position.x,
3586
+ void 0,
3587
+ { number: !0 }
3588
+ ]
3589
+ ]),
3590
+ d[17] || (d[17] = g("span", null, "Y:", -1)),
3591
+ D(g("input", {
3592
+ type: "number",
3593
+ "onUpdate:modelValue": d[4] || (d[4] = (_) => r.transform.position.y = _),
3594
+ step: "0.01",
3595
+ onInput: n
3596
+ }, null, 544), [
3597
+ [
3598
+ Q,
3599
+ r.transform.position.y,
3600
+ void 0,
3601
+ { number: !0 }
3602
+ ]
3603
+ ]),
3604
+ d[18] || (d[18] = g("span", null, "Z:", -1)),
3605
+ D(g("input", {
3606
+ type: "number",
3607
+ "onUpdate:modelValue": d[5] || (d[5] = (_) => r.transform.position.z = _),
3608
+ step: "0.01",
3609
+ onInput: n
3610
+ }, null, 544), [
3611
+ [
3612
+ Q,
3613
+ r.transform.position.z,
3614
+ void 0,
3615
+ { number: !0 }
3616
+ ]
3617
+ ])
3618
+ ])
3554
3619
  ]),
3555
- c[17] || (c[17] = g("span", null, "Z:", -1)),
3556
- H(g("input", {
3557
- type: "number",
3558
- "onUpdate:modelValue": c[6] || (c[6] = (d) => r.transform.rotation.z = d),
3559
- step: "0.01",
3560
- onInput: n
3561
- }, null, 544), [
3562
- [
3563
- oe,
3564
- r.transform.rotation.z,
3565
- void 0,
3566
- { number: !0 }
3567
- ]
3568
- ])
3569
- ])
3570
- ]),
3571
- g("div", ro, [
3572
- c[22] || (c[22] = g("label", null, "缩放", -1)),
3573
- g("div", ao, [
3574
- c[19] || (c[19] = g("span", null, "X:", -1)),
3575
- H(g("input", {
3576
- type: "number",
3577
- "onUpdate:modelValue": c[7] || (c[7] = (d) => r.transform.scale.x = d),
3578
- step: "0.01",
3579
- onInput: n
3580
- }, null, 544), [
3581
- [
3582
- oe,
3583
- r.transform.scale.x,
3584
- void 0,
3585
- { number: !0 }
3586
- ]
3620
+ g("div", ro, [
3621
+ d[23] || (d[23] = g("label", null, "旋转 (弧度)", -1)),
3622
+ g("div", ao, [
3623
+ d[20] || (d[20] = g("span", null, "X:", -1)),
3624
+ D(g("input", {
3625
+ type: "number",
3626
+ "onUpdate:modelValue": d[6] || (d[6] = (_) => r.transform.rotation.x = _),
3627
+ step: "0.01",
3628
+ onInput: n
3629
+ }, null, 544), [
3630
+ [
3631
+ Q,
3632
+ r.transform.rotation.x,
3633
+ void 0,
3634
+ { number: !0 }
3635
+ ]
3636
+ ]),
3637
+ d[21] || (d[21] = g("span", null, "Y:", -1)),
3638
+ D(g("input", {
3639
+ type: "number",
3640
+ "onUpdate:modelValue": d[7] || (d[7] = (_) => r.transform.rotation.y = _),
3641
+ step: "0.01",
3642
+ onInput: n
3643
+ }, null, 544), [
3644
+ [
3645
+ Q,
3646
+ r.transform.rotation.y,
3647
+ void 0,
3648
+ { number: !0 }
3649
+ ]
3650
+ ]),
3651
+ d[22] || (d[22] = g("span", null, "Z:", -1)),
3652
+ D(g("input", {
3653
+ type: "number",
3654
+ "onUpdate:modelValue": d[8] || (d[8] = (_) => r.transform.rotation.z = _),
3655
+ step: "0.01",
3656
+ onInput: n
3657
+ }, null, 544), [
3658
+ [
3659
+ Q,
3660
+ r.transform.rotation.z,
3661
+ void 0,
3662
+ { number: !0 }
3663
+ ]
3664
+ ])
3665
+ ])
3587
3666
  ]),
3588
- c[20] || (c[20] = g("span", null, "Y:", -1)),
3589
- H(g("input", {
3590
- type: "number",
3591
- "onUpdate:modelValue": c[8] || (c[8] = (d) => r.transform.scale.y = d),
3592
- step: "0.01",
3593
- onInput: n
3594
- }, null, 544), [
3595
- [
3596
- oe,
3597
- r.transform.scale.y,
3598
- void 0,
3599
- { number: !0 }
3600
- ]
3667
+ g("div", lo, [
3668
+ d[27] || (d[27] = g("label", null, "缩放", -1)),
3669
+ g("div", co, [
3670
+ d[24] || (d[24] = g("span", null, "X:", -1)),
3671
+ D(g("input", {
3672
+ type: "number",
3673
+ "onUpdate:modelValue": d[9] || (d[9] = (_) => r.transform.scale.x = _),
3674
+ step: "0.01",
3675
+ onInput: n
3676
+ }, null, 544), [
3677
+ [
3678
+ Q,
3679
+ r.transform.scale.x,
3680
+ void 0,
3681
+ { number: !0 }
3682
+ ]
3683
+ ]),
3684
+ d[25] || (d[25] = g("span", null, "Y:", -1)),
3685
+ D(g("input", {
3686
+ type: "number",
3687
+ "onUpdate:modelValue": d[10] || (d[10] = (_) => r.transform.scale.y = _),
3688
+ step: "0.01",
3689
+ onInput: n
3690
+ }, null, 544), [
3691
+ [
3692
+ Q,
3693
+ r.transform.scale.y,
3694
+ void 0,
3695
+ { number: !0 }
3696
+ ]
3697
+ ]),
3698
+ d[26] || (d[26] = g("span", null, "Z:", -1)),
3699
+ D(g("input", {
3700
+ type: "number",
3701
+ "onUpdate:modelValue": d[11] || (d[11] = (_) => r.transform.scale.z = _),
3702
+ step: "0.01",
3703
+ onInput: n
3704
+ }, null, 544), [
3705
+ [
3706
+ Q,
3707
+ r.transform.scale.z,
3708
+ void 0,
3709
+ { number: !0 }
3710
+ ]
3711
+ ])
3712
+ ])
3601
3713
  ]),
3602
- c[21] || (c[21] = g("span", null, "Z:", -1)),
3603
- H(g("input", {
3604
- type: "number",
3605
- "onUpdate:modelValue": c[9] || (c[9] = (d) => r.transform.scale.z = d),
3606
- step: "0.01",
3607
- onInput: n
3608
- }, null, 544), [
3609
- [
3610
- oe,
3611
- r.transform.scale.z,
3612
- void 0,
3613
- { number: !0 }
3614
- ]
3615
- ])
3714
+ r.selectedObject ? (N(), U("div", ho, [
3715
+ d[31] || (d[31] = g("label", null, "材质", -1)),
3716
+ g("div", uo, [
3717
+ d[28] || (d[28] = g("span", { class: "slider-label" }, "金属度", -1)),
3718
+ D(g("input", {
3719
+ type: "range",
3720
+ min: "0",
3721
+ max: "1",
3722
+ step: "0.01",
3723
+ "onUpdate:modelValue": d[12] || (d[12] = (_) => c.metalness = _),
3724
+ onInput: f
3725
+ }, null, 544), [
3726
+ [
3727
+ Q,
3728
+ c.metalness,
3729
+ void 0,
3730
+ { number: !0 }
3731
+ ]
3732
+ ]),
3733
+ g("span", po, Ee(c.metalness.toFixed(2)), 1)
3734
+ ]),
3735
+ g("div", fo, [
3736
+ d[29] || (d[29] = g("span", { class: "slider-label" }, "粗糙度", -1)),
3737
+ D(g("input", {
3738
+ type: "range",
3739
+ min: "0",
3740
+ max: "1",
3741
+ step: "0.01",
3742
+ "onUpdate:modelValue": d[13] || (d[13] = (_) => c.roughness = _),
3743
+ onInput: f
3744
+ }, null, 544), [
3745
+ [
3746
+ Q,
3747
+ c.roughness,
3748
+ void 0,
3749
+ { number: !0 }
3750
+ ]
3751
+ ]),
3752
+ g("span", mo, Ee(c.roughness.toFixed(2)), 1)
3753
+ ]),
3754
+ g("div", go, [
3755
+ d[30] || (d[30] = g("span", { class: "slider-label" }, "透明度", -1)),
3756
+ D(g("input", {
3757
+ type: "range",
3758
+ min: "0",
3759
+ max: "1",
3760
+ step: "0.01",
3761
+ "onUpdate:modelValue": d[14] || (d[14] = (_) => c.opacity = _),
3762
+ onInput: f
3763
+ }, null, 544), [
3764
+ [
3765
+ Q,
3766
+ c.opacity,
3767
+ void 0,
3768
+ { number: !0 }
3769
+ ]
3770
+ ]),
3771
+ g("span", yo, Ee(c.opacity.toFixed(2)), 1)
3772
+ ]),
3773
+ p.value ? de("", !0) : (N(), U("div", _o, " ⚠️ 当前材质不支持金属度/粗糙度(仅支持 Standard/Phong) "))
3774
+ ])) : de("", !0)
3775
+ ], 512), [
3776
+ [he, i.value === "transform"]
3616
3777
  ])
3617
- ])
3618
- ])) : (Y(), q("div", lo, [...c[24] || (c[24] = [
3778
+ ])) : de("", !0)
3779
+ ])) : (N(), U("div", bo, [...d[34] || (d[34] = [
3619
3780
  g("p", null, "未选中任何模型", -1)
3620
3781
  ])]));
3621
3782
  }
3622
- }), ho = /* @__PURE__ */ Ue(co, [["__scopeId", "data-v-94ef5fd1"]]), uo = { class: "top-bar" }, po = { class: "left-section" }, fo = { class: "dropdown-menu" }, mo = { class: "dropdown-menu sub-menu" }, go = { class: "dropdown-menu" }, yo = { class: "dropdown-menu sub-menu" }, _o = { class: "dropdown-menu" }, bo = { class: "dropdown-menu" }, wo = { class: "dropdown-menu" }, To = /* @__PURE__ */ Fe({
3783
+ }), To = /* @__PURE__ */ Xe(wo, [["__scopeId", "data-v-d75c643f"]]), xo = { class: "top-bar" }, Eo = { class: "left-section" }, Mo = { class: "dropdown-menu" }, vo = { class: "dropdown-menu sub-menu" }, So = { class: "dropdown-menu" }, Ro = { class: "dropdown-menu sub-menu" }, Ao = { class: "dropdown-menu" }, Po = { class: "dropdown-menu" }, Lo = { class: "dropdown-menu" }, Io = /* @__PURE__ */ Ge({
3623
3784
  __name: "TopBar",
3624
3785
  emits: ["addModel", "importModel"],
3625
3786
  setup(r, { emit: e }) {
3626
- const t = K(!1), s = K(!1), n = K(!1), i = K(!1), o = K(!1), a = K(!1), l = K(!1), h = e, u = K(null), c = () => {
3627
- var W;
3628
- return (W = u.value) == null ? void 0 : W.click();
3629
- }, d = (W) => {
3630
- const T = W.target;
3631
- T.files && T.files.length > 0 && (h("importModel", T.files[0]), T.value = "");
3632
- }, p = () => console.log("新建项目"), f = () => console.log("保存场景"), m = () => console.log("导出模型"), y = () => console.log("撤销"), _ = () => console.log("重做"), x = () => console.log("复制物体"), M = () => console.log("删除物体"), S = () => console.log("重置相机"), L = () => console.log("切换网格"), v = () => console.log("打开帮助"), I = () => console.log("关于编辑器"), se = () => console.log("打开项目"), J = () => console.log("打开模型"), de = () => console.log("打开场景");
3633
- return (W, T) => (Y(), q("div", uo, [
3634
- g("div", po, [
3787
+ const t = G(!1), s = G(!1), n = G(!1), i = G(!1), o = G(!1), a = G(!1), l = G(!1), h = e, u = G(null), c = () => {
3788
+ var $;
3789
+ return ($ = u.value) == null ? void 0 : $.click();
3790
+ }, p = ($) => {
3791
+ const E = $.target;
3792
+ E.files && E.files.length > 0 && (h("importModel", E.files[0]), E.value = "");
3793
+ }, m = () => console.log("新建项目"), b = () => console.log("保存场景"), f = () => console.log("导出模型"), y = () => console.log("撤销"), d = () => console.log("重做"), _ = () => console.log("复制物体"), x = () => console.log("删除物体"), S = () => console.log("重置相机"), A = () => console.log("切换网格"), v = () => console.log("打开帮助"), I = () => console.log("关于编辑器"), ie = () => console.log("打开项目"), ee = () => console.log("打开模型"), fe = () => console.log("打开场景");
3794
+ return ($, E) => (N(), U("div", xo, [
3795
+ g("div", Eo, [
3635
3796
  g("div", {
3636
3797
  class: "dropdown-wrapper",
3637
- onMouseenter: T[2] || (T[2] = (k) => t.value = !0),
3638
- onMouseleave: T[3] || (T[3] = (k) => t.value = !1)
3798
+ onMouseenter: E[2] || (E[2] = (H) => t.value = !0),
3799
+ onMouseleave: E[3] || (E[3] = (H) => t.value = !1)
3639
3800
  }, [
3640
- T[17] || (T[17] = g("button", { class: "menu-btn" }, "文件", -1)),
3641
- H(g("div", fo, [
3801
+ E[17] || (E[17] = g("button", { class: "menu-btn" }, "文件", -1)),
3802
+ D(g("div", Mo, [
3642
3803
  g("div", {
3643
3804
  class: "menu-item",
3644
- onClick: p
3805
+ onClick: m
3645
3806
  }, "新建"),
3646
3807
  g("div", {
3647
3808
  class: "menu-item dropdown-wrapper sub-trigger",
3648
- onMouseenter: T[0] || (T[0] = (k) => a.value = !0),
3649
- onMouseleave: T[1] || (T[1] = (k) => a.value = !1)
3809
+ onMouseenter: E[0] || (E[0] = (H) => a.value = !0),
3810
+ onMouseleave: E[1] || (E[1] = (H) => a.value = !1)
3650
3811
  }, [
3651
- T[16] || (T[16] = g("span", null, "打开", -1)),
3652
- H(g("div", mo, [
3812
+ E[16] || (E[16] = g("span", null, "打开", -1)),
3813
+ D(g("div", vo, [
3653
3814
  g("div", {
3654
3815
  class: "menu-item",
3655
- onClick: se
3816
+ onClick: ie
3656
3817
  }, "打开项目"),
3657
3818
  g("div", {
3658
3819
  class: "menu-item",
3659
- onClick: J
3820
+ onClick: ee
3660
3821
  }, "打开模型"),
3661
3822
  g("div", {
3662
3823
  class: "menu-item",
3663
- onClick: de
3824
+ onClick: fe
3664
3825
  }, "打开场景")
3665
3826
  ], 512), [
3666
- [pe, a.value]
3827
+ [he, a.value]
3667
3828
  ])
3668
3829
  ], 32),
3669
3830
  g("div", {
3670
3831
  class: "menu-item",
3671
- onClick: f
3832
+ onClick: b
3672
3833
  }, "保存"),
3673
3834
  g("div", {
3674
3835
  class: "menu-item",
3675
- onClick: m
3836
+ onClick: f
3676
3837
  }, "导出")
3677
3838
  ], 512), [
3678
- [pe, t.value]
3839
+ [he, t.value]
3679
3840
  ])
3680
3841
  ], 32),
3681
3842
  g("div", {
3682
3843
  class: "dropdown-wrapper",
3683
- onMouseenter: T[8] || (T[8] = (k) => o.value = !0),
3684
- onMouseleave: T[9] || (T[9] = (k) => o.value = !1)
3844
+ onMouseenter: E[8] || (E[8] = (H) => o.value = !0),
3845
+ onMouseleave: E[9] || (E[9] = (H) => o.value = !1)
3685
3846
  }, [
3686
- T[19] || (T[19] = g("button", { class: "menu-btn" }, "添加", -1)),
3687
- H(g("div", go, [
3847
+ E[19] || (E[19] = g("button", { class: "menu-btn" }, "添加", -1)),
3848
+ D(g("div", So, [
3688
3849
  g("div", {
3689
3850
  class: "menu-item",
3690
3851
  onClick: y
3691
3852
  }, "组"),
3692
3853
  g("div", {
3693
3854
  class: "menu-item dropdown-wrapper sub-trigger",
3694
- onMouseenter: T[6] || (T[6] = (k) => l.value = !0),
3695
- onMouseleave: T[7] || (T[7] = (k) => l.value = !1)
3855
+ onMouseenter: E[6] || (E[6] = (H) => l.value = !0),
3856
+ onMouseleave: E[7] || (E[7] = (H) => l.value = !1)
3696
3857
  }, [
3697
- T[18] || (T[18] = g("span", null, "网格", -1)),
3698
- H(g("div", yo, [
3858
+ E[18] || (E[18] = g("span", null, "网格", -1)),
3859
+ D(g("div", Ro, [
3699
3860
  g("div", {
3700
3861
  class: "menu-item",
3701
- onClick: T[4] || (T[4] = (k) => h("addModel", "box"))
3862
+ onClick: E[4] || (E[4] = (H) => h("addModel", "box"))
3702
3863
  }, " 正方体 "),
3703
3864
  g("div", {
3704
3865
  class: "menu-item",
3705
- onClick: T[5] || (T[5] = (k) => h("addModel", "sphere"))
3866
+ onClick: E[5] || (E[5] = (H) => h("addModel", "sphere"))
3706
3867
  }, " 球体 "),
3707
3868
  g("div", {
3708
3869
  class: "menu-item",
3709
3870
  onClick: c
3710
3871
  }, "导入")
3711
3872
  ], 512), [
3712
- [pe, l.value]
3873
+ [he, l.value]
3713
3874
  ])
3714
3875
  ], 32),
3715
3876
  g("div", {
3716
3877
  class: "menu-item",
3717
- onClick: x
3878
+ onClick: _
3718
3879
  }, "光源"),
3719
3880
  g("div", {
3720
3881
  class: "menu-item",
3721
- onClick: M
3882
+ onClick: x
3722
3883
  }, "摄像机")
3723
3884
  ], 512), [
3724
- [pe, o.value]
3885
+ [he, o.value]
3725
3886
  ])
3726
3887
  ], 32),
3727
3888
  g("div", {
3728
3889
  class: "dropdown-wrapper",
3729
- onMouseenter: T[10] || (T[10] = (k) => s.value = !0),
3730
- onMouseleave: T[11] || (T[11] = (k) => s.value = !1)
3890
+ onMouseenter: E[10] || (E[10] = (H) => s.value = !0),
3891
+ onMouseleave: E[11] || (E[11] = (H) => s.value = !1)
3731
3892
  }, [
3732
- T[20] || (T[20] = g("button", { class: "menu-btn" }, "编辑", -1)),
3733
- H(g("div", _o, [
3893
+ E[20] || (E[20] = g("button", { class: "menu-btn" }, "编辑", -1)),
3894
+ D(g("div", Ao, [
3734
3895
  g("div", {
3735
3896
  class: "menu-item",
3736
3897
  onClick: y
3737
3898
  }, "撤销"),
3738
3899
  g("div", {
3739
3900
  class: "menu-item",
3740
- onClick: _
3901
+ onClick: d
3741
3902
  }, "重做"),
3742
3903
  g("div", {
3743
3904
  class: "menu-item",
3744
- onClick: x
3905
+ onClick: _
3745
3906
  }, "复制"),
3746
3907
  g("div", {
3747
3908
  class: "menu-item",
3748
- onClick: M
3909
+ onClick: x
3749
3910
  }, "删除")
3750
3911
  ], 512), [
3751
- [pe, s.value]
3912
+ [he, s.value]
3752
3913
  ])
3753
3914
  ], 32),
3754
3915
  g("div", {
3755
3916
  class: "dropdown-wrapper",
3756
- onMouseenter: T[12] || (T[12] = (k) => n.value = !0),
3757
- onMouseleave: T[13] || (T[13] = (k) => n.value = !1)
3917
+ onMouseenter: E[12] || (E[12] = (H) => n.value = !0),
3918
+ onMouseleave: E[13] || (E[13] = (H) => n.value = !1)
3758
3919
  }, [
3759
- T[21] || (T[21] = g("button", { class: "menu-btn" }, "视图", -1)),
3760
- H(g("div", bo, [
3920
+ E[21] || (E[21] = g("button", { class: "menu-btn" }, "视图", -1)),
3921
+ D(g("div", Po, [
3761
3922
  g("div", {
3762
3923
  class: "menu-item",
3763
3924
  onClick: S
3764
3925
  }, "重置相机"),
3765
3926
  g("div", {
3766
3927
  class: "menu-item",
3767
- onClick: L
3928
+ onClick: A
3768
3929
  }, "显示网格")
3769
3930
  ], 512), [
3770
- [pe, n.value]
3931
+ [he, n.value]
3771
3932
  ])
3772
3933
  ], 32),
3773
3934
  g("div", {
3774
3935
  class: "dropdown-wrapper",
3775
- onMouseenter: T[14] || (T[14] = (k) => i.value = !0),
3776
- onMouseleave: T[15] || (T[15] = (k) => i.value = !1)
3936
+ onMouseenter: E[14] || (E[14] = (H) => i.value = !0),
3937
+ onMouseleave: E[15] || (E[15] = (H) => i.value = !1)
3777
3938
  }, [
3778
- T[22] || (T[22] = g("button", { class: "menu-btn" }, "帮助", -1)),
3779
- H(g("div", wo, [
3939
+ E[22] || (E[22] = g("button", { class: "menu-btn" }, "帮助", -1)),
3940
+ D(g("div", Lo, [
3780
3941
  g("div", {
3781
3942
  class: "menu-item",
3782
3943
  onClick: v
@@ -3786,11 +3947,11 @@ const $i = {
3786
3947
  onClick: I
3787
3948
  }, "关于")
3788
3949
  ], 512), [
3789
- [pe, i.value]
3950
+ [he, i.value]
3790
3951
  ])
3791
3952
  ], 32)
3792
3953
  ]),
3793
- T[23] || (T[23] = g("div", { class: "right-section" }, [
3954
+ E[23] || (E[23] = g("div", { class: "right-section" }, [
3794
3955
  g("span", { class: "app-title" }, "3D 模型编辑器")
3795
3956
  ], -1)),
3796
3957
  g("input", {
@@ -3799,14 +3960,14 @@ const $i = {
3799
3960
  ref: u,
3800
3961
  accept: ".obj,.gltf,.glb",
3801
3962
  style: { display: "none" },
3802
- onChange: d
3963
+ onChange: p
3803
3964
  }, null, 544)
3804
3965
  ]));
3805
3966
  }
3806
- }), xo = /* @__PURE__ */ Ue(To, [["__scopeId", "data-v-6bb4762f"]]), Eo = { class: "bottom-bar" }, Mo = /* @__PURE__ */ Fe({
3967
+ }), Oo = /* @__PURE__ */ Xe(Io, [["__scopeId", "data-v-6bb4762f"]]), Co = { class: "bottom-bar" }, Do = /* @__PURE__ */ Ge({
3807
3968
  __name: "BottomBar",
3808
3969
  setup(r) {
3809
- return (e, t) => (Y(), q("div", Eo, [...t[0] || (t[0] = [
3970
+ return (e, t) => (N(), U("div", Co, [...t[0] || (t[0] = [
3810
3971
  g("div", { class: "status-left" }, [
3811
3972
  g("span", null, "就绪")
3812
3973
  ], -1),
@@ -3815,93 +3976,102 @@ const $i = {
3815
3976
  ], -1)
3816
3977
  ])]));
3817
3978
  }
3818
- }), So = /* @__PURE__ */ Ue(Mo, [["__scopeId", "data-v-3427bb27"]]), vo = { class: "app-layout" }, Ro = { class: "editor-container" }, Ao = /* @__PURE__ */ Fe({
3979
+ }), No = /* @__PURE__ */ Xe(Do, [["__scopeId", "data-v-3427bb27"]]), ko = { class: "app-layout" }, jo = /* @__PURE__ */ Ge({
3819
3980
  __name: "DrawingBoard",
3981
+ props: {
3982
+ mode: { default: "edit" }
3983
+ },
3820
3984
  setup(r) {
3821
- const e = K(null), t = Rn({
3985
+ const e = r, t = G(null), s = sn({
3822
3986
  position: { x: 0, y: 0, z: 0 },
3823
3987
  rotation: { x: 0, y: 0, z: 0 },
3824
3988
  scale: { x: 1, y: 1, z: 1 }
3825
- }), s = (f) => {
3826
- t.position.x = Number(f.position.x.toFixed(3)), t.position.y = Number(f.position.y.toFixed(3)), t.position.z = Number(f.position.z.toFixed(3)), t.rotation.x = Number(f.rotation.x.toFixed(3)), t.rotation.y = Number(f.rotation.y.toFixed(3)), t.rotation.z = Number(f.rotation.z.toFixed(3)), t.scale.x = Number(f.scale.x.toFixed(3)), t.scale.y = Number(f.scale.y.toFixed(3)), t.scale.z = Number(f.scale.z.toFixed(3));
3827
- }, n = (f) => {
3989
+ }), n = (f) => {
3990
+ s.position.x = Number(f.position.x.toFixed(3)), s.position.y = Number(f.position.y.toFixed(3)), s.position.z = Number(f.position.z.toFixed(3)), s.rotation.x = Number(f.rotation.x.toFixed(3)), s.rotation.y = Number(f.rotation.y.toFixed(3)), s.rotation.z = Number(f.rotation.z.toFixed(3)), s.scale.x = Number(f.scale.x.toFixed(3)), s.scale.y = Number(f.scale.y.toFixed(3)), s.scale.z = Number(f.scale.z.toFixed(3));
3991
+ }, i = (f) => {
3828
3992
  f.position.set(
3829
- t.position.x,
3830
- t.position.y,
3831
- t.position.z
3993
+ s.position.x,
3994
+ s.position.y,
3995
+ s.position.z
3832
3996
  ), f.rotation.set(
3833
- t.rotation.x,
3834
- t.rotation.y,
3835
- t.rotation.z
3836
- ), f.scale.set(t.scale.x, t.scale.y, t.scale.z);
3997
+ s.rotation.x,
3998
+ s.rotation.y,
3999
+ s.rotation.z
4000
+ ), f.scale.set(s.scale.x, s.scale.y, s.scale.z);
3837
4001
  };
3838
4002
  qs((f) => {
3839
- e.value = f, f && s(f);
4003
+ t.value = f, f && n(f);
3840
4004
  }), Ws((f) => {
3841
- s(f);
4005
+ n(f);
3842
4006
  });
3843
- const i = () => {
3844
- e.value && n(e.value);
3845
- }, o = (f) => Yi(f), a = async (f) => {
4007
+ const o = () => {
4008
+ t.value && i(t.value);
4009
+ }, a = (f) => Yi(f), l = async (f) => {
3846
4010
  try {
3847
4011
  await Xi(f);
3848
- } catch (m) {
3849
- console.error("导入失败:", m), alert("导入失败:" + m.message);
4012
+ } catch (y) {
4013
+ console.error("导入失败:", y), alert("导入失败:" + y.message);
3850
4014
  }
3851
- }, l = An([]);
4015
+ }, h = Rn([]);
3852
4016
  $s((f) => {
3853
- l.value = f;
4017
+ h.value = f;
3854
4018
  });
3855
- const h = () => {
4019
+ const u = () => {
3856
4020
  const f = Js();
3857
- f && (l.value = f);
3858
- }, u = (f) => Et(f), c = (f) => Ks(f.uuid), d = K(null);
3859
- return Pn(() => {
3860
- d.value && Ns(d.value), h();
3861
- }), (f, m) => (Y(), q("div", vo, [
3862
- it(xo, {
3863
- onAddModel: o,
3864
- onImportModel: a
3865
- }),
3866
- g("div", Ro, [
4021
+ f && (h.value = f);
4022
+ }, c = (f) => vt(f), p = (f) => Ks(f.uuid), m = G(null);
4023
+ return An(() => {
4024
+ m.value && Ns(m.value, e.mode), u();
4025
+ }), (f, y) => (N(), U("div", ko, [
4026
+ r.mode === "edit" ? (N(), ot(Oo, {
4027
+ key: 0,
4028
+ onAddModel: a,
4029
+ onImportModel: l
4030
+ })) : de("", !0),
4031
+ g("div", {
4032
+ class: Fe(`editor-container editor-container-mode-${r.mode}`)
4033
+ }, [
3867
4034
  g("div", {
3868
- class: "canvas",
4035
+ class: Fe(`canvas canvas-mode-${r.mode}`),
3869
4036
  ref_key: "containerRef",
3870
- ref: d
3871
- }, null, 512),
3872
- it(ho, {
3873
- transform: t,
3874
- "tree-data": l.value,
3875
- "selected-object": e.value,
3876
- onPropertyChange: i,
3877
- onTreeSelect: u,
3878
- onTreeDelete: c
3879
- }, null, 8, ["transform", "tree-data", "selected-object"])
3880
- ]),
3881
- it(So)
4037
+ ref: m
4038
+ }, null, 2),
4039
+ r.mode === "edit" ? (N(), ot(To, {
4040
+ key: 0,
4041
+ transform: s,
4042
+ "tree-data": h.value,
4043
+ "selected-object": t.value,
4044
+ onPropertyChange: o,
4045
+ onTreeSelect: c,
4046
+ onTreeDelete: p
4047
+ }, null, 8, ["transform", "tree-data", "selected-object"])) : de("", !0)
4048
+ ], 2),
4049
+ Pn(No)
3882
4050
  ]));
3883
4051
  }
3884
- }), No = /* @__PURE__ */ Ue(Ao, [["__scopeId", "data-v-a7595f5b"]]);
4052
+ }), Ko = /* @__PURE__ */ Xe(jo, [["__scopeId", "data-v-290e9b49"]]);
3885
4053
  export {
3886
- So as BottomBar,
3887
- No as DrawingBoard,
3888
- ho as PropertyPanel,
3889
- xo as TopBar,
4054
+ No as BottomBar,
4055
+ Ko as DrawingBoard,
4056
+ To as PropertyPanel,
4057
+ Oo as TopBar,
3890
4058
  qi as TreeItem,
3891
4059
  zi as addBox,
3892
- nt as addModel,
4060
+ rt as addModel,
3893
4061
  Yi as addModelByType,
3894
4062
  Gi as addSphere,
3895
- Co as getCamera,
3896
- Do as getRenderer,
3897
- Oo as getScene,
4063
+ Yo as exportSceneToJSON,
4064
+ Go as getCamera,
4065
+ Xo as getRenderer,
4066
+ zo as getScene,
3898
4067
  Js as getSceneObjects,
3899
4068
  Xi as importModelFromFile,
4069
+ Bo as importSceneFromJSON,
3900
4070
  Ns as initEditor,
3901
4071
  $s as onSceneObjectsChangeCallback,
3902
4072
  Bs as removeModel,
3903
4073
  Ks as removeModelById,
3904
- Et as selectObject,
4074
+ vt as selectObject,
3905
4075
  qs as setSelectedObjectCallback,
3906
4076
  Ws as setTransformChangeCallback,
3907
4077
  Wi as useTreeExpand