gl-draw 0.17.0-beta.24 → 0.17.0-beta.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,15 @@
1
- var Pt = Object.defineProperty, At = Object.defineProperties;
2
- var St = Object.getOwnPropertyDescriptors;
3
- var Me = Object.getOwnPropertySymbols;
1
+ var Pt = Object.defineProperty, St = Object.defineProperties;
2
+ var At = Object.getOwnPropertyDescriptors;
3
+ var De = Object.getOwnPropertySymbols;
4
4
  var Mt = Object.prototype.hasOwnProperty, Dt = Object.prototype.propertyIsEnumerable;
5
- var De = (c, e, t) => e in c ? Pt(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t, U = (c, e) => {
5
+ var Re = (c, e, t) => e in c ? Pt(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t, U = (c, e) => {
6
6
  for (var t in e || (e = {}))
7
- Mt.call(e, t) && De(c, t, e[t]);
8
- if (Me)
9
- for (var t of Me(e))
10
- Dt.call(e, t) && De(c, t, e[t]);
7
+ Mt.call(e, t) && Re(c, t, e[t]);
8
+ if (De)
9
+ for (var t of De(e))
10
+ Dt.call(e, t) && Re(c, t, e[t]);
11
11
  return c;
12
- }, te = (c, e) => At(c, St(e));
12
+ }, te = (c, e) => St(c, At(e));
13
13
  var se = (c, e, t) => new Promise((s, i) => {
14
14
  var r = (a) => {
15
15
  try {
@@ -26,11 +26,11 @@ var se = (c, 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(c, e)).next());
28
28
  });
29
- import * as Ce from "@tweenjs/tween.js";
29
+ import * as Oe from "@tweenjs/tween.js";
30
30
  import Rt from "deepmerge";
31
31
  import Ut from "stats-gl";
32
- import { Vector3 as I, PerspectiveCamera as kt, Matrix4 as W, ShaderMaterial as zt, UniformsUtils as Ft, RawShaderMaterial as Nt, MeshBasicMaterial as jt, PointsMaterial as ot, SpriteMaterial as nt, Color as It, Layers as Ht, Vector2 as B, WebGLRenderTarget as Bt, HalfFloatType as Vt, MathUtils as Yt, Vector4 as Zt, Quaternion as at, Spherical as Wt, Box3 as lt, Sphere as Kt, Raycaster as ht, AxesHelper as Re, CameraHelper as $t, PointLightHelper as Gt, DirectionalLightHelper as Xt, SpotLightHelper as qt, HemisphereLightHelper as Qt, Box3Helper as Ue, Scene as ct, Group as ke, Camera as Jt, Loader as dt, FileLoader as Ae, 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
- import { M as pt, B as as, a as ls, R as Pe, I as he } from "./index.module2.js";
32
+ import { Vector3 as I, PerspectiveCamera as kt, Matrix4 as W, ShaderMaterial as zt, UniformsUtils as Ft, RawShaderMaterial as jt, MeshBasicMaterial as Nt, PointsMaterial as ot, SpriteMaterial as nt, Color as It, Layers as Ht, Vector2 as B, WebGLRenderTarget as Bt, HalfFloatType as Vt, MathUtils as Yt, Vector4 as Zt, Quaternion as at, Spherical as Wt, Box3 as lt, Sphere as Kt, Raycaster as ht, AxesHelper as Ue, CameraHelper as $t, PointLightHelper as Gt, DirectionalLightHelper as Xt, SpotLightHelper as qt, HemisphereLightHelper as Qt, Box3Helper as ke, Scene as ct, Group as Ce, Camera as Jt, Loader as dt, FileLoader as Ae, 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
+ import { M as pt, B as as, a as ls, R as Se, I as he } from "./index.module2.js";
34
34
  import { EffectComposer as ze } from "three/examples/jsm/postprocessing/EffectComposer";
35
35
  import { RenderPass as hs } from "three/examples/jsm/postprocessing/RenderPass";
36
36
  import { SSAOPass as cs } from "three/examples/jsm/postprocessing/SSAOPass";
@@ -51,11 +51,11 @@ import { FullScreenQuad as Fe } from "three/examples/jsm/postprocessing/Pass";
51
51
  import { RectAreaLightHelper as us } from "three/examples/jsm/helpers/RectAreaLightHelper";
52
52
  import { ViewHelper as fs } from "three/examples/jsm/helpers/ViewHelper";
53
53
  import { generateUUID as _s, makePromiseCreator as gs } from "esus-lite";
54
- import { DRACOLoader as ys } from "three/examples/jsm/loaders/DRACOLoader";
55
- import { EXRLoader as vs } from "three/examples/jsm/loaders/EXRLoader";
56
- import { GLTFLoader as Ne } from "three/examples/jsm/loaders/GLTFLoader";
57
- import { LottieLoader as Cs } from "three/examples/jsm/loaders/LottieLoader";
58
- import { a as Os, C as Es, i as Ts } from "./isPlainObject.module.js";
54
+ import { DRACOLoader as vs } from "three/examples/jsm/loaders/DRACOLoader";
55
+ import { EXRLoader as ys } from "three/examples/jsm/loaders/EXRLoader";
56
+ import { GLTFLoader as je } from "three/examples/jsm/loaders/GLTFLoader";
57
+ import { LottieLoader as Os } from "three/examples/jsm/loaders/LottieLoader";
58
+ import { a as Cs, C as Es, i as Ts } from "./isPlainObject.module.js";
59
59
  import { TransformControls as bs } from "three/examples/jsm/controls/TransformControls";
60
60
  const M = {
61
61
  LEFT: 1,
@@ -94,15 +94,15 @@ function Y(c) {
94
94
  function H(c) {
95
95
  return c.isOrthographicCamera;
96
96
  }
97
- const $ = Math.PI * 2, je = Math.PI / 2, mt = 1e-5, ie = Math.PI / 180;
97
+ const $ = Math.PI * 2, Ne = Math.PI / 2, mt = 1e-5, ie = Math.PI / 180;
98
98
  function z(c, e, t) {
99
99
  return Math.max(e, Math.min(t, c));
100
100
  }
101
- function S(c, e = mt) {
101
+ function A(c, e = mt) {
102
102
  return Math.abs(c) < e;
103
103
  }
104
104
  function P(c, e, t = mt) {
105
- return S(c - e, t);
105
+ return A(c - e, t);
106
106
  }
107
107
  function Ie(c, e) {
108
108
  return Math.round(c / e) * e;
@@ -119,32 +119,32 @@ function ce(c, e, t, s, i = 1 / 0, r) {
119
119
  let h = c - e;
120
120
  const m = e, p = i * s;
121
121
  h = z(h, -p, p), e = c - h;
122
- const v = (t.value + o * h) * r;
123
- t.value = (t.value - o * v) * a;
124
- let _ = e + (h + v) * a;
125
- return m - c > 0 == _ > m && (_ = m, t.value = (_ - m) / r), _;
122
+ const y = (t.value + o * h) * r;
123
+ t.value = (t.value - o * y) * a;
124
+ let f = e + (h + y) * a;
125
+ return m - c > 0 == f > m && (f = m, t.value = (f - m) / r), f;
126
126
  }
127
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
- let m = e.x, p = e.y, v = e.z, _ = c.x - m, u = c.y - p, g = c.z - v;
131
- const y = m, l = p, f = v, O = i * s, C = O * O, b = _ * _ + u * u + g * g;
132
- if (b > C) {
133
- const ve = Math.sqrt(b);
134
- _ = _ / ve * O, u = u / ve * O, g = g / ve * O;
135
- }
136
- m = c.x - _, p = c.y - u, v = c.z - g;
137
- const E = (t.x + n * _) * r, x = (t.y + n * u) * r, D = (t.z + n * g) * r;
138
- t.x = (t.x - n * E) * h, t.y = (t.y - n * x) * h, t.z = (t.z - n * D) * h, o.x = m + (_ + E) * h, o.y = p + (u + x) * h, o.z = v + (g + D) * h;
139
- const V = y - c.x, le = l - c.y, bt = f - c.z, wt = o.x - y, xt = o.y - l, Lt = o.z - f;
140
- return V * wt + le * xt + bt * Lt > 0 && (o.x = y, o.y = l, o.z = f, t.x = (o.x - y) / r, t.y = (o.y - l) / r, t.z = (o.z - f) / r), o;
130
+ let m = e.x, p = e.y, y = e.z, f = c.x - m, u = c.y - p, g = c.z - y;
131
+ const v = m, l = p, _ = y, C = i * s, O = C * C, b = f * f + u * u + g * g;
132
+ if (b > O) {
133
+ const ye = Math.sqrt(b);
134
+ f = f / ye * C, u = u / ye * C, g = g / ye * C;
135
+ }
136
+ m = c.x - f, p = c.y - u, y = c.z - g;
137
+ const E = (t.x + n * f) * r, x = (t.y + n * u) * r, D = (t.z + n * g) * r;
138
+ t.x = (t.x - n * E) * h, t.y = (t.y - n * x) * h, t.z = (t.z - n * D) * h, o.x = m + (f + E) * h, o.y = p + (u + x) * h, o.z = y + (g + D) * h;
139
+ const V = v - c.x, le = l - c.y, bt = _ - c.z, wt = o.x - v, xt = o.y - l, Lt = o.z - _;
140
+ return V * wt + le * xt + bt * Lt > 0 && (o.x = v, o.y = l, o.z = _, t.x = (o.x - v) / r, t.y = (o.y - l) / r, t.z = (o.z - _) / r), o;
141
141
  }
142
- function Oe(c, e) {
142
+ function Ee(c, e) {
143
143
  e.set(0, 0), c.forEach((t) => {
144
144
  e.x += t.clientX, e.y += t.clientY;
145
145
  }), e.x /= c.length, e.y /= c.length;
146
146
  }
147
- function Ee(c, e) {
147
+ function Te(c, e) {
148
148
  return H(c) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
149
149
  }
150
150
  class ws {
@@ -212,10 +212,10 @@ class ws {
212
212
  }
213
213
  }
214
214
  const de = 1 / 8, xs = /Mac/.test(navigator.platform);
215
- let T, Be, pe, Te, R, w, L, G, ne, F, N, Z, Ve, Ye, k, ae, X, Ze, be, We, we, xe, me;
215
+ let T, Be, pe, be, R, w, L, G, ne, F, j, Z, Ve, Ye, k, ae, X, Ze, we, We, xe, Le, me;
216
216
  class J extends ws {
217
217
  static install(e) {
218
- T = e.THREE, Be = Object.freeze(new T.Vector3(0, 0, 0)), pe = Object.freeze(new T.Vector3(0, 1, 0)), Te = Object.freeze(new T.Vector3(0, 0, 1)), R = new T.Vector2(), w = new T.Vector3(), L = new T.Vector3(), G = new T.Vector3(), ne = new T.Vector3(), F = new T.Vector3(), N = new T.Vector3(), Z = new T.Vector3(), Ve = new T.Vector3(), Ye = new T.Vector3(), k = new T.Spherical(), ae = new T.Spherical(), X = new T.Box3(), Ze = new T.Box3(), be = new T.Sphere(), We = new T.Quaternion(), we = new T.Quaternion(), xe = new T.Matrix4(), me = new T.Raycaster();
218
+ T = e.THREE, Be = Object.freeze(new T.Vector3(0, 0, 0)), pe = Object.freeze(new T.Vector3(0, 1, 0)), be = Object.freeze(new T.Vector3(0, 0, 1)), R = new T.Vector2(), w = new T.Vector3(), L = new T.Vector3(), G = new T.Vector3(), ne = new T.Vector3(), F = new T.Vector3(), j = new T.Vector3(), Z = new T.Vector3(), Ve = new T.Vector3(), Ye = new T.Vector3(), k = new T.Spherical(), ae = new T.Spherical(), X = new T.Box3(), Ze = new T.Box3(), we = new T.Sphere(), We = new T.Quaternion(), xe = new T.Quaternion(), Le = new T.Matrix4(), me = new T.Raycaster();
219
219
  }
220
220
  /**
221
221
  * list all ACTIONs
@@ -243,40 +243,40 @@ class J extends ws {
243
243
  */
244
244
  constructor(e, t) {
245
245
  super(), this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.minDistance = Number.EPSILON, this.maxDistance = 1 / 0, this.infinityDolly = !1, this.minZoom = 0.01, this.maxZoom = 1 / 0, this.smoothTime = 0.25, this.draggingSmoothTime = 0.125, this.maxSpeed = 1 / 0, this.azimuthRotateSpeed = 1, this.polarRotateSpeed = 1, this.dollySpeed = 1, this.dollyDragInverted = !1, this.truckSpeed = 2, this.dollyToCursor = !1, this.dragToOffset = !1, this.boundaryFriction = 0, this.restThreshold = 0.01, this.colliderMeshes = [], this.cancel = () => {
246
- }, this._enabled = !0, this._state = d.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = K.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new T.Vector3(), this._focalOffsetVelocity = new T.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (l, f, O, C) => {
246
+ }, this._enabled = !0, this._state = d.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = K.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new T.Vector3(), this._focalOffsetVelocity = new T.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (l, _, C, O) => {
247
247
  let b, E;
248
248
  if (Y(this._camera)) {
249
249
  const x = w.copy(this._camera.position).sub(this._target), D = this._camera.getEffectiveFOV() * ie, V = x.length() * Math.tan(D * 0.5);
250
- b = this.truckSpeed * l * V / this._elementRect.height, E = this.truckSpeed * f * V / this._elementRect.height;
250
+ b = this.truckSpeed * l * V / this._elementRect.height, E = this.truckSpeed * _ * V / this._elementRect.height;
251
251
  } else if (H(this._camera)) {
252
252
  const x = this._camera;
253
- b = this.truckSpeed * l * (x.right - x.left) / x.zoom / this._elementRect.width, E = this.truckSpeed * f * (x.top - x.bottom) / x.zoom / this._elementRect.height;
253
+ b = this.truckSpeed * l * (x.right - x.left) / x.zoom / this._elementRect.width, E = this.truckSpeed * _ * (x.top - x.bottom) / x.zoom / this._elementRect.height;
254
254
  } else
255
255
  return;
256
- C ? (O ? this.setFocalOffset(
256
+ O ? (C ? this.setFocalOffset(
257
257
  this._focalOffsetEnd.x + b,
258
258
  this._focalOffsetEnd.y,
259
259
  this._focalOffsetEnd.z,
260
260
  !0
261
- ) : this.truck(b, 0, !0), this.forward(-E, !0)) : O ? this.setFocalOffset(
261
+ ) : this.truck(b, 0, !0), this.forward(-E, !0)) : C ? this.setFocalOffset(
262
262
  this._focalOffsetEnd.x + b,
263
263
  this._focalOffsetEnd.y + E,
264
264
  this._focalOffsetEnd.z,
265
265
  !0
266
266
  ) : this.truck(b, E, !0);
267
- }, this._rotateInternal = (l, f) => {
268
- const O = $ * this.azimuthRotateSpeed * l / this._elementRect.height, C = $ * this.polarRotateSpeed * f / this._elementRect.height;
269
- this.rotate(O, C, !0);
270
- }, this._dollyInternal = (l, f, O) => {
271
- const C = Math.pow(0.95, -l * this.dollySpeed), b = this._sphericalEnd.radius, E = this._sphericalEnd.radius * C, x = z(
267
+ }, this._rotateInternal = (l, _) => {
268
+ const C = $ * this.azimuthRotateSpeed * l / this._elementRect.height, O = $ * this.polarRotateSpeed * _ / this._elementRect.height;
269
+ this.rotate(C, O, !0);
270
+ }, this._dollyInternal = (l, _, C) => {
271
+ const O = Math.pow(0.95, -l * this.dollySpeed), b = this._sphericalEnd.radius, E = this._sphericalEnd.radius * O, x = z(
272
272
  E,
273
273
  this.minDistance,
274
274
  this.maxDistance
275
275
  ), D = x - E;
276
- this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(E, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(D, !0), this._dollyToNoClamp(x, !0)) : this._dollyToNoClamp(x, !0), this.dollyToCursor && (this._changedDolly += (this.infinityDolly ? E : x) - b, this._dollyControlCoord.set(f, O)), this._lastDollyDirection = Math.sign(-l);
277
- }, this._zoomInternal = (l, f, O) => {
278
- const C = Math.pow(0.95, l * this.dollySpeed), b = this._zoom, E = this._zoom * C;
279
- this.zoomTo(E, !0), this.dollyToCursor && (this._changedZoom += E - b, this._dollyControlCoord.set(f, O));
276
+ this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(E, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(D, !0), this._dollyToNoClamp(x, !0)) : this._dollyToNoClamp(x, !0), this.dollyToCursor && (this._changedDolly += (this.infinityDolly ? E : x) - b, this._dollyControlCoord.set(_, C)), this._lastDollyDirection = Math.sign(-l);
277
+ }, this._zoomInternal = (l, _, C) => {
278
+ const O = Math.pow(0.95, l * this.dollySpeed), b = this._zoom, E = this._zoom * O;
279
+ this.zoomTo(E, !0), this.dollyToCursor && (this._changedZoom += E - b, this._dollyControlCoord.set(_, C));
280
280
  }, typeof T == "undefined" && console.error(
281
281
  "camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."
282
282
  ), this._camera = e, this._yAxisUpSpace = new T.Quaternion().setFromUnitVectors(
@@ -305,26 +305,26 @@ class J extends ws {
305
305
  const s = new T.Vector2(), i = new T.Vector2(), r = new T.Vector2(), o = (l) => {
306
306
  if (!this._enabled || !this._domElement) return;
307
307
  if (this._interactiveArea.left !== 0 || this._interactiveArea.top !== 0 || this._interactiveArea.width !== 1 || this._interactiveArea.height !== 1) {
308
- const C = this._domElement.getBoundingClientRect(), b = (l.clientX - C.left) / (C.right - C.left), E = (l.clientY - C.top) / (C.bottom - C.top);
308
+ const O = this._domElement.getBoundingClientRect(), b = (l.clientX - O.left) / (O.right - O.left), E = (l.clientY - O.top) / (O.bottom - O.top);
309
309
  if (b < this._interactiveArea.left || b > this._interactiveArea.right || E < this._interactiveArea.top || E > this._interactiveArea.bottom)
310
310
  return;
311
311
  }
312
- const f = l.pointerType !== "mouse" ? null : (l.buttons & M.LEFT) === M.LEFT ? M.LEFT : (l.buttons & M.MIDDLE) === M.MIDDLE ? M.MIDDLE : (l.buttons & M.RIGHT) === M.RIGHT ? M.RIGHT : null;
313
- if (f !== null) {
314
- const C = this._findPointerByMouseButton(f);
315
- C && this._disposePointer(C);
312
+ const _ = l.pointerType !== "mouse" ? null : (l.buttons & M.LEFT) === M.LEFT ? M.LEFT : (l.buttons & M.MIDDLE) === M.MIDDLE ? M.MIDDLE : (l.buttons & M.RIGHT) === M.RIGHT ? M.RIGHT : null;
313
+ if (_ !== null) {
314
+ const O = this._findPointerByMouseButton(_);
315
+ O && this._disposePointer(O);
316
316
  }
317
317
  if ((l.buttons & M.LEFT) === M.LEFT && this._lockedPointer)
318
318
  return;
319
- const O = {
319
+ const C = {
320
320
  pointerId: l.pointerId,
321
321
  clientX: l.clientX,
322
322
  clientY: l.clientY,
323
323
  deltaX: 0,
324
324
  deltaY: 0,
325
- mouseButton: f
325
+ mouseButton: _
326
326
  };
327
- this._activePointers.push(O), this._domElement.ownerDocument.removeEventListener(
327
+ this._activePointers.push(C), this._domElement.ownerDocument.removeEventListener(
328
328
  "pointermove",
329
329
  n,
330
330
  { passive: !1 }
@@ -335,12 +335,12 @@ class J extends ws {
335
335
  "pointermove",
336
336
  n,
337
337
  { passive: !1 }
338
- ), this._domElement.ownerDocument.addEventListener("pointerup", a), this._isDragging = !0, v(l);
338
+ ), this._domElement.ownerDocument.addEventListener("pointerup", a), this._isDragging = !0, y(l);
339
339
  }, n = (l) => {
340
340
  l.cancelable && l.preventDefault();
341
- const f = l.pointerId, O = this._lockedPointer || this._findPointerById(f);
342
- if (O) {
343
- if (O.clientX = l.clientX, O.clientY = l.clientY, O.deltaX = l.movementX, O.deltaY = l.movementY, this._state = 0, l.pointerType === "touch")
341
+ const _ = l.pointerId, C = this._lockedPointer || this._findPointerById(_);
342
+ if (C) {
343
+ if (C.clientX = l.clientX, C.clientY = l.clientY, C.deltaX = l.movementX, C.deltaY = l.movementY, this._state = 0, l.pointerType === "touch")
344
344
  switch (this._activePointers.length) {
345
345
  case 1:
346
346
  this._state = this.touches.one;
@@ -354,12 +354,12 @@ class J extends ws {
354
354
  }
355
355
  else
356
356
  (!this._isDragging && this._lockedPointer || this._isDragging && (l.buttons & M.LEFT) === M.LEFT) && (this._state = this._state | this.mouseButtons.left), this._isDragging && (l.buttons & M.MIDDLE) === M.MIDDLE && (this._state = this._state | this.mouseButtons.middle), this._isDragging && (l.buttons & M.RIGHT) === M.RIGHT && (this._state = this._state | this.mouseButtons.right);
357
- _();
357
+ f();
358
358
  }
359
359
  }, a = (l) => {
360
- const f = this._findPointerById(l.pointerId);
361
- if (!(f && f === this._lockedPointer)) {
362
- if (f && this._disposePointer(f), l.pointerType === "touch")
360
+ const _ = this._findPointerById(l.pointerId);
361
+ if (!(_ && _ === this._lockedPointer)) {
362
+ if (_ && this._disposePointer(_), l.pointerType === "touch")
363
363
  switch (this._activePointers.length) {
364
364
  case 0:
365
365
  this._state = d.NONE;
@@ -391,7 +391,7 @@ class J extends ws {
391
391
  const E = performance.now();
392
392
  h - E < 1e3 && this._getClientRect(this._elementRect), h = E;
393
393
  }
394
- const f = xs ? -1 : -3, O = l.deltaMode === 1 || l.ctrlKey ? l.deltaY / f : l.deltaY / (f * 10), C = this.dollyToCursor ? (l.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, b = this.dollyToCursor ? (l.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
394
+ const _ = xs ? -1 : -3, C = l.deltaMode === 1 || l.ctrlKey ? l.deltaY / _ : l.deltaY / (_ * 10), O = this.dollyToCursor ? (l.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, b = this.dollyToCursor ? (l.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
395
395
  switch (this.mouseButtons.wheel) {
396
396
  case d.ROTATE: {
397
397
  this._rotateInternal(l.deltaX, l.deltaY), this._isUserControllingRotate = !0;
@@ -410,11 +410,11 @@ class J extends ws {
410
410
  break;
411
411
  }
412
412
  case d.DOLLY: {
413
- this._dollyInternal(-O, C, b), this._isUserControllingDolly = !0;
413
+ this._dollyInternal(-C, O, b), this._isUserControllingDolly = !0;
414
414
  break;
415
415
  }
416
416
  case d.ZOOM: {
417
- this._zoomInternal(-O, C, b), this._isUserControllingZoom = !0;
417
+ this._zoomInternal(-C, O, b), this._isUserControllingZoom = !0;
418
418
  break;
419
419
  }
420
420
  }
@@ -422,8 +422,8 @@ class J extends ws {
422
422
  }, p = (l) => {
423
423
  if (!(!this._domElement || !this._enabled)) {
424
424
  if (this.mouseButtons.right === J.ACTION.NONE) {
425
- const f = l instanceof PointerEvent ? l.pointerId : 0, O = this._findPointerById(f);
426
- O && this._disposePointer(O), this._domElement.ownerDocument.removeEventListener(
425
+ const _ = l instanceof PointerEvent ? l.pointerId : 0, C = this._findPointerById(_);
426
+ C && this._disposePointer(C), this._domElement.ownerDocument.removeEventListener(
427
427
  "pointermove",
428
428
  n,
429
429
  { passive: !1 }
@@ -435,10 +435,10 @@ class J extends ws {
435
435
  }
436
436
  l.preventDefault();
437
437
  }
438
- }, v = (l) => {
438
+ }, y = (l) => {
439
439
  if (!this._enabled) return;
440
- if (Oe(this._activePointers, R), this._getClientRect(this._elementRect), s.copy(R), i.copy(R), this._activePointers.length >= 2) {
441
- const O = R.x - this._activePointers[1].clientX, C = R.y - this._activePointers[1].clientY, b = Math.sqrt(O * O + C * C);
440
+ if (Ee(this._activePointers, R), this._getClientRect(this._elementRect), s.copy(R), i.copy(R), this._activePointers.length >= 2) {
441
+ const C = R.x - this._activePointers[1].clientX, O = R.y - this._activePointers[1].clientY, b = Math.sqrt(C * C + O * O);
442
442
  r.set(0, b);
443
443
  const E = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, x = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
444
444
  i.set(E, x);
@@ -460,18 +460,18 @@ class J extends ws {
460
460
  else
461
461
  !this._lockedPointer && (l.buttons & M.LEFT) === M.LEFT && (this._state = this._state | this.mouseButtons.left), (l.buttons & M.MIDDLE) === M.MIDDLE && (this._state = this._state | this.mouseButtons.middle), (l.buttons & M.RIGHT) === M.RIGHT && (this._state = this._state | this.mouseButtons.right);
462
462
  ((this._state & d.ROTATE) === d.ROTATE || (this._state & d.TOUCH_ROTATE) === d.TOUCH_ROTATE || (this._state & d.TOUCH_DOLLY_ROTATE) === d.TOUCH_DOLLY_ROTATE || (this._state & d.TOUCH_ZOOM_ROTATE) === d.TOUCH_ZOOM_ROTATE) && (this._sphericalEnd.theta = this._spherical.theta, this._sphericalEnd.phi = this._spherical.phi, this._thetaVelocity.value = 0, this._phiVelocity.value = 0), ((this._state & d.TRUCK) === d.TRUCK || (this._state & d.SCREEN_PAN) === d.SCREEN_PAN || (this._state & d.TOUCH_TRUCK) === d.TOUCH_TRUCK || (this._state & d.TOUCH_SCREEN_PAN) === d.TOUCH_SCREEN_PAN || (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_ZOOM_TRUCK) === d.TOUCH_ZOOM_TRUCK || (this._state & d.TOUCH_ZOOM_SCREEN_PAN) === d.TOUCH_DOLLY_SCREEN_PAN) && (this._targetEnd.copy(this._target), this._targetVelocity.set(0, 0, 0)), ((this._state & d.DOLLY) === d.DOLLY || (this._state & d.TOUCH_DOLLY) === d.TOUCH_DOLLY || (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._state & d.TOUCH_DOLLY_ROTATE) === d.TOUCH_DOLLY_ROTATE) && (this._sphericalEnd.radius = this._spherical.radius, this._radiusVelocity.value = 0), ((this._state & d.ZOOM) === d.ZOOM || (this._state & d.TOUCH_ZOOM) === d.TOUCH_ZOOM || (this._state & d.TOUCH_ZOOM_TRUCK) === d.TOUCH_ZOOM_TRUCK || (this._state & d.TOUCH_ZOOM_SCREEN_PAN) === d.TOUCH_ZOOM_SCREEN_PAN || (this._state & d.TOUCH_ZOOM_OFFSET) === d.TOUCH_ZOOM_OFFSET || (this._state & d.TOUCH_ZOOM_ROTATE) === d.TOUCH_ZOOM_ROTATE) && (this._zoomEnd = this._zoom, this._zoomVelocity.value = 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._focalOffsetEnd.copy(this._focalOffset), this._focalOffsetVelocity.set(0, 0, 0)), this.dispatchEvent({ type: "controlstart" });
463
- }, _ = () => {
463
+ }, f = () => {
464
464
  if (!this._enabled || !this._dragNeedsUpdate) return;
465
- this._dragNeedsUpdate = !1, Oe(this._activePointers, R);
466
- const f = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, O = f ? -f.deltaX : i.x - R.x, C = f ? -f.deltaY : i.y - R.y;
467
- if (i.copy(R), ((this._state & d.ROTATE) === d.ROTATE || (this._state & d.TOUCH_ROTATE) === d.TOUCH_ROTATE || (this._state & d.TOUCH_DOLLY_ROTATE) === d.TOUCH_DOLLY_ROTATE || (this._state & d.TOUCH_ZOOM_ROTATE) === d.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(O, C), this._isUserControllingRotate = !0), (this._state & d.DOLLY) === d.DOLLY || (this._state & d.ZOOM) === d.ZOOM) {
465
+ this._dragNeedsUpdate = !1, Ee(this._activePointers, R);
466
+ const _ = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, C = _ ? -_.deltaX : i.x - R.x, O = _ ? -_.deltaY : i.y - R.y;
467
+ if (i.copy(R), ((this._state & d.ROTATE) === d.ROTATE || (this._state & d.TOUCH_ROTATE) === d.TOUCH_ROTATE || (this._state & d.TOUCH_DOLLY_ROTATE) === d.TOUCH_DOLLY_ROTATE || (this._state & d.TOUCH_ZOOM_ROTATE) === d.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(C, O), this._isUserControllingRotate = !0), (this._state & d.DOLLY) === d.DOLLY || (this._state & d.ZOOM) === d.ZOOM) {
468
468
  const b = this.dollyToCursor ? (s.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, E = this.dollyToCursor ? (s.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, x = this.dollyDragInverted ? -1 : 1;
469
469
  (this._state & d.DOLLY) === d.DOLLY ? (this._dollyInternal(
470
- x * C * de,
470
+ x * O * de,
471
471
  b,
472
472
  E
473
473
  ), this._isUserControllingDolly = !0) : (this._zoomInternal(
474
- x * C * de,
474
+ x * O * de,
475
475
  b,
476
476
  E
477
477
  ), this._isUserControllingZoom = !0);
@@ -482,9 +482,9 @@ class J extends ws {
482
482
  const V = this.dollyToCursor ? (i.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, le = this.dollyToCursor ? (i.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
483
483
  (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(D * de, V, le), this._isUserControllingDolly = !0) : (this._zoomInternal(D * de, V, le), this._isUserControllingZoom = !0);
484
484
  }
485
- ((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" });
485
+ ((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(C, O, !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(C, O, !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(C, O, !0, !1), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
486
486
  }, u = () => {
487
- Oe(this._activePointers, R), i.copy(R), 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(
487
+ Ee(this._activePointers, R), i.copy(R), 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(
488
488
  "pointermove",
489
489
  n,
490
490
  { passive: !1 }
@@ -513,25 +513,25 @@ class J extends ws {
513
513
  g
514
514
  ), this._domElement.ownerDocument.addEventListener(
515
515
  "pointerlockerror",
516
- y
516
+ v
517
517
  ), this._domElement.ownerDocument.addEventListener(
518
518
  "pointermove",
519
519
  n,
520
520
  { passive: !1 }
521
- ), this._domElement.ownerDocument.addEventListener("pointerup", a), v());
521
+ ), this._domElement.ownerDocument.addEventListener("pointerup", a), y());
522
522
  }, this.unlockPointer = () => {
523
- var l, f, O;
524
- this._lockedPointer !== null && (this._disposePointer(this._lockedPointer), this._lockedPointer = null), (l = this._domElement) === null || l === void 0 || l.ownerDocument.exitPointerLock(), (f = this._domElement) === null || f === void 0 || f.ownerDocument.removeEventListener(
523
+ var l, _, C;
524
+ this._lockedPointer !== null && (this._disposePointer(this._lockedPointer), this._lockedPointer = null), (l = this._domElement) === null || l === void 0 || l.ownerDocument.exitPointerLock(), (_ = this._domElement) === null || _ === void 0 || _.ownerDocument.removeEventListener(
525
525
  "pointerlockchange",
526
526
  g
527
- ), (O = this._domElement) === null || O === void 0 || O.ownerDocument.removeEventListener(
527
+ ), (C = this._domElement) === null || C === void 0 || C.ownerDocument.removeEventListener(
528
528
  "pointerlockerror",
529
- y
529
+ v
530
530
  ), this.cancel();
531
531
  };
532
532
  const g = () => {
533
533
  this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement || this.unlockPointer();
534
- }, y = () => {
534
+ }, v = () => {
535
535
  this.unlockPointer();
536
536
  };
537
537
  this._addAllEventListeners = (l) => {
@@ -553,7 +553,7 @@ class J extends ws {
553
553
  g
554
554
  ), this._domElement.ownerDocument.removeEventListener(
555
555
  "pointerlockerror",
556
- y
556
+ v
557
557
  ));
558
558
  }, this.cancel = () => {
559
559
  this._state !== d.NONE && (this._state = d.NONE, this._activePointers.length = 0, u());
@@ -899,8 +899,8 @@ class J extends ws {
899
899
  * @category Methods
900
900
  */
901
901
  truck(e, t, s = !1) {
902
- this._camera.updateMatrix(), F.setFromMatrixColumn(this._camera.matrix, 0), N.setFromMatrixColumn(this._camera.matrix, 1), F.multiplyScalar(e), N.multiplyScalar(-t);
903
- const i = w.copy(F).add(N), r = L.copy(this._targetEnd).add(i);
902
+ this._camera.updateMatrix(), F.setFromMatrixColumn(this._camera.matrix, 0), j.setFromMatrixColumn(this._camera.matrix, 1), F.multiplyScalar(e), j.multiplyScalar(-t);
903
+ const i = w.copy(F).add(j), r = L.copy(this._targetEnd).add(i);
904
904
  return this.moveTo(r.x, r.y, r.z, s);
905
905
  }
906
906
  /**
@@ -985,25 +985,25 @@ 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 = Ie(this._sphericalEnd.theta, je), p = Ie(this._sphericalEnd.phi, je);
988
+ const m = Ie(this._sphericalEnd.theta, Ne), p = Ie(this._sphericalEnd.phi, Ne);
989
989
  a.push(this.rotateTo(m, p, t));
990
- const v = w.setFromSpherical(this._sphericalEnd).normalize(), _ = We.setFromUnitVectors(v, Te), u = P(Math.abs(v.y), 1);
991
- u && _.multiply(we.setFromAxisAngle(pe, m)), _.multiply(this._yAxisUpSpaceInverse);
990
+ const y = w.setFromSpherical(this._sphericalEnd).normalize(), f = We.setFromUnitVectors(y, be), u = P(Math.abs(y.y), 1);
991
+ u && f.multiply(xe.setFromAxisAngle(pe, m)), f.multiply(this._yAxisUpSpaceInverse);
992
992
  const g = Ze.makeEmpty();
993
- L.copy(h.min).applyQuaternion(_), g.expandByPoint(L), L.copy(h.min).setX(h.max.x).applyQuaternion(_), g.expandByPoint(L), L.copy(h.min).setY(h.max.y).applyQuaternion(_), g.expandByPoint(L), L.copy(h.max).setZ(h.min.z).applyQuaternion(_), g.expandByPoint(L), L.copy(h.min).setZ(h.max.z).applyQuaternion(_), g.expandByPoint(L), L.copy(h.max).setY(h.min.y).applyQuaternion(_), g.expandByPoint(L), L.copy(h.max).setX(h.min.x).applyQuaternion(_), g.expandByPoint(L), L.copy(h.max).applyQuaternion(_), g.expandByPoint(L), g.min.x -= i, g.min.y -= o, g.max.x += r, g.max.y += n, _.setFromUnitVectors(Te, v), u && _.premultiply(we.invert()), _.premultiply(this._yAxisUpSpace);
994
- const y = g.getSize(w), l = g.getCenter(L).applyQuaternion(_);
993
+ L.copy(h.min).applyQuaternion(f), g.expandByPoint(L), L.copy(h.min).setX(h.max.x).applyQuaternion(f), g.expandByPoint(L), L.copy(h.min).setY(h.max.y).applyQuaternion(f), g.expandByPoint(L), L.copy(h.max).setZ(h.min.z).applyQuaternion(f), g.expandByPoint(L), L.copy(h.min).setZ(h.max.z).applyQuaternion(f), g.expandByPoint(L), L.copy(h.max).setY(h.min.y).applyQuaternion(f), g.expandByPoint(L), L.copy(h.max).setX(h.min.x).applyQuaternion(f), g.expandByPoint(L), L.copy(h.max).applyQuaternion(f), g.expandByPoint(L), g.min.x -= i, g.min.y -= o, g.max.x += r, g.max.y += n, f.setFromUnitVectors(be, y), u && f.premultiply(xe.invert()), f.premultiply(this._yAxisUpSpace);
994
+ const v = g.getSize(w), l = g.getCenter(L).applyQuaternion(f);
995
995
  if (Y(this._camera)) {
996
- const f = this.getDistanceToFitBox(
997
- y.x,
998
- y.y,
999
- y.z,
996
+ const _ = this.getDistanceToFitBox(
997
+ v.x,
998
+ v.y,
999
+ v.z,
1000
1000
  s
1001
1001
  );
1002
1002
  a.push(
1003
1003
  this.moveTo(l.x, l.y, l.z, t)
1004
- ), a.push(this.dollyTo(f, t)), a.push(this.setFocalOffset(0, 0, 0, t));
1004
+ ), a.push(this.dollyTo(_, t)), a.push(this.setFocalOffset(0, 0, 0, t));
1005
1005
  } else if (H(this._camera)) {
1006
- const f = this._camera, O = f.right - f.left, C = f.top - f.bottom, b = s ? Math.max(O / y.x, C / y.y) : Math.min(O / y.x, C / y.y);
1006
+ const _ = this._camera, C = _.right - _.left, O = _.top - _.bottom, b = s ? Math.max(C / v.x, O / v.y) : Math.min(C / v.x, O / v.y);
1007
1007
  a.push(
1008
1008
  this.moveTo(l.x, l.y, l.z, t)
1009
1009
  ), a.push(this.zoomTo(b, t)), a.push(this.setFocalOffset(0, 0, 0, t));
@@ -1017,7 +1017,7 @@ class J extends ws {
1017
1017
  * @category Methods
1018
1018
  */
1019
1019
  fitToSphere(e, t) {
1020
- const s = [], r = "isObject3D" in e ? J.createBoundingSphere(e, be) : be.copy(e);
1020
+ const s = [], r = "isObject3D" in e ? J.createBoundingSphere(e, we) : we.copy(e);
1021
1021
  if (s.push(
1022
1022
  this.moveTo(
1023
1023
  r.center.x,
@@ -1084,21 +1084,21 @@ class J extends ws {
1084
1084
  * @param enableTransition
1085
1085
  * @category Methods
1086
1086
  */
1087
- lerpLookAt(e, t, s, i, r, o, n, a, h, m, p, v, _, u = !1) {
1087
+ lerpLookAt(e, t, s, i, r, o, n, a, h, m, p, y, f, u = !1) {
1088
1088
  this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = K.NONE, this._changedDolly = 0;
1089
- const g = w.set(i, r, o), y = L.set(e, t, s);
1089
+ const g = w.set(i, r, o), v = L.set(e, t, s);
1090
1090
  k.setFromVector3(
1091
- y.sub(g).applyQuaternion(this._yAxisUpSpace)
1091
+ v.sub(g).applyQuaternion(this._yAxisUpSpace)
1092
1092
  );
1093
- const l = G.set(m, p, v), f = L.set(n, a, h);
1093
+ const l = G.set(m, p, y), _ = L.set(n, a, h);
1094
1094
  ae.setFromVector3(
1095
- f.sub(l).applyQuaternion(this._yAxisUpSpace)
1096
- ), this._targetEnd.copy(g.lerp(l, _));
1097
- const O = ae.theta - k.theta, C = ae.phi - k.phi, b = ae.radius - k.radius;
1095
+ _.sub(l).applyQuaternion(this._yAxisUpSpace)
1096
+ ), this._targetEnd.copy(g.lerp(l, f));
1097
+ const C = ae.theta - k.theta, O = ae.phi - k.phi, b = ae.radius - k.radius;
1098
1098
  this._sphericalEnd.set(
1099
- k.radius + b * _,
1100
- k.phi + C * _,
1101
- k.theta + O * _
1099
+ k.radius + b * f,
1100
+ k.phi + O * f,
1101
+ k.theta + C * f
1102
1102
  ), this.normalizeRotations(), this._needsUpdate = !0, u || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
1103
1103
  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(
1104
1104
  this._spherical.theta,
@@ -1194,9 +1194,9 @@ class J extends ws {
1194
1194
  * @category Methods
1195
1195
  */
1196
1196
  setOrbitPoint(e, t, s) {
1197
- this._camera.updateMatrixWorld(), F.setFromMatrixColumn(this._camera.matrixWorldInverse, 0), N.setFromMatrixColumn(this._camera.matrixWorldInverse, 1), Z.setFromMatrixColumn(this._camera.matrixWorldInverse, 2);
1197
+ this._camera.updateMatrixWorld(), F.setFromMatrixColumn(this._camera.matrixWorldInverse, 0), j.setFromMatrixColumn(this._camera.matrixWorldInverse, 1), Z.setFromMatrixColumn(this._camera.matrixWorldInverse, 2);
1198
1198
  const i = w.set(e, t, s), r = i.distanceTo(this._camera.position), o = i.sub(this._camera.position);
1199
- F.multiplyScalar(o.x), N.multiplyScalar(o.y), Z.multiplyScalar(o.z), w.copy(F).add(N).add(Z), w.z = w.z + r, this.dollyTo(r, !1), this.setFocalOffset(-w.x, w.y, -w.z, !1), this.moveTo(e, t, s, !1);
1199
+ F.multiplyScalar(o.x), j.multiplyScalar(o.y), Z.multiplyScalar(o.z), w.copy(F).add(j).add(Z), w.z = w.z + r, this.dollyTo(r, !1), this.setFocalOffset(-w.x, w.y, -w.z, !1), this.moveTo(e, t, s, !1);
1200
1200
  }
1201
1201
  /**
1202
1202
  * Set the boundary box that encloses the target of the camera. box3 is in THREE.Box3
@@ -1235,7 +1235,7 @@ class J extends ws {
1235
1235
  * @category Methods
1236
1236
  */
1237
1237
  getDistanceToFitBox(e, t, s, i = !1) {
1238
- if (Ee(this._camera, "getDistanceToFitBox"))
1238
+ if (Te(this._camera, "getDistanceToFitBox"))
1239
1239
  return this._spherical.radius;
1240
1240
  const r = e / t, o = this._camera.getEffectiveFOV() * ie, n = this._camera.aspect;
1241
1241
  return ((i ? r > n : r < n) ? t : e / n) * 0.5 / Math.tan(o * 0.5) + s * 0.5;
@@ -1247,7 +1247,7 @@ class J extends ws {
1247
1247
  * @category Methods
1248
1248
  */
1249
1249
  getDistanceToFitSphere(e) {
1250
- if (Ee(this._camera, "getDistanceToFitSphere"))
1250
+ if (Te(this._camera, "getDistanceToFitSphere"))
1251
1251
  return this._spherical.radius;
1252
1252
  const t = this._camera.getEffectiveFOV() * ie, s = Math.atan(Math.tan(t * 0.5) * this._camera.aspect) * 2, i = 1 < this._camera.aspect ? t : s;
1253
1253
  return e / Math.sin(i * 0.5);
@@ -1372,7 +1372,7 @@ class J extends ws {
1372
1372
  this._focalOffsetEnd,
1373
1373
  this._focalOffset
1374
1374
  ), n = this._zoomEnd - this._zoom;
1375
- if (S(t))
1375
+ if (A(t))
1376
1376
  this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
1377
1377
  else {
1378
1378
  const p = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
@@ -1385,7 +1385,7 @@ class J extends ws {
1385
1385
  e
1386
1386
  ), this._needsUpdate = !0;
1387
1387
  }
1388
- if (S(s))
1388
+ if (A(s))
1389
1389
  this._phiVelocity.value = 0, this._spherical.phi = this._sphericalEnd.phi;
1390
1390
  else {
1391
1391
  const p = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
@@ -1398,7 +1398,7 @@ class J extends ws {
1398
1398
  e
1399
1399
  ), this._needsUpdate = !0;
1400
1400
  }
1401
- if (S(i))
1401
+ if (A(i))
1402
1402
  this._radiusVelocity.value = 0, this._spherical.radius = this._sphericalEnd.radius;
1403
1403
  else {
1404
1404
  const p = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime;
@@ -1411,7 +1411,7 @@ class J extends ws {
1411
1411
  e
1412
1412
  ), this._needsUpdate = !0;
1413
1413
  }
1414
- if (S(r.x) && S(r.y) && S(r.z))
1414
+ if (A(r.x) && A(r.y) && A(r.z))
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;
@@ -1425,7 +1425,7 @@ class J extends ws {
1425
1425
  this._target
1426
1426
  ), this._needsUpdate = !0;
1427
1427
  }
1428
- if (S(o.x) && S(o.y) && S(o.z))
1428
+ if (A(o.x) && A(o.y) && A(o.z))
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;
@@ -1439,7 +1439,7 @@ class J extends ws {
1439
1439
  this._focalOffset
1440
1440
  ), this._needsUpdate = !0;
1441
1441
  }
1442
- if (S(n))
1442
+ if (A(n))
1443
1443
  this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
1444
1444
  else {
1445
1445
  const p = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime;
@@ -1454,45 +1454,45 @@ class J extends ws {
1454
1454
  }
1455
1455
  if (this.dollyToCursor) {
1456
1456
  if (Y(this._camera) && this._changedDolly !== 0) {
1457
- const p = this._spherical.radius - this._lastDistance, v = this._camera, _ = this._getCameraDirection(ne), u = w.copy(_).cross(v.up).normalize();
1457
+ const p = this._spherical.radius - this._lastDistance, y = this._camera, f = this._getCameraDirection(ne), u = w.copy(f).cross(y.up).normalize();
1458
1458
  u.lengthSq() === 0 && (u.x = 1);
1459
- const g = L.crossVectors(u, _), y = this._sphericalEnd.radius * Math.tan(v.getEffectiveFOV() * ie * 0.5), f = (this._sphericalEnd.radius - p - this._sphericalEnd.radius) / this._sphericalEnd.radius, O = G.copy(this._targetEnd).add(
1459
+ const g = L.crossVectors(u, f), v = this._sphericalEnd.radius * Math.tan(y.getEffectiveFOV() * ie * 0.5), _ = (this._sphericalEnd.radius - p - this._sphericalEnd.radius) / this._sphericalEnd.radius, C = G.copy(this._targetEnd).add(
1460
1460
  u.multiplyScalar(
1461
- this._dollyControlCoord.x * y * v.aspect
1461
+ this._dollyControlCoord.x * v * y.aspect
1462
1462
  )
1463
1463
  ).add(
1464
- g.multiplyScalar(this._dollyControlCoord.y * y)
1465
- ), C = w.copy(this._targetEnd).lerp(O, f), b = this._lastDollyDirection === K.IN && this._spherical.radius <= this.minDistance, E = this._lastDollyDirection === K.OUT && this.maxDistance <= this._spherical.radius;
1464
+ g.multiplyScalar(this._dollyControlCoord.y * v)
1465
+ ), O = w.copy(this._targetEnd).lerp(C, _), b = this._lastDollyDirection === K.IN && this._spherical.radius <= this.minDistance, E = this._lastDollyDirection === K.OUT && this.maxDistance <= this._spherical.radius;
1466
1466
  if (this.infinityDolly && (b || E)) {
1467
1467
  this._sphericalEnd.radius -= p, this._spherical.radius -= p;
1468
- const D = L.copy(_).multiplyScalar(-p);
1469
- C.add(D);
1468
+ const D = L.copy(f).multiplyScalar(-p);
1469
+ O.add(D);
1470
1470
  }
1471
- this._boundary.clampPoint(C, C);
1472
- const x = L.subVectors(C, this._targetEnd);
1473
- this._targetEnd.copy(C), this._target.add(x), this._changedDolly -= p, S(this._changedDolly) && (this._changedDolly = 0);
1471
+ this._boundary.clampPoint(O, O);
1472
+ const x = L.subVectors(O, this._targetEnd);
1473
+ this._targetEnd.copy(O), this._target.add(x), this._changedDolly -= p, A(this._changedDolly) && (this._changedDolly = 0);
1474
1474
  } else if (H(this._camera) && this._changedZoom !== 0) {
1475
- const p = this._zoom - this._lastZoom, v = this._camera, _ = w.set(
1475
+ const p = this._zoom - this._lastZoom, y = this._camera, f = w.set(
1476
1476
  this._dollyControlCoord.x,
1477
1477
  this._dollyControlCoord.y,
1478
- (v.near + v.far) / (v.near - v.far)
1479
- ).unproject(v), u = L.set(0, 0, -1).applyQuaternion(v.quaternion), g = G.copy(_).add(u.multiplyScalar(-_.dot(v.up))), l = -(this._zoom - p - this._zoom) / this._zoom, f = this._getCameraDirection(ne), O = this._targetEnd.dot(f), C = w.copy(this._targetEnd).lerp(g, l), b = C.dot(f), E = f.multiplyScalar(
1480
- b - O
1478
+ (y.near + y.far) / (y.near - y.far)
1479
+ ).unproject(y), u = L.set(0, 0, -1).applyQuaternion(y.quaternion), g = G.copy(f).add(u.multiplyScalar(-f.dot(y.up))), l = -(this._zoom - p - this._zoom) / this._zoom, _ = this._getCameraDirection(ne), C = this._targetEnd.dot(_), O = w.copy(this._targetEnd).lerp(g, l), b = O.dot(_), E = _.multiplyScalar(
1480
+ b - C
1481
1481
  );
1482
- C.sub(E), this._boundary.clampPoint(C, C);
1483
- const x = L.subVectors(C, this._targetEnd);
1484
- this._targetEnd.copy(C), this._target.add(x), this._changedZoom -= p, S(this._changedZoom) && (this._changedZoom = 0);
1482
+ O.sub(E), this._boundary.clampPoint(O, O);
1483
+ const x = L.subVectors(O, this._targetEnd);
1484
+ this._targetEnd.copy(O), this._target.add(x), this._changedZoom -= p, A(this._changedZoom) && (this._changedZoom = 0);
1485
1485
  }
1486
1486
  }
1487
1487
  this._camera.zoom !== this._zoom && (this._camera.zoom = this._zoom, this._camera.updateProjectionMatrix(), this._updateNearPlaneCorners(), this._needsUpdate = !0), this._dragNeedsUpdate = !0;
1488
1488
  const a = this._collisionTest();
1489
- this._spherical.radius = Math.min(this._spherical.radius, a), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!S(this._focalOffset.x) || !S(this._focalOffset.y) || !S(this._focalOffset.z)) && (F.setFromMatrixColumn(this._camera.matrix, 0), N.setFromMatrixColumn(this._camera.matrix, 1), Z.setFromMatrixColumn(this._camera.matrix, 2), F.multiplyScalar(this._focalOffset.x), N.multiplyScalar(-this._focalOffset.y), Z.multiplyScalar(this._focalOffset.z), w.copy(F).add(N).add(Z), this._camera.position.add(w), this._camera.updateMatrixWorld()), this._boundaryEnclosesCamera && this._encloseToBoundary(
1489
+ this._spherical.radius = Math.min(this._spherical.radius, a), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!A(this._focalOffset.x) || !A(this._focalOffset.y) || !A(this._focalOffset.z)) && (F.setFromMatrixColumn(this._camera.matrix, 0), j.setFromMatrixColumn(this._camera.matrix, 1), Z.setFromMatrixColumn(this._camera.matrix, 2), F.multiplyScalar(this._focalOffset.x), j.multiplyScalar(-this._focalOffset.y), Z.multiplyScalar(this._focalOffset.z), w.copy(F).add(j).add(Z), this._camera.position.add(w), this._camera.updateMatrixWorld()), this._boundaryEnclosesCamera && this._encloseToBoundary(
1490
1490
  this._camera.position.copy(this._target),
1491
1491
  w.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),
1492
1492
  1
1493
1493
  );
1494
1494
  const m = this._needsUpdate;
1495
- return m && !this._updatedLastTime ? (this._hasRested = !1, this.dispatchEvent({ type: "wake" }), this.dispatchEvent({ type: "update" })) : m ? (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" }))) : !m && 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 = m, this._needsUpdate = !1, m;
1495
+ return m && !this._updatedLastTime ? (this._hasRested = !1, this.dispatchEvent({ type: "wake" }), this.dispatchEvent({ type: "update" })) : m ? (this.dispatchEvent({ type: "update" }), A(t, this.restThreshold) && A(s, this.restThreshold) && A(i, this.restThreshold) && A(r.x, this.restThreshold) && A(r.y, this.restThreshold) && A(r.z, this.restThreshold) && A(o.x, this.restThreshold) && A(o.y, this.restThreshold) && A(o.z, this.restThreshold) && A(n, this.restThreshold) && !this._hasRested && (this._hasRested = !0, this.dispatchEvent({ type: "rest" }))) : !m && 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 = m, this._needsUpdate = !1, m;
1496
1496
  }
1497
1497
  /**
1498
1498
  * Get all state in JSON string
@@ -1614,13 +1614,13 @@ class J extends ws {
1614
1614
  // lateUpdate
1615
1615
  _collisionTest() {
1616
1616
  let e = 1 / 0;
1617
- if (!(this.colliderMeshes.length >= 1) || Ee(this._camera, "_collisionTest"))
1617
+ if (!(this.colliderMeshes.length >= 1) || Te(this._camera, "_collisionTest"))
1618
1618
  return e;
1619
1619
  const s = this._getTargetDirection(ne);
1620
- xe.lookAt(Be, s, this._camera.up);
1620
+ Le.lookAt(Be, s, this._camera.up);
1621
1621
  for (let i = 0; i < 4; i++) {
1622
1622
  const r = L.copy(this._nearPlaneCorners[i]);
1623
- r.applyMatrix4(xe);
1623
+ r.applyMatrix4(Le);
1624
1624
  const o = G.addVectors(this._target, r);
1625
1625
  me.set(o, s), me.far = this._spherical.radius + 1;
1626
1626
  const n = me.intersectObjects(this.colliderMeshes);
@@ -1702,12 +1702,12 @@ class J extends ws {
1702
1702
  const a = n.geometry.clone();
1703
1703
  a.applyMatrix4(n.matrixWorld);
1704
1704
  const m = a.attributes.position;
1705
- for (let p = 0, v = m.count; p < v; p++)
1705
+ for (let p = 0, y = m.count; p < y; p++)
1706
1706
  w.fromBufferAttribute(m, p), r = Math.max(r, i.distanceToSquared(w));
1707
1707
  }), s.radius = Math.sqrt(r), s;
1708
1708
  }
1709
1709
  }
1710
- var Se = { exports: {} }, Q = typeof Reflect == "object" ? Reflect : null, Ke = Q && typeof Q.apply == "function" ? Q.apply : function(e, t, s) {
1710
+ var Me = { exports: {} }, Q = typeof Reflect == "object" ? Reflect : null, Ke = Q && typeof Q.apply == "function" ? Q.apply : function(e, t, s) {
1711
1711
  return Function.prototype.apply.call(e, t, s);
1712
1712
  }, ue;
1713
1713
  Q && typeof Q.ownKeys == "function" ? ue = Q.ownKeys : Object.getOwnPropertySymbols ? ue = function(e) {
@@ -1721,21 +1721,21 @@ function Ls(c) {
1721
1721
  var ut = Number.isNaN || function(e) {
1722
1722
  return e !== e;
1723
1723
  };
1724
- function A() {
1725
- A.init.call(this);
1724
+ function S() {
1725
+ S.init.call(this);
1726
1726
  }
1727
- Se.exports = A;
1728
- Se.exports.once = Ms;
1729
- A.EventEmitter = A;
1730
- A.prototype._events = void 0;
1731
- A.prototype._eventsCount = 0;
1732
- A.prototype._maxListeners = void 0;
1727
+ Me.exports = S;
1728
+ Me.exports.once = Ms;
1729
+ S.EventEmitter = S;
1730
+ S.prototype._events = void 0;
1731
+ S.prototype._eventsCount = 0;
1732
+ S.prototype._maxListeners = void 0;
1733
1733
  var $e = 10;
1734
1734
  function ge(c) {
1735
1735
  if (typeof c != "function")
1736
1736
  throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof c);
1737
1737
  }
1738
- Object.defineProperty(A, "defaultMaxListeners", {
1738
+ Object.defineProperty(S, "defaultMaxListeners", {
1739
1739
  enumerable: !0,
1740
1740
  get: function() {
1741
1741
  return $e;
@@ -1746,21 +1746,21 @@ Object.defineProperty(A, "defaultMaxListeners", {
1746
1746
  $e = c;
1747
1747
  }
1748
1748
  });
1749
- A.init = function() {
1749
+ S.init = function() {
1750
1750
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
1751
1751
  };
1752
- A.prototype.setMaxListeners = function(e) {
1752
+ S.prototype.setMaxListeners = function(e) {
1753
1753
  if (typeof e != "number" || e < 0 || ut(e))
1754
1754
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
1755
1755
  return this._maxListeners = e, this;
1756
1756
  };
1757
1757
  function ft(c) {
1758
- return c._maxListeners === void 0 ? A.defaultMaxListeners : c._maxListeners;
1758
+ return c._maxListeners === void 0 ? S.defaultMaxListeners : c._maxListeners;
1759
1759
  }
1760
- A.prototype.getMaxListeners = function() {
1760
+ S.prototype.getMaxListeners = function() {
1761
1761
  return ft(this);
1762
1762
  };
1763
- A.prototype.emit = function(e) {
1763
+ S.prototype.emit = function(e) {
1764
1764
  for (var t = [], s = 1; s < arguments.length; s++) t.push(arguments[s]);
1765
1765
  var i = e === "error", r = this._events;
1766
1766
  if (r !== void 0)
@@ -1780,7 +1780,7 @@ A.prototype.emit = function(e) {
1780
1780
  if (typeof a == "function")
1781
1781
  Ke(a, this, t);
1782
1782
  else
1783
- for (var h = a.length, m = Ct(a, h), s = 0; s < h; ++s)
1783
+ for (var h = a.length, m = Ot(a, h), s = 0; s < h; ++s)
1784
1784
  Ke(m[s], this, t);
1785
1785
  return !0;
1786
1786
  };
@@ -1799,11 +1799,11 @@ function _t(c, e, t, s) {
1799
1799
  }
1800
1800
  return c;
1801
1801
  }
1802
- A.prototype.addListener = function(e, t) {
1802
+ S.prototype.addListener = function(e, t) {
1803
1803
  return _t(this, e, t, !1);
1804
1804
  };
1805
- A.prototype.on = A.prototype.addListener;
1806
- A.prototype.prependListener = function(e, t) {
1805
+ S.prototype.on = S.prototype.addListener;
1806
+ S.prototype.prependListener = function(e, t) {
1807
1807
  return _t(this, e, t, !0);
1808
1808
  };
1809
1809
  function Ps() {
@@ -1814,13 +1814,13 @@ function gt(c, e, t) {
1814
1814
  var s = { fired: !1, wrapFn: void 0, target: c, type: e, listener: t }, i = Ps.bind(s);
1815
1815
  return i.listener = t, s.wrapFn = i, i;
1816
1816
  }
1817
- A.prototype.once = function(e, t) {
1817
+ S.prototype.once = function(e, t) {
1818
1818
  return ge(t), this.on(e, gt(this, e, t)), this;
1819
1819
  };
1820
- A.prototype.prependOnceListener = function(e, t) {
1820
+ S.prototype.prependOnceListener = function(e, t) {
1821
1821
  return ge(t), this.prependListener(e, gt(this, e, t)), this;
1822
1822
  };
1823
- A.prototype.removeListener = function(e, t) {
1823
+ S.prototype.removeListener = function(e, t) {
1824
1824
  var s, i, r, o, n;
1825
1825
  if (ge(t), i = this._events, i === void 0)
1826
1826
  return this;
@@ -1836,12 +1836,12 @@ A.prototype.removeListener = function(e, t) {
1836
1836
  }
1837
1837
  if (r < 0)
1838
1838
  return this;
1839
- r === 0 ? s.shift() : As(s, r), s.length === 1 && (i[e] = s[0]), i.removeListener !== void 0 && this.emit("removeListener", e, n || t);
1839
+ r === 0 ? s.shift() : Ss(s, r), s.length === 1 && (i[e] = s[0]), i.removeListener !== void 0 && this.emit("removeListener", e, n || t);
1840
1840
  }
1841
1841
  return this;
1842
1842
  };
1843
- A.prototype.off = A.prototype.removeListener;
1844
- A.prototype.removeAllListeners = function(e) {
1843
+ S.prototype.off = S.prototype.removeListener;
1844
+ S.prototype.removeAllListeners = function(e) {
1845
1845
  var t, s, i;
1846
1846
  if (s = this._events, s === void 0)
1847
1847
  return this;
@@ -1860,24 +1860,24 @@ A.prototype.removeAllListeners = function(e) {
1860
1860
  this.removeListener(e, t[i]);
1861
1861
  return this;
1862
1862
  };
1863
- function yt(c, e, t) {
1863
+ function vt(c, e, t) {
1864
1864
  var s = c._events;
1865
1865
  if (s === void 0)
1866
1866
  return [];
1867
1867
  var i = s[e];
1868
- return i === void 0 ? [] : typeof i == "function" ? t ? [i.listener || i] : [i] : t ? Ss(i) : Ct(i, i.length);
1868
+ return i === void 0 ? [] : typeof i == "function" ? t ? [i.listener || i] : [i] : t ? As(i) : Ot(i, i.length);
1869
1869
  }
1870
- A.prototype.listeners = function(e) {
1871
- return yt(this, e, !0);
1870
+ S.prototype.listeners = function(e) {
1871
+ return vt(this, e, !0);
1872
1872
  };
1873
- A.prototype.rawListeners = function(e) {
1874
- return yt(this, e, !1);
1873
+ S.prototype.rawListeners = function(e) {
1874
+ return vt(this, e, !1);
1875
1875
  };
1876
- A.listenerCount = function(c, e) {
1877
- return typeof c.listenerCount == "function" ? c.listenerCount(e) : vt.call(c, e);
1876
+ S.listenerCount = function(c, e) {
1877
+ return typeof c.listenerCount == "function" ? c.listenerCount(e) : yt.call(c, e);
1878
1878
  };
1879
- A.prototype.listenerCount = vt;
1880
- function vt(c) {
1879
+ S.prototype.listenerCount = yt;
1880
+ function yt(c) {
1881
1881
  var e = this._events;
1882
1882
  if (e !== void 0) {
1883
1883
  var t = e[c];
@@ -1888,20 +1888,20 @@ function vt(c) {
1888
1888
  }
1889
1889
  return 0;
1890
1890
  }
1891
- A.prototype.eventNames = function() {
1891
+ S.prototype.eventNames = function() {
1892
1892
  return this._eventsCount > 0 ? ue(this._events) : [];
1893
1893
  };
1894
- function Ct(c, e) {
1894
+ function Ot(c, e) {
1895
1895
  for (var t = new Array(e), s = 0; s < e; ++s)
1896
1896
  t[s] = c[s];
1897
1897
  return t;
1898
1898
  }
1899
- function As(c, e) {
1899
+ function Ss(c, e) {
1900
1900
  for (; e + 1 < c.length; e++)
1901
1901
  c[e] = c[e + 1];
1902
1902
  c.pop();
1903
1903
  }
1904
- function Ss(c) {
1904
+ function As(c) {
1905
1905
  for (var e = new Array(c.length), t = 0; t < e.length; ++t)
1906
1906
  e[t] = c[t].listener || c[t];
1907
1907
  return e;
@@ -1914,13 +1914,13 @@ function Ms(c, e) {
1914
1914
  function r() {
1915
1915
  typeof c.removeListener == "function" && c.removeListener("error", i), t([].slice.call(arguments));
1916
1916
  }
1917
- Ot(c, e, r, { once: !0 }), e !== "error" && Ds(c, i, { once: !0 });
1917
+ Ct(c, e, r, { once: !0 }), e !== "error" && Ds(c, i, { once: !0 });
1918
1918
  });
1919
1919
  }
1920
1920
  function Ds(c, e, t) {
1921
- typeof c.on == "function" && Ot(c, "error", e, t);
1921
+ typeof c.on == "function" && Ct(c, "error", e, t);
1922
1922
  }
1923
- function Ot(c, e, t, s) {
1923
+ function Ct(c, e, t, s) {
1924
1924
  if (typeof c.on == "function")
1925
1925
  s.once ? c.once(e, t) : c.on(e, t);
1926
1926
  else if (typeof c.addEventListener == "function")
@@ -1930,7 +1930,7 @@ function Ot(c, e, t, s) {
1930
1930
  else
1931
1931
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof c);
1932
1932
  }
1933
- var ye = Se.exports;
1933
+ var ve = Me.exports;
1934
1934
  let Et = class {
1935
1935
  constructor() {
1936
1936
  this.mask = 1;
@@ -1965,7 +1965,7 @@ let Et = class {
1965
1965
  };
1966
1966
  class ee {
1967
1967
  constructor() {
1968
- this.event = new ye.EventEmitter(), this.controllerMap = /* @__PURE__ */ new Map(), this.activeIndex = -1, this.activeControllerSet = /* @__PURE__ */ new Set();
1968
+ this.event = new ve.EventEmitter(), this.controllerMap = /* @__PURE__ */ new Map(), this.activeIndex = -1, this.activeControllerSet = /* @__PURE__ */ new Set();
1969
1969
  }
1970
1970
  addController(e, t) {
1971
1971
  const s = new Et();
@@ -2217,7 +2217,7 @@ class zs extends ms {
2217
2217
  constructor() {
2218
2218
  super();
2219
2219
  const e = ks;
2220
- this.uniforms = Ft.clone(e.uniforms), this.material = new Nt({
2220
+ this.uniforms = Ft.clone(e.uniforms), this.material = new jt({
2221
2221
  name: e.name,
2222
2222
  uniforms: this.uniforms,
2223
2223
  vertexShader: e.vertexShader,
@@ -2225,10 +2225,10 @@ class zs extends ms {
2225
2225
  }), this.fsQuad ? this.fsQuad = new Fe(this.material) : this._fsQuad && (this._fsQuad = new Fe(this.material));
2226
2226
  }
2227
2227
  }
2228
- const Fs = new jt({ color: "black" }), Ns = new ot({
2228
+ const Fs = new Nt({ color: "black" }), js = new ot({
2229
2229
  color: "black",
2230
2230
  sizeAttenuation: !1
2231
- }), js = new ot({
2231
+ }), Ns = new ot({
2232
2232
  color: "black",
2233
2233
  sizeAttenuation: !0
2234
2234
  }), Is = new nt({
@@ -2271,13 +2271,13 @@ class Ws {
2271
2271
  samples: Math.min(n, a),
2272
2272
  type: Vt
2273
2273
  }
2274
- ), p = new ze(o, m), v = this.getSize();
2275
- p.setSize(v.width, v.height);
2276
- const _ = new hs(
2274
+ ), p = new ze(o, m), y = this.getSize();
2275
+ p.setSize(y.width, y.height);
2276
+ const f = new hs(
2277
2277
  s.scene,
2278
2278
  i.camera
2279
2279
  );
2280
- p.addPass(_), this.scene = s.scene, this.camera = i.camera, this.finalComposer = p, this.renderPass = _, i.event.on("pageChange", (u) => {
2280
+ p.addPass(f), this.scene = s.scene, this.camera = i.camera, this.finalComposer = p, this.renderPass = f, i.event.on("pageChange", (u) => {
2281
2281
  this.changeCamera(u);
2282
2282
  }), s.event.on("pageChange", (u) => {
2283
2283
  this.changeScene(u);
@@ -2345,7 +2345,7 @@ class Ws {
2345
2345
  e.push(o);
2346
2346
  return;
2347
2347
  }
2348
- this.bloomMaterials[o.uuid] = o.material, n.isSprite ? n.material.sizeAttenuation ? n.material = Is : n.material = Hs : o.material instanceof pt ? o.material = Bs : a.isPoints ? a.material.sizeAttenuation ? a.material = js : a.material = Ns : o.material = Fs;
2348
+ this.bloomMaterials[o.uuid] = o.material, n.isSprite ? n.material.sizeAttenuation ? n.material = Is : n.material = Hs : o.material instanceof pt ? o.material = Bs : a.isPoints ? a.material.sizeAttenuation ? a.material = Ns : a.material = js : o.material = Fs;
2349
2349
  }
2350
2350
  });
2351
2351
  }), e.forEach((i) => {
@@ -2461,54 +2461,54 @@ class $s {
2461
2461
  height: i
2462
2462
  };
2463
2463
  }, this.render = function(u, g) {
2464
- 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);
2464
+ 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 && f(u);
2465
2465
  }, this.setSize = function(u, g) {
2466
2466
  s = u, i = g, r = s / 2, o = i / 2, a.style.width = u + "px", a.style.height = g + "px";
2467
2467
  };
2468
2468
  function h(u) {
2469
2469
  u.isCSS2DObject && (u.element.style.display = "none");
2470
- for (let g = 0, y = u.children.length; g < y; g++)
2470
+ for (let g = 0, v = u.children.length; g < v; g++)
2471
2471
  h(u.children[g]);
2472
2472
  }
2473
- function m(u, g, y) {
2473
+ function m(u, g, v) {
2474
2474
  if (u.visible === !1) {
2475
2475
  h(u);
2476
2476
  return;
2477
2477
  }
2478
2478
  if (u.isCSS2DObject) {
2479
2479
  q.setFromMatrixPosition(u.matrixWorld), q.applyMatrix4(qe);
2480
- const l = q.z >= -1 && q.z <= 1 && u.layers.test(y.layers) === !0, f = u.element;
2481
- 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));
2482
- const O = {
2483
- distanceToCameraSquared: p(y, u)
2480
+ const l = q.z >= -1 && q.z <= 1 && u.layers.test(v.layers) === !0, _ = u.element;
2481
+ _.style.display = l === !0 ? "" : "none", l === !0 && (u.onBeforeRender(t, g, v), _.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, v));
2482
+ const C = {
2483
+ distanceToCameraSquared: p(v, u)
2484
2484
  };
2485
- n.objects.set(u, O);
2485
+ n.objects.set(u, C);
2486
2486
  }
2487
- for (let l = 0, f = u.children.length; l < f; l++)
2488
- m(u.children[l], g, y);
2487
+ for (let l = 0, _ = u.children.length; l < _; l++)
2488
+ m(u.children[l], g, v);
2489
2489
  }
2490
2490
  function p(u, g) {
2491
2491
  return Qe.setFromMatrixPosition(u.matrixWorld), Je.setFromMatrixPosition(g.matrixWorld), Qe.distanceToSquared(Je);
2492
2492
  }
2493
- function v(u) {
2493
+ function y(u) {
2494
2494
  const g = [];
2495
- return u.traverseVisible(function(y) {
2496
- y.isCSS2DObject && g.push(y);
2495
+ return u.traverseVisible(function(v) {
2496
+ v.isCSS2DObject && g.push(v);
2497
2497
  }), g;
2498
2498
  }
2499
- function _(u) {
2500
- const g = v(u).sort(function(l, f) {
2501
- if (l.renderOrder !== f.renderOrder)
2502
- return f.renderOrder - l.renderOrder;
2503
- const O = n.objects.get(l).distanceToCameraSquared, C = n.objects.get(f).distanceToCameraSquared;
2504
- return O - C;
2505
- }), y = g.length;
2506
- for (let l = 0, f = g.length; l < f; l++)
2507
- g[l].element.style.zIndex = y - l;
2499
+ function f(u) {
2500
+ const g = y(u).sort(function(l, _) {
2501
+ if (l.renderOrder !== _.renderOrder)
2502
+ return _.renderOrder - l.renderOrder;
2503
+ const C = n.objects.get(l).distanceToCameraSquared, O = n.objects.get(_).distanceToCameraSquared;
2504
+ return C - O;
2505
+ }), v = g.length;
2506
+ for (let l = 0, _ = g.length; l < _; l++)
2507
+ g[l].element.style.zIndex = v - l;
2508
2508
  }
2509
2509
  }
2510
2510
  }
2511
- const et = new I(), Gs = new at(), tt = new I(), j = new W(), Xs = new W();
2511
+ const et = new I(), Gs = new at(), tt = new I(), N = new W(), Xs = new W();
2512
2512
  class qs {
2513
2513
  /**
2514
2514
  * Constructs a new CSS3D renderer.
@@ -2531,54 +2531,54 @@ class qs {
2531
2531
  width: s,
2532
2532
  height: i
2533
2533
  };
2534
- }, this.render = function(y, l) {
2535
- const f = l.projectionMatrix.elements[5] * o;
2536
- l.view && l.view.enabled ? (h.style.transform = `translate( ${-l.view.offsetX * (s / l.view.width)}px, ${-l.view.offsetY * (i / l.view.height)}px )`, h.style.transform += `scale( ${l.view.fullWidth / l.view.width}, ${l.view.fullHeight / l.view.height} )`) : h.style.transform = "", y.matrixWorldAutoUpdate === !0 && y.updateMatrixWorld(), l.parent === null && l.matrixWorldAutoUpdate === !0 && l.updateMatrixWorld();
2537
- let O, C;
2538
- l.isOrthographicCamera && (O = -(l.right + l.left) / 2, C = (l.top + l.bottom) / 2);
2539
- const b = l.view && l.view.enabled ? l.view.height / l.view.fullHeight : 1, E = l.isOrthographicCamera ? `scale( ${b} )scale(` + f + ")translate(" + p(O) + "px," + p(C) + "px)" + v(l.matrixWorldInverse) : `scale( ${b} )translateZ(` + f + "px)" + v(l.matrixWorldInverse), D = (l.isPerspectiveCamera ? "perspective(" + f + "px) " : "") + E + "translate(" + r + "px," + o + "px)";
2540
- n.camera.style !== D && (m.style.transform = D, n.camera.style = D), g(y, y, l);
2541
- }, this.setSize = function(y, l) {
2542
- s = y, i = l, r = s / 2, o = i / 2, a.style.width = y + "px", a.style.height = l + "px", h.style.width = y + "px", h.style.height = l + "px", m.style.width = y + "px", m.style.height = l + "px";
2534
+ }, this.render = function(v, l) {
2535
+ const _ = l.projectionMatrix.elements[5] * o;
2536
+ l.view && l.view.enabled ? (h.style.transform = `translate( ${-l.view.offsetX * (s / l.view.width)}px, ${-l.view.offsetY * (i / l.view.height)}px )`, h.style.transform += `scale( ${l.view.fullWidth / l.view.width}, ${l.view.fullHeight / l.view.height} )`) : h.style.transform = "", v.matrixWorldAutoUpdate === !0 && v.updateMatrixWorld(), l.parent === null && l.matrixWorldAutoUpdate === !0 && l.updateMatrixWorld();
2537
+ let C, O;
2538
+ l.isOrthographicCamera && (C = -(l.right + l.left) / 2, O = (l.top + l.bottom) / 2);
2539
+ const b = l.view && l.view.enabled ? l.view.height / l.view.fullHeight : 1, E = l.isOrthographicCamera ? `scale( ${b} )scale(` + _ + ")translate(" + p(C) + "px," + p(O) + "px)" + y(l.matrixWorldInverse) : `scale( ${b} )translateZ(` + _ + "px)" + y(l.matrixWorldInverse), D = (l.isPerspectiveCamera ? "perspective(" + _ + "px) " : "") + E + "translate(" + r + "px," + o + "px)";
2540
+ n.camera.style !== D && (m.style.transform = D, n.camera.style = D), g(v, v, l);
2541
+ }, this.setSize = function(v, l) {
2542
+ s = v, i = l, r = s / 2, o = i / 2, a.style.width = v + "px", a.style.height = l + "px", h.style.width = v + "px", h.style.height = l + "px", m.style.width = v + "px", m.style.height = l + "px";
2543
2543
  };
2544
- function p(y) {
2545
- return Math.abs(y) < 1e-10 ? 0 : y;
2544
+ function p(v) {
2545
+ return Math.abs(v) < 1e-10 ? 0 : v;
2546
2546
  }
2547
- function v(y) {
2548
- const l = y.elements;
2547
+ function y(v) {
2548
+ const l = v.elements;
2549
2549
  return "matrix3d(" + p(l[0]) + "," + p(-l[1]) + "," + p(l[2]) + "," + p(l[3]) + "," + p(l[4]) + "," + p(-l[5]) + "," + p(l[6]) + "," + p(l[7]) + "," + p(l[8]) + "," + p(-l[9]) + "," + p(l[10]) + "," + p(l[11]) + "," + p(l[12]) + "," + p(-l[13]) + "," + p(l[14]) + "," + p(l[15]) + ")";
2550
2550
  }
2551
- function _(y) {
2552
- const l = y.elements;
2551
+ function f(v) {
2552
+ const l = v.elements;
2553
2553
  return "translate(-50%,-50%)" + ("matrix3d(" + p(l[0]) + "," + p(l[1]) + "," + p(l[2]) + "," + p(l[3]) + "," + p(-l[4]) + "," + p(-l[5]) + "," + p(-l[6]) + "," + p(-l[7]) + "," + p(l[8]) + "," + p(l[9]) + "," + p(l[10]) + "," + p(l[11]) + "," + p(l[12]) + "," + p(l[13]) + "," + p(l[14]) + "," + p(l[15]) + ")");
2554
2554
  }
2555
- function u(y) {
2556
- y.isCSS3DObject && (y.element.style.display = "none");
2557
- for (let l = 0, f = y.children.length; l < f; l++)
2558
- u(y.children[l]);
2555
+ function u(v) {
2556
+ v.isCSS3DObject && (v.element.style.display = "none");
2557
+ for (let l = 0, _ = v.children.length; l < _; l++)
2558
+ u(v.children[l]);
2559
2559
  }
2560
- function g(y, l, f, O) {
2561
- if (y.visible === !1) {
2562
- u(y);
2560
+ function g(v, l, _, C) {
2561
+ if (v.visible === !1) {
2562
+ u(v);
2563
2563
  return;
2564
2564
  }
2565
- if (y.isCSS3DObject) {
2566
- const C = y.layers.test(f.layers) === !0, b = y.element;
2567
- if (b.style.display = C === !0 ? "" : "none", C === !0) {
2568
- y.onBeforeRender(t, l, f);
2565
+ if (v.isCSS3DObject) {
2566
+ const O = v.layers.test(_.layers) === !0, b = v.element;
2567
+ if (b.style.display = O === !0 ? "" : "none", O === !0) {
2568
+ v.onBeforeRender(t, l, _);
2569
2569
  let E;
2570
- y.isCSS3DSprite ? (j.copy(f.matrixWorldInverse), j.transpose(), y.rotation2D !== 0 && j.multiply(Xs.makeRotationZ(y.rotation2D)), y.matrixWorld.decompose(et, Gs, tt), j.setPosition(et), j.scale(tt), j.elements[3] = 0, j.elements[7] = 0, j.elements[11] = 0, j.elements[15] = 1, E = _(j)) : E = _(y.matrixWorld);
2571
- const x = n.objects.get(y);
2570
+ v.isCSS3DSprite ? (N.copy(_.matrixWorldInverse), N.transpose(), v.rotation2D !== 0 && N.multiply(Xs.makeRotationZ(v.rotation2D)), v.matrixWorld.decompose(et, Gs, tt), N.setPosition(et), N.scale(tt), N.elements[3] = 0, N.elements[7] = 0, N.elements[11] = 0, N.elements[15] = 1, E = f(N)) : E = f(v.matrixWorld);
2571
+ const x = n.objects.get(v);
2572
2572
  if (x === void 0 || x.style !== E) {
2573
2573
  b.style.transform = E;
2574
2574
  const D = { style: E };
2575
- n.objects.set(y, D);
2575
+ n.objects.set(v, D);
2576
2576
  }
2577
- b.parentNode !== m && m.appendChild(b), y.onAfterRender(t, l, f);
2577
+ b.parentNode !== m && m.appendChild(b), v.onAfterRender(t, l, _);
2578
2578
  }
2579
2579
  }
2580
- for (let C = 0, b = y.children.length; C < b; C++)
2581
- g(y.children[C], l, f);
2580
+ for (let O = 0, b = v.children.length; O < b; O++)
2581
+ g(v.children[O], l, _);
2582
2582
  }
2583
2583
  }
2584
2584
  }
@@ -2615,7 +2615,7 @@ class Js {
2615
2615
  let i = this.helpers[t];
2616
2616
  if (i === void 0) {
2617
2617
  if (e.isScene)
2618
- i = new Re(100);
2618
+ i = new Ue(100);
2619
2619
  else if (e.isCamera)
2620
2620
  i = new $t(e);
2621
2621
  else if (e.isPointLight)
@@ -2631,7 +2631,7 @@ class Js {
2631
2631
  else {
2632
2632
  const r = new lt();
2633
2633
  if (r.setFromObject(e, !0), r.isEmpty() === !1) {
2634
- i = new Ue(r);
2634
+ i = new ke(r);
2635
2635
  const o = i.material;
2636
2636
  o.userData.object = e, o.depthTest = !1, o.transparent = !0;
2637
2637
  } else
@@ -2663,7 +2663,7 @@ class Js {
2663
2663
  }
2664
2664
  removeAllExcludeScene() {
2665
2665
  Object.keys(this.helpers).forEach((e) => {
2666
- this.helpers[e] instanceof Re || this.remove({
2666
+ this.helpers[e] instanceof Ue || this.remove({
2667
2667
  uuid: e
2668
2668
  });
2669
2669
  });
@@ -2672,7 +2672,7 @@ class Js {
2672
2672
  var r, o;
2673
2673
  const { cameraController: i } = this.options;
2674
2674
  Object.values(this.helpers).forEach((n) => {
2675
- if (n.update && n.update(), n instanceof Ue) {
2675
+ if (n.update && n.update(), n instanceof ke) {
2676
2676
  const a = n.material, { object: h } = a.userData;
2677
2677
  h && n.box.setFromObject(h, !0);
2678
2678
  }
@@ -2691,7 +2691,7 @@ class Js {
2691
2691
  this.helpers = {}, (e = this.viewHelper) == null || e.dispose();
2692
2692
  }
2693
2693
  }
2694
- function Le(c) {
2694
+ function Pe(c) {
2695
2695
  let e = !1, t = [];
2696
2696
  return (...s) => {
2697
2697
  t = s, e || (e = !0, requestAnimationFrame(() => {
@@ -2705,43 +2705,46 @@ class ei {
2705
2705
  this.enabled = !0, this.pickFunctionsMap = /* @__PURE__ */ new Map(), this.pickNodeFunctionsMap = /* @__PURE__ */ new Map(), this.pickFunctionsMapIndex = -1, this.pickNodeFunctionsMapIndex = -1, this.activeObjects = /* @__PURE__ */ new Set(), this.activeObject = null, this.prevActiveObjects = /* @__PURE__ */ new Set(), this.objCallbackMap = /* @__PURE__ */ new Map(), this.pickListener = {
2706
2706
  move: !1,
2707
2707
  down: !1
2708
- }, this.cursorObjects = /* @__PURE__ */ new Map(), this.cursorListenerAdded = !1, this.pencil = e, this.domElement = ((t = e.options.controls) == null ? void 0 : t.domElement) || e.options.container;
2708
+ }, this.hasEnterOnStopEvent = !1, this.cursorObjects = /* @__PURE__ */ new Map(), this.cursorListenerAdded = !1, this.moveStopTimer = null, this.moveStopDelay = 150, this.lastMoveEvent = null, this.lastMoveActiveObjects = /* @__PURE__ */ new Set(), this.lastMoveRealActiveObject = null, this.triggeredEnterOnStopObjects = /* @__PURE__ */ new Set(), this.pencil = e, this.domElement = ((t = e.options.controls) == null ? void 0 : t.domElement) || e.options.container;
2709
2709
  }
2710
2710
  addPickListener(e) {
2711
- const t = /* @__PURE__ */ new Set(["move", "enter", "leave"]), s = /* @__PURE__ */ new Set(["down", "downOutside", "click"]), i = (r) => {
2712
- var v;
2711
+ const t = /* @__PURE__ */ new Set(["move", "enter", "leave", "enterOnStop"]), s = /* @__PURE__ */ new Set(["down", "downOutside", "click"]), i = (r) => {
2712
+ var y;
2713
2713
  if (!this.enabled)
2714
2714
  return;
2715
2715
  r.preventDefault();
2716
2716
  const o = e === "move" ? t : s, n = [];
2717
- if (this.pickFunctionsMap.forEach((_) => {
2718
- o.has(_.type) && n.push(te(U({}, _), {
2719
- objArr: _.objArr instanceof Function ? _.objArr() : _.objArr
2717
+ if (this.pickFunctionsMap.forEach((f) => {
2718
+ o.has(f.type) && n.push(te(U({}, f), {
2719
+ objArr: f.objArr instanceof Function ? f.objArr() : f.objArr
2720
2720
  }));
2721
2721
  }), n.length === 0) return;
2722
2722
  this.activeObjects.clear(), this.objCallbackMap.clear(), this.activeObject = null;
2723
2723
  const a = this.objCallbackMap;
2724
- for (const _ of n)
2725
- for (const u of _.objArr) {
2724
+ for (const f of n)
2725
+ for (const u of f.objArr) {
2726
2726
  if (!u.object3d || !u.visibleWithAncestors) continue;
2727
2727
  a.has(u) || a.set(u, /* @__PURE__ */ new Map());
2728
2728
  const g = a.get(u);
2729
- g.has(_.type) || g.set(_.type, []), g.get(_.type).push(_.cb);
2729
+ g.has(f.type) || g.set(f.type, []), g.get(f.type).push(f.cb);
2730
2730
  }
2731
2731
  if (a.size === 0) return;
2732
- const h = [...a.keys()].map((_) => _.object3d), m = (v = this.pencil.pick(r, h, !0)) == null ? void 0 : v.intersects;
2732
+ const h = [...a.keys()].map((f) => f.object3d), m = (y = this.pencil.pick(r, h, !1)) == null ? void 0 : y.intersects;
2733
2733
  if (!m || m.length === 0)
2734
2734
  e === "down" ? this.handleDownOutside(r) : e === "move" && this.handleLeaveEvents(r);
2735
2735
  else {
2736
- const _ = m[0];
2737
- this.processIntersection(_, r, e);
2736
+ const f = m[0];
2737
+ this.processIntersection(f, r, e);
2738
2738
  }
2739
+ e === "move" && this.hasEnterOnStopEvent && (this.handleMoveStop(r), this.triggeredEnterOnStopObjects.forEach((f) => {
2740
+ this.activeObjects.has(f) || this.triggeredEnterOnStopObjects.delete(f);
2741
+ }));
2739
2742
  const p = this.prevActiveObjects;
2740
2743
  this.prevActiveObjects = this.activeObjects, this.activeObjects = p, this.activeObjects.clear();
2741
2744
  };
2742
2745
  this.domElement.addEventListener(
2743
2746
  `pointer${e}`,
2744
- Le(i),
2747
+ Pe(i),
2745
2748
  { passive: !1 }
2746
2749
  );
2747
2750
  }
@@ -2798,10 +2801,10 @@ class ei {
2798
2801
  });
2799
2802
  const m = a.get("click");
2800
2803
  if (m) {
2801
- const p = (v) => {
2802
- v.preventDefault();
2803
- const _ = 5;
2804
- if (!r && Math.abs(v.clientX - e.clientX) <= _ && Math.abs(v.clientY - e.clientY) <= _)
2804
+ const p = (y) => {
2805
+ y.preventDefault();
2806
+ const f = 5;
2807
+ if (!r && Math.abs(y.clientX - e.clientX) <= f && Math.abs(y.clientY - e.clientY) <= f)
2805
2808
  for (const u of m)
2806
2809
  u({
2807
2810
  baseObject: n,
@@ -2839,6 +2842,38 @@ class ei {
2839
2842
  });
2840
2843
  });
2841
2844
  }
2845
+ /** 处理鼠标停止移动事件 */
2846
+ handleMoveStop(e) {
2847
+ this.moveStopTimer !== null && clearTimeout(this.moveStopTimer), this.lastMoveEvent = e, this.lastMoveActiveObjects.clear(), this.activeObjects.forEach((t) => this.lastMoveActiveObjects.add(t)), this.lastMoveRealActiveObject = this.activeObject, this.moveStopTimer = window.setTimeout(() => {
2848
+ this.triggerEnterOnStop();
2849
+ }, this.moveStopDelay);
2850
+ }
2851
+ /** 触发 enterOnStop 事件 */
2852
+ triggerEnterOnStop() {
2853
+ if (!this.lastMoveEvent || this.lastMoveActiveObjects.size === 0) return;
2854
+ const e = this.lastMoveEvent, t = this.objCallbackMap;
2855
+ let s = !1;
2856
+ const i = () => {
2857
+ s = !0;
2858
+ };
2859
+ for (const r of this.lastMoveActiveObjects) {
2860
+ if (s) break;
2861
+ const o = t.get(r);
2862
+ if (!o) continue;
2863
+ const n = o.get("enterOnStop");
2864
+ if (n && !this.triggeredEnterOnStopObjects.has(r)) {
2865
+ this.triggeredEnterOnStopObjects.add(r);
2866
+ for (const a of n)
2867
+ a({
2868
+ baseObject: r,
2869
+ realBaseObject: this.lastMoveRealActiveObject,
2870
+ mouseEvent: e,
2871
+ sp: i
2872
+ });
2873
+ }
2874
+ }
2875
+ this.moveStopTimer = null;
2876
+ }
2842
2877
  /** 重置鼠标样式 */
2843
2878
  resetCursor() {
2844
2879
  this.domElement.style.cursor = "";
@@ -2857,7 +2892,7 @@ class ei {
2857
2892
  this.resetCursor();
2858
2893
  return;
2859
2894
  }
2860
- const i = this.pencil.pick(t, s, !0);
2895
+ const i = this.pencil.pick(t, s, !1);
2861
2896
  if (!((o = i == null ? void 0 : i.intersects) != null && o.length)) {
2862
2897
  this.resetCursor();
2863
2898
  return;
@@ -2873,7 +2908,7 @@ class ei {
2873
2908
  }
2874
2909
  this.resetCursor();
2875
2910
  };
2876
- this.domElement.addEventListener("pointermove", Le(e), {
2911
+ this.domElement.addEventListener("pointermove", Pe(e), {
2877
2912
  passive: !0
2878
2913
  });
2879
2914
  }
@@ -2896,14 +2931,16 @@ class ei {
2896
2931
  let i = t;
2897
2932
  i === "mousemove" ? i = "move" : i === "mouseenter" ? i = "enter" : i === "mouseleave" && (i = "leave"), this.pickFunctionsMapIndex += 1;
2898
2933
  const r = this.pickFunctionsMapIndex;
2899
- return this.pickFunctionsMap.set(r, { objArr: e, type: i, cb: s }), this.pickListener.move || Array.from(this.pickFunctionsMap.values()).some(
2900
- (n) => ["move", "enter", "leave"].includes(n.type)
2934
+ return this.pickFunctionsMap.set(r, { objArr: e, type: i, cb: s }), i === "enterOnStop" && (this.hasEnterOnStopEvent = !0), this.pickListener.move || Array.from(this.pickFunctionsMap.values()).some(
2935
+ (n) => ["move", "enter", "leave", "enterOnStop"].includes(n.type)
2901
2936
  ) && (this.pickListener.move = !0, this.addPickListener("move")), this.pickListener.down || Array.from(this.pickFunctionsMap.values()).some(
2902
2937
  (n) => ["down", "downOutside", "click"].includes(n.type)
2903
2938
  ) && (this.pickListener.down = !0, this.addPickListener("down")), r;
2904
2939
  }
2905
2940
  removePick(e) {
2906
- this.pickFunctionsMap.delete(e);
2941
+ this.pickFunctionsMap.delete(e), this.hasEnterOnStopEvent = Array.from(this.pickFunctionsMap.values()).some(
2942
+ (t) => t.type === "enterOnStop"
2943
+ );
2907
2944
  }
2908
2945
  handlePickNode(e, t, s) {
2909
2946
  if (t === "downOutside")
@@ -2919,7 +2956,7 @@ class ei {
2919
2956
  mouseEvent: p
2920
2957
  }));
2921
2958
  }, m = `pointer${t}`;
2922
- a.element.addEventListener(m, Le(h), !1), o.push({ arr: a, type: m, listener: h });
2959
+ a.element.addEventListener(m, Pe(h), !1), o.push({ arr: a, type: m, listener: h });
2923
2960
  }
2924
2961
  return this.pickNodeFunctionsMap.set(i, o), i;
2925
2962
  }
@@ -2936,7 +2973,7 @@ class ei {
2936
2973
  }
2937
2974
  }
2938
2975
  dispose() {
2939
- this.pickFunctionsMap.clear(), this.pickNodeFunctionsMap.clear(), this.activeObjects.clear(), this.prevActiveObjects.clear(), this.objCallbackMap.clear(), this.cursorObjects.clear();
2976
+ this.moveStopTimer !== null && (clearTimeout(this.moveStopTimer), this.moveStopTimer = null), this.pickFunctionsMap.clear(), this.pickNodeFunctionsMap.clear(), this.activeObjects.clear(), this.prevActiveObjects.clear(), this.lastMoveActiveObjects.clear(), this.triggeredEnterOnStopObjects.clear(), this.objCallbackMap.clear(), this.cursorObjects.clear();
2940
2977
  }
2941
2978
  }
2942
2979
  class ti extends ei {
@@ -2945,12 +2982,12 @@ class ti extends ei {
2945
2982
  key: "@Scene",
2946
2983
  name: "场景",
2947
2984
  mList: !1
2948
- }), this.group = this.createBaseObject(new ke(), {
2985
+ }), this.group = this.createBaseObject(new Ce(), {
2949
2986
  key: "@Group",
2950
2987
  name: "物体组",
2951
2988
  target: this.scene,
2952
2989
  mList: !1
2953
- }), this.prefabGroup = this.createBaseObject(new ke(), {
2990
+ }), this.prefabGroup = this.createBaseObject(new Ce(), {
2954
2991
  key: "@PrefabGroup",
2955
2992
  name: "预制组",
2956
2993
  target: this.scene,
@@ -2963,7 +3000,9 @@ class ti extends ei {
2963
3000
  createBaseObject(e, t = {}) {
2964
3001
  const s = U({
2965
3002
  mList: !0
2966
- }, t), i = new ls();
3003
+ }, t);
3004
+ e instanceof Ce && (e.raycast = (r, o) => r.intersectObjects(e.children, !0, o));
3005
+ const i = new ls();
2967
3006
  if (i.object3d = e, i.pencil = this.pencil, i.lead = this, i.mList = this.mList, s.key && (i.key = s.key), !s.key && s.target)
2968
3007
  if (s.target.key === "@Scene" && e instanceof Jt)
2969
3008
  i.key = "@Camera";
@@ -3006,12 +3045,12 @@ class ti extends ei {
3006
3045
  }
3007
3046
  draw(e, t, s) {
3008
3047
  return se(this, null, function* () {
3009
- var p, v, _;
3048
+ var p, y, f;
3010
3049
  const i = this.objectNamesToFactories.get(String(e));
3011
3050
  if (!i)
3012
3051
  throw new Error(`Unrecognized factory: ${String(e)}`);
3013
3052
  t || (t = {}), t.target === void 0 && (t.target = s);
3014
- const r = t.target, o = (p = t.onTop) != null ? p : 0, n = (v = t.prefab) != null ? v : !1, a = (_ = t.create) != null ? _ : !0, h = new i().create(t);
3053
+ const r = t.target, o = (p = t.onTop) != null ? p : 0, n = (y = t.prefab) != null ? y : !1, a = (f = t.create) != null ? f : !0, h = new i().create(t);
3015
3054
  let m;
3016
3055
  if (r === null)
3017
3056
  m = null;
@@ -3187,14 +3226,14 @@ class it extends dt {
3187
3226
  let h = a;
3188
3227
  const m = e.split(".").pop(), p = this.options.type === "image" ? `image/${m || "png"}` : `video/${m || "mp4"}`;
3189
3228
  h = h.slice(0, a.size, p);
3190
- const v = () => {
3191
- o.removeEventListener("load", _, !1), o.removeEventListener("error", u, !1);
3192
- }, _ = () => {
3193
- v(), r.needsUpdate = !0, t && t(r);
3194
- }, u = (y) => {
3195
- v(), i && i(y), this.manager.itemError(e), this.manager.itemEnd(e);
3229
+ const y = () => {
3230
+ o.removeEventListener("load", f, !1), o.removeEventListener("error", u, !1);
3231
+ }, f = () => {
3232
+ y(), r.needsUpdate = !0, t && t(r);
3233
+ }, u = (v) => {
3234
+ y(), i && i(v), this.manager.itemError(e), this.manager.itemEnd(e);
3196
3235
  };
3197
- o.addEventListener("load", _, !1), o.addEventListener("error", u, !1);
3236
+ o.addEventListener("load", f, !1), o.addEventListener("error", u, !1);
3198
3237
  const g = window.URL.createObjectURL(h);
3199
3238
  o.src = g;
3200
3239
  },
@@ -3214,7 +3253,7 @@ const ri = {
3214
3253
  };
3215
3254
  class oi {
3216
3255
  constructor(e) {
3217
- this.loadObj = [], this.delLoadArr = [], this.assets = /* @__PURE__ */ new Map(), this.event = new ye.EventEmitter(), this.options = U({
3256
+ this.loadObj = [], this.delLoadArr = [], this.assets = /* @__PURE__ */ new Map(), this.event = new ve.EventEmitter(), this.options = U({
3218
3257
  simpleTexture4deleted: !1,
3219
3258
  prefix: ""
3220
3259
  }, e), this.loadingManager = new ts(
@@ -3265,17 +3304,17 @@ class oi {
3265
3304
  if (e === "media")
3266
3305
  return this.videoTextureLoader || (this.videoTextureLoader = new it(this.loadingManager), this.videoTextureLoader.setOptions({ type: "video" }), this.options.prefix && this.videoTextureLoader.setPath(this.options.prefix)), this.videoTextureLoader;
3267
3306
  if (e === "gltf" && (t != null && t.dracoPath))
3268
- return this.dracoGltfLoader || (this.dracoGltfLoader = new Ne(this.loadingManager), this.dracoLoader = new ys(), this.dracoLoader.setDecoderPath(t == null ? void 0 : t.dracoPath), this.dracoGltfLoader.setDRACOLoader(this.dracoLoader), this.options.prefix && this.dracoGltfLoader.setPath(this.options.prefix)), this.dracoGltfLoader;
3307
+ return this.dracoGltfLoader || (this.dracoGltfLoader = new je(this.loadingManager), this.dracoLoader = new vs(), this.dracoLoader.setDecoderPath(t == null ? void 0 : t.dracoPath), this.dracoGltfLoader.setDRACOLoader(this.dracoLoader), this.options.prefix && this.dracoGltfLoader.setPath(this.options.prefix)), this.dracoGltfLoader;
3269
3308
  if (e === "gltf")
3270
- return this.gltfLoader || (this.gltfLoader = new Ne(this.loadingManager), this.options.prefix && this.gltfLoader.setPath(this.options.prefix)), this.gltfLoader;
3309
+ return this.gltfLoader || (this.gltfLoader = new je(this.loadingManager), this.options.prefix && this.gltfLoader.setPath(this.options.prefix)), this.gltfLoader;
3271
3310
  if (e === "lottie")
3272
- return this.lottieLoader || (this.lottieLoader = new Cs(this.loadingManager), this.options.prefix && this.lottieLoader.setPath(this.options.prefix)), this.lottieLoader;
3311
+ return this.lottieLoader || (this.lottieLoader = new Os(this.loadingManager), this.options.prefix && this.lottieLoader.setPath(this.options.prefix)), this.lottieLoader;
3273
3312
  if (e === "gzipJson")
3274
3313
  return this.gzipJsonLoader || (this.gzipJsonLoader = new ii(this.loadingManager), this.options.prefix && this.gzipJsonLoader.setPath(this.options.prefix)), this.gzipJsonLoader;
3275
3314
  if (e === "json")
3276
3315
  return this.jsonLoader || (this.jsonLoader = new Ae(this.loadingManager), this.jsonLoader.setResponseType("json"), this.options.prefix && this.jsonLoader.setPath(this.options.prefix)), this.jsonLoader;
3277
3316
  if (e === "exr")
3278
- return this.exrLoader || (this.exrLoader = new vs(this.loadingManager), this.options.prefix && this.exrLoader.setPath(this.options.prefix)), this.exrLoader;
3317
+ return this.exrLoader || (this.exrLoader = new ys(this.loadingManager), this.options.prefix && this.exrLoader.setPath(this.options.prefix)), this.exrLoader;
3279
3318
  }
3280
3319
  add(e, t) {
3281
3320
  typeof e == "string" && (e = [e]), e.forEach((s) => {
@@ -3472,7 +3511,7 @@ class li {
3472
3511
  }
3473
3512
  disposeMaterial(e) {
3474
3513
  if (!e) return;
3475
- const t = new Pe();
3514
+ const t = new Se();
3476
3515
  t.track(Array.isArray(e) ? e : [e]), t.dispose();
3477
3516
  }
3478
3517
  remove(e) {
@@ -3495,8 +3534,8 @@ class li {
3495
3534
  if (typeof h == "string" && !Number.isNaN(Number(h))) {
3496
3535
  const p = Number(h);
3497
3536
  if (p >= 0 && p < a.length) {
3498
- const v = a[p];
3499
- return this.rmBaseObjectMap(e, v), a[p] = m, m && (this.applyColorSpaceToMaterials(m), this.addBaseObjectMap(e)), !0;
3537
+ const y = a[p];
3538
+ return this.rmBaseObjectMap(e, y), a[p] = m, m && (this.applyColorSpaceToMaterials(m), this.addBaseObjectMap(e)), !0;
3500
3539
  }
3501
3540
  }
3502
3541
  return a[h] = m, !0;
@@ -3565,7 +3604,7 @@ class li {
3565
3604
  });
3566
3605
  }
3567
3606
  applyColorSpaceToMaterials(e) {
3568
- Os({ material: e });
3607
+ Cs({ material: e });
3569
3608
  }
3570
3609
  material2array(e) {
3571
3610
  return Array.isArray(e) ? e : [e];
@@ -3609,7 +3648,7 @@ class li {
3609
3648
  });
3610
3649
  }
3611
3650
  dispose() {
3612
- const e = new Pe();
3651
+ const e = new Se();
3613
3652
  e.track([...this.materials.values()]), e.dispose(), this.materials.clear(), this.fixBaseObjects.clear(), this.materialBaseObjectMap.clear();
3614
3653
  }
3615
3654
  }
@@ -3653,16 +3692,16 @@ class di {
3653
3692
  toneMappingExposure: h,
3654
3693
  outputColorSpace: m,
3655
3694
  logarithmicDepthBuffer: p,
3656
- preserveDrawingBuffer: v,
3657
- stencil: _,
3695
+ preserveDrawingBuffer: y,
3696
+ stencil: f,
3658
3697
  depth: u
3659
3698
  } = i, g = new is({
3660
3699
  alpha: r,
3661
3700
  antialias: n,
3662
3701
  powerPreference: a,
3663
3702
  logarithmicDepthBuffer: p,
3664
- preserveDrawingBuffer: v,
3665
- stencil: _,
3703
+ preserveDrawingBuffer: y,
3704
+ stencil: f,
3666
3705
  depth: u
3667
3706
  });
3668
3707
  g.setSize(t, s), g.setPixelRatio(o), g.toneMappingExposure = h, g.outputColorSpace = m, this.renderer = g;
@@ -3702,7 +3741,7 @@ class mi extends ee {
3702
3741
  }
3703
3742
  removePage(e) {
3704
3743
  super.removePage(e, (t) => {
3705
- const s = new Pe();
3744
+ const s = new Se();
3706
3745
  s.track(t), s.dispose();
3707
3746
  });
3708
3747
  }
@@ -3714,7 +3753,7 @@ class mi extends ee {
3714
3753
  }
3715
3754
  class ui {
3716
3755
  constructor(e) {
3717
- this.event = new ye.EventEmitter();
3756
+ this.event = new ve.EventEmitter();
3718
3757
  const { renderer: t, scene: s, camera: i } = e, r = new bs(
3719
3758
  i,
3720
3759
  t.domElement
@@ -3807,7 +3846,7 @@ class _i {
3807
3846
  const _e = class _e {
3808
3847
  constructor(e) {
3809
3848
  var r, o;
3810
- 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 ns(), this.userData = {}, this.pageActiveIndex = 0, this.pages = new Et(), 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 = Rt(_e.options, e, {
3849
+ this.raycaster = new ht(), this.maxBackufferArea = 5760 * 5760, this.installPlugins = /* @__PURE__ */ new Map(), this._cameraPositon = new I(), this._cameraTarget = new I(), this.event = new ve.EventEmitter(), this.timer = new ns(), this.userData = {}, this.pageActiveIndex = 0, this.pages = new Et(), 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 = Rt(_e.options, e, {
3811
3850
  isMergeableObject: Ts
3812
3851
  }), this.userSetDprCache = this.options.renderer.devicePixelRatio;
3813
3852
  const {
@@ -3857,7 +3896,7 @@ const _e = class _e {
3857
3896
  return this.mListController.mList;
3858
3897
  }
3859
3898
  tweenUpdateRaf() {
3860
- Ce.update(), this.TweenRaf = requestAnimationFrame(this.tweenUpdateRaf.bind(this));
3899
+ Oe.update(), this.TweenRaf = requestAnimationFrame(this.tweenUpdateRaf.bind(this));
3861
3900
  }
3862
3901
  use(e, ...t) {
3863
3902
  this.installPlugins.has(e.pluginName) ? console.log("plugin already installed") : typeof e.install == "function" && (e.install(this, ...t), this.installPlugins.set(e.pluginName, e));
@@ -3884,7 +3923,7 @@ const _e = class _e {
3884
3923
  this.sceneController.setPageActive(e), t && ((s = this.cssRendererController) == null || s.render(t, this.camera)), this.cameraController.setPageActive(e), this.controlsController.setPageActive(e), this.loaderController.setPageActive(e), this.mListController.setPageActive(e), this.leadController.setPageActive(e), this.pageActiveIndex = e;
3885
3924
  }
3886
3925
  init() {
3887
- var f;
3926
+ var _;
3888
3927
  const {
3889
3928
  container: e,
3890
3929
  WebGPUTHREE: t,
@@ -3910,9 +3949,9 @@ const _e = class _e {
3910
3949
  const p = new Rs({
3911
3950
  width: a,
3912
3951
  height: h
3913
- }), v = new mi({}), _ = new Ks({
3952
+ }), y = new mi({}), f = new Ks({
3914
3953
  controlsParams: {
3915
- domElement: (f = o == null ? void 0 : o.domElement) != null ? f : m.renderer.domElement
3954
+ domElement: (_ = o == null ? void 0 : o.domElement) != null ? _ : m.renderer.domElement
3916
3955
  }
3917
3956
  }), u = new ai({
3918
3957
  loaderParams: U({
@@ -3920,21 +3959,21 @@ const _e = class _e {
3920
3959
  }, n)
3921
3960
  }), g = new hi({
3922
3961
  pencil: this
3923
- }), y = new si({
3962
+ }), v = new si({
3924
3963
  pencil: this
3925
3964
  });
3926
- this.sceneController = v, this.cameraController = p, this.controlsController = _, this.loaderController = u, this.mListController = g, this.leadController = y;
3965
+ this.sceneController = y, this.cameraController = p, this.controlsController = f, this.loaderController = u, this.mListController = g, this.leadController = v;
3927
3966
  const l = this.addPage({
3928
3967
  sceneOptions: this.options.scene,
3929
3968
  cameraOptions: this.options.camera
3930
3969
  });
3931
3970
  if (this.showPage(l), s) {
3932
- const O = new Js({
3971
+ const C = new Js({
3933
3972
  container: e,
3934
- sceneController: v,
3973
+ sceneController: y,
3935
3974
  cameraController: p
3936
3975
  });
3937
- O.add(v.scene), this.helperController = O, i && O.addViewHelper();
3976
+ C.add(y.scene), this.helperController = C, i && C.addViewHelper();
3938
3977
  }
3939
3978
  e.appendChild(m.renderer.domElement);
3940
3979
  }
@@ -4056,7 +4095,7 @@ const _e = class _e {
4056
4095
  var s, i, r, o, n, a;
4057
4096
  if (!this.camera || !this.scene)
4058
4097
  return;
4059
- this.event.emit("beforeRender"), this.timer.update(), Ce.update();
4098
+ this.event.emit("beforeRender"), this.timer.update(), Oe.update();
4060
4099
  const e = this.timer.getDelta(), t = this.timer.getElapsed();
4061
4100
  this.controlsController.update(e, t), this.leadController.update(e, t), this.installPlugins.forEach((h) => {
4062
4101
  var m;
@@ -4105,11 +4144,11 @@ const _e = class _e {
4105
4144
  }
4106
4145
  }
4107
4146
  dispose() {
4108
- var e, t, s, i, r, o, n, a, h, m, p, v, _, u;
4109
- this.handeleResize(1, 1, !1), this.stop(), this.timer.dispose(), Ce.removeAll(), this.event.removeAllListeners(), (e = this.resizeObserver) == null || e.unobserve(this.options.container), this.installPlugins.forEach((g) => {
4110
- var y;
4111
- (y = g.dispose) == null || y.call(g);
4112
- }), (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(), (h = this.rendererController) == null || h.dispose(), (m = this.loaderController) == null || m.dispose(), (p = this.leadController) == null || p.dispose(), (v = this.mListController) == null || v.dispose(), this.cssRendererController = void 0, this.installPlugins.clear(), (_ = this.stats) == null || _.dom.remove(), (u = this.renderer) == null || u.domElement.remove(), this._isDispose = !0;
4147
+ var e, t, s, i, r, o, n, a, h, m, p, y, f, u;
4148
+ this.handeleResize(1, 1, !1), this.stop(), this.timer.dispose(), Oe.removeAll(), this.event.removeAllListeners(), (e = this.resizeObserver) == null || e.unobserve(this.options.container), this.installPlugins.forEach((g) => {
4149
+ var v;
4150
+ (v = g.dispose) == null || v.call(g);
4151
+ }), (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(), (h = this.rendererController) == null || h.dispose(), (m = this.loaderController) == null || m.dispose(), (p = this.leadController) == null || p.dispose(), (y = this.mListController) == null || y.dispose(), this.cssRendererController = void 0, this.installPlugins.clear(), (f = this.stats) == null || f.dom.remove(), (u = this.renderer) == null || u.domElement.remove(), this._isDispose = !0;
4113
4152
  }
4114
4153
  };
4115
4154
  _e.options = {
@@ -4137,7 +4176,7 @@ const Xi = J.ACTION;
4137
4176
  export {
4138
4177
  ls as BaseObject,
4139
4178
  rt as Pencil,
4140
- Pe as ResourceTracker,
4179
+ Se as ResourceTracker,
4141
4180
  Xi as cameraControlsAction,
4142
4181
  rt as default
4143
4182
  };