gl-draw 0.15.14 → 0.15.15

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.
@@ -26,13 +26,13 @@ var se = (h, e, t) => new Promise((s, i) => {
26
26
  }, n = (a) => a.done ? s(a.value) : Promise.resolve(a.value).then(r, o);
27
27
  n((t = t.apply(h, e)).next());
28
28
  });
29
- import { WebGLRenderer as Ut, Vector3 as H, PerspectiveCamera as zt, Matrix4 as W, Scene as nt, AxesHelper as De, CameraHelper as kt, PointLightHelper as Ft, DirectionalLightHelper as Nt, SpotLightHelper as jt, HemisphereLightHelper as Ht, Box3 as at, Box3Helper as Ue, MathUtils as It, Vector2 as B, Vector4 as Bt, Quaternion as lt, Spherical as Vt, Sphere as Yt, Raycaster as ht, REVISION as Zt, Object3D as Wt, UniformsUtils as Kt, RawShaderMaterial as $t, ShaderMaterial as Gt, MeshBasicMaterial as Xt, PointsMaterial as ct, SpriteMaterial as dt, Layers as qt, WebGLRenderTarget as Qt, HalfFloatType as Jt, Loader as mt, Texture as fe, VideoTexture as pt, FileLoader as Ae, LoadingManager as es, DataTexture as ts, Group as ze } from "three";
29
+ import { WebGLRenderer as Ut, Vector3 as I, PerspectiveCamera as zt, Matrix4 as W, Scene as nt, AxesHelper as De, CameraHelper as kt, PointLightHelper as Ft, DirectionalLightHelper as Nt, SpotLightHelper as jt, HemisphereLightHelper as It, Box3 as at, Box3Helper as Ue, MathUtils as Ht, Vector2 as B, Vector4 as Bt, Quaternion as lt, Spherical as Vt, Sphere as Yt, Raycaster as ht, REVISION as Zt, Object3D as Wt, UniformsUtils as Kt, RawShaderMaterial as $t, ShaderMaterial as Gt, MeshBasicMaterial as Xt, PointsMaterial as ct, SpriteMaterial as dt, Layers as qt, WebGLRenderTarget as Qt, HalfFloatType as Jt, Loader as mt, Texture as ue, VideoTexture as pt, FileLoader as Ae, LoadingManager as es, DataTexture as ts, Group as ze } from "three";
30
30
  import { Timer as ss } from "three/examples/jsm/misc/Timer";
31
31
  import * as Ce from "@tweenjs/tween.js";
32
32
  import is from "deepmerge";
33
33
  import rs from "stats-gl";
34
34
  import { C as os, c as ns, i as as } from "./isPlainObject.module.js";
35
- import { R as Pe, M as ut, B as Oe, a as ls, I as he } from "./index.module2.js";
35
+ import { R as Pe, M as ft, B as Oe, a as ls, I as he } from "./index.module2.js";
36
36
  import { RectAreaLightHelper as hs } from "three/examples/jsm/helpers/RectAreaLightHelper";
37
37
  import { ViewHelper as cs } from "three/examples/jsm/helpers/ViewHelper";
38
38
  import { TransformControls as ds } from "three/examples/jsm/controls/TransformControls";
@@ -40,8 +40,8 @@ import { EffectComposer as ke } from "three/examples/jsm/postprocessing/EffectCo
40
40
  import { RenderPass as ms } from "three/examples/jsm/postprocessing/RenderPass";
41
41
  import { SSAOPass as ps } from "three/examples/jsm/postprocessing/SSAOPass";
42
42
  import { FullScreenQuad as Fe } from "three/examples/jsm/postprocessing/Pass";
43
- import { OutputPass as us } from "three/examples/jsm/postprocessing/OutputPass";
44
- import { ShaderPass as fs } from "three/examples/jsm/postprocessing/ShaderPass";
43
+ import { OutputPass as fs } from "three/examples/jsm/postprocessing/OutputPass";
44
+ import { ShaderPass as us } from "three/examples/jsm/postprocessing/ShaderPass";
45
45
  import { UnrealBloomPass as _s } from "three/examples/jsm/postprocessing/UnrealBloomPass";
46
46
  import "three/examples/jsm/renderers/CSS2DRenderer";
47
47
  import "three/examples/jsm/renderers/CSS3DRenderer";
