belowjs 1.7.1 → 1.7.3

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,7 +3744,7 @@ 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) => {
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)), s !== null && ["map", "normalMap", "roughnessMap", "metalnessMap", "aoMap"].forEach((d) => {
3748
3748
  A[d] && (A[d].anisotropy = s, A[d].needsUpdate = !0);
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
3750
  } else (r.type === "MeshStandardMaterial" || r.type === "MeshPhysicalMaterial") && (s !== null && ["map", "normalMap", "roughnessMap", "metalnessMap", "aoMap", "emissiveMap"].forEach((h) => {
@@ -3755,7 +3755,7 @@ class $ {
3755
3755
  }), n.geometry && (n.geometry.computeVertexNormals(), n.geometry.normalizeNormals(), o.some((l) => l.normalMap) && 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() {
@@ -3833,11 +3833,11 @@ class $ {
3833
3833
  return !!(/iPhone|iPad|iPod/.test(t) || t === "MacIntel" && navigator.maxTouchPoints > 1 || /AppleWebKit/.test(e) && /Mobile/.test(e) && !/Chrome|CriOS|FxiOS/.test(e));
3834
3834
  }
3835
3835
  static getPlatformKey() {
3836
- return $.isIOSWebKit() ? "ios" : "default";
3836
+ return ee.isIOSWebKit() ? "ios" : "default";
3837
3837
  }
3838
3838
  }
3839
- $.sharedKTX2Loaders = /* @__PURE__ */ new Map();
3840
- $.sharedKTX2SetupComplete = /* @__PURE__ */ new Map();
3839
+ ee.sharedKTX2Loaders = /* @__PURE__ */ new Map();
3840
+ ee.sharedKTX2SetupComplete = /* @__PURE__ */ new Map();
3841
3841
  let Sl = class {
3842
3842
  get unloadPriorityCallback() {
3843
3843
  return this._unloadPriorityCallback;
@@ -3919,36 +3919,36 @@ let Sl = class {
3919
3919
  minBytesSize: A,
3920
3920
  maxBytesSize: h
3921
3921
  } = 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;
3922
+ let C = !1;
3923
+ const E = g > 0 && d > 0 || u && i.length > s;
3924
+ if (d && this.cachedBytes > A || u && this.cachedBytes > h || E) {
3925
+ i.sort((v, S) => {
3926
+ const Q = o.has(v), D = o.has(S);
3927
+ if (Q === D) {
3928
+ const G = r.has(v), T = r.has(S);
3929
+ return G === T ? -b(v, S) : G ? 1 : -1;
3930
3930
  } else
3931
- return R ? 1 : -1;
3931
+ return Q ? 1 : -1;
3932
3932
  });
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)
3933
+ 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);
3934
+ let B = 0, x = 0;
3935
+ for (; this.cachedBytes - x > h || i.length - B > s; ) {
3936
+ const v = i[B], S = c.get(v) || 0;
3937
+ if (o.has(v) && r.has(v) || this.cachedBytes - x - S < h && i.length - B <= s)
3938
3938
  break;
3939
- M += x, B++;
3939
+ x += S, B++;
3940
3940
  }
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)
3941
+ for (; x < w || B < m; ) {
3942
+ const v = i[B], S = c.get(v) || 0;
3943
+ if (o.has(v) || this.cachedBytes - x - S < A && B >= m)
3944
3944
  break;
3945
- M += x, B++;
3945
+ x += S, B++;
3946
3946
  }
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;
3947
+ i.splice(0, B).forEach((v) => {
3948
+ 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);
3949
+ }), C = B < g || x < p && B < d, C = C && B > 0;
3950
3950
  }
3951
- E && (this.unloadingHandle = requestAnimationFrame(() => this.scheduleUnload()));
3951
+ C && (this.unloadingHandle = requestAnimationFrame(() => this.scheduleUnload()));
3952
3952
  }
3953
3953
  scheduleUnload() {
3954
3954
  cancelAnimationFrame(this.unloadingHandle), this.scheduled || (this.scheduled = !0, queueMicrotask(() => {
@@ -4940,12 +4940,12 @@ let Gl = class extends It {
4940
4940
  0,
4941
4941
  l,
4942
4942
  c
4943
- ), b = u + l + c, E = new Uint8Array(e, b, n - b);
4943
+ ), b = u + l + c, C = new Uint8Array(e, b, n - b);
4944
4944
  return {
4945
4945
  version: i,
4946
4946
  featureTable: d,
4947
4947
  batchTable: p,
4948
- glbBytes: E
4948
+ glbBytes: C
4949
4949
  };
4950
4950
  }
4951
4951
  }, Ul = class extends It {
@@ -4973,13 +4973,13 @@ let Gl = class extends It {
4973
4973
  0,
4974
4974
  l,
4975
4975
  c
4976
- ), E = g + l + c, C = new Uint8Array(e, E, n - E);
4977
- let y = null, f = null, I = null;
4976
+ ), C = g + l + c, E = new Uint8Array(e, C, n - C);
4977
+ let y = null, m = null, I = null;
4978
4978
  if (A)
4979
- y = C, f = Promise.resolve();
4979
+ y = E, m = Promise.resolve();
4980
4980
  else {
4981
- const w = this.resolveExternalURL(di(C));
4982
- I = ui(w), f = fetch(w, this.fetchOptions).then((B) => {
4981
+ const w = this.resolveExternalURL(di(E));
4982
+ I = ui(w), m = fetch(w, this.fetchOptions).then((B) => {
4983
4983
  if (!B.ok)
4984
4984
  throw new Error(`I3DMLoaderBase : Failed to load file "${w}" with status ${B.status} : ${B.statusText}`);
4985
4985
  return B.arrayBuffer();
@@ -4987,7 +4987,7 @@ let Gl = class extends It {
4987
4987
  y = new Uint8Array(B);
4988
4988
  });
4989
4989
  }
4990
- return f.then(() => ({
4990
+ return m.then(() => ({
4991
4991
  version: i,
4992
4992
  featureTable: u,
4993
4993
  batchTable: b,
@@ -5058,10 +5058,10 @@ function Ol(a) {
5058
5058
  function Hl(a) {
5059
5059
  return -a + Math.PI / 2;
5060
5060
  }
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;
5061
+ 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
5062
  let Po = class {
5063
5063
  constructor(e = 1, t = 1, s = 1) {
5064
- this.name = "", this.radius = new v(e, t, s);
5064
+ this.name = "", this.radius = new M(e, t, s);
5065
5065
  }
5066
5066
  intersectRay(e, t) {
5067
5067
  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 +5081,10 @@ let Po = class {
5081
5081
  // OBJECT_FRAME: oriented such that "+Y" is up and "+Z" is forward.
5082
5082
  // CAMERA_FRAME: oriented such that "+Y" is up and "-Z" is forward.
5083
5083
  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;
5084
+ 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
5085
  }
5086
5086
  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;
5087
+ 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
5088
  }
5089
5089
  getEastNorthUpAxes(e, t, s, i, n, o = De) {
5090
5090
  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 +5104,13 @@ let Po = class {
5104
5104
  getCartographicToPosition(e, t, s, i) {
5105
5105
  this.getCartographicToNormal(e, t, Se);
5106
5106
  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);
5107
+ X.copy(Se), X.x *= n.x ** 2, X.y *= n.y ** 2, X.z *= n.z ** 2;
5108
+ const o = Math.sqrt(Se.dot(X));
5109
+ return X.divideScalar(o), i.copy(X).addScaledVector(Se, s);
5110
5110
  }
5111
5111
  getPositionToCartographic(e, t) {
5112
- this.getPositionToSurfacePoint(e, W), this.getPositionToNormal(e, Se);
5113
- const s = Rs.subVectors(e, W);
5112
+ this.getPositionToSurfacePoint(e, X), this.getPositionToNormal(e, Se);
5113
+ const s = Rs.subVectors(e, X);
5114
5114
  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
5115
  }
5116
5116
  getCartographicToNormal(e, t, s) {
@@ -5121,7 +5121,7 @@ let Po = class {
5121
5121
  return t.copy(e), t.x /= s.x ** 2, t.y /= s.y ** 2, t.z /= s.z ** 2, t.normalize(), t;
5122
5122
  }
5123
5123
  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);
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 = X.copy(e).multiplyScalar(h);
5125
5125
  if (A < zl)
5126
5126
  return isFinite(h) ? t.copy(d) : null;
5127
5127
  const u = Rs.set(
@@ -5129,16 +5129,16 @@ let Po = class {
5129
5129
  d.y * n * 2,
5130
5130
  d.z * o * 2
5131
5131
  );
5132
- let g = (1 - h) * e.length() / (0.5 * u.length()), p = 0, b, E, C, y, f, I, w, B, M, S, x;
5132
+ let g = (1 - h) * e.length() / (0.5 * u.length()), p = 0, b, C, E, y, m, I, w, B, x, v, S;
5133
5133
  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;
5134
+ 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;
5135
+ const Q = -2 * C;
5136
+ p = b / Q;
5137
5137
  } while (Math.abs(b) > ql);
5138
5138
  return t.set(
5139
- e.x * C,
5139
+ e.x * E,
5140
5140
  e.y * y,
5141
- e.z * f
5141
+ e.z * m
5142
5142
  );
5143
5143
  }
5144
5144
  calculateHorizonDistance(e, t) {
@@ -5150,14 +5150,14 @@ let Po = class {
5150
5150
  return t / Math.sqrt(1 - s * n);
5151
5151
  }
5152
5152
  getPositionElevation(e) {
5153
- this.getPositionToSurfacePoint(e, W);
5154
- const t = Rs.subVectors(e, W);
5153
+ this.getPositionToSurfacePoint(e, X);
5154
+ const t = Rs.subVectors(e, X);
5155
5155
  return Math.sign(t.dot(e)) * t.length();
5156
5156
  }
5157
5157
  // Returns an estimate of the closest point on the ellipsoid to the ray. Returns
5158
5158
  // the surface intersection if they collide.
5159
5159
  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));
5160
+ 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
5161
  }
5162
5162
  copy(e) {
5163
5163
  return this.radius.copy(e.radius), this;
@@ -5168,10 +5168,10 @@ let Po = class {
5168
5168
  };
5169
5169
  const ds = new Po(Oi, Oi, vl);
5170
5170
  ds.name = "WGS84 Earth";
5171
- const kt = /* @__PURE__ */ new v(), _t = /* @__PURE__ */ new v(), Z = /* @__PURE__ */ new v(), Pt = /* @__PURE__ */ new is();
5171
+ const kt = /* @__PURE__ */ new M(), _t = /* @__PURE__ */ new M(), $ = /* @__PURE__ */ new M(), Pt = /* @__PURE__ */ new is();
5172
5172
  let Zi = class {
5173
5173
  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());
5174
+ 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
5175
  }
5176
5176
  copy(e) {
5177
5177
  return this.box.copy(e.box), this.transform.copy(e.transform), this.update(), this;
@@ -5195,10 +5195,10 @@ let Zi = class {
5195
5195
  * @returns {number}
5196
5196
  */
5197
5197
  distanceToPoint(e) {
5198
- return this.clampPoint(e, Z).distanceTo(e);
5198
+ return this.clampPoint(e, $).distanceTo(e);
5199
5199
  }
5200
5200
  containsPoint(e) {
5201
- return Z.copy(e).applyMatrix4(this.inverseTransform), this.box.containsPoint(Z);
5201
+ return $.copy(e).applyMatrix4(this.inverseTransform), this.box.containsPoint($);
5202
5202
  }
5203
5203
  // returns boolean indicating whether the ray has intersected the obb
5204
5204
  intersectsRay(e) {
@@ -5225,10 +5225,10 @@ let Zi = class {
5225
5225
  this.updatePlanes();
5226
5226
  }
5227
5227
  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();
5228
+ 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
5229
  }
5230
5230
  intersectsSphere(e) {
5231
- return this.clampPoint(e.center, Z), Z.distanceToSquared(e.center) <= e.radius * e.radius;
5231
+ return this.clampPoint(e.center, $), $.distanceToSquared(e.center) <= e.radius * e.radius;
5232
5232
  }
5233
5233
  intersectsFrustum(e) {
5234
5234
  return this._intersectsPlaneShape(e.planes, e.points);
@@ -5263,7 +5263,7 @@ let Zi = class {
5263
5263
  return !0;
5264
5264
  }
5265
5265
  };
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();
5266
+ 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
5267
  function ve(a, e) {
5268
5268
  e.radius = Math.max(e.radius, a.distanceToSquared(e.center));
5269
5269
  }
@@ -5287,7 +5287,7 @@ let Kl = class extends Po {
5287
5287
  let u;
5288
5288
  h ? u = s : d ? u = i : u = 0;
5289
5289
  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);
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), 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
5291
  }
5292
5292
  getBoundingSphere(e) {
5293
5293
  en(this.radius) && console.warn("EllipsoidRegion: Triaxial ellipsoids are not supported."), this.getBoundingBox(jl, $i), e.center.setFromMatrixPosition($i), e.radius = 0;
@@ -5300,7 +5300,7 @@ let Kl = class extends Po {
5300
5300
  heightEnd: r
5301
5301
  } = this, l = (t + s) * 0.5, c = (i + n) * 0.5, A = t > 0, h = s < 0;
5302
5302
  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);
5303
+ 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
5304
  }
5305
5305
  };
5306
5306
  function Yl(a) {
@@ -5347,7 +5347,7 @@ function Wl(a) {
5347
5347
  return [i, n, o];
5348
5348
  }
5349
5349
  const ct = /* @__PURE__ */ new k();
5350
- function Xl(a, e, t = new v()) {
5350
+ function Xl(a, e, t = new M()) {
5351
5351
  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
5352
  const s = st.clamp(-t.z, 0, 1);
5353
5353
  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 +5362,17 @@ class Uo extends Nl {
5362
5362
  }
5363
5363
  parse(e) {
5364
5364
  return super.parse(e).then(async (t) => {
5365
- const { featureTable: s, batchTable: i } = t, n = new Nn(), o = s.header.extensions, r = new v();
5365
+ const { featureTable: s, batchTable: i } = t, n = new Nn(), o = s.header.extensions, r = new M();
5366
5366
  let l;
5367
5367
  if (o && o["3DTILES_draco_point_compression"]) {
5368
5368
  const { byteOffset: h, byteLength: d, properties: u } = o["3DTILES_draco_point_compression"], g = this.manager.getHandler("draco.drc");
5369
5369
  if (g == null)
5370
5370
  throw new Error("PNTSLoader: dracoLoader not available.");
5371
5371
  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];
5372
+ for (const E in u)
5373
+ if (E in tn && E in u) {
5374
+ const y = tn[E];
5375
+ p[y] = u[E];
5376
5376
  }
5377
5377
  const b = {
5378
5378
  attributeIDs: p,
@@ -5381,16 +5381,16 @@ class Uo extends Nl {
5381
5381
  color: "Uint8Array"
5382
5382
  },
5383
5383
  useUniqueIDs: !0
5384
- }, E = s.getBuffer(h, d);
5385
- l = await g.decodeGeometry(E, b), l.attributes.color && (n.vertexColors = !0);
5384
+ }, C = s.getBuffer(h, d);
5385
+ l = await g.decodeGeometry(C, b), l.attributes.color && (n.vertexColors = !0);
5386
5386
  } 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");
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"), 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
5388
  if (l = new rs(), y) {
5389
5389
  const w = new Float32Array(h * 3);
5390
5390
  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];
5391
+ for (let x = 0; x < 3; x++) {
5392
+ const v = 3 * B + x;
5393
+ w[v] = y[v] / 65535 * m[x];
5394
5394
  }
5395
5395
  r.x = I[0], r.y = I[1], r.z = I[2], l.setAttribute("position", new ne(w, 3, !1));
5396
5396
  } else
@@ -5398,10 +5398,10 @@ class Uo extends Nl {
5398
5398
  if (u !== null)
5399
5399
  l.setAttribute("normal", new ne(u, 3, !1));
5400
5400
  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;
5401
+ const w = new Float32Array(h * 3), B = new M();
5402
+ for (let x = 0; x < h; x++) {
5403
+ const v = g[x * 2], S = g[x * 2 + 1], Q = Xl(v, S, B);
5404
+ w[x * 3] = Q.x, w[x * 3 + 1] = Q.y, w[x * 3 + 2] = Q.z;
5405
5405
  }
5406
5406
  l.setAttribute("normal", new ne(w, 3, !1));
5407
5407
  }
@@ -5409,20 +5409,20 @@ class Uo extends Nl {
5409
5409
  l.setAttribute("color", new ne(b, 4, !0)), n.vertexColors = !0, n.transparent = !0, n.depthWrite = !1;
5410
5410
  else if (p !== null)
5411
5411
  l.setAttribute("color", new ne(p, 3, !0)), n.vertexColors = !0;
5412
- else if (E !== null) {
5412
+ else if (C !== null) {
5413
5413
  const w = new Uint8Array(h * 3);
5414
5414
  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];
5415
+ const x = Wl(C[B]);
5416
+ for (let v = 0; v < 3; v++) {
5417
+ const S = 3 * B + v;
5418
+ w[S] = x[v];
5419
5419
  }
5420
5420
  }
5421
5421
  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]);
5422
+ } else if (E !== null) {
5423
+ const w = new Ee(E[0], E[1], E[2]);
5424
5424
  n.color = w;
5425
- const B = C[3] / 255;
5425
+ const B = E[3] / 255;
5426
5426
  B < 1 && (n.opacity = B, n.transparent = !0, n.depthWrite = !1);
5427
5427
  }
5428
5428
  }
@@ -5433,7 +5433,7 @@ class Uo extends Nl {
5433
5433
  });
5434
5434
  }
5435
5435
  }
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 = {};
5436
+ 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
5437
  function rn(a, e, t, s) {
5438
5438
  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
5439
  const i = s.x;
@@ -5460,48 +5460,48 @@ class No extends Ul {
5460
5460
  A.parse(n, h, (u) => {
5461
5461
  const g = s.getData("INSTANCES_LENGTH");
5462
5462
  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");
5463
+ 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
5464
  if (!p && b) {
5465
5465
  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];
5466
+ for (let T = 0; T < g; T++)
5467
+ 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
5468
  }
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);
5469
+ const Q = new M();
5470
+ for (let T = 0; T < g; T++)
5471
+ Q.x += p[T * 3 + 0] / g, Q.y += p[T * 3 + 1] / g, Q.z += p[T * 3 + 2] / g;
5472
+ const D = [], G = [];
5473
+ u.scene.updateMatrixWorld(), u.scene.traverse((T) => {
5474
+ if (T.isMesh) {
5475
+ G.push(T);
5476
+ const { geometry: K, material: U } = T, F = new li(K, U, g);
5477
+ F.position.copy(Q), v && (F.position.x += v[0], F.position.y += v[1], F.position.z += v[2]), D.push(F);
5478
5478
  }
5479
5479
  });
5480
- for (let Q = 0; Q < g; Q++) {
5480
+ for (let T = 0; T < g; T++) {
5481
5481
  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]
5482
+ p[T * 3 + 0] - Q.x,
5483
+ p[T * 3 + 1] - Q.y,
5484
+ p[T * 3 + 2] - Q.z
5485
+ ), Ut.identity(), y && m ? (qe.set(
5486
+ y[T * 3 + 0],
5487
+ y[T * 3 + 1],
5488
+ y[T * 3 + 2]
5489
5489
  ), ze.set(
5490
- f[Q * 3 + 0],
5491
- f[Q * 3 + 1],
5492
- f[Q * 3 + 2]
5490
+ m[T * 3 + 0],
5491
+ m[T * 3 + 1],
5492
+ m[T * 3 + 2]
5493
5493
  ), Gt.crossVectors(ze, qe).normalize(), je.makeBasis(
5494
5494
  ze,
5495
5495
  qe,
5496
5496
  Gt
5497
5497
  ), Ut.setFromRotationMatrix(je)) : I && w && (rn(
5498
- I[Q * 2 + 0],
5499
- I[Q * 2 + 1],
5498
+ I[T * 2 + 0],
5499
+ I[T * 2 + 1],
5500
5500
  65535,
5501
5501
  qe
5502
5502
  ), rn(
5503
- w[Q * 2 + 0],
5504
- w[Q * 2 + 1],
5503
+ w[T * 2 + 0],
5504
+ w[T * 2 + 1],
5505
5505
  65535,
5506
5506
  ze
5507
5507
  ), Gt.crossVectors(ze, qe).normalize(), je.makeBasis(
@@ -5509,18 +5509,18 @@ class No extends Ul {
5509
5509
  qe,
5510
5510
  Gt
5511
5511
  ), 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);
5512
+ B[T * 3 + 0],
5513
+ B[T * 3 + 1],
5514
+ B[T * 3 + 2]
5515
+ ), x && Nt.multiplyScalar(x[T]);
5516
+ for (let K = 0, U = D.length; K < U; K++) {
5517
+ const F = D[K];
5518
+ _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);
5519
+ const O = G[K];
5520
+ sn.multiplyMatrices(je, O.matrixWorld), F.setMatrixAt(T, sn);
5521
5521
  }
5522
5522
  }
5523
- u.scene.clear(), u.scene.add(...L), u.batchTable = i, u.featureTable = s, u.scene.batchTable = i, u.scene.featureTable = s, o(u);
5523
+ u.scene.clear(), u.scene.add(...D), u.batchTable = i, u.featureTable = s, u.scene.batchTable = i, u.scene.featureTable = s, o(u);
5524
5524
  }, r);
5525
5525
  });
5526
5526
  });
