@ridp/threejs 1.4.4 → 1.4.6

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,7 +1,7 @@
1
1
  import * as A from "three";
2
- import { Controls as mt, Vector3 as S, MOUSE as B, TOUCH as V, Quaternion as le, Spherical as Fe, Vector2 as k, Ray as gt, Plane as yt, MathUtils as st, TrianglesDrawMode as _t, TriangleFanDrawMode as Pe, TriangleStripDrawMode as nt, Loader as it, FileLoader as de, SRGBColorSpace as Y, LinearSRGBColorSpace as U, BufferGeometry as ot, BufferAttribute as oe, Color as q, ColorManagement as De, LoaderUtils as re, MeshPhysicalMaterial as j, SpotLight as Tt, PointLight as wt, DirectionalLight as bt, Matrix4 as se, InstancedMesh as Et, InstancedBufferAttribute as xt, Object3D as Ne, TextureLoader as At, ImageBitmapLoader as Rt, InterleavedBuffer as Mt, InterleavedBufferAttribute as St, LinearMipmapLinearFilter as rt, NearestMipmapLinearFilter as Lt, LinearMipmapNearestFilter as Pt, NearestMipmapNearestFilter as Dt, LinearFilter as Ce, NearestFilter as at, RepeatWrapping as Oe, MirroredRepeatWrapping as Ct, ClampToEdgeWrapping as Ot, PointsMaterial as kt, Material as Te, LineBasicMaterial as It, MeshStandardMaterial as ct, DoubleSide as Nt, MeshBasicMaterial as ie, PropertyBinding as vt, SkinnedMesh as Ht, Mesh as Ft, LineSegments as Ut, Line as jt, LineLoop as Gt, Points as Bt, Group as we, PerspectiveCamera as zt, OrthographicCamera as Kt, Skeleton as Wt, AnimationClip as Xt, Bone as Vt, InterpolateDiscrete as Yt, InterpolateLinear as lt, Texture as Ue, VectorKeyframeTrack as je, NumberKeyframeTrack as Ge, QuaternionKeyframeTrack as Be, FrontSide as qt, Interpolant as $t, Box3 as Zt, Sphere as Qt, CameraHelper as Jt, GridHelper as es, BoxHelper as ts, Raycaster as ss, AxesHelper as ns, ArrowHelper as is } from "three";
3
- import os from "dexie";
4
- const ze = { type: "change" }, ve = { type: "start" }, ht = { type: "end" }, ue = new gt(), Ke = new yt(), rs = Math.cos(70 * st.DEG2RAD), L = new S(), O = 2 * Math.PI, R = {
2
+ import { Controls as gt, Vector3 as S, MOUSE as B, TOUCH as V, Quaternion as le, Spherical as Ue, Vector2 as k, Ray as yt, Plane as _t, MathUtils as nt, TrianglesDrawMode as Tt, TriangleFanDrawMode as Pe, TriangleStripDrawMode as it, Loader as ot, FileLoader as de, SRGBColorSpace as Y, LinearSRGBColorSpace as U, BufferGeometry as rt, BufferAttribute as oe, Color as q, ColorManagement as De, LoaderUtils as re, MeshPhysicalMaterial as j, SpotLight as wt, PointLight as bt, DirectionalLight as Et, Matrix4 as se, InstancedMesh as xt, InstancedBufferAttribute as At, Object3D as ve, TextureLoader as Mt, ImageBitmapLoader as Rt, InterleavedBuffer as St, InterleavedBufferAttribute as Lt, LinearMipmapLinearFilter as at, NearestMipmapLinearFilter as Pt, LinearMipmapNearestFilter as Dt, NearestMipmapNearestFilter as Ct, LinearFilter as Ce, NearestFilter as ct, RepeatWrapping as Oe, MirroredRepeatWrapping as Ot, ClampToEdgeWrapping as kt, PointsMaterial as It, Material as Te, LineBasicMaterial as Nt, MeshStandardMaterial as lt, DoubleSide as vt, MeshBasicMaterial as ie, PropertyBinding as Ht, SkinnedMesh as Ft, Mesh as Ut, LineSegments as jt, Line as Gt, LineLoop as Bt, Points as zt, Group as we, PerspectiveCamera as Kt, OrthographicCamera as Wt, Skeleton as Xt, AnimationClip as Vt, Bone as Yt, InterpolateDiscrete as qt, InterpolateLinear as ht, Texture as je, VectorKeyframeTrack as Ge, NumberKeyframeTrack as Be, QuaternionKeyframeTrack as ze, FrontSide as $t, Interpolant as Zt, Box3 as Qt, Sphere as Jt, CameraHelper as es, GridHelper as ts, BoxHelper as ss, Raycaster as ns, AxesHelper as is, ArrowHelper as os } from "three";
3
+ import rs from "dexie";
4
+ const Ke = { type: "change" }, He = { type: "start" }, ut = { type: "end" }, ue = new yt(), We = new _t(), as = Math.cos(70 * nt.DEG2RAD), L = new S(), O = 2 * Math.PI, M = {
5
5
  NONE: -1,
6
6
  ROTATE: 0,
7
7
  DOLLY: 1,
@@ -11,7 +11,7 @@ const ze = { type: "change" }, ve = { type: "start" }, ht = { type: "end" }, ue
11
11
  TOUCH_DOLLY_PAN: 5,
12
12
  TOUCH_DOLLY_ROTATE: 6
13
13
  }, be = 1e-6;
14
- class ut extends mt {
14
+ class dt extends gt {
15
15
  /**
16
16
  * Constructs a new controls instance.
17
17
  *
@@ -19,7 +19,7 @@ class ut extends mt {
19
19
  * @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
20
20
  */
21
21
  constructor(e, t = null) {
22
- super(e, t), this.state = R.NONE, this.target = new S(), this.cursor = new S(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: B.ROTATE, MIDDLE: B.DOLLY, RIGHT: B.PAN }, this.touches = { ONE: V.ROTATE, TWO: V.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new S(), this._lastQuaternion = new le(), this._lastTargetPosition = new S(), this._quat = new le().setFromUnitVectors(e.up, new S(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Fe(), this._sphericalDelta = new Fe(), this._scale = 1, this._panOffset = new S(), this._rotateStart = new k(), this._rotateEnd = new k(), this._rotateDelta = new k(), this._panStart = new k(), this._panEnd = new k(), this._panDelta = new k(), this._dollyStart = new k(), this._dollyEnd = new k(), this._dollyDelta = new k(), this._dollyDirection = new S(), this._mouse = new k(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = cs.bind(this), this._onPointerDown = as.bind(this), this._onPointerUp = ls.bind(this), this._onContextMenu = gs.bind(this), this._onMouseWheel = ds.bind(this), this._onKeyDown = fs.bind(this), this._onTouchStart = ps.bind(this), this._onTouchMove = ms.bind(this), this._onMouseDown = hs.bind(this), this._onMouseMove = us.bind(this), this._interceptControlDown = ys.bind(this), this._interceptControlUp = _s.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
22
+ super(e, t), this.state = M.NONE, this.target = new S(), this.cursor = new S(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: B.ROTATE, MIDDLE: B.DOLLY, RIGHT: B.PAN }, this.touches = { ONE: V.ROTATE, TWO: V.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new S(), this._lastQuaternion = new le(), this._lastTargetPosition = new S(), this._quat = new le().setFromUnitVectors(e.up, new S(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Ue(), this._sphericalDelta = new Ue(), this._scale = 1, this._panOffset = new S(), this._rotateStart = new k(), this._rotateEnd = new k(), this._rotateDelta = new k(), this._panStart = new k(), this._panEnd = new k(), this._panDelta = new k(), this._dollyStart = new k(), this._dollyEnd = new k(), this._dollyDelta = new k(), this._dollyDirection = new S(), this._mouse = new k(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = ls.bind(this), this._onPointerDown = cs.bind(this), this._onPointerUp = hs.bind(this), this._onContextMenu = ys.bind(this), this._onMouseWheel = fs.bind(this), this._onKeyDown = ps.bind(this), this._onTouchStart = ms.bind(this), this._onTouchMove = gs.bind(this), this._onMouseDown = us.bind(this), this._onMouseMove = ds.bind(this), this._interceptControlDown = _s.bind(this), this._interceptControlUp = Ts.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
23
23
  }
24
24
  connect(e) {
25
25
  super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -80,11 +80,11 @@ class ut extends mt {
80
80
  * was called, or the initial state.
81
81
  */
82
82
  reset() {
83
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(ze), this.update(), this.state = R.NONE;
83
+ this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Ke), this.update(), this.state = M.NONE;
84
84
  }
85
85
  update(e = null) {
86
86
  const t = this.object.position;
87
- L.copy(t).sub(this.target), L.applyQuaternion(this._quat), this._spherical.setFromVector3(L), this.autoRotate && this.state === R.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);
87
+ L.copy(t).sub(this.target), L.applyQuaternion(this._quat), this._spherical.setFromVector3(L), this.autoRotate && this.state === M.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);
88
88
  let n = this.minAzimuthAngle, s = this.maxAzimuthAngle;
89
89
  isFinite(n) && isFinite(s) && (n < -Math.PI ? n += O : n > Math.PI && (n -= O), s < -Math.PI ? s += O : s > Math.PI && (s -= O), n <= s ? this._spherical.theta = Math.max(n, Math.min(s, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (n + s) / 2 ? Math.max(n, this._spherical.theta) : Math.min(s, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
90
90
  let i = !1;
@@ -110,12 +110,12 @@ class ut extends mt {
110
110
  l.unproject(this.object), this.object.position.sub(l).add(c), this.object.updateMatrixWorld(), o = L.length();
111
111
  } else
112
112
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
113
- o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (ue.origin.copy(this.object.position), ue.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(ue.direction)) < rs ? this.object.lookAt(this.target) : (Ke.setFromNormalAndCoplanarPoint(this.object.up, this.target), ue.intersectPlane(Ke, this.target))));
113
+ o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (ue.origin.copy(this.object.position), ue.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(ue.direction)) < as ? this.object.lookAt(this.target) : (We.setFromNormalAndCoplanarPoint(this.object.up, this.target), ue.intersectPlane(We, this.target))));
114
114
  } else if (this.object.isOrthographicCamera) {
115
115
  const o = this.object.zoom;
116
116
  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);
117
117
  }
118
- return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) > be || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > be || this._lastTargetPosition.distanceToSquared(this.target) > be ? (this.dispatchEvent(ze), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
118
+ return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) > be || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > be || this._lastTargetPosition.distanceToSquared(this.target) > be ? (this.dispatchEvent(Ke), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
119
119
  }
120
120
  _getAutoRotationAngle(e) {
121
121
  return e !== null ? O / 60 * this.autoRotateSpeed * e : O / 60 / 60 * this.autoRotateSpeed;
@@ -307,16 +307,16 @@ class ut extends mt {
307
307
  return e.ctrlKey && !this._controlActive && (n.deltaY *= 10), n;
308
308
  }
309
309
  }
310
- function as(r) {
310
+ function cs(r) {
311
311
  this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(r.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(r) && (this._addPointer(r), r.pointerType === "touch" ? this._onTouchStart(r) : this._onMouseDown(r)));
312
312
  }
313
- function cs(r) {
313
+ function ls(r) {
314
314
  this.enabled !== !1 && (r.pointerType === "touch" ? this._onTouchMove(r) : this._onMouseMove(r));
315
315
  }
316
- function ls(r) {
316
+ function hs(r) {
317
317
  switch (this._removePointer(r), this._pointers.length) {
318
318
  case 0:
319
- this.domElement.releasePointerCapture(r.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(ht), this.state = R.NONE;
319
+ this.domElement.releasePointerCapture(r.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(ut), this.state = M.NONE;
320
320
  break;
321
321
  case 1:
322
322
  const e = this._pointers[0], t = this._pointerPositions[e];
@@ -324,7 +324,7 @@ function ls(r) {
324
324
  break;
325
325
  }
326
326
  }
327
- function hs(r) {
327
+ function us(r) {
328
328
  let e;
329
329
  switch (r.button) {
330
330
  case 0:
@@ -342,128 +342,128 @@ function hs(r) {
342
342
  switch (e) {
343
343
  case B.DOLLY:
344
344
  if (this.enableZoom === !1) return;
345
- this._handleMouseDownDolly(r), this.state = R.DOLLY;
345
+ this._handleMouseDownDolly(r), this.state = M.DOLLY;
346
346
  break;
347
347
  case B.ROTATE:
348
348
  if (r.ctrlKey || r.metaKey || r.shiftKey) {
349
349
  if (this.enablePan === !1) return;
350
- this._handleMouseDownPan(r), this.state = R.PAN;
350
+ this._handleMouseDownPan(r), this.state = M.PAN;
351
351
  } else {
352
352
  if (this.enableRotate === !1) return;
353
- this._handleMouseDownRotate(r), this.state = R.ROTATE;
353
+ this._handleMouseDownRotate(r), this.state = M.ROTATE;
354
354
  }
355
355
  break;
356
356
  case B.PAN:
357
357
  if (r.ctrlKey || r.metaKey || r.shiftKey) {
358
358
  if (this.enableRotate === !1) return;
359
- this._handleMouseDownRotate(r), this.state = R.ROTATE;
359
+ this._handleMouseDownRotate(r), this.state = M.ROTATE;
360
360
  } else {
361
361
  if (this.enablePan === !1) return;
362
- this._handleMouseDownPan(r), this.state = R.PAN;
362
+ this._handleMouseDownPan(r), this.state = M.PAN;
363
363
  }
364
364
  break;
365
365
  default:
366
- this.state = R.NONE;
366
+ this.state = M.NONE;
367
367
  }
368
- this.state !== R.NONE && this.dispatchEvent(ve);
368
+ this.state !== M.NONE && this.dispatchEvent(He);
369
369
  }
370
- function us(r) {
370
+ function ds(r) {
371
371
  switch (this.state) {
372
- case R.ROTATE:
372
+ case M.ROTATE:
373
373
  if (this.enableRotate === !1) return;
374
374
  this._handleMouseMoveRotate(r);
375
375
  break;
376
- case R.DOLLY:
376
+ case M.DOLLY:
377
377
  if (this.enableZoom === !1) return;
378
378
  this._handleMouseMoveDolly(r);
379
379
  break;
380
- case R.PAN:
380
+ case M.PAN:
381
381
  if (this.enablePan === !1) return;
382
382
  this._handleMouseMovePan(r);
383
383
  break;
384
384
  }
385
385
  }
386
- function ds(r) {
387
- this.enabled === !1 || this.enableZoom === !1 || this.state !== R.NONE || (r.preventDefault(), this.dispatchEvent(ve), this._handleMouseWheel(this._customWheelEvent(r)), this.dispatchEvent(ht));
388
- }
389
386
  function fs(r) {
390
- this.enabled !== !1 && this._handleKeyDown(r);
387
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== M.NONE || (r.preventDefault(), this.dispatchEvent(He), this._handleMouseWheel(this._customWheelEvent(r)), this.dispatchEvent(ut));
391
388
  }
392
389
  function ps(r) {
390
+ this.enabled !== !1 && this._handleKeyDown(r);
391
+ }
392
+ function ms(r) {
393
393
  switch (this._trackPointer(r), this._pointers.length) {
394
394
  case 1:
395
395
  switch (this.touches.ONE) {
396
396
  case V.ROTATE:
397
397
  if (this.enableRotate === !1) return;
398
- this._handleTouchStartRotate(r), this.state = R.TOUCH_ROTATE;
398
+ this._handleTouchStartRotate(r), this.state = M.TOUCH_ROTATE;
399
399
  break;
400
400
  case V.PAN:
401
401
  if (this.enablePan === !1) return;
402
- this._handleTouchStartPan(r), this.state = R.TOUCH_PAN;
402
+ this._handleTouchStartPan(r), this.state = M.TOUCH_PAN;
403
403
  break;
404
404
  default:
405
- this.state = R.NONE;
405
+ this.state = M.NONE;
406
406
  }
407
407
  break;
408
408
  case 2:
409
409
  switch (this.touches.TWO) {
410
410
  case V.DOLLY_PAN:
411
411
  if (this.enableZoom === !1 && this.enablePan === !1) return;
412
- this._handleTouchStartDollyPan(r), this.state = R.TOUCH_DOLLY_PAN;
412
+ this._handleTouchStartDollyPan(r), this.state = M.TOUCH_DOLLY_PAN;
413
413
  break;
414
414
  case V.DOLLY_ROTATE:
415
415
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
416
- this._handleTouchStartDollyRotate(r), this.state = R.TOUCH_DOLLY_ROTATE;
416
+ this._handleTouchStartDollyRotate(r), this.state = M.TOUCH_DOLLY_ROTATE;
417
417
  break;
418
418
  default:
419
- this.state = R.NONE;
419
+ this.state = M.NONE;
420
420
  }
421
421
  break;
422
422
  default:
423
- this.state = R.NONE;
423
+ this.state = M.NONE;
424
424
  }
425
- this.state !== R.NONE && this.dispatchEvent(ve);
425
+ this.state !== M.NONE && this.dispatchEvent(He);
426
426
  }
427
- function ms(r) {
427
+ function gs(r) {
428
428
  switch (this._trackPointer(r), this.state) {
429
- case R.TOUCH_ROTATE:
429
+ case M.TOUCH_ROTATE:
430
430
  if (this.enableRotate === !1) return;
431
431
  this._handleTouchMoveRotate(r), this.update();
432
432
  break;
433
- case R.TOUCH_PAN:
433
+ case M.TOUCH_PAN:
434
434
  if (this.enablePan === !1) return;
435
435
  this._handleTouchMovePan(r), this.update();
436
436
  break;
437
- case R.TOUCH_DOLLY_PAN:
437
+ case M.TOUCH_DOLLY_PAN:
438
438
  if (this.enableZoom === !1 && this.enablePan === !1) return;
439
439
  this._handleTouchMoveDollyPan(r), this.update();
440
440
  break;
441
- case R.TOUCH_DOLLY_ROTATE:
441
+ case M.TOUCH_DOLLY_ROTATE:
442
442
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
443
443
  this._handleTouchMoveDollyRotate(r), this.update();
444
444
  break;
445
445
  default:
446
- this.state = R.NONE;
446
+ this.state = M.NONE;
447
447
  }
448
448
  }
449
- function gs(r) {
449
+ function ys(r) {
450
450
  this.enabled !== !1 && r.preventDefault();
451
451
  }
452
- function ys(r) {
452
+ function _s(r) {
453
453
  r.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
454
454
  }
455
- function _s(r) {
455
+ function Ts(r) {
456
456
  r.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
457
457
  }
458
- class Ts extends ut {
458
+ class ws extends dt {
459
459
  constructor(e, t) {
460
460
  super(e, t), this.screenSpacePanning = !1, this.mouseButtons = { LEFT: B.PAN, MIDDLE: B.DOLLY, RIGHT: B.ROTATE }, this.touches = { ONE: V.PAN, TWO: V.DOLLY_ROTATE };
461
461
  }
462
462
  }
463
- function We(r, e) {
464
- if (e === _t)
463
+ function Xe(r, e) {
464
+ if (e === Tt)
465
465
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), r;
466
- if (e === Pe || e === nt) {
466
+ if (e === Pe || e === it) {
467
467
  let t = r.getIndex();
468
468
  if (t === null) {
469
469
  const o = [], c = r.getAttribute("position");
@@ -488,7 +488,7 @@ function We(r, e) {
488
488
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), r;
489
489
  }
490
490
  const Ee = /* @__PURE__ */ new WeakMap();
491
- class ws extends it {
491
+ class bs extends ot {
492
492
  /**
493
493
  * Constructs a new Draco loader.
494
494
  *
@@ -595,7 +595,7 @@ class ws extends it {
595
595
  }), c;
596
596
  }
597
597
  _createGeometry(e) {
598
- const t = new ot();
598
+ const t = new rt();
599
599
  e.index && t.setIndex(new oe(e.index.array, 1));
600
600
  for (let n = 0; n < e.attributes.length; n++) {
601
601
  const s = e.attributes[n], i = s.name, o = s.array, c = s.itemSize, a = new oe(o, c);
@@ -624,7 +624,7 @@ class ws extends it {
624
624
  return e ? t.push(this._loadLibrary("draco_decoder.js", "text")) : (t.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), t.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(t).then((n) => {
625
625
  const s = n[0];
626
626
  e || (this.decoderConfig.wasmBinary = n[1]);
627
- const i = bs.toString(), o = [
627
+ const i = Es.toString(), o = [
628
628
  "/* draco decoder */",
629
629
  s,
630
630
  "",
@@ -672,7 +672,7 @@ class ws extends it {
672
672
  return this.workerPool.length = 0, this.workerSourceURL !== "" && URL.revokeObjectURL(this.workerSourceURL), this;
673
673
  }
674
674
  }
675
- function bs() {
675
+ function Es() {
676
676
  let r, e;
677
677
  onmessage = function(o) {
678
678
  const c = o.data;
@@ -762,7 +762,7 @@ function bs() {
762
762
  }
763
763
  }
764
764
  }
765
- class Es extends it {
765
+ class xs extends ot {
766
766
  /**
767
767
  * Constructs a new glTF loader.
768
768
  *
@@ -770,39 +770,39 @@ class Es extends it {
770
770
  */
771
771
  constructor(e) {
772
772
  super(e), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(t) {
773
- return new Ss(t);
774
- }), this.register(function(t) {
775
773
  return new Ls(t);
776
774
  }), this.register(function(t) {
777
- return new Hs(t);
775
+ return new Ps(t);
778
776
  }), this.register(function(t) {
779
777
  return new Fs(t);
780
778
  }), this.register(function(t) {
781
779
  return new Us(t);
782
780
  }), this.register(function(t) {
783
- return new Ds(t);
781
+ return new js(t);
784
782
  }), this.register(function(t) {
785
783
  return new Cs(t);
786
784
  }), this.register(function(t) {
787
785
  return new Os(t);
788
786
  }), this.register(function(t) {
789
787
  return new ks(t);
790
- }), this.register(function(t) {
791
- return new Ms(t);
792
788
  }), this.register(function(t) {
793
789
  return new Is(t);
794
790
  }), this.register(function(t) {
795
- return new Ps(t);
796
- }), this.register(function(t) {
797
- return new vs(t);
791
+ return new Ss(t);
798
792
  }), this.register(function(t) {
799
793
  return new Ns(t);
800
794
  }), this.register(function(t) {
801
- return new As(t);
795
+ return new Ds(t);
802
796
  }), this.register(function(t) {
803
- return new js(t);
797
+ return new Hs(t);
798
+ }), this.register(function(t) {
799
+ return new vs(t);
800
+ }), this.register(function(t) {
801
+ return new Ms(t);
804
802
  }), this.register(function(t) {
805
803
  return new Gs(t);
804
+ }), this.register(function(t) {
805
+ return new Bs(t);
806
806
  });
807
807
  }
808
808
  /**
@@ -902,9 +902,9 @@ class Es extends it {
902
902
  if (typeof e == "string")
903
903
  i = JSON.parse(e);
904
904
  else if (e instanceof ArrayBuffer)
905
- if (a.decode(new Uint8Array(e, 0, 4)) === dt) {
905
+ if (a.decode(new Uint8Array(e, 0, 4)) === ft) {
906
906
  try {
907
- o[b.KHR_BINARY_GLTF] = new Bs(e);
907
+ o[b.KHR_BINARY_GLTF] = new zs(e);
908
908
  } catch (h) {
909
909
  s && s(h);
910
910
  return;
@@ -918,7 +918,7 @@ class Es extends it {
918
918
  s && s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
919
919
  return;
920
920
  }
921
- const l = new tn(i, {
921
+ const l = new sn(i, {
922
922
  path: t || this.resourcePath || "",
923
923
  crossOrigin: this.crossOrigin,
924
924
  requestHeader: this.requestHeader,
@@ -939,13 +939,13 @@ class Es extends it {
939
939
  o[h] = new Rs();
940
940
  break;
941
941
  case b.KHR_DRACO_MESH_COMPRESSION:
942
- o[h] = new zs(i, this.dracoLoader);
942
+ o[h] = new Ks(i, this.dracoLoader);
943
943
  break;
944
944
  case b.KHR_TEXTURE_TRANSFORM:
945
- o[h] = new Ks();
945
+ o[h] = new Ws();
946
946
  break;
947
947
  case b.KHR_MESH_QUANTIZATION:
948
- o[h] = new Ws();
948
+ o[h] = new Xs();
949
949
  break;
950
950
  default:
951
951
  p.indexOf(h) >= 0 && c[h] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + h + '".');
@@ -968,7 +968,7 @@ class Es extends it {
968
968
  });
969
969
  }
970
970
  }
971
- function xs() {
971
+ function As() {
972
972
  let r = {};
973
973
  return {
974
974
  get: function(e) {
@@ -1009,7 +1009,7 @@ const b = {
1009
1009
  EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
1010
1010
  EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
1011
1011
  };
1012
- class As {
1012
+ class Ms {
1013
1013
  constructor(e) {
1014
1014
  this.parser = e, this.name = b.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
1015
1015
  }
@@ -1031,13 +1031,13 @@ class As {
1031
1031
  const h = a.range !== void 0 ? a.range : 0;
1032
1032
  switch (a.type) {
1033
1033
  case "directional":
1034
- l = new bt(u), l.target.position.set(0, 0, -1), l.add(l.target);
1034
+ l = new Et(u), l.target.position.set(0, 0, -1), l.add(l.target);
1035
1035
  break;
1036
1036
  case "point":
1037
- l = new wt(u), l.distance = h;
1037
+ l = new bt(u), l.distance = h;
1038
1038
  break;
1039
1039
  case "spot":
1040
- l = new Tt(u), l.distance = h, a.spot = a.spot || {}, a.spot.innerConeAngle = a.spot.innerConeAngle !== void 0 ? a.spot.innerConeAngle : 0, a.spot.outerConeAngle = a.spot.outerConeAngle !== void 0 ? a.spot.outerConeAngle : Math.PI / 4, l.angle = a.spot.outerConeAngle, l.penumbra = 1 - a.spot.innerConeAngle / a.spot.outerConeAngle, l.target.position.set(0, 0, -1), l.add(l.target);
1040
+ l = new wt(u), l.distance = h, a.spot = a.spot || {}, a.spot.innerConeAngle = a.spot.innerConeAngle !== void 0 ? a.spot.innerConeAngle : 0, a.spot.outerConeAngle = a.spot.outerConeAngle !== void 0 ? a.spot.outerConeAngle : Math.PI / 4, l.angle = a.spot.outerConeAngle, l.penumbra = 1 - a.spot.innerConeAngle / a.spot.outerConeAngle, l.target.position.set(0, 0, -1), l.add(l.target);
1041
1041
  break;
1042
1042
  default:
1043
1043
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + a.type);
@@ -1076,7 +1076,7 @@ class Rs {
1076
1076
  return Promise.all(s);
1077
1077
  }
1078
1078
  }
1079
- class Ms {
1079
+ class Ss {
1080
1080
  constructor(e) {
1081
1081
  this.parser = e, this.name = b.KHR_MATERIALS_EMISSIVE_STRENGTH;
1082
1082
  }
@@ -1088,7 +1088,7 @@ class Ms {
1088
1088
  return i !== void 0 && (t.emissiveIntensity = i), Promise.resolve();
1089
1089
  }
1090
1090
  }
1091
- class Ss {
1091
+ class Ls {
1092
1092
  constructor(e) {
1093
1093
  this.parser = e, this.name = b.KHR_MATERIALS_CLEARCOAT;
1094
1094
  }
@@ -1108,7 +1108,7 @@ class Ss {
1108
1108
  return Promise.all(i);
1109
1109
  }
1110
1110
  }
1111
- class Ls {
1111
+ class Ps {
1112
1112
  constructor(e) {
1113
1113
  this.parser = e, this.name = b.KHR_MATERIALS_DISPERSION;
1114
1114
  }
@@ -1124,7 +1124,7 @@ class Ls {
1124
1124
  return t.dispersion = i.dispersion !== void 0 ? i.dispersion : 0, Promise.resolve();
1125
1125
  }
1126
1126
  }
1127
- class Ps {
1127
+ class Ds {
1128
1128
  constructor(e) {
1129
1129
  this.parser = e, this.name = b.KHR_MATERIALS_IRIDESCENCE;
1130
1130
  }
@@ -1140,7 +1140,7 @@ class Ps {
1140
1140
  return o.iridescenceFactor !== void 0 && (t.iridescence = o.iridescenceFactor), o.iridescenceTexture !== void 0 && i.push(n.assignTexture(t, "iridescenceMap", o.iridescenceTexture)), o.iridescenceIor !== void 0 && (t.iridescenceIOR = o.iridescenceIor), t.iridescenceThicknessRange === void 0 && (t.iridescenceThicknessRange = [100, 400]), o.iridescenceThicknessMinimum !== void 0 && (t.iridescenceThicknessRange[0] = o.iridescenceThicknessMinimum), o.iridescenceThicknessMaximum !== void 0 && (t.iridescenceThicknessRange[1] = o.iridescenceThicknessMaximum), o.iridescenceThicknessTexture !== void 0 && i.push(n.assignTexture(t, "iridescenceThicknessMap", o.iridescenceThicknessTexture)), Promise.all(i);
1141
1141
  }
1142
1142
  }
1143
- class Ds {
1143
+ class Cs {
1144
1144
  constructor(e) {
1145
1145
  this.parser = e, this.name = b.KHR_MATERIALS_SHEEN;
1146
1146
  }
@@ -1162,7 +1162,7 @@ class Ds {
1162
1162
  return o.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = o.sheenRoughnessFactor), o.sheenColorTexture !== void 0 && i.push(n.assignTexture(t, "sheenColorMap", o.sheenColorTexture, Y)), o.sheenRoughnessTexture !== void 0 && i.push(n.assignTexture(t, "sheenRoughnessMap", o.sheenRoughnessTexture)), Promise.all(i);
1163
1163
  }
1164
1164
  }
1165
- class Cs {
1165
+ class Os {
1166
1166
  constructor(e) {
1167
1167
  this.parser = e, this.name = b.KHR_MATERIALS_TRANSMISSION;
1168
1168
  }
@@ -1178,7 +1178,7 @@ class Cs {
1178
1178
  return o.transmissionFactor !== void 0 && (t.transmission = o.transmissionFactor), o.transmissionTexture !== void 0 && i.push(n.assignTexture(t, "transmissionMap", o.transmissionTexture)), Promise.all(i);
1179
1179
  }
1180
1180
  }
1181
- class Os {
1181
+ class ks {
1182
1182
  constructor(e) {
1183
1183
  this.parser = e, this.name = b.KHR_MATERIALS_VOLUME;
1184
1184
  }
@@ -1196,7 +1196,7 @@ class Os {
1196
1196
  return t.attenuationColor = new q().setRGB(c[0], c[1], c[2], U), Promise.all(i);
1197
1197
  }
1198
1198
  }
1199
- class ks {
1199
+ class Is {
1200
1200
  constructor(e) {
1201
1201
  this.parser = e, this.name = b.KHR_MATERIALS_IOR;
1202
1202
  }
@@ -1212,7 +1212,7 @@ class ks {
1212
1212
  return t.ior = i.ior !== void 0 ? i.ior : 1.5, Promise.resolve();
1213
1213
  }
1214
1214
  }
1215
- class Is {
1215
+ class Ns {
1216
1216
  constructor(e) {
1217
1217
  this.parser = e, this.name = b.KHR_MATERIALS_SPECULAR;
1218
1218
  }
@@ -1230,7 +1230,7 @@ class Is {
1230
1230
  return t.specularColor = new q().setRGB(c[0], c[1], c[2], U), o.specularColorTexture !== void 0 && i.push(n.assignTexture(t, "specularColorMap", o.specularColorTexture, Y)), Promise.all(i);
1231
1231
  }
1232
1232
  }
1233
- class Ns {
1233
+ class vs {
1234
1234
  constructor(e) {
1235
1235
  this.parser = e, this.name = b.EXT_MATERIALS_BUMP;
1236
1236
  }
@@ -1246,7 +1246,7 @@ class Ns {
1246
1246
  return t.bumpScale = o.bumpFactor !== void 0 ? o.bumpFactor : 1, o.bumpTexture !== void 0 && i.push(n.assignTexture(t, "bumpMap", o.bumpTexture)), Promise.all(i);
1247
1247
  }
1248
1248
  }
1249
- class vs {
1249
+ class Hs {
1250
1250
  constructor(e) {
1251
1251
  this.parser = e, this.name = b.KHR_MATERIALS_ANISOTROPY;
1252
1252
  }
@@ -1262,7 +1262,7 @@ class vs {
1262
1262
  return o.anisotropyStrength !== void 0 && (t.anisotropy = o.anisotropyStrength), o.anisotropyRotation !== void 0 && (t.anisotropyRotation = o.anisotropyRotation), o.anisotropyTexture !== void 0 && i.push(n.assignTexture(t, "anisotropyMap", o.anisotropyTexture)), Promise.all(i);
1263
1263
  }
1264
1264
  }
1265
- class Hs {
1265
+ class Fs {
1266
1266
  constructor(e) {
1267
1267
  this.parser = e, this.name = b.KHR_TEXTURE_BASISU;
1268
1268
  }
@@ -1279,7 +1279,7 @@ class Hs {
1279
1279
  return t.loadTextureImage(e, i.source, o);
1280
1280
  }
1281
1281
  }
1282
- class Fs {
1282
+ class Us {
1283
1283
  constructor(e) {
1284
1284
  this.parser = e, this.name = b.EXT_TEXTURE_WEBP;
1285
1285
  }
@@ -1296,7 +1296,7 @@ class Fs {
1296
1296
  return n.loadTextureImage(e, o.source, a);
1297
1297
  }
1298
1298
  }
1299
- class Us {
1299
+ class js {
1300
1300
  constructor(e) {
1301
1301
  this.parser = e, this.name = b.EXT_TEXTURE_AVIF;
1302
1302
  }
@@ -1313,7 +1313,7 @@ class Us {
1313
1313
  return n.loadTextureImage(e, o.source, a);
1314
1314
  }
1315
1315
  }
1316
- class js {
1316
+ class Gs {
1317
1317
  constructor(e) {
1318
1318
  this.name = b.EXT_MESHOPT_COMPRESSION, this.parser = e;
1319
1319
  }
@@ -1339,7 +1339,7 @@ class js {
1339
1339
  return null;
1340
1340
  }
1341
1341
  }
1342
- class Gs {
1342
+ class Bs {
1343
1343
  constructor(e) {
1344
1344
  this.name = b.EXT_MESH_GPU_INSTANCING, this.parser = e;
1345
1345
  }
@@ -1357,22 +1357,22 @@ class Gs {
1357
1357
  return c.length < 1 ? null : (c.push(this.parser.createNodeMesh(e)), Promise.all(c).then((l) => {
1358
1358
  const u = l.pop(), h = u.isGroup ? u.children : [u], p = l[0].count, m = [];
1359
1359
  for (const _ of h) {
1360
- const w = new se(), d = new S(), f = new le(), g = new S(1, 1, 1), T = new Et(_.geometry, _.material, p);
1360
+ const w = new se(), d = new S(), f = new le(), g = new S(1, 1, 1), T = new xt(_.geometry, _.material, p);
1361
1361
  for (let y = 0; y < p; y++)
1362
1362
  a.TRANSLATION && d.fromBufferAttribute(a.TRANSLATION, y), a.ROTATION && f.fromBufferAttribute(a.ROTATION, y), a.SCALE && g.fromBufferAttribute(a.SCALE, y), T.setMatrixAt(y, w.compose(d, f, g));
1363
1363
  for (const y in a)
1364
1364
  if (y === "_COLOR_0") {
1365
1365
  const E = a[y];
1366
- T.instanceColor = new xt(E.array, E.itemSize, E.normalized);
1366
+ T.instanceColor = new At(E.array, E.itemSize, E.normalized);
1367
1367
  } else y !== "TRANSLATION" && y !== "ROTATION" && y !== "SCALE" && _.geometry.setAttribute(y, a[y]);
1368
- Ne.prototype.copy.call(T, _), this.parser.assignFinalMaterial(T), m.push(T);
1368
+ ve.prototype.copy.call(T, _), this.parser.assignFinalMaterial(T), m.push(T);
1369
1369
  }
1370
1370
  return u.isGroup ? (u.clear(), u.add(...m), u) : m[0];
1371
1371
  }));
1372
1372
  }
1373
1373
  }
1374
- const dt = "glTF", ne = 12, Xe = { JSON: 1313821514, BIN: 5130562 };
1375
- class Bs {
1374
+ const ft = "glTF", ne = 12, Ve = { JSON: 1313821514, BIN: 5130562 };
1375
+ class zs {
1376
1376
  constructor(e) {
1377
1377
  this.name = b.KHR_BINARY_GLTF, this.content = null, this.body = null;
1378
1378
  const t = new DataView(e, 0, ne), n = new TextDecoder();
@@ -1380,7 +1380,7 @@ class Bs {
1380
1380
  magic: n.decode(new Uint8Array(e.slice(0, 4))),
1381
1381
  version: t.getUint32(4, !0),
1382
1382
  length: t.getUint32(8, !0)
1383
- }, this.header.magic !== dt)
1383
+ }, this.header.magic !== ft)
1384
1384
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
1385
1385
  if (this.header.version < 2)
1386
1386
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
@@ -1390,10 +1390,10 @@ class Bs {
1390
1390
  const c = i.getUint32(o, !0);
1391
1391
  o += 4;
1392
1392
  const a = i.getUint32(o, !0);
1393
- if (o += 4, a === Xe.JSON) {
1393
+ if (o += 4, a === Ve.JSON) {
1394
1394
  const l = new Uint8Array(e, ne + o, c);
1395
1395
  this.content = n.decode(l);
1396
- } else if (a === Xe.BIN) {
1396
+ } else if (a === Ve.BIN) {
1397
1397
  const l = ne + o;
1398
1398
  this.body = e.slice(l, l + c);
1399
1399
  }
@@ -1403,7 +1403,7 @@ class Bs {
1403
1403
  throw new Error("THREE.GLTFLoader: JSON content not found.");
1404
1404
  }
1405
1405
  }
1406
- class zs {
1406
+ class Ks {
1407
1407
  constructor(e, t) {
1408
1408
  if (!t)
1409
1409
  throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
@@ -1435,7 +1435,7 @@ class zs {
1435
1435
  });
1436
1436
  }
1437
1437
  }
1438
- class Ks {
1438
+ class Ws {
1439
1439
  constructor() {
1440
1440
  this.name = b.KHR_TEXTURE_TRANSFORM;
1441
1441
  }
@@ -1443,12 +1443,12 @@ class Ks {
1443
1443
  return (t.texCoord === void 0 || t.texCoord === e.channel) && t.offset === void 0 && t.rotation === void 0 && t.scale === void 0 || (e = e.clone(), t.texCoord !== void 0 && (e.channel = t.texCoord), t.offset !== void 0 && e.offset.fromArray(t.offset), t.rotation !== void 0 && (e.rotation = t.rotation), t.scale !== void 0 && e.repeat.fromArray(t.scale), e.needsUpdate = !0), e;
1444
1444
  }
1445
1445
  }
1446
- class Ws {
1446
+ class Xs {
1447
1447
  constructor() {
1448
1448
  this.name = b.KHR_MESH_QUANTIZATION;
1449
1449
  }
1450
1450
  }
1451
- class ft extends $t {
1451
+ class pt extends Zt {
1452
1452
  constructor(e, t, n, s) {
1453
1453
  super(e, t, n, s);
1454
1454
  }
@@ -1461,17 +1461,17 @@ class ft extends $t {
1461
1461
  interpolate_(e, t, n, s) {
1462
1462
  const i = this.resultBuffer, o = this.sampleValues, c = this.valueSize, a = c * 2, l = c * 3, u = s - t, h = (n - t) / u, p = h * h, m = p * h, _ = e * l, w = _ - l, d = -2 * m + 3 * p, f = m - p, g = 1 - d, T = f - p + h;
1463
1463
  for (let y = 0; y !== c; y++) {
1464
- const E = o[w + y + c], x = o[w + y + a] * u, M = o[_ + y + c], D = o[_ + y] * u;
1465
- i[y] = g * E + T * x + d * M + f * D;
1464
+ const E = o[w + y + c], x = o[w + y + a] * u, R = o[_ + y + c], D = o[_ + y] * u;
1465
+ i[y] = g * E + T * x + d * R + f * D;
1466
1466
  }
1467
1467
  return i;
1468
1468
  }
1469
1469
  }
1470
- const Xs = new le();
1471
- class Vs extends ft {
1470
+ const Vs = new le();
1471
+ class Ys extends pt {
1472
1472
  interpolate_(e, t, n, s) {
1473
1473
  const i = super.interpolate_(e, t, n, s);
1474
- return Xs.fromArray(i).normalize().toArray(i), i;
1474
+ return Vs.fromArray(i).normalize().toArray(i), i;
1475
1475
  }
1476
1476
  }
1477
1477
  const I = {
@@ -1489,16 +1489,16 @@ const I = {
1489
1489
  5123: Uint16Array,
1490
1490
  5125: Uint32Array,
1491
1491
  5126: Float32Array
1492
- }, Ve = {
1493
- 9728: at,
1494
- 9729: Ce,
1495
- 9984: Dt,
1496
- 9985: Pt,
1497
- 9986: Lt,
1498
- 9987: rt
1499
1492
  }, Ye = {
1500
- 33071: Ot,
1501
- 33648: Ct,
1493
+ 9728: ct,
1494
+ 9729: Ce,
1495
+ 9984: Ct,
1496
+ 9985: Dt,
1497
+ 9986: Pt,
1498
+ 9987: at
1499
+ }, qe = {
1500
+ 33071: kt,
1501
+ 33648: Ot,
1502
1502
  10497: Oe
1503
1503
  }, xe = {
1504
1504
  SCALAR: 1,
@@ -1524,26 +1524,26 @@ const I = {
1524
1524
  translation: "position",
1525
1525
  rotation: "quaternion",
1526
1526
  weights: "morphTargetInfluences"
1527
- }, Ys = {
1527
+ }, qs = {
1528
1528
  CUBICSPLINE: void 0,
1529
1529
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
1530
1530
  // keyframe track will be initialized with a default interpolation type, then modified.
1531
- LINEAR: lt,
1532
- STEP: Yt
1531
+ LINEAR: ht,
1532
+ STEP: qt
1533
1533
  }, Ae = {
1534
1534
  OPAQUE: "OPAQUE",
1535
1535
  MASK: "MASK",
1536
1536
  BLEND: "BLEND"
1537
1537
  };
1538
- function qs(r) {
1539
- return r.DefaultMaterial === void 0 && (r.DefaultMaterial = new ct({
1538
+ function $s(r) {
1539
+ return r.DefaultMaterial === void 0 && (r.DefaultMaterial = new lt({
1540
1540
  color: 16777215,
1541
1541
  emissive: 0,
1542
1542
  metalness: 1,
1543
1543
  roughness: 1,
1544
1544
  transparent: !1,
1545
1545
  depthTest: !0,
1546
- side: qt
1546
+ side: $t
1547
1547
  })), r.DefaultMaterial;
1548
1548
  }
1549
1549
  function Z(r, e, t) {
@@ -1553,7 +1553,7 @@ function Z(r, e, t) {
1553
1553
  function G(r, e) {
1554
1554
  e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(r.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
1555
1555
  }
1556
- function $s(r, e, t) {
1556
+ function Zs(r, e, t) {
1557
1557
  let n = !1, s = !1, i = !1;
1558
1558
  for (let l = 0, u = e.length; l < u; l++) {
1559
1559
  const h = e[l];
@@ -1585,7 +1585,7 @@ function $s(r, e, t) {
1585
1585
  return n && (r.morphAttributes.position = u), s && (r.morphAttributes.normal = h), i && (r.morphAttributes.color = p), r.morphTargetsRelative = !0, r;
1586
1586
  });
1587
1587
  }
1588
- function Zs(r, e) {
1588
+ function Qs(r, e) {
1589
1589
  if (r.updateMorphTargets(), e.weights !== void 0)
1590
1590
  for (let t = 0, n = e.weights.length; t < n; t++)
1591
1591
  r.morphTargetInfluences[t] = e.weights[t];
@@ -1599,15 +1599,15 @@ function Zs(r, e) {
1599
1599
  console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
1600
1600
  }
1601
1601
  }
1602
- function Qs(r) {
1602
+ function Js(r) {
1603
1603
  let e;
1604
1604
  const t = r.extensions && r.extensions[b.KHR_DRACO_MESH_COMPRESSION];
1605
- if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + Re(t.attributes) : e = r.indices + ":" + Re(r.attributes) + ":" + r.mode, r.targets !== void 0)
1605
+ if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + Me(t.attributes) : e = r.indices + ":" + Me(r.attributes) + ":" + r.mode, r.targets !== void 0)
1606
1606
  for (let n = 0, s = r.targets.length; n < s; n++)
1607
- e += ":" + Re(r.targets[n]);
1607
+ e += ":" + Me(r.targets[n]);
1608
1608
  return e;
1609
1609
  }
1610
- function Re(r) {
1610
+ function Me(r) {
1611
1611
  let e = "";
1612
1612
  const t = Object.keys(r).sort();
1613
1613
  for (let n = 0, s = t.length; n < s; n++)
@@ -1628,13 +1628,13 @@ function Ie(r) {
1628
1628
  throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
1629
1629
  }
1630
1630
  }
1631
- function Js(r) {
1631
+ function en(r) {
1632
1632
  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";
1633
1633
  }
1634
- const en = new se();
1635
- class tn {
1634
+ const tn = new se();
1635
+ class sn {
1636
1636
  constructor(e = {}, t = {}) {
1637
- this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new xs(), 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 = {};
1637
+ this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new As(), 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 = {};
1638
1638
  let n = !1, s = -1, i = !1, o = -1;
1639
1639
  if (typeof navigator < "u") {
1640
1640
  const c = navigator.userAgent;
@@ -1642,7 +1642,7 @@ class tn {
1642
1642
  const a = c.match(/Version\/(\d+)/);
1643
1643
  s = n && a ? parseInt(a[1], 10) : -1, i = c.indexOf("Firefox") > -1, o = i ? c.match(/Firefox\/([0-9]+)\./)[1] : -1;
1644
1644
  }
1645
- typeof createImageBitmap > "u" || n && s < 17 || i && o < 98 ? this.textureLoader = new At(this.options.manager) : this.textureLoader = new Rt(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new de(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
1645
+ typeof createImageBitmap > "u" || n && s < 17 || i && o < 98 ? this.textureLoader = new Mt(this.options.manager) : this.textureLoader = new Rt(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new de(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
1646
1646
  }
1647
1647
  setExtensions(e) {
1648
1648
  this.extensions = e;
@@ -1892,15 +1892,15 @@ class tn {
1892
1892
  if (m && m !== h) {
1893
1893
  const f = Math.floor(p / m), g = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + f + ":" + s.count;
1894
1894
  let T = t.cache.get(g);
1895
- T || (w = new l(c, f * m, s.count * m / u), T = new Mt(w, m / u), t.cache.add(g, T)), d = new St(T, a, p % m / u, _);
1895
+ T || (w = new l(c, f * m, s.count * m / u), T = new St(w, m / u), t.cache.add(g, T)), d = new Lt(T, a, p % m / u, _);
1896
1896
  } else
1897
1897
  c === null ? w = new l(s.count * a) : w = new l(c, p, s.count * a), d = new oe(w, a, _);
1898
1898
  if (s.sparse !== void 0) {
1899
1899
  const f = xe.SCALAR, g = te[s.sparse.indices.componentType], T = s.sparse.indices.byteOffset || 0, y = s.sparse.values.byteOffset || 0, E = new g(o[1], T, s.sparse.count * f), x = new l(o[2], y, s.sparse.count * a);
1900
1900
  c !== null && (d = new oe(d.array.slice(), d.itemSize, d.normalized)), d.normalized = !1;
1901
- for (let M = 0, D = E.length; M < D; M++) {
1902
- const C = E[M];
1903
- if (d.setX(C, x[M * a]), a >= 2 && d.setY(C, x[M * a + 1]), a >= 3 && d.setZ(C, x[M * a + 2]), a >= 4 && d.setW(C, x[M * a + 3]), a >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1901
+ for (let R = 0, D = E.length; R < D; R++) {
1902
+ const C = E[R];
1903
+ if (d.setX(C, x[R * a]), a >= 2 && d.setY(C, x[R * a + 1]), a >= 3 && d.setZ(C, x[R * a + 2]), a >= 4 && d.setW(C, x[R * a + 3]), a >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1904
1904
  }
1905
1905
  d.normalized = _;
1906
1906
  }
@@ -1930,7 +1930,7 @@ class tn {
1930
1930
  const l = this.loadImageSource(t, n).then(function(u) {
1931
1931
  u.flipY = !1, u.name = o.name || c.name || "", u.name === "" && typeof c.uri == "string" && c.uri.startsWith("data:image/") === !1 && (u.name = c.uri);
1932
1932
  const p = (i.samplers || {})[o.sampler] || {};
1933
- return u.magFilter = Ve[p.magFilter] || Ce, u.minFilter = Ve[p.minFilter] || rt, u.wrapS = Ye[p.wrapS] || Oe, u.wrapT = Ye[p.wrapT] || Oe, u.generateMipmaps = !u.isCompressedTexture && u.minFilter !== at && u.minFilter !== Ce, s.associations.set(u, { textures: e }), u;
1933
+ return u.magFilter = Ye[p.magFilter] || Ce, u.minFilter = Ye[p.minFilter] || at, u.wrapS = qe[p.wrapS] || Oe, u.wrapT = qe[p.wrapT] || Oe, u.generateMipmaps = !u.isCompressedTexture && u.minFilter !== ct && u.minFilter !== Ce, s.associations.set(u, { textures: e }), u;
1934
1934
  }).catch(function() {
1935
1935
  return null;
1936
1936
  });
@@ -1954,12 +1954,12 @@ class tn {
1954
1954
  return new Promise(function(p, m) {
1955
1955
  let _ = p;
1956
1956
  t.isImageBitmapLoader === !0 && (_ = function(w) {
1957
- const d = new Ue(w);
1957
+ const d = new je(w);
1958
1958
  d.needsUpdate = !0, p(d);
1959
1959
  }), t.load(re.resolveURL(h, i.path), _, void 0, m);
1960
1960
  });
1961
1961
  }).then(function(h) {
1962
- return l === !0 && c.revokeObjectURL(a), G(h, o), h.userData.mimeType = o.mimeType || Js(o.uri), h;
1962
+ return l === !0 && c.revokeObjectURL(a), G(h, o), h.userData.mimeType = o.mimeType || en(o.uri), h;
1963
1963
  }).catch(function(h) {
1964
1964
  throw console.error("THREE.GLTFLoader: Couldn't load texture", a), h;
1965
1965
  });
@@ -2006,11 +2006,11 @@ class tn {
2006
2006
  if (e.isPoints) {
2007
2007
  const c = "PointsMaterial:" + n.uuid;
2008
2008
  let a = this.cache.get(c);
2009
- a || (a = new kt(), Te.prototype.copy.call(a, n), a.color.copy(n.color), a.map = n.map, a.sizeAttenuation = !1, this.cache.add(c, a)), n = a;
2009
+ a || (a = new It(), Te.prototype.copy.call(a, n), a.color.copy(n.color), a.map = n.map, a.sizeAttenuation = !1, this.cache.add(c, a)), n = a;
2010
2010
  } else if (e.isLine) {
2011
2011
  const c = "LineBasicMaterial:" + n.uuid;
2012
2012
  let a = this.cache.get(c);
2013
- a || (a = new It(), Te.prototype.copy.call(a, n), a.color.copy(n.color), a.map = n.map, this.cache.add(c, a)), n = a;
2013
+ a || (a = new Nt(), Te.prototype.copy.call(a, n), a.color.copy(n.color), a.map = n.map, this.cache.add(c, a)), n = a;
2014
2014
  }
2015
2015
  if (s || i || o) {
2016
2016
  let c = "ClonedMaterial:" + n.uuid + ":";
@@ -2021,7 +2021,7 @@ class tn {
2021
2021
  e.material = n;
2022
2022
  }
2023
2023
  getMaterialType() {
2024
- return ct;
2024
+ return lt;
2025
2025
  }
2026
2026
  /**
2027
2027
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
@@ -2049,7 +2049,7 @@ class tn {
2049
2049
  return p.extendMaterialParams && p.extendMaterialParams(e, c);
2050
2050
  })));
2051
2051
  }
2052
- i.doubleSided === !0 && (c.side = Nt);
2052
+ i.doubleSided === !0 && (c.side = vt);
2053
2053
  const u = i.alphaMode || Ae.OPAQUE;
2054
2054
  if (u === Ae.BLEND ? (c.transparent = !0, c.depthWrite = !1) : (c.transparent = !1, u === Ae.MASK && (c.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== ie && (l.push(t.assignTexture(c, "normalMap", i.normalTexture)), c.normalScale = new k(1, 1), i.normalTexture.scale !== void 0)) {
2055
2055
  const h = i.normalTexture.scale;
@@ -2072,7 +2072,7 @@ class tn {
2072
2072
  * @return {string}
2073
2073
  */
2074
2074
  createUniqueName(e) {
2075
- const t = vt.sanitizeNodeName(e || "");
2075
+ const t = Ht.sanitizeNodeName(e || "");
2076
2076
  return t in this.nodeNamesUsed ? t + "_" + ++this.nodeNamesUsed[t] : (this.nodeNamesUsed[t] = 0, t);
2077
2077
  }
2078
2078
  /**
@@ -2088,17 +2088,17 @@ class tn {
2088
2088
  const t = this, n = this.extensions, s = this.primitiveCache;
2089
2089
  function i(c) {
2090
2090
  return n[b.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(c, t).then(function(a) {
2091
- return qe(a, c, t);
2091
+ return $e(a, c, t);
2092
2092
  });
2093
2093
  }
2094
2094
  const o = [];
2095
2095
  for (let c = 0, a = e.length; c < a; c++) {
2096
- const l = e[c], u = Qs(l), h = s[u];
2096
+ const l = e[c], u = Js(l), h = s[u];
2097
2097
  if (h)
2098
2098
  o.push(h.promise);
2099
2099
  else {
2100
2100
  let p;
2101
- l.extensions && l.extensions[b.KHR_DRACO_MESH_COMPRESSION] ? p = i(l) : p = qe(new ot(), l, t), s[u] = { primitive: l, promise: p }, o.push(p);
2101
+ l.extensions && l.extensions[b.KHR_DRACO_MESH_COMPRESSION] ? p = i(l) : p = $e(new rt(), l, t), s[u] = { primitive: l, promise: p }, o.push(p);
2102
2102
  }
2103
2103
  }
2104
2104
  return Promise.all(o);
@@ -2113,7 +2113,7 @@ class tn {
2113
2113
  loadMesh(e) {
2114
2114
  const t = this, n = this.json, s = this.extensions, i = n.meshes[e], o = i.primitives, c = [];
2115
2115
  for (let a = 0, l = o.length; a < l; a++) {
2116
- const u = o[a].material === void 0 ? qs(this.cache) : this.getDependency("material", o[a].material);
2116
+ const u = o[a].material === void 0 ? $s(this.cache) : this.getDependency("material", o[a].material);
2117
2117
  c.push(u);
2118
2118
  }
2119
2119
  return c.push(t.loadGeometries(o)), Promise.all(c).then(function(a) {
@@ -2123,18 +2123,18 @@ class tn {
2123
2123
  let f;
2124
2124
  const g = l[m];
2125
2125
  if (d.mode === I.TRIANGLES || d.mode === I.TRIANGLE_STRIP || d.mode === I.TRIANGLE_FAN || d.mode === void 0)
2126
- f = i.isSkinnedMesh === !0 ? new Ht(w, g) : new Ft(w, g), f.isSkinnedMesh === !0 && f.normalizeSkinWeights(), d.mode === I.TRIANGLE_STRIP ? f.geometry = We(f.geometry, nt) : d.mode === I.TRIANGLE_FAN && (f.geometry = We(f.geometry, Pe));
2126
+ f = i.isSkinnedMesh === !0 ? new Ft(w, g) : new Ut(w, g), f.isSkinnedMesh === !0 && f.normalizeSkinWeights(), d.mode === I.TRIANGLE_STRIP ? f.geometry = Xe(f.geometry, it) : d.mode === I.TRIANGLE_FAN && (f.geometry = Xe(f.geometry, Pe));
2127
2127
  else if (d.mode === I.LINES)
2128
- f = new Ut(w, g);
2129
- else if (d.mode === I.LINE_STRIP)
2130
2128
  f = new jt(w, g);
2131
- else if (d.mode === I.LINE_LOOP)
2129
+ else if (d.mode === I.LINE_STRIP)
2132
2130
  f = new Gt(w, g);
2133
- else if (d.mode === I.POINTS)
2131
+ else if (d.mode === I.LINE_LOOP)
2134
2132
  f = new Bt(w, g);
2133
+ else if (d.mode === I.POINTS)
2134
+ f = new zt(w, g);
2135
2135
  else
2136
2136
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + d.mode);
2137
- Object.keys(f.geometry.morphAttributes).length > 0 && Zs(f, i), f.name = t.createUniqueName(i.name || "mesh_" + e), G(f, i), d.extensions && Z(s, f, d), t.assignFinalMaterial(f), h.push(f);
2137
+ Object.keys(f.geometry.morphAttributes).length > 0 && Qs(f, i), f.name = t.createUniqueName(i.name || "mesh_" + e), G(f, i), d.extensions && Z(s, f, d), t.assignFinalMaterial(f), h.push(f);
2138
2138
  }
2139
2139
  for (let m = 0, _ = h.length; m < _; m++)
2140
2140
  t.associations.set(h[m], {
@@ -2164,7 +2164,7 @@ class tn {
2164
2164
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
2165
2165
  return;
2166
2166
  }
2167
- return n.type === "perspective" ? t = new zt(st.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : n.type === "orthographic" && (t = new Kt(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), n.name && (t.name = this.createUniqueName(n.name)), G(t, n), Promise.resolve(t);
2167
+ return n.type === "perspective" ? t = new Kt(nt.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : n.type === "orthographic" && (t = new Wt(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), n.name && (t.name = this.createUniqueName(n.name)), G(t, n), Promise.resolve(t);
2168
2168
  }
2169
2169
  /**
2170
2170
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
@@ -2188,7 +2188,7 @@ class tn {
2188
2188
  } else
2189
2189
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', t.joints[l]);
2190
2190
  }
2191
- return new Wt(c, a);
2191
+ return new Xt(c, a);
2192
2192
  });
2193
2193
  }
2194
2194
  /**
@@ -2213,15 +2213,15 @@ class tn {
2213
2213
  ]).then(function(h) {
2214
2214
  const p = h[0], m = h[1], _ = h[2], w = h[3], d = h[4], f = [];
2215
2215
  for (let g = 0, T = p.length; g < T; g++) {
2216
- const y = p[g], E = m[g], x = _[g], M = w[g], D = d[g];
2216
+ const y = p[g], E = m[g], x = _[g], R = w[g], D = d[g];
2217
2217
  if (y === void 0) continue;
2218
2218
  y.updateMatrix && y.updateMatrix();
2219
- const C = n._createAnimationTracks(y, E, x, M, D);
2219
+ const C = n._createAnimationTracks(y, E, x, R, D);
2220
2220
  if (C)
2221
2221
  for (let z = 0; z < C.length; z++)
2222
2222
  f.push(C[z]);
2223
2223
  }
2224
- return new Xt(i, void 0, f);
2224
+ return new Vt(i, void 0, f);
2225
2225
  });
2226
2226
  }
2227
2227
  createNodeMesh(e) {
@@ -2254,7 +2254,7 @@ class tn {
2254
2254
  ]).then(function(l) {
2255
2255
  const u = l[0], h = l[1], p = l[2];
2256
2256
  p !== null && u.traverse(function(m) {
2257
- m.isSkinnedMesh && m.bind(p, en);
2257
+ m.isSkinnedMesh && m.bind(p, tn);
2258
2258
  });
2259
2259
  for (let m = 0, _ = h.length; m < _; m++)
2260
2260
  u.add(h[m]);
@@ -2278,7 +2278,7 @@ class tn {
2278
2278
  c.push(l);
2279
2279
  }), this.nodeCache[e] = Promise.all(c).then(function(l) {
2280
2280
  let u;
2281
- if (i.isBone === !0 ? u = new Vt() : l.length > 1 ? u = new we() : l.length === 1 ? u = l[0] : u = new Ne(), u !== l[0])
2281
+ if (i.isBone === !0 ? u = new Yt() : l.length > 1 ? u = new we() : l.length === 1 ? u = l[0] : u = new ve(), u !== l[0])
2282
2282
  for (let h = 0, p = l.length; h < p; h++)
2283
2283
  u.add(l[h]);
2284
2284
  if (i.name && (u.userData.name = i.name, u.name = o), G(u, i), i.extensions && Z(n, u, i), i.matrix !== void 0) {
@@ -2314,7 +2314,7 @@ class tn {
2314
2314
  const l = (u) => {
2315
2315
  const h = /* @__PURE__ */ new Map();
2316
2316
  for (const [p, m] of s.associations)
2317
- (p instanceof Te || p instanceof Ue) && h.set(p, m);
2317
+ (p instanceof Te || p instanceof je) && h.set(p, m);
2318
2318
  return u.traverse((p) => {
2319
2319
  const m = s.associations.get(p);
2320
2320
  m != null && h.set(p, m);
@@ -2331,29 +2331,29 @@ class tn {
2331
2331
  let l;
2332
2332
  switch (K[i.path]) {
2333
2333
  case K.weights:
2334
- l = Ge;
2334
+ l = Be;
2335
2335
  break;
2336
2336
  case K.rotation:
2337
- l = Be;
2337
+ l = ze;
2338
2338
  break;
2339
2339
  case K.translation:
2340
2340
  case K.scale:
2341
- l = je;
2341
+ l = Ge;
2342
2342
  break;
2343
2343
  default:
2344
2344
  switch (n.itemSize) {
2345
2345
  case 1:
2346
- l = Ge;
2346
+ l = Be;
2347
2347
  break;
2348
2348
  case 2:
2349
2349
  case 3:
2350
2350
  default:
2351
- l = je;
2351
+ l = Ge;
2352
2352
  break;
2353
2353
  }
2354
2354
  break;
2355
2355
  }
2356
- const u = s.interpolation !== void 0 ? Ys[s.interpolation] : lt, h = this._getArrayFromAccessor(n);
2356
+ const u = s.interpolation !== void 0 ? qs[s.interpolation] : ht, h = this._getArrayFromAccessor(n);
2357
2357
  for (let p = 0, m = a.length; p < m; p++) {
2358
2358
  const _ = new l(
2359
2359
  a[p] + "." + K[i.path],
@@ -2377,13 +2377,13 @@ class tn {
2377
2377
  }
2378
2378
  _createCubicSplineTrackInterpolant(e) {
2379
2379
  e.createInterpolant = function(n) {
2380
- const s = this instanceof Be ? Vs : ft;
2380
+ const s = this instanceof ze ? Ys : pt;
2381
2381
  return new s(this.times, this.values, this.getValueSize() / 3, n);
2382
2382
  }, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
2383
2383
  }
2384
2384
  }
2385
- function sn(r, e, t) {
2386
- const n = e.attributes, s = new Zt();
2385
+ function nn(r, e, t) {
2386
+ const n = e.attributes, s = new Qt();
2387
2387
  if (n.POSITION !== void 0) {
2388
2388
  const c = t.json.accessors[n.POSITION], a = c.min, l = c.max;
2389
2389
  if (a !== void 0 && l !== void 0) {
@@ -2420,10 +2420,10 @@ function sn(r, e, t) {
2420
2420
  s.expandByVector(c);
2421
2421
  }
2422
2422
  r.boundingBox = s;
2423
- const o = new Qt();
2423
+ const o = new Jt();
2424
2424
  s.getCenter(o.center), o.radius = s.min.distanceTo(s.max) / 2, r.boundingSphere = o;
2425
2425
  }
2426
- function qe(r, e, t) {
2426
+ function $e(r, e, t) {
2427
2427
  const n = e.attributes, s = [];
2428
2428
  function i(o, c) {
2429
2429
  return t.getDependency("accessor", o).then(function(a) {
@@ -2440,12 +2440,12 @@ function qe(r, e, t) {
2440
2440
  });
2441
2441
  s.push(o);
2442
2442
  }
2443
- return De.workingColorSpace !== U && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${De.workingColorSpace}" not supported.`), G(r, e), sn(r, e, t), Promise.all(s).then(function() {
2444
- return e.targets !== void 0 ? $s(r, e.targets, t) : r;
2443
+ return De.workingColorSpace !== U && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${De.workingColorSpace}" not supported.`), G(r, e), nn(r, e, t), Promise.all(s).then(function() {
2444
+ return e.targets !== void 0 ? Zs(r, e.targets, t) : r;
2445
2445
  });
2446
2446
  }
2447
- const $e = new S(), nn = new le(), Ze = new S();
2448
- class on extends Ne {
2447
+ const Ze = new S(), on = new le(), Qe = new S();
2448
+ class rn extends ve {
2449
2449
  /**
2450
2450
  * Constructs a new CSS3D object.
2451
2451
  *
@@ -2462,7 +2462,7 @@ class on extends Ne {
2462
2462
  return super.copy(e, t), this.element = e.element.cloneNode(!0), this;
2463
2463
  }
2464
2464
  }
2465
- class _n extends on {
2465
+ class Tn extends rn {
2466
2466
  /**
2467
2467
  * Constructs a new CSS3D sprite object.
2468
2468
  *
@@ -2475,8 +2475,8 @@ class _n extends on {
2475
2475
  return super.copy(e, t), this.rotation2D = e.rotation2D, this;
2476
2476
  }
2477
2477
  }
2478
- const F = new se(), rn = new se();
2479
- class Tn {
2478
+ const F = new se(), an = new se();
2479
+ class wn {
2480
2480
  /**
2481
2481
  * Constructs a new CSS3D renderer.
2482
2482
  *
@@ -2534,9 +2534,9 @@ class Tn {
2534
2534
  if (E.style.display = y === !0 ? "" : "none", y === !0) {
2535
2535
  d.onBeforeRender(t, f, g);
2536
2536
  let x;
2537
- d.isCSS3DSprite ? (F.copy(g.matrixWorldInverse), F.transpose(), d.rotation2D !== 0 && F.multiply(rn.makeRotationZ(d.rotation2D)), d.matrixWorld.decompose($e, nn, Ze), F.setPosition($e), F.scale(Ze), F.elements[3] = 0, F.elements[7] = 0, F.elements[11] = 0, F.elements[15] = 1, x = m(F)) : x = m(d.matrixWorld);
2538
- const M = c.objects.get(d);
2539
- if (M === void 0 || M.style !== x) {
2537
+ d.isCSS3DSprite ? (F.copy(g.matrixWorldInverse), F.transpose(), d.rotation2D !== 0 && F.multiply(an.makeRotationZ(d.rotation2D)), d.matrixWorld.decompose(Ze, on, Qe), F.setPosition(Ze), F.scale(Qe), F.elements[3] = 0, F.elements[7] = 0, F.elements[11] = 0, F.elements[15] = 1, x = m(F)) : x = m(d.matrixWorld);
2538
+ const R = c.objects.get(d);
2539
+ if (R === void 0 || R.style !== x) {
2540
2540
  E.style.transform = x;
2541
2541
  const D = { style: x };
2542
2542
  c.objects.set(d, D);
@@ -2601,50 +2601,50 @@ ae.Panel = function(r, e, t) {
2601
2601
  }
2602
2602
  };
2603
2603
  };
2604
- function wn(r) {
2605
- return new Jt(r);
2606
- }
2607
- function bn(r = 150, ...e) {
2608
- return new es(r, r / 10, ...e);
2604
+ function bn(r) {
2605
+ return new es(r);
2609
2606
  }
2610
- function En(r) {
2611
- return new ts(r, 16776960);
2607
+ function En(r = 150, ...e) {
2608
+ return new ts(r, r / 10, ...e);
2612
2609
  }
2613
- function xn(r, e) {
2614
- return new ut(r, e);
2610
+ function xn(r) {
2611
+ return new ss(r, 16776960);
2615
2612
  }
2616
2613
  function An(r, e) {
2617
- return new Ts(r, e);
2614
+ return new dt(r, e);
2615
+ }
2616
+ function Mn(r, e) {
2617
+ return new ws(r, e);
2618
2618
  }
2619
2619
  function Rn() {
2620
- const r = new ss(), e = new k(0, 0);
2620
+ const r = new ns(), e = new k(0, 0);
2621
2621
  return {
2622
2622
  raycaster: r,
2623
2623
  pointer: e
2624
2624
  };
2625
2625
  }
2626
- function Mn(r = 10) {
2627
- return new ns(r);
2626
+ function Sn(r = 10) {
2627
+ return new is(r);
2628
2628
  }
2629
- function Sn(r = new S(1, 1, 1), e = new S(10, 10, 10), t = 5, n = 16776960) {
2630
- return r.normalize(), new is(r, e, t, n);
2629
+ function Ln(r = new S(1, 1, 1), e = new S(10, 10, 10), t = 5, n = 16776960) {
2630
+ return r.normalize(), new os(r, e, t, n);
2631
2631
  }
2632
- function Ln() {
2632
+ function Pn() {
2633
2633
  const r = new ae();
2634
2634
  return r.dom.style.cssText = "position:absolute;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000", r;
2635
2635
  }
2636
- const an = (r) => {
2636
+ const cn = (r) => {
2637
2637
  r.geometry && r.geometry.dispose(), r.material && (Array.isArray(r.material) ? r.material.forEach((e) => {
2638
- Qe(e);
2639
- }) : Qe(r.material)), r.children && r.children.forEach((e) => an(e));
2638
+ Je(e);
2639
+ }) : Je(r.material)), r.children && r.children.forEach((e) => cn(e));
2640
2640
  };
2641
- function Qe(r) {
2641
+ function Je(r) {
2642
2642
  for (const e in r)
2643
2643
  r[e] && r[e].isTexture && r[e].dispose();
2644
2644
  r.dispose();
2645
2645
  }
2646
- const Me = {};
2647
- async function Pn(r, e = 50) {
2646
+ const Re = {};
2647
+ async function Dn(r, e = 50) {
2648
2648
  const t = {
2649
2649
  type: r.type,
2650
2650
  name: r.name,
@@ -2680,7 +2680,7 @@ async function Pn(r, e = 50) {
2680
2680
  }
2681
2681
  return t;
2682
2682
  }
2683
- function Dn(r) {
2683
+ function Cn(r) {
2684
2684
  const e = {
2685
2685
  type: r.type,
2686
2686
  name: r.name,
@@ -2715,7 +2715,7 @@ function Dn(r) {
2715
2715
  }
2716
2716
  return e;
2717
2717
  }
2718
- async function cn(r, e = 50) {
2718
+ async function ln(r, e = 50) {
2719
2719
  const t = [];
2720
2720
  let n;
2721
2721
  switch (r.type) {
@@ -2758,7 +2758,7 @@ async function cn(r, e = 50) {
2758
2758
  }
2759
2759
  return n;
2760
2760
  }
2761
- function Cn(r) {
2761
+ function On(r) {
2762
2762
  const e = [];
2763
2763
  let t;
2764
2764
  switch (r.type) {
@@ -2853,15 +2853,15 @@ function me(r) {
2853
2853
  };
2854
2854
  }
2855
2855
  function ge(r) {
2856
- if (Me[r.name]) return Me[r.name];
2856
+ if (Re[r.name]) return Re[r.name];
2857
2857
  const { type: e, ...t } = r, n = e || "MeshStandardMaterial", s = new A[n]({ ...t });
2858
2858
  if (r.map) {
2859
2859
  const i = new A.TextureLoader().load(r.map);
2860
2860
  s.map = i;
2861
2861
  }
2862
- return s.needsUpdate = !0, Me[r.name] = s, s;
2862
+ return s.needsUpdate = !0, Re[r.name] = s, s;
2863
2863
  }
2864
- class ln {
2864
+ class hn {
2865
2865
  constructor() {
2866
2866
  this.stats = {
2867
2867
  hits: 0,
@@ -2981,7 +2981,7 @@ class ln {
2981
2981
  }), console.groupEnd();
2982
2982
  }
2983
2983
  }
2984
- const W = new ln();
2984
+ const W = new hn();
2985
2985
  class ye {
2986
2986
  /**
2987
2987
  * 异步操作并支持重试
@@ -3085,15 +3085,15 @@ class ce extends Error {
3085
3085
  );
3086
3086
  }
3087
3087
  }
3088
- const Je = 4;
3089
- class et {
3088
+ const et = 4;
3089
+ class tt {
3090
3090
  /**
3091
3091
  * 构造函数
3092
3092
  * @param {string} dbName - 数据库名称
3093
3093
  * @param {CacheOptions} options - 缓存配置选项
3094
3094
  */
3095
3095
  constructor(e = "threeJsIDBCache", t = {}) {
3096
- this.version = Je, this.dbName = e, this.options = {
3096
+ this.version = et, this.dbName = e, this.options = {
3097
3097
  maxSize: t.maxSize || 500 * 1024 * 1024,
3098
3098
  // 默认 500MB
3099
3099
  maxEntries: t.maxEntries || 50,
@@ -3103,10 +3103,10 @@ class et {
3103
3103
  }, this.dbInit();
3104
3104
  }
3105
3105
  dbInit() {
3106
- this.db = new os(this.dbName), this.db.version(this.version).stores({
3106
+ this.db = new rs(this.dbName), this.db.version(this.version).stores({
3107
3107
  models: "&path, version, timestamp, accessCount, size"
3108
3108
  }).upgrade(async (e) => {
3109
- console.log("[ IDBCache 版本更新 ] ====> version", Je);
3109
+ console.log("[ IDBCache 版本更新 ] ====> version", et);
3110
3110
  const t = e.table("models"), n = await t.toArray();
3111
3111
  for (const s of n)
3112
3112
  s.data instanceof ArrayBuffer || await t.delete(s.path);
@@ -3222,15 +3222,15 @@ class et {
3222
3222
  await this.db.table("models").delete(e);
3223
3223
  }
3224
3224
  }
3225
- function pt(r) {
3225
+ function mt(r) {
3226
3226
  const { geometries: e, materials: t, hierarchy: n } = r, s = /* @__PURE__ */ new Map();
3227
3227
  e.forEach((a, l) => {
3228
- const u = hn(a);
3228
+ const u = un(a);
3229
3229
  s.set(l, u);
3230
3230
  });
3231
3231
  const i = /* @__PURE__ */ new Map();
3232
3232
  t.forEach((a, l) => {
3233
- const u = un(a);
3233
+ const u = dn(a);
3234
3234
  i.set(l, u);
3235
3235
  });
3236
3236
  const o = new A.Group();
@@ -3242,7 +3242,7 @@ function pt(r) {
3242
3242
  const u = a.geometryIndex >= 0 ? s.get(a.geometryIndex) : null, h = a.materialIndex >= 0 ? i.get(a.materialIndex) : null;
3243
3243
  l = new A.Mesh(u, h);
3244
3244
  } else a.type === "Group" ? l = new A.Group() : a.type === "Object3D" ? l = new A.Object3D() : l = new A.Object3D();
3245
- l.name = a.name, l.position.fromArray(a.position), l.rotation.fromArray(a.rotation), l.scale.fromArray(a.scale), l.visible = a.visible, c.set(a.id, l);
3245
+ l.name = a.name, l.position.fromArray(a.position), l.rotation.fromArray(a.rotation), l.scale.fromArray(a.scale), l.visible = a.visible, l.userData = a.userData || {}, c.set(a.id, l);
3246
3246
  }), n.forEach((a) => {
3247
3247
  const l = c.get(a.id);
3248
3248
  if (a.parentId !== null) {
@@ -3252,7 +3252,7 @@ function pt(r) {
3252
3252
  o.add(l);
3253
3253
  }), o;
3254
3254
  }
3255
- function hn(r) {
3255
+ function un(r) {
3256
3256
  const e = new A.BufferGeometry();
3257
3257
  for (const t in r.attributes) {
3258
3258
  const n = r.attributes[t], s = n.array;
@@ -3278,9 +3278,10 @@ function hn(r) {
3278
3278
  }
3279
3279
  return e;
3280
3280
  }
3281
- function un(r) {
3281
+ function dn(r) {
3282
3282
  let e;
3283
3283
  const t = {
3284
+ name: r.name,
3284
3285
  color: r.color !== void 0 ? r.color : 16777215,
3285
3286
  opacity: r.opacity !== void 0 ? r.opacity : 1,
3286
3287
  transparent: r.transparent !== void 0 ? r.transparent : !1,
@@ -3321,7 +3322,7 @@ function un(r) {
3321
3322
  }
3322
3323
  return e.uuid = r.uuid, e;
3323
3324
  }
3324
- class On {
3325
+ class kn {
3325
3326
  constructor() {
3326
3327
  this.geometries = [], this.materials = [], this.hierarchy = [], this.geometryMap = /* @__PURE__ */ new Map(), this.materialMap = /* @__PURE__ */ new Map();
3327
3328
  }
@@ -3346,7 +3347,7 @@ class On {
3346
3347
  materials: this.materials,
3347
3348
  hierarchy: this.hierarchy
3348
3349
  };
3349
- return pt(e);
3350
+ return mt(e);
3350
3351
  }
3351
3352
  /**
3352
3353
  * 完成构建
@@ -3355,7 +3356,7 @@ class On {
3355
3356
  return this.buildCurrent();
3356
3357
  }
3357
3358
  }
3358
- function dn(r) {
3359
+ function fn(r) {
3359
3360
  return new Worker(
3360
3361
  "" + new URL("assets/gltfParser.worker-D2lwod50.js", import.meta.url).href,
3361
3362
  {
@@ -3363,9 +3364,9 @@ function dn(r) {
3363
3364
  }
3364
3365
  );
3365
3366
  }
3366
- function fn(r) {
3367
+ function pn(r) {
3367
3368
  return new Worker(
3368
- "" + new URL("assets/gltfParserOptimized.worker-FT73rIOj.js", import.meta.url).href,
3369
+ "" + new URL("assets/gltfParserOptimized.worker-yo8WMPFM.js", import.meta.url).href,
3369
3370
  {
3370
3371
  name: r == null ? void 0 : r.name
3371
3372
  }
@@ -3373,9 +3374,19 @@ function fn(r) {
3373
3374
  }
3374
3375
  let ee;
3375
3376
  const Le = "/draco/";
3376
- let Q, J, tt = 0;
3377
- const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}) => {
3378
- const { debug: e = !1 } = r, t = new Es(), n = new ws();
3377
+ let Q, J, st = 0;
3378
+ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map();
3379
+ function Ne(r) {
3380
+ const e = r.clone(!1);
3381
+ r.userData && typeof r.userData == "object" ? e.userData = JSON.parse(JSON.stringify(r.userData)) : e.userData = r.userData;
3382
+ for (const t of r.children) {
3383
+ const n = Ne(t);
3384
+ e.add(n);
3385
+ }
3386
+ return e;
3387
+ }
3388
+ const mn = (r = {}) => {
3389
+ const { debug: e = !1 } = r, t = new xs(), n = new bs();
3379
3390
  n.setDecoderPath(Le), t.setDRACOLoader(n);
3380
3391
  const s = {
3381
3392
  info: (...d) => e && console.log(...d),
@@ -3398,7 +3409,7 @@ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}
3398
3409
  let E = !1;
3399
3410
  const {
3400
3411
  maxRetries: x = 3,
3401
- optimizeMaterials: M = !1,
3412
+ optimizeMaterials: R = !1,
3402
3413
  simplifyGeometry: D = !1,
3403
3414
  simplifyRatio: C = 0.5,
3404
3415
  simplifyOptions: z = {},
@@ -3410,7 +3421,7 @@ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}
3410
3421
  if (P && P.has(f)) {
3411
3422
  const N = P.get(f);
3412
3423
  s.info(`[ 内存缓存命中 ] ${d} (version: ${f})`), s.time("[ 内存缓存克隆耗时 ]");
3413
- const $ = N.clone(!0);
3424
+ const $ = Ne(N);
3414
3425
  return s.timeEnd("[ 内存缓存克隆耗时 ]"), W.recordHit(performance.now() - y), $;
3415
3426
  }
3416
3427
  }
@@ -3423,7 +3434,7 @@ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}
3423
3434
  () => a(d, g),
3424
3435
  {
3425
3436
  maxRetries: x,
3426
- shouldRetry: (He) => !!(He.name === "TypeError" || He.message.includes("HTTP error! status: 5"))
3437
+ shouldRetry: (Fe) => !!(Fe.name === "TypeError" || Fe.message.includes("HTTP error! status: 5"))
3427
3438
  }
3428
3439
  ), s.timeEnd("[ fetchArrayBuffer ] 加载模型耗时");
3429
3440
  const v = performance.now();
@@ -3433,7 +3444,7 @@ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}
3433
3444
  }
3434
3445
  s.time("[ 解析模型耗时 ]");
3435
3446
  let N = await u(P);
3436
- if (s.timeEnd("[ 解析模型耗时 ]"), s.time("[ 模型优化耗时 ]"), M) {
3447
+ if (s.timeEnd("[ 解析模型耗时 ]"), s.time("[ 模型优化耗时 ]"), R) {
3437
3448
  s.info("🔧 [ 材质优化 ] 开始合并相同材质...");
3438
3449
  const { modelOptimizer: v } = await import("./modelOptimizer-D6fRg-DF.js");
3439
3450
  N = v.optimizeMaterials(N);
@@ -3450,7 +3461,7 @@ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}
3450
3461
  if (s.timeEnd("[ 模型优化耗时 ]"), he) {
3451
3462
  H.has(d) || H.set(d, /* @__PURE__ */ new Map());
3452
3463
  const v = H.get(d);
3453
- v.has(f) || (s.info(`[ 内存缓存 ] 存储模型 ${d} (version: ${f})`), v.set(f, N.clone(!0)));
3464
+ v.has(f) || (s.info(`[ 内存缓存 ] 存储模型 ${d} (version: ${f})`), v.set(f, Ne(N)));
3454
3465
  }
3455
3466
  const $ = performance.now() - y;
3456
3467
  return E ? W.recordHit($) : W.recordMiss($), N;
@@ -3467,10 +3478,10 @@ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}
3467
3478
  }).then((y) => {
3468
3479
  const E = y.headers.get("content-length"), x = E ? parseInt(E, 10) : 0;
3469
3480
  if (f && x > 0) {
3470
- const M = y.body.getReader();
3481
+ const R = y.body.getReader();
3471
3482
  let D = 0;
3472
3483
  const C = [], z = () => {
3473
- M.read().then(({ done: he, value: P }) => {
3484
+ R.read().then(({ done: he, value: P }) => {
3474
3485
  if (he) {
3475
3486
  const N = new Uint8Array(D);
3476
3487
  let $ = 0;
@@ -3491,7 +3502,7 @@ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}
3491
3502
  });
3492
3503
  }
3493
3504
  async function l(d, f) {
3494
- return ee || (ee = new et()), ee.getModel(d, f);
3505
+ return ee || (ee = new tt()), ee.getModel(d, f);
3495
3506
  }
3496
3507
  async function u(d, f = {}) {
3497
3508
  if (!d) return null;
@@ -3501,17 +3512,17 @@ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}
3501
3512
  if (x)
3502
3513
  try {
3503
3514
  s.time("[ 优化解析 ] 使用 Transferable Objects 解析");
3504
- const M = await m(x, d, T);
3505
- return s.timeEnd("[ 优化解析 ] 使用 Transferable Objects 解析"), pt(M);
3506
- } catch (M) {
3507
- s.warn("[ 优化解析 ] 失败,回退到标准解析", M);
3515
+ const R = await m(x, d, T);
3516
+ return s.timeEnd("[ 优化解析 ] 使用 Transferable Objects 解析"), mt(R);
3517
+ } catch (R) {
3518
+ s.warn("[ 优化解析 ] 失败,回退到标准解析", R);
3508
3519
  }
3509
3520
  }
3510
3521
  const y = h();
3511
3522
  if (y)
3512
3523
  try {
3513
3524
  const x = await _(y, d);
3514
- return cn(x);
3525
+ return ln(x);
3515
3526
  } catch (x) {
3516
3527
  s.warn("[ GLTF Worker ] ====> 解析失败,回退到主线程解析", x);
3517
3528
  }
@@ -3522,7 +3533,7 @@ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}
3522
3533
  return null;
3523
3534
  if (!Q)
3524
3535
  try {
3525
- s.info("[GLTF Worker] 使用 ?worker 工厂函数创建 Worker..."), Q = dn(), s.info("[GLTF Worker] Worker 创建成功:", Q), Q.onmessage = (d) => {
3536
+ s.info("[GLTF Worker] 使用 ?worker 工厂函数创建 Worker..."), Q = fn(), s.info("[GLTF Worker] Worker 创建成功:", Q), Q.onmessage = (d) => {
3526
3537
  const { id: f, data: g, error: T } = d.data || {};
3527
3538
  if (!f || !X.has(f)) return;
3528
3539
  const { resolve: y, reject: E } = X.get(f);
@@ -3541,7 +3552,7 @@ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}
3541
3552
  return null;
3542
3553
  if (!J)
3543
3554
  try {
3544
- s.info("[Optimized Worker] 使用 ?worker 工厂函数创建 Worker..."), J = fn(), s.info("[Optimized Worker] Worker 创建成功:", J), J.onmessage = (d) => {
3555
+ s.info("[Optimized Worker] 使用 ?worker 工厂函数创建 Worker..."), J = pn(), s.info("[Optimized Worker] Worker 创建成功:", J), J.onmessage = (d) => {
3545
3556
  const { id: f, data: g, error: T, type: y } = d.data || {};
3546
3557
  if (!f || !X.has(f) || y === "progress")
3547
3558
  return;
@@ -3557,7 +3568,7 @@ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}
3557
3568
  }
3558
3569
  return J;
3559
3570
  }, m = (d, f, g = !1) => new Promise((T, y) => {
3560
- const E = ++tt;
3571
+ const E = ++st;
3561
3572
  X.set(E, { resolve: T, reject: y });
3562
3573
  const x = {
3563
3574
  id: E,
@@ -3567,7 +3578,7 @@ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}
3567
3578
  };
3568
3579
  d.postMessage(x, [f]);
3569
3580
  }), _ = (d, f) => new Promise((g, T) => {
3570
- const y = ++tt;
3581
+ const y = ++st;
3571
3582
  X.set(y, { resolve: g, reject: T }), d.postMessage({ id: y, arrayBuffer: f, dracoPath: Le });
3572
3583
  }), w = (d) => new Promise((f, g) => {
3573
3584
  t.parse(d, "", f, g);
@@ -3586,7 +3597,7 @@ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}
3586
3597
  * 获取缓存实例
3587
3598
  * @returns {IDBCache} 缓存实例
3588
3599
  */
3589
- getCache: () => ee || (ee = new et()),
3600
+ getCache: () => ee || (ee = new tt()),
3590
3601
  /**
3591
3602
  * 打印缓存性能报告
3592
3603
  */
@@ -3650,13 +3661,13 @@ const X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), pn = (r = {}
3650
3661
  }
3651
3662
  };
3652
3663
  };
3653
- class mn {
3664
+ class gn {
3654
3665
  constructor(e = {}) {
3655
3666
  this.options = {
3656
3667
  maxPreloadCount: e.maxPreloadCount || 5,
3657
3668
  preloadDelay: e.preloadDelay || 1e3,
3658
3669
  enableLearning: e.enableLearning !== !1
3659
- }, this.loadHistory = /* @__PURE__ */ new Map(), this.loadSequence = [], this.associations = /* @__PURE__ */ new Map(), this.preloadQueue = /* @__PURE__ */ new Set(), this.isPreloading = !1, this.loader = null, this.getLoader = () => (this.loader || (this.loader = pn()), this.loader);
3670
+ }, this.loadHistory = /* @__PURE__ */ new Map(), this.loadSequence = [], this.associations = /* @__PURE__ */ new Map(), this.preloadQueue = /* @__PURE__ */ new Set(), this.isPreloading = !1, this.loader = null, this.getLoader = () => (this.loader || (this.loader = mn()), this.loader);
3660
3671
  }
3661
3672
  /**
3662
3673
  * 记录模型加载
@@ -3799,34 +3810,34 @@ class mn {
3799
3810
  });
3800
3811
  }
3801
3812
  }
3802
- const kn = new mn();
3813
+ const In = new gn();
3803
3814
  export {
3804
- ln as C,
3815
+ hn as C,
3805
3816
  Se as E,
3806
- et as I,
3817
+ tt as I,
3807
3818
  ce as M,
3808
- mn as P,
3819
+ gn as P,
3809
3820
  ye as R,
3810
3821
  ae as S,
3811
- bn as a,
3812
- En as b,
3813
- wn as c,
3814
- xn as d,
3815
- An as e,
3822
+ En as a,
3823
+ xn as b,
3824
+ bn as c,
3825
+ An as d,
3826
+ Mn as e,
3816
3827
  Rn as f,
3817
- Mn as g,
3818
- Sn as h,
3819
- Ln as i,
3820
- an as j,
3821
- Dn as k,
3822
- cn as l,
3823
- Cn as m,
3828
+ Sn as g,
3829
+ Ln as h,
3830
+ Pn as i,
3831
+ cn as j,
3832
+ Cn as k,
3833
+ ln as l,
3834
+ On as m,
3824
3835
  W as n,
3825
- Pn as o,
3826
- kn as p,
3827
- On as q,
3828
- pt as r,
3829
- Tn as s,
3830
- _n as t,
3831
- pn as u
3836
+ Dn as o,
3837
+ In as p,
3838
+ kn as q,
3839
+ mt as r,
3840
+ wn as s,
3841
+ Tn as t,
3842
+ mn as u
3832
3843
  };