belowjs 1.7.2 → 1.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/belowjs.js CHANGED
@@ -1,5 +1,5 @@
1
- import * as m from "three";
2
- import { Controls as ir, Vector3 as v, MOUSE as We, TOUCH as Ke, Quaternion as $e, Spherical as qs, Vector2 as k, Ray as is, Plane as Pn, MathUtils as st, TrianglesDrawMode as nr, TriangleFanDrawMode as zs, TriangleStripDrawMode as Gn, Loader as ai, LoaderUtils as mt, FileLoader as xe, MeshPhysicalMaterial as ue, Color as Ee, LinearSRGBColorSpace as le, SRGBColorSpace as Ce, SpotLight as or, PointLight as rr, DirectionalLight as ar, Matrix4 as P, InstancedMesh as li, InstancedBufferAttribute as lr, Object3D as ns, TextureLoader as cr, ImageBitmapLoader as Ar, BufferAttribute as ne, InterleavedBuffer as hr, InterleavedBufferAttribute as Fe, LinearMipmapLinearFilter as os, NearestMipmapLinearFilter as dr, LinearMipmapNearestFilter as ur, NearestMipmapNearestFilter as gr, LinearFilter as Ge, NearestFilter as Un, RepeatWrapping as js, MirroredRepeatWrapping as pr, ClampToEdgeWrapping as fr, PointsMaterial as Nn, Material as gs, LineBasicMaterial as mr, MeshStandardMaterial as ci, DoubleSide as br, MeshBasicMaterial as ke, PropertyBinding as Cr, BufferGeometry as rs, SkinnedMesh as Er, Mesh as as, LineSegments as yr, Line as Ir, LineLoop as Br, Points as Vn, Group as Xe, PerspectiveCamera as wr, OrthographicCamera as On, Skeleton as Sr, AnimationClip as vr, Bone as Mr, InterpolateDiscrete as xr, InterpolateLinear as Hn, Texture as yi, VectorKeyframeTrack as Ii, NumberKeyframeTrack as Bi, QuaternionKeyframeTrack as wi, ColorManagement as Ks, FrontSide as Qr, Interpolant as Tr, Box3 as it, Sphere as Et, CompressedCubeTexture as Rr, CompressedArrayTexture as Dr, CompressedTexture as qn, NoColorSpace as Si, RGBA_BPTC_Format as Ys, RGBA_S3TC_DXT5_Format as Js, RGBA_S3TC_DXT3_Format as vi, RGB_S3TC_DXT1_Format as Mi, RGBA_S3TC_DXT1_Format as Ws, RGBA_ASTC_6x6_Format as xi, RGBA_ASTC_4x4_Format as jt, RGBA_ETC2_EAC_Format as zn, RGB_ETC2_Format as jn, RedFormat as gt, RGFormat as pt, RGBAFormat as Ye, UnsignedByteType as re, HalfFloatType as Je, FloatType as bt, DataTexture as Kn, Data3DTexture as Lr, RGB_PVRTC_4BPPV1_Format as Fr, RGB_ETC1_Format as kr, RGBA_PVRTC_4BPPV1_Format as _r, RGB_BPTC_UNSIGNED_Format as Pr, Euler as Yn, TextureUtils as Gr, LoadingManager as Ur, EventDispatcher as vt, Frustum as Nr, DefaultLoadingManager as ls, Matrix3 as Jn, Float32BufferAttribute as Jt, WebGLRenderer as Vr, WebGLRenderTarget as Qi, ShaderMaterial as Wn, OneFactor as Or, ZeroFactor as Hr, CustomBlending as qr, Box2 as zr, Matrix2 as jr, Vector4 as nt, SphereGeometry as Xn, BoxGeometry as Kr, DynamicDrawUsage as Yr, InstancedBufferGeometry as Jr, InstancedInterleavedBuffer as Xs, WireframeGeometry as Wr, ShaderLib as Kt, UniformsUtils as Zn, UniformsLib as Yt, Line3 as Xr } from "three";
1
+ import * as f from "three";
2
+ import { Controls as ir, Vector3 as M, MOUSE as We, TOUCH as Ke, Quaternion as $e, Spherical as qs, Vector2 as k, Ray as is, Plane as Pn, MathUtils as st, TrianglesDrawMode as nr, TriangleFanDrawMode as zs, TriangleStripDrawMode as Gn, Loader as ai, LoaderUtils as mt, FileLoader as xe, MeshPhysicalMaterial as ue, Color as Ee, LinearSRGBColorSpace as le, SRGBColorSpace as Ce, SpotLight as or, PointLight as rr, DirectionalLight as ar, Matrix4 as P, InstancedMesh as li, InstancedBufferAttribute as lr, Object3D as ns, TextureLoader as cr, ImageBitmapLoader as Ar, BufferAttribute as ne, InterleavedBuffer as hr, InterleavedBufferAttribute as Fe, LinearMipmapLinearFilter as os, NearestMipmapLinearFilter as dr, LinearMipmapNearestFilter as ur, NearestMipmapNearestFilter as gr, LinearFilter as Ge, NearestFilter as Un, RepeatWrapping as js, MirroredRepeatWrapping as pr, ClampToEdgeWrapping as fr, PointsMaterial as Nn, Material as gs, LineBasicMaterial as mr, MeshStandardMaterial as ci, DoubleSide as br, MeshBasicMaterial as ke, PropertyBinding as Cr, BufferGeometry as rs, SkinnedMesh as Er, Mesh as as, LineSegments as yr, Line as Ir, LineLoop as Br, Points as Vn, Group as Xe, PerspectiveCamera as wr, OrthographicCamera as On, Skeleton as Sr, AnimationClip as vr, Bone as Mr, InterpolateDiscrete as xr, InterpolateLinear as Hn, Texture as yi, VectorKeyframeTrack as Ii, NumberKeyframeTrack as Bi, QuaternionKeyframeTrack as wi, ColorManagement as Ks, FrontSide as Qr, Interpolant as Tr, Box3 as it, Sphere as Et, CompressedCubeTexture as Rr, CompressedArrayTexture as Dr, CompressedTexture as qn, NoColorSpace as Si, RGBA_BPTC_Format as Ys, RGBA_S3TC_DXT5_Format as Js, RGBA_S3TC_DXT3_Format as vi, RGB_S3TC_DXT1_Format as Mi, RGBA_S3TC_DXT1_Format as Ws, RGBA_ASTC_6x6_Format as xi, RGBA_ASTC_4x4_Format as jt, RGBA_ETC2_EAC_Format as zn, RGB_ETC2_Format as jn, RedFormat as gt, RGFormat as pt, RGBAFormat as Ye, UnsignedByteType as re, HalfFloatType as Je, FloatType as bt, DataTexture as Kn, Data3DTexture as Lr, RGB_PVRTC_4BPPV1_Format as Fr, RGB_ETC1_Format as kr, RGBA_PVRTC_4BPPV1_Format as _r, RGB_BPTC_UNSIGNED_Format as Pr, Euler as Yn, TextureUtils as Gr, LoadingManager as Ur, EventDispatcher as vt, Frustum as Nr, DefaultLoadingManager as ls, Matrix3 as Jn, Float32BufferAttribute as Jt, WebGLRenderer as Vr, WebGLRenderTarget as Qi, ShaderMaterial as Wn, OneFactor as Or, ZeroFactor as Hr, CustomBlending as qr, Box2 as zr, Matrix2 as jr, Vector4 as nt, SphereGeometry as Xn, BoxGeometry as Kr, DynamicDrawUsage as Yr, InstancedBufferGeometry as Jr, InstancedInterleavedBuffer as Xs, WireframeGeometry as Wr, ShaderLib as Kt, UniformsUtils as Zn, UniformsLib as Yt, Line3 as Xr } from "three";
3
3
  class yt {
4
4
  /**
5
5
  * Creates a new EventSystem instance
@@ -145,11 +145,11 @@ class cs {
145
145
  }
146
146
  class Zr {
147
147
  constructor(e = {}) {
148
- this.config = e, this.scene = new m.Scene(), this.init();
148
+ this.config = e, this.scene = new f.Scene(), this.init();
149
149
  }
150
150
  init() {
151
151
  let e = "#001122";
152
- this.config.background && (typeof this.config.background == "object" && this.config.background.value ? e = this.config.background.value : typeof this.config.background == "string" && (e = this.config.background)), this.scene.background = new m.Color(e);
152
+ this.config.background && (typeof this.config.background == "object" && this.config.background.value ? e = this.config.background.value : typeof this.config.background == "string" && (e = this.config.background)), this.scene.background = new f.Color(e);
153
153
  }
154
154
  add(e) {
155
155
  this.scene.add(e);
@@ -164,7 +164,7 @@ class Zr {
164
164
  this.scene.clear();
165
165
  }
166
166
  }
167
- const Ti = { type: "change" }, Ai = { type: "start" }, $n = { type: "end" }, Mt = new is(), Ri = new Pn(), $r = Math.cos(70 * st.DEG2RAD), U = new v(), J = 2 * Math.PI, _ = {
167
+ const Ti = { type: "change" }, Ai = { type: "start" }, $n = { type: "end" }, Mt = new is(), Ri = new Pn(), $r = Math.cos(70 * st.DEG2RAD), V = new M(), W = 2 * Math.PI, _ = {
168
168
  NONE: -1,
169
169
  ROTATE: 0,
170
170
  DOLLY: 1,
@@ -182,7 +182,7 @@ class ea extends ir {
182
182
  * @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
183
183
  */
184
184
  constructor(e, t = null) {
185
- super(e, t), this.state = _.NONE, this.target = new v(), this.cursor = new v(), 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: We.ROTATE, MIDDLE: We.DOLLY, RIGHT: We.PAN }, this.touches = { ONE: Ke.ROTATE, TWO: Ke.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new v(), this._lastQuaternion = new $e(), this._lastTargetPosition = new v(), this._quat = new $e().setFromUnitVectors(e.up, new v(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new qs(), this._sphericalDelta = new qs(), this._scale = 1, this._panOffset = new v(), 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 v(), this._mouse = new k(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = sa.bind(this), this._onPointerDown = ta.bind(this), this._onPointerUp = ia.bind(this), this._onContextMenu = Aa.bind(this), this._onMouseWheel = ra.bind(this), this._onKeyDown = aa.bind(this), this._onTouchStart = la.bind(this), this._onTouchMove = ca.bind(this), this._onMouseDown = na.bind(this), this._onMouseMove = oa.bind(this), this._interceptControlDown = ha.bind(this), this._interceptControlUp = da.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
185
+ super(e, t), this.state = _.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: We.ROTATE, MIDDLE: We.DOLLY, RIGHT: We.PAN }, this.touches = { ONE: Ke.ROTATE, TWO: Ke.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new M(), this._lastQuaternion = new $e(), this._lastTargetPosition = new M(), this._quat = new $e().setFromUnitVectors(e.up, new M(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new qs(), this._sphericalDelta = new qs(), this._scale = 1, this._panOffset = new M(), 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 M(), this._mouse = new k(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = sa.bind(this), this._onPointerDown = ta.bind(this), this._onPointerUp = ia.bind(this), this._onContextMenu = Aa.bind(this), this._onMouseWheel = ra.bind(this), this._onKeyDown = aa.bind(this), this._onTouchStart = la.bind(this), this._onTouchMove = ca.bind(this), this._onMouseDown = na.bind(this), this._onMouseMove = oa.bind(this), this._interceptControlDown = ha.bind(this), this._interceptControlUp = da.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
186
186
  }
187
187
  connect(e) {
188
188
  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";
@@ -247,9 +247,9 @@ class ea extends ir {
247
247
  }
248
248
  update(e = null) {
249
249
  const t = this.object.position;
250
- U.copy(t).sub(this.target), U.applyQuaternion(this._quat), this._spherical.setFromVector3(U), this.autoRotate && this.state === _.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);
250
+ V.copy(t).sub(this.target), V.applyQuaternion(this._quat), this._spherical.setFromVector3(V), this.autoRotate && this.state === _.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);
251
251
  let s = this.minAzimuthAngle, i = this.maxAzimuthAngle;
252
- isFinite(s) && isFinite(i) && (s < -Math.PI ? s += J : s > Math.PI && (s -= J), i < -Math.PI ? i += J : i > Math.PI && (i -= J), s <= i ? this._spherical.theta = Math.max(s, Math.min(i, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (s + i) / 2 ? Math.max(s, this._spherical.theta) : Math.min(i, 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);
252
+ isFinite(s) && isFinite(i) && (s < -Math.PI ? s += W : s > Math.PI && (s -= W), i < -Math.PI ? i += W : i > Math.PI && (i -= W), s <= i ? this._spherical.theta = Math.max(s, Math.min(i, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (s + i) / 2 ? Math.max(s, this._spherical.theta) : Math.min(i, 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);
253
253
  let n = !1;
254
254
  if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera)
255
255
  this._spherical.radius = this._clampDistance(this._spherical.radius);
@@ -257,20 +257,20 @@ class ea extends ir {
257
257
  const o = this._spherical.radius;
258
258
  this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), n = o != this._spherical.radius;
259
259
  }
260
- if (U.setFromSpherical(this._spherical), U.applyQuaternion(this._quatInverse), t.copy(this.target).add(U), 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) {
260
+ if (V.setFromSpherical(this._spherical), V.applyQuaternion(this._quatInverse), t.copy(this.target).add(V), 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) {
261
261
  let o = null;
262
262
  if (this.object.isPerspectiveCamera) {
263
- const r = U.length();
263
+ const r = V.length();
264
264
  o = this._clampDistance(r * this._scale);
265
265
  const l = r - o;
266
266
  this.object.position.addScaledVector(this._dollyDirection, l), this.object.updateMatrixWorld(), n = !!l;
267
267
  } else if (this.object.isOrthographicCamera) {
268
- const r = new v(this._mouse.x, this._mouse.y, 0);
268
+ const r = new M(this._mouse.x, this._mouse.y, 0);
269
269
  r.unproject(this.object);
270
270
  const l = this.object.zoom;
271
271
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), n = l !== this.object.zoom;
272
- const c = new v(this._mouse.x, this._mouse.y, 0);
273
- c.unproject(this.object), this.object.position.sub(c).add(r), this.object.updateMatrixWorld(), o = U.length();
272
+ const c = new M(this._mouse.x, this._mouse.y, 0);
273
+ c.unproject(this.object), this.object.position.sub(c).add(r), this.object.updateMatrixWorld(), o = V.length();
274
274
  } else
275
275
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
276
276
  o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (Mt.origin.copy(this.object.position), Mt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Mt.direction)) < $r ? this.object.lookAt(this.target) : (Ri.setFromNormalAndCoplanarPoint(this.object.up, this.target), Mt.intersectPlane(Ri, this.target))));
@@ -281,7 +281,7 @@ class ea extends ir {
281
281
  return this._scale = 1, this._performCursorZoom = !1, n || this._lastPosition.distanceToSquared(this.object.position) > ps || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > ps || this._lastTargetPosition.distanceToSquared(this.target) > ps ? (this.dispatchEvent(Ti), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
282
282
  }
283
283
  _getAutoRotationAngle(e) {
284
- return e !== null ? J / 60 * this.autoRotateSpeed * e : J / 60 / 60 * this.autoRotateSpeed;
284
+ return e !== null ? W / 60 * this.autoRotateSpeed * e : W / 60 / 60 * this.autoRotateSpeed;
285
285
  }
286
286
  _getZoomScale(e) {
287
287
  const t = Math.abs(e * 0.01);
@@ -294,18 +294,18 @@ class ea extends ir {
294
294
  this._sphericalDelta.phi -= e;
295
295
  }
296
296
  _panLeft(e, t) {
297
- U.setFromMatrixColumn(t, 0), U.multiplyScalar(-e), this._panOffset.add(U);
297
+ V.setFromMatrixColumn(t, 0), V.multiplyScalar(-e), this._panOffset.add(V);
298
298
  }
299
299
  _panUp(e, t) {
300
- this.screenSpacePanning === !0 ? U.setFromMatrixColumn(t, 1) : (U.setFromMatrixColumn(t, 0), U.crossVectors(this.object.up, U)), U.multiplyScalar(e), this._panOffset.add(U);
300
+ this.screenSpacePanning === !0 ? V.setFromMatrixColumn(t, 1) : (V.setFromMatrixColumn(t, 0), V.crossVectors(this.object.up, V)), V.multiplyScalar(e), this._panOffset.add(V);
301
301
  }
302
302
  // deltaX and deltaY are in pixels; right and down are positive
303
303
  _pan(e, t) {
304
304
  const s = this.domElement;
305
305
  if (this.object.isPerspectiveCamera) {
306
306
  const i = this.object.position;
307
- U.copy(i).sub(this.target);
308
- let n = U.length();
307
+ V.copy(i).sub(this.target);
308
+ let n = V.length();
309
309
  n *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * e * n / s.clientHeight, this.object.matrix), this._panUp(2 * t * n / s.clientHeight, this.object.matrix);
310
310
  } 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);
311
311
  }
@@ -340,7 +340,7 @@ class ea extends ir {
340
340
  _handleMouseMoveRotate(e) {
341
341
  this._rotateEnd.set(e.clientX, e.clientY), this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
342
342
  const t = this.domElement;
343
- this._rotateLeft(J * this._rotateDelta.x / t.clientHeight), this._rotateUp(J * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
343
+ this._rotateLeft(W * this._rotateDelta.x / t.clientHeight), this._rotateUp(W * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
344
344
  }
345
345
  _handleMouseMoveDolly(e) {
346
346
  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();
@@ -355,16 +355,16 @@ class ea extends ir {
355
355
  let t = !1;
356
356
  switch (e.code) {
357
357
  case this.keys.UP:
358
- e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(J * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, this.keyPanSpeed), t = !0;
358
+ e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(W * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, this.keyPanSpeed), t = !0;
359
359
  break;
360
360
  case this.keys.BOTTOM:
361
- e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(-J * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, -this.keyPanSpeed), t = !0;
361
+ e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(-W * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, -this.keyPanSpeed), t = !0;
362
362
  break;
363
363
  case this.keys.LEFT:
364
- e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(J * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(this.keyPanSpeed, 0), t = !0;
364
+ e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(W * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(this.keyPanSpeed, 0), t = !0;
365
365
  break;
366
366
  case this.keys.RIGHT:
367
- e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(-J * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(-this.keyPanSpeed, 0), t = !0;
367
+ e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(-W * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(-this.keyPanSpeed, 0), t = !0;
368
368
  break;
369
369
  }
370
370
  t && (e.preventDefault(), this.update());
@@ -404,7 +404,7 @@ class ea extends ir {
404
404
  }
405
405
  this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
406
406
  const t = this.domElement;
407
- this._rotateLeft(J * this._rotateDelta.x / t.clientHeight), this._rotateUp(J * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd);
407
+ this._rotateLeft(W * this._rotateDelta.x / t.clientHeight), this._rotateUp(W * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd);
408
408
  }
409
409
  _handleTouchMovePan(e) {
410
410
  if (this._pointers.length === 1)
@@ -628,7 +628,7 @@ class ua extends yt {
628
628
  super(), this.config = e, this.camera = null, this.controls = null, this.focusAnimation = null, this.init();
629
629
  }
630
630
  init() {
631
- this.camera = new m.PerspectiveCamera(
631
+ this.camera = new f.PerspectiveCamera(
632
632
  this.config.fov || 65,
633
633
  window.innerWidth / window.innerHeight,
634
634
  this.config.near || 0.05,
@@ -676,7 +676,7 @@ class ua extends yt {
676
676
  * @since 1.0.0
677
677
  */
678
678
  frameObject(e, t) {
679
- const s = t && t.isVector3 ? t.clone() : new m.Vector3(t || 1, t || 1, t || 1), i = Math.max(s.x, 1e-3), n = Math.max(s.y, 1e-3), o = Math.max(s.z, 1e-3), r = m.MathUtils.degToRad(this.camera.fov), l = 2 * Math.atan(Math.tan(r / 2) * this.camera.aspect), c = n * 0.5 / Math.tan(r / 2), A = i * 0.5 / Math.tan(l / 2), d = Math.max(c, A) * 1.2 + o * 0.5, u = new m.Vector3(0.7, 0.5, 0.7).normalize(), g = e.clone().add(u.multiplyScalar(d));
679
+ const s = t && t.isVector3 ? t.clone() : new f.Vector3(t || 1, t || 1, t || 1), i = Math.max(s.x, 1e-3), n = Math.max(s.y, 1e-3), o = Math.max(s.z, 1e-3), r = f.MathUtils.degToRad(this.camera.fov), l = 2 * Math.atan(Math.tan(r / 2) * this.camera.aspect), c = n * 0.5 / Math.tan(r / 2), A = i * 0.5 / Math.tan(l / 2), d = Math.max(c, A) * 1.2 + o * 0.5, u = new f.Vector3(0.7, 0.5, 0.7).normalize(), g = e.clone().add(u.multiplyScalar(d));
680
680
  this.camera.position.copy(g), this.camera.lookAt(e), this.controls && (this.controls.target.copy(e), this.controls.maxDistance = Math.max(this.controls.maxDistance, d * 4), this.controls.minDistance = Math.min(this.controls.minDistance, Math.max(d * 0.02, 0.05)), this.controls.update());
681
681
  }
682
682
  /**
@@ -912,12 +912,12 @@ class Ne extends ai {
912
912
  else if (e instanceof ArrayBuffer)
913
913
  if (l.decode(new Uint8Array(e, 0, 4)) === eo) {
914
914
  try {
915
- o[D.KHR_BINARY_GLTF] = new Fa(e);
915
+ o[L.KHR_BINARY_GLTF] = new Fa(e);
916
916
  } catch (h) {
917
917
  i && i(h);
918
918
  return;
919
919
  }
920
- n = JSON.parse(o[D.KHR_BINARY_GLTF].content);
920
+ n = JSON.parse(o[L.KHR_BINARY_GLTF].content);
921
921
  } else
922
922
  n = JSON.parse(l.decode(e));
923
923
  else
@@ -943,16 +943,16 @@ class Ne extends ai {
943
943
  for (let A = 0; A < n.extensionsUsed.length; ++A) {
944
944
  const h = n.extensionsUsed[A], d = n.extensionsRequired || [];
945
945
  switch (h) {
946
- case D.KHR_MATERIALS_UNLIT:
946
+ case L.KHR_MATERIALS_UNLIT:
947
947
  o[h] = new ma();
948
948
  break;
949
- case D.KHR_DRACO_MESH_COMPRESSION:
949
+ case L.KHR_DRACO_MESH_COMPRESSION:
950
950
  o[h] = new ka(n, this.dracoLoader);
951
951
  break;
952
- case D.KHR_TEXTURE_TRANSFORM:
952
+ case L.KHR_TEXTURE_TRANSFORM:
953
953
  o[h] = new _a();
954
954
  break;
955
- case D.KHR_MESH_QUANTIZATION:
955
+ case L.KHR_MESH_QUANTIZATION:
956
956
  o[h] = new Pa();
957
957
  break;
958
958
  default:
@@ -993,7 +993,7 @@ function pa() {
993
993
  }
994
994
  };
995
995
  }
996
- const D = {
996
+ const L = {
997
997
  KHR_BINARY_GLTF: "KHR_binary_glTF",
998
998
  KHR_DRACO_MESH_COMPRESSION: "KHR_draco_mesh_compression",
999
999
  KHR_LIGHTS_PUNCTUAL: "KHR_lights_punctual",
@@ -1019,7 +1019,7 @@ const D = {
1019
1019
  };
1020
1020
  class fa {
1021
1021
  constructor(e) {
1022
- this.parser = e, this.name = D.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
1022
+ this.parser = e, this.name = L.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
1023
1023
  }
1024
1024
  _markDefs() {
1025
1025
  const e = this.parser, t = this.parser.json.nodes || [];
@@ -1065,7 +1065,7 @@ class fa {
1065
1065
  }
1066
1066
  class ma {
1067
1067
  constructor() {
1068
- this.name = D.KHR_MATERIALS_UNLIT;
1068
+ this.name = L.KHR_MATERIALS_UNLIT;
1069
1069
  }
1070
1070
  getMaterialType() {
1071
1071
  return ke;
@@ -1086,7 +1086,7 @@ class ma {
1086
1086
  }
1087
1087
  class ba {
1088
1088
  constructor(e) {
1089
- this.parser = e, this.name = D.KHR_MATERIALS_EMISSIVE_STRENGTH;
1089
+ this.parser = e, this.name = L.KHR_MATERIALS_EMISSIVE_STRENGTH;
1090
1090
  }
1091
1091
  extendMaterialParams(e, t) {
1092
1092
  const i = this.parser.json.materials[e];
@@ -1098,7 +1098,7 @@ class ba {
1098
1098
  }
1099
1099
  class Ca {
1100
1100
  constructor(e) {
1101
- this.parser = e, this.name = D.KHR_MATERIALS_CLEARCOAT;
1101
+ this.parser = e, this.name = L.KHR_MATERIALS_CLEARCOAT;
1102
1102
  }
1103
1103
  getMaterialType(e) {
1104
1104
  const s = this.parser.json.materials[e];
@@ -1118,7 +1118,7 @@ class Ca {
1118
1118
  }
1119
1119
  class Ea {
1120
1120
  constructor(e) {
1121
- this.parser = e, this.name = D.KHR_MATERIALS_DISPERSION;
1121
+ this.parser = e, this.name = L.KHR_MATERIALS_DISPERSION;
1122
1122
  }
1123
1123
  getMaterialType(e) {
1124
1124
  const s = this.parser.json.materials[e];
@@ -1134,7 +1134,7 @@ class Ea {
1134
1134
  }
1135
1135
  class ya {
1136
1136
  constructor(e) {
1137
- this.parser = e, this.name = D.KHR_MATERIALS_IRIDESCENCE;
1137
+ this.parser = e, this.name = L.KHR_MATERIALS_IRIDESCENCE;
1138
1138
  }
1139
1139
  getMaterialType(e) {
1140
1140
  const s = this.parser.json.materials[e];
@@ -1150,7 +1150,7 @@ class ya {
1150
1150
  }
1151
1151
  class Ia {
1152
1152
  constructor(e) {
1153
- this.parser = e, this.name = D.KHR_MATERIALS_SHEEN;
1153
+ this.parser = e, this.name = L.KHR_MATERIALS_SHEEN;
1154
1154
  }
1155
1155
  getMaterialType(e) {
1156
1156
  const s = this.parser.json.materials[e];
@@ -1172,7 +1172,7 @@ class Ia {
1172
1172
  }
1173
1173
  class Ba {
1174
1174
  constructor(e) {
1175
- this.parser = e, this.name = D.KHR_MATERIALS_TRANSMISSION;
1175
+ this.parser = e, this.name = L.KHR_MATERIALS_TRANSMISSION;
1176
1176
  }
1177
1177
  getMaterialType(e) {
1178
1178
  const s = this.parser.json.materials[e];
@@ -1188,7 +1188,7 @@ class Ba {
1188
1188
  }
1189
1189
  class wa {
1190
1190
  constructor(e) {
1191
- this.parser = e, this.name = D.KHR_MATERIALS_VOLUME;
1191
+ this.parser = e, this.name = L.KHR_MATERIALS_VOLUME;
1192
1192
  }
1193
1193
  getMaterialType(e) {
1194
1194
  const s = this.parser.json.materials[e];
@@ -1206,7 +1206,7 @@ class wa {
1206
1206
  }
1207
1207
  class Sa {
1208
1208
  constructor(e) {
1209
- this.parser = e, this.name = D.KHR_MATERIALS_IOR;
1209
+ this.parser = e, this.name = L.KHR_MATERIALS_IOR;
1210
1210
  }
1211
1211
  getMaterialType(e) {
1212
1212
  const s = this.parser.json.materials[e];
@@ -1222,7 +1222,7 @@ class Sa {
1222
1222
  }
1223
1223
  class va {
1224
1224
  constructor(e) {
1225
- this.parser = e, this.name = D.KHR_MATERIALS_SPECULAR;
1225
+ this.parser = e, this.name = L.KHR_MATERIALS_SPECULAR;
1226
1226
  }
1227
1227
  getMaterialType(e) {
1228
1228
  const s = this.parser.json.materials[e];
@@ -1240,7 +1240,7 @@ class va {
1240
1240
  }
1241
1241
  class Ma {
1242
1242
  constructor(e) {
1243
- this.parser = e, this.name = D.EXT_MATERIALS_BUMP;
1243
+ this.parser = e, this.name = L.EXT_MATERIALS_BUMP;
1244
1244
  }
1245
1245
  getMaterialType(e) {
1246
1246
  const s = this.parser.json.materials[e];
@@ -1256,7 +1256,7 @@ class Ma {
1256
1256
  }
1257
1257
  class xa {
1258
1258
  constructor(e) {
1259
- this.parser = e, this.name = D.KHR_MATERIALS_ANISOTROPY;
1259
+ this.parser = e, this.name = L.KHR_MATERIALS_ANISOTROPY;
1260
1260
  }
1261
1261
  getMaterialType(e) {
1262
1262
  const s = this.parser.json.materials[e];
@@ -1272,7 +1272,7 @@ class xa {
1272
1272
  }
1273
1273
  class Qa {
1274
1274
  constructor(e) {
1275
- this.parser = e, this.name = D.KHR_TEXTURE_BASISU;
1275
+ this.parser = e, this.name = L.KHR_TEXTURE_BASISU;
1276
1276
  }
1277
1277
  loadTexture(e) {
1278
1278
  const t = this.parser, s = t.json, i = s.textures[e];
@@ -1289,7 +1289,7 @@ class Qa {
1289
1289
  }
1290
1290
  class Ta {
1291
1291
  constructor(e) {
1292
- this.parser = e, this.name = D.EXT_TEXTURE_WEBP;
1292
+ this.parser = e, this.name = L.EXT_TEXTURE_WEBP;
1293
1293
  }
1294
1294
  loadTexture(e) {
1295
1295
  const t = this.name, s = this.parser, i = s.json, n = i.textures[e];
@@ -1306,7 +1306,7 @@ class Ta {
1306
1306
  }
1307
1307
  class Ra {
1308
1308
  constructor(e) {
1309
- this.parser = e, this.name = D.EXT_TEXTURE_AVIF;
1309
+ this.parser = e, this.name = L.EXT_TEXTURE_AVIF;
1310
1310
  }
1311
1311
  loadTexture(e) {
1312
1312
  const t = this.name, s = this.parser, i = s.json, n = i.textures[e];
@@ -1323,7 +1323,7 @@ class Ra {
1323
1323
  }
1324
1324
  class Da {
1325
1325
  constructor(e) {
1326
- this.name = D.EXT_MESHOPT_COMPRESSION, this.parser = e;
1326
+ this.name = L.EXT_MESHOPT_COMPRESSION, this.parser = e;
1327
1327
  }
1328
1328
  loadBufferView(e) {
1329
1329
  const t = this.parser.json, s = t.bufferViews[e];
@@ -1349,7 +1349,7 @@ class Da {
1349
1349
  }
1350
1350
  class La {
1351
1351
  constructor(e) {
1352
- this.name = D.EXT_MESH_GPU_INSTANCING, this.parser = e;
1352
+ this.name = L.EXT_MESH_GPU_INSTANCING, this.parser = e;
1353
1353
  }
1354
1354
  createNodeMesh(e) {
1355
1355
  const t = this.parser.json, s = t.nodes[e];
@@ -1365,14 +1365,14 @@ class La {
1365
1365
  return r.length < 1 ? null : (r.push(this.parser.createNodeMesh(e)), Promise.all(r).then((c) => {
1366
1366
  const A = c.pop(), h = A.isGroup ? A.children : [A], d = c[0].count, u = [];
1367
1367
  for (const g of h) {
1368
- const p = new P(), b = new v(), E = new $e(), C = new v(1, 1, 1), y = new li(g.geometry, g.material, d);
1369
- for (let f = 0; f < d; f++)
1370
- l.TRANSLATION && b.fromBufferAttribute(l.TRANSLATION, f), l.ROTATION && E.fromBufferAttribute(l.ROTATION, f), l.SCALE && C.fromBufferAttribute(l.SCALE, f), y.setMatrixAt(f, p.compose(b, E, C));
1371
- for (const f in l)
1372
- if (f === "_COLOR_0") {
1373
- const I = l[f];
1368
+ const p = new P(), b = new M(), C = new $e(), E = new M(1, 1, 1), y = new li(g.geometry, g.material, d);
1369
+ for (let m = 0; m < d; m++)
1370
+ l.TRANSLATION && b.fromBufferAttribute(l.TRANSLATION, m), l.ROTATION && C.fromBufferAttribute(l.ROTATION, m), l.SCALE && E.fromBufferAttribute(l.SCALE, m), y.setMatrixAt(m, p.compose(b, C, E));
1371
+ for (const m in l)
1372
+ if (m === "_COLOR_0") {
1373
+ const I = l[m];
1374
1374
  y.instanceColor = new lr(I.array, I.itemSize, I.normalized);
1375
- } else f !== "TRANSLATION" && f !== "ROTATION" && f !== "SCALE" && g.geometry.setAttribute(f, l[f]);
1375
+ } else m !== "TRANSLATION" && m !== "ROTATION" && m !== "SCALE" && g.geometry.setAttribute(m, l[m]);
1376
1376
  ns.prototype.copy.call(y, g), this.parser.assignFinalMaterial(y), u.push(y);
1377
1377
  }
1378
1378
  return A.isGroup ? (A.clear(), A.add(...u), A) : u[0];
@@ -1382,7 +1382,7 @@ class La {
1382
1382
  const eo = "glTF", rt = 12, Li = { JSON: 1313821514, BIN: 5130562 };
1383
1383
  class Fa {
1384
1384
  constructor(e) {
1385
- this.name = D.KHR_BINARY_GLTF, this.content = null, this.body = null;
1385
+ this.name = L.KHR_BINARY_GLTF, this.content = null, this.body = null;
1386
1386
  const t = new DataView(e, 0, rt), s = new TextDecoder();
1387
1387
  if (this.header = {
1388
1388
  magic: s.decode(new Uint8Array(e.slice(0, 4))),
@@ -1415,7 +1415,7 @@ class ka {
1415
1415
  constructor(e, t) {
1416
1416
  if (!t)
1417
1417
  throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
1418
- this.name = D.KHR_DRACO_MESH_COMPRESSION, this.json = e, this.dracoLoader = t, this.dracoLoader.preload();
1418
+ this.name = L.KHR_DRACO_MESH_COMPRESSION, this.json = e, this.dracoLoader = t, this.dracoLoader.preload();
1419
1419
  }
1420
1420
  decodePrimitive(e, t) {
1421
1421
  const s = this.json, i = this.dracoLoader, n = e.extensions[this.name].bufferView, o = e.extensions[this.name].attributes, r = {}, l = {}, c = {};
@@ -1445,7 +1445,7 @@ class ka {
1445
1445
  }
1446
1446
  class _a {
1447
1447
  constructor() {
1448
- this.name = D.KHR_TEXTURE_TRANSFORM;
1448
+ this.name = L.KHR_TEXTURE_TRANSFORM;
1449
1449
  }
1450
1450
  extendTexture(e, t) {
1451
1451
  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;
@@ -1453,7 +1453,7 @@ class _a {
1453
1453
  }
1454
1454
  class Pa {
1455
1455
  constructor() {
1456
- this.name = D.KHR_MESH_QUANTIZATION;
1456
+ this.name = L.KHR_MESH_QUANTIZATION;
1457
1457
  }
1458
1458
  }
1459
1459
  class to extends Tr {
@@ -1467,10 +1467,10 @@ class to extends Tr {
1467
1467
  return t;
1468
1468
  }
1469
1469
  interpolate_(e, t, s, i) {
1470
- const n = this.resultBuffer, o = this.sampleValues, r = this.valueSize, l = r * 2, c = r * 3, A = i - t, h = (s - t) / A, d = h * h, u = d * h, g = e * c, p = g - c, b = -2 * u + 3 * d, E = u - d, C = 1 - b, y = E - d + h;
1471
- for (let f = 0; f !== r; f++) {
1472
- const I = o[p + f + r], w = o[p + f + l] * A, B = o[g + f + r], M = o[g + f] * A;
1473
- n[f] = C * I + y * w + b * B + E * M;
1470
+ const n = this.resultBuffer, o = this.sampleValues, r = this.valueSize, l = r * 2, c = r * 3, A = i - t, h = (s - t) / A, d = h * h, u = d * h, g = e * c, p = g - c, b = -2 * u + 3 * d, C = u - d, E = 1 - b, y = C - d + h;
1471
+ for (let m = 0; m !== r; m++) {
1472
+ const I = o[p + m + r], w = o[p + m + l] * A, B = o[g + m + r], x = o[g + m] * A;
1473
+ n[m] = E * I + y * w + b * B + C * x;
1474
1474
  }
1475
1475
  return n;
1476
1476
  }
@@ -1609,7 +1609,7 @@ function Ha(a, e) {
1609
1609
  }
1610
1610
  function qa(a) {
1611
1611
  let e;
1612
- const t = a.extensions && a.extensions[D.KHR_DRACO_MESH_COMPRESSION];
1612
+ const t = a.extensions && a.extensions[L.KHR_DRACO_MESH_COMPRESSION];
1613
1613
  if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + bs(t.attributes) : e = a.indices + ":" + bs(a.attributes) + ":" + a.mode, a.targets !== void 0)
1614
1614
  for (let s = 0, i = a.targets.length; s < i; s++)
1615
1615
  e += ":" + bs(a.targets[s]);
@@ -1858,7 +1858,7 @@ class Ka {
1858
1858
  if (t.type && t.type !== "arraybuffer")
1859
1859
  throw new Error("THREE.GLTFLoader: " + t.type + " buffer type is not supported.");
1860
1860
  if (t.uri === void 0 && e === 0)
1861
- return Promise.resolve(this.extensions[D.KHR_BINARY_GLTF].body);
1861
+ return Promise.resolve(this.extensions[L.KHR_BINARY_GLTF].body);
1862
1862
  const i = this.options;
1863
1863
  return new Promise(function(n, o) {
1864
1864
  s.load(mt.resolveURL(t.uri, i.path), n, void 0, function() {
@@ -1898,17 +1898,17 @@ class Ka {
1898
1898
  const r = o[0], l = fs[i.type], c = Ze[i.componentType], A = c.BYTES_PER_ELEMENT, h = A * l, d = i.byteOffset || 0, u = i.bufferView !== void 0 ? s.bufferViews[i.bufferView].byteStride : void 0, g = i.normalized === !0;
1899
1899
  let p, b;
1900
1900
  if (u && u !== h) {
1901
- const E = Math.floor(d / u), C = "InterleavedBuffer:" + i.bufferView + ":" + i.componentType + ":" + E + ":" + i.count;
1902
- let y = t.cache.get(C);
1903
- y || (p = new c(r, E * u, i.count * u / A), y = new hr(p, u / A), t.cache.add(C, y)), b = new Fe(y, l, d % u / A, g);
1901
+ const C = Math.floor(d / u), E = "InterleavedBuffer:" + i.bufferView + ":" + i.componentType + ":" + C + ":" + i.count;
1902
+ let y = t.cache.get(E);
1903
+ y || (p = new c(r, C * u, i.count * u / A), y = new hr(p, u / A), t.cache.add(E, y)), b = new Fe(y, l, d % u / A, g);
1904
1904
  } else
1905
1905
  r === null ? p = new c(i.count * l) : p = new c(r, d, i.count * l), b = new ne(p, l, g);
1906
1906
  if (i.sparse !== void 0) {
1907
- const E = fs.SCALAR, C = Ze[i.sparse.indices.componentType], y = i.sparse.indices.byteOffset || 0, f = i.sparse.values.byteOffset || 0, I = new C(o[1], y, i.sparse.count * E), w = new c(o[2], f, i.sparse.count * l);
1907
+ const C = fs.SCALAR, E = Ze[i.sparse.indices.componentType], y = i.sparse.indices.byteOffset || 0, m = i.sparse.values.byteOffset || 0, I = new E(o[1], y, i.sparse.count * C), w = new c(o[2], m, i.sparse.count * l);
1908
1908
  r !== null && (b = new ne(b.array.slice(), b.itemSize, b.normalized)), b.normalized = !1;
1909
- for (let B = 0, M = I.length; B < M; B++) {
1910
- const S = I[B];
1911
- if (b.setX(S, w[B * l]), l >= 2 && b.setY(S, w[B * l + 1]), l >= 3 && b.setZ(S, w[B * l + 2]), l >= 4 && b.setW(S, w[B * l + 3]), l >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1909
+ for (let B = 0, x = I.length; B < x; B++) {
1910
+ const v = I[B];
1911
+ if (b.setX(v, w[B * l]), l >= 2 && b.setY(v, w[B * l + 1]), l >= 3 && b.setZ(v, w[B * l + 2]), l >= 4 && b.setW(v, w[B * l + 3]), l >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1912
1912
  }
1913
1913
  b.normalized = g;
1914
1914
  }
@@ -1987,11 +1987,11 @@ class Ka {
1987
1987
  const n = this;
1988
1988
  return this.getDependency("texture", s.index).then(function(o) {
1989
1989
  if (!o) return null;
1990
- if (s.texCoord !== void 0 && s.texCoord > 0 && (o = o.clone(), o.channel = s.texCoord), n.extensions[D.KHR_TEXTURE_TRANSFORM]) {
1991
- const r = s.extensions !== void 0 ? s.extensions[D.KHR_TEXTURE_TRANSFORM] : void 0;
1990
+ if (s.texCoord !== void 0 && s.texCoord > 0 && (o = o.clone(), o.channel = s.texCoord), n.extensions[L.KHR_TEXTURE_TRANSFORM]) {
1991
+ const r = s.extensions !== void 0 ? s.extensions[L.KHR_TEXTURE_TRANSFORM] : void 0;
1992
1992
  if (r) {
1993
1993
  const l = n.associations.get(o);
1994
- o = n.extensions[D.KHR_TEXTURE_TRANSFORM].extendTexture(o, r), n.associations.set(o, l);
1994
+ o = n.extensions[L.KHR_TEXTURE_TRANSFORM].extendTexture(o, r), n.associations.set(o, l);
1995
1995
  }
1996
1996
  }
1997
1997
  return i !== void 0 && (o.colorSpace = i), e[t] = o, o;
@@ -2042,8 +2042,8 @@ class Ka {
2042
2042
  const t = this, s = this.json, i = this.extensions, n = s.materials[e];
2043
2043
  let o;
2044
2044
  const r = {}, l = n.extensions || {}, c = [];
2045
- if (l[D.KHR_MATERIALS_UNLIT]) {
2046
- const h = i[D.KHR_MATERIALS_UNLIT];
2045
+ if (l[L.KHR_MATERIALS_UNLIT]) {
2046
+ const h = i[L.KHR_MATERIALS_UNLIT];
2047
2047
  o = h.getMaterialType(), c.push(h.extendParams(r, n, t));
2048
2048
  } else {
2049
2049
  const h = n.pbrMetallicRoughness || {};
@@ -2095,7 +2095,7 @@ class Ka {
2095
2095
  loadGeometries(e) {
2096
2096
  const t = this, s = this.extensions, i = this.primitiveCache;
2097
2097
  function n(r) {
2098
- return s[D.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(r, t).then(function(l) {
2098
+ return s[L.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(r, t).then(function(l) {
2099
2099
  return _i(l, r, t);
2100
2100
  });
2101
2101
  }
@@ -2106,7 +2106,7 @@ class Ka {
2106
2106
  o.push(h.promise);
2107
2107
  else {
2108
2108
  let d;
2109
- c.extensions && c.extensions[D.KHR_DRACO_MESH_COMPRESSION] ? d = n(c) : d = _i(new rs(), c, t), i[A] = { primitive: c, promise: d }, o.push(d);
2109
+ c.extensions && c.extensions[L.KHR_DRACO_MESH_COMPRESSION] ? d = n(c) : d = _i(new rs(), c, t), i[A] = { primitive: c, promise: d }, o.push(d);
2110
2110
  }
2111
2111
  }
2112
2112
  return Promise.all(o);
@@ -2128,21 +2128,21 @@ class Ka {
2128
2128
  const c = l.slice(0, l.length - 1), A = l[l.length - 1], h = [];
2129
2129
  for (let u = 0, g = A.length; u < g; u++) {
2130
2130
  const p = A[u], b = o[u];
2131
- let E;
2132
- const C = c[u];
2131
+ let C;
2132
+ const E = c[u];
2133
2133
  if (b.mode === ie.TRIANGLES || b.mode === ie.TRIANGLE_STRIP || b.mode === ie.TRIANGLE_FAN || b.mode === void 0)
2134
- E = n.isSkinnedMesh === !0 ? new Er(p, C) : new as(p, C), E.isSkinnedMesh === !0 && E.normalizeSkinWeights(), b.mode === ie.TRIANGLE_STRIP ? E.geometry = Di(E.geometry, Gn) : b.mode === ie.TRIANGLE_FAN && (E.geometry = Di(E.geometry, zs));
2134
+ C = n.isSkinnedMesh === !0 ? new Er(p, E) : new as(p, E), C.isSkinnedMesh === !0 && C.normalizeSkinWeights(), b.mode === ie.TRIANGLE_STRIP ? C.geometry = Di(C.geometry, Gn) : b.mode === ie.TRIANGLE_FAN && (C.geometry = Di(C.geometry, zs));
2135
2135
  else if (b.mode === ie.LINES)
2136
- E = new yr(p, C);
2136
+ C = new yr(p, E);
2137
2137
  else if (b.mode === ie.LINE_STRIP)
2138
- E = new Ir(p, C);
2138
+ C = new Ir(p, E);
2139
2139
  else if (b.mode === ie.LINE_LOOP)
2140
- E = new Br(p, C);
2140
+ C = new Br(p, E);
2141
2141
  else if (b.mode === ie.POINTS)
2142
- E = new Vn(p, C);
2142
+ C = new Vn(p, E);
2143
2143
  else
2144
2144
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + b.mode);
2145
- Object.keys(E.geometry.morphAttributes).length > 0 && Ha(E, n), E.name = t.createUniqueName(n.name || "mesh_" + e), be(E, n), b.extensions && Re(i, E, b), t.assignFinalMaterial(E), h.push(E);
2145
+ Object.keys(C.geometry.morphAttributes).length > 0 && Ha(C, n), C.name = t.createUniqueName(n.name || "mesh_" + e), be(C, n), b.extensions && Re(i, C, b), t.assignFinalMaterial(C), h.push(C);
2146
2146
  }
2147
2147
  for (let u = 0, g = h.length; u < g; u++)
2148
2148
  t.associations.set(h[u], {
@@ -2209,8 +2209,8 @@ class Ka {
2209
2209
  loadAnimation(e) {
2210
2210
  const t = this.json, s = this, i = t.animations[e], n = i.name ? i.name : "animation_" + e, o = [], r = [], l = [], c = [], A = [];
2211
2211
  for (let h = 0, d = i.channels.length; h < d; h++) {
2212
- const u = i.channels[h], g = i.samplers[u.sampler], p = u.target, b = p.node, E = i.parameters !== void 0 ? i.parameters[g.input] : g.input, C = i.parameters !== void 0 ? i.parameters[g.output] : g.output;
2213
- p.node !== void 0 && (o.push(this.getDependency("node", b)), r.push(this.getDependency("accessor", E)), l.push(this.getDependency("accessor", C)), c.push(g), A.push(p));
2212
+ const u = i.channels[h], g = i.samplers[u.sampler], p = u.target, b = p.node, C = i.parameters !== void 0 ? i.parameters[g.input] : g.input, E = i.parameters !== void 0 ? i.parameters[g.output] : g.output;
2213
+ p.node !== void 0 && (o.push(this.getDependency("node", b)), r.push(this.getDependency("accessor", C)), l.push(this.getDependency("accessor", E)), c.push(g), A.push(p));
2214
2214
  }
2215
2215
  return Promise.all([
2216
2216
  Promise.all(o),
@@ -2219,17 +2219,17 @@ class Ka {
2219
2219
  Promise.all(c),
2220
2220
  Promise.all(A)
2221
2221
  ]).then(function(h) {
2222
- const d = h[0], u = h[1], g = h[2], p = h[3], b = h[4], E = [];
2223
- for (let C = 0, y = d.length; C < y; C++) {
2224
- const f = d[C], I = u[C], w = g[C], B = p[C], M = b[C];
2225
- if (f === void 0) continue;
2226
- f.updateMatrix && f.updateMatrix();
2227
- const S = s._createAnimationTracks(f, I, w, B, M);
2228
- if (S)
2229
- for (let x = 0; x < S.length; x++)
2230
- E.push(S[x]);
2231
- }
2232
- return new vr(n, void 0, E);
2222
+ const d = h[0], u = h[1], g = h[2], p = h[3], b = h[4], C = [];
2223
+ for (let E = 0, y = d.length; E < y; E++) {
2224
+ const m = d[E], I = u[E], w = g[E], B = p[E], x = b[E];
2225
+ if (m === void 0) continue;
2226
+ m.updateMatrix && m.updateMatrix();
2227
+ const v = s._createAnimationTracks(m, I, w, B, x);
2228
+ if (v)
2229
+ for (let S = 0; S < v.length; S++)
2230
+ C.push(v[S]);
2231
+ }
2232
+ return new vr(n, void 0, C);
2233
2233
  });
2234
2234
  }
2235
2235
  createNodeMesh(e) {
@@ -2396,8 +2396,8 @@ function Ya(a, e, t) {
2396
2396
  const r = t.json.accessors[s.POSITION], l = r.min, c = r.max;
2397
2397
  if (l !== void 0 && c !== void 0) {
2398
2398
  if (i.set(
2399
- new v(l[0], l[1], l[2]),
2400
- new v(c[0], c[1], c[2])
2399
+ new M(l[0], l[1], l[2]),
2400
+ new M(c[0], c[1], c[2])
2401
2401
  ), r.normalized) {
2402
2402
  const A = $s(Ze[r.componentType]);
2403
2403
  i.min.multiplyScalar(A), i.max.multiplyScalar(A);
@@ -2410,7 +2410,7 @@ function Ya(a, e, t) {
2410
2410
  return;
2411
2411
  const n = e.targets;
2412
2412
  if (n !== void 0) {
2413
- const r = new v(), l = new v();
2413
+ const r = new M(), l = new M();
2414
2414
  for (let c = 0, A = n.length; c < A; c++) {
2415
2415
  const h = n[c];
2416
2416
  if (h.POSITION !== void 0) {
@@ -2679,16 +2679,16 @@ function Ja() {
2679
2679
  throw new Error("THREE.DRACOLoader: Decoding failed: " + u.error_msg());
2680
2680
  const p = { index: null, attributes: [] };
2681
2681
  for (const b in A) {
2682
- const E = self[h[b]];
2683
- let C, y;
2682
+ const C = self[h[b]];
2683
+ let E, y;
2684
2684
  if (c.useUniqueIDs)
2685
- y = A[b], C = r.GetAttributeByUniqueId(d, y);
2685
+ y = A[b], E = r.GetAttributeByUniqueId(d, y);
2686
2686
  else {
2687
2687
  if (y = r.GetAttributeId(d, o[A[b]]), y === -1) continue;
2688
- C = r.GetAttribute(d, y);
2688
+ E = r.GetAttribute(d, y);
2689
2689
  }
2690
- const f = i(o, r, d, b, E, C);
2691
- b === "color" && (f.vertexColorSpace = c.vertexColorSpace), p.attributes.push(f);
2690
+ const m = i(o, r, d, b, C, E);
2691
+ b === "color" && (m.vertexColorSpace = c.vertexColorSpace), p.attributes.push(m);
2692
2692
  }
2693
2693
  return g === o.TRIANGULAR_MESH && (p.index = s(o, r, d)), o.destroy(d), p;
2694
2694
  }
@@ -2699,12 +2699,12 @@ function Ja() {
2699
2699
  return o._free(d), { array: u, itemSize: 1 };
2700
2700
  }
2701
2701
  function i(o, r, l, c, A, h) {
2702
- const d = h.num_components(), g = l.num_points() * d, p = g * A.BYTES_PER_ELEMENT, b = n(o, A), E = o._malloc(p);
2703
- r.GetAttributeDataArrayForAllPoints(l, h, b, p, E);
2704
- const C = new A(o.HEAPF32.buffer, E, g).slice();
2705
- return o._free(E), {
2702
+ const d = h.num_components(), g = l.num_points() * d, p = g * A.BYTES_PER_ELEMENT, b = n(o, A), C = o._malloc(p);
2703
+ r.GetAttributeDataArrayForAllPoints(l, h, b, p, C);
2704
+ const E = new A(o.HEAPF32.buffer, C, g).slice();
2705
+ return o._free(C), {
2706
2706
  name: c,
2707
- array: C,
2707
+ array: E,
2708
2708
  itemSize: d
2709
2709
  };
2710
2710
  }
@@ -2838,39 +2838,39 @@ class at {
2838
2838
  return i < e && this._offset++, new Uint8Array(this._dataView.buffer, this._dataView.byteOffset + s, i);
2839
2839
  }
2840
2840
  }
2841
- const K = [171, 75, 84, 88, 32, 50, 48, 187, 13, 10, 26, 10];
2841
+ const Y = [171, 75, 84, 88, 32, 50, 48, 187, 13, 10, 26, 10];
2842
2842
  function Ui(a) {
2843
2843
  return new TextDecoder().decode(a);
2844
2844
  }
2845
2845
  function fl(a) {
2846
- const e = new Uint8Array(a.buffer, a.byteOffset, K.length);
2847
- if (e[0] !== K[0] || e[1] !== K[1] || e[2] !== K[2] || e[3] !== K[3] || e[4] !== K[4] || e[5] !== K[5] || e[6] !== K[6] || e[7] !== K[7] || e[8] !== K[8] || e[9] !== K[9] || e[10] !== K[10] || e[11] !== K[11]) throw new Error("Missing KTX 2.0 identifier.");
2848
- const t = new pl(), s = 17 * Uint32Array.BYTES_PER_ELEMENT, i = new at(a, K.length, s, !0);
2846
+ const e = new Uint8Array(a.buffer, a.byteOffset, Y.length);
2847
+ if (e[0] !== Y[0] || e[1] !== Y[1] || e[2] !== Y[2] || e[3] !== Y[3] || e[4] !== Y[4] || e[5] !== Y[5] || e[6] !== Y[6] || e[7] !== Y[7] || e[8] !== Y[8] || e[9] !== Y[9] || e[10] !== Y[10] || e[11] !== Y[11]) throw new Error("Missing KTX 2.0 identifier.");
2848
+ const t = new pl(), s = 17 * Uint32Array.BYTES_PER_ELEMENT, i = new at(a, Y.length, s, !0);
2849
2849
  t.vkFormat = i._nextUint32(), t.typeSize = i._nextUint32(), t.pixelWidth = i._nextUint32(), t.pixelHeight = i._nextUint32(), t.pixelDepth = i._nextUint32(), t.layerCount = i._nextUint32(), t.faceCount = i._nextUint32();
2850
2850
  const n = i._nextUint32();
2851
2851
  t.supercompressionScheme = i._nextUint32();
2852
- const o = i._nextUint32(), r = i._nextUint32(), l = i._nextUint32(), c = i._nextUint32(), A = i._nextUint64(), h = i._nextUint64(), d = new at(a, K.length + s, 3 * n * 8, !0);
2852
+ const o = i._nextUint32(), r = i._nextUint32(), l = i._nextUint32(), c = i._nextUint32(), A = i._nextUint64(), h = i._nextUint64(), d = new at(a, Y.length + s, 3 * n * 8, !0);
2853
2853
  for (let F = 0; F < n; F++) t.levels.push({ levelData: new Uint8Array(a.buffer, a.byteOffset + d._nextUint64(), d._nextUint64()), uncompressedByteLength: d._nextUint64() });
2854
2854
  const u = new at(a, o, r, !0), g = { vendorId: u._skip(4)._nextUint16(), descriptorType: u._nextUint16(), versionNumber: u._nextUint16(), descriptorBlockSize: u._nextUint16(), colorModel: u._nextUint8(), colorPrimaries: u._nextUint8(), transferFunction: u._nextUint8(), flags: u._nextUint8(), texelBlockDimension: [u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8()], bytesPlane: [u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8()], samples: [] }, p = (g.descriptorBlockSize / 4 - 6) / 4;
2855
2855
  for (let F = 0; F < p; F++) {
2856
- const j = { bitOffset: u._nextUint16(), bitLength: u._nextUint8(), channelType: u._nextUint8(), samplePosition: [u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8()], sampleLower: -1 / 0, sampleUpper: 1 / 0 };
2857
- 64 & j.channelType ? (j.sampleLower = u._nextInt32(), j.sampleUpper = u._nextInt32()) : (j.sampleLower = u._nextUint32(), j.sampleUpper = u._nextUint32()), g.samples[F] = j;
2856
+ const O = { bitOffset: u._nextUint16(), bitLength: u._nextUint8(), channelType: u._nextUint8(), samplePosition: [u._nextUint8(), u._nextUint8(), u._nextUint8(), u._nextUint8()], sampleLower: -1 / 0, sampleUpper: 1 / 0 };
2857
+ 64 & O.channelType ? (O.sampleLower = u._nextInt32(), O.sampleUpper = u._nextInt32()) : (O.sampleLower = u._nextUint32(), O.sampleUpper = u._nextUint32()), g.samples[F] = O;
2858
2858
  }
2859
2859
  t.dataFormatDescriptor.length = 0, t.dataFormatDescriptor.push(g);
2860
2860
  const b = new at(a, l, c, !0);
2861
2861
  for (; b._offset < c; ) {
2862
- const F = b._nextUint32(), j = b._scan(F), ye = Ui(j);
2863
- if (t.keyValue[ye] = b._nextUint8Array(F - j.byteLength - 1), ye.match(/^ktx/i)) {
2862
+ const F = b._nextUint32(), O = b._scan(F), ye = Ui(O);
2863
+ if (t.keyValue[ye] = b._nextUint8Array(F - O.byteLength - 1), ye.match(/^ktx/i)) {
2864
2864
  const ot = Ui(t.keyValue[ye]);
2865
2865
  t.keyValue[ye] = ot.substring(0, ot.lastIndexOf("\0"));
2866
2866
  }
2867
2867
  b._skip(F % 4 ? 4 - F % 4 : 0);
2868
2868
  }
2869
2869
  if (h <= 0) return t;
2870
- const E = new at(a, A, h, !0), C = E._nextUint16(), y = E._nextUint16(), f = E._nextUint32(), I = E._nextUint32(), w = E._nextUint32(), B = E._nextUint32(), M = [];
2871
- for (let F = 0; F < n; F++) M.push({ imageFlags: E._nextUint32(), rgbSliceByteOffset: E._nextUint32(), rgbSliceByteLength: E._nextUint32(), alphaSliceByteOffset: E._nextUint32(), alphaSliceByteLength: E._nextUint32() });
2872
- const S = A + E._offset, x = S + f, R = x + I, L = R + w, q = new Uint8Array(a.buffer, a.byteOffset + S, f), Q = new Uint8Array(a.buffer, a.byteOffset + x, I), te = new Uint8Array(a.buffer, a.byteOffset + R, w), z = new Uint8Array(a.buffer, a.byteOffset + L, B);
2873
- return t.globalData = { endpointCount: C, selectorCount: y, imageDescs: M, endpointsData: q, selectorsData: Q, tablesData: te, extendedData: z }, t;
2870
+ const C = new at(a, A, h, !0), E = C._nextUint16(), y = C._nextUint16(), m = C._nextUint32(), I = C._nextUint32(), w = C._nextUint32(), B = C._nextUint32(), x = [];
2871
+ for (let F = 0; F < n; F++) x.push({ imageFlags: C._nextUint32(), rgbSliceByteOffset: C._nextUint32(), rgbSliceByteLength: C._nextUint32(), alphaSliceByteOffset: C._nextUint32(), alphaSliceByteLength: C._nextUint32() });
2872
+ const v = A + C._offset, S = v + m, Q = S + I, D = Q + w, G = new Uint8Array(a.buffer, a.byteOffset + v, m), T = new Uint8Array(a.buffer, a.byteOffset + S, I), K = new Uint8Array(a.buffer, a.byteOffset + Q, w), U = new Uint8Array(a.buffer, a.byteOffset + D, B);
2873
+ return t.globalData = { endpointCount: E, selectorCount: y, imageDescs: x, endpointsData: G, selectorsData: T, tablesData: K, extendedData: U }, t;
2874
2874
  }
2875
2875
  let Es, me, ei;
2876
2876
  const ys = { env: { emscripten_notify_memory_growth: function(a) {
@@ -2893,7 +2893,7 @@ let ml = class {
2893
2893
  };
2894
2894
  const Ni = "AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8L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CACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGU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IARQ0AIAAoAgAiA0EBcQ0AIAAgA0EBcjYCACADQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAai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AXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAIN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CAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqI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AEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiO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AAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ", bl = "display-p3", Cl = "display-p3-linear", Is = /* @__PURE__ */ new WeakMap();
2895
2895
  let Bs = 0, ws;
2896
- class ee extends ai {
2896
+ class te extends ai {
2897
2897
  /**
2898
2898
  * Constructs a new KTX2 loader.
2899
2899
  *
@@ -2979,12 +2979,12 @@ class ee extends ai {
2979
2979
  s.setPath(this.transcoderPath), s.setResponseType("arraybuffer"), s.setWithCredentials(this.withCredentials);
2980
2980
  const i = s.loadAsync("basis_transcoder.wasm");
2981
2981
  this.transcoderPending = Promise.all([t, i]).then(([n, o]) => {
2982
- const r = ee.BasisWorker.toString(), l = [
2982
+ const r = te.BasisWorker.toString(), l = [
2983
2983
  "/* constants */",
2984
- "let _EngineFormat = " + JSON.stringify(ee.EngineFormat),
2985
- "let _EngineType = " + JSON.stringify(ee.EngineType),
2986
- "let _TranscoderFormat = " + JSON.stringify(ee.TranscoderFormat),
2987
- "let _BasisFormat = " + JSON.stringify(ee.BasisFormat),
2984
+ "let _EngineFormat = " + JSON.stringify(te.EngineFormat),
2985
+ "let _EngineType = " + JSON.stringify(te.EngineType),
2986
+ "let _TranscoderFormat = " + JSON.stringify(te.TranscoderFormat),
2987
+ "let _BasisFormat = " + JSON.stringify(te.BasisFormat),
2988
2988
  "/* basis_transcoder.js */",
2989
2989
  n,
2990
2990
  "/* worker */",
@@ -3066,12 +3066,12 @@ class ee extends ai {
3066
3066
  this.workerPool.dispose(), this.workerSourceURL && URL.revokeObjectURL(this.workerSourceURL), Bs--;
3067
3067
  }
3068
3068
  }
3069
- ee.BasisFormat = {
3069
+ te.BasisFormat = {
3070
3070
  ETC1S: 0,
3071
3071
  UASTC: 1,
3072
3072
  UASTC_HDR: 2
3073
3073
  };
3074
- ee.TranscoderFormat = {
3074
+ te.TranscoderFormat = {
3075
3075
  ETC1: 0,
3076
3076
  ETC2: 1,
3077
3077
  BC1: 2,
@@ -3093,7 +3093,7 @@ ee.TranscoderFormat = {
3093
3093
  RGB_HALF: 24,
3094
3094
  RGBA_HALF: 25
3095
3095
  };
3096
- ee.EngineFormat = {
3096
+ te.EngineFormat = {
3097
3097
  RGBAFormat: Ye,
3098
3098
  RGBA_ASTC_4x4_Format: jt,
3099
3099
  RGB_BPTC_UNSIGNED_Format: Pr,
@@ -3106,12 +3106,12 @@ ee.EngineFormat = {
3106
3106
  RGB_PVRTC_4BPPV1_Format: Fr,
3107
3107
  RGBA_S3TC_DXT1_Format: Ws
3108
3108
  };
3109
- ee.EngineType = {
3109
+ te.EngineType = {
3110
3110
  UnsignedByteType: re,
3111
3111
  HalfFloatType: Je,
3112
3112
  FloatType: bt
3113
3113
  };
3114
- ee.BasisWorker = function() {
3114
+ te.BasisWorker = function() {
3115
3115
  let a, e, t;
3116
3116
  const s = _EngineFormat, i = _EngineType, n = _TranscoderFormat, o = _BasisFormat;
3117
3117
  self.addEventListener("message", function(g) {
@@ -3123,8 +3123,8 @@ ee.BasisWorker = function() {
3123
3123
  case "transcode":
3124
3124
  e.then(() => {
3125
3125
  try {
3126
- const { faces: b, buffers: E, width: C, height: y, hasAlpha: f, format: I, type: w, dfdFlags: B } = l(p.buffer);
3127
- self.postMessage({ type: "transcode", id: p.id, data: { faces: b, width: C, height: y, hasAlpha: f, format: I, type: w, dfdFlags: B } }, E);
3126
+ const { faces: b, buffers: C, width: E, height: y, hasAlpha: m, format: I, type: w, dfdFlags: B } = l(p.buffer);
3127
+ self.postMessage({ type: "transcode", id: p.id, data: { faces: b, width: E, height: y, hasAlpha: m, format: I, type: w, dfdFlags: B } }, C);
3128
3128
  } catch (b) {
3129
3129
  console.error(b), self.postMessage({ type: "error", id: p.id, error: b.message });
3130
3130
  }
@@ -3146,41 +3146,41 @@ ee.BasisWorker = function() {
3146
3146
  }
3147
3147
  if (!p.isValid())
3148
3148
  throw b(), new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");
3149
- let E;
3149
+ let C;
3150
3150
  if (p.isUASTC())
3151
- E = o.UASTC;
3151
+ C = o.UASTC;
3152
3152
  else if (p.isETC1S())
3153
- E = o.ETC1S;
3153
+ C = o.ETC1S;
3154
3154
  else if (p.isHDR())
3155
- E = o.UASTC_HDR;
3155
+ C = o.UASTC_HDR;
3156
3156
  else
3157
3157
  throw new Error("THREE.KTX2Loader: Unknown Basis encoding");
3158
- const C = p.getWidth(), y = p.getHeight(), f = p.getLayers() || 1, I = p.getLevels(), w = p.getFaces(), B = p.getHasAlpha(), M = p.getDFDFlags(), { transcoderFormat: S, engineFormat: x, engineType: R } = h(E, C, y, B);
3159
- if (!C || !y || !I)
3158
+ const E = p.getWidth(), y = p.getHeight(), m = p.getLayers() || 1, I = p.getLevels(), w = p.getFaces(), B = p.getHasAlpha(), x = p.getDFDFlags(), { transcoderFormat: v, engineFormat: S, engineType: Q } = h(C, E, y, B);
3159
+ if (!E || !y || !I)
3160
3160
  throw b(), new Error("THREE.KTX2Loader: Invalid texture");
3161
3161
  if (!p.startTranscoding())
3162
3162
  throw b(), new Error("THREE.KTX2Loader: .startTranscoding failed");
3163
- const L = [], q = [];
3164
- for (let Q = 0; Q < w; Q++) {
3165
- const te = [];
3166
- for (let z = 0; z < I; z++) {
3163
+ const D = [], G = [];
3164
+ for (let T = 0; T < w; T++) {
3165
+ const K = [];
3166
+ for (let U = 0; U < I; U++) {
3167
3167
  const F = [];
3168
- let j, ye;
3169
- for (let Ve = 0; Ve < f; Ve++) {
3170
- const Oe = p.getImageLevelInfo(z, Ve, Q);
3171
- Q === 0 && z === 0 && Ve === 0 && (Oe.origWidth % 4 !== 0 || Oe.origHeight % 4 !== 0) && console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."), I > 1 ? (j = Oe.origWidth, ye = Oe.origHeight) : (j = Oe.width, ye = Oe.height);
3172
- let He = new Uint8Array(p.getImageTranscodedSizeInBytes(z, Ve, 0, S));
3173
- const sr = p.transcodeImage(He, z, Ve, Q, S, 0, -1, -1);
3174
- if (R === i.HalfFloatType && (He = new Uint16Array(He.buffer, He.byteOffset, He.byteLength / Uint16Array.BYTES_PER_ELEMENT)), !sr)
3168
+ let O, ye;
3169
+ for (let Ve = 0; Ve < m; Ve++) {
3170
+ const Oe = p.getImageLevelInfo(U, Ve, T);
3171
+ T === 0 && U === 0 && Ve === 0 && (Oe.origWidth % 4 !== 0 || Oe.origHeight % 4 !== 0) && console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."), I > 1 ? (O = Oe.origWidth, ye = Oe.origHeight) : (O = Oe.width, ye = Oe.height);
3172
+ let He = new Uint8Array(p.getImageTranscodedSizeInBytes(U, Ve, 0, v));
3173
+ const sr = p.transcodeImage(He, U, Ve, T, v, 0, -1, -1);
3174
+ if (Q === i.HalfFloatType && (He = new Uint16Array(He.buffer, He.byteOffset, He.byteLength / Uint16Array.BYTES_PER_ELEMENT)), !sr)
3175
3175
  throw b(), new Error("THREE.KTX2Loader: .transcodeImage failed.");
3176
3176
  F.push(He);
3177
3177
  }
3178
3178
  const ot = u(F);
3179
- te.push({ data: ot, width: j, height: ye }), q.push(ot.buffer);
3179
+ K.push({ data: ot, width: O, height: ye }), G.push(ot.buffer);
3180
3180
  }
3181
- L.push({ mipmaps: te, width: C, height: y, format: x, type: R });
3181
+ D.push({ mipmaps: K, width: E, height: y, format: S, type: Q });
3182
3182
  }
3183
- return b(), { faces: L, buffers: q, width: C, height: y, hasAlpha: B, dfdFlags: M, format: x, type: R };
3183
+ return b(), { faces: D, buffers: G, width: E, height: y, hasAlpha: B, dfdFlags: x, format: S, type: Q };
3184
3184
  }
3185
3185
  const c = [
3186
3186
  {
@@ -3279,12 +3279,12 @@ ee.BasisWorker = function() {
3279
3279
  [o.UASTC]: c.filter((g) => g.basisFormat.includes(o.UASTC)).sort((g, p) => g.priorityUASTC - p.priorityUASTC),
3280
3280
  [o.UASTC_HDR]: c.filter((g) => g.basisFormat.includes(o.UASTC_HDR)).sort((g, p) => g.priorityHDR - p.priorityHDR)
3281
3281
  };
3282
- function h(g, p, b, E) {
3283
- const C = A[g];
3284
- for (let y = 0; y < C.length; y++) {
3285
- const f = C[y];
3286
- if (f.if && !a[f.if] || !f.basisFormat.includes(g) || E && f.transcoderFormat.length < 2 || f.needsPowerOfTwo && !(d(p) && d(b))) continue;
3287
- const I = f.transcoderFormat[E ? 1 : 0], w = f.engineFormat[E ? 1 : 0], B = f.engineType[0];
3282
+ function h(g, p, b, C) {
3283
+ const E = A[g];
3284
+ for (let y = 0; y < E.length; y++) {
3285
+ const m = E[y];
3286
+ if (m.if && !a[m.if] || !m.basisFormat.includes(g) || C && m.transcoderFormat.length < 2 || m.needsPowerOfTwo && !(d(p) && d(b))) continue;
3287
+ const I = m.transcoderFormat[C ? 1 : 0], w = m.engineFormat[C ? 1 : 0], B = m.engineType[0];
3288
3288
  return { transcoderFormat: I, engineFormat: w, engineType: B };
3289
3289
  }
3290
3290
  throw new Error("THREE.KTX2Loader: Failed to identify transcoding target.");
@@ -3295,15 +3295,15 @@ ee.BasisWorker = function() {
3295
3295
  function u(g) {
3296
3296
  if (g.length === 1) return g[0];
3297
3297
  let p = 0;
3298
- for (let C = 0; C < g.length; C++) {
3299
- const y = g[C];
3298
+ for (let E = 0; E < g.length; E++) {
3299
+ const y = g[E];
3300
3300
  p += y.byteLength;
3301
3301
  }
3302
3302
  const b = new Uint8Array(p);
3303
- let E = 0;
3304
- for (let C = 0; C < g.length; C++) {
3305
- const y = g[C];
3306
- b.set(y, E), E += y.byteLength;
3303
+ let C = 0;
3304
+ for (let E = 0; E < g.length; E++) {
3305
+ const y = g[E];
3306
+ b.set(y, C), C += y.byteLength;
3307
3307
  }
3308
3308
  return b;
3309
3309
  }
@@ -3524,24 +3524,24 @@ var Il = function() {
3524
3524
  return {
3525
3525
  supported: !1
3526
3526
  };
3527
- var i = WebAssembly.validate(t) ? r(e) : r(a), n, o = WebAssembly.instantiate(i, {}).then(function(E) {
3528
- n = E.instance, n.exports.__wasm_call_ctors();
3527
+ var i = WebAssembly.validate(t) ? r(e) : r(a), n, o = WebAssembly.instantiate(i, {}).then(function(C) {
3528
+ n = C.instance, n.exports.__wasm_call_ctors();
3529
3529
  });
3530
- function r(E) {
3531
- for (var C = new Uint8Array(E.length), y = 0; y < E.length; ++y) {
3532
- var f = E.charCodeAt(y);
3533
- C[y] = f > 96 ? f - 97 : f > 64 ? f - 39 : f + 4;
3534
- }
3535
- for (var I = 0, y = 0; y < E.length; ++y)
3536
- C[I++] = C[y] < 60 ? s[C[y]] : (C[y] - 60) * 64 + C[++y];
3537
- return C.buffer.slice(0, I);
3538
- }
3539
- function l(E, C, y, f, I, w, B) {
3540
- var M = E.exports.sbrk, S = f + 3 & -4, x = M(S * I), R = M(w.length), L = new Uint8Array(E.exports.memory.buffer);
3541
- L.set(w, R);
3542
- var q = C(x, f, I, R, w.length);
3543
- if (q == 0 && B && B(x, S, I), y.set(L.subarray(x, x + f * I)), M(x - M(0)), q != 0)
3544
- throw new Error("Malformed buffer data: " + q);
3530
+ function r(C) {
3531
+ for (var E = new Uint8Array(C.length), y = 0; y < C.length; ++y) {
3532
+ var m = C.charCodeAt(y);
3533
+ E[y] = m > 96 ? m - 97 : m > 64 ? m - 39 : m + 4;
3534
+ }
3535
+ for (var I = 0, y = 0; y < C.length; ++y)
3536
+ E[I++] = E[y] < 60 ? s[E[y]] : (E[y] - 60) * 64 + E[++y];
3537
+ return E.buffer.slice(0, I);
3538
+ }
3539
+ function l(C, E, y, m, I, w, B) {
3540
+ var x = C.exports.sbrk, v = m + 3 & -4, S = x(v * I), Q = x(w.length), D = new Uint8Array(C.exports.memory.buffer);
3541
+ D.set(w, Q);
3542
+ var G = E(S, m, I, Q, w.length);
3543
+ if (G == 0 && B && B(S, v, I), y.set(D.subarray(S, S + m * I)), x(S - x(0)), G != 0)
3544
+ throw new Error("Malformed buffer data: " + G);
3545
3545
  }
3546
3546
  var c = {
3547
3547
  NONE: "",
@@ -3553,67 +3553,67 @@ var Il = function() {
3553
3553
  TRIANGLES: "meshopt_decodeIndexBuffer",
3554
3554
  INDICES: "meshopt_decodeIndexSequence"
3555
3555
  }, h = [], d = 0;
3556
- function u(E) {
3557
- var C = {
3558
- object: new Worker(E),
3556
+ function u(C) {
3557
+ var E = {
3558
+ object: new Worker(C),
3559
3559
  pending: 0,
3560
3560
  requests: {}
3561
3561
  };
3562
- return C.object.onmessage = function(y) {
3563
- var f = y.data;
3564
- C.pending -= f.count, C.requests[f.id][f.action](f.value), delete C.requests[f.id];
3565
- }, C;
3566
- }
3567
- function g(E) {
3568
- for (var C = "self.ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(i) + "]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = " + b.name + ";" + l.toString() + b.toString(), y = new Blob([C], { type: "text/javascript" }), f = URL.createObjectURL(y), I = h.length; I < E; ++I)
3569
- h[I] = u(f);
3570
- for (var I = E; I < h.length; ++I)
3562
+ return E.object.onmessage = function(y) {
3563
+ var m = y.data;
3564
+ E.pending -= m.count, E.requests[m.id][m.action](m.value), delete E.requests[m.id];
3565
+ }, E;
3566
+ }
3567
+ function g(C) {
3568
+ for (var E = "self.ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(i) + "]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = " + b.name + ";" + l.toString() + b.toString(), y = new Blob([E], { type: "text/javascript" }), m = URL.createObjectURL(y), I = h.length; I < C; ++I)
3569
+ h[I] = u(m);
3570
+ for (var I = C; I < h.length; ++I)
3571
3571
  h[I].object.postMessage({});
3572
- h.length = E, URL.revokeObjectURL(f);
3572
+ h.length = C, URL.revokeObjectURL(m);
3573
3573
  }
3574
- function p(E, C, y, f, I) {
3574
+ function p(C, E, y, m, I) {
3575
3575
  for (var w = h[0], B = 1; B < h.length; ++B)
3576
3576
  h[B].pending < w.pending && (w = h[B]);
3577
- return new Promise(function(M, S) {
3578
- var x = new Uint8Array(y), R = ++d;
3579
- w.pending += E, w.requests[R] = { resolve: M, reject: S }, w.object.postMessage({ id: R, count: E, size: C, source: x, mode: f, filter: I }, [x.buffer]);
3577
+ return new Promise(function(x, v) {
3578
+ var S = new Uint8Array(y), Q = ++d;
3579
+ w.pending += C, w.requests[Q] = { resolve: x, reject: v }, w.object.postMessage({ id: Q, count: C, size: E, source: S, mode: m, filter: I }, [S.buffer]);
3580
3580
  });
3581
3581
  }
3582
- function b(E) {
3583
- var C = E.data;
3584
- if (!C.id)
3582
+ function b(C) {
3583
+ var E = C.data;
3584
+ if (!E.id)
3585
3585
  return self.close();
3586
3586
  self.ready.then(function(y) {
3587
3587
  try {
3588
- var f = new Uint8Array(C.count * C.size);
3589
- l(y, y.exports[C.mode], f, C.count, C.size, C.source, y.exports[C.filter]), self.postMessage({ id: C.id, count: C.count, action: "resolve", value: f }, [f.buffer]);
3588
+ var m = new Uint8Array(E.count * E.size);
3589
+ l(y, y.exports[E.mode], m, E.count, E.size, E.source, y.exports[E.filter]), self.postMessage({ id: E.id, count: E.count, action: "resolve", value: m }, [m.buffer]);
3590
3590
  } catch (I) {
3591
- self.postMessage({ id: C.id, count: C.count, action: "reject", value: I });
3591
+ self.postMessage({ id: E.id, count: E.count, action: "reject", value: I });
3592
3592
  }
3593
3593
  });
3594
3594
  }
3595
3595
  return {
3596
3596
  ready: o,
3597
3597
  supported: !0,
3598
- useWorkers: function(E) {
3599
- g(E);
3598
+ useWorkers: function(C) {
3599
+ g(C);
3600
3600
  },
3601
- decodeVertexBuffer: function(E, C, y, f, I) {
3602
- l(n, n.exports.meshopt_decodeVertexBuffer, E, C, y, f, n.exports[c[I]]);
3601
+ decodeVertexBuffer: function(C, E, y, m, I) {
3602
+ l(n, n.exports.meshopt_decodeVertexBuffer, C, E, y, m, n.exports[c[I]]);
3603
3603
  },
3604
- decodeIndexBuffer: function(E, C, y, f) {
3605
- l(n, n.exports.meshopt_decodeIndexBuffer, E, C, y, f);
3604
+ decodeIndexBuffer: function(C, E, y, m) {
3605
+ l(n, n.exports.meshopt_decodeIndexBuffer, C, E, y, m);
3606
3606
  },
3607
- decodeIndexSequence: function(E, C, y, f) {
3608
- l(n, n.exports.meshopt_decodeIndexSequence, E, C, y, f);
3607
+ decodeIndexSequence: function(C, E, y, m) {
3608
+ l(n, n.exports.meshopt_decodeIndexSequence, C, E, y, m);
3609
3609
  },
3610
- decodeGltfBuffer: function(E, C, y, f, I, w) {
3611
- l(n, n.exports[A[I]], E, C, y, f, n.exports[c[w]]);
3610
+ decodeGltfBuffer: function(C, E, y, m, I, w) {
3611
+ l(n, n.exports[A[I]], C, E, y, m, n.exports[c[w]]);
3612
3612
  },
3613
- decodeGltfBufferAsync: function(E, C, y, f, I) {
3614
- return h.length > 0 ? p(E, C, y, A[f], c[I]) : o.then(function() {
3615
- var w = new Uint8Array(E * C);
3616
- return l(n, n.exports[A[f]], w, E, C, y, n.exports[c[I]]), w;
3613
+ decodeGltfBufferAsync: function(C, E, y, m, I) {
3614
+ return h.length > 0 ? p(C, E, y, A[m], c[I]) : o.then(function() {
3615
+ var w = new Uint8Array(C * E);
3616
+ return l(n, n.exports[A[m]], w, C, E, y, n.exports[c[I]]), w;
3617
3617
  });
3618
3618
  }
3619
3619
  };
@@ -3633,29 +3633,29 @@ function Ms(a) {
3633
3633
  });
3634
3634
  }
3635
3635
  function wl() {
3636
- m.Cache && typeof m.Cache.clear == "function" && m.Cache.clear();
3636
+ f.Cache && typeof f.Cache.clear == "function" && f.Cache.clear();
3637
3637
  }
3638
- class $ {
3638
+ class ee {
3639
3639
  constructor(e = null) {
3640
- this.renderer = e, this.isIOSWebKit = $.isIOSWebKit(), this.platformKey = $.getPlatformKey(), this.loader = new Ne(), this.dracoLoader = new so(), this.ktx2Loader = null, this.loadQueue = Promise.resolve(), this.activeIOSLoad = !1, this.dracoLoader.setDecoderPath("https://www.gstatic.com/draco/versioned/decoders/1.5.6/"), this.isIOSWebKit && typeof this.dracoLoader.setWorkerLimit == "function" && this.dracoLoader.setWorkerLimit(1), this.loader.setDRACOLoader(this.dracoLoader), this.loader.setMeshoptDecoder(Il), this.loader.register((t) => ({
3640
+ this.renderer = e, this.isIOSWebKit = ee.isIOSWebKit(), this.platformKey = ee.getPlatformKey(), this.loader = new Ne(), this.dracoLoader = new so(), this.ktx2Loader = null, this.loadQueue = Promise.resolve(), this.activeIOSLoad = !1, this.dracoLoader.setDecoderPath("https://www.gstatic.com/draco/versioned/decoders/1.5.6/"), this.isIOSWebKit && typeof this.dracoLoader.setWorkerLimit == "function" && this.dracoLoader.setWorkerLimit(1), this.loader.setDRACOLoader(this.dracoLoader), this.loader.setMeshoptDecoder(Il), this.loader.register((t) => ({
3641
3641
  name: "KHR_materials_pbrSpecularGlossiness",
3642
3642
  extendMaterialParams: async (s, i) => {
3643
3643
  const n = t.json.materials[s];
3644
3644
  if (!n.extensions || !n.extensions.KHR_materials_pbrSpecularGlossiness)
3645
3645
  return Promise.resolve();
3646
3646
  const o = n.extensions.KHR_materials_pbrSpecularGlossiness;
3647
- return o.diffuseTexture !== void 0 && (i.map = await t.getDependency("texture", o.diffuseTexture.index)), o.diffuseFactor !== void 0 && (i.color = new m.Color().fromArray(o.diffuseFactor)), o.glossinessFactor !== void 0 && (i.roughness = 1 - o.glossinessFactor), i.metalness = 0, Promise.resolve();
3647
+ return o.diffuseTexture !== void 0 && (i.map = await t.getDependency("texture", o.diffuseTexture.index)), o.diffuseFactor !== void 0 && (i.color = new f.Color().fromArray(o.diffuseFactor)), o.glossinessFactor !== void 0 && (i.roughness = 1 - o.glossinessFactor), i.metalness = 0, Promise.resolve();
3648
3648
  }
3649
3649
  })), this.cache = /* @__PURE__ */ new Map(), this.ktx2SetupComplete = !1, this.setupKTX2Loader();
3650
3650
  }
3651
3651
  setupKTX2Loader() {
3652
3652
  const e = this.platformKey;
3653
3653
  try {
3654
- if (!$.sharedKTX2Loaders.has(e)) {
3655
- const t = new ee();
3656
- t.setTranscoderPath("https://cdn.jsdelivr.net/npm/three@0.177.0/examples/jsm/libs/basis/"), this.isIOSWebKit && typeof t.setWorkerLimit == "function" && t.setWorkerLimit(1), $.sharedKTX2Loaders.set(e, t), $.sharedKTX2SetupComplete.set(e, !1);
3654
+ if (!ee.sharedKTX2Loaders.has(e)) {
3655
+ const t = new te();
3656
+ t.setTranscoderPath("https://cdn.jsdelivr.net/npm/three@0.177.0/examples/jsm/libs/basis/"), this.isIOSWebKit && typeof t.setWorkerLimit == "function" && t.setWorkerLimit(1), ee.sharedKTX2Loaders.set(e, t), ee.sharedKTX2SetupComplete.set(e, !1);
3657
3657
  }
3658
- this.ktx2Loader = $.sharedKTX2Loaders.get(e), this.loader.setKTX2Loader(this.ktx2Loader), this.ktx2SetupComplete = $.sharedKTX2SetupComplete.get(e) || !1, this.renderer && !this.ktx2SetupComplete && this.ensureKTX2Support();
3658
+ this.ktx2Loader = ee.sharedKTX2Loaders.get(e), this.loader.setKTX2Loader(this.ktx2Loader), this.ktx2SetupComplete = ee.sharedKTX2SetupComplete.get(e) || !1, this.renderer && !this.ktx2SetupComplete && this.ensureKTX2Support();
3659
3659
  } catch (t) {
3660
3660
  console.warn("KTX2 loader setup failed, falling back to standard textures:", t), this.ktx2Loader = null;
3661
3661
  }
@@ -3664,12 +3664,12 @@ class $ {
3664
3664
  if (!this.ktx2Loader || !this.renderer)
3665
3665
  return;
3666
3666
  const e = this.platformKey;
3667
- if ($.sharedKTX2SetupComplete.get(e)) {
3667
+ if (ee.sharedKTX2SetupComplete.get(e)) {
3668
3668
  this.ktx2SetupComplete = !0;
3669
3669
  return;
3670
3670
  }
3671
3671
  try {
3672
- this.ktx2Loader.detectSupport(this.renderer), $.sharedKTX2SetupComplete.set(e, !0), this.ktx2SetupComplete = !0;
3672
+ this.ktx2Loader.detectSupport(this.renderer), ee.sharedKTX2SetupComplete.set(e, !0), this.ktx2SetupComplete = !0;
3673
3673
  } catch (t) {
3674
3674
  console.warn("Failed to set up KTX2 loader with renderer:", t);
3675
3675
  }
@@ -3730,10 +3730,10 @@ class $ {
3730
3730
  const o = Array.isArray(n.material) ? n.material : [n.material];
3731
3731
  o.forEach((r, l) => {
3732
3732
  if (r.emissive && r.emissive.setHex(0), r.emissiveIntensity !== void 0 && (r.emissiveIntensity = 0), r.emissiveMap && (r.emissiveMap = null), r.lightMap && (r.lightMap = null), r.lightMapIntensity !== void 0 && (r.lightMapIntensity = 0), r.type === "MeshBasicMaterial" || r.type === "MeshPhongMaterial") {
3733
- const A = new m.MeshStandardMaterial({
3733
+ const A = new f.MeshStandardMaterial({
3734
3734
  // Only include common, safe params; set specialized textures conditionally below
3735
- color: r.color || new m.Color(16777215),
3736
- side: r.side !== void 0 ? r.side : m.FrontSide,
3735
+ color: r.color || new f.Color(16777215),
3736
+ side: r.side !== void 0 ? r.side : f.FrontSide,
3737
3737
  wireframe: r.wireframe || !1,
3738
3738
  vertexColors: r.vertexColors || !1,
3739
3739
  fog: r.fog !== void 0 ? r.fog : !0,
@@ -3744,18 +3744,18 @@ class $ {
3744
3744
  metalness: 0.3
3745
3745
  // Mix of metal and non-metal
3746
3746
  });
3747
- r.map && (A.map = r.map), r.alphaMap && (A.alphaMap = r.alphaMap), r.aoMap && (A.aoMap = r.aoMap), typeof r.aoMapIntensity == "number" && (A.aoMapIntensity = r.aoMapIntensity), r.envMap && (A.envMap = r.envMap), r.roughnessMap && (A.roughnessMap = r.roughnessMap), r.metalnessMap && (A.metalnessMap = r.metalnessMap), r.transparent !== void 0 && (A.transparent = r.transparent), typeof r.opacity == "number" && (A.opacity = r.opacity), r.normalMap && (A.normalMap = r.normalMap, A.normalScale = r.normalScale || new m.Vector2(1, 1)), s !== null && ["map", "normalMap", "roughnessMap", "metalnessMap", "aoMap"].forEach((d) => {
3748
- A[d] && (A[d].anisotropy = s, A[d].needsUpdate = !0);
3747
+ r.map && (A.map = r.map), r.alphaMap && (A.alphaMap = r.alphaMap), r.aoMap && (A.aoMap = r.aoMap), typeof r.aoMapIntensity == "number" && (A.aoMapIntensity = r.aoMapIntensity), r.envMap && (A.envMap = r.envMap), r.roughnessMap && (A.roughnessMap = r.roughnessMap), r.metalnessMap && (A.metalnessMap = r.metalnessMap), r.transparent !== void 0 && (A.transparent = r.transparent), typeof r.opacity == "number" && (A.opacity = r.opacity), r.normalMap && (A.normalMap = r.normalMap, A.normalScale = r.normalScale || new f.Vector2(1, 1)), ["map", "normalMap", "roughnessMap", "metalnessMap", "aoMap"].forEach((d) => {
3748
+ A[d] && this.processTexture(A[d], s, { disableMipmaps: d === "map" });
3749
3749
  }), A.needsUpdate = !0, Array.isArray(n.material) ? n.material[l] = A : n.material = A, r !== A && typeof r?.dispose == "function" && r.dispose();
3750
- } else (r.type === "MeshStandardMaterial" || r.type === "MeshPhysicalMaterial") && (s !== null && ["map", "normalMap", "roughnessMap", "metalnessMap", "aoMap", "emissiveMap"].forEach((h) => {
3751
- r[h] && (r[h].anisotropy = s, r[h].needsUpdate = !0);
3750
+ } else (r.type === "MeshStandardMaterial" || r.type === "MeshPhysicalMaterial") && (["map", "normalMap", "roughnessMap", "metalnessMap", "aoMap", "emissiveMap"].forEach((h) => {
3751
+ r[h] && this.processTexture(r[h], s, { disableMipmaps: h === "map" });
3752
3752
  }), r.needsUpdate = !0);
3753
3753
  const c = Array.isArray(n.material) ? n.material[l] : n.material;
3754
3754
  c && c.needsUpdate !== void 0 && (c.needsUpdate = !0);
3755
- }), n.geometry && (n.geometry.computeVertexNormals(), n.geometry.normalizeNormals(), o.some((l) => l.normalMap) && n.geometry.computeTangents());
3755
+ }), n.geometry && (n.geometry.attributes?.normal || n.geometry.computeVertexNormals(), n.geometry.normalizeNormals(), o.some((l) => l.normalMap) && this.canComputeTangents(n.geometry) && n.geometry.computeTangents());
3756
3756
  }
3757
3757
  });
3758
- const i = new m.Box3().setFromObject(t);
3758
+ const i = new f.Box3().setFromObject(t);
3759
3759
  return t.userData.boundingBox = i, t;
3760
3760
  }
3761
3761
  getMaxAnisotropy() {
@@ -3767,6 +3767,12 @@ class $ {
3767
3767
  processMaterial(e) {
3768
3768
  e && e.needsUpdate !== void 0 && (e.needsUpdate = !0);
3769
3769
  }
3770
+ processTexture(e, t = null, { disableMipmaps: s = !1 } = {}) {
3771
+ e && (t !== null && (e.anisotropy = t), s && !e.isCompressedTexture && Array.isArray(e.mipmaps) && e.mipmaps.length === 0 && (e.generateMipmaps = !1, e.minFilter = f.LinearFilter), e.needsUpdate = !0);
3772
+ }
3773
+ canComputeTangents(e) {
3774
+ return !!(e?.index && e.attributes?.position && e.attributes?.normal && e.attributes?.uv);
3775
+ }
3770
3776
  releaseFromCache(e) {
3771
3777
  if (!this.cache.has(e))
3772
3778
  return;
@@ -3833,11 +3839,11 @@ class $ {
3833
3839
  return !!(/iPhone|iPad|iPod/.test(t) || t === "MacIntel" && navigator.maxTouchPoints > 1 || /AppleWebKit/.test(e) && /Mobile/.test(e) && !/Chrome|CriOS|FxiOS/.test(e));
3834
3840
  }
3835
3841
  static getPlatformKey() {
3836
- return $.isIOSWebKit() ? "ios" : "default";
3842
+ return ee.isIOSWebKit() ? "ios" : "default";
3837
3843
  }
3838
3844
  }
3839
- $.sharedKTX2Loaders = /* @__PURE__ */ new Map();
3840
- $.sharedKTX2SetupComplete = /* @__PURE__ */ new Map();
3845
+ ee.sharedKTX2Loaders = /* @__PURE__ */ new Map();
3846
+ ee.sharedKTX2SetupComplete = /* @__PURE__ */ new Map();
3841
3847
  let Sl = class {
3842
3848
  get unloadPriorityCallback() {
3843
3849
  return this._unloadPriorityCallback;
@@ -3919,36 +3925,36 @@ let Sl = class {
3919
3925
  minBytesSize: A,
3920
3926
  maxBytesSize: h
3921
3927
  } = this, d = i.length - o.size, u = i.length - r.size, g = Math.max(Math.min(i.length - t, d), 0), p = this.cachedBytes - A, b = this.unloadPriorityCallback || this.defaultPriorityCallback;
3922
- let E = !1;
3923
- const C = g > 0 && d > 0 || u && i.length > s;
3924
- if (d && this.cachedBytes > A || u && this.cachedBytes > h || C) {
3925
- i.sort((S, x) => {
3926
- const R = o.has(S), L = o.has(x);
3927
- if (R === L) {
3928
- const q = r.has(S), Q = r.has(x);
3929
- return q === Q ? -b(S, x) : q ? 1 : -1;
3928
+ let C = !1;
3929
+ const E = g > 0 && d > 0 || u && i.length > s;
3930
+ if (d && this.cachedBytes > A || u && this.cachedBytes > h || E) {
3931
+ i.sort((v, S) => {
3932
+ const Q = o.has(v), D = o.has(S);
3933
+ if (Q === D) {
3934
+ const G = r.has(v), T = r.has(S);
3935
+ return G === T ? -b(v, S) : G ? 1 : -1;
3930
3936
  } else
3931
- return R ? 1 : -1;
3937
+ return Q ? 1 : -1;
3932
3938
  });
3933
- const y = Math.max(t * e, g * e), f = Math.ceil(Math.min(y, d, g)), I = Math.max(e * p, e * A), w = Math.min(I, p);
3934
- let B = 0, M = 0;
3935
- for (; this.cachedBytes - M > h || i.length - B > s; ) {
3936
- const S = i[B], x = c.get(S) || 0;
3937
- if (o.has(S) && r.has(S) || this.cachedBytes - M - x < h && i.length - B <= s)
3939
+ const y = Math.max(t * e, g * e), m = Math.ceil(Math.min(y, d, g)), I = Math.max(e * p, e * A), w = Math.min(I, p);
3940
+ let B = 0, x = 0;
3941
+ for (; this.cachedBytes - x > h || i.length - B > s; ) {
3942
+ const v = i[B], S = c.get(v) || 0;
3943
+ if (o.has(v) && r.has(v) || this.cachedBytes - x - S < h && i.length - B <= s)
3938
3944
  break;
3939
- M += x, B++;
3945
+ x += S, B++;
3940
3946
  }
3941
- for (; M < w || B < f; ) {
3942
- const S = i[B], x = c.get(S) || 0;
3943
- if (o.has(S) || this.cachedBytes - M - x < A && B >= f)
3947
+ for (; x < w || B < m; ) {
3948
+ const v = i[B], S = c.get(v) || 0;
3949
+ if (o.has(v) || this.cachedBytes - x - S < A && B >= m)
3944
3950
  break;
3945
- M += x, B++;
3951
+ x += S, B++;
3946
3952
  }
3947
- i.splice(0, B).forEach((S) => {
3948
- this.cachedBytes -= c.get(S) || 0, l.get(S)(S), c.delete(S), n.delete(S), l.delete(S), r.delete(S), o.delete(S);
3949
- }), E = B < g || M < p && B < d, E = E && B > 0;
3953
+ i.splice(0, B).forEach((v) => {
3954
+ this.cachedBytes -= c.get(v) || 0, l.get(v)(v), c.delete(v), n.delete(v), l.delete(v), r.delete(v), o.delete(v);
3955
+ }), C = B < g || x < p && B < d, C = C && B > 0;
3950
3956
  }
3951
- E && (this.unloadingHandle = requestAnimationFrame(() => this.scheduleUnload()));
3957
+ C && (this.unloadingHandle = requestAnimationFrame(() => this.scheduleUnload()));
3952
3958
  }
3953
3959
  scheduleUnload() {
3954
3960
  cancelAnimationFrame(this.unloadingHandle), this.scheduled || (this.scheduled = !0, queueMicrotask(() => {
@@ -4940,12 +4946,12 @@ let Gl = class extends It {
4940
4946
  0,
4941
4947
  l,
4942
4948
  c
4943
- ), b = u + l + c, E = new Uint8Array(e, b, n - b);
4949
+ ), b = u + l + c, C = new Uint8Array(e, b, n - b);
4944
4950
  return {
4945
4951
  version: i,
4946
4952
  featureTable: d,
4947
4953
  batchTable: p,
4948
- glbBytes: E
4954
+ glbBytes: C
4949
4955
  };
4950
4956
  }
4951
4957
  }, Ul = class extends It {
@@ -4973,13 +4979,13 @@ let Gl = class extends It {
4973
4979
  0,
4974
4980
  l,
4975
4981
  c
4976
- ), E = g + l + c, C = new Uint8Array(e, E, n - E);
4977
- let y = null, f = null, I = null;
4982
+ ), C = g + l + c, E = new Uint8Array(e, C, n - C);
4983
+ let y = null, m = null, I = null;
4978
4984
  if (A)
4979
- y = C, f = Promise.resolve();
4985
+ y = E, m = Promise.resolve();
4980
4986
  else {
4981
- const w = this.resolveExternalURL(di(C));
4982
- I = ui(w), f = fetch(w, this.fetchOptions).then((B) => {
4987
+ const w = this.resolveExternalURL(di(E));
4988
+ I = ui(w), m = fetch(w, this.fetchOptions).then((B) => {
4983
4989
  if (!B.ok)
4984
4990
  throw new Error(`I3DMLoaderBase : Failed to load file "${w}" with status ${B.status} : ${B.statusText}`);
4985
4991
  return B.arrayBuffer();
@@ -4987,7 +4993,7 @@ let Gl = class extends It {
4987
4993
  y = new Uint8Array(B);
4988
4994
  });
4989
4995
  }
4990
- return f.then(() => ({
4996
+ return m.then(() => ({
4991
4997
  version: i,
4992
4998
  featureTable: u,
4993
4999
  batchTable: b,
@@ -5058,10 +5064,10 @@ function Ol(a) {
5058
5064
  function Hl(a) {
5059
5065
  return -a + Math.PI / 2;
5060
5066
  }
5061
- const ji = /* @__PURE__ */ new qs(), Se = /* @__PURE__ */ new v(), W = /* @__PURE__ */ new v(), Rs = /* @__PURE__ */ new v(), se = /* @__PURE__ */ new P(), ce = /* @__PURE__ */ new P(), Ki = /* @__PURE__ */ new P(), Ds = /* @__PURE__ */ new Et(), X = /* @__PURE__ */ new Yn(), Yi = /* @__PURE__ */ new v(), Ji = /* @__PURE__ */ new v(), Wi = /* @__PURE__ */ new v(), De = /* @__PURE__ */ new v(), Dt = /* @__PURE__ */ new is(), ql = 1e-12, zl = 0.1, Lt = 0, Xi = 1, Ft = 2;
5067
+ const ji = /* @__PURE__ */ new qs(), Se = /* @__PURE__ */ new M(), X = /* @__PURE__ */ new M(), Rs = /* @__PURE__ */ new M(), se = /* @__PURE__ */ new P(), ce = /* @__PURE__ */ new P(), Ki = /* @__PURE__ */ new P(), Ds = /* @__PURE__ */ new Et(), Z = /* @__PURE__ */ new Yn(), Yi = /* @__PURE__ */ new M(), Ji = /* @__PURE__ */ new M(), Wi = /* @__PURE__ */ new M(), De = /* @__PURE__ */ new M(), Dt = /* @__PURE__ */ new is(), ql = 1e-12, zl = 0.1, Lt = 0, Xi = 1, Ft = 2;
5062
5068
  let Po = class {
5063
5069
  constructor(e = 1, t = 1, s = 1) {
5064
- this.name = "", this.radius = new v(e, t, s);
5070
+ this.name = "", this.radius = new M(e, t, s);
5065
5071
  }
5066
5072
  intersectRay(e, t) {
5067
5073
  return se.makeScale(...this.radius).invert(), Ds.center.set(0, 0, 0), Ds.radius = 1, Dt.copy(e).applyMatrix4(se), Dt.intersectSphere(Ds, t) ? (se.makeScale(...this.radius), t.applyMatrix4(se), t) : null;
@@ -5081,10 +5087,10 @@ let Po = class {
5081
5087
  // OBJECT_FRAME: oriented such that "+Y" is up and "+Z" is forward.
5082
5088
  // CAMERA_FRAME: oriented such that "+Y" is up and "-Z" is forward.
5083
5089
  getObjectFrame(e, t, s, i, n, o, r, l = Ft) {
5084
- return this.getEastNorthUpFrame(e, t, s, se), X.set(n, o, -i, "ZXY"), r.makeRotationFromEuler(X).premultiply(se), l === Xi ? (X.set(Math.PI / 2, 0, 0, "XYZ"), ce.makeRotationFromEuler(X), r.multiply(ce)) : l === Ft && (X.set(-Math.PI / 2, 0, Math.PI, "XYZ"), ce.makeRotationFromEuler(X), r.multiply(ce)), r;
5090
+ return this.getEastNorthUpFrame(e, t, s, se), Z.set(n, o, -i, "ZXY"), r.makeRotationFromEuler(Z).premultiply(se), l === Xi ? (Z.set(Math.PI / 2, 0, 0, "XYZ"), ce.makeRotationFromEuler(Z), r.multiply(ce)) : l === Ft && (Z.set(-Math.PI / 2, 0, Math.PI, "XYZ"), ce.makeRotationFromEuler(Z), r.multiply(ce)), r;
5085
5091
  }
5086
5092
  getCartographicFromObjectFrame(e, t, s = Ft) {
5087
- return s === Xi ? (X.set(-Math.PI / 2, 0, 0, "XYZ"), ce.makeRotationFromEuler(X).premultiply(e)) : s === Ft ? (X.set(-Math.PI / 2, 0, Math.PI, "XYZ"), ce.makeRotationFromEuler(X).premultiply(e)) : ce.copy(e), De.setFromMatrixPosition(ce), this.getPositionToCartographic(De, t), this.getEastNorthUpFrame(t.lat, t.lon, 0, se).invert(), ce.premultiply(se), X.setFromRotationMatrix(ce, "ZXY"), t.azimuth = -X.z, t.elevation = X.x, t.roll = X.y, t;
5093
+ return s === Xi ? (Z.set(-Math.PI / 2, 0, 0, "XYZ"), ce.makeRotationFromEuler(Z).premultiply(e)) : s === Ft ? (Z.set(-Math.PI / 2, 0, Math.PI, "XYZ"), ce.makeRotationFromEuler(Z).premultiply(e)) : ce.copy(e), De.setFromMatrixPosition(ce), this.getPositionToCartographic(De, t), this.getEastNorthUpFrame(t.lat, t.lon, 0, se).invert(), ce.premultiply(se), Z.setFromRotationMatrix(ce, "ZXY"), t.azimuth = -Z.z, t.elevation = Z.x, t.roll = Z.y, t;
5088
5094
  }
5089
5095
  getEastNorthUpAxes(e, t, s, i, n, o = De) {
5090
5096
  this.getCartographicToPosition(e, t, 0, o), this.getCartographicToNormal(e, t, n), s.set(-o.y, o.x, 0).normalize(), i.crossVectors(n, s).normalize();
@@ -5104,13 +5110,13 @@ let Po = class {
5104
5110
  getCartographicToPosition(e, t, s, i) {
5105
5111
  this.getCartographicToNormal(e, t, Se);
5106
5112
  const n = this.radius;
5107
- W.copy(Se), W.x *= n.x ** 2, W.y *= n.y ** 2, W.z *= n.z ** 2;
5108
- const o = Math.sqrt(Se.dot(W));
5109
- return W.divideScalar(o), i.copy(W).addScaledVector(Se, s);
5113
+ X.copy(Se), X.x *= n.x ** 2, X.y *= n.y ** 2, X.z *= n.z ** 2;
5114
+ const o = Math.sqrt(Se.dot(X));
5115
+ return X.divideScalar(o), i.copy(X).addScaledVector(Se, s);
5110
5116
  }
5111
5117
  getPositionToCartographic(e, t) {
5112
- this.getPositionToSurfacePoint(e, W), this.getPositionToNormal(e, Se);
5113
- const s = Rs.subVectors(e, W);
5118
+ this.getPositionToSurfacePoint(e, X), this.getPositionToNormal(e, Se);
5119
+ const s = Rs.subVectors(e, X);
5114
5120
  return t.lon = Math.atan2(Se.y, Se.x), t.lat = Math.asin(Se.z), t.height = Math.sign(s.dot(e)) * s.length(), t;
5115
5121
  }
5116
5122
  getCartographicToNormal(e, t, s) {
@@ -5121,7 +5127,7 @@ let Po = class {
5121
5127
  return t.copy(e), t.x /= s.x ** 2, t.y /= s.y ** 2, t.z /= s.z ** 2, t.normalize(), t;
5122
5128
  }
5123
5129
  getPositionToSurfacePoint(e, t) {
5124
- const s = this.radius, i = 1 / s.x ** 2, n = 1 / s.y ** 2, o = 1 / s.z ** 2, r = e.x * e.x * i, l = e.y * e.y * n, c = e.z * e.z * o, A = r + l + c, h = Math.sqrt(1 / A), d = W.copy(e).multiplyScalar(h);
5130
+ const s = this.radius, i = 1 / s.x ** 2, n = 1 / s.y ** 2, o = 1 / s.z ** 2, r = e.x * e.x * i, l = e.y * e.y * n, c = e.z * e.z * o, A = r + l + c, h = Math.sqrt(1 / A), d = X.copy(e).multiplyScalar(h);
5125
5131
  if (A < zl)
5126
5132
  return isFinite(h) ? t.copy(d) : null;
5127
5133
  const u = Rs.set(
@@ -5129,16 +5135,16 @@ let Po = class {
5129
5135
  d.y * n * 2,
5130
5136
  d.z * o * 2
5131
5137
  );
5132
- let g = (1 - h) * e.length() / (0.5 * u.length()), p = 0, b, E, C, y, f, I, w, B, M, S, x;
5138
+ let g = (1 - h) * e.length() / (0.5 * u.length()), p = 0, b, C, E, y, m, I, w, B, x, v, S;
5133
5139
  do {
5134
- g -= p, C = 1 / (1 + g * i), y = 1 / (1 + g * n), f = 1 / (1 + g * o), I = C * C, w = y * y, B = f * f, M = I * C, S = w * y, x = B * f, b = r * I + l * w + c * B - 1, E = r * M * i + l * S * n + c * x * o;
5135
- const R = -2 * E;
5136
- p = b / R;
5140
+ g -= p, E = 1 / (1 + g * i), y = 1 / (1 + g * n), m = 1 / (1 + g * o), I = E * E, w = y * y, B = m * m, x = I * E, v = w * y, S = B * m, b = r * I + l * w + c * B - 1, C = r * x * i + l * v * n + c * S * o;
5141
+ const Q = -2 * C;
5142
+ p = b / Q;
5137
5143
  } while (Math.abs(b) > ql);
5138
5144
  return t.set(
5139
- e.x * C,
5145
+ e.x * E,
5140
5146
  e.y * y,
5141
- e.z * f
5147
+ e.z * m
5142
5148
  );
5143
5149
  }
5144
5150
  calculateHorizonDistance(e, t) {
@@ -5150,14 +5156,14 @@ let Po = class {
5150
5156
  return t / Math.sqrt(1 - s * n);
5151
5157
  }
5152
5158
  getPositionElevation(e) {
5153
- this.getPositionToSurfacePoint(e, W);
5154
- const t = Rs.subVectors(e, W);
5159
+ this.getPositionToSurfacePoint(e, X);
5160
+ const t = Rs.subVectors(e, X);
5155
5161
  return Math.sign(t.dot(e)) * t.length();
5156
5162
  }
5157
5163
  // Returns an estimate of the closest point on the ellipsoid to the ray. Returns
5158
5164
  // the surface intersection if they collide.
5159
5165
  closestPointToRayEstimate(e, t) {
5160
- return this.intersectRay(e, t) ? t : (se.makeScale(...this.radius).invert(), Dt.copy(e).applyMatrix4(se), W.set(0, 0, 0), Dt.closestPointToPoint(W, t).normalize(), se.makeScale(...this.radius), t.applyMatrix4(se));
5166
+ return this.intersectRay(e, t) ? t : (se.makeScale(...this.radius).invert(), Dt.copy(e).applyMatrix4(se), X.set(0, 0, 0), Dt.closestPointToPoint(X, t).normalize(), se.makeScale(...this.radius), t.applyMatrix4(se));
5161
5167
  }
5162
5168
  copy(e) {
5163
5169
  return this.radius.copy(e.radius), this;
@@ -5168,10 +5174,10 @@ let Po = class {
5168
5174
  };
5169
5175
  const ds = new Po(Oi, Oi, vl);
5170
5176
  ds.name = "WGS84 Earth";
5171
- const kt = /* @__PURE__ */ new v(), _t = /* @__PURE__ */ new v(), Z = /* @__PURE__ */ new v(), Pt = /* @__PURE__ */ new is();
5177
+ const kt = /* @__PURE__ */ new M(), _t = /* @__PURE__ */ new M(), $ = /* @__PURE__ */ new M(), Pt = /* @__PURE__ */ new is();
5172
5178
  let Zi = class {
5173
5179
  constructor(e = new it(), t = new P()) {
5174
- this.box = e.clone(), this.transform = t.clone(), this.inverseTransform = new P(), this.points = new Array(8).fill().map(() => new v()), this.planes = new Array(6).fill().map(() => new Pn());
5180
+ this.box = e.clone(), this.transform = t.clone(), this.inverseTransform = new P(), this.points = new Array(8).fill().map(() => new M()), this.planes = new Array(6).fill().map(() => new Pn());
5175
5181
  }
5176
5182
  copy(e) {
5177
5183
  return this.box.copy(e.box), this.transform.copy(e.transform), this.update(), this;
@@ -5195,10 +5201,10 @@ let Zi = class {
5195
5201
  * @returns {number}
5196
5202
  */
5197
5203
  distanceToPoint(e) {
5198
- return this.clampPoint(e, Z).distanceTo(e);
5204
+ return this.clampPoint(e, $).distanceTo(e);
5199
5205
  }
5200
5206
  containsPoint(e) {
5201
- return Z.copy(e).applyMatrix4(this.inverseTransform), this.box.containsPoint(Z);
5207
+ return $.copy(e).applyMatrix4(this.inverseTransform), this.box.containsPoint($);
5202
5208
  }
5203
5209
  // returns boolean indicating whether the ray has intersected the obb
5204
5210
  intersectsRay(e) {
@@ -5225,10 +5231,10 @@ let Zi = class {
5225
5231
  this.updatePlanes();
5226
5232
  }
5227
5233
  updatePlanes() {
5228
- kt.copy(this.box.min).applyMatrix4(this.transform), _t.copy(this.box.max).applyMatrix4(this.transform), Z.set(0, 0, 1).transformDirection(this.transform), this.planes[0].setFromNormalAndCoplanarPoint(Z, kt), this.planes[1].setFromNormalAndCoplanarPoint(Z, _t).negate(), Z.set(0, 1, 0).transformDirection(this.transform), this.planes[2].setFromNormalAndCoplanarPoint(Z, kt), this.planes[3].setFromNormalAndCoplanarPoint(Z, _t).negate(), Z.set(1, 0, 0).transformDirection(this.transform), this.planes[4].setFromNormalAndCoplanarPoint(Z, kt), this.planes[5].setFromNormalAndCoplanarPoint(Z, _t).negate();
5234
+ kt.copy(this.box.min).applyMatrix4(this.transform), _t.copy(this.box.max).applyMatrix4(this.transform), $.set(0, 0, 1).transformDirection(this.transform), this.planes[0].setFromNormalAndCoplanarPoint($, kt), this.planes[1].setFromNormalAndCoplanarPoint($, _t).negate(), $.set(0, 1, 0).transformDirection(this.transform), this.planes[2].setFromNormalAndCoplanarPoint($, kt), this.planes[3].setFromNormalAndCoplanarPoint($, _t).negate(), $.set(1, 0, 0).transformDirection(this.transform), this.planes[4].setFromNormalAndCoplanarPoint($, kt), this.planes[5].setFromNormalAndCoplanarPoint($, _t).negate();
5229
5235
  }
5230
5236
  intersectsSphere(e) {
5231
- return this.clampPoint(e.center, Z), Z.distanceToSquared(e.center) <= e.radius * e.radius;
5237
+ return this.clampPoint(e.center, $), $.distanceToSquared(e.center) <= e.radius * e.radius;
5232
5238
  }
5233
5239
  intersectsFrustum(e) {
5234
5240
  return this._intersectsPlaneShape(e.planes, e.points);
@@ -5263,7 +5269,7 @@ let Zi = class {
5263
5269
  return !0;
5264
5270
  }
5265
5271
  };
5266
- const Ls = 1e-13, ft = Math.PI, Fs = ft / 2, lt = /* @__PURE__ */ new v(), Le = /* @__PURE__ */ new v(), oe = /* @__PURE__ */ new v(), T = /* @__PURE__ */ new v(), Y = /* @__PURE__ */ new P(), jl = /* @__PURE__ */ new it(), $i = /* @__PURE__ */ new P();
5272
+ const Ls = 1e-13, ft = Math.PI, Fs = ft / 2, lt = /* @__PURE__ */ new M(), Le = /* @__PURE__ */ new M(), oe = /* @__PURE__ */ new M(), R = /* @__PURE__ */ new M(), J = /* @__PURE__ */ new P(), jl = /* @__PURE__ */ new it(), $i = /* @__PURE__ */ new P();
5267
5273
  function ve(a, e) {
5268
5274
  e.radius = Math.max(e.radius, a.distanceToSquared(e.center));
5269
5275
  }
@@ -5287,7 +5293,7 @@ let Kl = class extends Po {
5287
5293
  let u;
5288
5294
  h ? u = s : d ? u = i : u = 0;
5289
5295
  const { min: g, max: p } = e;
5290
- g.setScalar(1 / 0), p.setScalar(-1 / 0), o - n <= ft ? (this.getCartographicToNormal(c, A, oe), Le.set(0, 0, 1), lt.crossVectors(Le, oe).normalize(), Le.crossVectors(oe, lt).normalize(), t.makeBasis(lt, Le, oe), Y.copy(t).invert(), this.getCartographicToPosition(u, n, l, T).applyMatrix4(Y), p.x = Math.abs(T.x), g.x = -p.x, this.getCartographicToPosition(i, n, l, T).applyMatrix4(Y), p.y = T.y, this.getCartographicToPosition(i, A, l, T).applyMatrix4(Y), p.y = Math.max(T.y, p.y), this.getCartographicToPosition(s, n, l, T).applyMatrix4(Y), g.y = T.y, this.getCartographicToPosition(s, A, l, T).applyMatrix4(Y), g.y = Math.min(T.y, g.y), this.getCartographicToPosition(c, A, l, T).applyMatrix4(Y), p.z = T.z, this.getCartographicToPosition(s, n, r, T).applyMatrix4(Y), g.z = T.z, this.getCartographicToPosition(i, n, r, T).applyMatrix4(Y), g.z = Math.min(T.z, g.z)) : (this.getCartographicToPosition(u, A, l, oe), oe.z = 0, oe.length() < 1e-10 ? oe.set(1, 0, 0) : oe.normalize(), Le.set(0, 0, 1), lt.crossVectors(oe, Le).normalize(), t.makeBasis(lt, Le, oe), Y.copy(t).invert(), this.getCartographicToPosition(u, A + Fs, l, T).applyMatrix4(Y), p.x = Math.abs(T.x), g.x = -p.x, this.getCartographicToPosition(i, 0, d ? r : l, T).applyMatrix4(Y), p.y = T.y, this.getCartographicToPosition(s, 0, h ? r : l, T).applyMatrix4(Y), g.y = T.y, this.getCartographicToPosition(u, A, l, T).applyMatrix4(Y), p.z = T.z, this.getCartographicToPosition(u, o, l, T).applyMatrix4(Y), g.z = T.z), e.getCenter(T), e.min.sub(T).multiplyScalar(1 + Ls), e.max.sub(T).multiplyScalar(1 + Ls), T.applyMatrix4(t), t.setPosition(T);
5296
+ g.setScalar(1 / 0), p.setScalar(-1 / 0), o - n <= ft ? (this.getCartographicToNormal(c, A, oe), Le.set(0, 0, 1), lt.crossVectors(Le, oe).normalize(), Le.crossVectors(oe, lt).normalize(), t.makeBasis(lt, Le, oe), J.copy(t).invert(), this.getCartographicToPosition(u, n, l, R).applyMatrix4(J), p.x = Math.abs(R.x), g.x = -p.x, this.getCartographicToPosition(i, n, l, R).applyMatrix4(J), p.y = R.y, this.getCartographicToPosition(i, A, l, R).applyMatrix4(J), p.y = Math.max(R.y, p.y), this.getCartographicToPosition(s, n, l, R).applyMatrix4(J), g.y = R.y, this.getCartographicToPosition(s, A, l, R).applyMatrix4(J), g.y = Math.min(R.y, g.y), this.getCartographicToPosition(c, A, l, R).applyMatrix4(J), p.z = R.z, this.getCartographicToPosition(s, n, r, R).applyMatrix4(J), g.z = R.z, this.getCartographicToPosition(i, n, r, R).applyMatrix4(J), g.z = Math.min(R.z, g.z)) : (this.getCartographicToPosition(u, A, l, oe), oe.z = 0, oe.length() < 1e-10 ? oe.set(1, 0, 0) : oe.normalize(), Le.set(0, 0, 1), lt.crossVectors(oe, Le).normalize(), t.makeBasis(lt, Le, oe), J.copy(t).invert(), this.getCartographicToPosition(u, A + Fs, l, R).applyMatrix4(J), p.x = Math.abs(R.x), g.x = -p.x, this.getCartographicToPosition(i, 0, d ? r : l, R).applyMatrix4(J), p.y = R.y, this.getCartographicToPosition(s, 0, h ? r : l, R).applyMatrix4(J), g.y = R.y, this.getCartographicToPosition(u, A, l, R).applyMatrix4(J), p.z = R.z, this.getCartographicToPosition(u, o, l, R).applyMatrix4(J), g.z = R.z), e.getCenter(R), e.min.sub(R).multiplyScalar(1 + Ls), e.max.sub(R).multiplyScalar(1 + Ls), R.applyMatrix4(t), t.setPosition(R);
5291
5297
  }
5292
5298
  getBoundingSphere(e) {
5293
5299
  en(this.radius) && console.warn("EllipsoidRegion: Triaxial ellipsoids are not supported."), this.getBoundingBox(jl, $i), e.center.setFromMatrixPosition($i), e.radius = 0;
@@ -5300,7 +5306,7 @@ let Kl = class extends Po {
5300
5306
  heightEnd: r
5301
5307
  } = this, l = (t + s) * 0.5, c = (i + n) * 0.5, A = t > 0, h = s < 0;
5302
5308
  let d;
5303
- A ? d = t : h ? d = s : d = 0, this.getCartographicToPosition(d, i, r, T), ve(T, e), this.getCartographicToPosition(s, i, r, T), ve(T, e), this.getCartographicToPosition(s, c, r, T), ve(T, e), this.getCartographicToPosition(t, i, r, T), ve(T, e), this.getCartographicToPosition(t, c, r, T), ve(T, e), this.getCartographicToPosition(l, c, r, T), ve(T, e), this.getCartographicToPosition(t, i, o, T), ve(T, e), n - i > ft && (this.getCartographicToPosition(d, c + ft, r, T), ve(T, e)), e.radius = Math.sqrt(e.radius) * (1 + Ls);
5309
+ A ? d = t : h ? d = s : d = 0, this.getCartographicToPosition(d, i, r, R), ve(R, e), this.getCartographicToPosition(s, i, r, R), ve(R, e), this.getCartographicToPosition(s, c, r, R), ve(R, e), this.getCartographicToPosition(t, i, r, R), ve(R, e), this.getCartographicToPosition(t, c, r, R), ve(R, e), this.getCartographicToPosition(l, c, r, R), ve(R, e), this.getCartographicToPosition(t, i, o, R), ve(R, e), n - i > ft && (this.getCartographicToPosition(d, c + ft, r, R), ve(R, e)), e.radius = Math.sqrt(e.radius) * (1 + Ls);
5304
5310
  }
5305
5311
  };
5306
5312
  function Yl(a) {
@@ -5347,7 +5353,7 @@ function Wl(a) {
5347
5353
  return [i, n, o];
5348
5354
  }
5349
5355
  const ct = /* @__PURE__ */ new k();
5350
- function Xl(a, e, t = new v()) {
5356
+ function Xl(a, e, t = new M()) {
5351
5357
  ct.set(a, e).divideScalar(256).multiplyScalar(2).subScalar(1), t.set(ct.x, ct.y, 1 - Math.abs(ct.x) - Math.abs(ct.y));
5352
5358
  const s = st.clamp(-t.z, 0, 1);
5353
5359
  return t.x >= 0 ? t.setX(t.x - s) : t.setX(t.x + s), t.y >= 0 ? t.setY(t.y - s) : t.setY(t.y + s), t.normalize(), t;
@@ -5362,17 +5368,17 @@ class Uo extends Nl {
5362
5368
  }
5363
5369
  parse(e) {
5364
5370
  return super.parse(e).then(async (t) => {
5365
- const { featureTable: s, batchTable: i } = t, n = new Nn(), o = s.header.extensions, r = new v();
5371
+ const { featureTable: s, batchTable: i } = t, n = new Nn(), o = s.header.extensions, r = new M();
5366
5372
  let l;
5367
5373
  if (o && o["3DTILES_draco_point_compression"]) {
5368
5374
  const { byteOffset: h, byteLength: d, properties: u } = o["3DTILES_draco_point_compression"], g = this.manager.getHandler("draco.drc");
5369
5375
  if (g == null)
5370
5376
  throw new Error("PNTSLoader: dracoLoader not available.");
5371
5377
  const p = {};
5372
- for (const C in u)
5373
- if (C in tn && C in u) {
5374
- const y = tn[C];
5375
- p[y] = u[C];
5378
+ for (const E in u)
5379
+ if (E in tn && E in u) {
5380
+ const y = tn[E];
5381
+ p[y] = u[E];
5376
5382
  }
5377
5383
  const b = {
5378
5384
  attributeIDs: p,
@@ -5381,16 +5387,16 @@ class Uo extends Nl {
5381
5387
  color: "Uint8Array"
5382
5388
  },
5383
5389
  useUniqueIDs: !0
5384
- }, E = s.getBuffer(h, d);
5385
- l = await g.decodeGeometry(E, b), l.attributes.color && (n.vertexColors = !0);
5390
+ }, C = s.getBuffer(h, d);
5391
+ l = await g.decodeGeometry(C, b), l.attributes.color && (n.vertexColors = !0);
5386
5392
  } else {
5387
- const h = s.getData("POINTS_LENGTH"), d = s.getData("POSITION", h, "FLOAT", "VEC3"), u = s.getData("NORMAL", h, "FLOAT", "VEC3"), g = s.getData("NORMAL", h, "UNSIGNED_BYTE", "VEC2"), p = s.getData("RGB", h, "UNSIGNED_BYTE", "VEC3"), b = s.getData("RGBA", h, "UNSIGNED_BYTE", "VEC4"), E = s.getData("RGB565", h, "UNSIGNED_SHORT", "SCALAR"), C = s.getData("CONSTANT_RGBA", h, "UNSIGNED_BYTE", "VEC4"), y = s.getData("POSITION_QUANTIZED", h, "UNSIGNED_SHORT", "VEC3"), f = s.getData("QUANTIZED_VOLUME_SCALE", h, "FLOAT", "VEC3"), I = s.getData("QUANTIZED_VOLUME_OFFSET", h, "FLOAT", "VEC3");
5393
+ const h = s.getData("POINTS_LENGTH"), d = s.getData("POSITION", h, "FLOAT", "VEC3"), u = s.getData("NORMAL", h, "FLOAT", "VEC3"), g = s.getData("NORMAL", h, "UNSIGNED_BYTE", "VEC2"), p = s.getData("RGB", h, "UNSIGNED_BYTE", "VEC3"), b = s.getData("RGBA", h, "UNSIGNED_BYTE", "VEC4"), C = s.getData("RGB565", h, "UNSIGNED_SHORT", "SCALAR"), E = s.getData("CONSTANT_RGBA", h, "UNSIGNED_BYTE", "VEC4"), y = s.getData("POSITION_QUANTIZED", h, "UNSIGNED_SHORT", "VEC3"), m = s.getData("QUANTIZED_VOLUME_SCALE", h, "FLOAT", "VEC3"), I = s.getData("QUANTIZED_VOLUME_OFFSET", h, "FLOAT", "VEC3");
5388
5394
  if (l = new rs(), y) {
5389
5395
  const w = new Float32Array(h * 3);
5390
5396
  for (let B = 0; B < h; B++)
5391
- for (let M = 0; M < 3; M++) {
5392
- const S = 3 * B + M;
5393
- w[S] = y[S] / 65535 * f[M];
5397
+ for (let x = 0; x < 3; x++) {
5398
+ const v = 3 * B + x;
5399
+ w[v] = y[v] / 65535 * m[x];
5394
5400
  }
5395
5401
  r.x = I[0], r.y = I[1], r.z = I[2], l.setAttribute("position", new ne(w, 3, !1));
5396
5402
  } else
@@ -5398,10 +5404,10 @@ class Uo extends Nl {
5398
5404
  if (u !== null)
5399
5405
  l.setAttribute("normal", new ne(u, 3, !1));
5400
5406
  else if (g !== null) {
5401
- const w = new Float32Array(h * 3), B = new v();
5402
- for (let M = 0; M < h; M++) {
5403
- const S = g[M * 2], x = g[M * 2 + 1], R = Xl(S, x, B);
5404
- w[M * 3] = R.x, w[M * 3 + 1] = R.y, w[M * 3 + 2] = R.z;
5407
+ const w = new Float32Array(h * 3), B = new M();
5408
+ for (let x = 0; x < h; x++) {
5409
+ const v = g[x * 2], S = g[x * 2 + 1], Q = Xl(v, S, B);
5410
+ w[x * 3] = Q.x, w[x * 3 + 1] = Q.y, w[x * 3 + 2] = Q.z;
5405
5411
  }
5406
5412
  l.setAttribute("normal", new ne(w, 3, !1));
5407
5413
  }
@@ -5409,20 +5415,20 @@ class Uo extends Nl {
5409
5415
  l.setAttribute("color", new ne(b, 4, !0)), n.vertexColors = !0, n.transparent = !0, n.depthWrite = !1;
5410
5416
  else if (p !== null)
5411
5417
  l.setAttribute("color", new ne(p, 3, !0)), n.vertexColors = !0;
5412
- else if (E !== null) {
5418
+ else if (C !== null) {
5413
5419
  const w = new Uint8Array(h * 3);
5414
5420
  for (let B = 0; B < h; B++) {
5415
- const M = Wl(E[B]);
5416
- for (let S = 0; S < 3; S++) {
5417
- const x = 3 * B + S;
5418
- w[x] = M[S];
5421
+ const x = Wl(C[B]);
5422
+ for (let v = 0; v < 3; v++) {
5423
+ const S = 3 * B + v;
5424
+ w[S] = x[v];
5419
5425
  }
5420
5426
  }
5421
5427
  l.setAttribute("color", new ne(w, 3, !0)), n.vertexColors = !0;
5422
- } else if (C !== null) {
5423
- const w = new Ee(C[0], C[1], C[2]);
5428
+ } else if (E !== null) {
5429
+ const w = new Ee(E[0], E[1], E[2]);
5424
5430
  n.color = w;
5425
- const B = C[3] / 255;
5431
+ const B = E[3] / 255;
5426
5432
  B < 1 && (n.opacity = B, n.transparent = !0, n.depthWrite = !1);
5427
5433
  }
5428
5434
  }
@@ -5433,7 +5439,7 @@ class Uo extends Nl {
5433
5439
  });
5434
5440
  }
5435
5441
  }
5436
- const Gt = /* @__PURE__ */ new v(), qe = /* @__PURE__ */ new v(), ze = /* @__PURE__ */ new v(), ks = /* @__PURE__ */ new v(), Ut = /* @__PURE__ */ new $e(), Nt = /* @__PURE__ */ new v(), je = /* @__PURE__ */ new P(), sn = /* @__PURE__ */ new P(), nn = /* @__PURE__ */ new v(), on = /* @__PURE__ */ new P(), _s = /* @__PURE__ */ new $e(), Ps = {};
5442
+ const Gt = /* @__PURE__ */ new M(), qe = /* @__PURE__ */ new M(), ze = /* @__PURE__ */ new M(), ks = /* @__PURE__ */ new M(), Ut = /* @__PURE__ */ new $e(), Nt = /* @__PURE__ */ new M(), je = /* @__PURE__ */ new P(), sn = /* @__PURE__ */ new P(), nn = /* @__PURE__ */ new M(), on = /* @__PURE__ */ new P(), _s = /* @__PURE__ */ new $e(), Ps = {};
5437
5443
  function rn(a, e, t, s) {
5438
5444
  if (a = a / t * 2 - 1, e = e / t * 2 - 1, s.x = a, s.y = e, s.z = 1 - Math.abs(a) - Math.abs(e), s.z < 0) {
5439
5445
  const i = s.x;
@@ -5460,48 +5466,48 @@ class No extends Ul {
5460
5466
  A.parse(n, h, (u) => {
5461
5467
  const g = s.getData("INSTANCES_LENGTH");
5462
5468
  let p = s.getData("POSITION", g, "FLOAT", "VEC3");
5463
- const b = s.getData("POSITION_QUANTIZED", g, "UNSIGNED_SHORT", "VEC3"), E = s.getData("QUANTIZED_VOLUME_OFFSET", 1, "FLOAT", "VEC3"), C = s.getData("QUANTIZED_VOLUME_SCALE", 1, "FLOAT", "VEC3"), y = s.getData("NORMAL_UP", g, "FLOAT", "VEC3"), f = s.getData("NORMAL_RIGHT", g, "FLOAT", "VEC3"), I = s.getData("NORMAL_UP_OCT32P", g, "UNSIGNED_SHORT", "VEC2"), w = s.getData("NORMAL_RIGHT_OCT32P", g, "UNSIGNED_SHORT", "VEC2"), B = s.getData("SCALE_NON_UNIFORM", g, "FLOAT", "VEC3"), M = s.getData("SCALE", g, "FLOAT", "SCALAR"), S = s.getData("RTC_CENTER", 1, "FLOAT", "VEC3"), x = s.getData("EAST_NORTH_UP");
5469
+ const b = s.getData("POSITION_QUANTIZED", g, "UNSIGNED_SHORT", "VEC3"), C = s.getData("QUANTIZED_VOLUME_OFFSET", 1, "FLOAT", "VEC3"), E = s.getData("QUANTIZED_VOLUME_SCALE", 1, "FLOAT", "VEC3"), y = s.getData("NORMAL_UP", g, "FLOAT", "VEC3"), m = s.getData("NORMAL_RIGHT", g, "FLOAT", "VEC3"), I = s.getData("NORMAL_UP_OCT32P", g, "UNSIGNED_SHORT", "VEC2"), w = s.getData("NORMAL_RIGHT_OCT32P", g, "UNSIGNED_SHORT", "VEC2"), B = s.getData("SCALE_NON_UNIFORM", g, "FLOAT", "VEC3"), x = s.getData("SCALE", g, "FLOAT", "SCALAR"), v = s.getData("RTC_CENTER", 1, "FLOAT", "VEC3"), S = s.getData("EAST_NORTH_UP");
5464
5470
  if (!p && b) {
5465
5471
  p = new Float32Array(g * 3);
5466
- for (let Q = 0; Q < g; Q++)
5467
- p[Q * 3 + 0] = E[0] + b[Q * 3 + 0] / 65535 * C[0], p[Q * 3 + 1] = E[1] + b[Q * 3 + 1] / 65535 * C[1], p[Q * 3 + 2] = E[2] + b[Q * 3 + 2] / 65535 * C[2];
5472
+ for (let T = 0; T < g; T++)
5473
+ p[T * 3 + 0] = C[0] + b[T * 3 + 0] / 65535 * E[0], p[T * 3 + 1] = C[1] + b[T * 3 + 1] / 65535 * E[1], p[T * 3 + 2] = C[2] + b[T * 3 + 2] / 65535 * E[2];
5468
5474
  }
5469
- const R = new v();
5470
- for (let Q = 0; Q < g; Q++)
5471
- R.x += p[Q * 3 + 0] / g, R.y += p[Q * 3 + 1] / g, R.z += p[Q * 3 + 2] / g;
5472
- const L = [], q = [];
5473
- u.scene.updateMatrixWorld(), u.scene.traverse((Q) => {
5474
- if (Q.isMesh) {
5475
- q.push(Q);
5476
- const { geometry: te, material: z } = Q, F = new li(te, z, g);
5477
- F.position.copy(R), S && (F.position.x += S[0], F.position.y += S[1], F.position.z += S[2]), L.push(F);
5475
+ const Q = new M();
5476
+ for (let T = 0; T < g; T++)
5477
+ Q.x += p[T * 3 + 0] / g, Q.y += p[T * 3 + 1] / g, Q.z += p[T * 3 + 2] / g;
5478
+ const D = [], G = [];
5479
+ u.scene.updateMatrixWorld(), u.scene.traverse((T) => {
5480
+ if (T.isMesh) {
5481
+ G.push(T);
5482
+ const { geometry: K, material: U } = T, F = new li(K, U, g);
5483
+ F.position.copy(Q), v && (F.position.x += v[0], F.position.y += v[1], F.position.z += v[2]), D.push(F);
5478
5484
  }
5479
5485
  });
5480
- for (let Q = 0; Q < g; Q++) {
5486
+ for (let T = 0; T < g; T++) {
5481
5487
  ks.set(
5482
- p[Q * 3 + 0] - R.x,
5483
- p[Q * 3 + 1] - R.y,
5484
- p[Q * 3 + 2] - R.z
5485
- ), Ut.identity(), y && f ? (qe.set(
5486
- y[Q * 3 + 0],
5487
- y[Q * 3 + 1],
5488
- y[Q * 3 + 2]
5488
+ p[T * 3 + 0] - Q.x,
5489
+ p[T * 3 + 1] - Q.y,
5490
+ p[T * 3 + 2] - Q.z
5491
+ ), Ut.identity(), y && m ? (qe.set(
5492
+ y[T * 3 + 0],
5493
+ y[T * 3 + 1],
5494
+ y[T * 3 + 2]
5489
5495
  ), ze.set(
5490
- f[Q * 3 + 0],
5491
- f[Q * 3 + 1],
5492
- f[Q * 3 + 2]
5496
+ m[T * 3 + 0],
5497
+ m[T * 3 + 1],
5498
+ m[T * 3 + 2]
5493
5499
  ), Gt.crossVectors(ze, qe).normalize(), je.makeBasis(
5494
5500
  ze,
5495
5501
  qe,
5496
5502
  Gt
5497
5503
  ), Ut.setFromRotationMatrix(je)) : I && w && (rn(
5498
- I[Q * 2 + 0],
5499
- I[Q * 2 + 1],
5504
+ I[T * 2 + 0],
5505
+ I[T * 2 + 1],
5500
5506
  65535,
5501
5507
  qe
5502
5508
  ), rn(
5503
- w[Q * 2 + 0],
5504
- w[Q * 2 + 1],
5509
+ w[T * 2 + 0],
5510
+ w[T * 2 + 1],
5505
5511
  65535,
5506
5512
  ze
5507
5513
  ), Gt.crossVectors(ze, qe).normalize(), je.makeBasis(
@@ -5509,18 +5515,18 @@ class No extends Ul {
5509
5515
  qe,
5510
5516
  Gt
5511
5517
  ), Ut.setFromRotationMatrix(je)), Nt.set(1, 1, 1), B && Nt.set(
5512
- B[Q * 3 + 0],
5513
- B[Q * 3 + 1],
5514
- B[Q * 3 + 2]
5515
- ), M && Nt.multiplyScalar(M[Q]);
5516
- for (let te = 0, z = L.length; te < z; te++) {
5517
- const F = L[te];
5518
- _s.copy(Ut), x && (F.updateMatrixWorld(), nn.copy(ks).applyMatrix4(F.matrixWorld), this.ellipsoid.getPositionToCartographic(nn, Ps), this.ellipsoid.getEastNorthUpFrame(Ps.lat, Ps.lon, on), _s.setFromRotationMatrix(on)), je.compose(ks, _s, Nt).multiply(d);
5519
- const j = q[te];
5520
- sn.multiplyMatrices(je, j.matrixWorld), F.setMatrixAt(Q, sn);
5518
+ B[T * 3 + 0],
5519
+ B[T * 3 + 1],
5520
+ B[T * 3 + 2]
5521
+ ), x && Nt.multiplyScalar(x[T]);
5522
+ for (let K = 0, U = D.length; K < U; K++) {
5523
+ const F = D[K];
5524
+ _s.copy(Ut), S && (F.updateMatrixWorld(), nn.copy(ks).applyMatrix4(F.matrixWorld), this.ellipsoid.getPositionToCartographic(nn, Ps), this.ellipsoid.getEastNorthUpFrame(Ps.lat, Ps.lon, on), _s.setFromRotationMatrix(on)), je.compose(ks, _s, Nt).multiply(d);
5525
+ const O = G[K];
5526
+ sn.multiplyMatrices(je, O.matrixWorld), F.setMatrixAt(T, sn);
5521
5527
  }
5522
5528
  }
5523
- u.scene.clear(), u.scene.add(...L), u.batchTable = i, u.featureTable = s, u.scene.batchTable = i, u.scene.featureTable = s, o(u);
5529
+ u.scene.clear(), u.scene.add(...D), u.batchTable = i, u.featureTable = s, u.scene.batchTable = i, u.scene.featureTable = s, o(u);
5524
5530
  }, r);
5525
5531
  });
5526
5532
  });
@@ -5601,7 +5607,7 @@ class $l extends Xe {
5601
5607
  this.parent && e && this.parent.updateWorldMatrix(e, !1), this.updateMatrixWorld(!0);
5602
5608
  }
5603
5609
  }
5604
- const Vo = /* @__PURE__ */ new is(), Gs = /* @__PURE__ */ new v(), Vt = [];
5610
+ const Vo = /* @__PURE__ */ new is(), Gs = /* @__PURE__ */ new M(), Vt = [];
5605
5611
  function Oo(a, e) {
5606
5612
  return a.distance - e.distance;
5607
5613
  }
@@ -5657,7 +5663,7 @@ function jo(a, e, t, s, i = null) {
5657
5663
  for (let c = 0, A = l.length; c < A; c++)
5658
5664
  jo(a, l[c], t, s, i);
5659
5665
  }
5660
- const ge = /* @__PURE__ */ new v(), pe = /* @__PURE__ */ new v(), fe = /* @__PURE__ */ new v(), an = /* @__PURE__ */ new v(), ln = /* @__PURE__ */ new v();
5666
+ const ge = /* @__PURE__ */ new M(), pe = /* @__PURE__ */ new M(), fe = /* @__PURE__ */ new M(), an = /* @__PURE__ */ new M(), ln = /* @__PURE__ */ new M();
5661
5667
  class tc {
5662
5668
  constructor() {
5663
5669
  this.sphere = null, this.obb = null, this.region = null, this.regionObb = null;
@@ -5769,7 +5775,7 @@ function ic(a, e, t, s) {
5769
5775
  }
5770
5776
  class nc extends Nr {
5771
5777
  constructor() {
5772
- super(), this.points = Array(8).fill().map(() => new v());
5778
+ super(), this.points = Array(8).fill().map(() => new M());
5773
5779
  }
5774
5780
  setFromProjectionMatrix(e, t) {
5775
5781
  return super.setFromProjectionMatrix(e, t), this.calculateFrustumPoints(), this;
@@ -5798,7 +5804,7 @@ class nc extends Nr {
5798
5804
  });
5799
5805
  }
5800
5806
  }
5801
- const cn = /* @__PURE__ */ new P(), An = /* @__PURE__ */ new Yn(), Ko = Symbol("INITIAL_FRUSTUM_CULLED"), Ot = /* @__PURE__ */ new P(), ht = /* @__PURE__ */ new v(), Us = /* @__PURE__ */ new k(), oc = /* @__PURE__ */ new v(1, 0, 0), rc = /* @__PURE__ */ new v(0, 1, 0);
5807
+ const cn = /* @__PURE__ */ new P(), An = /* @__PURE__ */ new Yn(), Ko = Symbol("INITIAL_FRUSTUM_CULLED"), Ot = /* @__PURE__ */ new P(), ht = /* @__PURE__ */ new M(), Us = /* @__PURE__ */ new k(), oc = /* @__PURE__ */ new M(1, 0, 0), rc = /* @__PURE__ */ new M(0, 1, 0);
5802
5808
  function hn(a, e) {
5803
5809
  a.traverse((t) => {
5804
5810
  t.frustumCulled = t[Ko] && e;
@@ -5927,7 +5933,7 @@ let ac = class extends _l {
5927
5933
  isOrthographic: !1,
5928
5934
  sseDenominator: -1,
5929
5935
  // used if isOrthographic:false
5930
- position: new v(),
5936
+ position: new M(),
5931
5937
  invScale: -1,
5932
5938
  pixelSize: 0
5933
5939
  // used if isOrthographic:true
@@ -5969,32 +5975,32 @@ let ac = class extends _l {
5969
5975
  const h = o.transform, d = this._upRotationMatrix, u = (Ue(e) || s).toLowerCase();
5970
5976
  switch (u) {
5971
5977
  case "b3dm": {
5972
- const f = new Go(c);
5973
- f.workingPath = r, f.fetchOptions = l, f.adjustmentTransform.copy(d), A = f.parse(e);
5978
+ const m = new Go(c);
5979
+ m.workingPath = r, m.fetchOptions = l, m.adjustmentTransform.copy(d), A = m.parse(e);
5974
5980
  break;
5975
5981
  }
5976
5982
  case "pnts": {
5977
- const f = new Uo(c);
5978
- f.workingPath = r, f.fetchOptions = l, A = f.parse(e);
5983
+ const m = new Uo(c);
5984
+ m.workingPath = r, m.fetchOptions = l, A = m.parse(e);
5979
5985
  break;
5980
5986
  }
5981
5987
  case "i3dm": {
5982
- const f = new No(c);
5983
- f.workingPath = r, f.fetchOptions = l, f.adjustmentTransform.copy(d), f.ellipsoid.copy(this.ellipsoid), A = f.parse(e);
5988
+ const m = new No(c);
5989
+ m.workingPath = r, m.fetchOptions = l, m.adjustmentTransform.copy(d), m.ellipsoid.copy(this.ellipsoid), A = m.parse(e);
5984
5990
  break;
5985
5991
  }
5986
5992
  case "cmpt": {
5987
- const f = new Zl(c);
5988
- f.workingPath = r, f.fetchOptions = l, f.adjustmentTransform.copy(d), f.ellipsoid.copy(this.ellipsoid), A = f.parse(e).then((I) => I.scene);
5993
+ const m = new Zl(c);
5994
+ m.workingPath = r, m.fetchOptions = l, m.adjustmentTransform.copy(d), m.ellipsoid.copy(this.ellipsoid), A = m.parse(e).then((I) => I.scene);
5989
5995
  break;
5990
5996
  }
5991
5997
  // 3DTILES_content_gltf
5992
5998
  case "gltf":
5993
5999
  case "glb": {
5994
- const f = c.getHandler("path.gltf") || c.getHandler("path.glb") || new Ne(c);
5995
- f.setWithCredentials(l.credentials === "include"), f.setRequestHeader(l.headers || {}), l.credentials === "include" && l.mode === "cors" && f.setCrossOrigin("use-credentials");
5996
- let I = f.resourcePath || f.path || r;
5997
- !/[\\/]$/.test(I) && I.length && (I += "/"), A = f.parseAsync(e, I).then((w) => {
6000
+ const m = c.getHandler("path.gltf") || c.getHandler("path.glb") || new Ne(c);
6001
+ m.setWithCredentials(l.credentials === "include"), m.setRequestHeader(l.headers || {}), l.credentials === "include" && l.mode === "cors" && m.setCrossOrigin("use-credentials");
6002
+ let I = m.resourcePath || m.path || r;
6003
+ !/[\\/]$/.test(I) && I.length && (I += "/"), A = m.parseAsync(e, I).then((w) => {
5998
6004
  w.scene = w.scene || new Xe();
5999
6005
  const { scene: B } = w;
6000
6006
  return B.updateMatrix(), B.matrix.multiply(d).decompose(B.position, B.quaternion, B.scale), w;
@@ -6002,7 +6008,7 @@ let ac = class extends _l {
6002
6008
  break;
6003
6009
  }
6004
6010
  default: {
6005
- A = this.invokeOnePlugin((f) => f.parseToMesh && f.parseToMesh(e, t, s, i, n));
6011
+ A = this.invokeOnePlugin((m) => m.parseToMesh && m.parseToMesh(e, t, s, i, n));
6006
6012
  break;
6007
6013
  }
6008
6014
  }
@@ -6010,27 +6016,27 @@ let ac = class extends _l {
6010
6016
  if (g === null)
6011
6017
  throw new Error(`TilesRenderer: Content type "${u}" not supported.`);
6012
6018
  let p, b;
6013
- g.isObject3D ? (p = g, b = null) : (p = g.scene, b = g), p.updateMatrix(), p.matrix.premultiply(h), p.matrix.decompose(p.position, p.quaternion, p.scale), await this.invokeAllPlugins((f) => f.processTileModel && f.processTileModel(p, t)), p.traverse((f) => {
6014
- f[Ko] = f.frustumCulled;
6019
+ g.isObject3D ? (p = g, b = null) : (p = g.scene, b = g), p.updateMatrix(), p.matrix.premultiply(h), p.matrix.decompose(p.position, p.quaternion, p.scale), await this.invokeAllPlugins((m) => m.processTileModel && m.processTileModel(p, t)), p.traverse((m) => {
6020
+ m[Ko] = m.frustumCulled;
6015
6021
  }), hn(p, !this.autoDisableRendererCulling);
6016
- const E = [], C = [], y = [];
6017
- if (p.traverse((f) => {
6018
- if (f.geometry && C.push(f.geometry), f.material) {
6019
- const I = f.material;
6020
- E.push(f.material);
6022
+ const C = [], E = [], y = [];
6023
+ if (p.traverse((m) => {
6024
+ if (m.geometry && E.push(m.geometry), m.material) {
6025
+ const I = m.material;
6026
+ C.push(m.material);
6021
6027
  for (const w in I) {
6022
6028
  const B = I[w];
6023
6029
  B && B.isTexture && y.push(B);
6024
6030
  }
6025
6031
  }
6026
6032
  }), n.aborted) {
6027
- for (let f = 0, I = y.length; f < I; f++) {
6028
- const w = y[f];
6033
+ for (let m = 0, I = y.length; m < I; m++) {
6034
+ const w = y[m];
6029
6035
  w.image instanceof ImageBitmap && w.image.close(), w.dispose();
6030
6036
  }
6031
6037
  return;
6032
6038
  }
6033
- o.materials = E, o.geometry = C, o.textures = y, o.scene = p, o.metadata = b;
6039
+ o.materials = C, o.geometry = E, o.textures = y, o.scene = p, o.metadata = b;
6034
6040
  }
6035
6041
  disposeTile(e) {
6036
6042
  super.disposeTile(e);
@@ -6066,14 +6072,14 @@ let ac = class extends _l {
6066
6072
  const g = n[d];
6067
6073
  let p, b;
6068
6074
  if (g.isOrthographic) {
6069
- const C = g.pixelSize;
6070
- p = e.geometricError / C, b = 1 / 0;
6075
+ const E = g.pixelSize;
6076
+ p = e.geometricError / E, b = 1 / 0;
6071
6077
  } else {
6072
- const C = g.sseDenominator;
6073
- b = o.distanceToPoint(g.position), p = b === 0 ? 1 / 0 : e.geometricError / (b * C);
6078
+ const E = g.sseDenominator;
6079
+ b = o.distanceToPoint(g.position), p = b === 0 ? 1 / 0 : e.geometricError / (b * E);
6074
6080
  }
6075
- const E = n[d].frustum;
6076
- o.intersectsFrustum(E) && (r = !0, l = Math.max(l, p), c = Math.min(c, b)), A = Math.max(A, p), h = Math.min(h, b);
6081
+ const C = n[d].frustum;
6082
+ o.intersectsFrustum(C) && (r = !0, l = Math.max(l, p), c = Math.min(c, b)), A = Math.max(A, p), h = Math.min(h, b);
6077
6083
  }
6078
6084
  r ? (t.inView = !0, t.error = l, t.distanceFromCamera = c) : (t.inView = !1, t.error = A, t.distanceFromCamera = h);
6079
6085
  }
@@ -6667,7 +6673,7 @@ class Yo {
6667
6673
  this._mesh.material = e;
6668
6674
  }
6669
6675
  }
6670
- function N(a, e, t) {
6676
+ function H(a, e, t) {
6671
6677
  return a && e in a ? a[e] : t;
6672
6678
  }
6673
6679
  function Jo(a) {
@@ -6693,7 +6699,7 @@ function ni(a) {
6693
6699
  case "VEC2":
6694
6700
  return new k();
6695
6701
  case "VEC3":
6696
- return new v();
6702
+ return new M();
6697
6703
  case "VEC4":
6698
6704
  return new nt();
6699
6705
  case "MAT2":
@@ -6938,7 +6944,7 @@ function Cc(a) {
6938
6944
  }
6939
6945
  class us {
6940
6946
  constructor(e, t, s = null) {
6941
- this.name = t.name || null, this.description = t.description || null, this.type = t.type, this.componentType = t.componentType || null, this.enumType = t.enumType || null, this.array = t.array || !1, this.count = t.count || 0, this.normalized = t.normalized || !1, this.offset = t.offset || 0, this.scale = N(t, "scale", 1), this.max = N(t, "max", 1 / 0), this.min = N(t, "min", -1 / 0), this.required = t.required || !1, this.noData = N(t, "noData", null), this.default = N(t, "default", null), this.semantic = N(t, "semantic", null), this.enumSet = null, this.accessorProperty = s, s && (this.offset = N(s, "offset", this.offset), this.scale = N(s, "scale", this.scale), this.max = N(s, "max", this.max), this.min = N(s, "min", this.min)), t.type === "ENUM" && (this.enumSet = e[this.enumType], this.componentType === null && (this.componentType = N(this.enumSet, "valueType", "UINT16")));
6947
+ this.name = t.name || null, this.description = t.description || null, this.type = t.type, this.componentType = t.componentType || null, this.enumType = t.enumType || null, this.array = t.array || !1, this.count = t.count || 0, this.normalized = t.normalized || !1, this.offset = t.offset || 0, this.scale = H(t, "scale", 1), this.max = H(t, "max", 1 / 0), this.min = H(t, "min", -1 / 0), this.required = t.required || !1, this.noData = H(t, "noData", null), this.default = H(t, "default", null), this.semantic = H(t, "semantic", null), this.enumSet = null, this.accessorProperty = s, s && (this.offset = H(s, "offset", this.offset), this.scale = H(s, "scale", this.scale), this.max = H(s, "max", this.max), this.min = H(s, "min", this.min)), t.type === "ENUM" && (this.enumSet = e[this.enumType], this.componentType === null && (this.componentType = H(this.enumSet, "valueType", "UINT16")));
6942
6948
  }
6943
6949
  // shape the given target to match the data type of the property
6944
6950
  // enums are set to their integer value
@@ -7039,7 +7045,7 @@ class yc extends Ci {
7039
7045
  }
7040
7046
  class Ic extends us {
7041
7047
  constructor(e, t, s = null) {
7042
- super(e, t, s), this.values = s?.values ?? null, this.valueLength = Cc(this.type), this.arrayOffsets = N(s, "arrayOffsets", null), this.stringOffsets = N(s, "stringOffsets", null), this.arrayOffsetType = N(s, "arrayOffsetType", "UINT32"), this.stringOffsetType = N(s, "stringOffsetType", "UINT32");
7048
+ super(e, t, s), this.values = s?.values ?? null, this.valueLength = Cc(this.type), this.arrayOffsets = H(s, "arrayOffsets", null), this.stringOffsets = H(s, "stringOffsets", null), this.arrayOffsetType = H(s, "arrayOffsetType", "UINT32"), this.stringOffsetType = H(s, "stringOffsetType", "UINT32");
7043
7049
  }
7044
7050
  // returns the necessary array length based on the array offsets if present
7045
7051
  getArrayLengthFromId(e, t) {
@@ -7080,7 +7086,7 @@ class Bc extends Ci {
7080
7086
  if (r === "STRING") {
7081
7087
  let u = d + s, g = 0;
7082
7088
  if (n.stringOffsets !== null) {
7083
- const { stringOffsets: b, stringOffsetType: E } = n, C = Ct(E), y = new C(l[b]);
7089
+ const { stringOffsets: b, stringOffsetType: C } = n, E = Ct(C), y = new E(l[b]);
7084
7090
  g = y[u + 1] - y[u], u = y[u];
7085
7091
  }
7086
7092
  const p = new Uint8Array(h.buffer, u, g);
@@ -7192,7 +7198,7 @@ function $o(a, e, t, s) {
7192
7198
  const bn = /* @__PURE__ */ new k(), Cn = /* @__PURE__ */ new k(), En = /* @__PURE__ */ new k();
7193
7199
  class Sc extends us {
7194
7200
  constructor(e, t, s = null) {
7195
- super(e, t, s), this.channels = N(s, "channels", [0]), this.index = N(s, "index", null), this.texCoord = N(s, "texCoord", null), this.valueLength = parseInt(this.type.replace(/[^0-9]/g, "")) || 1;
7201
+ super(e, t, s), this.channels = H(s, "channels", [0]), this.index = H(s, "index", null), this.texCoord = H(s, "texCoord", null), this.valueLength = parseInt(this.type.replace(/[^0-9]/g, "")) || 1;
7196
7202
  }
7197
7203
  // takes the buffer to read from and the value index to read
7198
7204
  readDataFromBuffer(e, t, s = null) {
@@ -7251,10 +7257,10 @@ class vc extends Ci {
7251
7257
  continue;
7252
7258
  }
7253
7259
  } else throw new Error("PropertyTextureAccessor: Requested property does not exist.");
7254
- const E = p.valueLength * (p.count || 1), C = p.channels.map((w) => A[4 * d + w]), y = p.componentType, f = Ct(y, b), I = new f(E);
7255
- if (new Uint8Array(I.buffer).set(C), p.array) {
7260
+ const C = p.valueLength * (p.count || 1), E = p.channels.map((w) => A[4 * d + w]), y = p.componentType, m = Ct(y, b), I = new m(C);
7261
+ if (new Uint8Array(I.buffer).set(E), p.array) {
7256
7262
  const w = n[d];
7257
- for (let B = 0, M = w.length; B < M; B++)
7263
+ for (let B = 0, x = w.length; B < x; B++)
7258
7264
  w[B] = p.readDataFromBuffer(I, B, w[B]);
7259
7265
  } else
7260
7266
  n[d] = p.readDataFromBuffer(I, 0, n[d]);
@@ -7472,8 +7478,8 @@ class Rc {
7472
7478
  for (let u = 0, g = n.length; u < g; u++) {
7473
7479
  const p = n[u], b = "nullFeatureId" in p ? p.nullFeatureId : null;
7474
7480
  if ("texture" in p) {
7475
- const { channels: E } = p.texture, C = E.map((f) => A[4 * u + f]);
7476
- new Uint8Array(d.buffer).set(C);
7481
+ const { channels: C } = p.texture, E = C.map((m) => A[4 * u + m]);
7482
+ new Uint8Array(d.buffer).set(E);
7477
7483
  const y = d[0];
7478
7484
  y !== b && (o[u] = y);
7479
7485
  }
@@ -7571,7 +7577,7 @@ class Gc extends ac {
7571
7577
  }
7572
7578
  class Uc {
7573
7579
  constructor(e = null, t = null) {
7574
- this.renderer = e, this.camera = t, this.activeTilesets = /* @__PURE__ */ new Set(), this.tilesetStates = /* @__PURE__ */ new Map(), this.pendingQueueTasks = [], this._resolutionVec2 = new m.Vector2();
7580
+ this.renderer = e, this.camera = t, this.activeTilesets = /* @__PURE__ */ new Set(), this.tilesetStates = /* @__PURE__ */ new Map(), this.pendingQueueTasks = [], this._resolutionVec2 = new f.Vector2();
7575
7581
  }
7576
7582
  clamp(e, t, s) {
7577
7583
  return Math.min(s, Math.max(t, e));
@@ -7662,7 +7668,7 @@ class Uc {
7662
7668
  }
7663
7669
  }
7664
7670
  isValidBox3(e) {
7665
- return !e || !(e instanceof m.Box3) || e.isEmpty() ? !1 : Number.isFinite(e.min.x) && Number.isFinite(e.min.y) && Number.isFinite(e.min.z) && Number.isFinite(e.max.x) && Number.isFinite(e.max.y) && Number.isFinite(e.max.z);
7671
+ return !e || !(e instanceof f.Box3) || e.isEmpty() ? !1 : Number.isFinite(e.min.x) && Number.isFinite(e.min.y) && Number.isFinite(e.min.z) && Number.isFinite(e.max.x) && Number.isFinite(e.max.y) && Number.isFinite(e.max.z);
7666
7672
  }
7667
7673
  normalizeUpAxis(e = "+Y") {
7668
7674
  const t = String(e || "+Y").trim().toUpperCase();
@@ -7694,7 +7700,7 @@ class Uc {
7694
7700
  getRootTransformUpVector(e) {
7695
7701
  const t = this.getRootTransformArray(e);
7696
7702
  if (!t) return null;
7697
- const s = new m.Vector3(t[8], t[9], t[10]);
7703
+ const s = new f.Vector3(t[8], t[9], t[10]);
7698
7704
  return s.lengthSq() <= 1e-12 ? null : s.normalize();
7699
7705
  }
7700
7706
  isLikelyGeospatialTileset(e) {
@@ -7727,7 +7733,7 @@ class Uc {
7727
7733
  if (n.lengthSq() <= 1e-12)
7728
7734
  return !1;
7729
7735
  n.normalize();
7730
- const o = new m.Vector3(0, 1, 0), r = new m.Quaternion().setFromUnitVectors(n, o);
7736
+ const o = new f.Vector3(0, 1, 0), r = new f.Quaternion().setFromUnitVectors(n, o);
7731
7737
  return e.geoGroup.quaternion.copy(r), e.geoGroup.updateMatrixWorld(!0), e.hasGeospatialReoriented = !0, !0;
7732
7738
  }
7733
7739
  setUpAxis(e, t = "+Y") {
@@ -7756,7 +7762,7 @@ class Uc {
7756
7762
  return null;
7757
7763
  const s = new so();
7758
7764
  s.setDecoderPath(t.dracoDecoderPath || _c);
7759
- const i = new ee();
7765
+ const i = new te();
7760
7766
  i.setTranscoderPath(t.ktx2TranscoderPath || Pc), this.renderer && i.detectSupport(this.renderer);
7761
7767
  const n = new Fc({
7762
7768
  rtc: !0,
@@ -7768,8 +7774,8 @@ class Uc {
7768
7774
  convertBasicMaterial(e) {
7769
7775
  if (!e?.isMeshBasicMaterial)
7770
7776
  return e;
7771
- const t = new m.MeshStandardMaterial({
7772
- color: e.color ? e.color.clone() : new m.Color(16777215),
7777
+ const t = new f.MeshStandardMaterial({
7778
+ color: e.color ? e.color.clone() : new f.Color(16777215),
7773
7779
  map: e.map || null,
7774
7780
  alphaMap: e.alphaMap || null,
7775
7781
  transparent: e.transparent,
@@ -7798,24 +7804,24 @@ class Uc {
7798
7804
  const i = (n, o = -1) => {
7799
7805
  if (!n) return;
7800
7806
  let r = n;
7801
- n.isMeshBasicMaterial && (t.has(n) ? r = t.get(n) : (r = this.convertBasicMaterial(n), t.set(n, r))), r.map && (r.map.colorSpace = m.SRGBColorSpace, r.map.needsUpdate = !0), r.needsUpdate = !0, o >= 0 && Array.isArray(s.material) ? s.material[o] = r : s.material = r;
7807
+ n.isMeshBasicMaterial && (t.has(n) ? r = t.get(n) : (r = this.convertBasicMaterial(n), t.set(n, r))), r.map && (r.map.colorSpace = f.SRGBColorSpace, r.map.needsUpdate = !0), r.needsUpdate = !0, o >= 0 && Array.isArray(s.material) ? s.material[o] = r : s.material = r;
7802
7808
  };
7803
7809
  Array.isArray(s.material) ? s.material.forEach((n, o) => i(n, o)) : i(s.material);
7804
7810
  });
7805
7811
  }
7806
7812
  updateBoundsAndCenter(e) {
7807
7813
  if (!e) return !1;
7808
- const { tileset: t, tilesGroup: s, upGroup: i, geoGroup: n, modelGroup: o, autoCenter: r } = e, l = new m.Box3(), c = t.getBoundingBox(l) && this.isValidBox3(l);
7814
+ const { tileset: t, tilesGroup: s, upGroup: i, geoGroup: n, modelGroup: o, autoCenter: r } = e, l = new f.Box3(), c = t.getBoundingBox(l) && this.isValidBox3(l);
7809
7815
  if (r && c && !e.hasAutoCentered) {
7810
- const h = l.getCenter(new m.Vector3());
7816
+ const h = l.getCenter(new f.Vector3());
7811
7817
  s.position.set(-h.x, -h.y, -h.z), s.updateMatrixWorld(!0), e.hasAutoCentered = !0;
7812
7818
  }
7813
7819
  o.updateMatrixWorld(!0);
7814
- const A = new m.Box3().setFromObject(o);
7820
+ const A = new f.Box3().setFromObject(o);
7815
7821
  if (this.isValidBox3(A))
7816
7822
  return o.userData.boundingBox = A, !0;
7817
7823
  if (c) {
7818
- const h = l.clone(), d = new m.Matrix4().multiplyMatrices(n.matrix, i.matrix).multiply(s.matrix);
7824
+ const h = l.clone(), d = new f.Matrix4().multiplyMatrices(n.matrix, i.matrix).multiply(s.matrix);
7819
7825
  if (h.applyMatrix4(d), this.isValidBox3(h))
7820
7826
  return o.userData.boundingBox = h, !0;
7821
7827
  }
@@ -7889,10 +7895,10 @@ class Uc {
7889
7895
  stillTilesProcessed: d,
7890
7896
  lastSampleTimeMs: 0,
7891
7897
  lastMovementTimeMs: 0,
7892
- lastPosition: new m.Vector3(),
7893
- lastQuaternion: new m.Quaternion(),
7894
- samplePosition: new m.Vector3(),
7895
- sampleQuaternion: new m.Quaternion(),
7898
+ lastPosition: new f.Vector3(),
7899
+ lastQuaternion: new f.Quaternion(),
7900
+ samplePosition: new f.Vector3(),
7901
+ sampleQuaternion: new f.Quaternion(),
7896
7902
  initialized: !1
7897
7903
  };
7898
7904
  }
@@ -7906,22 +7912,22 @@ class Uc {
7906
7912
  }
7907
7913
  const l = Math.max((r - s.lastSampleTimeMs) / 1e3, 1e-6), c = s.samplePosition.distanceTo(s.lastPosition), A = this.clamp(Math.abs(s.sampleQuaternion.dot(s.lastQuaternion)), -1, 1), h = 2 * Math.acos(A), d = c / l, u = h / l, g = d > s.linearSpeedThreshold, p = u > s.angularSpeedThreshold, b = d > s.fastLinearSpeedThreshold;
7908
7914
  (g || p) && (s.lastMovementTimeMs = r);
7909
- const C = r - s.lastMovementTimeMs >= s.settleDelayMs;
7910
- let y = s.stillErrorTarget, f = s.stillTilesProcessed;
7911
- if (C || (b ? (y = s.fastMovingErrorTarget, f = s.fastMovingTilesProcessed) : (y = s.movingErrorTarget, f = s.movingTilesProcessed)), e.maxTriangles && this.renderer?.info?.render) {
7915
+ const E = r - s.lastMovementTimeMs >= s.settleDelayMs;
7916
+ let y = s.stillErrorTarget, m = s.stillTilesProcessed;
7917
+ if (E || (b ? (y = s.fastMovingErrorTarget, m = s.fastMovingTilesProcessed) : (y = s.movingErrorTarget, m = s.movingTilesProcessed)), e.maxTriangles && this.renderer?.info?.render) {
7912
7918
  const w = this.renderer.info.render.triangles;
7913
7919
  if (Number.isFinite(w) && w > 0) {
7914
- const B = e.maxTriangles * 1.08, M = e.maxTriangles * 0.75;
7915
- w > B ? (y = Math.max(y, y * 1.2 + 0.5), f = Math.max(s.minTilesProcessed, Math.round(f * 0.85))) : w < M && C && (y *= 0.92, f = Math.min(s.maxTilesProcessed, Math.round(f * 1.08)));
7920
+ const B = e.maxTriangles * 1.08, x = e.maxTriangles * 0.75;
7921
+ w > B ? (y = Math.max(y, y * 1.2 + 0.5), m = Math.max(s.minTilesProcessed, Math.round(m * 0.85))) : w < x && E && (y *= 0.92, m = Math.min(s.maxTilesProcessed, Math.round(m * 1.08)));
7916
7922
  }
7917
7923
  }
7918
- y = this.clamp(y, n, o), f = this.clamp(
7919
- Math.round(f),
7924
+ y = this.clamp(y, n, o), m = this.clamp(
7925
+ Math.round(m),
7920
7926
  s.minTilesProcessed,
7921
7927
  s.maxTilesProcessed
7922
7928
  );
7923
7929
  const I = i.errorTarget + (y - i.errorTarget) * s.errorLerp;
7924
- Math.abs(I - i.errorTarget) > 0.04 && (i.errorTarget = I), typeof i.maxTilesProcessed == "number" && Math.abs(i.maxTilesProcessed - f) >= 1 && (i.maxTilesProcessed = f), s.lastSampleTimeMs = r, s.lastPosition.copy(s.samplePosition), s.lastQuaternion.copy(s.sampleQuaternion);
7930
+ Math.abs(I - i.errorTarget) > 0.04 && (i.errorTarget = I), typeof i.maxTilesProcessed == "number" && Math.abs(i.maxTilesProcessed - m) >= 1 && (i.maxTilesProcessed = m), s.lastSampleTimeMs = r, s.lastPosition.copy(s.samplePosition), s.lastQuaternion.copy(s.sampleQuaternion);
7925
7931
  }
7926
7932
  applyOptions(e, t) {
7927
7933
  if (!t)
@@ -7940,7 +7946,7 @@ class Uc {
7940
7946
  return new Promise((s, i) => {
7941
7947
  const n = new Gc(e);
7942
7948
  n.registerPlugin(new Ac()), this.configureScheduling(n), this.applyOptions(n, t), this.configureGltfExtensions(n, t);
7943
- const o = new m.Group(), r = new m.Group(), l = new m.Group();
7949
+ const o = new f.Group(), r = new f.Group(), l = new f.Group();
7944
7950
  o.add(r), r.add(l);
7945
7951
  const c = n.group;
7946
7952
  l.add(c), this.setUpAxis(l, t.up || "+Y");
@@ -8250,7 +8256,7 @@ class Nc {
8250
8256
  this.vrButton && this.vrButton.parentNode && this.vrButton.parentNode.removeChild(this.vrButton), this.isQuest2 = !1, this.isQuest3 = !1, this.isVRSupported = !1, this.isVRPresenting = !1;
8251
8257
  }
8252
8258
  }
8253
- const G = {
8259
+ const N = {
8254
8260
  ComponentState: Object.freeze({
8255
8261
  DEFAULT: "default",
8256
8262
  TOUCHED: "touched",
@@ -8329,7 +8335,7 @@ const Hc = {
8329
8335
  xAxis: 0,
8330
8336
  yAxis: 0,
8331
8337
  button: 0,
8332
- state: G.ComponentState.DEFAULT
8338
+ state: N.ComponentState.DEFAULT
8333
8339
  };
8334
8340
  function qc(a = 0, e = 0) {
8335
8341
  let t = a, s = e;
@@ -8344,7 +8350,7 @@ function qc(a = 0, e = 0) {
8344
8350
  }
8345
8351
  class zc {
8346
8352
  constructor(e) {
8347
- this.componentProperty = e.componentProperty, this.states = e.states, this.valueNodeName = e.valueNodeName, this.valueNodeProperty = e.valueNodeProperty, this.valueNodeProperty === G.VisualResponseProperty.TRANSFORM && (this.minNodeName = e.minNodeName, this.maxNodeName = e.maxNodeName), this.value = 0, this.updateFromComponent(Hc);
8353
+ this.componentProperty = e.componentProperty, this.states = e.states, this.valueNodeName = e.valueNodeName, this.valueNodeProperty = e.valueNodeProperty, this.valueNodeProperty === N.VisualResponseProperty.TRANSFORM && (this.minNodeName = e.minNodeName, this.maxNodeName = e.maxNodeName), this.value = 0, this.updateFromComponent(Hc);
8348
8354
  }
8349
8355
  /**
8350
8356
  * Computes the visual response's interpolation weight based on component state
@@ -8362,17 +8368,17 @@ class zc {
8362
8368
  }) {
8363
8369
  const { normalizedXAxis: n, normalizedYAxis: o } = qc(e, t);
8364
8370
  switch (this.componentProperty) {
8365
- case G.ComponentProperty.X_AXIS:
8371
+ case N.ComponentProperty.X_AXIS:
8366
8372
  this.value = this.states.includes(i) ? n : 0.5;
8367
8373
  break;
8368
- case G.ComponentProperty.Y_AXIS:
8374
+ case N.ComponentProperty.Y_AXIS:
8369
8375
  this.value = this.states.includes(i) ? o : 0.5;
8370
8376
  break;
8371
- case G.ComponentProperty.BUTTON:
8377
+ case N.ComponentProperty.BUTTON:
8372
8378
  this.value = this.states.includes(i) ? s : 0;
8373
8379
  break;
8374
- case G.ComponentProperty.STATE:
8375
- this.valueNodeProperty === G.VisualResponseProperty.VISIBILITY ? this.value = this.states.includes(i) : this.value = this.states.includes(i) ? 1 : 0;
8380
+ case N.ComponentProperty.STATE:
8381
+ this.valueNodeProperty === N.VisualResponseProperty.VISIBILITY ? this.value = this.states.includes(i) : this.value = this.states.includes(i) ? 1 : 0;
8376
8382
  break;
8377
8383
  default:
8378
8384
  throw new Error(`Unexpected visualResponse componentProperty ${this.componentProperty}`);
@@ -8391,7 +8397,7 @@ class jc {
8391
8397
  const i = new zc(t.visualResponses[s]);
8392
8398
  this.visualResponses[s] = i;
8393
8399
  }), this.gamepadIndices = Object.assign({}, t.gamepadIndices), this.values = {
8394
- state: G.ComponentState.DEFAULT,
8400
+ state: N.ComponentState.DEFAULT,
8395
8401
  button: this.gamepadIndices.button !== void 0 ? 0 : void 0,
8396
8402
  xAxis: this.gamepadIndices.xAxis !== void 0 ? 0 : void 0,
8397
8403
  yAxis: this.gamepadIndices.yAxis !== void 0 ? 0 : void 0
@@ -8405,11 +8411,11 @@ class jc {
8405
8411
  * @param {Object} gamepad - The gamepad object from which the component data should be polled
8406
8412
  */
8407
8413
  updateFromGamepad(e) {
8408
- if (this.values.state = G.ComponentState.DEFAULT, this.gamepadIndices.button !== void 0 && e.buttons.length > this.gamepadIndices.button) {
8414
+ if (this.values.state = N.ComponentState.DEFAULT, this.gamepadIndices.button !== void 0 && e.buttons.length > this.gamepadIndices.button) {
8409
8415
  const t = e.buttons[this.gamepadIndices.button];
8410
- this.values.button = t.value, this.values.button = this.values.button < 0 ? 0 : this.values.button, this.values.button = this.values.button > 1 ? 1 : this.values.button, t.pressed || this.values.button === 1 ? this.values.state = G.ComponentState.PRESSED : (t.touched || this.values.button > G.ButtonTouchThreshold) && (this.values.state = G.ComponentState.TOUCHED);
8416
+ this.values.button = t.value, this.values.button = this.values.button < 0 ? 0 : this.values.button, this.values.button = this.values.button > 1 ? 1 : this.values.button, t.pressed || this.values.button === 1 ? this.values.state = N.ComponentState.PRESSED : (t.touched || this.values.button > N.ButtonTouchThreshold) && (this.values.state = N.ComponentState.TOUCHED);
8411
8417
  }
8412
- this.gamepadIndices.xAxis !== void 0 && e.axes.length > this.gamepadIndices.xAxis && (this.values.xAxis = e.axes[this.gamepadIndices.xAxis], this.values.xAxis = this.values.xAxis < -1 ? -1 : this.values.xAxis, this.values.xAxis = this.values.xAxis > 1 ? 1 : this.values.xAxis, this.values.state === G.ComponentState.DEFAULT && Math.abs(this.values.xAxis) > G.AxisTouchThreshold && (this.values.state = G.ComponentState.TOUCHED)), this.gamepadIndices.yAxis !== void 0 && e.axes.length > this.gamepadIndices.yAxis && (this.values.yAxis = e.axes[this.gamepadIndices.yAxis], this.values.yAxis = this.values.yAxis < -1 ? -1 : this.values.yAxis, this.values.yAxis = this.values.yAxis > 1 ? 1 : this.values.yAxis, this.values.state === G.ComponentState.DEFAULT && Math.abs(this.values.yAxis) > G.AxisTouchThreshold && (this.values.state = G.ComponentState.TOUCHED)), Object.values(this.visualResponses).forEach((t) => {
8418
+ this.gamepadIndices.xAxis !== void 0 && e.axes.length > this.gamepadIndices.xAxis && (this.values.xAxis = e.axes[this.gamepadIndices.xAxis], this.values.xAxis = this.values.xAxis < -1 ? -1 : this.values.xAxis, this.values.xAxis = this.values.xAxis > 1 ? 1 : this.values.xAxis, this.values.state === N.ComponentState.DEFAULT && Math.abs(this.values.xAxis) > N.AxisTouchThreshold && (this.values.state = N.ComponentState.TOUCHED)), this.gamepadIndices.yAxis !== void 0 && e.axes.length > this.gamepadIndices.yAxis && (this.values.yAxis = e.axes[this.gamepadIndices.yAxis], this.values.yAxis = this.values.yAxis < -1 ? -1 : this.values.yAxis, this.values.yAxis = this.values.yAxis > 1 ? 1 : this.values.yAxis, this.values.state === N.ComponentState.DEFAULT && Math.abs(this.values.yAxis) > N.AxisTouchThreshold && (this.values.state = N.ComponentState.TOUCHED)), Object.values(this.visualResponses).forEach((t) => {
8413
8419
  t.updateFromComponent(this.values);
8414
8420
  });
8415
8421
  }
@@ -8484,7 +8490,7 @@ class Wc extends ns {
8484
8490
  super.updateMatrixWorld(e), this.motionController && (this.motionController.updateFromGamepad(), Object.values(this.motionController.components).forEach((t) => {
8485
8491
  Object.values(t.visualResponses).forEach((s) => {
8486
8492
  const { valueNode: i, minNode: n, maxNode: o, value: r, valueNodeProperty: l } = s;
8487
- i && (l === G.VisualResponseProperty.VISIBILITY ? i.visible = r : l === G.VisualResponseProperty.TRANSFORM && (i.quaternion.slerpQuaternions(
8493
+ i && (l === N.VisualResponseProperty.VISIBILITY ? i.visible = r : l === N.VisualResponseProperty.TRANSFORM && (i.quaternion.slerpQuaternions(
8488
8494
  n.quaternion,
8489
8495
  o.quaternion,
8490
8496
  r
@@ -8500,7 +8506,7 @@ class Wc extends ns {
8500
8506
  function Xc(a, e) {
8501
8507
  Object.values(a.components).forEach((t) => {
8502
8508
  const { type: s, touchPointNodeName: i, visualResponses: n } = t;
8503
- if (s === G.ComponentType.TOUCHPAD)
8509
+ if (s === N.ComponentType.TOUCHPAD)
8504
8510
  if (t.touchPointNode = e.getObjectByName(i), t.touchPointNode) {
8505
8511
  const o = new Xn(1e-3), r = new ke({ color: 255 }), l = new as(o, r);
8506
8512
  t.touchPointNode.add(l);
@@ -8508,7 +8514,7 @@ function Xc(a, e) {
8508
8514
  console.warn(`Could not find touch dot, ${t.touchPointNodeName}, in touchpad component ${t.id}`);
8509
8515
  Object.values(n).forEach((o) => {
8510
8516
  const { valueNodeName: r, minNodeName: l, maxNodeName: c, valueNodeProperty: A } = o;
8511
- if (A === G.VisualResponseProperty.TRANSFORM) {
8517
+ if (A === N.VisualResponseProperty.TRANSFORM) {
8512
8518
  if (o.minNode = e.getObjectByName(l), o.maxNode = e.getObjectByName(c), !o.minNode) {
8513
8519
  console.warn(`Could not find ${l} in the model`);
8514
8520
  return;
@@ -8591,8 +8597,8 @@ class Zc {
8591
8597
  class $c {
8592
8598
  constructor(e, t) {
8593
8599
  this.renderer = e, this.camera = t, this.controller1 = null, this.controller2 = null, this.controllerGrip1 = null, this.controllerGrip2 = null, this.controllers = [], this.controllerGrips = [], this.buttonStates = /* @__PURE__ */ new Map(), this.inputDeadzone = 0.15, this.turnSmoothingFactor = 0.1, this.lastTurnInput = 0, this.onSelectStart = null, this.onSelectEnd = null, this.onSqueezeStart = null, this.onSqueezeEnd = null, this.onModeToggle = null, this.onMovementStart = null, this.onMovementStop = null, this.handsActive = !1, this.handStates = {
8594
- left: { pinch: !1, fist: !1, direction: new m.Vector3() },
8595
- right: { pinch: !1, fist: !1, direction: new m.Vector3() }
8600
+ left: { pinch: !1, fist: !1, direction: new f.Vector3() },
8601
+ right: { pinch: !1, fist: !1, direction: new f.Vector3() }
8596
8602
  }, this._fallbackHandedness = /* @__PURE__ */ new Map();
8597
8603
  }
8598
8604
  init() {
@@ -8621,26 +8627,26 @@ class $c {
8621
8627
  if (!i || !n || !i.transform || !n.transform)
8622
8628
  this.handStates[s].pinch = !1;
8623
8629
  else {
8624
- const l = new m.Vector3().setFromMatrixPosition(new m.Matrix4().fromArray(i.transform.matrix)), c = new m.Vector3().setFromMatrixPosition(new m.Matrix4().fromArray(n.transform.matrix)), A = l.distanceTo(c);
8630
+ const l = new f.Vector3().setFromMatrixPosition(new f.Matrix4().fromArray(i.transform.matrix)), c = new f.Vector3().setFromMatrixPosition(new f.Matrix4().fromArray(n.transform.matrix)), A = l.distanceTo(c);
8625
8631
  this.handStates[s].pinch = A < 0.025;
8626
8632
  }
8627
8633
  let o = !0;
8628
8634
  const r = t.hand.get("wrist");
8629
8635
  if (r && r.transform) {
8630
- const l = new m.Vector3().setFromMatrixPosition(new m.Matrix4().fromArray(r.transform.matrix));
8636
+ const l = new f.Vector3().setFromMatrixPosition(new f.Matrix4().fromArray(r.transform.matrix));
8631
8637
  for (const c of ["index-finger-tip", "middle-finger-tip", "ring-finger-tip", "pinky-finger-tip"]) {
8632
8638
  const A = t.hand.get(c);
8633
8639
  if (!A || !A.transform) {
8634
8640
  o = !1;
8635
8641
  continue;
8636
8642
  }
8637
- new m.Vector3().setFromMatrixPosition(new m.Matrix4().fromArray(A.transform.matrix)).distanceTo(l) > 0.045 && (o = !1);
8643
+ new f.Vector3().setFromMatrixPosition(new f.Matrix4().fromArray(A.transform.matrix)).distanceTo(l) > 0.045 && (o = !1);
8638
8644
  }
8639
8645
  } else
8640
8646
  o = !1;
8641
8647
  if (this.handStates[s].fist = o, n && r && n.transform && r.transform) {
8642
- const l = new m.Vector3().setFromMatrixPosition(new m.Matrix4().fromArray(r.transform.matrix)), c = new m.Vector3().setFromMatrixPosition(new m.Matrix4().fromArray(n.transform.matrix));
8643
- this.handStates[s].direction = new m.Vector3().subVectors(c, l).normalize();
8648
+ const l = new f.Vector3().setFromMatrixPosition(new f.Matrix4().fromArray(r.transform.matrix)), c = new f.Vector3().setFromMatrixPosition(new f.Matrix4().fromArray(n.transform.matrix));
8649
+ this.handStates[s].direction = new f.Vector3().subVectors(c, l).normalize();
8644
8650
  }
8645
8651
  }
8646
8652
  }
@@ -8776,7 +8782,7 @@ class eA {
8776
8782
  neutralColor: 14870768,
8777
8783
  accentColor: 9741240,
8778
8784
  floorColor: 6583435
8779
- }, this.teleportController = null, this.teleportMarker = null, this.teleportCurve = null, this.teleportFloor = null, this.validTeleportPosition = null, this.teleportThreshold = 0.7, this.teleportReleaseThreshold = 0.3, this.teleportPressed = !1, this.teleportMaxMagnitude = 0, this.teleportMinDistance = 1.5, this.teleportMaxDistance = 20, this.teleportFloorHeight = null, this.teleportFloorMin = -10, this.teleportFloorMax = 10, this.lastSnapTurnTime = 0, this.onTeleport = null, this.onTeleportStart = null, this.onTeleportEnd = null;
8785
+ }, this.teleportController = null, this.teleportMarker = null, this.teleportArch = null, this.teleportCurve = null, this.teleportFloor = null, this.validTeleportPosition = null, this.currentTeleportTarget = null, this.teleportThreshold = 0.7, this.teleportReleaseThreshold = 0.3, this.teleportPressed = !1, this.teleportMaxMagnitude = 0, this.teleportMaxDistance = 20, this.teleportFloorHeight = null, this.teleportFloorMin = -10, this.teleportFloorMax = 10, this.lastSnapTurnTime = 0, this.onTeleport = null, this.onTeleportStart = null, this.onTeleportEnd = null;
8780
8786
  }
8781
8787
  init() {
8782
8788
  this.setupTeleportation();
@@ -8786,39 +8792,51 @@ class eA {
8786
8792
  }
8787
8793
  createTeleportArc() {
8788
8794
  const e = [
8789
- new m.Vector3(0, 0, 0),
8790
- new m.Vector3(0, 1, -5)
8791
- ], t = new m.CatmullRomCurve3(e), s = new m.TubeGeometry(t, 20, 0.03, 8, !1), i = new m.MeshBasicMaterial({
8795
+ new f.Vector3(0, 0, 0),
8796
+ new f.Vector3(0, 1, -5)
8797
+ ], t = new f.CatmullRomCurve3(e), s = new f.TubeGeometry(t, 20, 0.03, 8, !1), i = new f.MeshBasicMaterial({
8792
8798
  color: this.style.accentColor,
8793
8799
  transparent: !0,
8794
8800
  opacity: 0.62,
8795
- side: m.DoubleSide
8801
+ side: f.DoubleSide
8796
8802
  });
8797
- if (this.teleportCurve = new m.Mesh(s, i), this.teleportCurve.visible = !1, this.scene.add(this.teleportCurve), !this.teleportMarker) {
8798
- const n = new m.RingGeometry(0.34, 0.5, 28), o = new m.MeshBasicMaterial({
8803
+ if (this.teleportCurve = new f.Mesh(s, i), this.teleportCurve.visible = !1, this.scene.add(this.teleportCurve), !this.teleportMarker) {
8804
+ const n = new f.RingGeometry(0.34, 0.5, 28), o = new f.MeshBasicMaterial({
8799
8805
  color: this.style.neutralColor,
8800
8806
  transparent: !0,
8801
8807
  opacity: 0.78,
8802
- side: m.DoubleSide
8808
+ side: f.DoubleSide
8803
8809
  });
8804
- this.teleportMarker = new m.Mesh(n, o), this.teleportMarker.rotation.x = -Math.PI / 2, this.teleportMarker.visible = !1, this.scene.add(this.teleportMarker);
8805
- const r = new m.RingGeometry(0.46, 0.72, 28), l = new m.MeshBasicMaterial({
8810
+ this.teleportMarker = new f.Mesh(n, o), this.teleportMarker.rotation.x = -Math.PI / 2, this.teleportMarker.visible = !1, this.scene.add(this.teleportMarker);
8811
+ }
8812
+ if (!this.teleportArch) {
8813
+ const r = 0.07999999999999999, l = 0.34 + r, c = [];
8814
+ for (let u = 0; u <= 24; u++) {
8815
+ const g = u / 24 * Math.PI;
8816
+ c.push(new f.Vector3(
8817
+ Math.cos(g) * l,
8818
+ Math.sin(g) * l,
8819
+ 0
8820
+ ));
8821
+ }
8822
+ const A = new f.CatmullRomCurve3(c), h = new f.TubeGeometry(A, 24, r, 8, !1), d = new f.MeshBasicMaterial({
8806
8823
  color: this.style.accentColor,
8807
8824
  transparent: !0,
8808
- opacity: 0.18,
8809
- side: m.DoubleSide
8810
- }), c = new m.Mesh(r, l);
8811
- c.rotation.x = -Math.PI / 2, this.teleportMarker.add(c);
8825
+ opacity: 0.24,
8826
+ side: f.DoubleSide,
8827
+ depthWrite: !1
8828
+ });
8829
+ this.teleportArch = new f.Mesh(h, d), this.teleportArch.visible = !1, this.scene.add(this.teleportArch);
8812
8830
  }
8813
8831
  if (!this.teleportFloor) {
8814
- const n = new m.PlaneGeometry(14, 14), o = new m.MeshBasicMaterial({
8832
+ const n = new f.PlaneGeometry(14, 14), o = new f.MeshBasicMaterial({
8815
8833
  color: this.style.floorColor,
8816
8834
  transparent: !0,
8817
8835
  opacity: 0.06,
8818
- side: m.DoubleSide,
8836
+ side: f.DoubleSide,
8819
8837
  visible: !1
8820
8838
  });
8821
- this.teleportFloor = new m.Mesh(n, o), this.teleportFloor.rotation.x = -Math.PI / 2, this.teleportFloor.visible = !1, this.scene.add(this.teleportFloor);
8839
+ this.teleportFloor = new f.Mesh(n, o), this.teleportFloor.rotation.x = -Math.PI / 2, this.teleportFloor.visible = !1, this.scene.add(this.teleportFloor);
8822
8840
  }
8823
8841
  }
8824
8842
  executeTeleport() {
@@ -8837,6 +8855,7 @@ class eA {
8837
8855
  o();
8838
8856
  }
8839
8857
  processSnapTurn(e, t = 30) {
8858
+ if (this.teleportPressed) return;
8840
8859
  this.lastSnapTurnTime || (this.lastSnapTurnTime = 0);
8841
8860
  const s = Date.now();
8842
8861
  if (!(s - this.lastSnapTurnTime < 500) && Math.abs(e) > 0.7) {
@@ -8849,91 +8868,124 @@ class eA {
8849
8868
  for (; e < -Math.PI; ) e += 2 * Math.PI;
8850
8869
  return e;
8851
8870
  }
8852
- processTeleportation(e, t, s) {
8853
- const i = Math.sqrt(t * t + s * s), n = e && e.inputSource && e.inputSource.handedness === "right", o = s;
8854
- if (i > this.teleportThreshold && !this.teleportPressed)
8855
- this.teleportPressed = !0, this.teleportMaxMagnitude = i, this.teleportController = e, this.teleportFloorHeight = this.camera.parent.position.y, this.showTeleportArc(), this.onTeleportStart && this.onTeleportStart();
8856
- else if (this.teleportPressed) {
8857
- if (this.teleportMaxMagnitude = Math.max(this.teleportMaxMagnitude, i), n && Math.abs(o) > 0.1) {
8858
- const r = 0.06666666666666667;
8859
- this.teleportFloorHeight += o * r, this.teleportFloorHeight = Math.max(this.teleportFloorMin, Math.min(this.teleportFloorMax, this.teleportFloorHeight)), this.updateTeleportFloor();
8860
- }
8861
- this.updateTeleportArc(), i < this.teleportReleaseThreshold && (this.calculateAndExecuteTeleport(), this.hideTeleportArc(), this.teleportPressed = !1, this.teleportMaxMagnitude = 0, this.teleportController = null, this.onTeleportEnd && this.onTeleportEnd());
8862
- }
8871
+ processTeleportation(e, t) {
8872
+ const s = Math.abs(t);
8873
+ if (s > this.teleportThreshold && !this.teleportPressed) {
8874
+ this.teleportPressed = !0, this.teleportMaxMagnitude = s, this.teleportController = e;
8875
+ const i = this.camera.parent.position.y;
8876
+ this.teleportFloorHeight = i, this.teleportFloorMin = i - 10, this.teleportFloorMax = i + 10, this.showTeleportArc(), this.onTeleportStart && this.onTeleportStart();
8877
+ } else this.teleportPressed && (this.teleportMaxMagnitude = Math.max(this.teleportMaxMagnitude, s), this.updateTeleportArc(), s < this.teleportReleaseThreshold && (this.calculateAndExecuteTeleport(), this.hideTeleportArc(), this.teleportPressed = !1, this.teleportMaxMagnitude = 0, this.teleportController = null, this.onTeleportEnd && this.onTeleportEnd()));
8863
8878
  }
8864
8879
  showTeleportArc() {
8865
- this.teleportCurve || this.createTeleportArc(), this.teleportCurve.visible = !0, this.teleportMarker && (this.teleportMarker.visible = !0, this.teleportMarker.children && this.teleportMarker.children.length > 0 && this.teleportMarker.children.forEach((e) => e.visible = !0)), this.updateTeleportFloor();
8880
+ this.teleportCurve || this.createTeleportArc(), this.teleportCurve.visible = !0, this.teleportMarker && (this.teleportMarker.visible = !1), this.teleportArch && (this.teleportArch.visible = !1), this.updateTeleportFloor();
8866
8881
  }
8867
8882
  hideTeleportArc() {
8868
- this.teleportCurve && (this.teleportCurve.visible = !1), this.teleportMarker && (this.teleportMarker.visible = !1, this.teleportMarker.children && this.teleportMarker.children.length > 0 && this.teleportMarker.children.forEach((e) => e.visible = !1)), this.teleportFloor && (this.teleportFloor.visible = !1);
8883
+ this.teleportCurve && (this.teleportCurve.visible = !1), this.teleportMarker && (this.teleportMarker.visible = !1), this.teleportArch && (this.teleportArch.visible = !1), this.teleportFloor && (this.teleportFloor.visible = !1), this.currentTeleportTarget = null;
8869
8884
  }
8870
8885
  updateTeleportArc() {
8871
8886
  if (!this.teleportController || !this.teleportCurve) return;
8872
- const e = new m.Vector3();
8873
- this.teleportController.getWorldPosition(e);
8874
- const t = new m.Quaternion();
8875
- this.teleportController.getWorldQuaternion(t);
8876
- const s = new m.Vector3(0, 0, -1);
8877
- s.applyQuaternion(t);
8878
- const i = this.teleportMinDistance, n = this.teleportMaxDistance, o = Math.min(this.teleportMaxMagnitude / this.teleportThreshold, 1), r = n - i, l = Math.pow(o, 0.78), c = i + r * l, A = [], h = 32, d = -9.8;
8879
- let u = Math.sqrt(c * Math.abs(d) / 2);
8880
- if (s.y > 0.3 ? u *= 1 - s.y * 0.5 : s.y < -0.5 && (u *= 1 + Math.abs(s.y) * 0.3), Math.sqrt(s.x * s.x + s.z * s.z) > 0.1) {
8881
- const x = Math.min(1, c / (u * 2));
8882
- u *= x;
8883
- }
8884
- const p = s.x * u, b = Math.max(s.y * u, u * 0.3), E = s.z * u, C = b / Math.abs(d), y = Math.max(C * 2.2, 1.5), f = this.teleportFloorHeight;
8885
- let I = null, w = !1, B = e.y, M = 0;
8886
- const S = 8;
8887
- for (let x = 0; x <= h; x++) {
8888
- const R = x / h * y, L = new m.Vector3(
8889
- e.x + p * R,
8890
- e.y + b * R + 0.5 * d * R * R,
8891
- e.z + E * R
8887
+ const e = new f.Quaternion();
8888
+ this.teleportController.getWorldQuaternion(e);
8889
+ const t = new f.Vector3(0, 0, -1);
8890
+ t.applyQuaternion(e);
8891
+ const s = new f.Vector3();
8892
+ this.teleportController.getWorldPosition(s), s.addScaledVector(t, 0.07);
8893
+ const i = Math.sqrt(t.x * t.x + t.z * t.z);
8894
+ if (i < 0.12 && t.y > 0) {
8895
+ const S = new f.Vector3();
8896
+ if (this.camera.getWorldDirection(S), S.y = 0, S.lengthSq() > 0) {
8897
+ S.normalize();
8898
+ const Q = 0.12 - i;
8899
+ t.x += S.x * Q, t.z += S.z * Q, t.normalize();
8900
+ }
8901
+ }
8902
+ const n = this.teleportMaxDistance, o = Math.min(this.teleportMaxMagnitude / this.teleportThreshold, 1), r = Math.pow(o, 0.78), l = n * r, c = [], A = 32, h = -9.8, d = this.teleportFloorHeight, u = d - s.y;
8903
+ let g = Math.sqrt(l * Math.abs(h) / 2);
8904
+ t.y < 0 && (g *= Math.max(0.25, 1 - Math.abs(t.y) * 0.75));
8905
+ const p = t.x * g, b = t.z * g;
8906
+ let C = (t.y + 0.15) * g;
8907
+ if (u > 0.5) {
8908
+ const S = Math.sqrt(2 * Math.abs(h) * u) * 1.2;
8909
+ C = Math.max(C, S);
8910
+ }
8911
+ const E = C / Math.abs(h), y = 0.4 + (1 - Math.max(0, -t.y)) * 1.1, m = Math.max(E * 2.2, y);
8912
+ let I = null, w = !1, B = s.y, x = 0;
8913
+ const v = Math.max(8, Math.abs(u) * 1.5 + 2);
8914
+ for (let S = 0; S <= A; S++) {
8915
+ const Q = S / A * m, D = new f.Vector3(
8916
+ s.x + p * Q,
8917
+ s.y + C * Q + 0.5 * h * Q * Q,
8918
+ s.z + b * Q
8892
8919
  );
8893
- Math.abs(L.y - e.y) > S && (L.y = e.y + Math.sign(L.y - e.y) * S), !w && L.y < B && (w = !0, M = R), A.push(L);
8894
- const q = w ? R - M : 0, Q = w && q > 0.1;
8895
- if (!I && Q && L.y <= f) {
8896
- if (x > 0) {
8897
- const z = A[x - 1], F = (f - z.y) / (L.y - z.y);
8898
- I = new m.Vector3().lerpVectors(z, L, F), I.y = f;
8920
+ Math.abs(D.y - s.y) > v && (D.y = s.y + Math.sign(D.y - s.y) * v), !w && D.y < B && (w = !0, x = Q), c.push(D);
8921
+ const G = w ? Q - x : 0, T = w && G > 0.1;
8922
+ if (!I && T && D.y <= d) {
8923
+ if (S > 0) {
8924
+ const U = c[S - 1], F = (d - U.y) / (D.y - U.y);
8925
+ I = new f.Vector3().lerpVectors(U, D, F), I.y = d;
8899
8926
  } else
8900
- I = L.clone(), I.y = f;
8901
- A[x] = I, A.length = x + 1;
8927
+ I = D.clone(), I.y = d;
8928
+ c[S] = I, c.length = S + 1;
8902
8929
  break;
8903
8930
  }
8904
- if (B = L.y, Math.sqrt(
8905
- Math.pow(L.x - e.x, 2) + Math.pow(L.z - e.z, 2)
8906
- ) > n) {
8907
- Q && (I = new m.Vector3(L.x, f, L.z), A[x] = I, A.length = x + 1);
8931
+ B = D.y;
8932
+ const K = Math.sqrt(
8933
+ Math.pow(D.x - s.x, 2) + Math.pow(D.z - s.z, 2)
8934
+ );
8935
+ if (T && K > n) {
8936
+ if (S > 0) {
8937
+ const U = c[S - 1], F = Math.sqrt(
8938
+ Math.pow(U.x - s.x, 2) + Math.pow(U.z - s.z, 2)
8939
+ ), O = K > F ? (n - F) / (K - F) : 0.5;
8940
+ I = new f.Vector3(
8941
+ U.x + (D.x - U.x) * O,
8942
+ d,
8943
+ U.z + (D.z - U.z) * O
8944
+ ), c[S] = I, c.length = S + 1;
8945
+ }
8908
8946
  break;
8909
8947
  }
8910
8948
  }
8911
- if (!I && A.length > 0) {
8912
- let x = A[0], R = 0;
8913
- for (let L = 1; L < A.length; L++)
8914
- A[L].y < x.y && (x = A[L], R = L);
8915
- R > A.length / 3 && (I = new m.Vector3(x.x, f, x.z), A.length = R + 1, A[R] = I);
8916
- }
8917
- if (A.length > 1) {
8918
- const x = new m.CatmullRomCurve3(A), R = new m.TubeGeometry(x, 20, 0.022, 6, !1);
8919
- this.teleportCurve.geometry && this.teleportCurve.geometry.dispose(), this.teleportCurve.geometry = R;
8920
- }
8921
- this.teleportMarker && I && (this.teleportMarker.position.copy(I), this.teleportMarker.visible = !0, this.teleportMarker.material.color.setHex(this.style.neutralColor));
8949
+ if (!I && c.length > 0) {
8950
+ let S = c[0], Q = 0;
8951
+ for (let D = 1; D < c.length; D++)
8952
+ c[D].y < S.y && (S = c[D], Q = D);
8953
+ Q > c.length / 3 && (I = new f.Vector3(S.x, d, S.z), c.length = Q + 1, c[Q] = I);
8954
+ }
8955
+ if (c.length > 1) {
8956
+ const S = new f.CatmullRomCurve3(c, !1, "centripetal"), Q = new f.TubeGeometry(S, 20, 0.012, 6, !1);
8957
+ this.teleportCurve.geometry && this.teleportCurve.geometry.dispose(), this.teleportCurve.geometry = Q;
8958
+ }
8959
+ if (this.currentTeleportTarget = I ? I.clone() : null, this.teleportMarker && (I ? (this.teleportMarker.position.copy(I), this.teleportMarker.rotation.set(-Math.PI / 2, 0, 0), this.teleportMarker.material.opacity = 0.78, this.teleportMarker.material.color.setHex(this.style.neutralColor), this.teleportMarker.visible = !0) : this.teleportMarker.visible = !1), this.teleportArch)
8960
+ if (I) {
8961
+ this.teleportArch.position.copy(I);
8962
+ const S = new f.Vector3();
8963
+ this.camera.getWorldPosition(S);
8964
+ const Q = new f.Vector3(
8965
+ S.x,
8966
+ I.y,
8967
+ S.z
8968
+ );
8969
+ this.teleportArch.lookAt(Q);
8970
+ const D = S.distanceTo(I), G = f.MathUtils.clamp((D - 2.5) / 7.5, 0, 1);
8971
+ this.teleportArch.material.opacity = 0.24 * G, this.teleportArch.visible = G > 0.01;
8972
+ } else
8973
+ this.teleportArch.visible = !1;
8922
8974
  }
8923
8975
  updateTeleportFloor() {
8924
- this.teleportFloor && this.teleportFloorHeight !== null && (this.teleportFloor.position.y = this.teleportFloorHeight, this.teleportFloor.visible = !0, this.teleportFloor.material.visible = !0, this.teleportFloor.material.opacity = 0.06, this.teleportFloor.material.color.setHex(this.style.floorColor), this.updateTeleportArc());
8976
+ this.teleportFloorHeight !== null && (this.teleportFloor && (this.teleportFloor.position.y = this.teleportFloorHeight), this.updateTeleportArc());
8925
8977
  }
8926
8978
  updateTeleportArcHeight() {
8927
8979
  this.updateTeleportFloor();
8928
8980
  }
8929
8981
  calculateAndExecuteTeleport() {
8930
- if (!(!this.teleportController || this.teleportMaxMagnitude < this.teleportThreshold) && this.teleportMarker && this.teleportMarker.visible) {
8931
- const e = this.teleportMarker.position.clone(), t = this.camera.parent.position, s = Math.sqrt(
8982
+ if (!(!this.teleportController || this.teleportMaxMagnitude < this.teleportThreshold) && this.currentTeleportTarget) {
8983
+ const e = this.currentTeleportTarget.clone(), t = this.camera.parent.position;
8984
+ if (Math.sqrt(
8932
8985
  Math.pow(e.x - t.x, 2) + Math.pow(e.z - t.z, 2)
8933
- );
8934
- if (s >= this.teleportMinDistance && s <= this.teleportMaxDistance) {
8935
- const i = new m.Vector3(e.x, this.teleportFloorHeight, e.z);
8936
- this.validTeleportPosition = i, this.executeTeleport(), this.teleportFloorHeight = null;
8986
+ ) <= this.teleportMaxDistance) {
8987
+ const i = new f.Vector3(e.x, this.teleportFloorHeight, e.z);
8988
+ this.validTeleportPosition = i, this.executeTeleport(), this.teleportFloorHeight = null, this.currentTeleportTarget = null;
8937
8989
  }
8938
8990
  }
8939
8991
  }
@@ -8953,7 +9005,7 @@ class eA {
8953
9005
  this.teleportPressed = !1, this.teleportMaxMagnitude = 0, this.teleportController = null, this.validTeleportPosition = null, this.hideTeleportArc();
8954
9006
  }
8955
9007
  dispose() {
8956
- this.teleportCurve && (this.teleportCurve.geometry && this.teleportCurve.geometry.dispose(), this.teleportCurve.material && this.teleportCurve.material.dispose(), this.scene.remove(this.teleportCurve)), this.teleportMarker && (this.teleportMarker.geometry && this.teleportMarker.geometry.dispose(), this.teleportMarker.material && this.teleportMarker.material.dispose(), this.scene.remove(this.teleportMarker)), this.teleportFloor && (this.teleportFloor.geometry && this.teleportFloor.geometry.dispose(), this.teleportFloor.material && this.teleportFloor.material.dispose(), this.scene.remove(this.teleportFloor)), this.resetTeleportState();
9008
+ this.teleportCurve && (this.teleportCurve.geometry && this.teleportCurve.geometry.dispose(), this.teleportCurve.material && this.teleportCurve.material.dispose(), this.scene.remove(this.teleportCurve)), this.teleportMarker && (this.teleportMarker.geometry && this.teleportMarker.geometry.dispose(), this.teleportMarker.material && this.teleportMarker.material.dispose(), this.scene.remove(this.teleportMarker)), this.teleportArch && (this.teleportArch.geometry && this.teleportArch.geometry.dispose(), this.teleportArch.material && this.teleportArch.material.dispose(), this.scene.remove(this.teleportArch)), this.teleportFloor && (this.teleportFloor.geometry && this.teleportFloor.geometry.dispose(), this.teleportFloor.material && this.teleportFloor.material.dispose(), this.scene.remove(this.teleportFloor)), this.resetTeleportState();
8957
9009
  }
8958
9010
  resetSnapTurnState() {
8959
9011
  this.lastSnapTurnTime = 0;
@@ -8961,7 +9013,7 @@ class eA {
8961
9013
  }
8962
9014
  class tA {
8963
9015
  constructor(e, t) {
8964
- this.camera = e, this.renderer = t, this.MOVE_SPEED = 2, this.TURN_SPEED = 1.5, this.FLY_SPEED = 1, this.currentSpeed = 0, this.targetSpeed = 0, this.currentBoostLevel = 0, this.targetBoostLevel = 0, this.SPEED_RAMP_RATE = 3, this.BOOST_RAMP_RATE = 6, this.handMoveActive = !1, this.handMoveBoost = !1, this.handMoveDirection = new m.Vector3(), this.isMoving = !1, this.inputDeadzone = 0.15, this.turnSmoothingFactor = 0.1, this.lastTurnInput = 0, this.comfortSettings = {
9016
+ this.camera = e, this.renderer = t, this.MOVE_SPEED = 2, this.TURN_SPEED = 1.5, this.FLY_SPEED = 1, this.currentSpeed = 0, this.targetSpeed = 0, this.currentBoostLevel = 0, this.targetBoostLevel = 0, this.SPEED_RAMP_RATE = 3, this.BOOST_RAMP_RATE = 6, this.handMoveActive = !1, this.handMoveBoost = !1, this.handMoveDirection = new f.Vector3(), this.isMoving = !1, this.inputDeadzone = 0.15, this.turnSmoothingFactor = 0.1, this.lastTurnInput = 0, this.comfortSettings = {
8965
9017
  locomotionMode: "smooth",
8966
9018
  // 'smooth', 'teleport'
8967
9019
  turningMode: "smooth",
@@ -8998,7 +9050,7 @@ class tA {
8998
9050
  if (s && t.updateHandGestures && t.handsActive) {
8999
9051
  t.updateHandGestures();
9000
9052
  let u = null;
9001
- const g = new m.Vector3();
9053
+ const g = new f.Vector3();
9002
9054
  let p = !1;
9003
9055
  for (const b of ["left", "right"])
9004
9056
  if (t.handStates[b].pinch) {
@@ -9007,8 +9059,8 @@ class tA {
9007
9059
  }
9008
9060
  if (u) {
9009
9061
  this.handMoveActive = !0, this.handMoveBoost = p, this.handMoveDirection.copy(g);
9010
- const b = this.camera.parent || this.camera, E = this.MOVE_SPEED * (p ? 3 : 1) * e;
9011
- b.position.addScaledVector(g, E), this.isMoving = !0, this.onMovementStart && !this._wasMoving && this.onMovementStart(), this.onMovementUpdate && this.onMovementUpdate({
9062
+ const b = this.camera.parent || this.camera, C = this.MOVE_SPEED * (p ? 3 : 1) * e;
9063
+ b.position.addScaledVector(g, C), this.isMoving = !0, this.onMovementStart && !this._wasMoving && this.onMovementStart(), this.onMovementUpdate && this.onMovementUpdate({
9012
9064
  isMoving: !0,
9013
9065
  currentSpeed: this.MOVE_SPEED,
9014
9066
  isBoosted: p,
@@ -9024,49 +9076,51 @@ class tA {
9024
9076
  const g = i[u];
9025
9077
  if (!g || !g.gamepad || !g.gamepad.buttons || !g.gamepad.axes || g.gamepad.axes.length < 4)
9026
9078
  continue;
9027
- const p = g.gamepad, E = g.handedness === "left" ? t.controller1 : t.controller2;
9028
- if (!E) continue;
9029
- const C = p.axes[2] || 0, y = p.axes[3] || 0;
9079
+ const p = g.gamepad, C = g.handedness === "left" ? t.controller1 : t.controller2;
9080
+ if (!C) continue;
9081
+ const E = p.axes[2] || 0, y = p.axes[3] || 0, m = this.comfortSettings.locomotionMode === "teleport" && this.teleportSystem && C, I = this.teleportSystem && this.teleportSystem.teleportPressed, w = I && this.teleportSystem.teleportController === C, B = I && !w;
9030
9082
  if (g.handedness === "left") {
9031
- const f = p.buttons[1], I = f && f.pressed ? 3 : 1, w = this.comfortSettings.reducedMotion ? this.comfortSettings.comfortSpeed : 1;
9032
- if (f && f.pressed && (r = !0), this.comfortSettings.locomotionMode === "teleport" && this.teleportSystem && E) {
9033
- this.teleportSystem.processTeleportation(E, C, y);
9083
+ const x = p.buttons[1], v = x && x.pressed ? 3 : 1, S = this.comfortSettings.reducedMotion ? this.comfortSettings.comfortSpeed : 1;
9084
+ if (x && x.pressed && (r = !0), m && (w || !I)) {
9085
+ this.teleportSystem.processTeleportation(C, y), this.comfortSettings.turningMode === "snap" && this.teleportSystem.processSnapTurn(E, this.comfortSettings.snapTurnAngle);
9034
9086
  continue;
9035
- } else {
9036
- const M = new m.Vector3();
9037
- this.camera.getWorldDirection(M), M.y = 0, M.normalize();
9038
- const S = new m.Vector3().crossVectors(M, this.camera.up).normalize();
9087
+ } else if (B)
9088
+ Math.abs(y) > 0.1 && this.teleportSystem.adjustFloorHeight(-y * (4 * e));
9089
+ else {
9090
+ const Q = new f.Vector3();
9091
+ this.camera.getWorldDirection(Q), Q.y = 0, Q.normalize();
9092
+ const D = new f.Vector3().crossVectors(Q, this.camera.up).normalize();
9039
9093
  if (Math.abs(y) > 0.1) {
9040
- const x = this.MOVE_SPEED * I * w * this.currentSpeed * e;
9041
- n.position.addScaledVector(M, -y * x), o = !0;
9094
+ const G = this.MOVE_SPEED * v * S * this.currentSpeed * e;
9095
+ n.position.addScaledVector(Q, -y * G), o = !0;
9042
9096
  }
9043
- if (Math.abs(C) > 0.1) {
9044
- const x = this.MOVE_SPEED * I * w * this.currentSpeed * e;
9045
- n.position.addScaledVector(S, C * x), o = !0;
9097
+ if (Math.abs(E) > 0.1) {
9098
+ const G = this.MOVE_SPEED * v * S * this.currentSpeed * e;
9099
+ n.position.addScaledVector(D, E * G), o = !0;
9046
9100
  }
9047
9101
  }
9048
9102
  }
9049
9103
  if (g.handedness === "right") {
9050
- const f = p.buttons[1], I = f && f.pressed ? 3 : 1, w = this.comfortSettings.reducedMotion ? this.comfortSettings.comfortSpeed : 1;
9051
- if (f && f.pressed && Math.abs(y) > 0.1 && (r = !0), this.teleportSystem && this.teleportSystem.teleportPressed && this.teleportSystem.teleportCurve && this.teleportSystem.teleportCurve.visible) {
9052
- if (Math.abs(y) > 0.1) {
9053
- const B = 4 * e;
9054
- this.teleportSystem.adjustFloorHeight(y * B);
9055
- }
9056
- } else {
9104
+ const x = p.buttons[1], v = x && x.pressed ? 3 : 1, S = this.comfortSettings.reducedMotion ? this.comfortSettings.comfortSpeed : 1;
9105
+ if (x && x.pressed && Math.abs(y) > 0.1 && (r = !0), m && (w || !I)) {
9106
+ this.teleportSystem.processTeleportation(C, y), this.comfortSettings.turningMode === "snap" && this.teleportSystem.processSnapTurn(E, this.comfortSettings.snapTurnAngle);
9107
+ continue;
9108
+ } else if (B)
9109
+ Math.abs(y) > 0.1 && this.teleportSystem.adjustFloorHeight(-y * (4 * e));
9110
+ else {
9057
9111
  if (this.comfortSettings.turningMode === "snap" && this.teleportSystem)
9058
- this.teleportSystem.processSnapTurn(C, this.comfortSettings.snapTurnAngle);
9059
- else if (Math.abs(C) > this.inputDeadzone) {
9060
- const B = this.lastTurnInput * this.turnSmoothingFactor + C * (1 - this.turnSmoothingFactor);
9061
- if (this.lastTurnInput = B, Math.abs(B) > this.inputDeadzone) {
9062
- const M = this.comfortSettings.reducedMotion ? this.TURN_SPEED * 0.5 : this.TURN_SPEED, S = B * M * Math.min(e, 1 / 30);
9063
- n.rotation.y -= S, n.rotation.y = this.normalizeAngle(n.rotation.y);
9112
+ this.teleportSystem.processSnapTurn(E, this.comfortSettings.snapTurnAngle);
9113
+ else if (Math.abs(E) > this.inputDeadzone) {
9114
+ const Q = this.lastTurnInput * this.turnSmoothingFactor + E * (1 - this.turnSmoothingFactor);
9115
+ if (this.lastTurnInput = Q, Math.abs(Q) > this.inputDeadzone) {
9116
+ const D = this.comfortSettings.reducedMotion ? this.TURN_SPEED * 0.5 : this.TURN_SPEED, G = Q * D * Math.min(e, 1 / 30);
9117
+ n.rotation.y -= G, n.rotation.y = this.normalizeAngle(n.rotation.y);
9064
9118
  }
9065
9119
  } else
9066
9120
  this.lastTurnInput *= 0.9;
9067
- if (Math.abs(y) > 0.1) {
9068
- const B = this.FLY_SPEED * I * w * this.currentSpeed * e;
9069
- n.position.y -= y * B, o = !0;
9121
+ if (Math.abs(y) > 0.1 && this.comfortSettings.locomotionMode !== "teleport") {
9122
+ const Q = this.FLY_SPEED * v * S * this.currentSpeed * e;
9123
+ n.position.y -= y * Q, o = !0;
9070
9124
  }
9071
9125
  }
9072
9126
  }
@@ -9745,7 +9799,7 @@ class oA {
9745
9799
  this.buttonObserver && (this.buttonObserver.disconnect(), this.buttonObserver = null), this.arButton && this.arButton.parentNode && this.arButton.parentNode.removeChild(this.arButton), this.isQuest2 = !1, this.isQuest3 = !1, this.isARSupported = !1, this.isARPresenting = !1;
9746
9800
  }
9747
9801
  }
9748
- const Mn = new P(), xn = new v();
9802
+ const Mn = new P(), xn = new M();
9749
9803
  class Qn {
9750
9804
  /**
9751
9805
  * Constructs a new XR hand primitive model.
@@ -9925,11 +9979,11 @@ class cA {
9925
9979
  }
9926
9980
  class AA {
9927
9981
  constructor(e) {
9928
- this.renderer = e, this.handModelFactory = new cA(), this.hand1 = null, this.hand2 = null, this.interactionEnabled = !0, this.dragging = !1, this.scaling = !1, this.rotating = !1, this.dragStartPos = new m.Vector3(), this.scaleStartDistance = 0, this.rotateStartAngle = 0, this.pinchIntent = {
9982
+ this.renderer = e, this.handModelFactory = new cA(), this.hand1 = null, this.hand2 = null, this.interactionEnabled = !0, this.dragging = !1, this.scaling = !1, this.rotating = !1, this.dragStartPos = new f.Vector3(), this.scaleStartDistance = 0, this.rotateStartAngle = 0, this.pinchIntent = {
9929
9983
  hand1Start: 0,
9930
9984
  hand2Start: 0,
9931
9985
  delay: 100
9932
- }, this.inertiaActive = !1, this.posVelocity = new m.Vector3(), this.rotVelocity = 0, this.scaleVelocity = 0, this.POSITION_DAMPING = 100, this.ROTATION_DAMPING = 8, this.SCALE_DAMPING = 8, this.MAX_ROT_VELOCITY = Math.PI, this.MAX_SCALE_VELOCITY = 0.5, this.MIN_SCALE = 0.01, this.MAX_SCALE = 1, this.VELOCITY_DEAD_ZONE = 1e-3, this.DISTANCE_GAIN_THRESHOLD = 5, this.MAX_DISTANCE_GAIN = 3, this.MAX_DELTA_PER_FRAME = 0.5, this.VELOCITY_SMOOTHING = 0.3, this.tempVec1 = new m.Vector3(), this.tempVec2 = new m.Vector3(), this.onGestureStart = null, this.onGestureEnd = null;
9986
+ }, this.inertiaActive = !1, this.posVelocity = new f.Vector3(), this.rotVelocity = 0, this.scaleVelocity = 0, this.POSITION_DAMPING = 100, this.ROTATION_DAMPING = 8, this.SCALE_DAMPING = 8, this.MAX_ROT_VELOCITY = Math.PI, this.MAX_SCALE_VELOCITY = 0.5, this.MIN_SCALE = 0.01, this.MAX_SCALE = 1, this.VELOCITY_DEAD_ZONE = 1e-3, this.DISTANCE_GAIN_THRESHOLD = 5, this.MAX_DISTANCE_GAIN = 3, this.MAX_DELTA_PER_FRAME = 0.5, this.VELOCITY_SMOOTHING = 0.3, this.tempVec1 = new f.Vector3(), this.tempVec2 = new f.Vector3(), this.onGestureStart = null, this.onGestureEnd = null;
9933
9987
  }
9934
9988
  init(e) {
9935
9989
  this.hand1 = this.setupHand(e, 0, "hand1Start"), this.hand2 = this.setupHand(e, 1, "hand2Start");
@@ -9948,7 +10002,7 @@ class AA {
9948
10002
  }
9949
10003
  styleHandModel(e, t, s) {
9950
10004
  e.traverse((i) => {
9951
- i.isMesh && (i.material = new m.MeshStandardMaterial({
10005
+ i.isMesh && (i.material = new f.MeshStandardMaterial({
9952
10006
  color: t,
9953
10007
  roughness: 0.8,
9954
10008
  metalness: 0.2,
@@ -9999,17 +10053,17 @@ class AA {
9999
10053
  } else {
10000
10054
  const c = this.tempVec1.distanceTo(this.tempVec2), A = c / this.scaleStartDistance, h = Math.log(t.scale.x), d = Math.log(A), u = h + d, g = Math.max(this.MIN_SCALE, Math.min(this.MAX_SCALE, Math.exp(u)));
10001
10055
  if (t.scale.setScalar(g), e > 0) {
10002
- const y = d / e, f = Math.max(-this.MAX_SCALE_VELOCITY, Math.min(this.MAX_SCALE_VELOCITY, y));
10003
- this.scaleVelocity = this.scaleVelocity * (1 - this.VELOCITY_SMOOTHING) + f * this.VELOCITY_SMOOTHING;
10056
+ const y = d / e, m = Math.max(-this.MAX_SCALE_VELOCITY, Math.min(this.MAX_SCALE_VELOCITY, y));
10057
+ this.scaleVelocity = this.scaleVelocity * (1 - this.VELOCITY_SMOOTHING) + m * this.VELOCITY_SMOOTHING;
10004
10058
  }
10005
10059
  this.scaleStartDistance = c;
10006
- const p = this.tempVec2.x - this.tempVec1.x, b = this.tempVec2.z - this.tempVec1.z, E = Math.atan2(b, p);
10007
- let C = E - this.rotateStartAngle;
10008
- if (C > Math.PI && (C -= 2 * Math.PI), C < -Math.PI && (C += 2 * Math.PI), t.rotation.y -= C, e > 0) {
10009
- const y = -C / e, f = Math.max(-this.MAX_ROT_VELOCITY, Math.min(this.MAX_ROT_VELOCITY, y));
10010
- this.rotVelocity = this.rotVelocity * (1 - this.VELOCITY_SMOOTHING) + f * this.VELOCITY_SMOOTHING;
10060
+ const p = this.tempVec2.x - this.tempVec1.x, b = this.tempVec2.z - this.tempVec1.z, C = Math.atan2(b, p);
10061
+ let E = C - this.rotateStartAngle;
10062
+ if (E > Math.PI && (E -= 2 * Math.PI), E < -Math.PI && (E += 2 * Math.PI), t.rotation.y -= E, e > 0) {
10063
+ const y = -E / e, m = Math.max(-this.MAX_ROT_VELOCITY, Math.min(this.MAX_ROT_VELOCITY, y));
10064
+ this.rotVelocity = this.rotVelocity * (1 - this.VELOCITY_SMOOTHING) + m * this.VELOCITY_SMOOTHING;
10011
10065
  }
10012
- this.rotateStartAngle = E;
10066
+ this.rotateStartAngle = C;
10013
10067
  }
10014
10068
  }
10015
10069
  onPinchEnd() {
@@ -10048,7 +10102,7 @@ class hA extends yt {
10048
10102
  worldCubeSize: 1e3,
10049
10103
  worldCubeOpacity: 0.1,
10050
10104
  ...i
10051
- }, this.container = n, this.arCore = new oA(e, t, s, n), this.handTracking = this.config.enableHandTracking ? new AA(e) : null, this.modelGroup = new m.Group(), this.modelGroup.name = "AR Model Group", this.scene.add(this.modelGroup), this.currentModel = null, this.pendingModel = null, this.pendingModelConfig = null, this.currentModelScale = this.config.defaultScale, this.worldCube = null, this.config.enableWorldCube && this.createWorldCube(), this.isARPresenting = !1, this.previousGestureType = null, this.init();
10105
+ }, this.container = n, this.arCore = new oA(e, t, s, n), this.handTracking = this.config.enableHandTracking ? new AA(e) : null, this.modelGroup = new f.Group(), this.modelGroup.name = "AR Model Group", this.scene.add(this.modelGroup), this.currentModel = null, this.pendingModel = null, this.pendingModelConfig = null, this.currentModelScale = this.config.defaultScale, this.worldCube = null, this.config.enableWorldCube && this.createWorldCube(), this.isARPresenting = !1, this.previousGestureType = null, this.init();
10052
10106
  }
10053
10107
  init() {
10054
10108
  this.arCore.init(), this.handTracking && (this.handTracking.init(this.scene), this.handTracking.onGestureStart = (e) => {
@@ -10086,14 +10140,14 @@ class hA extends yt {
10086
10140
  this.handTracking && this.handTracking.update(t, this.modelGroup, this.camera);
10087
10141
  }
10088
10142
  createWorldCube() {
10089
- const e = this.config.worldCubeSize, t = new m.BoxGeometry(e, e, e), s = new m.MeshBasicMaterial({
10143
+ const e = this.config.worldCubeSize, t = new f.BoxGeometry(e, e, e), s = new f.MeshBasicMaterial({
10090
10144
  color: 0,
10091
10145
  transparent: !0,
10092
10146
  opacity: this.config.worldCubeOpacity,
10093
- side: m.BackSide,
10147
+ side: f.BackSide,
10094
10148
  depthWrite: !1
10095
10149
  });
10096
- this.worldCube = new m.Mesh(t, s), this.worldCube.name = "AR World Cube", this.worldCube.visible = !1, this.scene.add(this.worldCube);
10150
+ this.worldCube = new f.Mesh(t, s), this.worldCube.name = "AR World Cube", this.worldCube.visible = !1, this.scene.add(this.worldCube);
10097
10151
  }
10098
10152
  setWorldCubeOpacity(e) {
10099
10153
  this.worldCube && (this.worldCube.material.opacity = Math.max(0, Math.min(1, e)));
@@ -10416,33 +10470,33 @@ class dA extends yt {
10416
10470
  }
10417
10471
  init() {
10418
10472
  try {
10419
- this.initRenderer(), this.sceneManager = new Zr(this.config.scene), this.cameraManager = new ua(this.config.camera), this.modelLoader = new $(this.renderer), this.tilesetLoader = new Uc(this.renderer, this.cameraManager.camera), this.isConstrainedSafari = this.modelLoader?.isIOSWebKit || !1, this.initStereo(), this.renderer?.getPixelRatio ? this.originalPixelRatio = this.renderer.getPixelRatio() : typeof window < "u" && (this.originalPixelRatio = window.devicePixelRatio || 1), this.pixelRatioBeforeThrottle = this.originalPixelRatio, this.isVREnabled && this.initVR(), this.isAREnabled && this.initAR(), this.cameraManager.initControls(this.renderer.domElement), this.setupEventListeners(), this.startRenderLoop(), this.isInitialized = !0, typeof window < "u" && Tn.init(this), this.emit("initialized");
10473
+ this.initRenderer(), this.sceneManager = new Zr(this.config.scene), this.cameraManager = new ua(this.config.camera), this.modelLoader = new ee(this.renderer), this.tilesetLoader = new Uc(this.renderer, this.cameraManager.camera), this.isConstrainedSafari = this.modelLoader?.isIOSWebKit || !1, this.initStereo(), this.renderer?.getPixelRatio ? this.originalPixelRatio = this.renderer.getPixelRatio() : typeof window < "u" && (this.originalPixelRatio = window.devicePixelRatio || 1), this.pixelRatioBeforeThrottle = this.originalPixelRatio, this.isVREnabled && this.initVR(), this.isAREnabled && this.initAR(), this.cameraManager.initControls(this.renderer.domElement), this.setupEventListeners(), this.startRenderLoop(), this.isInitialized = !0, typeof window < "u" && Tn.init(this), this.emit("initialized");
10420
10474
  } catch (e) {
10421
10475
  console.error("Failed to initialize BelowViewer:", e), this.emit("error", e);
10422
10476
  }
10423
10477
  }
10424
10478
  initRenderer() {
10425
- this.renderer = new m.WebGLRenderer({
10479
+ this.renderer = new f.WebGLRenderer({
10426
10480
  antialias: this.config.renderer.antialias,
10427
10481
  alpha: this.config.renderer.alpha,
10428
10482
  powerPreference: this.config.renderer.powerPreference,
10429
10483
  logarithmicDepthBuffer: this.config.renderer.logarithmicDepthBuffer,
10430
10484
  preserveDrawingBuffer: !0
10431
- }), this.renderer.setSize(this.container.clientWidth, this.container.clientHeight), this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = m.PCFSoftShadowMap, this.renderer.outputColorSpace = m.SRGBColorSpace;
10485
+ }), this.renderer.setSize(this.container.clientWidth, this.container.clientHeight), this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = f.PCFSoftShadowMap, this.renderer.outputColorSpace = f.SRGBColorSpace;
10432
10486
  const e = {
10433
- none: m.NoToneMapping,
10434
- linear: m.LinearToneMapping,
10435
- reinhard: m.ReinhardToneMapping,
10436
- cineon: m.CineonToneMapping,
10437
- "aces-filmic": m.ACESFilmicToneMapping
10487
+ none: f.NoToneMapping,
10488
+ linear: f.LinearToneMapping,
10489
+ reinhard: f.ReinhardToneMapping,
10490
+ cineon: f.CineonToneMapping,
10491
+ "aces-filmic": f.ACESFilmicToneMapping
10438
10492
  };
10439
10493
  this.config.renderer.toneMapping && e[this.config.renderer.toneMapping] && (this.renderer.toneMapping = e[this.config.renderer.toneMapping]), this.renderer.toneMappingExposure = this.config.renderer.toneMappingExposure, this.container.appendChild(this.renderer.domElement);
10440
10494
  }
10441
10495
  initStereo() {
10442
- this.stereoCamera || (this.stereoCamera = new m.StereoCamera()), this.stereoCamera.eyeSep = this.stereoEyeSeparation;
10496
+ this.stereoCamera || (this.stereoCamera = new f.StereoCamera()), this.stereoCamera.eyeSep = this.stereoEyeSeparation;
10443
10497
  }
10444
10498
  initVR() {
10445
- this.dolly = new m.Group(), this.dolly.add(this.cameraManager.camera), this.sceneManager.scene.add(this.dolly);
10499
+ this.dolly = new f.Group(), this.dolly.add(this.cameraManager.camera), this.sceneManager.scene.add(this.dolly);
10446
10500
  const e = this.config.audioPath || "./sound/", t = this.config.enableVRAudio === !0;
10447
10501
  this.vrManager = new iA(this.renderer, this.cameraManager.camera, this.sceneManager.scene, e, t, this.container), this.vrManager.setControls(this.cameraManager.controls), this.config.initialPositions && this.vrManager.setInitialPositions(this.config.initialPositions), this.vrManager.onModeToggle = () => {
10448
10502
  this.emit("vr-mode-toggle");
@@ -10592,16 +10646,16 @@ class dA extends yt {
10592
10646
  const t = this.getValidModelBoundingBox(e);
10593
10647
  if (!t)
10594
10648
  return;
10595
- const s = t.getSize(new m.Vector3()), i = t.getCenter(new m.Vector3());
10649
+ const s = t.getSize(new f.Vector3()), i = t.getCenter(new f.Vector3());
10596
10650
  this.cameraManager.frameObject(i, s);
10597
10651
  }
10598
10652
  isValidBox3(e) {
10599
- return !e || !(e instanceof m.Box3) || e.isEmpty() ? !1 : Number.isFinite(e.min.x) && Number.isFinite(e.min.y) && Number.isFinite(e.min.z) && Number.isFinite(e.max.x) && Number.isFinite(e.max.y) && Number.isFinite(e.max.z);
10653
+ return !e || !(e instanceof f.Box3) || e.isEmpty() ? !1 : Number.isFinite(e.min.x) && Number.isFinite(e.min.y) && Number.isFinite(e.min.z) && Number.isFinite(e.max.x) && Number.isFinite(e.max.y) && Number.isFinite(e.max.z);
10600
10654
  }
10601
10655
  getValidModelBoundingBox(e) {
10602
10656
  if (this.isValidBox3(e?.userData?.boundingBox))
10603
10657
  return e.userData.boundingBox;
10604
- const t = new m.Box3().setFromObject(e);
10658
+ const t = new f.Box3().setFromObject(e);
10605
10659
  return this.isValidBox3(t) ? (e.userData.boundingBox = t, t) : null;
10606
10660
  }
10607
10661
  /**
@@ -10614,10 +10668,10 @@ class dA extends yt {
10614
10668
  centerModelAndRecalculateBounds(e) {
10615
10669
  const t = this.getValidModelBoundingBox(e);
10616
10670
  if (!t)
10617
- return new m.Vector3();
10618
- const s = t.getCenter(new m.Vector3());
10671
+ return new f.Vector3();
10672
+ const s = t.getCenter(new f.Vector3());
10619
10673
  e.position.sub(s);
10620
- const i = new m.Box3().setFromObject(e);
10674
+ const i = new f.Box3().setFromObject(e);
10621
10675
  return this.isValidBox3(i) ? e.userData.boundingBox = i : e.userData.boundingBox = t.clone().translate(s.clone().multiplyScalar(-1)), s;
10622
10676
  }
10623
10677
  startRenderLoop() {
@@ -10657,7 +10711,7 @@ class dA extends yt {
10657
10711
  renderSbsStereo() {
10658
10712
  if (!this.stereoCamera || !this.renderer || !this.sceneManager || !this.cameraManager)
10659
10713
  return;
10660
- const e = this.renderer.getSize(new m.Vector2()), t = e.width, s = e.height, i = Math.floor(t / 2), n = t - i;
10714
+ const e = this.renderer.getSize(new f.Vector2()), t = e.width, s = e.height, i = Math.floor(t / 2), n = t - i;
10661
10715
  this.stereoCamera.aspect = s > 0 ? i / s : 1, this.stereoCamera.update(this.cameraManager.camera), this.renderer.setScissorTest(!0), this.renderer.setViewport(0, 0, i, s), this.renderer.setScissor(0, 0, i, s), this.renderer.render(this.sceneManager.scene, this.stereoCamera.cameraL), this.renderer.setViewport(i, 0, n, s), this.renderer.setScissor(i, 0, n, s), this.renderer.render(this.sceneManager.scene, this.stereoCamera.cameraR), this.renderer.setScissorTest(!1), this.renderer.setViewport(0, 0, t, s);
10662
10716
  }
10663
10717
  /**
@@ -10933,7 +10987,7 @@ class dA extends yt {
10933
10987
  t && e.vr && this.vrManager ? this.vrManager.applyVRPositions(e) : !t && e.desktop && this.applyDesktopPositions(e.desktop);
10934
10988
  }
10935
10989
  }
10936
- const Rn = new it(), Ht = new v();
10990
+ const Rn = new it(), Ht = new M();
10937
10991
  class tr extends Jr {
10938
10992
  /**
10939
10993
  * Constructs a new line segments geometry.
@@ -11586,7 +11640,7 @@ class ss extends Wn {
11586
11640
  this.defines && (e === !0 !== this.alphaToCoverage && (this.needsUpdate = !0), e === !0 ? this.defines.USE_ALPHA_TO_COVERAGE = "" : delete this.defines.USE_ALPHA_TO_COVERAGE);
11587
11641
  }
11588
11642
  }
11589
- const Vs = new nt(), Dn = new v(), Ln = new v(), V = new nt(), O = new nt(), Ae = new nt(), Os = new v(), Hs = new P(), H = new Xr(), Fn = new v(), qt = new it(), zt = new Et(), he = new nt();
11643
+ const Vs = new nt(), Dn = new M(), Ln = new M(), q = new nt(), z = new nt(), Ae = new nt(), Os = new M(), Hs = new P(), j = new Xr(), Fn = new M(), qt = new it(), zt = new Et(), he = new nt();
11590
11644
  let de, Pe;
11591
11645
  function kn(a, e, t) {
11592
11646
  return he.set(0, 0, -e, 1).applyMatrix4(a.projectionMatrix), he.multiplyScalar(1 / he.w), he.x = Pe / t.width, he.y = Pe / t.height, he.applyMatrix4(a.projectionMatrixInverse), he.multiplyScalar(1 / he.w), Math.abs(Math.max(he.x, he.y));
@@ -11594,9 +11648,9 @@ function kn(a, e, t) {
11594
11648
  function uA(a, e) {
11595
11649
  const t = a.matrixWorld, s = a.geometry, i = s.attributes.instanceStart, n = s.attributes.instanceEnd, o = Math.min(s.instanceCount, i.count);
11596
11650
  for (let r = 0, l = o; r < l; r++) {
11597
- H.start.fromBufferAttribute(i, r), H.end.fromBufferAttribute(n, r), H.applyMatrix4(t);
11598
- const c = new v(), A = new v();
11599
- de.distanceSqToSegment(H.start, H.end, A, c), A.distanceTo(c) < Pe * 0.5 && e.push({
11651
+ j.start.fromBufferAttribute(i, r), j.end.fromBufferAttribute(n, r), j.applyMatrix4(t);
11652
+ const c = new M(), A = new M();
11653
+ de.distanceSqToSegment(j.start, j.end, A, c), A.distanceTo(c) < Pe * 0.5 && e.push({
11600
11654
  point: A,
11601
11655
  pointOnLine: c,
11602
11656
  distance: de.origin.distanceTo(A),
@@ -11612,26 +11666,26 @@ function gA(a, e, t) {
11612
11666
  const s = e.projectionMatrix, n = a.material.resolution, o = a.matrixWorld, r = a.geometry, l = r.attributes.instanceStart, c = r.attributes.instanceEnd, A = Math.min(r.instanceCount, l.count), h = -e.near;
11613
11667
  de.at(1, Ae), Ae.w = 1, Ae.applyMatrix4(e.matrixWorldInverse), Ae.applyMatrix4(s), Ae.multiplyScalar(1 / Ae.w), Ae.x *= n.x / 2, Ae.y *= n.y / 2, Ae.z = 0, Os.copy(Ae), Hs.multiplyMatrices(e.matrixWorldInverse, o);
11614
11668
  for (let d = 0, u = A; d < u; d++) {
11615
- if (V.fromBufferAttribute(l, d), O.fromBufferAttribute(c, d), V.w = 1, O.w = 1, V.applyMatrix4(Hs), O.applyMatrix4(Hs), V.z > h && O.z > h)
11669
+ if (q.fromBufferAttribute(l, d), z.fromBufferAttribute(c, d), q.w = 1, z.w = 1, q.applyMatrix4(Hs), z.applyMatrix4(Hs), q.z > h && z.z > h)
11616
11670
  continue;
11617
- if (V.z > h) {
11618
- const y = V.z - O.z, f = (V.z - h) / y;
11619
- V.lerp(O, f);
11620
- } else if (O.z > h) {
11621
- const y = O.z - V.z, f = (O.z - h) / y;
11622
- O.lerp(V, f);
11623
- }
11624
- V.applyMatrix4(s), O.applyMatrix4(s), V.multiplyScalar(1 / V.w), O.multiplyScalar(1 / O.w), V.x *= n.x / 2, V.y *= n.y / 2, O.x *= n.x / 2, O.y *= n.y / 2, H.start.copy(V), H.start.z = 0, H.end.copy(O), H.end.z = 0;
11625
- const p = H.closestPointToPointParameter(Os, !0);
11626
- H.at(p, Fn);
11627
- const b = st.lerp(V.z, O.z, p), E = b >= -1 && b <= 1, C = Os.distanceTo(Fn) < Pe * 0.5;
11628
- if (E && C) {
11629
- H.start.fromBufferAttribute(l, d), H.end.fromBufferAttribute(c, d), H.start.applyMatrix4(o), H.end.applyMatrix4(o);
11630
- const y = new v(), f = new v();
11631
- de.distanceSqToSegment(H.start, H.end, f, y), t.push({
11632
- point: f,
11671
+ if (q.z > h) {
11672
+ const y = q.z - z.z, m = (q.z - h) / y;
11673
+ q.lerp(z, m);
11674
+ } else if (z.z > h) {
11675
+ const y = z.z - q.z, m = (z.z - h) / y;
11676
+ z.lerp(q, m);
11677
+ }
11678
+ q.applyMatrix4(s), z.applyMatrix4(s), q.multiplyScalar(1 / q.w), z.multiplyScalar(1 / z.w), q.x *= n.x / 2, q.y *= n.y / 2, z.x *= n.x / 2, z.y *= n.y / 2, j.start.copy(q), j.start.z = 0, j.end.copy(z), j.end.z = 0;
11679
+ const p = j.closestPointToPointParameter(Os, !0);
11680
+ j.at(p, Fn);
11681
+ const b = st.lerp(q.z, z.z, p), C = b >= -1 && b <= 1, E = Os.distanceTo(Fn) < Pe * 0.5;
11682
+ if (C && E) {
11683
+ j.start.fromBufferAttribute(l, d), j.end.fromBufferAttribute(c, d), j.start.applyMatrix4(o), j.end.applyMatrix4(o);
11684
+ const y = new M(), m = new M();
11685
+ de.distanceSqToSegment(j.start, j.end, m, y), t.push({
11686
+ point: m,
11633
11687
  pointOnLine: y,
11634
- distance: de.origin.distanceTo(f),
11688
+ distance: de.origin.distanceTo(m),
11635
11689
  object: a,
11636
11690
  face: null,
11637
11691
  faceIndex: d,
@@ -11819,7 +11873,7 @@ class fA {
11819
11873
  this.ghostSpheres = {
11820
11874
  left: null,
11821
11875
  right: null
11822
- }, this.MAX_SPHERES = 2, this.measurementSpheres = [], this.measurementLine = null, this.measurementLabel = null, this.previousTriggerState = {}, this.unifiedMeasurementPoints = [], this.unifiedMeasurementLine = null, this.desktopMeasurementPoints = [], this.desktopMeasurementLine = null, typeof window < "u" && (window.measurementSystem = this), this.scene = e, this.camera = t, this.renderer = s, this.uiParent = o || null, this.getRaycastInfo = typeof r == "function" ? r : null, this.controls = i, this.dolly = n, this.config = l, this.theme = c, this.showMeasurementLabels = A, this._raycastTargets = e && e.children ? e.children : [], this.enabled = !0, this.isVR = !1, this.measurementPanel = null, this.desktopMeasurementMode = !1, this.measurementSystemEnabled = !0, this.measurementAvailable = !0, this.desktopMeasurementPoints = [], this.connectionLine = null, this.desktopMeasurementLine = null, this.measurementSprite = null, this.measurementCanvas = null, this.measurementTexture = null, this.lastClickTime = 0, this.lastTriggerTime = 0, this._wasInVR = !1, this.focusAnimation = null, this._cancelFocusOnUserInput = null, this.mouse = new m.Vector2(), this.raycaster = new m.Raycaster();
11876
+ }, this.MAX_SPHERES = 2, this.measurementSpheres = [], this.measurementLine = null, this.measurementLabel = null, this.previousTriggerState = {}, this.unifiedMeasurementPoints = [], this.unifiedMeasurementLine = null, this.desktopMeasurementPoints = [], this.desktopMeasurementLine = null, typeof window < "u" && (window.measurementSystem = this), this.scene = e, this.camera = t, this.renderer = s, this.uiParent = o || null, this.getRaycastInfo = typeof r == "function" ? r : null, this.controls = i, this.dolly = n, this.config = l, this.theme = c, this.showMeasurementLabels = A, this._raycastTargets = e && e.children ? e.children : [], this.enabled = !0, this.isVR = !1, this.measurementPanel = null, this.desktopMeasurementMode = !1, this.measurementSystemEnabled = !0, this.measurementAvailable = !0, this.desktopMeasurementPoints = [], this.connectionLine = null, this.desktopMeasurementLine = null, this.measurementSprite = null, this.measurementCanvas = null, this.measurementTexture = null, this.lastClickTime = 0, this.lastTriggerTime = 0, this._wasInVR = !1, this.focusAnimation = null, this._cancelFocusOnUserInput = null, this.mouse = new f.Vector2(), this.raycaster = new f.Raycaster();
11823
11877
  const h = () => {
11824
11878
  let d = null, u = null;
11825
11879
  const g = null, p = null;
@@ -11832,7 +11886,7 @@ class fA {
11832
11886
  }
11833
11887
  d && u ? (this.attachVR({ controller1: d, controller2: u, controllerGrip1: g, controllerGrip2: p }), this.ghostSpheres && this.ghostSpheres.left && this.ghostSpheres.right && (this.ghostSpheres.left.visible = !0, this.ghostSpheres.right.visible = !0)) : (this._ghostSphereAttachRetries || (this._ghostSphereAttachRetries = 0), this._ghostSphereAttachRetries < 40 ? (this._ghostSphereAttachRetries++, setTimeout(h, 250)) : typeof window < "u" && window.console && console.warn("[MeasurementSystem] Could not find VR controllers to attach ghost spheres after multiple attempts."));
11834
11888
  };
11835
- if (h(), s && s.xr && s.xr.addEventListener && s.xr.addEventListener("sessionstart", h), this.sphereGeometry = new m.SphereGeometry(0.02, 8, 6), this.placedMaterial = new m.MeshBasicMaterial({ color: 16777215 }), this.vrLineMaterial = new ss({
11889
+ if (h(), s && s.xr && s.xr.addEventListener && s.xr.addEventListener("sessionstart", h), this.sphereGeometry = new f.SphereGeometry(0.02, 8, 6), this.placedMaterial = new f.MeshBasicMaterial({ color: 16777215 }), this.vrLineMaterial = new ss({
11836
11890
  color: 16777215,
11837
11891
  linewidth: 3,
11838
11892
  transparent: !0,
@@ -11937,14 +11991,14 @@ class fA {
11937
11991
  syncToVR() {
11938
11992
  if (this.desktopMeasurementPoints.length === 2) {
11939
11993
  if (this.clearVRMeasurement(), this.desktopMeasurementPoints.forEach((e) => {
11940
- const t = new m.Mesh(this.sphereGeometry, this.placedMaterial);
11994
+ const t = new f.Mesh(this.sphereGeometry, this.placedMaterial);
11941
11995
  t.position.copy(e.position), this.scene.add(t), this.measurementSpheres.push(t);
11942
11996
  }), this.measurementSpheres.length === 2) {
11943
- const e = new m.BufferGeometry().setFromPoints([
11997
+ const e = new f.BufferGeometry().setFromPoints([
11944
11998
  this.measurementSpheres[0].position,
11945
11999
  this.measurementSpheres[1].position
11946
- ]), t = this.vrLineMaterial || new m.LineBasicMaterial({ color: 16777215, transparent: !0, opacity: 0.8, depthTest: !1 });
11947
- this.connectionLine = new m.Line(e, t), this.scene.add(this.connectionLine), this.createMeasurementDisplay(this.measurementSpheres[0].position.distanceTo(this.measurementSpheres[1].position)), this.measurementSprite && !this.scene.children.includes(this.measurementSprite) && this.scene.add(this.measurementSprite);
12000
+ ]), t = this.vrLineMaterial || new f.LineBasicMaterial({ color: 16777215, transparent: !0, opacity: 0.8, depthTest: !1 });
12001
+ this.connectionLine = new f.Line(e, t), this.scene.add(this.connectionLine), this.createMeasurementDisplay(this.measurementSpheres[0].position.distanceTo(this.measurementSpheres[1].position)), this.measurementSprite && !this.scene.children.includes(this.measurementSprite) && this.scene.add(this.measurementSprite);
11948
12002
  }
11949
12003
  this.measurementSystemEnabled = this.measurementAvailable, this.updateMeasurementPanel();
11950
12004
  }
@@ -11956,10 +12010,10 @@ class fA {
11956
12010
  const t = this.measurementSpheres[e].position.clone();
11957
12011
  let s = t;
11958
12012
  if (this._raycastTargets && this._raycastTargets.length > 0 && this.camera) {
11959
- const n = t.clone().sub(this.camera.position).normalize(), o = new m.Raycaster(this.camera.position, n), r = this.getValidIntersections(o);
12013
+ const n = t.clone().sub(this.camera.position).normalize(), o = new f.Raycaster(this.camera.position, n), r = this.getValidIntersections(o);
11960
12014
  r.length > 0 && (s = r[0].point);
11961
12015
  }
11962
- const i = new m.Mesh(this.sphereGeometry, this.placedMaterial);
12016
+ const i = new f.Mesh(this.sphereGeometry, this.placedMaterial);
11963
12017
  i.position.copy(s), this.scene.add(i), this.desktopMeasurementPoints.push(i);
11964
12018
  }
11965
12019
  if (this.desktopMeasurementPoints.length === 2) {
@@ -11974,7 +12028,7 @@ class fA {
11974
12028
  ]), this.desktopMeasurementLine = new _n(e, this.desktopLineMaterial), this.desktopMeasurementLine.computeLineDistances(), this.scene.add(this.desktopMeasurementLine);
11975
12029
  const t = this.desktopMeasurementPoints[0].position.distanceTo(this.desktopMeasurementPoints[1].position);
11976
12030
  if (this.createMeasurementDisplay(t), this.measurementSprite) {
11977
- const s = new m.Vector3();
12031
+ const s = new f.Vector3();
11978
12032
  s.addVectors(this.desktopMeasurementPoints[0].position, this.desktopMeasurementPoints[1].position), s.multiplyScalar(0.5);
11979
12033
  const i = Math.max(0.05, Math.min(0.2, t * 0.03));
11980
12034
  s.y += i, this.measurementSprite.position.copy(s), this.measurementSprite.visible = !1, this.scene.children.includes(this.measurementSprite) || this.scene.add(this.measurementSprite);
@@ -11997,14 +12051,14 @@ class fA {
11997
12051
  e <= 2 ? c = 0.4 + e / 2 * 0.3 : e <= 4 ? c = 0.7 + (e - 2) / 2 * 0.2 : c = 0.9 + Math.min((e - 4) / 16, 1) * 0.5;
11998
12052
  const A = Math.round(l * c);
11999
12053
  r.font = `600 ${A}px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif`;
12000
- const h = this.formatDistance(e), u = r.measureText(h).width, g = A, p = Math.max(6, A * 0.3), b = u + p * 2, E = g + p * 2, C = (s - b) / 2, y = (i - E) / 2;
12001
- if (r.fillStyle = "rgba(0, 0, 0, 0.8)", r.beginPath(), r.roundRect(C, y, b, E, Math.max(4, A * 0.2)), r.fill(), r.fillStyle = "white", r.textAlign = "center", r.textBaseline = "middle", r.fillText(h, s / 2, i / 2), r.restore(), this.measurementTexture ? this.measurementTexture.needsUpdate = !0 : (this.measurementTexture = new m.CanvasTexture(this.measurementCanvas), this.measurementTexture.minFilter = m.LinearFilter, this.measurementTexture.magFilter = m.LinearFilter), !this.measurementSprite) {
12002
- const B = new m.SpriteMaterial({
12054
+ const h = this.formatDistance(e), u = r.measureText(h).width, g = A, p = Math.max(6, A * 0.3), b = u + p * 2, C = g + p * 2, E = (s - b) / 2, y = (i - C) / 2;
12055
+ if (r.fillStyle = "rgba(0, 0, 0, 0.8)", r.beginPath(), r.roundRect(E, y, b, C, Math.max(4, A * 0.2)), r.fill(), r.fillStyle = "white", r.textAlign = "center", r.textBaseline = "middle", r.fillText(h, s / 2, i / 2), r.restore(), this.measurementTexture ? this.measurementTexture.needsUpdate = !0 : (this.measurementTexture = new f.CanvasTexture(this.measurementCanvas), this.measurementTexture.minFilter = f.LinearFilter, this.measurementTexture.magFilter = f.LinearFilter), !this.measurementSprite) {
12056
+ const B = new f.SpriteMaterial({
12003
12057
  map: this.measurementTexture,
12004
12058
  depthTest: !1,
12005
12059
  depthWrite: !1
12006
12060
  });
12007
- this.measurementSprite = new m.Sprite(B);
12061
+ this.measurementSprite = new f.Sprite(B);
12008
12062
  }
12009
12063
  const I = 0.3 * c, w = s / i;
12010
12064
  return this.measurementSprite.scale.set(I * w, I, 1), this.measurementSprite;
@@ -12036,7 +12090,7 @@ class fA {
12036
12090
  */
12037
12091
  attachVR({ controller1: e, controller2: t, controllerGrip1: s, controllerGrip2: i }) {
12038
12092
  this.controller1 = e, this.controller2 = t, this.controllerGrip1 = s, this.controllerGrip2 = i;
12039
- const n = new m.MeshBasicMaterial({
12093
+ const n = new f.MeshBasicMaterial({
12040
12094
  color: 8947848,
12041
12095
  // ghostly grey
12042
12096
  transparent: !0,
@@ -12044,7 +12098,7 @@ class fA {
12044
12098
  depthTest: !1,
12045
12099
  depthWrite: !1
12046
12100
  });
12047
- this.ghostSpheres.left && this.ghostSpheres.left.parent && this.ghostSpheres.left.parent.remove(this.ghostSpheres.left), this.ghostSpheres.right && this.ghostSpheres.right.parent && this.ghostSpheres.right.parent.remove(this.ghostSpheres.right), this.ghostSpheres.left = new m.Mesh(this.sphereGeometry, n.clone()), this.ghostSpheres.right = new m.Mesh(this.sphereGeometry, n.clone()), this.ghostSpheres.left.scale.set(0.5, 0.5, 0.5), this.ghostSpheres.right.scale.set(0.5, 0.5, 0.5), this.ghostSpheres.left.position.set(0, 0, -0.07), this.ghostSpheres.right.position.set(0, 0, -0.07), this.ghostSpheres.left.visible = !0, this.ghostSpheres.right.visible = !0, this.controller1 && this.controller1.add(this.ghostSpheres.left), this.controller2 && this.controller2.add(this.ghostSpheres.right), this.yButtonPressed = !1, this.MAX_SPHERES = 2, this.triggerState = {
12101
+ this.ghostSpheres.left && this.ghostSpheres.left.parent && this.ghostSpheres.left.parent.remove(this.ghostSpheres.left), this.ghostSpheres.right && this.ghostSpheres.right.parent && this.ghostSpheres.right.parent.remove(this.ghostSpheres.right), this.ghostSpheres.left = new f.Mesh(this.sphereGeometry, n.clone()), this.ghostSpheres.right = new f.Mesh(this.sphereGeometry, n.clone()), this.ghostSpheres.left.scale.set(0.5, 0.5, 0.5), this.ghostSpheres.right.scale.set(0.5, 0.5, 0.5), this.ghostSpheres.left.position.set(0, 0, -0.07), this.ghostSpheres.right.position.set(0, 0, -0.07), this.ghostSpheres.left.visible = !0, this.ghostSpheres.right.visible = !0, this.controller1 && this.controller1.add(this.ghostSpheres.left), this.controller2 && this.controller2.add(this.ghostSpheres.right), this.yButtonPressed = !1, this.MAX_SPHERES = 2, this.triggerState = {
12048
12102
  left: !1,
12049
12103
  right: !1
12050
12104
  }, this._onVRTriggerDown = this._onVRTriggerDown.bind(this), this._onVRTriggerUp = this._onVRTriggerUp.bind(this), this._onVRYButtonDown = this._onVRYButtonDown.bind(this), this._onVRYButtonUp = this._onVRYButtonUp.bind(this), this.controller1 && this.controller2 && (this.controller1.addEventListener("selectstart", this._onVRTriggerDown), this.controller1.addEventListener("selectend", this._onVRTriggerUp), this.controller2.addEventListener("selectstart", this._onVRTriggerDown), this.controller2.addEventListener("selectend", this._onVRTriggerUp), this.controller1.addEventListener("ybuttondown", this._onVRYButtonDown), this.controller1.addEventListener("ybuttonup", this._onVRYButtonUp), this.controller2.addEventListener("ybuttondown", this._onVRYButtonDown), this.controller2.addEventListener("ybuttonup", this._onVRYButtonUp)), this.isVR = !0, this.refreshMeasurementDisplayForVR();
@@ -12055,13 +12109,13 @@ class fA {
12055
12109
  if (!this.measurementAvailable) return;
12056
12110
  const t = e.target, s = performance.now();
12057
12111
  if (!(this.lastTriggerTime && s - this.lastTriggerTime < 200) && (this.lastTriggerTime = s, this.measurementSystemEnabled)) {
12058
- const i = new m.Vector3();
12112
+ const i = new f.Vector3();
12059
12113
  let n = null;
12060
12114
  if (t === this.controller1 && this.ghostSpheres.left ? n = this.ghostSpheres.left : t === this.controller2 && this.ghostSpheres.right && (n = this.ghostSpheres.right), n)
12061
12115
  n.getWorldPosition(i);
12062
12116
  else {
12063
12117
  t.getWorldPosition(i);
12064
- const o = new m.Vector3(0, 0, -0.05);
12118
+ const o = new f.Vector3(0, 0, -0.05);
12065
12119
  o.applyQuaternion(t.quaternion), i.add(o);
12066
12120
  }
12067
12121
  this._placeVRMeasurementPoint(i);
@@ -12073,11 +12127,11 @@ class fA {
12073
12127
  _onVRYButtonUp() {
12074
12128
  }
12075
12129
  _getVRControllerIntersection(e) {
12076
- const t = new m.Matrix4();
12130
+ const t = new f.Matrix4();
12077
12131
  t.identity().extractRotation(e.matrixWorld);
12078
- const s = new m.Vector3(), i = new m.Vector3(0, 0, -1).applyMatrix4(t);
12132
+ const s = new f.Vector3(), i = new f.Vector3(0, 0, -1).applyMatrix4(t);
12079
12133
  e.getWorldPosition(s);
12080
- const n = new m.Raycaster(s, i.normalize()), o = this.scene && this.scene.children ? this.scene.children : [], r = this.getValidIntersections(n, o);
12134
+ const n = new f.Raycaster(s, i.normalize()), o = this.scene && this.scene.children ? this.scene.children : [], r = this.getValidIntersections(n, o);
12081
12135
  return r.length > 0 ? r[0] : null;
12082
12136
  }
12083
12137
  _placeVRMeasurementPoint(e) {
@@ -12101,7 +12155,7 @@ class fA {
12101
12155
  const i = this.unifiedMeasurementPoints.shift();
12102
12156
  i.sphere && this.scene.remove(i.sphere);
12103
12157
  }
12104
- const s = new m.Mesh(this.sphereGeometry, this.placedMaterial);
12158
+ const s = new f.Mesh(this.sphereGeometry, this.placedMaterial);
12105
12159
  s.position.copy(e), s.scale.setScalar(0.5), s.userData.isMeasurementSphere = !0, this.scene.add(s), this.unifiedMeasurementPoints.push({
12106
12160
  position: e.clone(),
12107
12161
  sphere: s,
@@ -12128,7 +12182,7 @@ class fA {
12128
12182
  if (this.unifiedMeasurementPoints.forEach((o) => {
12129
12183
  o.sphere && o.sphere.scale.setScalar(n);
12130
12184
  }), this.measurementSprite) {
12131
- const o = new m.Vector3();
12185
+ const o = new f.Vector3();
12132
12186
  o.addVectors(e, t), o.multiplyScalar(0.5);
12133
12187
  const r = Math.max(0.05, Math.min(0.2, i * 0.03));
12134
12188
  o.y += r, this.measurementSprite.position.copy(o), this.scene.children.includes(this.measurementSprite) || this.scene.add(this.measurementSprite);
@@ -12143,7 +12197,7 @@ class fA {
12143
12197
  * Useful when VR coordinate systems get corrupted (e.g., returning from Quest browser)
12144
12198
  */
12145
12199
  resetGhostSpherePositions() {
12146
- this.isVR && this.ghostSpheres && (this.ghostSpheres.left && this.controller1 && this.ghostSpheres.left.parent === this.controller1 && (this.ghostSpheres.left.position.set(0, 0, -0.07), this.ghostSpheres.left.rotation.set(0, 0, 0), this.ghostSpheres.left.scale.set(1, 1, 1)), this.ghostSpheres.right && this.controller2 && this.ghostSpheres.right.parent === this.controller2 && (this.ghostSpheres.right.position.set(0, 0, -0.07), this.ghostSpheres.right.rotation.set(0, 0, 0), this.ghostSpheres.right.scale.set(1, 1, 1)));
12200
+ this.isVR && this.ghostSpheres && (this.ghostSpheres.left && this.controller1 && this.ghostSpheres.left.parent === this.controller1 && (this.ghostSpheres.left.position.set(0, 0, -0.07), this.ghostSpheres.left.rotation.set(0, 0, 0), this.ghostSpheres.left.scale.set(0.5, 0.5, 0.5)), this.ghostSpheres.right && this.controller2 && this.ghostSpheres.right.parent === this.controller2 && (this.ghostSpheres.right.position.set(0, 0, -0.07), this.ghostSpheres.right.rotation.set(0, 0, 0), this.ghostSpheres.right.scale.set(0.5, 0.5, 0.5)));
12147
12201
  }
12148
12202
  /**
12149
12203
  * Update method called each frame by the render loop
@@ -12299,7 +12353,7 @@ class fA {
12299
12353
  if (this.unifiedMeasurementPoints && this.unifiedMeasurementPoints.length === 2) {
12300
12354
  const e = this.unifiedMeasurementPoints[0].position, t = this.unifiedMeasurementPoints[1].position, s = e.distanceTo(t);
12301
12355
  if (this.createMeasurementDisplay(s), this.measurementSprite) {
12302
- const i = new m.Vector3();
12356
+ const i = new f.Vector3();
12303
12357
  i.addVectors(e, t), i.multiplyScalar(0.5);
12304
12358
  const n = Math.max(0.05, Math.min(0.2, s * 0.03));
12305
12359
  i.y += n, this.measurementSprite.position.copy(i), this.scene.children.includes(this.measurementSprite) || this.scene.add(this.measurementSprite);
@@ -12609,12 +12663,12 @@ class Ei {
12609
12663
  class mA {
12610
12664
  constructor(e) {
12611
12665
  this.scene = e, this.particleBounds = {
12612
- min: new m.Vector3(-50, -25, -50),
12613
- max: new m.Vector3(50, 25, 50)
12666
+ min: new f.Vector3(-50, -25, -50),
12667
+ max: new f.Vector3(50, 25, 50)
12614
12668
  }, this.particleCount = 1750, this.densityMultiplier = 1, this.createParticleSystem();
12615
12669
  }
12616
12670
  calculateParticleCount(e) {
12617
- const t = new m.Vector3();
12671
+ const t = new f.Vector3();
12618
12672
  e.getSize(t);
12619
12673
  const i = t.clone().multiplyScalar(2.5), n = i.x * i.y * i.z, o = Math.round(n * 0.01 * this.densityMultiplier);
12620
12674
  return Math.max(100, Math.min(16e3, o));
@@ -12627,16 +12681,16 @@ class mA {
12627
12681
  this.disable();
12628
12682
  return;
12629
12683
  }
12630
- const t = new m.Box3(this.particleBounds.min, this.particleBounds.max), s = this.calculateParticleCount(t);
12684
+ const t = new f.Box3(this.particleBounds.min, this.particleBounds.max), s = this.calculateParticleCount(t);
12631
12685
  this.particles && (this.scene.remove(this.particles), this.particles.geometry && this.particles.geometry.dispose(), this.particles.material && this.particles.material.dispose(), this.particles = null), this.particleCount = s, this.createParticleSystem(), this.enable();
12632
12686
  }
12633
12687
  createParticleSystem() {
12634
12688
  const e = new Float32Array(this.particleCount * 3), t = new Float32Array(this.particleCount * 3), s = new Float32Array(this.particleCount);
12635
12689
  this.initializeParticleData(e, t, s);
12636
- const i = new m.BufferGeometry(), n = new Float32Array(this.particleCount);
12690
+ const i = new f.BufferGeometry(), n = new Float32Array(this.particleCount);
12637
12691
  for (let o = 0; o < this.particleCount; o++)
12638
12692
  n[o] = o;
12639
- i.setAttribute("position", new m.BufferAttribute(e, 3)), i.setAttribute("originalSize", new m.BufferAttribute(s, 1)), i.setAttribute("velocity", new m.BufferAttribute(t, 3)), i.setAttribute("particleIndex", new m.BufferAttribute(n, 1)), this.originalMaterial = this.createParticleMaterial(), this.particles = new m.Points(i, this.originalMaterial), this.particles.visible = !1, this.scene.add(this.particles);
12693
+ i.setAttribute("position", new f.BufferAttribute(e, 3)), i.setAttribute("originalSize", new f.BufferAttribute(s, 1)), i.setAttribute("velocity", new f.BufferAttribute(t, 3)), i.setAttribute("particleIndex", new f.BufferAttribute(n, 1)), this.originalMaterial = this.createParticleMaterial(), this.particles = new f.Points(i, this.originalMaterial), this.particles.visible = !1, this.scene.add(this.particles);
12640
12694
  }
12641
12695
  /**
12642
12696
  * Initialize particle data arrays
@@ -12659,17 +12713,17 @@ class mA {
12659
12713
  e.width = e.height = 32;
12660
12714
  const t = e.getContext("2d"), s = t.createRadialGradient(16, 16, 0, 16, 16, 16);
12661
12715
  s.addColorStop(0, "rgba(255, 255, 255, 1)"), s.addColorStop(0.7, "rgba(255, 255, 255, 0.8)"), s.addColorStop(1, "rgba(255, 255, 255, 0)"), t.fillStyle = s, t.fillRect(0, 0, 32, 32);
12662
- const i = new m.CanvasTexture(e);
12663
- return i.needsUpdate = !0, new m.ShaderMaterial({
12716
+ const i = new f.CanvasTexture(e);
12717
+ return i.needsUpdate = !0, new f.ShaderMaterial({
12664
12718
  uniforms: {
12665
12719
  time: { value: 0 },
12666
12720
  pointTexture: { value: i },
12667
- color: { value: new m.Color(16777215) },
12721
+ color: { value: new f.Color(16777215) },
12668
12722
  opacity: { value: 1 },
12669
12723
  size: { value: 2 },
12670
12724
  boundsMin: { value: this.particleBounds.min.clone() },
12671
12725
  boundsMax: { value: this.particleBounds.max.clone() },
12672
- fogColor: { value: new m.Color(268073) },
12726
+ fogColor: { value: new f.Color(268073) },
12673
12727
  fogDensity: { value: 0 }
12674
12728
  },
12675
12729
  vertexShader: `
@@ -12751,7 +12805,7 @@ class mA {
12751
12805
  `,
12752
12806
  transparent: !0,
12753
12807
  depthWrite: !1,
12754
- blending: m.NormalBlending,
12808
+ blending: f.NormalBlending,
12755
12809
  fog: !1
12756
12810
  });
12757
12811
  }
@@ -12778,9 +12832,9 @@ class mA {
12778
12832
  */
12779
12833
  updateBounds(e) {
12780
12834
  if (!e) return;
12781
- const t = new m.Box3().setFromObject(e), s = t.getSize(new m.Vector3()), i = t.getCenter(new m.Vector3()), o = s.clone().multiplyScalar(2.5 * 0.5);
12835
+ const t = new f.Box3().setFromObject(e), s = t.getSize(new f.Vector3()), i = t.getCenter(new f.Vector3()), o = s.clone().multiplyScalar(2.5 * 0.5);
12782
12836
  this.particleBounds.min.copy(i).sub(o), this.particleBounds.max.copy(i).add(o);
12783
- const r = this.calculateParticleCount(new m.Box3(this.particleBounds.min, this.particleBounds.max));
12837
+ const r = this.calculateParticleCount(new f.Box3(this.particleBounds.min, this.particleBounds.max));
12784
12838
  Math.abs(r - this.particleCount) > this.particleCount * 0.2 ? (this.particles && (this.scene.remove(this.particles), this.particles.geometry && this.particles.geometry.dispose(), this.particles.material && this.particles.material.dispose(), this.particles = null), this.particleCount = r, this.createParticleSystem()) : this.redistributeParticles();
12785
12839
  }
12786
12840
  /**
@@ -12826,7 +12880,7 @@ class bA {
12826
12880
  createSpotlight(e = 25) {
12827
12881
  this.controllerSpotlight && (this.scene.remove(this.controllerSpotlight), this.scene.remove(this.spotlightTarget));
12828
12882
  const t = e * Math.PI / 180, s = (this.isQuest2, 15);
12829
- this.controllerSpotlight = new m.SpotLight(
12883
+ this.controllerSpotlight = new f.SpotLight(
12830
12884
  16777215,
12831
12885
  // Pure white light
12832
12886
  2.5,
@@ -12841,7 +12895,7 @@ class bA {
12841
12895
  // Higher decay for realistic underwater attenuation
12842
12896
  ), this.controllerSpotlight.position.set(0, 0, 0), this.controllerSpotlight.visible = !0, this.controllerSpotlight.castShadow = !0;
12843
12897
  const i = this.isQuest2 ? 512 : 1024;
12844
- this.controllerSpotlight.shadow.mapSize.width = i, this.controllerSpotlight.shadow.mapSize.height = i, this.controllerSpotlight.shadow.camera.near = 0.1, this.controllerSpotlight.shadow.camera.far = s, this.controllerSpotlight.shadow.camera.fov = e, this.controllerSpotlight.shadow.bias = -5e-4, this.controllerSpotlight.shadow.normalBias = 0.02, this.controllerSpotlight.shadow.radius = 4, this.controllerSpotlight.shadow.blurSamples = 10, this.scene.add(this.controllerSpotlight), this.spotlightTarget = new m.Object3D(), this.scene.add(this.spotlightTarget), this.controllerSpotlight.target = this.spotlightTarget;
12898
+ this.controllerSpotlight.shadow.mapSize.width = i, this.controllerSpotlight.shadow.mapSize.height = i, this.controllerSpotlight.shadow.camera.near = 0.1, this.controllerSpotlight.shadow.camera.far = s, this.controllerSpotlight.shadow.camera.fov = e, this.controllerSpotlight.shadow.bias = -5e-4, this.controllerSpotlight.shadow.normalBias = 0.02, this.controllerSpotlight.shadow.radius = 4, this.controllerSpotlight.shadow.blurSamples = 10, this.scene.add(this.controllerSpotlight), this.spotlightTarget = new f.Object3D(), this.scene.add(this.spotlightTarget), this.controllerSpotlight.target = this.spotlightTarget;
12845
12899
  }
12846
12900
  enableTorch() {
12847
12901
  this.controllerSpotlight ? this.controllerSpotlight.visible = !0 : console.error("Cannot enable torch - controllerSpotlight is null");
@@ -12860,9 +12914,9 @@ class bA {
12860
12914
  e || console.warn("updatePosition called with null controller");
12861
12915
  return;
12862
12916
  }
12863
- const t = new m.Vector3(), s = new m.Quaternion();
12917
+ const t = new f.Vector3(), s = new f.Quaternion();
12864
12918
  e.getWorldPosition(t), e.getWorldQuaternion(s), this.controllerSpotlight.position.copy(t);
12865
- const i = new m.Vector3(0, 0, -1);
12919
+ const i = new f.Vector3(0, 0, -1);
12866
12920
  i.applyQuaternion(s);
12867
12921
  const n = t.clone().add(i.multiplyScalar(2));
12868
12922
  this.spotlightTarget.position.copy(n);
@@ -12870,7 +12924,7 @@ class bA {
12870
12924
  updateCameraPosition(e) {
12871
12925
  if (!this.controllerSpotlight || !this.spotlightTarget) return;
12872
12926
  this.controllerSpotlight.position.copy(e.position);
12873
- const t = new m.Vector3(0, 0, -1);
12927
+ const t = new f.Vector3(0, 0, -1);
12874
12928
  t.applyQuaternion(e.quaternion);
12875
12929
  const s = e.position.clone().add(t.multiplyScalar(8));
12876
12930
  this.spotlightTarget.position.copy(s);
@@ -12925,7 +12979,7 @@ class CA {
12925
12979
  return;
12926
12980
  }
12927
12981
  try {
12928
- this.overheadLight = new m.AmbientLight(16777215, 0.5), this.currentMode = null;
12982
+ this.overheadLight = new f.AmbientLight(16777215, 0.5), this.currentMode = null;
12929
12983
  } catch (e) {
12930
12984
  console.error("Failed to initialize lighting system:", e);
12931
12985
  }
@@ -12933,7 +12987,7 @@ class CA {
12933
12987
  createSurveyModeLights() {
12934
12988
  if (!(this.isDisposed || !this.scene))
12935
12989
  try {
12936
- this.clearModeDirectionalLight || (this.clearModeDirectionalLight = new m.DirectionalLight(16777215, 1.32), this.clearModeDirectionalLight.position.set(50, 100, 50), this.clearModeDirectionalLight.castShadow = !0, this.clearModeDirectionalLight.shadow.mapSize.width = 2048, this.clearModeDirectionalLight.shadow.mapSize.height = 2048, this.clearModeDirectionalLight.shadow.camera.near = 0.5, this.clearModeDirectionalLight.shadow.camera.far = 500, this.clearModeDirectionalLight.shadow.camera.left = -150, this.clearModeDirectionalLight.shadow.camera.right = 150, this.clearModeDirectionalLight.shadow.camera.top = 150, this.clearModeDirectionalLight.shadow.camera.bottom = -150, this.scene.add(this.clearModeDirectionalLight)), this.clearModeHemisphereLight || (this.clearModeHemisphereLight = new m.HemisphereLight(16777215, 4473924, 0.77), this.scene.add(this.clearModeHemisphereLight)), this.fillLight || (this.fillLight = new m.DirectionalLight(16777215, 0.88), this.fillLight.position.set(-10, 10, -10), this.scene.add(this.fillLight)), this.bottomLight || (this.bottomLight = new m.DirectionalLight(16777215, 0.33), this.bottomLight.position.set(0, -10, 0), this.scene.add(this.bottomLight));
12990
+ this.clearModeDirectionalLight || (this.clearModeDirectionalLight = new f.DirectionalLight(16777215, 1.32), this.clearModeDirectionalLight.position.set(50, 100, 50), this.clearModeDirectionalLight.castShadow = !0, this.clearModeDirectionalLight.shadow.mapSize.width = 2048, this.clearModeDirectionalLight.shadow.mapSize.height = 2048, this.clearModeDirectionalLight.shadow.bias = -1e-4, this.clearModeDirectionalLight.shadow.normalBias = 0.03, this.clearModeDirectionalLight.shadow.camera.near = 0.5, this.clearModeDirectionalLight.shadow.camera.far = 500, this.clearModeDirectionalLight.shadow.camera.left = -150, this.clearModeDirectionalLight.shadow.camera.right = 150, this.clearModeDirectionalLight.shadow.camera.top = 150, this.clearModeDirectionalLight.shadow.camera.bottom = -150, this.scene.add(this.clearModeDirectionalLight)), this.clearModeHemisphereLight || (this.clearModeHemisphereLight = new f.HemisphereLight(16777215, 4473924, 0.77), this.scene.add(this.clearModeHemisphereLight)), this.fillLight || (this.fillLight = new f.DirectionalLight(16777215, 0.88), this.fillLight.position.set(-10, 10, -10), this.scene.add(this.fillLight)), this.bottomLight || (this.bottomLight = new f.DirectionalLight(16777215, 0.33), this.bottomLight.position.set(0, -10, 0), this.scene.add(this.bottomLight));
12937
12991
  } catch (e) {
12938
12992
  console.error("Failed to create survey mode lights:", e);
12939
12993
  }
@@ -12959,19 +13013,19 @@ class CA {
12959
13013
  this.pendingAnimations.add(l);
12960
13014
  const c = performance.now(), A = s - t;
12961
13015
  let h, d;
12962
- i !== void 0 && n !== void 0 && (h = new m.Color(i), d = new m.Color(n));
13016
+ i !== void 0 && n !== void 0 && (h = new f.Color(i), d = new f.Color(n));
12963
13017
  const u = (g) => {
12964
13018
  if (!this.pendingAnimations.has(l) || this.isDisposed) {
12965
13019
  r && r();
12966
13020
  return;
12967
13021
  }
12968
13022
  try {
12969
- const p = g - c, b = Math.min(p / o, 1), E = 1 - Math.pow(1 - b, 3);
13023
+ const p = g - c, b = Math.min(p / o, 1), C = 1 - Math.pow(1 - b, 3);
12970
13024
  if (!e || this.scene && !this.scene.children.includes(e)) {
12971
13025
  this.pendingAnimations.delete(l), r && r();
12972
13026
  return;
12973
13027
  }
12974
- e.intensity = t + A * E, h && d && e.color && e.color.lerpColors(h, d, E), b < 1 ? requestAnimationFrame(u) : (this.pendingAnimations.delete(l), r && r());
13028
+ e.intensity = t + A * C, h && d && e.color && e.color.lerpColors(h, d, C), b < 1 ? requestAnimationFrame(u) : (this.pendingAnimations.delete(l), r && r());
12975
13029
  } catch (p) {
12976
13030
  console.error("Error in lighting animation:", p), this.pendingAnimations.delete(l), r && r();
12977
13031
  }
@@ -13041,7 +13095,7 @@ class EA {
13041
13095
  * Apply Quest-specific optimizations
13042
13096
  */
13043
13097
  applyQuestOptimizations() {
13044
- this.isQuest2 ? (this.camera.far = 20, this.camera.updateProjectionMatrix(), this.isDiveModeEnabled && (this.scene.fog = new m.FogExp2(268073, 0.084))) : (this.camera.far = 2e3, this.camera.updateProjectionMatrix(), this.isDiveModeEnabled && (this.scene.fog = new m.FogExp2(268073, 0.056)));
13098
+ this.isQuest2 ? (this.camera.far = 20, this.camera.updateProjectionMatrix(), this.isDiveModeEnabled && (this.scene.fog = new f.FogExp2(268073, 0.084))) : (this.camera.far = 2e3, this.camera.updateProjectionMatrix(), this.isDiveModeEnabled && (this.scene.fog = new f.FogExp2(268073, 0.056)));
13045
13099
  }
13046
13100
  /**
13047
13101
  * Apply mode-specific settings for VR vs Desktop
@@ -13053,7 +13107,7 @@ class EA {
13053
13107
  this.scene.fog = null;
13054
13108
  return;
13055
13109
  }
13056
- e ? (this.scene.fog = new m.FogExp2(268073, 0.056), this.lighting.setVRDiveMode(), this.isDiveModeEnabled && this.torch.enableTorch()) : (this.scene.fog = new m.FogExp2(268073, 5e-3), this.lighting.setDesktopDiveMode()), this.particles.updateFog(this.scene.fog);
13110
+ e ? (this.scene.fog = new f.FogExp2(268073, 0.056), this.lighting.setVRDiveMode(), this.isDiveModeEnabled && this.torch.enableTorch()) : (this.scene.fog = new f.FogExp2(268073, 5e-3), this.lighting.setDesktopDiveMode()), this.particles.updateFog(this.scene.fog);
13057
13111
  }
13058
13112
  }
13059
13113
  /**
@@ -13250,9 +13304,9 @@ class yA extends yt {
13250
13304
  }
13251
13305
  setModelSizeFromObject(e) {
13252
13306
  if (!e) return;
13253
- const t = new m.Box3().setFromObject(e);
13307
+ const t = new f.Box3().setFromObject(e);
13254
13308
  if (t.isEmpty()) return;
13255
- const s = t.getSize(new m.Vector3()), i = Math.max(s.x, s.y, s.z);
13309
+ const s = t.getSize(new f.Vector3()), i = Math.max(s.x, s.y, s.z);
13256
13310
  i > 0 && Number.isFinite(i) && (this.modelSize = Math.max(1, Math.min(1e4, i)));
13257
13311
  }
13258
13312
  update(e) {
@@ -13262,12 +13316,12 @@ class yA extends yt {
13262
13316
  return;
13263
13317
  }
13264
13318
  if (!this.camera) return;
13265
- const t = this.modelSize / this.speedScale, i = (this.keys.shift ? this.boostSpeed : this.baseSpeed) * t, n = new m.Vector3();
13319
+ const t = this.modelSize / this.speedScale, i = (this.keys.shift ? this.boostSpeed : this.baseSpeed) * t, n = new f.Vector3();
13266
13320
  this.keys.w && (n.z -= 1), this.keys.s && (n.z += 1), this.keys.a && (n.x -= 1), this.keys.d && (n.x += 1), this.keys.q && (n.y -= 1), this.keys.e && (n.y += 1), n.lengthSq() > 0 && (n.normalize(), n.applyQuaternion(this.camera.quaternion), this.camera.position.addScaledVector(n, i * e), this._syncControlsTarget());
13267
13321
  }
13268
13322
  _syncControlsTarget() {
13269
13323
  if (!this.controls || !this.camera) return;
13270
- const e = new m.Vector3(0, 0, -5).applyQuaternion(this.camera.quaternion);
13324
+ const e = new f.Vector3(0, 0, -5).applyQuaternion(this.camera.quaternion);
13271
13325
  this.controls.target.copy(this.camera.position).add(e);
13272
13326
  }
13273
13327
  _onKeyDown(e) {
@@ -13295,13 +13349,13 @@ class yA extends yt {
13295
13349
  -Math.PI / 2 + 0.01,
13296
13350
  Math.min(Math.PI / 2 - 0.01, this.cameraPitch)
13297
13351
  );
13298
- const t = new m.Euler(this.cameraPitch, this.cameraYaw, 0, "YXZ");
13352
+ const t = new f.Euler(this.cameraPitch, this.cameraYaw, 0, "YXZ");
13299
13353
  this.camera.quaternion.setFromEuler(t), this._syncControlsTarget();
13300
13354
  }
13301
13355
  _onPointerLockChange() {
13302
13356
  const e = this.pointerLocked;
13303
13357
  if (this.pointerLocked = document.pointerLockElement === this.domElement, this.pointerLocked && !e && this.camera) {
13304
- const t = new m.Euler().setFromQuaternion(this.camera.quaternion, "YXZ");
13358
+ const t = new f.Euler().setFromQuaternion(this.camera.quaternion, "YXZ");
13305
13359
  this.cameraYaw = t.y, this.cameraPitch = t.x;
13306
13360
  }
13307
13361
  this.controls && (this.pointerLocked ? (this._controlsEnabledBefore = this.controls.enabled, this.controls.enabled = !1) : this.controls.enabled = this._controlsEnabledBefore), this.emit("fly-mode-change", { active: this.pointerLocked });
@@ -13757,7 +13811,7 @@ class ri extends yt {
13757
13811
  const t = this.getPointerRaycastInfo(e), s = t?.mouse, i = t?.camera;
13758
13812
  if (!s || !i)
13759
13813
  return;
13760
- const n = new m.Raycaster();
13814
+ const n = new f.Raycaster();
13761
13815
  n.setFromCamera(s, i);
13762
13816
  let o = [];
13763
13817
  if (this.measurementSystem && this.measurementSystem._raycastTargets && this.measurementSystem._raycastTargets.length > 0)
@@ -13933,14 +13987,14 @@ class ri extends yt {
13933
13987
  const g = s / 100 * Math.PI * 2;
13934
13988
  c.strokeStyle = "#ffffff", c.lineWidth = 3, c.beginPath(), c.arc(A, u, d, -Math.PI / 2, -Math.PI / 2 + g), c.stroke();
13935
13989
  }
13936
- if (c.fillStyle = "white", c.font = '600 16px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', c.textAlign = "center", c.textBaseline = "middle", c.shadowColor = "rgba(0, 0, 0, 0.8)", c.shadowBlur = 2, c.shadowOffsetX = 1, c.shadowOffsetY = 1, c.fillText(`${Math.round(s)}%`, A, u), t && (c.fillStyle = "white", c.font = '600 28px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', c.textAlign = "center", c.textBaseline = "middle", c.shadowColor = "rgba(0, 0, 0, 0.8)", c.shadowBlur = 4, c.shadowOffsetX = 1, c.shadowOffsetY = 1, c.fillText(t, A, h + 20)), c.fillStyle = "rgba(255, 255, 255, 0.9)", c.font = '400 20px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', c.shadowColor = "rgba(0, 0, 0, 0.8)", c.shadowBlur = 3, c.shadowOffsetX = 1, c.shadowOffsetY = 1, c.fillText(e, A, h + 50), c.restore(), this.vrLoadingTexture ? this.vrLoadingTexture.needsUpdate = !0 : (this.vrLoadingTexture = new m.CanvasTexture(this.vrLoadingCanvas), this.vrLoadingTexture.minFilter = m.LinearFilter, this.vrLoadingTexture.magFilter = m.LinearFilter), !this.vrLoadingSprite) {
13937
- const g = new m.SpriteMaterial({
13990
+ if (c.fillStyle = "white", c.font = '600 16px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', c.textAlign = "center", c.textBaseline = "middle", c.shadowColor = "rgba(0, 0, 0, 0.8)", c.shadowBlur = 2, c.shadowOffsetX = 1, c.shadowOffsetY = 1, c.fillText(`${Math.round(s)}%`, A, u), t && (c.fillStyle = "white", c.font = '600 28px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', c.textAlign = "center", c.textBaseline = "middle", c.shadowColor = "rgba(0, 0, 0, 0.8)", c.shadowBlur = 4, c.shadowOffsetX = 1, c.shadowOffsetY = 1, c.fillText(t, A, h + 20)), c.fillStyle = "rgba(255, 255, 255, 0.9)", c.font = '400 20px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', c.shadowColor = "rgba(0, 0, 0, 0.8)", c.shadowBlur = 3, c.shadowOffsetX = 1, c.shadowOffsetY = 1, c.fillText(e, A, h + 50), c.restore(), this.vrLoadingTexture ? this.vrLoadingTexture.needsUpdate = !0 : (this.vrLoadingTexture = new f.CanvasTexture(this.vrLoadingCanvas), this.vrLoadingTexture.minFilter = f.LinearFilter, this.vrLoadingTexture.magFilter = f.LinearFilter), !this.vrLoadingSprite) {
13991
+ const g = new f.SpriteMaterial({
13938
13992
  map: this.vrLoadingTexture,
13939
13993
  depthTest: !1,
13940
13994
  depthWrite: !1,
13941
13995
  transparent: !0
13942
13996
  });
13943
- this.vrLoadingSprite = new m.Sprite(g);
13997
+ this.vrLoadingSprite = new f.Sprite(g);
13944
13998
  const p = 0.7, b = n / o;
13945
13999
  this.vrLoadingSprite.scale.set(p * b, p, 1);
13946
14000
  }
@@ -14108,11 +14162,11 @@ class ri extends yt {
14108
14162
  positionVRLoadingSprite() {
14109
14163
  if (!this.vrLoadingSprite || !this.belowViewer || !this.belowViewer.cameraManager)
14110
14164
  return;
14111
- const e = this.belowViewer.cameraManager.camera, t = 2, s = new m.Vector3();
14165
+ const e = this.belowViewer.cameraManager.camera, t = 2, s = new f.Vector3();
14112
14166
  e.getWorldDirection(s);
14113
- const i = new m.Vector3();
14167
+ const i = new f.Vector3();
14114
14168
  e.getWorldPosition(i);
14115
- const n = new m.Vector3();
14169
+ const n = new f.Vector3();
14116
14170
  n.copy(i), n.add(s.multiplyScalar(t)), this.vrLoadingSprite.position.copy(n), this.vrLoadingSprite.lookAt(i);
14117
14171
  }
14118
14172
  updateStatus(e) {
@@ -14438,7 +14492,7 @@ export {
14438
14492
  _n as Line2,
14439
14493
  oi as LineGeometry,
14440
14494
  ss as LineMaterial,
14441
- $ as ModelLoader,
14495
+ ee as ModelLoader,
14442
14496
  ri as ModelViewer,
14443
14497
  Zr as Scene,
14444
14498
  iA as VRManager