@@ -5601,7 +5601,7 @@ class $l extends Xe {
5601
5601
  this.parent && e && this.parent.updateWorldMatrix(e, !1), this.updateMatrixWorld(!0);
5602
5602
  }
5603
5603
  }
5604
- const Vo = /* @__PURE__ */ new is(), Gs = /* @__PURE__ */ new v(), Vt = [];
5604
+ const Vo = /* @__PURE__ */ new is(), Gs = /* @__PURE__ */ new M(), Vt = [];
5605
5605
  function Oo(a, e) {
5606
5606
  return a.distance - e.distance;
5607
5607
  }
@@ -5657,7 +5657,7 @@ function jo(a, e, t, s, i = null) {
5657
5657
  for (let c = 0, A = l.length; c < A; c++)
5658
5658
  jo(a, l[c], t, s, i);
5659
5659
  }
5660
- const ge = /* @__PURE__ */ new v(), pe = /* @__PURE__ */ new v(), fe = /* @__PURE__ */ new v(), an = /* @__PURE__ */ new v(), ln = /* @__PURE__ */ new v();
5660
+ const ge = /* @__PURE__ */ new M(), pe = /* @__PURE__ */ new M(), fe = /* @__PURE__ */ new M(), an = /* @__PURE__ */ new M(), ln = /* @__PURE__ */ new M();
5661
5661
  class tc {
5662
5662
  constructor() {
5663
5663
  this.sphere = null, this.obb = null, this.region = null, this.regionObb = null;
@@ -5769,7 +5769,7 @@ function ic(a, e, t, s) {
5769
5769
  }
5770
5770
  class nc extends Nr {
5771
5771
  constructor() {
5772
- super(), this.points = Array(8).fill().map(() => new v());
5772
+ super(), this.points = Array(8).fill().map(() => new M());
5773
5773
  }
5774
5774
  setFromProjectionMatrix(e, t) {
5775
5775
  return super.setFromProjectionMatrix(e, t), this.calculateFrustumPoints(), this;
@@ -5798,7 +5798,7 @@ class nc extends Nr {
5798
5798
  });
5799
5799
  }
5800
5800
  }
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);
5801
+ 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
5802
  function hn(a, e) {
5803
5803
  a.traverse((t) => {
5804
5804
  t.frustumCulled = t[Ko] && e;
@@ -5927,7 +5927,7 @@ let ac = class extends _l {
5927
5927
  isOrthographic: !1,
5928
5928
  sseDenominator: -1,
5929
5929
  // used if isOrthographic:false
5930
- position: new v(),
5930
+ position: new M(),
5931
5931
  invScale: -1,
5932
5932
  pixelSize: 0
5933
5933
  // used if isOrthographic:true
@@ -5969,32 +5969,32 @@ let ac = class extends _l {
5969
5969
  const h = o.transform, d = this._upRotationMatrix, u = (Ue(e) || s).toLowerCase();
5970
5970
  switch (u) {
5971
5971
  case "b3dm": {
5972
- const f = new Go(c);
5973
- f.workingPath = r, f.fetchOptions = l, f.adjustmentTransform.copy(d), A = f.parse(e);
5972
+ const m = new Go(c);
5973
+ m.workingPath = r, m.fetchOptions = l, m.adjustmentTransform.copy(d), A = m.parse(e);
5974
5974
  break;
5975
5975
  }
5976
5976
  case "pnts": {
5977
- const f = new Uo(c);
5978
- f.workingPath = r, f.fetchOptions = l, A = f.parse(e);
5977
+ const m = new Uo(c);
5978
+ m.workingPath = r, m.fetchOptions = l, A = m.parse(e);
5979
5979
  break;
5980
5980
  }
5981
5981
  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);
5982
+ const m = new No(c);
5983
+ m.workingPath = r, m.fetchOptions = l, m.adjustmentTransform.copy(d), m.ellipsoid.copy(this.ellipsoid), A = m.parse(e);
5984
5984
  break;
5985
5985
  }
5986
5986
  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);
5987
+ const m = new Zl(c);
5988
+ m.workingPath = r, m.fetchOptions = l, m.adjustmentTransform.copy(d), m.ellipsoid.copy(this.ellipsoid), A = m.parse(e).then((I) => I.scene);
5989
5989
  break;
5990
5990
  }
5991
5991
  // 3DTILES_content_gltf
5992
5992
  case "gltf":
5993
5993
  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) => {
5994
+ const m = c.getHandler("path.gltf") || c.getHandler("path.glb") || new Ne(c);
5995
+ m.setWithCredentials(l.credentials === "include"), m.setRequestHeader(l.headers || {}), l.credentials === "include" && l.mode === "cors" && m.setCrossOrigin("use-credentials");
5996
+ let I = m.resourcePath || m.path || r;
5997
+ !/[\\/]$/.test(I) && I.length && (I += "/"), A = m.parseAsync(e, I).then((w) => {
5998
5998
  w.scene = w.scene || new Xe();
5999
5999
  const { scene: B } = w;
6000
6000
  return B.updateMatrix(), B.matrix.multiply(d).decompose(B.position, B.quaternion, B.scale), w;
@@ -6002,7 +6002,7 @@ let ac = class extends _l {
6002
6002
  break;
6003
6003
  }
6004
6004
  default: {
6005
- A = this.invokeOnePlugin((f) => f.parseToMesh && f.parseToMesh(e, t, s, i, n));
6005
+ A = this.invokeOnePlugin((m) => m.parseToMesh && m.parseToMesh(e, t, s, i, n));
6006
6006
  break;
6007
6007
  }
6008
6008
  }
@@ -6010,27 +6010,27 @@ let ac = class extends _l {
6010
6010
  if (g === null)
6011
6011
  throw new Error(`TilesRenderer: Content type "${u}" not supported.`);
6012
6012
  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;
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((m) => m.processTileModel && m.processTileModel(p, t)), p.traverse((m) => {
6014
+ m[Ko] = m.frustumCulled;
6015
6015
  }), 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);
6016
+ const C = [], E = [], y = [];
6017
+ if (p.traverse((m) => {
6018
+ if (m.geometry && E.push(m.geometry), m.material) {
6019
+ const I = m.material;
6020
+ C.push(m.material);
6021
6021
  for (const w in I) {
6022
6022
  const B = I[w];
6023
6023
  B && B.isTexture && y.push(B);
6024
6024
  }
6025
6025
  }
6026
6026
  }), n.aborted) {
6027
- for (let f = 0, I = y.length; f < I; f++) {
6028
- const w = y[f];
6027
+ for (let m = 0, I = y.length; m < I; m++) {
6028
+ const w = y[m];
6029
6029
  w.image instanceof ImageBitmap && w.image.close(), w.dispose();
6030
6030
  }
6031
6031
  return;
6032
6032
  }
6033
- o.materials = E, o.geometry = C, o.textures = y, o.scene = p, o.metadata = b;
6033
+ o.materials = C, o.geometry = E, o.textures = y, o.scene = p, o.metadata = b;
6034
6034
  }
6035
6035
  disposeTile(e) {
6036
6036
  super.disposeTile(e);
@@ -6066,14 +6066,14 @@ let ac = class extends _l {
6066
6066
  const g = n[d];
6067
6067
  let p, b;
6068
6068
  if (g.isOrthographic) {
6069
- const C = g.pixelSize;
6070
- p = e.geometricError / C, b = 1 / 0;
6069
+ const E = g.pixelSize;
6070
+ p = e.geometricError / E, b = 1 / 0;
6071
6071
  } else {
6072
- const C = g.sseDenominator;
6073
- b = o.distanceToPoint(g.position), p = b === 0 ? 1 / 0 : e.geometricError / (b * C);
6072
+ const E = g.sseDenominator;
6073
+ b = o.distanceToPoint(g.position), p = b === 0 ? 1 / 0 : e.geometricError / (b * E);
6074
6074
  }
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);
6075
+ const C = n[d].frustum;
6076
+ 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
6077
  }
6078
6078
  r ? (t.inView = !0, t.error = l, t.distanceFromCamera = c) : (t.inView = !1, t.error = A, t.distanceFromCamera = h);
6079
6079
  }
@@ -6667,7 +6667,7 @@ class Yo {
6667
6667
  this._mesh.material = e;
6668
6668
  }
6669
6669
  }
6670
- function N(a, e, t) {
6670
+ function H(a, e, t) {
6671
6671
  return a && e in a ? a[e] : t;
6672
6672
  }
6673
6673
  function Jo(a) {
@@ -6693,7 +6693,7 @@ function ni(a) {
6693
6693
  case "VEC2":
6694
6694
  return new k();
6695
6695
  case "VEC3":
6696
- return new v();
6696
+ return new M();
6697
6697
  case "VEC4":
6698
6698
  return new nt();
6699
6699
  case "MAT2":
@@ -6938,7 +6938,7 @@ function Cc(a) {
6938
6938
  }
6939
6939
  class us {
6940
6940
  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")));
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 = 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
6942
  }
6943
6943
  // shape the given target to match the data type of the property
6944
6944
  // enums are set to their integer value
@@ -7039,7 +7039,7 @@ class yc extends Ci {
7039
7039
  }
7040
7040
  class Ic extends us {
7041
7041
  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");
7042
+ 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
7043
  }
7044
7044
  // returns the necessary array length based on the array offsets if present
7045
7045
  getArrayLengthFromId(e, t) {
@@ -7080,7 +7080,7 @@ class Bc extends Ci {
7080
7080
  if (r === "STRING") {
7081
7081
  let u = d + s, g = 0;
7082
7082
  if (n.stringOffsets !== null) {
7083
- const { stringOffsets: b, stringOffsetType: E } = n, C = Ct(E), y = new C(l[b]);
7083
+ const { stringOffsets: b, stringOffsetType: C } = n, E = Ct(C), y = new E(l[b]);
7084
7084
  g = y[u + 1] - y[u], u = y[u];
7085
7085
  }
7086
7086
  const p = new Uint8Array(h.buffer, u, g);
@@ -7192,7 +7192,7 @@ function $o(a, e, t, s) {
7192
7192
  const bn = /* @__PURE__ */ new k(), Cn = /* @__PURE__ */ new k(), En = /* @__PURE__ */ new k();
7193
7193
  class Sc extends us {
7194
7194
  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;
7195
+ 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
7196
  }
7197
7197
  // takes the buffer to read from and the value index to read
7198
7198
  readDataFromBuffer(e, t, s = null) {
@@ -7251,10 +7251,10 @@ class vc extends Ci {
7251
7251
  continue;
7252
7252
  }
7253
7253
  } 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) {
7254
+ 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);
7255
+ if (new Uint8Array(I.buffer).set(E), p.array) {
7256
7256
  const w = n[d];
7257
- for (let B = 0, M = w.length; B < M; B++)
7257
+ for (let B = 0, x = w.length; B < x; B++)
7258
7258
  w[B] = p.readDataFromBuffer(I, B, w[B]);
7259
7259
  } else
7260
7260
  n[d] = p.readDataFromBuffer(I, 0, n[d]);
@@ -7472,8 +7472,8 @@ class Rc {
7472
7472
  for (let u = 0, g = n.length; u < g; u++) {
7473
7473
  const p = n[u], b = "nullFeatureId" in p ? p.nullFeatureId : null;
7474
7474
  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);
7475
+ const { channels: C } = p.texture, E = C.map((m) => A[4 * u + m]);
7476
+ new Uint8Array(d.buffer).set(E);
7477
7477
  const y = d[0];
7478
7478
  y !== b && (o[u] = y);
7479
7479
  }
@@ -7571,7 +7571,7 @@ class Gc extends ac {
7571
7571
  }
7572
7572
  class Uc {
7573
7573
  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();
7574
+ this.renderer = e, this.camera = t, this.activeTilesets = /* @__PURE__ */ new Set(), this.tilesetStates = /* @__PURE__ */ new Map(), this.pendingQueueTasks = [], this._resolutionVec2 = new f.Vector2();
7575
7575
  }
7576
7576
  clamp(e, t, s) {
7577
7577
  return Math.min(s, Math.max(t, e));
@@ -7662,7 +7662,7 @@ class Uc {
7662
7662
  }
7663
7663
  }
7664
7664
  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);
7665
+ 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
7666
  }
7667
7667
  normalizeUpAxis(e = "+Y") {
7668
7668
  const t = String(e || "+Y").trim().toUpperCase();
@@ -7694,7 +7694,7 @@ class Uc {
7694
7694
  getRootTransformUpVector(e) {
7695
7695
  const t = this.getRootTransformArray(e);
7696
7696
  if (!t) return null;
7697
- const s = new m.Vector3(t[8], t[9], t[10]);
7697
+ const s = new f.Vector3(t[8], t[9], t[10]);
7698
7698
  return s.lengthSq() <= 1e-12 ? null : s.normalize();
7699
7699
  }
7700
7700
  isLikelyGeospatialTileset(e) {
@@ -7727,7 +7727,7 @@ class Uc {
7727
7727
  if (n.lengthSq() <= 1e-12)
7728
7728
  return !1;
7729
7729
  n.normalize();
7730
- const o = new m.Vector3(0, 1, 0), r = new m.Quaternion().setFromUnitVectors(n, o);
7730
+ const o = new f.Vector3(0, 1, 0), r = new f.Quaternion().setFromUnitVectors(n, o);
7731
7731
  return e.geoGroup.quaternion.copy(r), e.geoGroup.updateMatrixWorld(!0), e.hasGeospatialReoriented = !0, !0;
7732
7732
  }
7733
7733
  setUpAxis(e, t = "+Y") {
@@ -7756,7 +7756,7 @@ class Uc {
7756
7756
  return null;
7757
7757
  const s = new so();
7758
7758
  s.setDecoderPath(t.dracoDecoderPath || _c);
7759
- const i = new ee();
7759
+ const i = new te();
7760
7760
  i.setTranscoderPath(t.ktx2TranscoderPath || Pc), this.renderer && i.detectSupport(this.renderer);
7761
7761
  const n = new Fc({
7762
7762
  rtc: !0,
@@ -7768,8 +7768,8 @@ class Uc {
7768
7768
  convertBasicMaterial(e) {
7769
7769
  if (!e?.isMeshBasicMaterial)
7770
7770
  return e;
7771
- const t = new m.MeshStandardMaterial({
7772
- color: e.color ? e.color.clone() : new m.Color(16777215),
7771
+ const t = new f.MeshStandardMaterial({
7772
+ color: e.color ? e.color.clone() : new f.Color(16777215),
7773
7773
  map: e.map || null,
7774
7774
  alphaMap: e.alphaMap || null,
7775
7775
  transparent: e.transparent,
@@ -7798,24 +7798,24 @@ class Uc {
7798
7798
  const i = (n, o = -1) => {
7799
7799
  if (!n) return;
7800
7800
  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;
7801
+ 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
7802
  };
7803
7803
  Array.isArray(s.material) ? s.material.forEach((n, o) => i(n, o)) : i(s.material);
7804
7804
  });
7805
7805
  }
7806
7806
  updateBoundsAndCenter(e) {
7807
7807
  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);
7808
+ 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
7809
  if (r && c && !e.hasAutoCentered) {
7810
- const h = l.getCenter(new m.Vector3());
7810
+ const h = l.getCenter(new f.Vector3());
7811
7811
  s.position.set(-h.x, -h.y, -h.z), s.updateMatrixWorld(!0), e.hasAutoCentered = !0;
7812
7812
  }
7813
7813
  o.updateMatrixWorld(!0);
7814
- const A = new m.Box3().setFromObject(o);
7814
+ const A = new f.Box3().setFromObject(o);
7815
7815
  if (this.isValidBox3(A))
7816
7816
  return o.userData.boundingBox = A, !0;
7817
7817
  if (c) {
7818
- const h = l.clone(), d = new m.Matrix4().multiplyMatrices(n.matrix, i.matrix).multiply(s.matrix);
7818
+ const h = l.clone(), d = new f.Matrix4().multiplyMatrices(n.matrix, i.matrix).multiply(s.matrix);
7819
7819
  if (h.applyMatrix4(d), this.isValidBox3(h))
7820
7820
  return o.userData.boundingBox = h, !0;
7821
7821
  }
@@ -7889,10 +7889,10 @@ class Uc {
7889
7889
  stillTilesProcessed: d,
7890
7890
  lastSampleTimeMs: 0,
7891
7891
  lastMovementTimeMs: 0,
7892
- lastPosition: new m.Vector3(),
7893
- lastQuaternion: new m.Quaternion(),
7894
- samplePosition: new m.Vector3(),
7895
- sampleQuaternion: new m.Quaternion(),
7892
+ lastPosition: new f.Vector3(),
7893
+ lastQuaternion: new f.Quaternion(),
7894
+ samplePosition: new f.Vector3(),
7895
+ sampleQuaternion: new f.Quaternion(),
7896
7896
  initialized: !1
7897
7897
  };
7898
7898
  }
@@ -7906,22 +7906,22 @@ class Uc {
7906
7906
  }
7907
7907
  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
7908
  (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) {
7909
+ const E = r - s.lastMovementTimeMs >= s.settleDelayMs;
7910
+ let y = s.stillErrorTarget, m = s.stillTilesProcessed;
7911
+ if (E || (b ? (y = s.fastMovingErrorTarget, m = s.fastMovingTilesProcessed) : (y = s.movingErrorTarget, m = s.movingTilesProcessed)), e.maxTriangles && this.renderer?.info?.render) {
7912
7912
  const w = this.renderer.info.render.triangles;
7913
7913
  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)));
7914
+ const B = e.maxTriangles * 1.08, x = e.maxTriangles * 0.75;
7915
+ 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
7916
  }
7917
7917
  }
7918
- y = this.clamp(y, n, o), f = this.clamp(
7919
- Math.round(f),
7918
+ y = this.clamp(y, n, o), m = this.clamp(
7919
+ Math.round(m),
7920
7920
  s.minTilesProcessed,
7921
7921
  s.maxTilesProcessed
7922
7922
  );
7923
7923
  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);
7924
+ 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
7925
  }
7926
7926
  applyOptions(e, t) {
7927
7927
  if (!t)
@@ -7940,7 +7940,7 @@ class Uc {
7940
7940
  return new Promise((s, i) => {
7941
7941
  const n = new Gc(e);
7942
7942
  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();
7943
+ const o = new f.Group(), r = new f.Group(), l = new f.Group();
7944
7944
  o.add(r), r.add(l);
7945
7945
  const c = n.group;
7946
7946
  l.add(c), this.setUpAxis(l, t.up || "+Y");
@@ -8250,7 +8250,7 @@ class Nc {
8250
8250
  this.vrButton && this.vrButton.parentNode && this.vrButton.parentNode.removeChild(this.vrButton), this.isQuest2 = !1, this.isQuest3 = !1, this.isVRSupported = !1, this.isVRPresenting = !1;
8251
8251
  }
8252
8252
  }
8253
- const G = {
8253
+ const N = {
8254
8254
  ComponentState: Object.freeze({
8255
8255
  DEFAULT: "default",
8256
8256
  TOUCHED: "touched",
@@ -8329,7 +8329,7 @@ const Hc = {
8329
8329
  xAxis: 0,
8330
8330
  yAxis: 0,
8331
8331
  button: 0,
8332
- state: G.ComponentState.DEFAULT
8332
+ state: N.ComponentState.DEFAULT
8333
8333
  };
8334
8334
  function qc(a = 0, e = 0) {
8335
8335
  let t = a, s = e;
@@ -8344,7 +8344,7 @@ function qc(a = 0, e = 0) {
8344
8344
  }
8345
8345
  class zc {
8346
8346
  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);
8347
+ 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
8348
  }
8349
8349
  /**
8350
8350
  * Computes the visual response's interpolation weight based on component state
@@ -8362,17 +8362,17 @@ class zc {
8362
8362
  }) {
8363
8363
  const { normalizedXAxis: n, normalizedYAxis: o } = qc(e, t);
8364
8364
  switch (this.componentProperty) {
8365
- case G.ComponentProperty.X_AXIS:
8365
+ case N.ComponentProperty.X_AXIS:
8366
8366
  this.value = this.states.includes(i) ? n : 0.5;
8367
8367
  break;
8368
- case G.ComponentProperty.Y_AXIS:
8368
+ case N.ComponentProperty.Y_AXIS:
8369
8369
  this.value = this.states.includes(i) ? o : 0.5;
8370
8370
  break;
8371
- case G.ComponentProperty.BUTTON:
8371
+ case N.ComponentProperty.BUTTON:
8372
8372
  this.value = this.states.includes(i) ? s : 0;
8373
8373
  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;
8374
+ case N.ComponentProperty.STATE:
8375
+ this.valueNodeProperty === N.VisualResponseProperty.VISIBILITY ? this.value = this.states.includes(i) : this.value = this.states.includes(i) ? 1 : 0;
8376
8376
  break;
8377
8377
  default:
8378
8378
  throw new Error(`Unexpected visualResponse componentProperty ${this.componentProperty}`);
@@ -8391,7 +8391,7 @@ class jc {
8391
8391
  const i = new zc(t.visualResponses[s]);
8392
8392
  this.visualResponses[s] = i;
8393
8393
  }), this.gamepadIndices = Object.assign({}, t.gamepadIndices), this.values = {
8394
- state: G.ComponentState.DEFAULT,
8394
+ state: N.ComponentState.DEFAULT,
8395
8395
  button: this.gamepadIndices.button !== void 0 ? 0 : void 0,
8396
8396
  xAxis: this.gamepadIndices.xAxis !== void 0 ? 0 : void 0,
8397
8397
  yAxis: this.gamepadIndices.yAxis !== void 0 ? 0 : void 0
@@ -8405,11 +8405,11 @@ class jc {
8405
8405
  * @param {Object} gamepad - The gamepad object from which the component data should be polled
8406
8406
  */
8407
8407
  updateFromGamepad(e) {
8408
- if (this.values.state = G.ComponentState.DEFAULT, this.gamepadIndices.button !== void 0 && e.buttons.length > this.gamepadIndices.button) {
8408
+ if (this.values.state = N.ComponentState.DEFAULT, this.gamepadIndices.button !== void 0 && e.buttons.length > this.gamepadIndices.button) {
8409
8409
  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);
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 = N.ComponentState.PRESSED : (t.touched || this.values.button > N.ButtonTouchThreshold) && (this.values.state = N.ComponentState.TOUCHED);
8411
8411
  }
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) => {
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 === 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
8413
  t.updateFromComponent(this.values);
8414
8414
  });
8415
8415
  }
@@ -8484,7 +8484,7 @@ class Wc extends ns {
8484
8484
  super.updateMatrixWorld(e), this.motionController && (this.motionController.updateFromGamepad(), Object.values(this.motionController.components).forEach((t) => {
8485
8485
  Object.values(t.visualResponses).forEach((s) => {
8486
8486
  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(
8487
+ i && (l === N.VisualResponseProperty.VISIBILITY ? i.visible = r : l === N.VisualResponseProperty.TRANSFORM && (i.quaternion.slerpQuaternions(
8488
8488
  n.quaternion,
8489
8489
  o.quaternion,
8490
8490
  r
@@ -8500,7 +8500,7 @@ class Wc extends ns {
8500
8500
  function Xc(a, e) {
8501
8501
  Object.values(a.components).forEach((t) => {
8502
8502
  const { type: s, touchPointNodeName: i, visualResponses: n } = t;
8503
- if (s === G.ComponentType.TOUCHPAD)
8503
+ if (s === N.ComponentType.TOUCHPAD)
8504
8504
  if (t.touchPointNode = e.getObjectByName(i), t.touchPointNode) {
8505
8505
  const o = new Xn(1e-3), r = new ke({ color: 255 }), l = new as(o, r);
8506
8506
  t.touchPointNode.add(l);
@@ -8508,7 +8508,7 @@ function Xc(a, e) {
8508
8508
  console.warn(`Could not find touch dot, ${t.touchPointNodeName}, in touchpad component ${t.id}`);
8509
8509
  Object.values(n).forEach((o) => {
8510
8510
  const { valueNodeName: r, minNodeName: l, maxNodeName: c, valueNodeProperty: A } = o;
8511
- if (A === G.VisualResponseProperty.TRANSFORM) {
8511
+ if (A === N.VisualResponseProperty.TRANSFORM) {
8512
8512
  if (o.minNode = e.getObjectByName(l), o.maxNode = e.getObjectByName(c), !o.minNode) {
8513
8513
  console.warn(`Could not find ${l} in the model`);
8514
8514
  return;
@@ -8591,8 +8591,8 @@ class Zc {
8591
8591
  class $c {
8592
8592
  constructor(e, t) {
8593
8593
  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() }
8594
+ left: { pinch: !1, fist: !1, direction: new f.Vector3() },
8595
+ right: { pinch: !1, fist: !1, direction: new f.Vector3() }
8596
8596
  }, this._fallbackHandedness = /* @__PURE__ */ new Map();
8597
8597
  }
8598
8598
  init() {
@@ -8621,26 +8621,26 @@ class $c {
8621
8621
  if (!i || !n || !i.transform || !n.transform)
8622
8622
  this.handStates[s].pinch = !1;
8623
8623
  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);
8624
+ 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
8625
  this.handStates[s].pinch = A < 0.025;
8626
8626
  }
8627
8627
  let o = !0;
8628
8628
  const r = t.hand.get("wrist");
8629
8629
  if (r && r.transform) {
8630
- const l = new m.Vector3().setFromMatrixPosition(new m.Matrix4().fromArray(r.transform.matrix));
8630
+ const l = new f.Vector3().setFromMatrixPosition(new f.Matrix4().fromArray(r.transform.matrix));
8631
8631
  for (const c of ["index-finger-tip", "middle-finger-tip", "ring-finger-tip", "pinky-finger-tip"]) {
8632
8632
  const A = t.hand.get(c);
8633
8633
  if (!A || !A.transform) {
8634
8634
  o = !1;
8635
8635
  continue;
8636
8636
  }
8637
- new m.Vector3().setFromMatrixPosition(new m.Matrix4().fromArray(A.transform.matrix)).distanceTo(l) > 0.045 && (o = !1);
8637
+ new f.Vector3().setFromMatrixPosition(new f.Matrix4().fromArray(A.transform.matrix)).distanceTo(l) > 0.045 && (o = !1);
8638
8638
  }
8639
8639
  } else
8640
8640
  o = !1;
8641
8641
  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();
8642
+ 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));
8643
+ this.handStates[s].direction = new f.Vector3().subVectors(c, l).normalize();
8644
8644
  }
8645
8645
  }
8646
8646
  }
@@ -8776,7 +8776,7 @@ class eA {
8776
8776
  neutralColor: 14870768,
8777
8777
  accentColor: 9741240,
8778
8778
  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;
8779
+ }, 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
8780
  }
8781
8781
  init() {
8782
8782
  this.setupTeleportation();
@@ -8786,39 +8786,51 @@ class eA {
8786
8786
  }
8787
8787
  createTeleportArc() {
8788
8788
  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({
8789
+ new f.Vector3(0, 0, 0),
8790
+ new f.Vector3(0, 1, -5)
8791
+ ], t = new f.CatmullRomCurve3(e), s = new f.TubeGeometry(t, 20, 0.03, 8, !1), i = new f.MeshBasicMaterial({
8792
8792
  color: this.style.accentColor,
8793
8793
  transparent: !0,
8794
8794
  opacity: 0.62,
8795
- side: m.DoubleSide
8795
+ side: f.DoubleSide
8796
8796
  });
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({
8797
+ if (this.teleportCurve = new f.Mesh(s, i), this.teleportCurve.visible = !1, this.scene.add(this.teleportCurve), !this.teleportMarker) {
8798
+ const n = new f.RingGeometry(0.34, 0.5, 28), o = new f.MeshBasicMaterial({
8799
8799
  color: this.style.neutralColor,
8800
8800
  transparent: !0,
8801
8801
  opacity: 0.78,
8802
- side: m.DoubleSide
8802
+ side: f.DoubleSide
8803
8803
  });
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({
8804
+ this.teleportMarker = new f.Mesh(n, o), this.teleportMarker.rotation.x = -Math.PI / 2, this.teleportMarker.visible = !1, this.scene.add(this.teleportMarker);
8805
+ }
8806
+ if (!this.teleportArch) {
8807
+ const r = 0.07999999999999999, l = 0.34 + r, c = [];
8808
+ for (let u = 0; u <= 24; u++) {
8809
+ const g = u / 24 * Math.PI;
8810
+ c.push(new f.Vector3(
8811
+ Math.cos(g) * l,
8812
+ Math.sin(g) * l,
8813
+ 0
8814
+ ));
8815
+ }
8816
+ const A = new f.CatmullRomCurve3(c), h = new f.TubeGeometry(A, 24, r, 8, !1), d = new f.MeshBasicMaterial({
8806
8817
  color: this.style.accentColor,
8807
8818
  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);
8819
+ opacity: 0.24,
8820
+ side: f.DoubleSide,
8821
+ depthWrite: !1
8822
+ });
8823
+ this.teleportArch = new f.Mesh(h, d), this.teleportArch.visible = !1, this.scene.add(this.teleportArch);
8812
8824
  }
8813
8825
  if (!this.teleportFloor) {
8814
- const n = new m.PlaneGeometry(14, 14), o = new m.MeshBasicMaterial({
8826
+ const n = new f.PlaneGeometry(14, 14), o = new f.MeshBasicMaterial({
8815
8827
  color: this.style.floorColor,
8816
8828
  transparent: !0,
8817
8829
  opacity: 0.06,
8818
- side: m.DoubleSide,
8830
+ side: f.DoubleSide,
8819
8831
  visible: !1
8820
8832
  });
8821
- this.teleportFloor = new m.Mesh(n, o), this.teleportFloor.rotation.x = -Math.PI / 2, this.teleportFloor.visible = !1, this.scene.add(this.teleportFloor);
8833
+ this.teleportFloor = new f.Mesh(n, o), this.teleportFloor.rotation.x = -Math.PI / 2, this.teleportFloor.visible = !1, this.scene.add(this.teleportFloor);
8822
8834
  }
8823
8835
  }
8824
8836
  executeTeleport() {
@@ -8837,6 +8849,7 @@ class eA {
8837
8849
  o();
8838
8850
  }
8839
8851
  processSnapTurn(e, t = 30) {
8852
+ if (this.teleportPressed) return;
8840
8853
  this.lastSnapTurnTime || (this.lastSnapTurnTime = 0);
8841
8854
  const s = Date.now();
8842
8855
  if (!(s - this.lastSnapTurnTime < 500) && Math.abs(e) > 0.7) {
@@ -8849,91 +8862,124 @@ class eA {
8849
8862
  for (; e < -Math.PI; ) e += 2 * Math.PI;
8850
8863
  return e;
8851
8864
  }
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
- }
8865
+ processTeleportation(e, t) {
8866
+ const s = Math.abs(t);
8867
+ if (s > this.teleportThreshold && !this.teleportPressed) {
8868
+ this.teleportPressed = !0, this.teleportMaxMagnitude = s, this.teleportController = e;
8869
+ const i = this.camera.parent.position.y;
8870
+ this.teleportFloorHeight = i, this.teleportFloorMin = i - 10, this.teleportFloorMax = i + 10, this.showTeleportArc(), this.onTeleportStart && this.onTeleportStart();
8871
+ } 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
8872
  }
8864
8873
  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();
8874
+ this.teleportCurve || this.createTeleportArc(), this.teleportCurve.visible = !0, this.teleportMarker && (this.teleportMarker.visible = !1), this.teleportArch && (this.teleportArch.visible = !1), this.updateTeleportFloor();
8866
8875
  }
8867
8876
  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);
8877
+ 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
8878
  }
8870
8879
  updateTeleportArc() {
8871
8880
  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
8881
+ const e = new f.Quaternion();
8882
+ this.teleportController.getWorldQuaternion(e);
8883
+ const t = new f.Vector3(0, 0, -1);
8884
+ t.applyQuaternion(e);
8885
+ const s = new f.Vector3();
8886
+ this.teleportController.getWorldPosition(s), s.addScaledVector(t, 0.07);
8887
+ const i = Math.sqrt(t.x * t.x + t.z * t.z);
8888
+ if (i < 0.12 && t.y > 0) {
8889
+ const S = new f.Vector3();
8890
+ if (this.camera.getWorldDirection(S), S.y = 0, S.lengthSq() > 0) {
8891
+ S.normalize();
8892
+ const Q = 0.12 - i;
8893
+ t.x += S.x * Q, t.z += S.z * Q, t.normalize();
8894
+ }
8895
+ }
8896
+ 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;
8897
+ let g = Math.sqrt(l * Math.abs(h) / 2);
8898
+ t.y < 0 && (g *= Math.max(0.25, 1 - Math.abs(t.y) * 0.75));
8899
+ const p = t.x * g, b = t.z * g;
8900
+ let C = (t.y + 0.15) * g;
8901
+ if (u > 0.5) {
8902
+ const S = Math.sqrt(2 * Math.abs(h) * u) * 1.2;
8903
+ C = Math.max(C, S);
8904
+ }
8905
+ const E = C / Math.abs(h), y = 0.4 + (1 - Math.max(0, -t.y)) * 1.1, m = Math.max(E * 2.2, y);
8906
+ let I = null, w = !1, B = s.y, x = 0;
8907
+ const v = Math.max(8, Math.abs(u) * 1.5 + 2);
8908
+ for (let S = 0; S <= A; S++) {
8909
+ const Q = S / A * m, D = new f.Vector3(
8910
+ s.x + p * Q,
8911
+ s.y + C * Q + 0.5 * h * Q * Q,
8912
+ s.z + b * Q
8892
8913
  );
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;
8914
+ 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);
8915
+ const G = w ? Q - x : 0, T = w && G > 0.1;
8916
+ if (!I && T && D.y <= d) {
8917
+ if (S > 0) {
8918
+ const U = c[S - 1], F = (d - U.y) / (D.y - U.y);
8919
+ I = new f.Vector3().lerpVectors(U, D, F), I.y = d;
8899
8920
  } else
8900
- I = L.clone(), I.y = f;
8901
- A[x] = I, A.length = x + 1;
8921
+ I = D.clone(), I.y = d;
8922
+ c[S] = I, c.length = S + 1;
8902
8923
  break;
8903
8924
  }
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);
8925
+ B = D.y;
8926
+ const K = Math.sqrt(
8927
+ Math.pow(D.x - s.x, 2) + Math.pow(D.z - s.z, 2)
8928
+ );
8929
+ if (T && K > n) {
8930
+ if (S > 0) {
8931
+ const U = c[S - 1], F = Math.sqrt(
8932
+ Math.pow(U.x - s.x, 2) + Math.pow(U.z - s.z, 2)
8933
+ ), O = K > F ? (n - F) / (K - F) : 0.5;
8934
+ I = new f.Vector3(
8935
+ U.x + (D.x - U.x) * O,
8936
+ d,
8937
+ U.z + (D.z - U.z) * O
8938
+ ), c[S] = I, c.length = S + 1;
8939
+ }
8908
8940
  break;
8909
8941
  }
8910
8942
  }
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));
8943
+ if (!I && c.length > 0) {
8944
+ let S = c[0], Q = 0;
8945
+ for (let D = 1; D < c.length; D++)
8946
+ c[D].y < S.y && (S = c[D], Q = D);
8947
+ Q > c.length / 3 && (I = new f.Vector3(S.x, d, S.z), c.length = Q + 1, c[Q] = I);
8948
+ }
8949
+ if (c.length > 1) {
8950
+ const S = new f.CatmullRomCurve3(c, !1, "centripetal"), Q = new f.TubeGeometry(S, 20, 0.012, 6, !1);
8951
+ this.teleportCurve.geometry && this.teleportCurve.geometry.dispose(), this.teleportCurve.geometry = Q;
8952
+ }
8953
+ 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)
8954
+ if (I) {
8955
+ this.teleportArch.position.copy(I);
8956
+ const S = new f.Vector3();
8957
+ this.camera.getWorldPosition(S);
8958
+ const Q = new f.Vector3(
8959
+ S.x,
8960
+ I.y,
8961
+ S.z
8962
+ );
8963
+ this.teleportArch.lookAt(Q);
8964
+ const D = S.distanceTo(I), G = f.MathUtils.clamp((D - 2.5) / 7.5, 0, 1);
8965
+ this.teleportArch.material.opacity = 0.24 * G, this.teleportArch.visible = G > 0.01;
8966
+ } else
8967
+ this.teleportArch.visible = !1;
8922
8968
  }
8923
8969
  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());
8970
+ this.teleportFloorHeight !== null && (this.teleportFloor && (this.teleportFloor.position.y = this.teleportFloorHeight), this.updateTeleportArc());
8925
8971
  }
8926
8972
  updateTeleportArcHeight() {
8927
8973
  this.updateTeleportFloor();
8928
8974
  }
8929
8975
  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(
8976
+ if (!(!this.teleportController || this.teleportMaxMagnitude < this.teleportThreshold) && this.currentTeleportTarget) {
8977
+ const e = this.currentTeleportTarget.clone(), t = this.camera.parent.position;
8978
+ if (Math.sqrt(
8932
8979
  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;
8980
+ ) <= this.teleportMaxDistance) {
8981
+ const i = new f.Vector3(e.x, this.teleportFloorHeight, e.z);
8982
+ this.validTeleportPosition = i, this.executeTeleport(), this.teleportFloorHeight = null, this.currentTeleportTarget = null;
8937
8983
  }
8938
8984
  }
8939
8985
  }
@@ -8953,7 +8999,7 @@ class eA {
8953
8999
  this.teleportPressed = !1, this.teleportMaxMagnitude = 0, this.teleportController = null, this.validTeleportPosition = null, this.hideTeleportArc();
8954
9000
  }
8955
9001
  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();
9002
+ 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
9003
  }
8958
9004
  resetSnapTurnState() {
8959
9005
  this.lastSnapTurnTime = 0;
@@ -8961,7 +9007,7 @@ class eA {
8961
9007
  }
8962
9008
  class tA {
8963
9009
  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 = {
9010
+ 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
9011
  locomotionMode: "smooth",
8966
9012
  // 'smooth', 'teleport'
8967
9013
  turningMode: "smooth",
@@ -8998,7 +9044,7 @@ class tA {
8998
9044
  if (s && t.updateHandGestures && t.handsActive) {
8999
9045
  t.updateHandGestures();
9000
9046
  let u = null;
9001
- const g = new m.Vector3();
9047
+ const g = new f.Vector3();
9002
9048
  let p = !1;
9003
9049
  for (const b of ["left", "right"])
9004
9050
  if (t.handStates[b].pinch) {
@@ -9007,8 +9053,8 @@ class tA {
9007
9053
  }
9008
9054
  if (u) {
9009
9055
  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({
9056
+ const b = this.camera.parent || this.camera, C = this.MOVE_SPEED * (p ? 3 : 1) * e;
9057
+ b.position.addScaledVector(g, C), this.isMoving = !0, this.onMovementStart && !this._wasMoving && this.onMovementStart(), this.onMovementUpdate && this.onMovementUpdate({
9012
9058
  isMoving: !0,
9013
9059
  currentSpeed: this.MOVE_SPEED,
9014
9060
  isBoosted: p,
@@ -9024,49 +9070,51 @@ class tA {
9024
9070
  const g = i[u];
9025
9071
  if (!g || !g.gamepad || !g.gamepad.buttons || !g.gamepad.axes || g.gamepad.axes.length < 4)
9026
9072
  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;
9073
+ const p = g.gamepad, C = g.handedness === "left" ? t.controller1 : t.controller2;
9074
+ if (!C) continue;
9075
+ 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
9076
  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);
9077
+ const x = p.buttons[1], v = x && x.pressed ? 3 : 1, S = this.comfortSettings.reducedMotion ? this.comfortSettings.comfortSpeed : 1;
9078
+ if (x && x.pressed && (r = !0), m && (w || !I)) {
9079
+ this.teleportSystem.processTeleportation(C, y), this.comfortSettings.turningMode === "snap" && this.teleportSystem.processSnapTurn(E, this.comfortSettings.snapTurnAngle);
9034
9080
  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();
9081
+ } else if (B)
9082
+ Math.abs(y) > 0.1 && this.teleportSystem.adjustFloorHeight(-y * (4 * e));
9083
+ else {
9084
+ const Q = new f.Vector3();
9085
+ this.camera.getWorldDirection(Q), Q.y = 0, Q.normalize();
9086
+ const D = new f.Vector3().crossVectors(Q, this.camera.up).normalize();
9039
9087
  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;
9088
+ const G = this.MOVE_SPEED * v * S * this.currentSpeed * e;
9089
+ n.position.addScaledVector(Q, -y * G), o = !0;
9042
9090
  }
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;
9091
+ if (Math.abs(E) > 0.1) {
9092
+ const G = this.MOVE_SPEED * v * S * this.currentSpeed * e;
9093
+ n.position.addScaledVector(D, E * G), o = !0;
9046
9094
  }
9047
9095
  }
9048
9096
  }
9049
9097
  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 {
9098
+ const x = p.buttons[1], v = x && x.pressed ? 3 : 1, S = this.comfortSettings.reducedMotion ? this.comfortSettings.comfortSpeed : 1;
9099
+ if (x && x.pressed && Math.abs(y) > 0.1 && (r = !0), m && (w || !I)) {
9100
+ this.teleportSystem.processTeleportation(C, y), this.comfortSettings.turningMode === "snap" && this.teleportSystem.processSnapTurn(E, this.comfortSettings.snapTurnAngle);
9101
+ continue;
9102
+ } else if (B)
9103
+ Math.abs(y) > 0.1 && this.teleportSystem.adjustFloorHeight(-y * (4 * e));
9104
+ else {
9057
9105
  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);
9106
+ this.teleportSystem.processSnapTurn(E, this.comfortSettings.snapTurnAngle);
9107
+ else if (Math.abs(E) > this.inputDeadzone) {
9108
+ const Q = this.lastTurnInput * this.turnSmoothingFactor + E * (1 - this.turnSmoothingFactor);
9109
+ if (this.lastTurnInput = Q, Math.abs(Q) > this.inputDeadzone) {
9110
+ const D = this.comfortSettings.reducedMotion ? this.TURN_SPEED * 0.5 : this.TURN_SPEED, G = Q * D * Math.min(e, 1 / 30);
9111
+ n.rotation.y -= G, n.rotation.y = this.normalizeAngle(n.rotation.y);
9064
9112
  }
9065
9113
  } else
9066
9114
  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;
9115
+ if (Math.abs(y) > 0.1 && this.comfortSettings.locomotionMode !== "teleport") {
9116
+ const Q = this.FLY_SPEED * v * S * this.currentSpeed * e;
9117
+ n.position.y -= y * Q, o = !0;
9070
9118
  }
9071
9119
  }
9072
9120
  }
@@ -9745,7 +9793,7 @@ class oA {
9745
9793
  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
9794
  }
9747
9795
  }
9748
- const Mn = new P(), xn = new v();
9796
+ const Mn = new P(), xn = new M();
9749
9797
  class Qn {
9750
9798
  /**
9751
9799
  * Constructs a new XR hand primitive model.
@@ -9925,11 +9973,11 @@ class cA {
9925
9973
  }
9926
9974
  class AA {
9927
9975
  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 = {
9976
+ 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
9977
  hand1Start: 0,
9930
9978
  hand2Start: 0,
9931
9979
  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;
9980
+ }, 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
9981
  }
9934
9982
  init(e) {
9935
9983
  this.hand1 = this.setupHand(e, 0, "hand1Start"), this.hand2 = this.setupHand(e, 1, "hand2Start");
@@ -9948,7 +9996,7 @@ class AA {
9948
9996
  }
9949
9997
  styleHandModel(e, t, s) {
9950
9998
  e.traverse((i) => {
9951
- i.isMesh && (i.material = new m.MeshStandardMaterial({
9999
+ i.isMesh && (i.material = new f.MeshStandardMaterial({
9952
10000
  color: t,
9953
10001
  roughness: 0.8,
9954
10002
  metalness: 0.2,
@@ -9999,17 +10047,17 @@ class AA {
9999
10047
  } else {
10000
10048
  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
10049
  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;
10050
+ const y = d / e, m = Math.max(-this.MAX_SCALE_VELOCITY, Math.min(this.MAX_SCALE_VELOCITY, y));
10051
+ this.scaleVelocity = this.scaleVelocity * (1 - this.VELOCITY_SMOOTHING) + m * this.VELOCITY_SMOOTHING;
10004
10052
  }
10005
10053
  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;
10054
+ const p = this.tempVec2.x - this.tempVec1.x, b = this.tempVec2.z - this.tempVec1.z, C = Math.atan2(b, p);
10055
+ let E = C - this.rotateStartAngle;
10056
+ if (E > Math.PI && (E -= 2 * Math.PI), E < -Math.PI && (E += 2 * Math.PI), t.rotation.y -= E, e > 0) {
10057
+ const y = -E / e, m = Math.max(-this.MAX_ROT_VELOCITY, Math.min(this.MAX_ROT_VELOCITY, y));
10058
+ this.rotVelocity = this.rotVelocity * (1 - this.VELOCITY_SMOOTHING) + m * this.VELOCITY_SMOOTHING;
10011
10059
  }
10012
- this.rotateStartAngle = E;
10060
+ this.rotateStartAngle = C;
10013
10061
  }
10014
10062
  }
10015
10063
  onPinchEnd() {
@@ -10048,7 +10096,7 @@ class hA extends yt {
10048
10096
  worldCubeSize: 1e3,
10049
10097
  worldCubeOpacity: 0.1,
10050
10098
  ...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();
10099
+ }, 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
10100
  }
10053
10101
  init() {
10054
10102
  this.arCore.init(), this.handTracking && (this.handTracking.init(this.scene), this.handTracking.onGestureStart = (e) => {
@@ -10086,14 +10134,14 @@ class hA extends yt {
10086
10134
  this.handTracking && this.handTracking.update(t, this.modelGroup, this.camera);
10087
10135
  }
10088
10136
  createWorldCube() {
10089
- const e = this.config.worldCubeSize, t = new m.BoxGeometry(e, e, e), s = new m.MeshBasicMaterial({
10137
+ const e = this.config.worldCubeSize, t = new f.BoxGeometry(e, e, e), s = new f.MeshBasicMaterial({
10090
10138
  color: 0,
10091
10139
  transparent: !0,
10092
10140
  opacity: this.config.worldCubeOpacity,
10093
- side: m.BackSide,
10141
+ side: f.BackSide,
10094
10142
  depthWrite: !1
10095
10143
  });
10096
- this.worldCube = new m.Mesh(t, s), this.worldCube.name = "AR World Cube", this.worldCube.visible = !1, this.scene.add(this.worldCube);
10144
+ this.worldCube = new f.Mesh(t, s), this.worldCube.name = "AR World Cube", this.worldCube.visible = !1, this.scene.add(this.worldCube);
10097
10145
  }
10098
10146
  setWorldCubeOpacity(e) {
10099
10147
  this.worldCube && (this.worldCube.material.opacity = Math.max(0, Math.min(1, e)));
@@ -10416,33 +10464,33 @@ class dA extends yt {
10416
10464
  }
10417
10465
  init() {
10418
10466
  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");
10467
+ 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
10468
  } catch (e) {
10421
10469
  console.error("Failed to initialize BelowViewer:", e), this.emit("error", e);
10422
10470
  }
10423
10471
  }
10424
10472
  initRenderer() {
10425
- this.renderer = new m.WebGLRenderer({
10473
+ this.renderer = new f.WebGLRenderer({
10426
10474
  antialias: this.config.renderer.antialias,
10427
10475
  alpha: this.config.renderer.alpha,
10428
10476
  powerPreference: this.config.renderer.powerPreference,
10429
10477
  logarithmicDepthBuffer: this.config.renderer.logarithmicDepthBuffer,
10430
10478
  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;
10479
+ }), 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
10480
  const e = {
10433
- none: m.NoToneMapping,
10434
- linear: m.LinearToneMapping,
10435
- reinhard: m.ReinhardToneMapping,
10436
- cineon: m.CineonToneMapping,
10437
- "aces-filmic": m.ACESFilmicToneMapping
10481
+ none: f.NoToneMapping,
10482
+ linear: f.LinearToneMapping,
10483
+ reinhard: f.ReinhardToneMapping,
10484
+ cineon: f.CineonToneMapping,
10485
+ "aces-filmic": f.ACESFilmicToneMapping
10438
10486
  };
10439
10487
  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
10488
  }
10441
10489
  initStereo() {
10442
- this.stereoCamera || (this.stereoCamera = new m.StereoCamera()), this.stereoCamera.eyeSep = this.stereoEyeSeparation;
10490
+ this.stereoCamera || (this.stereoCamera = new f.StereoCamera()), this.stereoCamera.eyeSep = this.stereoEyeSeparation;
10443
10491
  }
10444
10492
  initVR() {
10445
- this.dolly = new m.Group(), this.dolly.add(this.cameraManager.camera), this.sceneManager.scene.add(this.dolly);
10493
+ this.dolly = new f.Group(), this.dolly.add(this.cameraManager.camera), this.sceneManager.scene.add(this.dolly);
10446
10494
  const e = this.config.audioPath || "./sound/", t = this.config.enableVRAudio === !0;
10447
10495
  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
10496
  this.emit("vr-mode-toggle");
@@ -10592,16 +10640,16 @@ class dA extends yt {
10592
10640
  const t = this.getValidModelBoundingBox(e);
10593
10641
  if (!t)
10594
10642
  return;
10595
- const s = t.getSize(new m.Vector3()), i = t.getCenter(new m.Vector3());
10643
+ const s = t.getSize(new f.Vector3()), i = t.getCenter(new f.Vector3());
10596
10644
  this.cameraManager.frameObject(i, s);
10597
10645
  }
10598
10646
  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);
10647
+ 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
10648
  }
10601
10649
  getValidModelBoundingBox(e) {
10602
10650
  if (this.isValidBox3(e?.userData?.boundingBox))
10603
10651
  return e.userData.boundingBox;
10604
- const t = new m.Box3().setFromObject(e);
10652
+ const t = new f.Box3().setFromObject(e);
10605
10653
  return this.isValidBox3(t) ? (e.userData.boundingBox = t, t) : null;
10606
10654
  }
10607
10655
  /**
@@ -10614,10 +10662,10 @@ class dA extends yt {
10614
10662
  centerModelAndRecalculateBounds(e) {
10615
10663
  const t = this.getValidModelBoundingBox(e);
10616
10664
  if (!t)
10617
- return new m.Vector3();
10618
- const s = t.getCenter(new m.Vector3());
10665
+ return new f.Vector3();
10666
+ const s = t.getCenter(new f.Vector3());
10619
10667
  e.position.sub(s);
10620
- const i = new m.Box3().setFromObject(e);
10668
+ const i = new f.Box3().setFromObject(e);
10621
10669
  return this.isValidBox3(i) ? e.userData.boundingBox = i : e.userData.boundingBox = t.clone().translate(s.clone().multiplyScalar(-1)), s;
10622
10670
  }
10623
10671
  startRenderLoop() {
@@ -10657,7 +10705,7 @@ class dA extends yt {
10657
10705
  renderSbsStereo() {
10658
10706
  if (!this.stereoCamera || !this.renderer || !this.sceneManager || !this.cameraManager)
10659
10707
  return;
10660
- const e = this.renderer.getSize(new m.Vector2()), t = e.width, s = e.height, i = Math.floor(t / 2), n = t - i;
10708
+ const e = this.renderer.getSize(new f.Vector2()), t = e.width, s = e.height, i = Math.floor(t / 2), n = t - i;
10661
10709
  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
10710
  }
10663
10711
  /**
@@ -10933,7 +10981,7 @@ class dA extends yt {
10933
10981
  t && e.vr && this.vrManager ? this.vrManager.applyVRPositions(e) : !t && e.desktop && this.applyDesktopPositions(e.desktop);
10934
10982
  }
10935
10983
  }
10936
- const Rn = new it(), Ht = new v();
10984
+ const Rn = new it(), Ht = new M();
10937
10985
  class tr extends Jr {
10938
10986
  /**
10939
10987
  * Constructs a new line segments geometry.
@@ -11586,7 +11634,7 @@ class ss extends Wn {
11586
11634
  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
11635
  }
11588
11636
  }
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();
11637
+ 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
11638
  let de, Pe;
11591
11639
  function kn(a, e, t) {
11592
11640
  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 +11642,9 @@ function kn(a, e, t) {
11594
11642
  function uA(a, e) {
11595
11643
  const t = a.matrixWorld, s = a.geometry, i = s.attributes.instanceStart, n = s.attributes.instanceEnd, o = Math.min(s.instanceCount, i.count);
11596
11644
  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({
11645
+ j.start.fromBufferAttribute(i, r), j.end.fromBufferAttribute(n, r), j.applyMatrix4(t);
11646
+ const c = new M(), A = new M();
11647
+ de.distanceSqToSegment(j.start, j.end, A, c), A.distanceTo(c) < Pe * 0.5 && e.push({
11600
11648
  point: A,
11601
11649
  pointOnLine: c,
11602
11650
  distance: de.origin.distanceTo(A),
@@ -11612,26 +11660,26 @@ function gA(a, e, t) {
11612
11660
  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
11661
  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
11662
  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)
11663
+ 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
11664
  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,
11665
+ if (q.z > h) {
11666
+ const y = q.z - z.z, m = (q.z - h) / y;
11667
+ q.lerp(z, m);
11668
+ } else if (z.z > h) {
11669
+ const y = z.z - q.z, m = (z.z - h) / y;
11670
+ z.lerp(q, m);
11671
+ }
11672
+ 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;
11673
+ const p = j.closestPointToPointParameter(Os, !0);
11674
+ j.at(p, Fn);
11675
+ const b = st.lerp(q.z, z.z, p), C = b >= -1 && b <= 1, E = Os.distanceTo(Fn) < Pe * 0.5;
11676
+ if (C && E) {
11677
+ j.start.fromBufferAttribute(l, d), j.end.fromBufferAttribute(c, d), j.start.applyMatrix4(o), j.end.applyMatrix4(o);
11678
+ const y = new M(), m = new M();
11679
+ de.distanceSqToSegment(j.start, j.end, m, y), t.push({
11680
+ point: m,
11633
11681
  pointOnLine: y,
11634
- distance: de.origin.distanceTo(f),
11682
+ distance: de.origin.distanceTo(m),
11635
11683
  object: a,
11636
11684
  face: null,
11637
11685
  faceIndex: d,
@@ -11819,7 +11867,7 @@ class fA {
11819
11867
  this.ghostSpheres = {
11820
11868
  left: null,
11821
11869
  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();
11870
+ }, 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
11871
  const h = () => {
11824
11872
  let d = null, u = null;
11825
11873
  const g = null, p = null;
@@ -11832,7 +11880,7 @@ class fA {
11832
11880
  }
11833
11881
  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
11882
  };
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({
11883
+ 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
11884
  color: 16777215,
11837
11885
  linewidth: 3,
11838
11886
  transparent: !0,
@@ -11937,14 +11985,14 @@ class fA {
11937
11985
  syncToVR() {
11938
11986
  if (this.desktopMeasurementPoints.length === 2) {
11939
11987
  if (this.clearVRMeasurement(), this.desktopMeasurementPoints.forEach((e) => {
11940
- const t = new m.Mesh(this.sphereGeometry, this.placedMaterial);
11988
+ const t = new f.Mesh(this.sphereGeometry, this.placedMaterial);
11941
11989
  t.position.copy(e.position), this.scene.add(t), this.measurementSpheres.push(t);
11942
11990
  }), this.measurementSpheres.length === 2) {
11943
- const e = new m.BufferGeometry().setFromPoints([
11991
+ const e = new f.BufferGeometry().setFromPoints([
11944
11992
  this.measurementSpheres[0].position,
11945
11993
  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);
11994
+ ]), t = this.vrLineMaterial || new f.LineBasicMaterial({ color: 16777215, transparent: !0, opacity: 0.8, depthTest: !1 });
11995
+ 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
11996
  }
11949
11997
  this.measurementSystemEnabled = this.measurementAvailable, this.updateMeasurementPanel();
11950
11998
  }
@@ -11956,10 +12004,10 @@ class fA {
11956
12004
  const t = this.measurementSpheres[e].position.clone();
11957
12005
  let s = t;
11958
12006
  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);
12007
+ const n = t.clone().sub(this.camera.position).normalize(), o = new f.Raycaster(this.camera.position, n), r = this.getValidIntersections(o);
11960
12008
  r.length > 0 && (s = r[0].point);
11961
12009
  }
11962
- const i = new m.Mesh(this.sphereGeometry, this.placedMaterial);
12010
+ const i = new f.Mesh(this.sphereGeometry, this.placedMaterial);
11963
12011
  i.position.copy(s), this.scene.add(i), this.desktopMeasurementPoints.push(i);
11964
12012
  }
11965
12013
  if (this.desktopMeasurementPoints.length === 2) {
@@ -11974,7 +12022,7 @@ class fA {
11974
12022
  ]), this.desktopMeasurementLine = new _n(e, this.desktopLineMaterial), this.desktopMeasurementLine.computeLineDistances(), this.scene.add(this.desktopMeasurementLine);
11975
12023
  const t = this.desktopMeasurementPoints[0].position.distanceTo(this.desktopMeasurementPoints[1].position);
11976
12024
  if (this.createMeasurementDisplay(t), this.measurementSprite) {
11977
- const s = new m.Vector3();
12025
+ const s = new f.Vector3();
11978
12026
  s.addVectors(this.desktopMeasurementPoints[0].position, this.desktopMeasurementPoints[1].position), s.multiplyScalar(0.5);
11979
12027
  const i = Math.max(0.05, Math.min(0.2, t * 0.03));
11980
12028
  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 +12045,14 @@ class fA {
11997
12045
  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
12046
  const A = Math.round(l * c);
11999
12047
  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({
12048
+ 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;
12049
+ 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) {
12050
+ const B = new f.SpriteMaterial({
12003
12051
  map: this.measurementTexture,
12004
12052
  depthTest: !1,
12005
12053
  depthWrite: !1
12006
12054
  });
12007
- this.measurementSprite = new m.Sprite(B);
12055
+ this.measurementSprite = new f.Sprite(B);
12008
12056
  }
12009
12057
  const I = 0.3 * c, w = s / i;
12010
12058
  return this.measurementSprite.scale.set(I * w, I, 1), this.measurementSprite;
@@ -12036,7 +12084,7 @@ class fA {
12036
12084
  */
12037
12085
  attachVR({ controller1: e, controller2: t, controllerGrip1: s, controllerGrip2: i }) {
12038
12086
  this.controller1 = e, this.controller2 = t, this.controllerGrip1 = s, this.controllerGrip2 = i;
12039
- const n = new m.MeshBasicMaterial({
12087
+ const n = new f.MeshBasicMaterial({
12040
12088
  color: 8947848,
12041
12089
  // ghostly grey
12042
12090
  transparent: !0,
@@ -12044,7 +12092,7 @@ class fA {
12044
12092
  depthTest: !1,
12045
12093
  depthWrite: !1
12046
12094
  });
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 = {
12095
+ 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
12096
  left: !1,
12049
12097
  right: !1
12050
12098
  }, 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 +12103,13 @@ class fA {
12055
12103
  if (!this.measurementAvailable) return;
12056
12104
  const t = e.target, s = performance.now();
12057
12105
  if (!(this.lastTriggerTime && s - this.lastTriggerTime < 200) && (this.lastTriggerTime = s, this.measurementSystemEnabled)) {
12058
- const i = new m.Vector3();
12106
+ const i = new f.Vector3();
12059
12107
  let n = null;
12060
12108
  if (t === this.controller1 && this.ghostSpheres.left ? n = this.ghostSpheres.left : t === this.controller2 && this.ghostSpheres.right && (n = this.ghostSpheres.right), n)
12061
12109
  n.getWorldPosition(i);
12062
12110
  else {
12063
12111
  t.getWorldPosition(i);
12064
- const o = new m.Vector3(0, 0, -0.05);
12112
+ const o = new f.Vector3(0, 0, -0.05);
12065
12113
  o.applyQuaternion(t.quaternion), i.add(o);
12066
12114
  }
12067
12115
  this._placeVRMeasurementPoint(i);
@@ -12073,11 +12121,11 @@ class fA {
12073
12121
  _onVRYButtonUp() {
12074
12122
  }
12075
12123
  _getVRControllerIntersection(e) {
12076
- const t = new m.Matrix4();
12124
+ const t = new f.Matrix4();
12077
12125
  t.identity().extractRotation(e.matrixWorld);
12078
- const s = new m.Vector3(), i = new m.Vector3(0, 0, -1).applyMatrix4(t);
12126
+ const s = new f.Vector3(), i = new f.Vector3(0, 0, -1).applyMatrix4(t);
12079
12127
  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);
12128
+ const n = new f.Raycaster(s, i.normalize()), o = this.scene && this.scene.children ? this.scene.children : [], r = this.getValidIntersections(n, o);
12081
12129
  return r.length > 0 ? r[0] : null;
12082
12130
  }
12083
12131
  _placeVRMeasurementPoint(e) {
@@ -12101,7 +12149,7 @@ class fA {
12101
12149
  const i = this.unifiedMeasurementPoints.shift();
12102
12150
  i.sphere && this.scene.remove(i.sphere);
12103
12151
  }
12104
- const s = new m.Mesh(this.sphereGeometry, this.placedMaterial);
12152
+ const s = new f.Mesh(this.sphereGeometry, this.placedMaterial);
12105
12153
  s.position.copy(e), s.scale.setScalar(0.5), s.userData.isMeasurementSphere = !0, this.scene.add(s), this.unifiedMeasurementPoints.push({
12106
12154
  position: e.clone(),
12107
12155
  sphere: s,
@@ -12128,7 +12176,7 @@ class fA {
12128
12176
  if (this.unifiedMeasurementPoints.forEach((o) => {
12129
12177
  o.sphere && o.sphere.scale.setScalar(n);
12130
12178
  }), this.measurementSprite) {
12131
- const o = new m.Vector3();
12179
+ const o = new f.Vector3();
12132
12180
  o.addVectors(e, t), o.multiplyScalar(0.5);
12133
12181
  const r = Math.max(0.05, Math.min(0.2, i * 0.03));
12134
12182
  o.y += r, this.measurementSprite.position.copy(o), this.scene.children.includes(this.measurementSprite) || this.scene.add(this.measurementSprite);
@@ -12143,7 +12191,7 @@ class fA {
12143
12191
  * Useful when VR coordinate systems get corrupted (e.g., returning from Quest browser)
12144
12192
  */
12145
12193
  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)));
12194
+ 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
12195
  }
12148
12196
  /**
12149
12197
  * Update method called each frame by the render loop
@@ -12299,7 +12347,7 @@ class fA {
12299
12347
  if (this.unifiedMeasurementPoints && this.unifiedMeasurementPoints.length === 2) {
12300
12348
  const e = this.unifiedMeasurementPoints[0].position, t = this.unifiedMeasurementPoints[1].position, s = e.distanceTo(t);
12301
12349
  if (this.createMeasurementDisplay(s), this.measurementSprite) {
12302
- const i = new m.Vector3();
12350
+ const i = new f.Vector3();
12303
12351
  i.addVectors(e, t), i.multiplyScalar(0.5);
12304
12352
  const n = Math.max(0.05, Math.min(0.2, s * 0.03));
12305
12353
  i.y += n, this.measurementSprite.position.copy(i), this.scene.children.includes(this.measurementSprite) || this.scene.add(this.measurementSprite);
@@ -12609,12 +12657,12 @@ class Ei {
12609
12657
  class mA {
12610
12658
  constructor(e) {
12611
12659
  this.scene = e, this.particleBounds = {
12612
- min: new m.Vector3(-50, -25, -50),
12613
- max: new m.Vector3(50, 25, 50)
12660
+ min: new f.Vector3(-50, -25, -50),
12661
+ max: new f.Vector3(50, 25, 50)
12614
12662
  }, this.particleCount = 1750, this.densityMultiplier = 1, this.createParticleSystem();
12615
12663
  }
12616
12664
  calculateParticleCount(e) {
12617
- const t = new m.Vector3();
12665
+ const t = new f.Vector3();
12618
12666
  e.getSize(t);
12619
12667
  const i = t.clone().multiplyScalar(2.5), n = i.x * i.y * i.z, o = Math.round(n * 0.01 * this.densityMultiplier);
12620
12668
  return Math.max(100, Math.min(16e3, o));
@@ -12627,16 +12675,16 @@ class mA {
12627
12675
  this.disable();
12628
12676
  return;
12629
12677
  }
12630
- const t = new m.Box3(this.particleBounds.min, this.particleBounds.max), s = this.calculateParticleCount(t);
12678
+ const t = new f.Box3(this.particleBounds.min, this.particleBounds.max), s = this.calculateParticleCount(t);
12631
12679
  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
12680
  }
12633
12681
  createParticleSystem() {
12634
12682
  const e = new Float32Array(this.particleCount * 3), t = new Float32Array(this.particleCount * 3), s = new Float32Array(this.particleCount);
12635
12683
  this.initializeParticleData(e, t, s);
12636
- const i = new m.BufferGeometry(), n = new Float32Array(this.particleCount);
12684
+ const i = new f.BufferGeometry(), n = new Float32Array(this.particleCount);
12637
12685
  for (let o = 0; o < this.particleCount; o++)
12638
12686
  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);
12687
+ 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
12688
  }
12641
12689
  /**
12642
12690
  * Initialize particle data arrays
@@ -12659,17 +12707,17 @@ class mA {
12659
12707
  e.width = e.height = 32;
12660
12708
  const t = e.getContext("2d"), s = t.createRadialGradient(16, 16, 0, 16, 16, 16);
12661
12709
  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({
12710
+ const i = new f.CanvasTexture(e);
12711
+ return i.needsUpdate = !0, new f.ShaderMaterial({
12664
12712
  uniforms: {
12665
12713
  time: { value: 0 },
12666
12714
  pointTexture: { value: i },
12667
- color: { value: new m.Color(16777215) },
12715
+ color: { value: new f.Color(16777215) },
12668
12716
  opacity: { value: 1 },
12669
12717
  size: { value: 2 },
12670
12718
  boundsMin: { value: this.particleBounds.min.clone() },
12671
12719
  boundsMax: { value: this.particleBounds.max.clone() },
12672
- fogColor: { value: new m.Color(268073) },
12720
+ fogColor: { value: new f.Color(268073) },
12673
12721
  fogDensity: { value: 0 }
12674
12722
  },
12675
12723
  vertexShader: `
@@ -12751,7 +12799,7 @@ class mA {
12751
12799
  `,
12752
12800
  transparent: !0,
12753
12801
  depthWrite: !1,
12754
- blending: m.NormalBlending,
12802
+ blending: f.NormalBlending,
12755
12803
  fog: !1
12756
12804
  });
12757
12805
  }
@@ -12778,9 +12826,9 @@ class mA {
12778
12826
  */
12779
12827
  updateBounds(e) {
12780
12828
  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);
12829
+ 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
12830
  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));
12831
+ const r = this.calculateParticleCount(new f.Box3(this.particleBounds.min, this.particleBounds.max));
12784
12832
  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
12833
  }
12786
12834
  /**
@@ -12826,7 +12874,7 @@ class bA {
12826
12874
  createSpotlight(e = 25) {
12827
12875
  this.controllerSpotlight && (this.scene.remove(this.controllerSpotlight), this.scene.remove(this.spotlightTarget));
12828
12876
  const t = e * Math.PI / 180, s = (this.isQuest2, 15);
12829
- this.controllerSpotlight = new m.SpotLight(
12877
+ this.controllerSpotlight = new f.SpotLight(
12830
12878
  16777215,
12831
12879
  // Pure white light
12832
12880
  2.5,
@@ -12841,7 +12889,7 @@ class bA {
12841
12889
  // Higher decay for realistic underwater attenuation
12842
12890
  ), this.controllerSpotlight.position.set(0, 0, 0), this.controllerSpotlight.visible = !0, this.controllerSpotlight.castShadow = !0;
12843
12891
  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;
12892
+ 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
12893
  }
12846
12894
  enableTorch() {
12847
12895
  this.controllerSpotlight ? this.controllerSpotlight.visible = !0 : console.error("Cannot enable torch - controllerSpotlight is null");
@@ -12860,9 +12908,9 @@ class bA {
12860
12908
  e || console.warn("updatePosition called with null controller");
12861
12909
  return;
12862
12910
  }
12863
- const t = new m.Vector3(), s = new m.Quaternion();
12911
+ const t = new f.Vector3(), s = new f.Quaternion();
12864
12912
  e.getWorldPosition(t), e.getWorldQuaternion(s), this.controllerSpotlight.position.copy(t);
12865
- const i = new m.Vector3(0, 0, -1);
12913
+ const i = new f.Vector3(0, 0, -1);
12866
12914
  i.applyQuaternion(s);
12867
12915
  const n = t.clone().add(i.multiplyScalar(2));
12868
12916
  this.spotlightTarget.position.copy(n);
@@ -12870,7 +12918,7 @@ class bA {
12870
12918
  updateCameraPosition(e) {
12871
12919
  if (!this.controllerSpotlight || !this.spotlightTarget) return;
12872
12920
  this.controllerSpotlight.position.copy(e.position);
12873
- const t = new m.Vector3(0, 0, -1);
12921
+ const t = new f.Vector3(0, 0, -1);
12874
12922
  t.applyQuaternion(e.quaternion);
12875
12923
  const s = e.position.clone().add(t.multiplyScalar(8));
12876
12924
  this.spotlightTarget.position.copy(s);
@@ -12925,7 +12973,7 @@ class CA {
12925
12973
  return;
12926
12974
  }
12927
12975
  try {
12928
- this.overheadLight = new m.AmbientLight(16777215, 0.5), this.currentMode = null;
12976
+ this.overheadLight = new f.AmbientLight(16777215, 0.5), this.currentMode = null;
12929
12977
  } catch (e) {
12930
12978
  console.error("Failed to initialize lighting system:", e);
12931
12979
  }
@@ -12933,7 +12981,7 @@ class CA {
12933
12981
  createSurveyModeLights() {
12934
12982
  if (!(this.isDisposed || !this.scene))
12935
12983
  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));
12984
+ 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.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
12985
  } catch (e) {
12938
12986
  console.error("Failed to create survey mode lights:", e);
12939
12987
  }
@@ -12959,19 +13007,19 @@ class CA {
12959
13007
  this.pendingAnimations.add(l);
12960
13008
  const c = performance.now(), A = s - t;
12961
13009
  let h, d;
12962
- i !== void 0 && n !== void 0 && (h = new m.Color(i), d = new m.Color(n));
13010
+ i !== void 0 && n !== void 0 && (h = new f.Color(i), d = new f.Color(n));
12963
13011
  const u = (g) => {
12964
13012
  if (!this.pendingAnimations.has(l) || this.isDisposed) {
12965
13013
  r && r();
12966
13014
  return;
12967
13015
  }
12968
13016
  try {
12969
- const p = g - c, b = Math.min(p / o, 1), E = 1 - Math.pow(1 - b, 3);
13017
+ const p = g - c, b = Math.min(p / o, 1), C = 1 - Math.pow(1 - b, 3);
12970
13018
  if (!e || this.scene && !this.scene.children.includes(e)) {
12971
13019
  this.pendingAnimations.delete(l), r && r();
12972
13020
  return;
12973
13021
  }
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());
13022
+ 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
13023
  } catch (p) {
12976
13024
  console.error("Error in lighting animation:", p), this.pendingAnimations.delete(l), r && r();
12977
13025
  }
@@ -13041,7 +13089,7 @@ class EA {
13041
13089
  * Apply Quest-specific optimizations
13042
13090
  */
13043
13091
  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)));
13092
+ 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
13093
  }
13046
13094
  /**
13047
13095
  * Apply mode-specific settings for VR vs Desktop
@@ -13053,7 +13101,7 @@ class EA {
13053
13101
  this.scene.fog = null;
13054
13102
  return;
13055
13103
  }
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);
13104
+ 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
13105
  }
13058
13106
  }
13059
13107
  /**
@@ -13250,9 +13298,9 @@ class yA extends yt {
13250
13298
  }
13251
13299
  setModelSizeFromObject(e) {
13252
13300
  if (!e) return;
13253
- const t = new m.Box3().setFromObject(e);
13301
+ const t = new f.Box3().setFromObject(e);
13254
13302
  if (t.isEmpty()) return;
13255
- const s = t.getSize(new m.Vector3()), i = Math.max(s.x, s.y, s.z);
13303
+ const s = t.getSize(new f.Vector3()), i = Math.max(s.x, s.y, s.z);
13256
13304
  i > 0 && Number.isFinite(i) && (this.modelSize = Math.max(1, Math.min(1e4, i)));
13257
13305
  }
13258
13306
  update(e) {
@@ -13262,12 +13310,12 @@ class yA extends yt {
13262
13310
  return;
13263
13311
  }
13264
13312
  if (!this.camera) return;
13265
- const t = this.modelSize / this.speedScale, i = (this.keys.shift ? this.boostSpeed : this.baseSpeed) * t, n = new m.Vector3();
13313
+ const t = this.modelSize / this.speedScale, i = (this.keys.shift ? this.boostSpeed : this.baseSpeed) * t, n = new f.Vector3();
13266
13314
  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
13315
  }
13268
13316
  _syncControlsTarget() {
13269
13317
  if (!this.controls || !this.camera) return;
13270
- const e = new m.Vector3(0, 0, -5).applyQuaternion(this.camera.quaternion);
13318
+ const e = new f.Vector3(0, 0, -5).applyQuaternion(this.camera.quaternion);
13271
13319
  this.controls.target.copy(this.camera.position).add(e);
13272
13320
  }
13273
13321
  _onKeyDown(e) {
@@ -13295,13 +13343,13 @@ class yA extends yt {
13295
13343
  -Math.PI / 2 + 0.01,
13296
13344
  Math.min(Math.PI / 2 - 0.01, this.cameraPitch)
13297
13345
  );
13298
- const t = new m.Euler(this.cameraPitch, this.cameraYaw, 0, "YXZ");
13346
+ const t = new f.Euler(this.cameraPitch, this.cameraYaw, 0, "YXZ");
13299
13347
  this.camera.quaternion.setFromEuler(t), this._syncControlsTarget();
13300
13348
  }
13301
13349
  _onPointerLockChange() {
13302
13350
  const e = this.pointerLocked;
13303
13351
  if (this.pointerLocked = document.pointerLockElement === this.domElement, this.pointerLocked && !e && this.camera) {
13304
- const t = new m.Euler().setFromQuaternion(this.camera.quaternion, "YXZ");
13352
+ const t = new f.Euler().setFromQuaternion(this.camera.quaternion, "YXZ");
13305
13353
  this.cameraYaw = t.y, this.cameraPitch = t.x;
13306
13354
  }
13307
13355
  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 });
@@ -13687,7 +13735,7 @@ class ri extends yt {
13687
13735
  }), this.belowViewer.on("vr-movement-start", (e) => this.emit("vr-movement-start", e)), this.belowViewer.on("vr-movement-stop", (e) => this.emit("vr-movement-stop", e)), this.belowViewer.on("vr-movement-update", (e) => this.emit("vr-movement-update", e));
13688
13736
  }
13689
13737
  onVRSessionStart() {
13690
- if (this.flyControls && this.flyControls.exitFlyMode(), this.ui.info && (this.ui.info.style.display = "none"), this.ui.selector && (this.ui.selector.style.pointerEvents = "none", this.ui.selector.style.opacity = "0.5"), this.isLoading && this.updateVRLoadingIndicator(), !this.vrUpdateLoop) {
13738
+ if (this.flyControls && this.flyControls.exitFlyMode(), this.ui.info && (this.ui.info.style.display = "none"), this.isLoading && this.updateVRLoadingIndicator(), !this.vrUpdateLoop) {
13691
13739
  let e = 0;
13692
13740
  const t = (s) => {
13693
13741
  this.belowViewer && this.belowViewer.renderer && this.belowViewer.renderer.xr && this.belowViewer.renderer.xr.isPresenting ? (s - e > 100 && (this.vrLoadingSprite && this.belowViewer.sceneManager.scene.children.includes(this.vrLoadingSprite) && this.isLoading && this.positionVRLoadingSprite(), e = s), this.vrUpdateLoop = requestAnimationFrame(t)) : this.vrUpdateLoop = null;
@@ -13757,7 +13805,7 @@ class ri extends yt {
13757
13805
  const t = this.getPointerRaycastInfo(e), s = t?.mouse, i = t?.camera;
13758
13806
  if (!s || !i)
13759
13807
  return;
13760
- const n = new m.Raycaster();
13808
+ const n = new f.Raycaster();
13761
13809
  n.setFromCamera(s, i);
13762
13810
  let o = [];
13763
13811
  if (this.measurementSystem && this.measurementSystem._raycastTargets && this.measurementSystem._raycastTargets.length > 0)
@@ -13933,14 +13981,14 @@ class ri extends yt {
13933
13981
  const g = s / 100 * Math.PI * 2;
13934
13982
  c.strokeStyle = "#ffffff", c.lineWidth = 3, c.beginPath(), c.arc(A, u, d, -Math.PI / 2, -Math.PI / 2 + g), c.stroke();
13935
13983
  }
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({
13984
+ 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) {
13985
+ const g = new f.SpriteMaterial({
13938
13986
  map: this.vrLoadingTexture,
13939
13987
  depthTest: !1,
13940
13988
  depthWrite: !1,
13941
13989
  transparent: !0
13942
13990
  });
13943
- this.vrLoadingSprite = new m.Sprite(g);
13991
+ this.vrLoadingSprite = new f.Sprite(g);
13944
13992
  const p = 0.7, b = n / o;
13945
13993
  this.vrLoadingSprite.scale.set(p * b, p, 1);
13946
13994
  }
@@ -14108,11 +14156,11 @@ class ri extends yt {
14108
14156
  positionVRLoadingSprite() {
14109
14157
  if (!this.vrLoadingSprite || !this.belowViewer || !this.belowViewer.cameraManager)
14110
14158
  return;
14111
- const e = this.belowViewer.cameraManager.camera, t = 2, s = new m.Vector3();
14159
+ const e = this.belowViewer.cameraManager.camera, t = 2, s = new f.Vector3();
14112
14160
  e.getWorldDirection(s);
14113
- const i = new m.Vector3();
14161
+ const i = new f.Vector3();
14114
14162
  e.getWorldPosition(i);
14115
- const n = new m.Vector3();
14163
+ const n = new f.Vector3();
14116
14164
  n.copy(i), n.add(s.multiplyScalar(t)), this.vrLoadingSprite.position.copy(n), this.vrLoadingSprite.lookAt(i);
14117
14165
  }
14118
14166
  updateStatus(e) {
@@ -14438,7 +14486,7 @@ export {
14438
14486
  _n as Line2,
14439
14487
  oi as LineGeometry,
14440
14488
  ss as LineMaterial,
14441
- $ as ModelLoader,
14489
+ ee as ModelLoader,
14442
14490
  ri as ModelViewer,
14443
14491
  Zr as Scene,
14444
14492
  iA as VRManager