gl-draw 0.16.7 → 0.16.9

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.
@@ -29,7 +29,7 @@ var se = (c, e, t) => new Promise((s, i) => {
29
29
  import * as Ce from "@tweenjs/tween.js";
30
30
  import Dt from "deepmerge";
31
31
  import Ut from "stats-gl";
32
- import { Vector3 as H, PerspectiveCamera as kt, Matrix4 as W, ShaderMaterial as zt, UniformsUtils as Ft, RawShaderMaterial as Nt, MeshBasicMaterial as It, PointsMaterial as nt, SpriteMaterial as at, Color as Ht, Layers as jt, Vector2 as B, WebGLRenderTarget as Bt, HalfFloatType as Vt, MathUtils as Yt, Vector4 as Zt, Quaternion as lt, Spherical as Wt, Box3 as ht, Sphere as Kt, Raycaster as ct, AxesHelper as De, CameraHelper as $t, PointLightHelper as Gt, DirectionalLightHelper as Xt, SpotLightHelper as qt, HemisphereLightHelper as Qt, Box3Helper as Ue, Scene as dt, Group as ke, Camera as Jt, Loader as pt, FileLoader as Se, Texture as fe, VideoTexture as es, LoadingManager as ts, DataTexture as ss, WebGLRenderer as is, REVISION as rs, Object3D as os, Timer as ns } from "three";
32
+ import { Vector3 as j, PerspectiveCamera as kt, Matrix4 as W, ShaderMaterial as zt, UniformsUtils as Ft, RawShaderMaterial as Nt, MeshBasicMaterial as It, PointsMaterial as nt, SpriteMaterial as at, Color as jt, Layers as Ht, Vector2 as B, WebGLRenderTarget as Bt, HalfFloatType as Vt, MathUtils as Yt, Vector4 as Zt, Quaternion as lt, Spherical as Wt, Box3 as ht, Sphere as Kt, Raycaster as ct, AxesHelper as De, CameraHelper as $t, PointLightHelper as Gt, DirectionalLightHelper as Xt, SpotLightHelper as qt, HemisphereLightHelper as Qt, Box3Helper as Ue, Scene as dt, Group as ke, Camera as Jt, Loader as pt, FileLoader as Se, Texture as fe, VideoTexture as es, LoadingManager as ts, DataTexture as ss, WebGLRenderer as is, REVISION as rs, Object3D as os, Timer as ns } from "three";
33
33
  import { M as mt, B as Oe, a as as, R as Pe, I as he } from "./WebGPULineSegments2.module.js";
34
34
  import { EffectComposer as ze } from "three/examples/jsm/postprocessing/EffectComposer";
35
35
  import { RenderPass as ls } from "three/examples/jsm/postprocessing/RenderPass";
@@ -91,7 +91,7 @@ const M = {
91
91
  function Y(c) {
92
92
  return c.isPerspectiveCamera;
93
93
  }
94
- function j(c) {
94
+ function H(c) {
95
95
  return c.isOrthographicCamera;
96
96
  }
97
97
  const $ = Math.PI * 2, Ie = Math.PI / 2, ut = 1e-5, ie = Math.PI / 180;
@@ -104,7 +104,7 @@ function A(c, e = ut) {
104
104
  function P(c, e, t = ut) {
105
105
  return A(c - e, t);
106
106
  }
107
- function He(c, e) {
107
+ function je(c, e) {
108
108
  return Math.round(c / e) * e;
109
109
  }
110
110
  function re(c) {
@@ -124,7 +124,7 @@ function ce(c, e, t, s, i = 1 / 0, r) {
124
124
  let _ = e + (h + v) * a;
125
125
  return m - c > 0 == _ > m && (_ = m, t.value = (_ - m) / r), _;
126
126
  }
127
- function je(c, e, t, s, i = 1 / 0, r, o) {
127
+ function He(c, e, t, s, i = 1 / 0, r, o) {
128
128
  s = Math.max(1e-4, s);
129
129
  const n = 2 / s, a = n * r, h = 1 / (1 + a + 0.48 * a * a + 0.235 * a * a * a);
130
130
  let m = e.x, p = e.y, v = e.z, _ = c.x - m, u = c.y - p, g = c.z - v;
@@ -145,7 +145,7 @@ function Ee(c, e) {
145
145
  }), e.x /= c.length, e.y /= c.length;
146
146
  }
147
147
  function Te(c, e) {
148
- return j(c) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
148
+ return H(c) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
149
149
  }
150
150
  class ws {
151
151
  constructor() {
@@ -248,7 +248,7 @@ class J extends ws {
248
248
  if (Y(this._camera)) {
249
249
  const b = x.copy(this._camera.position).sub(this._target), R = this._camera.getEffectiveFOV() * ie, V = b.length() * Math.tan(R * 0.5);
250
250
  w = this.truckSpeed * l * V / this._elementRect.height, E = this.truckSpeed * f * V / this._elementRect.height;
251
- } else if (j(this._camera)) {
251
+ } else if (H(this._camera)) {
252
252
  const b = this._camera;
253
253
  w = this.truckSpeed * l * (b.right - b.left) / b.zoom / this._elementRect.width, E = this.truckSpeed * f * (b.top - b.bottom) / b.zoom / this._elementRect.height;
254
254
  } else
@@ -296,10 +296,10 @@ class J extends ws {
296
296
  left: d.ROTATE,
297
297
  middle: d.DOLLY,
298
298
  right: d.TRUCK,
299
- wheel: Y(this._camera) ? d.DOLLY : j(this._camera) ? d.ZOOM : d.NONE
299
+ wheel: Y(this._camera) ? d.DOLLY : H(this._camera) ? d.ZOOM : d.NONE
300
300
  }, this.touches = {
301
301
  one: d.TOUCH_ROTATE,
302
- two: Y(this._camera) ? d.TOUCH_DOLLY_TRUCK : j(this._camera) ? d.TOUCH_ZOOM_TRUCK : d.NONE,
302
+ two: Y(this._camera) ? d.TOUCH_DOLLY_TRUCK : H(this._camera) ? d.TOUCH_ZOOM_TRUCK : d.NONE,
303
303
  three: d.TOUCH_TRUCK
304
304
  };
305
305
  const s = new T.Vector2(), i = new T.Vector2(), r = new T.Vector2(), o = (l) => {
@@ -985,7 +985,7 @@ class J extends ws {
985
985
  h.isEmpty() && (console.warn(
986
986
  "camera-controls: fitTo() cannot be used with an empty box. Aborting"
987
987
  ), Promise.resolve());
988
- const m = He(this._sphericalEnd.theta, Ie), p = He(this._sphericalEnd.phi, Ie);
988
+ const m = je(this._sphericalEnd.theta, Ie), p = je(this._sphericalEnd.phi, Ie);
989
989
  a.push(this.rotateTo(m, p, t));
990
990
  const v = x.setFromSpherical(this._sphericalEnd).normalize(), _ = We.setFromUnitVectors(v, we), u = P(Math.abs(v.y), 1);
991
991
  u && _.multiply(be.setFromAxisAngle(pe, m)), _.multiply(this._yAxisUpSpaceInverse);
@@ -1002,7 +1002,7 @@ class J extends ws {
1002
1002
  a.push(
1003
1003
  this.moveTo(l.x, l.y, l.z, t)
1004
1004
  ), a.push(this.dollyTo(f, t)), a.push(this.setFocalOffset(0, 0, 0, t));
1005
- } else if (j(this._camera)) {
1005
+ } else if (H(this._camera)) {
1006
1006
  const f = this._camera, O = f.right - f.left, C = f.top - f.bottom, w = s ? Math.max(O / y.x, C / y.y) : Math.min(O / y.x, C / y.y);
1007
1007
  a.push(
1008
1008
  this.moveTo(l.x, l.y, l.z, t)
@@ -1028,7 +1028,7 @@ class J extends ws {
1028
1028
  ), Y(this._camera)) {
1029
1029
  const o = this.getDistanceToFitSphere(r.radius);
1030
1030
  s.push(this.dollyTo(o, t));
1031
- } else if (j(this._camera)) {
1031
+ } else if (H(this._camera)) {
1032
1032
  const o = this._camera.right - this._camera.left, n = this._camera.top - this._camera.bottom, a = 2 * r.radius, h = Math.min(o / a, n / a);
1033
1033
  s.push(this.zoomTo(h, t));
1034
1034
  }
@@ -1415,7 +1415,7 @@ class J extends ws {
1415
1415
  this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
1416
1416
  else {
1417
1417
  const p = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
1418
- je(
1418
+ He(
1419
1419
  this._target,
1420
1420
  this._targetEnd,
1421
1421
  this._targetVelocity,
@@ -1429,7 +1429,7 @@ class J extends ws {
1429
1429
  this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd);
1430
1430
  else {
1431
1431
  const p = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
1432
- je(
1432
+ He(
1433
1433
  this._focalOffset,
1434
1434
  this._focalOffsetEnd,
1435
1435
  this._focalOffsetVelocity,
@@ -1471,7 +1471,7 @@ class J extends ws {
1471
1471
  this._boundary.clampPoint(C, C);
1472
1472
  const b = L.subVectors(C, this._targetEnd);
1473
1473
  this._targetEnd.copy(C), this._target.add(b), this._changedDolly -= p, A(this._changedDolly) && (this._changedDolly = 0);
1474
- } else if (j(this._camera) && this._changedZoom !== 0) {
1474
+ } else if (H(this._camera) && this._changedZoom !== 0) {
1475
1475
  const p = this._zoom - this._lastZoom, v = this._camera, _ = x.set(
1476
1476
  this._dollyControlCoord.x,
1477
1477
  this._dollyControlCoord.y,
@@ -1606,7 +1606,7 @@ class J extends ws {
1606
1606
  if (Y(this._camera)) {
1607
1607
  const e = this._camera, t = e.near, s = e.getEffectiveFOV() * ie, i = Math.tan(s * 0.5) * t, r = i * e.aspect;
1608
1608
  this._nearPlaneCorners[0].set(-r, -i, 0), this._nearPlaneCorners[1].set(r, -i, 0), this._nearPlaneCorners[2].set(r, i, 0), this._nearPlaneCorners[3].set(-r, i, 0);
1609
- } else if (j(this._camera)) {
1609
+ } else if (H(this._camera)) {
1610
1610
  const e = this._camera, t = 1 / e.zoom, s = e.left * t, i = e.right * t, r = e.top * t, o = e.bottom * t;
1611
1611
  this._nearPlaneCorners[0].set(s, r, 0), this._nearPlaneCorners[1].set(i, r, 0), this._nearPlaneCorners[2].set(i, o, 0), this._nearPlaneCorners[3].set(s, o, 0);
1612
1612
  }
@@ -1995,7 +1995,7 @@ const Tt = {
1995
1995
  fov: 45,
1996
1996
  near: 1,
1997
1997
  far: 1e3,
1998
- up: new H(0, 1, 0)
1998
+ up: new j(0, 1, 0)
1999
1999
  };
2000
2000
  class Ds extends ee {
2001
2001
  constructor(e) {
@@ -2225,17 +2225,17 @@ const Fs = new It({ color: "black" }), Ns = new nt({
2225
2225
  }), Is = new nt({
2226
2226
  color: "black",
2227
2227
  sizeAttenuation: !0
2228
- }), Hs = new at({
2228
+ }), js = new at({
2229
2229
  color: "black",
2230
2230
  sizeAttenuation: !0
2231
- }), js = new at({
2231
+ }), Hs = new at({
2232
2232
  color: "black",
2233
2233
  sizeAttenuation: !1
2234
2234
  }), Bs = new mt({
2235
2235
  color: "black",
2236
2236
  sizeAttenuation: !1,
2237
2237
  lineWidth: 0
2238
- }), Ge = new Ht(0), Vs = {
2238
+ }), Ge = new jt(0), Vs = {
2239
2239
  kernelRadius: 8,
2240
2240
  minDistance: 5e-3,
2241
2241
  maxDistance: 0.1
@@ -2250,7 +2250,7 @@ const Fs = new It({ color: "black" }), Ns = new nt({
2250
2250
  };
2251
2251
  class Ws {
2252
2252
  constructor(e) {
2253
- this.bloomComposerActive = !1, this.active = !0, this.bloomSelection = /* @__PURE__ */ new Set(), this.bloomLayer = new jt(), this.bloomMaterials = {}, this.bloomVisible = {}, this.bloomComposerRenderIng = !1, this.pipViewportState = null, this.options = e;
2253
+ this.bloomComposerActive = !1, this.active = !0, this.bloomSelection = /* @__PURE__ */ new Set(), this.bloomLayer = new Ht(), this.bloomMaterials = {}, this.bloomVisible = {}, this.bloomComposerRenderIng = !1, this.pipViewportState = null, this.options = e;
2254
2254
  const {
2255
2255
  rendererController: t,
2256
2256
  sceneController: s,
@@ -2346,7 +2346,7 @@ class Ws {
2346
2346
  e.push(o);
2347
2347
  return;
2348
2348
  }
2349
- this.bloomMaterials[o.uuid] = o.material, n.isSprite ? n.material.sizeAttenuation ? n.material = Hs : n.material = js : o.material instanceof mt ? o.material = Bs : a.isPoints ? a.material.sizeAttenuation ? a.material = Is : a.material = Ns : o.material = Fs;
2349
+ this.bloomMaterials[o.uuid] = o.material, n.isSprite ? n.material.sizeAttenuation ? n.material = js : n.material = Hs : o.material instanceof mt ? o.material = Bs : a.isPoints ? a.material.sizeAttenuation ? a.material = Is : a.material = Ns : o.material = Fs;
2350
2350
  }
2351
2351
  });
2352
2352
  }), e.forEach((i) => {
@@ -2401,7 +2401,7 @@ class Ks extends ee {
2401
2401
  super(), this.autoRotateSpeed = 0, this.options = e;
2402
2402
  const t = {
2403
2403
  Vector2: B,
2404
- Vector3: H,
2404
+ Vector3: j,
2405
2405
  Vector4: Zt,
2406
2406
  Quaternion: lt,
2407
2407
  Matrix4: W,
@@ -2443,8 +2443,74 @@ class Ks extends ee {
2443
2443
  super.update(e, t), this.autoRotateSpeed && this.cameraControls && (this.cameraControls.azimuthAngle += this.autoRotateSpeed * e * Yt.DEG2RAD);
2444
2444
  }
2445
2445
  }
2446
- const Xe = new H(), $s = new lt(), qe = new H(), I = new W(), Gs = new W();
2447
- class Xs {
2446
+ const q = new j(), Xe = new W(), qe = new W(), Qe = new j(), Je = new j();
2447
+ class $s {
2448
+ /**
2449
+ * Constructs a new CSS2D renderer.
2450
+ *
2451
+ * @param {CSS2DRenderer~Parameters} [parameters] - The parameters.
2452
+ */
2453
+ constructor(e = {}) {
2454
+ const t = this;
2455
+ let s, i, r, o;
2456
+ const n = {
2457
+ objects: /* @__PURE__ */ new WeakMap()
2458
+ }, a = e.element !== void 0 ? e.element : document.createElement("div");
2459
+ a.style.overflow = "hidden", this.domElement = a, this.sortObjects = !0, this.getSize = function() {
2460
+ return {
2461
+ width: s,
2462
+ height: i
2463
+ };
2464
+ }, this.render = function(u, g) {
2465
+ u.matrixWorldAutoUpdate === !0 && u.updateMatrixWorld(), g.parent === null && g.matrixWorldAutoUpdate === !0 && g.updateMatrixWorld(), Xe.copy(g.matrixWorldInverse), qe.multiplyMatrices(g.projectionMatrix, Xe), m(u, u, g), this.sortObjects && _(u);
2466
+ }, this.setSize = function(u, g) {
2467
+ s = u, i = g, r = s / 2, o = i / 2, a.style.width = u + "px", a.style.height = g + "px";
2468
+ };
2469
+ function h(u) {
2470
+ u.isCSS2DObject && (u.element.style.display = "none");
2471
+ for (let g = 0, y = u.children.length; g < y; g++)
2472
+ h(u.children[g]);
2473
+ }
2474
+ function m(u, g, y) {
2475
+ if (u.visible === !1) {
2476
+ h(u);
2477
+ return;
2478
+ }
2479
+ if (u.isCSS2DObject) {
2480
+ q.setFromMatrixPosition(u.matrixWorld), q.applyMatrix4(qe);
2481
+ const l = q.z >= -1 && q.z <= 1 && u.layers.test(y.layers) === !0, f = u.element;
2482
+ f.style.display = l === !0 ? "" : "none", l === !0 && (u.onBeforeRender(t, g, y), f.style.transform = "translate(" + -100 * u.center.x + "%," + -100 * u.center.y + "%)translate(" + (q.x * r + r) + "px," + (-q.y * o + o) + "px)", f.parentNode !== a && a.appendChild(f), u.onAfterRender(t, g, y));
2483
+ const O = {
2484
+ distanceToCameraSquared: p(y, u)
2485
+ };
2486
+ n.objects.set(u, O);
2487
+ }
2488
+ for (let l = 0, f = u.children.length; l < f; l++)
2489
+ m(u.children[l], g, y);
2490
+ }
2491
+ function p(u, g) {
2492
+ return Qe.setFromMatrixPosition(u.matrixWorld), Je.setFromMatrixPosition(g.matrixWorld), Qe.distanceToSquared(Je);
2493
+ }
2494
+ function v(u) {
2495
+ const g = [];
2496
+ return u.traverseVisible(function(y) {
2497
+ y.isCSS2DObject && g.push(y);
2498
+ }), g;
2499
+ }
2500
+ function _(u) {
2501
+ const g = v(u).sort(function(l, f) {
2502
+ if (l.renderOrder !== f.renderOrder)
2503
+ return f.renderOrder - l.renderOrder;
2504
+ const O = n.objects.get(l).distanceToCameraSquared, C = n.objects.get(f).distanceToCameraSquared;
2505
+ return O - C;
2506
+ }), y = g.length;
2507
+ for (let l = 0, f = g.length; l < f; l++)
2508
+ g[l].element.style.zIndex = y - l;
2509
+ }
2510
+ }
2511
+ }
2512
+ const et = new j(), Gs = new lt(), tt = new j(), I = new W(), Xs = new W();
2513
+ class qs {
2448
2514
  /**
2449
2515
  * Constructs a new CSS3D renderer.
2450
2516
  *
@@ -2502,7 +2568,7 @@ class Xs {
2502
2568
  if (w.style.display = C === !0 ? "" : "none", C === !0) {
2503
2569
  y.onBeforeRender(t, l, f);
2504
2570
  let E;
2505
- y.isCSS3DSprite ? (I.copy(f.matrixWorldInverse), I.transpose(), y.rotation2D !== 0 && I.multiply(Gs.makeRotationZ(y.rotation2D)), y.matrixWorld.decompose(Xe, $s, qe), I.setPosition(Xe), I.scale(qe), I.elements[3] = 0, I.elements[7] = 0, I.elements[11] = 0, I.elements[15] = 1, E = _(I)) : E = _(y.matrixWorld);
2571
+ y.isCSS3DSprite ? (I.copy(f.matrixWorldInverse), I.transpose(), y.rotation2D !== 0 && I.multiply(Xs.makeRotationZ(y.rotation2D)), y.matrixWorld.decompose(et, Gs, tt), I.setPosition(et), I.scale(tt), I.elements[3] = 0, I.elements[7] = 0, I.elements[11] = 0, I.elements[15] = 1, E = _(I)) : E = _(y.matrixWorld);
2506
2572
  const b = n.objects.get(y);
2507
2573
  if (b === void 0 || b.style !== E) {
2508
2574
  w.style.transform = E;
@@ -2517,72 +2583,6 @@ class Xs {
2517
2583
  }
2518
2584
  }
2519
2585
  }
2520
- const q = new H(), Qe = new W(), Je = new W(), et = new H(), tt = new H();
2521
- class qs {
2522
- /**
2523
- * Constructs a new CSS2D renderer.
2524
- *
2525
- * @param {CSS2DRenderer~Parameters} [parameters] - The parameters.
2526
- */
2527
- constructor(e = {}) {
2528
- const t = this;
2529
- let s, i, r, o;
2530
- const n = {
2531
- objects: /* @__PURE__ */ new WeakMap()
2532
- }, a = e.element !== void 0 ? e.element : document.createElement("div");
2533
- a.style.overflow = "hidden", this.domElement = a, this.getSize = function() {
2534
- return {
2535
- width: s,
2536
- height: i
2537
- };
2538
- }, this.render = function(u, g) {
2539
- u.matrixWorldAutoUpdate === !0 && u.updateMatrixWorld(), g.parent === null && g.matrixWorldAutoUpdate === !0 && g.updateMatrixWorld(), Qe.copy(g.matrixWorldInverse), Je.multiplyMatrices(g.projectionMatrix, Qe), m(u, u, g), _(u);
2540
- }, this.setSize = function(u, g) {
2541
- s = u, i = g, r = s / 2, o = i / 2, a.style.width = u + "px", a.style.height = g + "px";
2542
- };
2543
- function h(u) {
2544
- u.isCSS2DObject && (u.element.style.display = "none");
2545
- for (let g = 0, y = u.children.length; g < y; g++)
2546
- h(u.children[g]);
2547
- }
2548
- function m(u, g, y) {
2549
- if (u.visible === !1) {
2550
- h(u);
2551
- return;
2552
- }
2553
- if (u.isCSS2DObject) {
2554
- q.setFromMatrixPosition(u.matrixWorld), q.applyMatrix4(Je);
2555
- const l = q.z >= -1 && q.z <= 1 && u.layers.test(y.layers) === !0, f = u.element;
2556
- f.style.display = l === !0 ? "" : "none", l === !0 && (u.onBeforeRender(t, g, y), f.style.transform = "translate(" + -100 * u.center.x + "%," + -100 * u.center.y + "%)translate(" + (q.x * r + r) + "px," + (-q.y * o + o) + "px)", f.parentNode !== a && a.appendChild(f), u.onAfterRender(t, g, y));
2557
- const O = {
2558
- distanceToCameraSquared: p(y, u)
2559
- };
2560
- n.objects.set(u, O);
2561
- }
2562
- for (let l = 0, f = u.children.length; l < f; l++)
2563
- m(u.children[l], g, y);
2564
- }
2565
- function p(u, g) {
2566
- return et.setFromMatrixPosition(u.matrixWorld), tt.setFromMatrixPosition(g.matrixWorld), et.distanceToSquared(tt);
2567
- }
2568
- function v(u) {
2569
- const g = [];
2570
- return u.traverseVisible(function(y) {
2571
- y.isCSS2DObject && g.push(y);
2572
- }), g;
2573
- }
2574
- function _(u) {
2575
- const g = v(u).sort(function(l, f) {
2576
- if (l.renderOrder !== f.renderOrder)
2577
- return f.renderOrder - l.renderOrder;
2578
- const O = n.objects.get(l).distanceToCameraSquared, C = n.objects.get(f).distanceToCameraSquared;
2579
- return O - C;
2580
- }), y = g.length;
2581
- for (let l = 0, f = g.length; l < f; l++)
2582
- g[l].element.style.zIndex = y - l;
2583
- }
2584
- }
2585
- }
2586
2586
  const st = {
2587
2587
  zIndex: "auto"
2588
2588
  };
@@ -2591,7 +2591,7 @@ class Qs {
2591
2591
  this.container = e;
2592
2592
  }
2593
2593
  addRenderer(e, t) {
2594
- const s = t.container || this.container, i = s.offsetWidth, r = s.offsetHeight, o = e === "css2d" ? new qs() : new Xs();
2594
+ const s = t.container || this.container, i = s.offsetWidth, r = s.offsetHeight, o = e === "css2d" ? new $s() : new qs();
2595
2595
  o.domElement.style.position = "absolute", o.domElement.style.top = "0", o.domElement.style.pointerEvents = "none", o.domElement.style.zIndex = t.zIndex, o.setSize(i, r), s.appendChild(o.domElement), e === "css2d" ? this.css2Drenderer = o : e === "css3d" && (this.css3Drenderer = o);
2596
2596
  }
2597
2597
  setSize(e, t) {
@@ -3156,7 +3156,7 @@ const ri = {
3156
3156
  media: ["mp4", "webm", "ogg"],
3157
3157
  gltf: ["gltf", "glb"],
3158
3158
  json: ["json", "geojson"],
3159
- gzipJson: ["json.gzip"],
3159
+ gzipJson: ["json.gzip", "json.gz"],
3160
3160
  exr: ["exr"],
3161
3161
  lottie: ["lottie.json"]
3162
3162
  };
@@ -3200,7 +3200,7 @@ class oi {
3200
3200
  if (t) {
3201
3201
  if (e.endsWith("lottie.json"))
3202
3202
  return "lottie";
3203
- if (e.endsWith("json.gzip"))
3203
+ if (e.endsWith("json.gzip") || e.endsWith("json.gz"))
3204
3204
  return "gzipJson";
3205
3205
  } else return;
3206
3206
  for (const [i, r] of Object.entries(ri))
@@ -3274,7 +3274,7 @@ class oi {
3274
3274
  }
3275
3275
  return h;
3276
3276
  } catch (h) {
3277
- r.reject(`Failed to load ${e}`);
3277
+ r.reject(`Failed to load ${e}`), this.assets.delete(e);
3278
3278
  return;
3279
3279
  }
3280
3280
  });
@@ -3755,7 +3755,7 @@ class _i {
3755
3755
  const _e = class _e {
3756
3756
  constructor(e) {
3757
3757
  var r, o;
3758
- this.raycaster = new ct(), this.maxBackufferArea = 5760 * 5760, this.installPlugins = /* @__PURE__ */ new Map(), this._cameraPositon = new H(), this._cameraTarget = new H(), this.event = new ye.EventEmitter(), this.timer = new ns(), this.userData = {}, this.pageActiveIndex = 0, this.pageCountIndex = 0, this.userSetDprCache = 1, this.viewPadding = [0, 0, 0, 0], this._isDispose = !1, this.event.setMaxListeners(1 / 0), (o = (r = this.timer).connect) == null || o.call(r, document), this.options = Dt(_e.options, e, {
3758
+ this.raycaster = new ct(), this.maxBackufferArea = 5760 * 5760, this.installPlugins = /* @__PURE__ */ new Map(), this._cameraPositon = new j(), this._cameraTarget = new j(), this.event = new ye.EventEmitter(), this.timer = new ns(), this.userData = {}, this.pageActiveIndex = 0, this.pageCountIndex = 0, this.userSetDprCache = 1, this.viewPadding = [0, 0, 0, 0], this._isDispose = !1, this.event.setMaxListeners(1 / 0), (o = (r = this.timer).connect) == null || o.call(r, document), this.options = Dt(_e.options, e, {
3759
3759
  isMergeableObject: Es
3760
3760
  }), this.userSetDprCache = this.options.renderer.devicePixelRatio;
3761
3761
  const {