@@ -92,20 +92,20 @@ const M = {
92
92
  function Y(h) {
93
93
  return h.isPerspectiveCamera;
94
94
  }
95
- function I(h) {
95
+ function H(h) {
96
96
  return h.isOrthographicCamera;
97
97
  }
98
- const $ = Math.PI * 2, He = Math.PI / 2, ft = 1e-5, ie = Math.PI / 180;
98
+ const $ = Math.PI * 2, Ie = Math.PI / 2, ut = 1e-5, ie = Math.PI / 180;
99
99
  function k(h, e, t) {
100
100
  return Math.max(e, Math.min(t, h));
101
101
  }
102
- function S(h, e = ft) {
102
+ function S(h, e = ut) {
103
103
  return Math.abs(h) < e;
104
104
  }
105
- function P(h, e, t = ft) {
105
+ function P(h, e, t = ut) {
106
106
  return S(h - e, t);
107
107
  }
108
- function Ie(h, e) {
108
+ function He(h, e) {
109
109
  return Math.round(h / e) * e;
110
110
  }
111
111
  function re(h) {
@@ -118,25 +118,25 @@ function ce(h, e, t, s, i = 1 / 0, r) {
118
118
  s = Math.max(1e-4, s);
119
119
  const o = 2 / s, n = o * r, a = 1 / (1 + n + 0.48 * n * n + 0.235 * n * n * n);
120
120
  let c = h - e;
121
- const f = e, m = i * s;
121
+ const u = e, m = i * s;
122
122
  c = k(c, -m, m), e = h - c;
123
123
  const v = (t.value + o * c) * r;
124
124
  t.value = (t.value - o * v) * a;
125
125
  let p = e + (c + v) * a;
126
- return f - h > 0 == p > f && (p = f, t.value = (p - f) / r), p;
126
+ return u - h > 0 == p > u && (p = u, t.value = (p - u) / r), p;
127
127
  }
128
128
  function Be(h, e, t, s, i = 1 / 0, r, o) {
129
129
  s = Math.max(1e-4, s);
130
130
  const n = 2 / s, a = n * r, c = 1 / (1 + a + 0.48 * a * a + 0.235 * a * a * a);
131
- let f = e.x, m = e.y, v = e.z, p = h.x - f, u = h.y - m, g = h.z - v;
132
- const y = f, l = m, _ = v, O = i * s, C = O * O, w = p * p + u * u + g * g;
131
+ let u = e.x, m = e.y, v = e.z, p = h.x - u, f = h.y - m, g = h.z - v;
132
+ const y = u, l = m, _ = v, O = i * s, C = O * O, w = p * p + f * f + g * g;
133
133
  if (w > C) {
134
134
  const ve = Math.sqrt(w);
135
- p = p / ve * O, u = u / ve * O, g = g / ve * O;
135
+ p = p / ve * O, f = f / ve * O, g = g / ve * O;
136
136
  }
137
- f = h.x - p, m = h.y - u, v = h.z - g;
138
- const E = (t.x + n * p) * r, x = (t.y + n * u) * r, R = (t.z + n * g) * r;
139
- t.x = (t.x - n * E) * c, t.y = (t.y - n * x) * c, t.z = (t.z - n * R) * c, o.x = f + (p + E) * c, o.y = m + (u + x) * c, o.z = v + (g + R) * c;
137
+ u = h.x - p, m = h.y - f, v = h.z - g;
138
+ const E = (t.x + n * p) * r, x = (t.y + n * f) * r, R = (t.z + n * g) * r;
139
+ t.x = (t.x - n * E) * c, t.y = (t.y - n * x) * c, t.z = (t.z - n * R) * c, o.x = u + (p + E) * c, o.y = m + (f + x) * c, o.z = v + (g + R) * c;
140
140
  const V = y - h.x, le = l - h.y, bt = _ - h.z, xt = o.x - y, Lt = o.y - l, Pt = o.z - _;
141
141
  return V * xt + le * Lt + bt * Pt > 0 && (o.x = y, o.y = l, o.z = _, t.x = (o.x - y) / r, t.y = (o.y - l) / r, t.z = (o.z - _) / r), o;
142
142
  }
@@ -146,7 +146,7 @@ function Ee(h, e) {
146
146
  }), e.x /= h.length, e.y /= h.length;
147
147
  }
148
148
  function Te(h, e) {
149
- return I(h) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
149
+ return H(h) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
150
150
  }
151
151
  class Os {
152
152
  constructor() {
@@ -249,7 +249,7 @@ class J extends Os {
249
249
  if (Y(this._camera)) {
250
250
  const x = b.copy(this._camera.position).sub(this._target), R = this._camera.getEffectiveFOV() * ie, V = x.length() * Math.tan(R * 0.5);
251
251
  w = this.truckSpeed * l * V / this._elementRect.height, E = this.truckSpeed * _ * V / this._elementRect.height;
252
- } else if (I(this._camera)) {
252
+ } else if (H(this._camera)) {
253
253
  const x = this._camera;
254
254
  w = this.truckSpeed * l * (x.right - x.left) / x.zoom / this._elementRect.width, E = this.truckSpeed * _ * (x.top - x.bottom) / x.zoom / this._elementRect.height;
255
255
  } else
@@ -297,10 +297,10 @@ class J extends Os {
297
297
  left: d.ROTATE,
298
298
  middle: d.DOLLY,
299
299
  right: d.TRUCK,
300
- wheel: Y(this._camera) ? d.DOLLY : I(this._camera) ? d.ZOOM : d.NONE
300
+ wheel: Y(this._camera) ? d.DOLLY : H(this._camera) ? d.ZOOM : d.NONE
301
301
  }, this.touches = {
302
302
  one: d.TOUCH_ROTATE,
303
- two: Y(this._camera) ? d.TOUCH_DOLLY_TRUCK : I(this._camera) ? d.TOUCH_ZOOM_TRUCK : d.NONE,
303
+ two: Y(this._camera) ? d.TOUCH_DOLLY_TRUCK : H(this._camera) ? d.TOUCH_ZOOM_TRUCK : d.NONE,
304
304
  three: d.TOUCH_TRUCK
305
305
  };
306
306
  const s = new T.Vector2(), i = new T.Vector2(), r = new T.Vector2(), o = (l) => {
@@ -377,11 +377,11 @@ class J extends Os {
377
377
  }
378
378
  else
379
379
  this._state = d.NONE;
380
- u();
380
+ f();
381
381
  }
382
382
  };
383
383
  let c = -1;
384
- const f = (l) => {
384
+ const u = (l) => {
385
385
  if (!this._domElement || !this._enabled || this.mouseButtons.wheel === d.NONE) return;
386
386
  if (this._interactiveArea.left !== 0 || this._interactiveArea.top !== 0 || this._interactiveArea.width !== 1 || this._interactiveArea.height !== 1) {
387
387
  const E = this._domElement.getBoundingClientRect(), x = (l.clientX - E.left) / (E.right - E.left), R = (l.clientY - E.top) / (E.bottom - E.top);
@@ -484,7 +484,7 @@ class J extends Os {
484
484
  (this._state & d.TOUCH_DOLLY) === d.TOUCH_DOLLY || (this._state & d.TOUCH_DOLLY_ROTATE) === d.TOUCH_DOLLY_ROTATE || (this._state & d.TOUCH_DOLLY_TRUCK) === d.TOUCH_DOLLY_TRUCK || (this._state & d.TOUCH_DOLLY_SCREEN_PAN) === d.TOUCH_DOLLY_SCREEN_PAN || (this._state & d.TOUCH_DOLLY_OFFSET) === d.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(R * de, V, le), this._isUserControllingDolly = !0) : (this._zoomInternal(R * de, V, le), this._isUserControllingZoom = !0);
485
485
  }
486
486
  ((this._state & d.TRUCK) === d.TRUCK || (this._state & d.TOUCH_TRUCK) === d.TOUCH_TRUCK || (this._state & d.TOUCH_DOLLY_TRUCK) === d.TOUCH_DOLLY_TRUCK || (this._state & d.TOUCH_ZOOM_TRUCK) === d.TOUCH_ZOOM_TRUCK) && (this._truckInternal(O, C, !1, !1), this._isUserControllingTruck = !0), ((this._state & d.SCREEN_PAN) === d.SCREEN_PAN || (this._state & d.TOUCH_SCREEN_PAN) === d.TOUCH_SCREEN_PAN || (this._state & d.TOUCH_DOLLY_SCREEN_PAN) === d.TOUCH_DOLLY_SCREEN_PAN || (this._state & d.TOUCH_ZOOM_SCREEN_PAN) === d.TOUCH_ZOOM_SCREEN_PAN) && (this._truckInternal(O, C, !1, !0), this._isUserControllingTruck = !0), ((this._state & d.OFFSET) === d.OFFSET || (this._state & d.TOUCH_OFFSET) === d.TOUCH_OFFSET || (this._state & d.TOUCH_DOLLY_OFFSET) === d.TOUCH_DOLLY_OFFSET || (this._state & d.TOUCH_ZOOM_OFFSET) === d.TOUCH_ZOOM_OFFSET) && (this._truckInternal(O, C, !0, !1), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
487
- }, u = () => {
487
+ }, f = () => {
488
488
  Ee(this._activePointers, D), i.copy(D), this._dragNeedsUpdate = !1, (this._activePointers.length === 0 || this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer) && (this._isDragging = !1), this._activePointers.length === 0 && this._domElement && (this._domElement.ownerDocument.removeEventListener(
489
489
  "pointermove",
490
490
  n,
@@ -536,11 +536,11 @@ class J extends Os {
536
536
  this.unlockPointer();
537
537
  };
538
538
  this._addAllEventListeners = (l) => {
539
- this._domElement = l, this._domElement.style.touchAction = "none", this._domElement.style.userSelect = "none", this._domElement.style.webkitUserSelect = "none", this._domElement.addEventListener("pointerdown", o), this._domElement.addEventListener("pointercancel", a), this._domElement.addEventListener("wheel", f, {
539
+ this._domElement = l, this._domElement.style.touchAction = "none", this._domElement.style.userSelect = "none", this._domElement.style.webkitUserSelect = "none", this._domElement.addEventListener("pointerdown", o), this._domElement.addEventListener("pointercancel", a), this._domElement.addEventListener("wheel", u, {
540
540
  passive: !1
541
541
  }), this._domElement.addEventListener("contextmenu", m);
542
542
  }, this._removeAllEventListeners = () => {
543
- this._domElement && (this._domElement.style.touchAction = "", this._domElement.style.userSelect = "", this._domElement.style.webkitUserSelect = "", this._domElement.removeEventListener("pointerdown", o), this._domElement.removeEventListener("pointercancel", a), this._domElement.removeEventListener("wheel", f, {
543
+ this._domElement && (this._domElement.style.touchAction = "", this._domElement.style.userSelect = "", this._domElement.style.webkitUserSelect = "", this._domElement.removeEventListener("pointerdown", o), this._domElement.removeEventListener("pointercancel", a), this._domElement.removeEventListener("wheel", u, {
544
544
  passive: !1
545
545
  }), this._domElement.removeEventListener("contextmenu", m), this._domElement.ownerDocument.removeEventListener(
546
546
  "pointermove",
@@ -557,7 +557,7 @@ class J extends Os {
557
557
  y
558
558
  ));
559
559
  }, this.cancel = () => {
560
- this._state !== d.NONE && (this._state = d.NONE, this._activePointers.length = 0, u());
560
+ this._state !== d.NONE && (this._state = d.NONE, this._activePointers.length = 0, f());
561
561
  }, t && this.connect(t), this.update(0);
562
562
  }
563
563
  /**
@@ -986,12 +986,12 @@ class J extends Os {
986
986
  c.isEmpty() && (console.warn(
987
987
  "camera-controls: fitTo() cannot be used with an empty box. Aborting"
988
988
  ), Promise.resolve());
989
- const f = Ie(this._sphericalEnd.theta, He), m = Ie(this._sphericalEnd.phi, He);
990
- a.push(this.rotateTo(f, m, t));
991
- const v = b.setFromSpherical(this._sphericalEnd).normalize(), p = Ke.setFromUnitVectors(v, we), u = P(Math.abs(v.y), 1);
992
- u && p.multiply(xe.setFromAxisAngle(me, f)), p.multiply(this._yAxisUpSpaceInverse);
989
+ const u = He(this._sphericalEnd.theta, Ie), m = He(this._sphericalEnd.phi, Ie);
990
+ a.push(this.rotateTo(u, m, t));
991
+ const v = b.setFromSpherical(this._sphericalEnd).normalize(), p = Ke.setFromUnitVectors(v, we), f = P(Math.abs(v.y), 1);
992
+ f && p.multiply(xe.setFromAxisAngle(me, u)), p.multiply(this._yAxisUpSpaceInverse);
993
993
  const g = We.makeEmpty();
994
- L.copy(c.min).applyQuaternion(p), g.expandByPoint(L), L.copy(c.min).setX(c.max.x).applyQuaternion(p), g.expandByPoint(L), L.copy(c.min).setY(c.max.y).applyQuaternion(p), g.expandByPoint(L), L.copy(c.max).setZ(c.min.z).applyQuaternion(p), g.expandByPoint(L), L.copy(c.min).setZ(c.max.z).applyQuaternion(p), g.expandByPoint(L), L.copy(c.max).setY(c.min.y).applyQuaternion(p), g.expandByPoint(L), L.copy(c.max).setX(c.min.x).applyQuaternion(p), g.expandByPoint(L), L.copy(c.max).applyQuaternion(p), g.expandByPoint(L), g.min.x -= i, g.min.y -= o, g.max.x += r, g.max.y += n, p.setFromUnitVectors(we, v), u && p.premultiply(xe.invert()), p.premultiply(this._yAxisUpSpace);
994
+ L.copy(c.min).applyQuaternion(p), g.expandByPoint(L), L.copy(c.min).setX(c.max.x).applyQuaternion(p), g.expandByPoint(L), L.copy(c.min).setY(c.max.y).applyQuaternion(p), g.expandByPoint(L), L.copy(c.max).setZ(c.min.z).applyQuaternion(p), g.expandByPoint(L), L.copy(c.min).setZ(c.max.z).applyQuaternion(p), g.expandByPoint(L), L.copy(c.max).setY(c.min.y).applyQuaternion(p), g.expandByPoint(L), L.copy(c.max).setX(c.min.x).applyQuaternion(p), g.expandByPoint(L), L.copy(c.max).applyQuaternion(p), g.expandByPoint(L), g.min.x -= i, g.min.y -= o, g.max.x += r, g.max.y += n, p.setFromUnitVectors(we, v), f && p.premultiply(xe.invert()), p.premultiply(this._yAxisUpSpace);
995
995
  const y = g.getSize(b), l = g.getCenter(L).applyQuaternion(p);
996
996
  if (Y(this._camera)) {
997
997
  const _ = this.getDistanceToFitBox(
@@ -1003,7 +1003,7 @@ class J extends Os {
1003
1003
  a.push(
1004
1004
  this.moveTo(l.x, l.y, l.z, t)
1005
1005
  ), a.push(this.dollyTo(_, t)), a.push(this.setFocalOffset(0, 0, 0, t));
1006
- } else if (I(this._camera)) {
1006
+ } else if (H(this._camera)) {
1007
1007
  const _ = this._camera, O = _.right - _.left, C = _.top - _.bottom, w = s ? Math.max(O / y.x, C / y.y) : Math.min(O / y.x, C / y.y);
1008
1008
  a.push(
1009
1009
  this.moveTo(l.x, l.y, l.z, t)
@@ -1029,7 +1029,7 @@ class J extends Os {
1029
1029
  ), Y(this._camera)) {
1030
1030
  const o = this.getDistanceToFitSphere(r.radius);
1031
1031
  s.push(this.dollyTo(o, t));
1032
- } else if (I(this._camera)) {
1032
+ } else if (H(this._camera)) {
1033
1033
  const o = this._camera.right - this._camera.left, n = this._camera.top - this._camera.bottom, a = 2 * r.radius, c = Math.min(o / a, n / a);
1034
1034
  s.push(this.zoomTo(c, t));
1035
1035
  }
@@ -1052,7 +1052,7 @@ class J extends Os {
1052
1052
  this._targetEnd.copy(a), this._sphericalEnd.setFromVector3(
1053
1053
  c.sub(a).applyQuaternion(this._yAxisUpSpace)
1054
1054
  ), this.normalizeRotations(), this._needsUpdate = !0, n || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
1055
- const f = !n || P(this._target.x, this._targetEnd.x, this.restThreshold) && P(this._target.y, this._targetEnd.y, this.restThreshold) && P(this._target.z, this._targetEnd.z, this.restThreshold) && P(
1055
+ const u = !n || P(this._target.x, this._targetEnd.x, this.restThreshold) && P(this._target.y, this._targetEnd.y, this.restThreshold) && P(this._target.z, this._targetEnd.z, this.restThreshold) && P(
1056
1056
  this._spherical.theta,
1057
1057
  this._sphericalEnd.theta,
1058
1058
  this.restThreshold
@@ -1065,7 +1065,7 @@ class J extends Os {
1065
1065
  this._sphericalEnd.radius,
1066
1066
  this.restThreshold
1067
1067
  );
1068
- return this._createOnRestPromise(f);
1068
+ return this._createOnRestPromise(u);
1069
1069
  }
1070
1070
  /**
1071
1071
  * Similar to setLookAt, but it interpolates between two states.
@@ -1085,13 +1085,13 @@ class J extends Os {
1085
1085
  * @param enableTransition
1086
1086
  * @category Methods
1087
1087
  */
1088
- lerpLookAt(e, t, s, i, r, o, n, a, c, f, m, v, p, u = !1) {
1088
+ lerpLookAt(e, t, s, i, r, o, n, a, c, u, m, v, p, f = !1) {
1089
1089
  this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = K.NONE, this._changedDolly = 0;
1090
1090
  const g = b.set(i, r, o), y = L.set(e, t, s);
1091
1091
  z.setFromVector3(
1092
1092
  y.sub(g).applyQuaternion(this._yAxisUpSpace)
1093
1093
  );
1094
- const l = G.set(f, m, v), _ = L.set(n, a, c);
1094
+ const l = G.set(u, m, v), _ = L.set(n, a, c);
1095
1095
  ae.setFromVector3(
1096
1096
  _.sub(l).applyQuaternion(this._yAxisUpSpace)
1097
1097
  ), this._targetEnd.copy(g.lerp(l, p));
@@ -1100,8 +1100,8 @@ class J extends Os {
1100
1100
  z.radius + w * p,
1101
1101
  z.phi + C * p,
1102
1102
  z.theta + O * p
1103
- ), this.normalizeRotations(), this._needsUpdate = !0, u || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
1104
- const E = !u || P(this._target.x, this._targetEnd.x, this.restThreshold) && P(this._target.y, this._targetEnd.y, this.restThreshold) && P(this._target.z, this._targetEnd.z, this.restThreshold) && P(
1103
+ ), this.normalizeRotations(), this._needsUpdate = !0, f || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
1104
+ const E = !f || P(this._target.x, this._targetEnd.x, this.restThreshold) && P(this._target.y, this._targetEnd.y, this.restThreshold) && P(this._target.z, this._targetEnd.z, this.restThreshold) && P(
1105
1105
  this._spherical.theta,
1106
1106
  this._sphericalEnd.theta,
1107
1107
  this.restThreshold
@@ -1455,10 +1455,10 @@ class J extends Os {
1455
1455
  }
1456
1456
  if (this.dollyToCursor) {
1457
1457
  if (Y(this._camera) && this._changedDolly !== 0) {
1458
- const m = this._spherical.radius - this._lastDistance, v = this._camera, p = this._getCameraDirection(ne), u = b.copy(p).cross(v.up).normalize();
1459
- u.lengthSq() === 0 && (u.x = 1);
1460
- const g = L.crossVectors(u, p), y = this._sphericalEnd.radius * Math.tan(v.getEffectiveFOV() * ie * 0.5), _ = (this._sphericalEnd.radius - m - this._sphericalEnd.radius) / this._sphericalEnd.radius, O = G.copy(this._targetEnd).add(
1461
- u.multiplyScalar(
1458
+ const m = this._spherical.radius - this._lastDistance, v = this._camera, p = this._getCameraDirection(ne), f = b.copy(p).cross(v.up).normalize();
1459
+ f.lengthSq() === 0 && (f.x = 1);
1460
+ const g = L.crossVectors(f, p), y = this._sphericalEnd.radius * Math.tan(v.getEffectiveFOV() * ie * 0.5), _ = (this._sphericalEnd.radius - m - this._sphericalEnd.radius) / this._sphericalEnd.radius, O = G.copy(this._targetEnd).add(
1461
+ f.multiplyScalar(
1462
1462
  this._dollyControlCoord.x * y * v.aspect
1463
1463
  )
1464
1464
  ).add(
@@ -1472,12 +1472,12 @@ class J extends Os {
1472
1472
  this._boundary.clampPoint(C, C);
1473
1473
  const x = L.subVectors(C, this._targetEnd);
1474
1474
  this._targetEnd.copy(C), this._target.add(x), this._changedDolly -= m, S(this._changedDolly) && (this._changedDolly = 0);
1475
- } else if (I(this._camera) && this._changedZoom !== 0) {
1475
+ } else if (H(this._camera) && this._changedZoom !== 0) {
1476
1476
  const m = this._zoom - this._lastZoom, v = this._camera, p = b.set(
1477
1477
  this._dollyControlCoord.x,
1478
1478
  this._dollyControlCoord.y,
1479
1479
  (v.near + v.far) / (v.near - v.far)
1480
- ).unproject(v), u = L.set(0, 0, -1).applyQuaternion(v.quaternion), g = G.copy(p).add(u.multiplyScalar(-p.dot(v.up))), l = -(this._zoom - m - this._zoom) / this._zoom, _ = this._getCameraDirection(ne), O = this._targetEnd.dot(_), C = b.copy(this._targetEnd).lerp(g, l), w = C.dot(_), E = _.multiplyScalar(
1480
+ ).unproject(v), f = L.set(0, 0, -1).applyQuaternion(v.quaternion), g = G.copy(p).add(f.multiplyScalar(-p.dot(v.up))), l = -(this._zoom - m - this._zoom) / this._zoom, _ = this._getCameraDirection(ne), O = this._targetEnd.dot(_), C = b.copy(this._targetEnd).lerp(g, l), w = C.dot(_), E = _.multiplyScalar(
1481
1481
  w - O
1482
1482
  );
1483
1483
  C.sub(E), this._boundary.clampPoint(C, C);
@@ -1492,8 +1492,8 @@ class J extends Os {
1492
1492
  b.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),
1493
1493
  1
1494
1494
  );
1495
- const f = this._needsUpdate;
1496
- return f && !this._updatedLastTime ? (this._hasRested = !1, this.dispatchEvent({ type: "wake" }), this.dispatchEvent({ type: "update" })) : f ? (this.dispatchEvent({ type: "update" }), S(t, this.restThreshold) && S(s, this.restThreshold) && S(i, this.restThreshold) && S(r.x, this.restThreshold) && S(r.y, this.restThreshold) && S(r.z, this.restThreshold) && S(o.x, this.restThreshold) && S(o.y, this.restThreshold) && S(o.z, this.restThreshold) && S(n, this.restThreshold) && !this._hasRested && (this._hasRested = !0, this.dispatchEvent({ type: "rest" }))) : !f && this._updatedLastTime && (this._hasRested || (this._hasRested = !0, this.dispatchEvent({ type: "rest" })), this.dispatchEvent({ type: "sleep" })), this._lastDistance = this._spherical.radius, this._lastZoom = this._zoom, this._updatedLastTime = f, this._needsUpdate = !1, f;
1495
+ const u = this._needsUpdate;
1496
+ return u && !this._updatedLastTime ? (this._hasRested = !1, this.dispatchEvent({ type: "wake" }), this.dispatchEvent({ type: "update" })) : u ? (this.dispatchEvent({ type: "update" }), S(t, this.restThreshold) && S(s, this.restThreshold) && S(i, this.restThreshold) && S(r.x, this.restThreshold) && S(r.y, this.restThreshold) && S(r.z, this.restThreshold) && S(o.x, this.restThreshold) && S(o.y, this.restThreshold) && S(o.z, this.restThreshold) && S(n, this.restThreshold) && !this._hasRested && (this._hasRested = !0, this.dispatchEvent({ type: "rest" }))) : !u && this._updatedLastTime && (this._hasRested || (this._hasRested = !0, this.dispatchEvent({ type: "rest" })), this.dispatchEvent({ type: "sleep" })), this._lastDistance = this._spherical.radius, this._lastZoom = this._zoom, this._updatedLastTime = u, this._needsUpdate = !1, u;
1497
1497
  }
1498
1498
  /**
1499
1499
  * Get all state in JSON string
@@ -1607,7 +1607,7 @@ class J extends Os {
1607
1607
  if (Y(this._camera)) {
1608
1608
  const e = this._camera, t = e.near, s = e.getEffectiveFOV() * ie, i = Math.tan(s * 0.5) * t, r = i * e.aspect;
1609
1609
  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);
1610
- } else if (I(this._camera)) {
1610
+ } else if (H(this._camera)) {
1611
1611
  const e = this._camera, t = 1 / e.zoom, s = e.left * t, i = e.right * t, r = e.top * t, o = e.bottom * t;
1612
1612
  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);
1613
1613
  }
@@ -1702,18 +1702,18 @@ class J extends Os {
1702
1702
  if (!n.geometry) return;
1703
1703
  const a = n.geometry.clone();
1704
1704
  a.applyMatrix4(n.matrixWorld);
1705
- const f = a.attributes.position;
1706
- for (let m = 0, v = f.count; m < v; m++)
1707
- b.fromBufferAttribute(f, m), r = Math.max(r, i.distanceToSquared(b));
1705
+ const u = a.attributes.position;
1706
+ for (let m = 0, v = u.count; m < v; m++)
1707
+ b.fromBufferAttribute(u, m), r = Math.max(r, i.distanceToSquared(b));
1708
1708
  }), s.radius = Math.sqrt(r), s;
1709
1709
  }
1710
1710
  }
1711
1711
  var Se = { exports: {} }, Q = typeof Reflect == "object" ? Reflect : null, $e = Q && typeof Q.apply == "function" ? Q.apply : function(e, t, s) {
1712
1712
  return Function.prototype.apply.call(e, t, s);
1713
- }, ue;
1714
- Q && typeof Q.ownKeys == "function" ? ue = Q.ownKeys : Object.getOwnPropertySymbols ? ue = function(e) {
1713
+ }, fe;
1714
+ Q && typeof Q.ownKeys == "function" ? fe = Q.ownKeys : Object.getOwnPropertySymbols ? fe = function(e) {
1715
1715
  return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
1716
- } : ue = function(e) {
1716
+ } : fe = function(e) {
1717
1717
  return Object.getOwnPropertyNames(e);
1718
1718
  };
1719
1719
  function Ts(h) {
@@ -1781,8 +1781,8 @@ A.prototype.emit = function(e) {
1781
1781
  if (typeof a == "function")
1782
1782
  $e(a, this, t);
1783
1783
  else
1784
- for (var c = a.length, f = Et(a, c), s = 0; s < c; ++s)
1785
- $e(f[s], this, t);
1784
+ for (var c = a.length, u = Et(a, c), s = 0; s < c; ++s)
1785
+ $e(u[s], this, t);
1786
1786
  return !0;
1787
1787
  };
1788
1788
  function yt(h, e, t, s) {
@@ -1890,7 +1890,7 @@ function Ot(h) {
1890
1890
  return 0;
1891
1891
  }
1892
1892
  A.prototype.eventNames = function() {
1893
- return this._eventsCount > 0 ? ue(this._events) : [];
1893
+ return this._eventsCount > 0 ? fe(this._events) : [];
1894
1894
  };
1895
1895
  function Et(h, e) {
1896
1896
  for (var t = new Array(e), s = 0; s < e; ++s)
@@ -1953,11 +1953,11 @@ class Ss {
1953
1953
  antialias: n,
1954
1954
  powerPreference: a,
1955
1955
  toneMappingExposure: c,
1956
- outputColorSpace: f,
1956
+ outputColorSpace: u,
1957
1957
  logarithmicDepthBuffer: m,
1958
1958
  preserveDrawingBuffer: v,
1959
1959
  stencil: p,
1960
- depth: u
1960
+ depth: f
1961
1961
  } = i, g = new Ut({
1962
1962
  alpha: r,
1963
1963
  antialias: n,
@@ -1965,9 +1965,9 @@ class Ss {
1965
1965
  logarithmicDepthBuffer: m,
1966
1966
  preserveDrawingBuffer: v,
1967
1967
  stencil: p,
1968
- depth: u
1968
+ depth: f
1969
1969
  });
1970
- g.setSize(t, s), g.setPixelRatio(o), g.toneMappingExposure = c, g.outputColorSpace = f, this.renderer = g;
1970
+ g.setSize(t, s), g.setPixelRatio(o), g.toneMappingExposure = c, g.outputColorSpace = u, this.renderer = g;
1971
1971
  }
1972
1972
  setSize(e, t) {
1973
1973
  this.renderer.setSize(e, t);
@@ -2075,7 +2075,7 @@ const wt = {
2075
2075
  fov: 45,
2076
2076
  near: 1,
2077
2077
  far: 1e3,
2078
- up: new H(0, 1, 0)
2078
+ up: new I(0, 1, 0)
2079
2079
  };
2080
2080
  class Us extends ee {
2081
2081
  constructor(e) {
@@ -2202,7 +2202,7 @@ class Fs {
2202
2202
  else if (e.isSpotLight)
2203
2203
  i = new jt(e);
2204
2204
  else if (e.isHemisphereLight)
2205
- i = new Ht(e, 10);
2205
+ i = new It(e, 10);
2206
2206
  else if (e.isRectAreaLight)
2207
2207
  i = new hs(e);
2208
2208
  else {
@@ -2273,7 +2273,7 @@ class Ns extends ee {
2273
2273
  super(), this.autoRotateSpeed = 0, this.options = e;
2274
2274
  const t = {
2275
2275
  Vector2: B,
2276
- Vector3: H,
2276
+ Vector3: I,
2277
2277
  Vector4: Bt,
2278
2278
  Quaternion: lt,
2279
2279
  Matrix4: W,
@@ -2312,7 +2312,7 @@ class Ns extends ee {
2312
2312
  });
2313
2313
  }
2314
2314
  update(e, t) {
2315
- super.update(e, t), this.autoRotateSpeed && this.cameraControls && (this.cameraControls.azimuthAngle += this.autoRotateSpeed * e * It.DEG2RAD);
2315
+ super.update(e, t), this.autoRotateSpeed && this.cameraControls && (this.cameraControls.azimuthAngle += this.autoRotateSpeed * e * Ht.DEG2RAD);
2316
2316
  }
2317
2317
  }
2318
2318
  class js {
@@ -2384,7 +2384,7 @@ class js {
2384
2384
  this.event.removeAllListeners(), (e = this.controls) == null || e.dispose();
2385
2385
  }
2386
2386
  }
2387
- const Xe = new H(), Hs = new lt(), qe = new H(), j = new W(), Is = new W();
2387
+ const Xe = new I(), Is = new lt(), qe = new I(), j = new W(), Hs = new W();
2388
2388
  class Bs {
2389
2389
  /**
2390
2390
  * Constructs a new CSS3D renderer.
@@ -2401,8 +2401,8 @@ class Bs {
2401
2401
  a.style.overflow = "hidden", this.domElement = a;
2402
2402
  const c = document.createElement("div");
2403
2403
  c.style.transformOrigin = "0 0", c.style.pointerEvents = "none", a.appendChild(c);
2404
- const f = document.createElement("div");
2405
- f.style.transformStyle = "preserve-3d", c.appendChild(f), this.getSize = function() {
2404
+ const u = document.createElement("div");
2405
+ u.style.transformStyle = "preserve-3d", c.appendChild(u), this.getSize = function() {
2406
2406
  return {
2407
2407
  width: s,
2408
2408
  height: i
@@ -2413,9 +2413,9 @@ class Bs {
2413
2413
  let O, C;
2414
2414
  l.isOrthographicCamera && (O = -(l.right + l.left) / 2, C = (l.top + l.bottom) / 2);
2415
2415
  const w = l.view && l.view.enabled ? l.view.height / l.view.fullHeight : 1, E = l.isOrthographicCamera ? `scale( ${w} )scale(` + _ + ")translate(" + m(O) + "px," + m(C) + "px)" + v(l.matrixWorldInverse) : `scale( ${w} )translateZ(` + _ + "px)" + v(l.matrixWorldInverse), R = (l.isPerspectiveCamera ? "perspective(" + _ + "px) " : "") + E + "translate(" + r + "px," + o + "px)";
2416
- n.camera.style !== R && (f.style.transform = R, n.camera.style = R), g(y, y, l);
2416
+ n.camera.style !== R && (u.style.transform = R, n.camera.style = R), g(y, y, l);
2417
2417
  }, this.setSize = function(y, l) {
2418
- s = y, i = l, r = s / 2, o = i / 2, a.style.width = y + "px", a.style.height = l + "px", c.style.width = y + "px", c.style.height = l + "px", f.style.width = y + "px", f.style.height = l + "px";
2418
+ s = y, i = l, r = s / 2, o = i / 2, a.style.width = y + "px", a.style.height = l + "px", c.style.width = y + "px", c.style.height = l + "px", u.style.width = y + "px", u.style.height = l + "px";
2419
2419
  };
2420
2420
  function m(y) {
2421
2421
  return Math.abs(y) < 1e-10 ? 0 : y;
@@ -2428,14 +2428,14 @@ class Bs {
2428
2428
  const l = y.elements;
2429
2429
  return "translate(-50%,-50%)" + ("matrix3d(" + m(l[0]) + "," + m(l[1]) + "," + m(l[2]) + "," + m(l[3]) + "," + m(-l[4]) + "," + m(-l[5]) + "," + m(-l[6]) + "," + m(-l[7]) + "," + m(l[8]) + "," + m(l[9]) + "," + m(l[10]) + "," + m(l[11]) + "," + m(l[12]) + "," + m(l[13]) + "," + m(l[14]) + "," + m(l[15]) + ")");
2430
2430
  }
2431
- function u(y) {
2431
+ function f(y) {
2432
2432
  y.isCSS3DObject && (y.element.style.display = "none");
2433
2433
  for (let l = 0, _ = y.children.length; l < _; l++)
2434
- u(y.children[l]);
2434
+ f(y.children[l]);
2435
2435
  }
2436
2436
  function g(y, l, _, O) {
2437
2437
  if (y.visible === !1) {
2438
- u(y);
2438
+ f(y);
2439
2439
  return;
2440
2440
  }
2441
2441
  if (y.isCSS3DObject) {
@@ -2443,14 +2443,14 @@ class Bs {
2443
2443
  if (w.style.display = C === !0 ? "" : "none", C === !0) {
2444
2444
  y.onBeforeRender(t, l, _);
2445
2445
  let E;
2446
- y.isCSS3DSprite ? (j.copy(_.matrixWorldInverse), j.transpose(), y.rotation2D !== 0 && j.multiply(Is.makeRotationZ(y.rotation2D)), y.matrixWorld.decompose(Xe, Hs, qe), j.setPosition(Xe), j.scale(qe), j.elements[3] = 0, j.elements[7] = 0, j.elements[11] = 0, j.elements[15] = 1, E = p(j)) : E = p(y.matrixWorld);
2446
+ y.isCSS3DSprite ? (j.copy(_.matrixWorldInverse), j.transpose(), y.rotation2D !== 0 && j.multiply(Hs.makeRotationZ(y.rotation2D)), y.matrixWorld.decompose(Xe, Is, qe), j.setPosition(Xe), j.scale(qe), j.elements[3] = 0, j.elements[7] = 0, j.elements[11] = 0, j.elements[15] = 1, E = p(j)) : E = p(y.matrixWorld);
2447
2447
  const x = n.objects.get(y);
2448
2448
  if (x === void 0 || x.style !== E) {
2449
2449
  w.style.transform = E;
2450
2450
  const R = { style: E };
2451
2451
  n.objects.set(y, R);
2452
2452
  }
2453
- w.parentNode !== f && f.appendChild(w), y.onAfterRender(t, l, _);
2453
+ w.parentNode !== u && u.appendChild(w), y.onAfterRender(t, l, _);
2454
2454
  }
2455
2455
  }
2456
2456
  for (let C = 0, w = y.children.length; C < w; C++)
@@ -2458,7 +2458,7 @@ class Bs {
2458
2458
  }
2459
2459
  }
2460
2460
  }
2461
- const q = new H(), Qe = new W(), Je = new W(), et = new H(), tt = new H();
2461
+ const q = new I(), Qe = new W(), Je = new W(), et = new I(), tt = new I();
2462
2462
  class Vs {
2463
2463
  /**
2464
2464
  * Constructs a new CSS2D renderer.
@@ -2476,44 +2476,44 @@ class Vs {
2476
2476
  width: s,
2477
2477
  height: i
2478
2478
  };
2479
- }, this.render = function(u, g) {
2480
- u.matrixWorldAutoUpdate === !0 && u.updateMatrixWorld(), g.parent === null && g.matrixWorldAutoUpdate === !0 && g.updateMatrixWorld(), Qe.copy(g.matrixWorldInverse), Je.multiplyMatrices(g.projectionMatrix, Qe), f(u, u, g), p(u);
2481
- }, this.setSize = function(u, g) {
2482
- s = u, i = g, r = s / 2, o = i / 2, a.style.width = u + "px", a.style.height = g + "px";
2479
+ }, this.render = function(f, g) {
2480
+ f.matrixWorldAutoUpdate === !0 && f.updateMatrixWorld(), g.parent === null && g.matrixWorldAutoUpdate === !0 && g.updateMatrixWorld(), Qe.copy(g.matrixWorldInverse), Je.multiplyMatrices(g.projectionMatrix, Qe), u(f, f, g), p(f);
2481
+ }, this.setSize = function(f, g) {
2482
+ s = f, i = g, r = s / 2, o = i / 2, a.style.width = f + "px", a.style.height = g + "px";
2483
2483
  };
2484
- function c(u) {
2485
- u.isCSS2DObject && (u.element.style.display = "none");
2486
- for (let g = 0, y = u.children.length; g < y; g++)
2487
- c(u.children[g]);
2484
+ function c(f) {
2485
+ f.isCSS2DObject && (f.element.style.display = "none");
2486
+ for (let g = 0, y = f.children.length; g < y; g++)
2487
+ c(f.children[g]);
2488
2488
  }
2489
- function f(u, g, y) {
2490
- if (u.visible === !1) {
2491
- c(u);
2489
+ function u(f, g, y) {
2490
+ if (f.visible === !1) {
2491
+ c(f);
2492
2492
  return;
2493
2493
  }
2494
- if (u.isCSS2DObject) {
2495
- q.setFromMatrixPosition(u.matrixWorld), q.applyMatrix4(Je);
2496
- const l = q.z >= -1 && q.z <= 1 && u.layers.test(y.layers) === !0, _ = u.element;
2497
- _.style.display = l === !0 ? "" : "none", l === !0 && (u.onBeforeRender(t, g, y), _.style.transform = "translate(" + -100 * u.center.x + "%," + -100 * u.center.y + "%)translate(" + (q.x * r + r) + "px," + (-q.y * o + o) + "px)", _.parentNode !== a && a.appendChild(_), u.onAfterRender(t, g, y));
2494
+ if (f.isCSS2DObject) {
2495
+ q.setFromMatrixPosition(f.matrixWorld), q.applyMatrix4(Je);
2496
+ const l = q.z >= -1 && q.z <= 1 && f.layers.test(y.layers) === !0, _ = f.element;
2497
+ _.style.display = l === !0 ? "" : "none", l === !0 && (f.onBeforeRender(t, g, y), _.style.transform = "translate(" + -100 * f.center.x + "%," + -100 * f.center.y + "%)translate(" + (q.x * r + r) + "px," + (-q.y * o + o) + "px)", _.parentNode !== a && a.appendChild(_), f.onAfterRender(t, g, y));
2498
2498
  const O = {
2499
- distanceToCameraSquared: m(y, u)
2499
+ distanceToCameraSquared: m(y, f)
2500
2500
  };
2501
- n.objects.set(u, O);
2501
+ n.objects.set(f, O);
2502
2502
  }
2503
- for (let l = 0, _ = u.children.length; l < _; l++)
2504
- f(u.children[l], g, y);
2503
+ for (let l = 0, _ = f.children.length; l < _; l++)
2504
+ u(f.children[l], g, y);
2505
2505
  }
2506
- function m(u, g) {
2507
- return et.setFromMatrixPosition(u.matrixWorld), tt.setFromMatrixPosition(g.matrixWorld), et.distanceToSquared(tt);
2506
+ function m(f, g) {
2507
+ return et.setFromMatrixPosition(f.matrixWorld), tt.setFromMatrixPosition(g.matrixWorld), et.distanceToSquared(tt);
2508
2508
  }
2509
- function v(u) {
2509
+ function v(f) {
2510
2510
  const g = [];
2511
- return u.traverseVisible(function(y) {
2511
+ return f.traverseVisible(function(y) {
2512
2512
  y.isCSS2DObject && g.push(y);
2513
2513
  }), g;
2514
2514
  }
2515
- function p(u) {
2516
- const g = v(u).sort(function(l, _) {
2515
+ function p(f) {
2516
+ const g = v(f).sort(function(l, _) {
2517
2517
  if (l.renderOrder !== _.renderOrder)
2518
2518
  return _.renderOrder - l.renderOrder;
2519
2519
  const O = n.objects.get(l).distanceToCameraSquared, C = n.objects.get(_).distanceToCameraSquared;
@@ -2642,7 +2642,7 @@ const Zs = {
2642
2642
  }`
2643
2643
  )
2644
2644
  };
2645
- class Ws extends us {
2645
+ class Ws extends fs {
2646
2646
  constructor() {
2647
2647
  super();
2648
2648
  const e = Zs;
@@ -2655,7 +2655,7 @@ class Ws extends us {
2655
2655
  }
2656
2656
  }
2657
2657
  const Ks = (h) => {
2658
- const e = new fs(
2658
+ const e = new us(
2659
2659
  new Gt({
2660
2660
  uniforms: {
2661
2661
  baseTexture: { value: null },
@@ -2702,7 +2702,7 @@ const Ks = (h) => {
2702
2702
  }), Qs = new dt({
2703
2703
  color: "black",
2704
2704
  sizeAttenuation: !1
2705
- }), Js = new ut({
2705
+ }), Js = new ft({
2706
2706
  color: "black",
2707
2707
  sizeAttenuation: 0,
2708
2708
  lineWidth: 0
@@ -2729,23 +2729,23 @@ class ii {
2729
2729
  composerParams: r
2730
2730
  } = e, { renderer: o } = t;
2731
2731
  this.renderer = o;
2732
- const { multisampling: n } = r, { maxSamples: a } = o.capabilities, c = o.getDrawingBufferSize(new B()), f = new Qt(
2732
+ const { multisampling: n } = r, { maxSamples: a } = o.capabilities, c = o.getDrawingBufferSize(new B()), u = new Qt(
2733
2733
  c.width,
2734
2734
  c.height,
2735
2735
  {
2736
2736
  samples: Math.min(n, a),
2737
2737
  type: Jt
2738
2738
  }
2739
- ), m = new ke(o, f), v = this.getSize();
2739
+ ), m = new ke(o, u), v = this.getSize();
2740
2740
  m.setSize(v.width, v.height);
2741
2741
  const p = new ms(
2742
2742
  s.scene,
2743
2743
  i.camera
2744
2744
  );
2745
- m.addPass(p), this.scene = s.scene, this.camera = i.camera, this.finalComposer = m, this.renderPass = p, i.event.on("pageChange", (u) => {
2746
- this.changeCamera(u);
2747
- }), s.event.on("pageChange", (u) => {
2748
- this.changeScene(u);
2745
+ m.addPass(p), this.scene = s.scene, this.camera = i.camera, this.finalComposer = m, this.renderPass = p, i.event.on("pageChange", (f) => {
2746
+ this.changeCamera(f);
2747
+ }), s.event.on("pageChange", (f) => {
2748
+ this.changeScene(f);
2749
2749
  });
2750
2750
  }
2751
2751
  changeCamera(e) {
@@ -2810,7 +2810,7 @@ class ii {
2810
2810
  s.traverse((i) => {
2811
2811
  var a;
2812
2812
  const r = i, o = i, n = i;
2813
- (a = r.material) != null && a.isShadowMaterial ? e.push(r) : r.material && this.bloomLayer.test(r.layers) === !1 && (this.bloomMaterials[r.uuid] = r.material, o.isSprite ? o.material.sizeAttenuation ? o.material = qs : o.material = Qs : r.material instanceof ut ? r.material = Js : n.isPoints ? n.material.sizeAttenuation ? n.material = Xs : n.material = Gs : r.material = $s);
2813
+ (a = r.material) != null && a.isShadowMaterial ? e.push(r) : r.material && this.bloomLayer.test(r.layers) === !1 && (this.bloomMaterials[r.uuid] = r.material, o.isSprite ? o.material.sizeAttenuation ? o.material = qs : o.material = Qs : r.material instanceof ft ? r.material = Js : n.isPoints ? n.material.sizeAttenuation ? n.material = Xs : n.material = Gs : r.material = $s);
2814
2814
  });
2815
2815
  }), e.forEach((s) => {
2816
2816
  this.bloomVisible[s.uuid] = s.visible, s.visible = !1;
@@ -2863,22 +2863,22 @@ class it extends mt {
2863
2863
  }
2864
2864
  load(e, t, s, i) {
2865
2865
  let r, o;
2866
- this.options.type === "image" ? (o = document.createElement("img"), r = new fe(o)) : this.options.type === "video" ? (o = document.createElement("video"), o.preload = "auto", o.autoplay = !1, o.loop = !1, o.muted = !0, o.setAttribute("webkit-playsinline", "webkit-playsinline"), o.setAttribute("playsinline", ""), r = new pt(o)) : r = new fe();
2866
+ this.options.type === "image" ? (o = document.createElement("img"), r = new ue(o)) : this.options.type === "video" ? (o = document.createElement("video"), o.preload = "auto", o.autoplay = !1, o.loop = !1, o.muted = !0, o.setAttribute("webkit-playsinline", "webkit-playsinline"), o.setAttribute("playsinline", ""), r = new pt(o)) : r = new ue();
2867
2867
  const n = new Ae(this.manager);
2868
2868
  return n.setResponseType("blob"), n.setRequestHeader(this.requestHeader), n.setPath(this.path), n.setWithCredentials(this.withCredentials), n.load(
2869
2869
  e,
2870
2870
  (a) => {
2871
2871
  let c = a;
2872
- const f = e.split(".").pop(), m = this.options.type === "image" ? `image/${f || "png"}` : `video/${f || "mp4"}`;
2872
+ const u = e.split(".").pop(), m = this.options.type === "image" ? `image/${u || "png"}` : `video/${u || "mp4"}`;
2873
2873
  c = c.slice(0, a.size, m);
2874
2874
  const v = () => {
2875
- o.removeEventListener("load", p, !1), o.removeEventListener("error", u, !1);
2875
+ o.removeEventListener("load", p, !1), o.removeEventListener("error", f, !1);
2876
2876
  }, p = () => {
2877
2877
  v(), r.needsUpdate = !0, t && t(r);
2878
- }, u = (y) => {
2878
+ }, f = (y) => {
2879
2879
  v(), i && i(y), this.manager.itemError(e), this.manager.itemEnd(e);
2880
2880
  };
2881
- o.addEventListener("load", p, !1), o.addEventListener("error", u, !1);
2881
+ o.addEventListener("load", p, !1), o.addEventListener("error", f, !1);
2882
2882
  const g = window.URL.createObjectURL(c);
2883
2883
  o.src = g;
2884
2884
  },
@@ -2946,7 +2946,7 @@ class ni {
2946
2946
  const s = this.assets.get(e);
2947
2947
  if (!s) {
2948
2948
  if ((t === "images" || t === "media" || t === "exr") && this.options.simpleTexture4deleted && this.delLoadArr.includes(e))
2949
- return new fe();
2949
+ return new ue();
2950
2950
  console.warn(`Asset ${e} not found`);
2951
2951
  }
2952
2952
  return s;
@@ -2999,7 +2999,7 @@ class ni {
2999
2999
  get textureAssets() {
3000
3000
  const e = /* @__PURE__ */ new Map();
3001
3001
  return this.assets.forEach((t, s) => {
3002
- (t instanceof fe || t instanceof ts || t instanceof pt) && e.set(s, t);
3002
+ (t instanceof ue || t instanceof ts || t instanceof pt) && e.set(s, t);
3003
3003
  }), e;
3004
3004
  }
3005
3005
  loadAll() {
@@ -3027,8 +3027,8 @@ class ni {
3027
3027
  const c = yield o.loadAsync(e);
3028
3028
  if (this.assets.set(e, c), r.resolve(c), s === "images" || s === "media" || s === "exr" || s === "lottie") {
3029
3029
  (t == null ? void 0 : t.colorCorrection) !== !1 && ns({ texture: c });
3030
- const f = (a = t == null ? void 0 : t.anisotropy) != null ? a : this.options.anisotropy;
3031
- c.anisotropy = f;
3030
+ const u = (a = t == null ? void 0 : t.anisotropy) != null ? a : this.options.anisotropy;
3031
+ c.anisotropy = u;
3032
3032
  }
3033
3033
  return c;
3034
3034
  } catch (c) {
@@ -3054,8 +3054,8 @@ class ni {
3054
3054
  a.aoMap
3055
3055
  ].forEach((c) => {
3056
3056
  if (c) {
3057
- const f = this.getSrcByAsset(c, s);
3058
- f && t.add(f);
3057
+ const u = this.getSrcByAsset(c, s);
3058
+ u && t.add(u);
3059
3059
  }
3060
3060
  });
3061
3061
  });
@@ -3123,20 +3123,20 @@ class hi {
3123
3123
  this.activeObjects.clear(), this.objCallbackMap.clear(), this.activeObject = null;
3124
3124
  const a = this.objCallbackMap;
3125
3125
  for (const p of n)
3126
- for (const u of p.objArr) {
3127
- if (!u.object3d || !u.visibleWithAncestors) continue;
3128
- a.has(u) || a.set(u, /* @__PURE__ */ new Map());
3129
- const g = a.get(u);
3126
+ for (const f of p.objArr) {
3127
+ if (!f.object3d || !f.visibleWithAncestors) continue;
3128
+ a.has(f) || a.set(f, /* @__PURE__ */ new Map());
3129
+ const g = a.get(f);
3130
3130
  g.has(p.type) || g.set(p.type, []), g.get(p.type).push(p.cb);
3131
3131
  }
3132
3132
  if (a.size === 0) return;
3133
3133
  const c = [...a.keys()].map((p) => p.object3d);
3134
3134
  console.time(`Pick:listener:${e}:pick`);
3135
- const f = (v = this.pencil.pick(r, c, !0)) == null ? void 0 : v.intersects;
3136
- if (console.timeEnd(`Pick:listener:${e}:pick`), !f || f.length === 0)
3135
+ const u = (v = this.pencil.pick(r, c, !0)) == null ? void 0 : v.intersects;
3136
+ if (console.timeEnd(`Pick:listener:${e}:pick`), !u || u.length === 0)
3137
3137
  e === "down" ? this.handleDownOutside(r) : e === "move" && this.handleLeaveEvents(r);
3138
3138
  else {
3139
- const p = f[0];
3139
+ const p = u[0];
3140
3140
  this.processIntersection(p, r, e);
3141
3141
  }
3142
3142
  const m = this.prevActiveObjects;
@@ -3178,9 +3178,9 @@ class hi {
3178
3178
  sp: o,
3179
3179
  intersectionIndex: s
3180
3180
  });
3181
- const f = a.get("move");
3182
- if (f)
3183
- for (const m of f)
3181
+ const u = a.get("move");
3182
+ if (u)
3183
+ for (const m of u)
3184
3184
  m({
3185
3185
  baseObject: n,
3186
3186
  realBaseObject: this.activeObject,
@@ -3199,14 +3199,14 @@ class hi {
3199
3199
  sp: o,
3200
3200
  intersectionIndex: s
3201
3201
  });
3202
- const f = a.get("click");
3203
- if (f) {
3202
+ const u = a.get("click");
3203
+ if (u) {
3204
3204
  const m = (v) => {
3205
3205
  v.preventDefault();
3206
3206
  const p = 5;
3207
3207
  if (!r && Math.abs(v.clientX - e.clientX) <= p && Math.abs(v.clientY - e.clientY) <= p)
3208
- for (const u of f)
3209
- u({
3208
+ for (const f of u)
3209
+ f({
3210
3210
  baseObject: n,
3211
3211
  realBaseObject: this.activeObject,
3212
3212
  mouseEvent: e,
@@ -3268,8 +3268,8 @@ class hi {
3268
3268
  baseObject: a,
3269
3269
  mouseEvent: m
3270
3270
  }));
3271
- }, f = `pointer${t}`;
3272
- a.element.addEventListener(f, rt(c), !1), o.push({ arr: a, type: f, listener: c });
3271
+ }, u = `pointer${t}`;
3272
+ a.element.addEventListener(u, rt(c), !1), o.push({ arr: a, type: u, listener: c });
3273
3273
  }
3274
3274
  return this.pickNodeFunctionsMap.set(i, o), i;
3275
3275
  }
@@ -3291,7 +3291,7 @@ class hi {
3291
3291
  }
3292
3292
  class ci extends hi {
3293
3293
  constructor(e, t) {
3294
- super(e), this.objMap = /* @__PURE__ */ new Map(), this.objects = /* @__PURE__ */ new Map(), this.objectsPm = /* @__PURE__ */ new Map(), this.objectNamesToFactories = /* @__PURE__ */ new Map(), this.mList = t.mList, this.scene = this.createBaseObject(t.scene || new nt(), {
3294
+ super(e), this.objMap = /* @__PURE__ */ new Map(), this.objects = /* @__PURE__ */ new Map(), this.objectsPm = /* @__PURE__ */ new Map(), this.objectWrapChindIdMap = /* @__PURE__ */ new Map(), this.objectNamesToFactories = /* @__PURE__ */ new Map(), this.mList = t.mList, this.scene = this.createBaseObject(t.scene || new nt(), {
3295
3295
  key: "@Scene",
3296
3296
  name: "场景",
3297
3297
  mList: !1
@@ -3317,10 +3317,15 @@ class ci extends hi {
3317
3317
  if (i.object3d = e, i.pencil = this.pencil, i.lead = this, i.mList = this.mList, s.key)
3318
3318
  i.key = s.key;
3319
3319
  else if (s.target) {
3320
- const r = s.target.key, o = s.target.children.length;
3321
- i.key = `${r}__c__${o}`;
3320
+ const r = s.target.key, o = this.objectWrapChindIdMap.get(s.target) ? this.objectWrapChindIdMap.get(s.target) + 1 : 0;
3321
+ this.objectWrapChindIdMap.set(s.target, o), i.key = `${r}__c__${o}`;
3322
3322
  }
3323
- return s.name && (e.name = s.name), s.target && s.target.object3d.add(i.object3d), this.objects.set(i.key, i), this.objMap.set(i.object3d, i), this.pencil.options.mList && s.mList && (this.mList.proxyBaseObject(i), this.mList.addBaseObjectMap(i)), i;
3323
+ return s.name && (e.name = s.name), s.target && s.target.object3d.add(i.object3d), this.objects.set(i.key, i), this.objMap.set(i.object3d, i), this.pencil.options.mList && s.mList && (this.mList.proxyBaseObject(i), this.mList.addBaseObjectMap(i)), e.children && e.children.forEach((r) => {
3324
+ this.createBaseObject(r, {
3325
+ target: i,
3326
+ mList: s.mList
3327
+ });
3328
+ }), i;
3324
3329
  }
3325
3330
  init(e) {
3326
3331
  return Object.keys(e).forEach((t) => {
@@ -3350,18 +3355,18 @@ class ci extends hi {
3350
3355
  const i = this.objectNamesToFactories.get(e);
3351
3356
  if (i) {
3352
3357
  t || (t = {}), t.target === void 0 && (t.target = s);
3353
- const c = t.target, f = (r = t.onTop) != null ? r : 0, m = (o = t.prefab) != null ? o : !1, v = (n = t.create) != null ? n : !0, p = new i().create(t);
3354
- let u;
3355
- return c === null ? u = null : typeof c == "string" ? u = this.objects.get(c) : (a = c == null ? void 0 : c.objectType) != null && a.startsWith("BaseObject") || c ? u = c : m ? u = this.prefabGroup : u = this.group, v === !1 ? p.create = () => {
3358
+ const c = t.target, u = (r = t.onTop) != null ? r : 0, m = (o = t.prefab) != null ? o : !1, v = (n = t.create) != null ? n : !0, p = new i().create(t);
3359
+ let f;
3360
+ return c === null ? f = null : typeof c == "string" ? f = this.objects.get(c) : (a = c == null ? void 0 : c.objectType) != null && a.startsWith("BaseObject") || c ? f = c : m ? f = this.prefabGroup : f = this.group, v === !1 ? p.create = () => {
3356
3361
  } : v !== !0 && (p.create = () => {
3357
3362
  v(p);
3358
3363
  }), p.pencil = this.pencil, p.lead = this, p.mList = this.mList, p.prefab = m, p.objectType = `BaseObject#${e}`, p.objectOptions = t, this.setBaseObjectKey(
3359
3364
  p,
3360
3365
  t.key ? `$t:#${t.key}` : "$t:",
3361
- u == null ? void 0 : u.key
3366
+ f == null ? void 0 : f.key
3362
3367
  ), this.objectsPm.set(
3363
3368
  p,
3364
- this.addBaseObject(p, u, f)
3369
+ this.addBaseObject(p, f, u)
3365
3370
  ), yield this.objectsPm.get(p), this.objectsPm.delete(p), p;
3366
3371
  }
3367
3372
  throw new Error(`Unrecognized:${e}`);
@@ -3393,13 +3398,10 @@ class ci extends hi {
3393
3398
  return se(this, null, function* () {
3394
3399
  if (yield e.create(), e.object3d) {
3395
3400
  const i = e.object3d;
3396
- i.material && Array.isArray(i.material) && (i.material = i.material.slice()), this.pencil.options.mList && (this.mList.proxyBaseObject(e), this.mList.addBaseObjectMap(e)), s && e.setTop(s), t !== null && (t.object3d.add(e.object3d), this.objMap.set(e.object3d, e)), i.traverse((r) => {
3397
- if (r !== i && !this.objMap.get(r)) {
3398
- const o = r.parent;
3399
- this.createBaseObject(r, {
3400
- target: this.objMap.get(o)
3401
- });
3402
- }
3401
+ i.material && Array.isArray(i.material) && (i.material = i.material.slice()), this.pencil.options.mList && (this.mList.proxyBaseObject(e), this.mList.addBaseObjectMap(e)), s && e.setTop(s), t !== null && t.object3d.add(e.object3d), this.objMap.set(e.object3d, e), i.children.forEach((r) => {
3402
+ this.objMap.get(r) || this.createBaseObject(r, {
3403
+ target: e
3404
+ });
3403
3405
  });
3404
3406
  }
3405
3407
  e.render(), this.pencil.event.emit("lead.draw", { baseObject: e });
@@ -3442,7 +3444,7 @@ class ci extends hi {
3442
3444
  dispose() {
3443
3445
  super.dispose(), this.scene.erase(), this.objects.forEach((e) => {
3444
3446
  e.erase();
3445
- }), this.objects.clear(), this.objectsPm.clear(), this.objMap.clear(), this.objectNamesToFactories.clear();
3447
+ }), this.objects.clear(), this.objectsPm.clear(), this.objMap.clear(), this.objectWrapChindIdMap.clear(), this.objectNamesToFactories.clear();
3446
3448
  }
3447
3449
  }
3448
3450
  class di extends ee {
@@ -3572,19 +3574,22 @@ class mi {
3572
3574
  [...this.materials.entries()].some(([t, s]) => s === e ? (this.remove(t), !0) : !1);
3573
3575
  }
3574
3576
  proxyBaseObject(e) {
3575
- const t = e.object3d, s = (o) => {
3577
+ const t = e.object3d;
3578
+ if (!t.material)
3579
+ return;
3580
+ const s = (o) => {
3576
3581
  if (o.hasOwnProperty("__isProxy"))
3577
3582
  return o;
3578
3583
  const n = new Proxy(o, {
3579
- set: (a, c, f) => {
3584
+ set: (a, c, u) => {
3580
3585
  if (typeof c == "string" && !isNaN(Number(c))) {
3581
3586
  const m = Number(c);
3582
3587
  if (m >= 0 && m < a.length) {
3583
3588
  const v = a[m];
3584
- return this.rmBaseObjectMap(e, v), a[m] = f, f && this.addBaseObjectMap(e), !0;
3589
+ return this.rmBaseObjectMap(e, v), a[m] = u, u && this.addBaseObjectMap(e), !0;
3585
3590
  }
3586
3591
  }
3587
- return a[c] = f, !0;
3592
+ return a[c] = u, !0;
3588
3593
  }
3589
3594
  });
3590
3595
  return Object.defineProperty(n, "__isProxy", {
@@ -3651,14 +3656,14 @@ class mi {
3651
3656
  }
3652
3657
  addBaseObjectMap(e) {
3653
3658
  const t = e.object3d;
3654
- [...Object.values(e.materialList), t.material].forEach(
3659
+ t.material && ([...Object.values(e.materialList), t.material].forEach(
3655
3660
  (s) => {
3656
3661
  s && this.material2array(s).forEach((r) => {
3657
3662
  const o = this.materialBaseObjectMap.get(r);
3658
3663
  o ? o.add(e) : this.materialBaseObjectMap.set(r, /* @__PURE__ */ new Set([e]));
3659
3664
  });
3660
3665
  }
3661
- ), this.pencil.event.emit("mList.addBaseObjectMap");
3666
+ ), this.pencil.event.emit("mList.addBaseObjectMap"));
3662
3667
  }
3663
3668
  rmBaseObjectMap(e, t, s = !0) {
3664
3669
  const i = t && this.material2array(t);
@@ -3711,7 +3716,7 @@ class pi extends ee {
3711
3716
  const _e = class _e {
3712
3717
  constructor(e) {
3713
3718
  var r, o;
3714
- this.raycaster = new ht(), 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 ss(), this.userData = {}, this.pageActiveIndex = 0, this.pageCountIndex = 0, this.userSetDprCache = 1, this.viewPadding = [0, 0, 0, 0], this.event.setMaxListeners(1 / 0), (o = (r = this.timer).connect) == null || o.call(r, document), this.options = is(_e.options, e, {
3719
+ this.raycaster = new ht(), this.maxBackufferArea = 5760 * 5760, this.installPlugins = /* @__PURE__ */ new Map(), this._cameraPositon = new I(), this._cameraTarget = new I(), this.event = new ye.EventEmitter(), this.timer = new ss(), this.userData = {}, this.pageActiveIndex = 0, this.pageCountIndex = 0, this.userSetDprCache = 1, this.viewPadding = [0, 0, 0, 0], this.event.setMaxListeners(1 / 0), (o = (r = this.timer).connect) == null || o.call(r, document), this.options = is(_e.options, e, {
3715
3720
  isMergeableObject: as
3716
3721
  }), this.userSetDprCache = this.options.renderer.devicePixelRatio;
3717
3722
  const {
@@ -3797,7 +3802,7 @@ const _e = class _e {
3797
3802
  renderer: r,
3798
3803
  controls: o,
3799
3804
  loader: n
3800
- } = this.options, { width: a, height: c } = this.getSize(), f = t ? new Rs({
3805
+ } = this.options, { width: a, height: c } = this.getSize(), u = t ? new Rs({
3801
3806
  width: a,
3802
3807
  height: c,
3803
3808
  renderer: t.WebGPURenderer,
@@ -3813,18 +3818,18 @@ const _e = class _e {
3813
3818
  height: c
3814
3819
  }), v = new ks({}), p = new Ns({
3815
3820
  controlsParams: {
3816
- domElement: (_ = o == null ? void 0 : o.domElement) != null ? _ : f.renderer.domElement
3821
+ domElement: (_ = o == null ? void 0 : o.domElement) != null ? _ : u.renderer.domElement
3817
3822
  }
3818
- }), u = new li({
3823
+ }), f = new li({
3819
3824
  loaderParams: U({
3820
- anisotropy: f.renderer.capabilities.getMaxAnisotropy()
3825
+ anisotropy: u.renderer.capabilities.getMaxAnisotropy()
3821
3826
  }, n)
3822
3827
  }), g = new pi({
3823
3828
  pencil: this
3824
3829
  }), y = new di({
3825
3830
  pencil: this
3826
3831
  });
3827
- this.sceneController = v, this.cameraController = m, this.controlsController = p, this.rendererController = f, this.loaderController = u, this.mListController = g, this.leadController = y;
3832
+ this.sceneController = v, this.cameraController = m, this.controlsController = p, this.rendererController = u, this.loaderController = f, this.mListController = g, this.leadController = y;
3828
3833
  const l = this.addPage({
3829
3834
  sceneOptions: this.options.scene,
3830
3835
  cameraOptions: this.options.camera
@@ -3837,7 +3842,7 @@ const _e = class _e {
3837
3842
  });
3838
3843
  O.add(v.scene), this.helperController = O, i && O.addViewHelper();
3839
3844
  }
3840
- e.appendChild(f.renderer.domElement);
3845
+ e.appendChild(u.renderer.domElement);
3841
3846
  }
3842
3847
  initComposer() {
3843
3848
  const {
@@ -3907,10 +3912,10 @@ const _e = class _e {
3907
3912
  cssRendererController: n,
3908
3913
  leadController: a
3909
3914
  } = this, c = this.renderer.getSize(new B());
3910
- c.x === e && c.y === t || (r.setSize(e, t), i.setSize(e, t), o == null || o.setSize(e, t), n == null || n.setSize(e, t), a.setSize(e, t), this.installPlugins.forEach((f) => {
3915
+ c.x === e && c.y === t || (r.setSize(e, t), i.setSize(e, t), o == null || o.setSize(e, t), n == null || n.setSize(e, t), a.setSize(e, t), this.installPlugins.forEach((u) => {
3911
3916
  var m;
3912
- (m = f.setSize) == null || m.call(f, e, t);
3913
- }), this.viewPadding.some((f) => f !== 0) && this.setViewPadding(...this.viewPadding), this.render(), s && this.event.emit("resize", { width: e, height: t }));
3917
+ (m = u.setSize) == null || m.call(u, e, t);
3918
+ }), this.viewPadding.some((u) => u !== 0) && this.setViewPadding(...this.viewPadding), this.render(), s && this.event.emit("resize", { width: e, height: t }));
3914
3919
  }
3915
3920
  setDevicePixelRatio(e) {
3916
3921
  var n;
@@ -3960,8 +3965,8 @@ const _e = class _e {
3960
3965
  this.timer.update(), Ce.update();
3961
3966
  const e = this.timer.getDelta(), t = this.timer.getElapsed();
3962
3967
  this.controlsController.update(e, t), this.leadController.update(e, t), this.installPlugins.forEach((c) => {
3963
- var f;
3964
- (f = c.update) == null || f.call(c, e, t);
3968
+ var u;
3969
+ (u = c.update) == null || u.call(c, e, t);
3965
3970
  }), (s = this.helperController) == null || s.update(
3966
3971
  e,
3967
3972
  this.controlsController,
@@ -4004,11 +4009,11 @@ const _e = class _e {
4004
4009
  }
4005
4010
  }
4006
4011
  dispose() {
4007
- var e, t, s, i, r, o, n, a, c, f, m, v, p, u;
4012
+ var e, t, s, i, r, o, n, a, c, u, m, v, p, f;
4008
4013
  this.stop(), this.timer.dispose(), Ce.removeAll(), this.event.removeAllListeners(), (e = this.resizeObserver) == null || e.unobserve(this.options.container), this.installPlugins.forEach((g) => {
4009
4014
  var y;
4010
4015
  (y = g.dispose) == null || y.call(g);
4011
- }), (t = this.controlsController) == null || t.dispose(), (s = this.transformController) == null || s.dispose(), (i = this.cssRendererController) == null || i.dispose(), (r = this.sceneController) == null || r.dispose(), (o = this.cameraController) == null || o.dispose(), (n = this.helperController) == null || n.dispose(), (a = this.composerController) == null || a.dispose(), (c = this.rendererController) == null || c.dispose(), (f = this.loaderController) == null || f.dispose(), (m = this.leadController) == null || m.dispose(), (v = this.mListController) == null || v.dispose(), this.cssRendererController = void 0, this.installPlugins.clear(), (p = this.stats) == null || p.dom.remove(), (u = this.renderer) == null || u.domElement.remove();
4016
+ }), (t = this.controlsController) == null || t.dispose(), (s = this.transformController) == null || s.dispose(), (i = this.cssRendererController) == null || i.dispose(), (r = this.sceneController) == null || r.dispose(), (o = this.cameraController) == null || o.dispose(), (n = this.helperController) == null || n.dispose(), (a = this.composerController) == null || a.dispose(), (c = this.rendererController) == null || c.dispose(), (u = this.loaderController) == null || u.dispose(), (m = this.leadController) == null || m.dispose(), (v = this.mListController) == null || v.dispose(), this.cssRendererController = void 0, this.installPlugins.clear(), (p = this.stats) == null || p.dom.remove(), (f = this.renderer) == null || f.domElement.remove();
4012
4017
  }
4013
4018
  };
4014
4019
  _e.options = {