gl-draw 0.17.0-beta.3 → 0.17.0-beta.31

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.
Files changed (34) hide show
  1. package/dist/constants.d.ts +0 -1
  2. package/dist/core/BaseObject/PointerEvent.d.ts +1 -0
  3. package/dist/core/BaseObject/index.d.ts +4 -4
  4. package/dist/core/Composer.d.ts +5 -5
  5. package/dist/core/Helper.d.ts +4 -4
  6. package/dist/core/Lead/Pick.d.ts +35 -3
  7. package/dist/core/Lead/index.d.ts +5 -6
  8. package/dist/core/Pages/Pages.d.ts +1 -0
  9. package/dist/core/Pencil.d.ts +3 -3
  10. package/dist/core/pass/OutputPass.d.ts +1 -2
  11. package/dist/index.js +2 -2
  12. package/dist/index.module.js +501 -408
  13. package/dist/index.module2.js +1097 -0
  14. package/dist/index2.js +140 -0
  15. package/dist/objects/extrudePolygon/createGeometry.d.ts +2 -1
  16. package/dist/objects/group/index.d.ts +1 -0
  17. package/dist/objects/index.js +1 -1
  18. package/dist/objects/index.module.js +339 -379
  19. package/dist/objects/node/index.d.ts +4 -2
  20. package/dist/objects/pie/index.d.ts +2 -1
  21. package/dist/plugins/Worker/getAttributes/conicLine.d.ts +2 -3
  22. package/dist/plugins/Worker/getAttributes/conicPolygon.d.ts +2 -3
  23. package/dist/plugins/Worker/getAttributes/extrudePolygon.d.ts +2 -4
  24. package/dist/plugins/Worker/getAttributes/getCoordinatesArr.d.ts +5 -1
  25. package/dist/plugins/Worker/getAttributes/getMessage.d.ts +1 -1
  26. package/dist/plugins/Worker/getAttributes/line.d.ts +2 -2
  27. package/dist/plugins/Worker/getAttributes/line2.d.ts +2 -2
  28. package/dist/plugins/Worker/getAttributes/splitPolygonsByLongitudeDifference.d.ts +5 -2
  29. package/dist/plugins/Worker/index.d.ts +3 -3
  30. package/dist/plugins/index.js +1 -1
  31. package/dist/plugins/index.module.js +77 -57
  32. package/package.json +1 -1
  33. package/dist/WebGPULineSegments2.js +0 -140
  34. package/dist/WebGPULineSegments2.module.js +0 -1031
@@ -1,13 +1,13 @@
1
1
  var Pt = Object.defineProperty, St = Object.defineProperties;
2
2
  var At = Object.getOwnPropertyDescriptors;
3
- var Me = Object.getOwnPropertySymbols;
4
- var Mt = Object.prototype.hasOwnProperty, Rt = Object.prototype.propertyIsEnumerable;
3
+ var De = Object.getOwnPropertySymbols;
4
+ var Mt = Object.prototype.hasOwnProperty, Dt = Object.prototype.propertyIsEnumerable;
5
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
7
  Mt.call(e, t) && Re(c, t, e[t]);
8
- if (Me)
9
- for (var t of Me(e))
10
- Rt.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
12
  }, te = (c, e) => St(c, At(e));
13
13
  var se = (c, e, t) => new Promise((s, i) => {
@@ -26,15 +26,15 @@ 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";
30
- import Dt from "deepmerge";
29
+ import * as Oe from "@tweenjs/tween.js";
30
+ import Rt from "deepmerge";
31
31
  import Ut from "stats-gl";
32
- import { Vector3 as j, PerspectiveCamera as kt, Matrix4 as W, ShaderMaterial as zt, UniformsUtils as Ft, RawShaderMaterial as Nt, MeshBasicMaterial as It, PointsMaterial as nt, SpriteMaterial as at, Color as jt, Layers as Ht, Vector2 as B, WebGLRenderTarget as Bt, HalfFloatType as Vt, MathUtils as Yt, Vector4 as Zt, Quaternion as lt, Spherical as Wt, Box3 as ht, Sphere as Kt, Raycaster as ct, AxesHelper as De, CameraHelper as $t, PointLightHelper as Gt, DirectionalLightHelper as Xt, SpotLightHelper as qt, HemisphereLightHelper as Qt, Box3Helper as Ue, Scene as dt, Group as ke, Camera as Jt, Loader as pt, FileLoader as Se, Texture as fe, VideoTexture as es, LoadingManager as ts, DataTexture as ss, WebGLRenderer as is, REVISION as rs, Object3D as os, Timer as ns } from "three";
33
- import { M as mt, B as Oe, a as as, R as Pe, I as he } from "./WebGPULineSegments2.module.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
- import { RenderPass as ls } from "three/examples/jsm/postprocessing/RenderPass";
36
- import { SSAOPass as hs } from "three/examples/jsm/postprocessing/SSAOPass";
37
- import { UnrealBloomPass as cs } from "three/examples/jsm/postprocessing/UnrealBloomPass";
35
+ import { RenderPass as hs } from "three/examples/jsm/postprocessing/RenderPass";
36
+ import { SSAOPass as cs } from "three/examples/jsm/postprocessing/SSAOPass";
37
+ import { UnrealBloomPass as ds } from "three/examples/jsm/postprocessing/UnrealBloomPass";
38
38
  import "three/examples/jsm/lines/LineMaterial";
39
39
  import "three/examples/jsm/lines/LineSegmentsGeometry";
40
40
  import "three/examples/jsm/renderers/CSS2DRenderer";
@@ -45,18 +45,18 @@ import "three/examples/jsm/utils/BufferGeometryUtils";
45
45
  import "three-bvh-csg";
46
46
  import "three/examples/jsm/lights/RectAreaLightUniformsLib";
47
47
  import "three/examples/jsm/lines/LineSegments2";
48
- import { ShaderPass as ds } from "three/examples/jsm/postprocessing/ShaderPass";
49
- import { OutputPass as ps } from "three/examples/jsm/postprocessing/OutputPass";
48
+ import { ShaderPass as ps } from "three/examples/jsm/postprocessing/ShaderPass";
49
+ import { OutputPass as ms } from "three/examples/jsm/postprocessing/OutputPass";
50
50
  import { FullScreenQuad as Fe } from "three/examples/jsm/postprocessing/Pass";
51
- import { RectAreaLightHelper as ms } from "three/examples/jsm/helpers/RectAreaLightHelper";
52
- import { ViewHelper as us } from "three/examples/jsm/helpers/ViewHelper";
53
- import { generateUUID as fs, makePromiseCreator as _s } from "esus-lite";
54
- import { DRACOLoader as gs } from "three/examples/jsm/loaders/DRACOLoader";
51
+ import { RectAreaLightHelper as us } from "three/examples/jsm/helpers/RectAreaLightHelper";
52
+ import { ViewHelper as fs } from "three/examples/jsm/helpers/ViewHelper";
53
+ import { generateUUID as _s, makePromiseCreator as gs } from "esus-lite";
54
+ import { DRACOLoader as vs } from "three/examples/jsm/loaders/DRACOLoader";
55
55
  import { EXRLoader as ys } from "three/examples/jsm/loaders/EXRLoader";
56
- import { GLTFLoader as Ne } from "three/examples/jsm/loaders/GLTFLoader";
57
- import { LottieLoader as vs } from "three/examples/jsm/loaders/LottieLoader";
58
- import { a as Cs, C as Os, i as Es } from "./isPlainObject.module.js";
59
- import { TransformControls as Ts } from "three/examples/jsm/controls/TransformControls";
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
+ import { TransformControls as bs } from "three/examples/jsm/controls/TransformControls";
60
60
  const M = {
61
61
  LEFT: 1,
62
62
  RIGHT: 2,
@@ -94,17 +94,17 @@ function Y(c) {
94
94
  function H(c) {
95
95
  return c.isOrthographicCamera;
96
96
  }
97
- const $ = Math.PI * 2, Ie = Math.PI / 2, ut = 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 A(c, e = ut) {
101
+ function A(c, e = mt) {
102
102
  return Math.abs(c) < e;
103
103
  }
104
- function P(c, e, t = ut) {
104
+ function P(c, e, t = mt) {
105
105
  return A(c - e, t);
106
106
  }
107
- function je(c, e) {
107
+ function Ie(c, e) {
108
108
  return Math.round(c / e) * e;
109
109
  }
110
110
  function re(c) {
@@ -119,25 +119,25 @@ 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, w = _ * _ + u * u + g * g;
132
- if (w > C) {
133
- const ve = Math.sqrt(w);
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, b = (t.y + n * u) * r, R = (t.z + n * g) * r;
138
- t.x = (t.x - n * E) * h, t.y = (t.y - n * b) * h, t.z = (t.z - n * R) * h, o.x = m + (_ + E) * h, o.y = p + (u + b) * h, o.z = v + (g + R) * h;
139
- const V = y - c.x, le = l - c.y, wt = f - c.z, xt = o.x - y, bt = o.y - l, Lt = o.z - f;
140
- return V * xt + le * bt + wt * 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
142
  function Ee(c, e) {
143
143
  e.set(0, 0), c.forEach((t) => {
@@ -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, we, D, x, L, G, ne, F, N, Z, Ve, Ye, k, ae, X, Ze, xe, We, be, Le, 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)), we = Object.freeze(new T.Vector3(0, 0, 1)), D = new T.Vector2(), x = 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(), xe = new T.Sphere(), We = new T.Quaternion(), be = new T.Quaternion(), Le = 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,47 +243,47 @@ 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) => {
247
- let w, E;
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
+ let b, E;
248
248
  if (Y(this._camera)) {
249
- const b = x.copy(this._camera.position).sub(this._target), R = this._camera.getEffectiveFOV() * ie, V = b.length() * Math.tan(R * 0.5);
250
- w = this.truckSpeed * l * V / this._elementRect.height, E = this.truckSpeed * f * V / this._elementRect.height;
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 * _ * V / this._elementRect.height;
251
251
  } else if (H(this._camera)) {
252
- const b = this._camera;
253
- w = this.truckSpeed * l * (b.right - b.left) / b.zoom / this._elementRect.width, E = this.truckSpeed * f * (b.top - b.bottom) / b.zoom / this._elementRect.height;
252
+ const x = this._camera;
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(
257
- this._focalOffsetEnd.x + w,
256
+ O ? (C ? this.setFocalOffset(
257
+ this._focalOffsetEnd.x + b,
258
258
  this._focalOffsetEnd.y,
259
259
  this._focalOffsetEnd.z,
260
260
  !0
261
- ) : this.truck(w, 0, !0), this.forward(-E, !0)) : O ? this.setFocalOffset(
262
- this._focalOffsetEnd.x + w,
261
+ ) : this.truck(b, 0, !0), this.forward(-E, !0)) : C ? this.setFocalOffset(
262
+ this._focalOffsetEnd.x + b,
263
263
  this._focalOffsetEnd.y + E,
264
264
  this._focalOffsetEnd.z,
265
265
  !0
266
- ) : this.truck(w, 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), w = this._sphericalEnd.radius, E = this._sphericalEnd.radius * C, b = z(
266
+ ) : this.truck(b, E, !0);
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
- ), R = b - E;
276
- this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(E, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(R, !0), this._dollyToNoClamp(b, !0)) : this._dollyToNoClamp(b, !0), this.dollyToCursor && (this._changedDolly += (this.infinityDolly ? E : b) - w, 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), w = this._zoom, E = this._zoom * C;
279
- this.zoomTo(E, !0), this.dollyToCursor && (this._changedZoom += E - w, this._dollyControlCoord.set(f, O));
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(_, 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(
283
283
  this._camera.up,
284
284
  pe
285
285
  ), this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert(), this._state = d.NONE, this._target = new T.Vector3(), this._targetEnd = this._target.clone(), this._focalOffset = new T.Vector3(), this._focalOffsetEnd = this._focalOffset.clone(), this._spherical = new T.Spherical().setFromVector3(
286
- x.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)
286
+ w.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)
287
287
  ), this._sphericalEnd = this._spherical.clone(), this._lastDistance = this._spherical.radius, this._zoom = this._camera.zoom, this._zoomEnd = this._zoom, this._lastZoom = this._zoom, this._nearPlaneCorners = [
288
288
  new T.Vector3(),
289
289
  new T.Vector3(),
@@ -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(), w = (l.clientX - C.left) / (C.right - C.left), E = (l.clientY - C.top) / (C.bottom - C.top);
309
- if (w < this._interactiveArea.left || w > this._interactiveArea.right || E < this._interactiveArea.top || E > this._interactiveArea.bottom)
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
+ 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;
@@ -383,15 +383,15 @@ class J extends ws {
383
383
  const m = (l) => {
384
384
  if (!this._domElement || !this._enabled || this.mouseButtons.wheel === d.NONE) return;
385
385
  if (this._interactiveArea.left !== 0 || this._interactiveArea.top !== 0 || this._interactiveArea.width !== 1 || this._interactiveArea.height !== 1) {
386
- const E = this._domElement.getBoundingClientRect(), b = (l.clientX - E.left) / (E.right - E.left), R = (l.clientY - E.top) / (E.bottom - E.top);
387
- if (b < this._interactiveArea.left || b > this._interactiveArea.right || R < this._interactiveArea.top || R > this._interactiveArea.bottom)
386
+ const E = this._domElement.getBoundingClientRect(), x = (l.clientX - E.left) / (E.right - E.left), D = (l.clientY - E.top) / (E.bottom - E.top);
387
+ if (x < this._interactiveArea.left || x > this._interactiveArea.right || D < this._interactiveArea.top || D > this._interactiveArea.bottom)
388
388
  return;
389
389
  }
390
390
  if (l.preventDefault(), this.dollyToCursor || this.mouseButtons.wheel === d.ROTATE || this.mouseButtons.wheel === d.TRUCK) {
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, w = 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, w), 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, w), 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,13 +435,13 @@ 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 (Ee(this._activePointers, D), this._getClientRect(this._elementRect), s.copy(D), i.copy(D), this._activePointers.length >= 2) {
441
- const O = D.x - this._activePointers[1].clientX, C = D.y - this._activePointers[1].clientY, w = Math.sqrt(O * O + C * C);
442
- r.set(0, w);
443
- const E = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, b = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
444
- i.set(E, b);
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
+ r.set(0, b);
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
+ i.set(E, x);
445
445
  }
446
446
  if (this._state = 0, !l)
447
447
  this._lockedPointer && (this._state = this._state | this.mouseButtons.left);
@@ -460,31 +460,31 @@ 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, Ee(this._activePointers, D);
466
- const f = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, O = f ? -f.deltaX : i.x - D.x, C = f ? -f.deltaY : i.y - D.y;
467
- if (i.copy(D), ((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) {
468
- const w = 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, b = this.dollyDragInverted ? -1 : 1;
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
+ 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
- b * C * de,
471
- w,
470
+ x * O * de,
471
+ b,
472
472
  E
473
473
  ), this._isUserControllingDolly = !0) : (this._zoomInternal(
474
- b * C * de,
475
- w,
474
+ x * O * de,
475
+ b,
476
476
  E
477
477
  ), this._isUserControllingZoom = !0);
478
478
  }
479
479
  if ((this._state & d.TOUCH_DOLLY) === d.TOUCH_DOLLY || (this._state & d.TOUCH_ZOOM) === d.TOUCH_ZOOM || (this._state & d.TOUCH_DOLLY_TRUCK) === d.TOUCH_DOLLY_TRUCK || (this._state & d.TOUCH_ZOOM_TRUCK) === d.TOUCH_ZOOM_TRUCK || (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._state & d.TOUCH_DOLLY_OFFSET) === d.TOUCH_DOLLY_OFFSET || (this._state & d.TOUCH_ZOOM_OFFSET) === d.TOUCH_ZOOM_OFFSET || (this._state & d.TOUCH_DOLLY_ROTATE) === d.TOUCH_DOLLY_ROTATE || (this._state & d.TOUCH_ZOOM_ROTATE) === d.TOUCH_ZOOM_ROTATE) {
480
- const w = D.x - this._activePointers[1].clientX, E = D.y - this._activePointers[1].clientY, b = Math.sqrt(w * w + E * E), R = r.y - b;
481
- r.set(0, b);
480
+ const b = R.x - this._activePointers[1].clientX, E = R.y - this._activePointers[1].clientY, x = Math.sqrt(b * b + E * E), D = r.y - x;
481
+ r.set(0, x);
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
- (this._state & d.TOUCH_DOLLY) === d.TOUCH_DOLLY || (this._state & d.TOUCH_DOLLY_ROTATE) === d.TOUCH_DOLLY_ROTATE || (this._state & d.TOUCH_DOLLY_TRUCK) === d.TOUCH_DOLLY_TRUCK || (this._state & d.TOUCH_DOLLY_SCREEN_PAN) === d.TOUCH_DOLLY_SCREEN_PAN || (this._state & d.TOUCH_DOLLY_OFFSET) === d.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(R * de, V, le), this._isUserControllingDolly = !0) : (this._zoomInternal(R * de, V, le), this._isUserControllingZoom = !0);
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
- Ee(this._activePointers, D), i.copy(D), this._dragNeedsUpdate = !1, (this._activePointers.length === 0 || this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer) && (this._isDragging = !1), this._activePointers.length === 0 && this._domElement && (this._domElement.ownerDocument.removeEventListener(
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 = x.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
  /**
@@ -910,8 +910,8 @@ class J extends ws {
910
910
  * @category Methods
911
911
  */
912
912
  forward(e, t = !1) {
913
- x.setFromMatrixColumn(this._camera.matrix, 0), x.crossVectors(this._camera.up, x), x.multiplyScalar(e);
914
- const s = L.copy(this._targetEnd).add(x);
913
+ w.setFromMatrixColumn(this._camera.matrix, 0), w.crossVectors(this._camera.up, w), w.multiplyScalar(e);
914
+ const s = L.copy(this._targetEnd).add(w);
915
915
  return this.moveTo(s.x, s.y, s.z, t);
916
916
  }
917
917
  /**
@@ -921,10 +921,10 @@ class J extends ws {
921
921
  * @category Methods
922
922
  */
923
923
  elevate(e, t = !1) {
924
- return x.copy(this._camera.up).multiplyScalar(e), this.moveTo(
925
- this._targetEnd.x + x.x,
926
- this._targetEnd.y + x.y,
927
- this._targetEnd.z + x.z,
924
+ return w.copy(this._camera.up).multiplyScalar(e), this.moveTo(
925
+ this._targetEnd.x + w.x,
926
+ this._targetEnd.y + w.y,
927
+ this._targetEnd.z + w.z,
928
928
  t
929
929
  );
930
930
  }
@@ -938,7 +938,7 @@ class J extends ws {
938
938
  */
939
939
  moveTo(e, t, s, i = !1) {
940
940
  this._isUserControllingTruck = !1;
941
- const r = x.set(e, t, s).sub(this._targetEnd);
941
+ const r = w.set(e, t, s).sub(this._targetEnd);
942
942
  this._encloseToBoundary(this._targetEnd, r, this.boundaryFriction), this._needsUpdate = !0, i || this._target.copy(this._targetEnd);
943
943
  const o = !i || 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);
944
944
  return this._createOnRestPromise(o);
@@ -953,7 +953,7 @@ class J extends ws {
953
953
  * @category Methods
954
954
  */
955
955
  lookInDirectionOf(e, t, s, i = !1) {
956
- const n = x.set(e, t, s).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);
956
+ const n = w.set(e, t, s).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);
957
957
  return this.setPosition(
958
958
  n.x,
959
959
  n.y,
@@ -985,28 +985,28 @@ 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 = je(this._sphericalEnd.theta, Ie), p = je(this._sphericalEnd.phi, Ie);
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 = x.setFromSpherical(this._sphericalEnd).normalize(), _ = We.setFromUnitVectors(v, we), u = P(Math.abs(v.y), 1);
991
- u && _.multiply(be.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(we, v), u && _.premultiply(be.invert()), _.premultiply(this._yAxisUpSpace);
994
- const y = g.getSize(x), 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, w = 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
- ), a.push(this.zoomTo(w, t)), a.push(this.setFocalOffset(0, 0, 0, t));
1009
+ ), a.push(this.zoomTo(b, t)), a.push(this.setFocalOffset(0, 0, 0, t));
1010
1010
  }
1011
1011
  return Promise.all(a);
1012
1012
  }
@@ -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, xe) : xe.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,
@@ -1047,7 +1047,7 @@ class J extends ws {
1047
1047
  */
1048
1048
  setLookAt(e, t, s, i, r, o, n = !1) {
1049
1049
  this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = K.NONE, this._changedDolly = 0;
1050
- const a = L.set(i, r, o), h = x.set(e, t, s);
1050
+ const a = L.set(i, r, o), h = w.set(e, t, s);
1051
1051
  this._targetEnd.copy(a), this._sphericalEnd.setFromVector3(
1052
1052
  h.sub(a).applyQuaternion(this._yAxisUpSpace)
1053
1053
  ), this.normalizeRotations(), this._needsUpdate = !0, n || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
@@ -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 = x.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, w = 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 + w * _,
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,
@@ -1145,7 +1145,7 @@ class J extends ws {
1145
1145
  * @category Methods
1146
1146
  */
1147
1147
  setTarget(e, t, s, i = !1) {
1148
- const r = this.getPosition(x), o = this.setLookAt(
1148
+ const r = this.getPosition(w), o = this.setLookAt(
1149
1149
  r.x,
1150
1150
  r.y,
1151
1151
  r.z,
@@ -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);
1198
- const i = x.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), x.copy(F).add(N).add(Z), x.z = x.z + r, this.dollyTo(r, !1), this.setFocalOffset(-x.x, x.y, -x.z, !1), this.moveTo(e, t, s, !1);
1197
+ this._camera.updateMatrixWorld(), F.setFromMatrixColumn(this._camera.matrixWorldInverse, 0), j.setFromMatrixColumn(this._camera.matrixWorldInverse, 1), Z.setFromMatrixColumn(this._camera.matrixWorldInverse, 2);
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), 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
@@ -1311,7 +1311,7 @@ class J extends ws {
1311
1311
  reset(e = !1) {
1312
1312
  if (!P(this._camera.up.x, this._cameraUp0.x) || !P(this._camera.up.y, this._cameraUp0.y) || !P(this._camera.up.z, this._cameraUp0.z)) {
1313
1313
  this._camera.up.copy(this._cameraUp0);
1314
- const s = this.getPosition(x);
1314
+ const s = this.getPosition(w);
1315
1315
  this.updateCameraUp(), this.setPosition(s.x, s.y, s.z);
1316
1316
  }
1317
1317
  const t = [
@@ -1355,9 +1355,9 @@ class J extends ws {
1355
1355
  * @category Methods
1356
1356
  */
1357
1357
  applyCameraUp() {
1358
- const e = x.subVectors(this._target, this._camera.position).normalize(), t = L.crossVectors(e, this._camera.up);
1358
+ const e = w.subVectors(this._target, this._camera.position).normalize(), t = L.crossVectors(e, this._camera.up);
1359
1359
  this._camera.up.crossVectors(t, e).normalize(), this._camera.updateMatrixWorld();
1360
- const s = this.getPosition(x);
1360
+ const s = this.getPosition(w);
1361
1361
  this.updateCameraUp(), this.setPosition(s.x, s.y, s.z);
1362
1362
  }
1363
1363
  /**
@@ -1454,41 +1454,41 @@ 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 = x.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 = x.copy(this._targetEnd).lerp(O, f), w = this._lastDollyDirection === K.IN && this._spherical.radius <= this.minDistance, E = this._lastDollyDirection === K.OUT && this.maxDistance <= this._spherical.radius;
1466
- if (this.infinityDolly && (w || E)) {
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
+ if (this.infinityDolly && (b || E)) {
1467
1467
  this._sphericalEnd.radius -= p, this._spherical.radius -= p;
1468
- const R = L.copy(_).multiplyScalar(-p);
1469
- C.add(R);
1468
+ const D = L.copy(f).multiplyScalar(-p);
1469
+ O.add(D);
1470
1470
  }
1471
- this._boundary.clampPoint(C, C);
1472
- const b = L.subVectors(C, this._targetEnd);
1473
- this._targetEnd.copy(C), this._target.add(b), this._changedDolly -= p, A(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, _ = x.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 = x.copy(this._targetEnd).lerp(g, l), w = C.dot(f), E = f.multiplyScalar(
1480
- w - 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 b = L.subVectors(C, this._targetEnd);
1484
- this._targetEnd.copy(C), this._target.add(b), this._changedZoom -= p, A(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), (!A(this._focalOffset.x) || !A(this._focalOffset.y) || !A(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), x.copy(F).add(N).add(Z), this._camera.position.add(x), 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
- x.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),
1491
+ w.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),
1492
1492
  1
1493
1493
  );
1494
1494
  const m = this._needsUpdate;
@@ -1515,7 +1515,7 @@ class J extends ws {
1515
1515
  truckSpeed: this.truckSpeed,
1516
1516
  dollyToCursor: this.dollyToCursor,
1517
1517
  target: this._targetEnd.toArray(),
1518
- position: x.setFromSpherical(this._sphericalEnd).add(this._targetEnd).toArray(),
1518
+ position: w.setFromSpherical(this._sphericalEnd).add(this._targetEnd).toArray(),
1519
1519
  zoom: this._zoomEnd,
1520
1520
  focalOffset: this._focalOffsetEnd.toArray(),
1521
1521
  target0: this._target0.toArray(),
@@ -1533,7 +1533,7 @@ class J extends ws {
1533
1533
  fromJSON(e, t = !1) {
1534
1534
  const s = JSON.parse(e);
1535
1535
  this.enabled = s.enabled, this.minDistance = s.minDistance, this.maxDistance = oe(s.maxDistance), this.minZoom = s.minZoom, this.maxZoom = oe(s.maxZoom), this.minPolarAngle = s.minPolarAngle, this.maxPolarAngle = oe(s.maxPolarAngle), this.minAzimuthAngle = oe(s.minAzimuthAngle), this.maxAzimuthAngle = oe(s.maxAzimuthAngle), this.smoothTime = s.smoothTime, this.draggingSmoothTime = s.draggingSmoothTime, this.dollySpeed = s.dollySpeed, this.truckSpeed = s.truckSpeed, this.dollyToCursor = s.dollyToCursor, this._target0.fromArray(s.target0), this._position0.fromArray(s.position0), this._zoom0 = s.zoom0, this._focalOffset0.fromArray(s.focalOffset0), this.moveTo(s.target[0], s.target[1], s.target[2], t), k.setFromVector3(
1536
- x.fromArray(s.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)
1536
+ w.fromArray(s.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)
1537
1537
  ), this.rotateTo(k.theta, k.phi, t), this.dollyTo(k.radius, t), this.zoomTo(s.zoom, t), this.setFocalOffset(
1538
1538
  s.focalOffset[0],
1539
1539
  s.focalOffset[1],
@@ -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++)
1706
- x.fromBufferAttribute(m, p), r = Math.max(r, i.distanceToSquared(x));
1705
+ for (let p = 0, y = m.count; p < y; p++)
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 Ae = { 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) {
@@ -1715,17 +1715,17 @@ Q && typeof Q.ownKeys == "function" ? ue = Q.ownKeys : Object.getOwnPropertySymb
1715
1715
  } : ue = function(e) {
1716
1716
  return Object.getOwnPropertyNames(e);
1717
1717
  };
1718
- function bs(c) {
1718
+ function Ls(c) {
1719
1719
  console && console.warn && console.warn(c);
1720
1720
  }
1721
- var ft = Number.isNaN || function(e) {
1721
+ var ut = Number.isNaN || function(e) {
1722
1722
  return e !== e;
1723
1723
  };
1724
1724
  function S() {
1725
1725
  S.init.call(this);
1726
1726
  }
1727
- Ae.exports = S;
1728
- Ae.exports.once = As;
1727
+ Me.exports = S;
1728
+ Me.exports.once = Ms;
1729
1729
  S.EventEmitter = S;
1730
1730
  S.prototype._events = void 0;
1731
1731
  S.prototype._eventsCount = 0;
@@ -1741,7 +1741,7 @@ Object.defineProperty(S, "defaultMaxListeners", {
1741
1741
  return $e;
1742
1742
  },
1743
1743
  set: function(c) {
1744
- if (typeof c != "number" || c < 0 || ft(c))
1744
+ if (typeof c != "number" || c < 0 || ut(c))
1745
1745
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + c + ".");
1746
1746
  $e = c;
1747
1747
  }
@@ -1750,15 +1750,15 @@ 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
1752
  S.prototype.setMaxListeners = function(e) {
1753
- if (typeof e != "number" || e < 0 || ft(e))
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
- function _t(c) {
1757
+ function ft(c) {
1758
1758
  return c._maxListeners === void 0 ? S.defaultMaxListeners : c._maxListeners;
1759
1759
  }
1760
1760
  S.prototype.getMaxListeners = function() {
1761
- return _t(this);
1761
+ return ft(this);
1762
1762
  };
1763
1763
  S.prototype.emit = function(e) {
1764
1764
  for (var t = [], s = 1; s < arguments.length; s++) t.push(arguments[s]);
@@ -1784,7 +1784,7 @@ S.prototype.emit = function(e) {
1784
1784
  Ke(m[s], this, t);
1785
1785
  return !0;
1786
1786
  };
1787
- function gt(c, e, t, s) {
1787
+ function _t(c, e, t, s) {
1788
1788
  var i, r, o;
1789
1789
  if (ge(t), r = c._events, r === void 0 ? (r = c._events = /* @__PURE__ */ Object.create(null), c._eventsCount = 0) : (r.newListener !== void 0 && (c.emit(
1790
1790
  "newListener",
@@ -1792,33 +1792,33 @@ function gt(c, e, t, s) {
1792
1792
  t.listener ? t.listener : t
1793
1793
  ), r = c._events), o = r[e]), o === void 0)
1794
1794
  o = r[e] = t, ++c._eventsCount;
1795
- else if (typeof o == "function" ? o = r[e] = s ? [t, o] : [o, t] : s ? o.unshift(t) : o.push(t), i = _t(c), i > 0 && o.length > i && !o.warned) {
1795
+ else if (typeof o == "function" ? o = r[e] = s ? [t, o] : [o, t] : s ? o.unshift(t) : o.push(t), i = ft(c), i > 0 && o.length > i && !o.warned) {
1796
1796
  o.warned = !0;
1797
1797
  var n = new Error("Possible EventEmitter memory leak detected. " + o.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
1798
- n.name = "MaxListenersExceededWarning", n.emitter = c, n.type = e, n.count = o.length, bs(n);
1798
+ n.name = "MaxListenersExceededWarning", n.emitter = c, n.type = e, n.count = o.length, Ls(n);
1799
1799
  }
1800
1800
  return c;
1801
1801
  }
1802
1802
  S.prototype.addListener = function(e, t) {
1803
- return gt(this, e, t, !1);
1803
+ return _t(this, e, t, !1);
1804
1804
  };
1805
1805
  S.prototype.on = S.prototype.addListener;
1806
1806
  S.prototype.prependListener = function(e, t) {
1807
- return gt(this, e, t, !0);
1807
+ return _t(this, e, t, !0);
1808
1808
  };
1809
- function Ls() {
1809
+ function Ps() {
1810
1810
  if (!this.fired)
1811
1811
  return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
1812
1812
  }
1813
- function yt(c, e, t) {
1814
- var s = { fired: !1, wrapFn: void 0, target: c, type: e, listener: t }, i = Ls.bind(s);
1813
+ function gt(c, e, t) {
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
1817
  S.prototype.once = function(e, t) {
1818
- return ge(t), this.on(e, yt(this, e, t)), this;
1818
+ return ge(t), this.on(e, gt(this, e, t)), this;
1819
1819
  };
1820
1820
  S.prototype.prependOnceListener = function(e, t) {
1821
- return ge(t), this.prependListener(e, yt(this, e, t)), this;
1821
+ return ge(t), this.prependListener(e, gt(this, e, t)), this;
1822
1822
  };
1823
1823
  S.prototype.removeListener = function(e, t) {
1824
1824
  var s, i, r, o, n;
@@ -1836,7 +1836,7 @@ S.prototype.removeListener = function(e, t) {
1836
1836
  }
1837
1837
  if (r < 0)
1838
1838
  return this;
1839
- r === 0 ? s.shift() : Ps(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
  };
@@ -1865,7 +1865,7 @@ function vt(c, e, t) {
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) : Ot(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
1870
  S.prototype.listeners = function(e) {
1871
1871
  return vt(this, e, !0);
@@ -1874,10 +1874,10 @@ S.prototype.rawListeners = function(e) {
1874
1874
  return vt(this, e, !1);
1875
1875
  };
1876
1876
  S.listenerCount = function(c, e) {
1877
- return typeof c.listenerCount == "function" ? c.listenerCount(e) : Ct.call(c, e);
1877
+ return typeof c.listenerCount == "function" ? c.listenerCount(e) : yt.call(c, e);
1878
1878
  };
1879
- S.prototype.listenerCount = Ct;
1880
- function Ct(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];
@@ -1896,17 +1896,17 @@ function Ot(c, e) {
1896
1896
  t[s] = c[s];
1897
1897
  return t;
1898
1898
  }
1899
- function Ps(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;
1908
1908
  }
1909
- function As(c, e) {
1909
+ function Ms(c, e) {
1910
1910
  return new Promise(function(t, s) {
1911
1911
  function i(o) {
1912
1912
  c.removeListener(e, r), s(o);
@@ -1914,13 +1914,13 @@ function As(c, e) {
1914
1914
  function r() {
1915
1915
  typeof c.removeListener == "function" && c.removeListener("error", i), t([].slice.call(arguments));
1916
1916
  }
1917
- Et(c, e, r, { once: !0 }), e !== "error" && Ms(c, i, { once: !0 });
1917
+ Ct(c, e, r, { once: !0 }), e !== "error" && Ds(c, i, { once: !0 });
1918
1918
  });
1919
1919
  }
1920
- function Ms(c, e, t) {
1921
- typeof c.on == "function" && Et(c, "error", e, t);
1920
+ function Ds(c, e, t) {
1921
+ typeof c.on == "function" && Ct(c, "error", e, t);
1922
1922
  }
1923
- function Et(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,8 +1930,8 @@ function Et(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 = Ae.exports;
1934
- let Rs = class {
1933
+ var ve = Me.exports;
1934
+ let Et = class {
1935
1935
  constructor() {
1936
1936
  this.mask = 1;
1937
1937
  }
@@ -1956,13 +1956,19 @@ let Rs = class {
1956
1956
  isEnabled(e) {
1957
1957
  return (this.mask & (1 << e | 0)) !== 0;
1958
1958
  }
1959
+ getMinDisabledLayer() {
1960
+ const e = ~this.mask;
1961
+ if (!(e & 4294967295)) return null;
1962
+ const t = e & -e;
1963
+ return 31 - Math.clz32(t >>> 0);
1964
+ }
1959
1965
  };
1960
1966
  class ee {
1961
1967
  constructor() {
1962
- 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();
1963
1969
  }
1964
1970
  addController(e, t) {
1965
- const s = new Rs();
1971
+ const s = new Et();
1966
1972
  return s.disableAll(), t !== void 0 && s.set(t), this.controllerMap.set(e, s), t === this.activeIndex && this.activeControllerSet.add(e), e;
1967
1973
  }
1968
1974
  removePage(e, t) {
@@ -1995,9 +2001,9 @@ const Tt = {
1995
2001
  fov: 45,
1996
2002
  near: 1,
1997
2003
  far: 1e3,
1998
- up: new j(0, 1, 0)
2004
+ up: new I(0, 1, 0)
1999
2005
  };
2000
- class Ds extends ee {
2006
+ class Rs extends ee {
2001
2007
  constructor(e) {
2002
2008
  super(), this.width = 0, this.height = 0, this.width = e.width, this.height = e.height;
2003
2009
  }
@@ -2078,7 +2084,7 @@ class Ds extends ee {
2078
2084
  }
2079
2085
  }
2080
2086
  const Us = (c) => {
2081
- const e = new ds(
2087
+ const e = new ps(
2082
2088
  new zt({
2083
2089
  uniforms: {
2084
2090
  baseTexture: { value: null },
@@ -2207,11 +2213,11 @@ const Us = (c) => {
2207
2213
  }`
2208
2214
  )
2209
2215
  };
2210
- class zs extends ps {
2216
+ class zs extends ms {
2211
2217
  constructor() {
2212
2218
  super();
2213
2219
  const e = ks;
2214
- this.uniforms = Ft.clone(e.uniforms), this.material = new Nt({
2220
+ this.uniforms = Ft.clone(e.uniforms), this.material = new jt({
2215
2221
  name: e.name,
2216
2222
  uniforms: this.uniforms,
2217
2223
  vertexShader: e.vertexShader,
@@ -2219,23 +2225,23 @@ class zs extends ps {
2219
2225
  }), this.fsQuad ? this.fsQuad = new Fe(this.material) : this._fsQuad && (this._fsQuad = new Fe(this.material));
2220
2226
  }
2221
2227
  }
2222
- const Fs = new It({ color: "black" }), Ns = new nt({
2228
+ const Fs = new Nt({ color: "black" }), js = new ot({
2223
2229
  color: "black",
2224
2230
  sizeAttenuation: !1
2225
- }), Is = new nt({
2231
+ }), Ns = new ot({
2226
2232
  color: "black",
2227
2233
  sizeAttenuation: !0
2228
- }), js = new at({
2234
+ }), Is = new nt({
2229
2235
  color: "black",
2230
2236
  sizeAttenuation: !0
2231
- }), Hs = new at({
2237
+ }), Hs = new nt({
2232
2238
  color: "black",
2233
2239
  sizeAttenuation: !1
2234
- }), Bs = new mt({
2240
+ }), Bs = new pt({
2235
2241
  color: "black",
2236
2242
  sizeAttenuation: !1,
2237
2243
  lineWidth: 0
2238
- }), Ge = new jt(0), Vs = {
2244
+ }), Ge = new It(0), Vs = {
2239
2245
  kernelRadius: 8,
2240
2246
  minDistance: 5e-3,
2241
2247
  maxDistance: 0.1
@@ -2265,13 +2271,13 @@ class Ws {
2265
2271
  samples: Math.min(n, a),
2266
2272
  type: Vt
2267
2273
  }
2268
- ), p = new ze(o, m), v = this.getSize();
2269
- p.setSize(v.width, v.height);
2270
- const _ = new ls(
2274
+ ), p = new ze(o, m), y = this.getSize();
2275
+ p.setSize(y.width, y.height);
2276
+ const f = new hs(
2271
2277
  s.scene,
2272
2278
  i.camera
2273
2279
  );
2274
- 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) => {
2275
2281
  this.changeCamera(u);
2276
2282
  }), s.event.on("pageChange", (u) => {
2277
2283
  this.changeScene(u);
@@ -2291,11 +2297,11 @@ class Ws {
2291
2297
  this.outputPass && (this.outputPass.uniforms.premultiplieAlpha.value = e ? 1 : 0);
2292
2298
  }
2293
2299
  addSSAOPass(e) {
2294
- const { scene: t, camera: s, renderer: i } = this, r = i.getSize(new B()), o = r.width, n = r.height, a = new hs(t, s, o, n);
2300
+ const { scene: t, camera: s, renderer: i } = this, r = i.getSize(new B()), o = r.width, n = r.height, a = new cs(t, s, o, n);
2295
2301
  a.kernelRadius = e.kernelRadius, a.minDistance = e.minDistance, a.maxDistance = e.maxDistance, this.ssaoPass = a, this.finalComposer.addPass(a);
2296
2302
  }
2297
2303
  addBloomPass(e) {
2298
- const { renderer: t } = this, { threshold: s, strength: i, radius: r, bloomAlphaType: o } = e, n = new cs(
2304
+ const { renderer: t } = this, { threshold: s, strength: i, radius: r, bloomAlphaType: o } = e, n = new ds(
2299
2305
  new B(window.innerWidth, window.innerHeight),
2300
2306
  i,
2301
2307
  r,
@@ -2305,17 +2311,10 @@ class Ws {
2305
2311
  const a = new ze(t);
2306
2312
  a.renderToScreen = !1, a.addPass(this.renderPass), a.addPass(n), this.bloomComposer = a;
2307
2313
  const h = Us(a);
2308
- h.uniforms.bloomAlphaType.value = o, this.bloomComposer = a, this.finalComposer.addPass(h), this.mixPass = h, this.bloomLayer.set(Oe);
2314
+ h.uniforms.bloomAlphaType.value = o, this.bloomComposer = a, this.finalComposer.addPass(h), this.mixPass = h, this.bloomLayer.set(as);
2309
2315
  }
2310
- setBloomSelection(e, t) {
2311
- if (!this.bloomComposer) {
2312
- console.warn("err:pencil.options.bloom");
2313
- return;
2314
- }
2315
- e.traverse((s) => {
2316
- const { object3d: i } = s;
2317
- i && (t ? (this.bloomSelection.add(s), i.layers.enable(Oe)) : (this.bloomSelection.delete(s), i.layers.disable(Oe)));
2318
- }), this.bloomSelection.size === 0 ? this.bloomComposerActive = !1 : this.bloomComposerActive = !0;
2316
+ checkBloomComposerActive() {
2317
+ this.bloomSelection.size === 0 ? this.bloomComposerActive = !1 : this.bloomComposerActive = !0;
2319
2318
  }
2320
2319
  enable() {
2321
2320
  this.active || (this.active = !0);
@@ -2346,7 +2345,7 @@ class Ws {
2346
2345
  e.push(o);
2347
2346
  return;
2348
2347
  }
2349
- this.bloomMaterials[o.uuid] = o.material, n.isSprite ? n.material.sizeAttenuation ? n.material = js : n.material = Hs : o.material instanceof mt ? o.material = Bs : a.isPoints ? a.material.sizeAttenuation ? a.material = Is : a.material = Ns : o.material = Fs;
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;
2350
2349
  }
2351
2350
  });
2352
2351
  }), e.forEach((i) => {
@@ -2401,14 +2400,14 @@ class Ks extends ee {
2401
2400
  super(), this.autoRotateSpeed = 0, this.options = e;
2402
2401
  const t = {
2403
2402
  Vector2: B,
2404
- Vector3: j,
2403
+ Vector3: I,
2405
2404
  Vector4: Zt,
2406
- Quaternion: lt,
2405
+ Quaternion: at,
2407
2406
  Matrix4: W,
2408
2407
  Spherical: Wt,
2409
- Box3: ht,
2408
+ Box3: lt,
2410
2409
  Sphere: Kt,
2411
- Raycaster: ct
2410
+ Raycaster: ht
2412
2411
  };
2413
2412
  J.install({ THREE: t });
2414
2413
  }
@@ -2443,7 +2442,7 @@ class Ks extends ee {
2443
2442
  super.update(e, t), this.autoRotateSpeed && this.cameraControls && (this.cameraControls.azimuthAngle += this.autoRotateSpeed * e * Yt.DEG2RAD);
2444
2443
  }
2445
2444
  }
2446
- const q = new j(), Xe = new W(), qe = new W(), Qe = new j(), Je = new j();
2445
+ const q = new I(), Xe = new W(), qe = new W(), Qe = new I(), Je = new I();
2447
2446
  class $s {
2448
2447
  /**
2449
2448
  * Constructs a new CSS2D renderer.
@@ -2462,54 +2461,54 @@ class $s {
2462
2461
  height: i
2463
2462
  };
2464
2463
  }, this.render = function(u, g) {
2465
- u.matrixWorldAutoUpdate === !0 && u.updateMatrixWorld(), g.parent === null && g.matrixWorldAutoUpdate === !0 && g.updateMatrixWorld(), Xe.copy(g.matrixWorldInverse), qe.multiplyMatrices(g.projectionMatrix, Xe), m(u, u, g), this.sortObjects && _(u);
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);
2466
2465
  }, this.setSize = function(u, g) {
2467
2466
  s = u, i = g, r = s / 2, o = i / 2, a.style.width = u + "px", a.style.height = g + "px";
2468
2467
  };
2469
2468
  function h(u) {
2470
2469
  u.isCSS2DObject && (u.element.style.display = "none");
2471
- for (let g = 0, y = u.children.length; g < y; g++)
2470
+ for (let g = 0, v = u.children.length; g < v; g++)
2472
2471
  h(u.children[g]);
2473
2472
  }
2474
- function m(u, g, y) {
2473
+ function m(u, g, v) {
2475
2474
  if (u.visible === !1) {
2476
2475
  h(u);
2477
2476
  return;
2478
2477
  }
2479
2478
  if (u.isCSS2DObject) {
2480
2479
  q.setFromMatrixPosition(u.matrixWorld), q.applyMatrix4(qe);
2481
- const l = q.z >= -1 && q.z <= 1 && u.layers.test(y.layers) === !0, f = u.element;
2482
- f.style.display = l === !0 ? "" : "none", l === !0 && (u.onBeforeRender(t, g, y), f.style.transform = "translate(" + -100 * u.center.x + "%," + -100 * u.center.y + "%)translate(" + (q.x * r + r) + "px," + (-q.y * o + o) + "px)", f.parentNode !== a && a.appendChild(f), u.onAfterRender(t, g, y));
2483
- const O = {
2484
- distanceToCameraSquared: p(y, u)
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)
2485
2484
  };
2486
- n.objects.set(u, O);
2485
+ n.objects.set(u, C);
2487
2486
  }
2488
- for (let l = 0, f = u.children.length; l < f; l++)
2489
- m(u.children[l], g, y);
2487
+ for (let l = 0, _ = u.children.length; l < _; l++)
2488
+ m(u.children[l], g, v);
2490
2489
  }
2491
2490
  function p(u, g) {
2492
2491
  return Qe.setFromMatrixPosition(u.matrixWorld), Je.setFromMatrixPosition(g.matrixWorld), Qe.distanceToSquared(Je);
2493
2492
  }
2494
- function v(u) {
2493
+ function y(u) {
2495
2494
  const g = [];
2496
- return u.traverseVisible(function(y) {
2497
- y.isCSS2DObject && g.push(y);
2495
+ return u.traverseVisible(function(v) {
2496
+ v.isCSS2DObject && g.push(v);
2498
2497
  }), g;
2499
2498
  }
2500
- function _(u) {
2501
- const g = v(u).sort(function(l, f) {
2502
- if (l.renderOrder !== f.renderOrder)
2503
- return f.renderOrder - l.renderOrder;
2504
- const O = n.objects.get(l).distanceToCameraSquared, C = n.objects.get(f).distanceToCameraSquared;
2505
- return O - C;
2506
- }), y = g.length;
2507
- for (let l = 0, f = g.length; l < f; l++)
2508
- g[l].element.style.zIndex = y - l;
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;
2509
2508
  }
2510
2509
  }
2511
2510
  }
2512
- const et = new j(), Gs = new lt(), tt = new j(), I = new W(), Xs = new W();
2511
+ const et = new I(), Gs = new at(), tt = new I(), N = new W(), Xs = new W();
2513
2512
  class qs {
2514
2513
  /**
2515
2514
  * Constructs a new CSS3D renderer.
@@ -2532,54 +2531,54 @@ class qs {
2532
2531
  width: s,
2533
2532
  height: i
2534
2533
  };
2535
- }, this.render = function(y, l) {
2536
- const f = l.projectionMatrix.elements[5] * o;
2537
- 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();
2538
- let O, C;
2539
- l.isOrthographicCamera && (O = -(l.right + l.left) / 2, C = (l.top + l.bottom) / 2);
2540
- const w = l.view && l.view.enabled ? l.view.height / l.view.fullHeight : 1, E = l.isOrthographicCamera ? `scale( ${w} )scale(` + f + ")translate(" + p(O) + "px," + p(C) + "px)" + v(l.matrixWorldInverse) : `scale( ${w} )translateZ(` + f + "px)" + v(l.matrixWorldInverse), R = (l.isPerspectiveCamera ? "perspective(" + f + "px) " : "") + E + "translate(" + r + "px," + o + "px)";
2541
- n.camera.style !== R && (m.style.transform = R, n.camera.style = R), g(y, y, l);
2542
- }, this.setSize = function(y, l) {
2543
- 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";
2544
2543
  };
2545
- function p(y) {
2546
- return Math.abs(y) < 1e-10 ? 0 : y;
2544
+ function p(v) {
2545
+ return Math.abs(v) < 1e-10 ? 0 : v;
2547
2546
  }
2548
- function v(y) {
2549
- const l = y.elements;
2547
+ function y(v) {
2548
+ const l = v.elements;
2550
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]) + ")";
2551
2550
  }
2552
- function _(y) {
2553
- const l = y.elements;
2551
+ function f(v) {
2552
+ const l = v.elements;
2554
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]) + ")");
2555
2554
  }
2556
- function u(y) {
2557
- y.isCSS3DObject && (y.element.style.display = "none");
2558
- for (let l = 0, f = y.children.length; l < f; l++)
2559
- 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]);
2560
2559
  }
2561
- function g(y, l, f, O) {
2562
- if (y.visible === !1) {
2563
- u(y);
2560
+ function g(v, l, _, C) {
2561
+ if (v.visible === !1) {
2562
+ u(v);
2564
2563
  return;
2565
2564
  }
2566
- if (y.isCSS3DObject) {
2567
- const C = y.layers.test(f.layers) === !0, w = y.element;
2568
- if (w.style.display = C === !0 ? "" : "none", C === !0) {
2569
- 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, _);
2570
2569
  let E;
2571
- y.isCSS3DSprite ? (I.copy(f.matrixWorldInverse), I.transpose(), y.rotation2D !== 0 && I.multiply(Xs.makeRotationZ(y.rotation2D)), y.matrixWorld.decompose(et, Gs, tt), I.setPosition(et), I.scale(tt), I.elements[3] = 0, I.elements[7] = 0, I.elements[11] = 0, I.elements[15] = 1, E = _(I)) : E = _(y.matrixWorld);
2572
- const b = n.objects.get(y);
2573
- if (b === void 0 || b.style !== E) {
2574
- w.style.transform = E;
2575
- const R = { style: E };
2576
- n.objects.set(y, R);
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
+ if (x === void 0 || x.style !== E) {
2573
+ b.style.transform = E;
2574
+ const D = { style: E };
2575
+ n.objects.set(v, D);
2577
2576
  }
2578
- w.parentNode !== m && m.appendChild(w), y.onAfterRender(t, l, f);
2577
+ b.parentNode !== m && m.appendChild(b), v.onAfterRender(t, l, _);
2579
2578
  }
2580
2579
  }
2581
- for (let C = 0, w = y.children.length; C < w; C++)
2582
- g(y.children[C], l, f);
2580
+ for (let O = 0, b = v.children.length; O < b; O++)
2581
+ g(v.children[O], l, _);
2583
2582
  }
2584
2583
  }
2585
2584
  }
@@ -2616,7 +2615,7 @@ class Js {
2616
2615
  let i = this.helpers[t];
2617
2616
  if (i === void 0) {
2618
2617
  if (e.isScene)
2619
- i = new De(100);
2618
+ i = new Ue(100);
2620
2619
  else if (e.isCamera)
2621
2620
  i = new $t(e);
2622
2621
  else if (e.isPointLight)
@@ -2628,13 +2627,13 @@ class Js {
2628
2627
  else if (e.isHemisphereLight)
2629
2628
  i = new Qt(e, 10);
2630
2629
  else if (e.isRectAreaLight)
2631
- i = new ms(e);
2630
+ i = new us(e);
2632
2631
  else {
2633
- const r = new ht();
2632
+ const r = new lt();
2634
2633
  if (r.setFromObject(e, !0), r.isEmpty() === !1) {
2635
- i = new Ue(r);
2634
+ i = new ke(r);
2636
2635
  const o = i.material;
2637
- o.userData.object = e, o.depthTest = !1, o.transparent = !0;
2636
+ o.userData.object = e, o.userData.lastMatrixWorld = e.matrixWorld.clone(), o.depthTest = !1, o.transparent = !0;
2638
2637
  } else
2639
2638
  return;
2640
2639
  }
@@ -2642,7 +2641,7 @@ class Js {
2642
2641
  }
2643
2642
  }
2644
2643
  addViewHelper() {
2645
- const { cameraController: e, container: t } = this.options, s = new us(e.camera, t);
2644
+ const { cameraController: e, container: t } = this.options, s = new fs(e.camera, t);
2646
2645
  t.addEventListener("pointerdown", (i) => {
2647
2646
  i.preventDefault(), s.handleClick(i);
2648
2647
  }), this.viewHelper = s;
@@ -2664,7 +2663,7 @@ class Js {
2664
2663
  }
2665
2664
  removeAllExcludeScene() {
2666
2665
  Object.keys(this.helpers).forEach((e) => {
2667
- this.helpers[e] instanceof De || this.remove({
2666
+ this.helpers[e] instanceof Ue || this.remove({
2668
2667
  uuid: e
2669
2668
  });
2670
2669
  });
@@ -2673,9 +2672,11 @@ class Js {
2673
2672
  var r, o;
2674
2673
  const { cameraController: i } = this.options;
2675
2674
  Object.values(this.helpers).forEach((n) => {
2676
- if (n.update && n.update(), n instanceof Ue) {
2677
- const a = n.material, { object: h } = a.userData;
2678
- h && n.box.setFromObject(h, !0);
2675
+ if (n.update && n.update(), n instanceof ke) {
2676
+ const a = n.material, { object: h, lastMatrixWorld: m } = a.userData;
2677
+ h && !h.matrixWorld.equals(
2678
+ m || h.matrixWorld
2679
+ ) && (n.box.setFromObject(h, !0), a.userData.lastMatrixWorld = h.matrixWorld.clone());
2679
2680
  }
2680
2681
  }), ((r = this.viewHelper) == null ? void 0 : r.animating) === !0 && (this.viewHelper.update(e), (o = t.cameraControls) == null || o.setPosition(
2681
2682
  ...i.camera.position.toArray()
@@ -2692,9 +2693,9 @@ class Js {
2692
2693
  this.helpers = {}, (e = this.viewHelper) == null || e.dispose();
2693
2694
  }
2694
2695
  }
2695
- function it(c) {
2696
+ function Pe(c) {
2696
2697
  let e = !1, t = [];
2697
- return function(...s) {
2698
+ return (...s) => {
2698
2699
  t = s, e || (e = !0, requestAnimationFrame(() => {
2699
2700
  e = !1, c(...t);
2700
2701
  }));
@@ -2706,43 +2707,46 @@ class ei {
2706
2707
  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 = {
2707
2708
  move: !1,
2708
2709
  down: !1
2709
- }, this.pencil = e, this.domElement = ((t = e.options.controls) == null ? void 0 : t.domElement) || e.options.container;
2710
+ }, 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;
2710
2711
  }
2711
2712
  addPickListener(e) {
2712
- const t = /* @__PURE__ */ new Set(["move", "enter", "leave"]), s = /* @__PURE__ */ new Set(["down", "downOutside", "click"]), i = (r) => {
2713
- var v;
2713
+ const t = /* @__PURE__ */ new Set(["move", "enter", "leave", "enterOnStop"]), s = /* @__PURE__ */ new Set(["down", "downOutside", "click"]), i = (r) => {
2714
+ var y;
2714
2715
  if (!this.enabled)
2715
2716
  return;
2716
2717
  r.preventDefault();
2717
2718
  const o = e === "move" ? t : s, n = [];
2718
- if (this.pickFunctionsMap.forEach((_) => {
2719
- o.has(_.type) && n.push(te(U({}, _), {
2720
- objArr: _.objArr instanceof Function ? _.objArr() : _.objArr
2719
+ if (this.pickFunctionsMap.forEach((f) => {
2720
+ o.has(f.type) && n.push(te(U({}, f), {
2721
+ objArr: f.objArr instanceof Function ? f.objArr() : f.objArr
2721
2722
  }));
2722
2723
  }), n.length === 0) return;
2723
2724
  this.activeObjects.clear(), this.objCallbackMap.clear(), this.activeObject = null;
2724
2725
  const a = this.objCallbackMap;
2725
- for (const _ of n)
2726
- for (const u of _.objArr) {
2727
- if (!u.object3d || !u.visibleWithAncestors) continue;
2726
+ for (const f of n)
2727
+ for (const u of f.objArr) {
2728
+ if (!u.object3d) continue;
2728
2729
  a.has(u) || a.set(u, /* @__PURE__ */ new Map());
2729
2730
  const g = a.get(u);
2730
- g.has(_.type) || g.set(_.type, []), g.get(_.type).push(_.cb);
2731
+ g.has(f.type) || g.set(f.type, []), g.get(f.type).push(f.cb);
2731
2732
  }
2732
2733
  if (a.size === 0) return;
2733
- const h = [...a.keys()].map((_) => _.object3d), m = (v = this.pencil.pick(r, h, !0)) == null ? void 0 : v.intersects;
2734
+ const h = [...a.keys()].map((f) => f.object3d), m = (y = this.pencil.pick(r, h, !1)) == null ? void 0 : y.intersects;
2734
2735
  if (!m || m.length === 0)
2735
2736
  e === "down" ? this.handleDownOutside(r) : e === "move" && this.handleLeaveEvents(r);
2736
2737
  else {
2737
- const _ = m[0];
2738
- this.processIntersection(_, r, e);
2738
+ const f = m[0];
2739
+ this.processIntersection(f, r, e);
2739
2740
  }
2741
+ e === "move" && this.hasEnterOnStopEvent && (this.handleMoveStop(r), this.triggeredEnterOnStopObjects.forEach((f) => {
2742
+ this.activeObjects.has(f) || this.triggeredEnterOnStopObjects.delete(f);
2743
+ }));
2740
2744
  const p = this.prevActiveObjects;
2741
2745
  this.prevActiveObjects = this.activeObjects, this.activeObjects = p, this.activeObjects.clear();
2742
2746
  };
2743
2747
  this.domElement.addEventListener(
2744
2748
  `pointer${e}`,
2745
- it(i),
2749
+ Pe(i),
2746
2750
  { passive: !1 }
2747
2751
  );
2748
2752
  }
@@ -2799,10 +2803,10 @@ class ei {
2799
2803
  });
2800
2804
  const m = a.get("click");
2801
2805
  if (m) {
2802
- const p = (v) => {
2803
- v.preventDefault();
2804
- const _ = 5;
2805
- if (!r && Math.abs(v.clientX - e.clientX) <= _ && Math.abs(v.clientY - e.clientY) <= _)
2806
+ const p = (y) => {
2807
+ y.preventDefault();
2808
+ const f = 5;
2809
+ if (!r && Math.abs(y.clientX - e.clientX) <= f && Math.abs(y.clientY - e.clientY) <= f)
2806
2810
  for (const u of m)
2807
2811
  u({
2808
2812
  baseObject: n,
@@ -2840,18 +2844,105 @@ class ei {
2840
2844
  });
2841
2845
  });
2842
2846
  }
2847
+ /** 处理鼠标停止移动事件 */
2848
+ handleMoveStop(e) {
2849
+ 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(() => {
2850
+ this.triggerEnterOnStop();
2851
+ }, this.moveStopDelay);
2852
+ }
2853
+ /** 触发 enterOnStop 事件 */
2854
+ triggerEnterOnStop() {
2855
+ if (!this.lastMoveEvent || this.lastMoveActiveObjects.size === 0) return;
2856
+ const e = this.lastMoveEvent, t = this.objCallbackMap;
2857
+ let s = !1;
2858
+ const i = () => {
2859
+ s = !0;
2860
+ };
2861
+ for (const r of this.lastMoveActiveObjects) {
2862
+ if (s) break;
2863
+ const o = t.get(r);
2864
+ if (!o) continue;
2865
+ const n = o.get("enterOnStop");
2866
+ if (n && !this.triggeredEnterOnStopObjects.has(r)) {
2867
+ this.triggeredEnterOnStopObjects.add(r);
2868
+ for (const a of n)
2869
+ a({
2870
+ baseObject: r,
2871
+ realBaseObject: this.lastMoveRealActiveObject,
2872
+ mouseEvent: e,
2873
+ sp: i
2874
+ });
2875
+ }
2876
+ }
2877
+ this.moveStopTimer = null;
2878
+ }
2879
+ /** 重置鼠标样式 */
2880
+ resetCursor() {
2881
+ this.domElement.style.cursor = "";
2882
+ }
2883
+ /** 添加 cursor 检测监听器 */
2884
+ addCursorListener() {
2885
+ if (this.cursorListenerAdded) return;
2886
+ this.cursorListenerAdded = !0;
2887
+ const e = (t) => {
2888
+ var o;
2889
+ if (!this.enabled)
2890
+ return;
2891
+ this.cursorObjects.size === 0 && this.resetCursor();
2892
+ const s = [...this.cursorObjects.keys()].filter((n) => n.object3d).map((n) => n.object3d);
2893
+ if (s.length === 0) {
2894
+ this.resetCursor();
2895
+ return;
2896
+ }
2897
+ const i = this.pencil.pick(t, s, !1);
2898
+ if (!((o = i == null ? void 0 : i.intersects) != null && o.length)) {
2899
+ this.resetCursor();
2900
+ return;
2901
+ }
2902
+ let r = i.intersects[0].object;
2903
+ for (; r; ) {
2904
+ const n = this.pencil.lead.objMap.get(r);
2905
+ if (n && this.cursorObjects.has(n)) {
2906
+ this.domElement.style.cursor = this.cursorObjects.get(n);
2907
+ return;
2908
+ }
2909
+ r = r.parent;
2910
+ }
2911
+ this.resetCursor();
2912
+ };
2913
+ this.domElement.addEventListener("pointermove", Pe(e), {
2914
+ passive: !0
2915
+ });
2916
+ }
2917
+ /**
2918
+ * 启用物体的 cursor 检测
2919
+ * @param obj 要检测的 BaseObject
2920
+ * @param cursor 鼠标样式,默认 'pointer'
2921
+ */
2922
+ enableCursor(e, t = "pointer") {
2923
+ this.cursorObjects.set(e, t), this.addCursorListener();
2924
+ }
2925
+ /**
2926
+ * 禁用物体的 cursor 检测
2927
+ * @param obj 要移除的 BaseObject
2928
+ */
2929
+ disableCursor(e) {
2930
+ this.cursorObjects.delete(e);
2931
+ }
2843
2932
  handlePick(e, t, s) {
2844
2933
  let i = t;
2845
2934
  i === "mousemove" ? i = "move" : i === "mouseenter" ? i = "enter" : i === "mouseleave" && (i = "leave"), this.pickFunctionsMapIndex += 1;
2846
2935
  const r = this.pickFunctionsMapIndex;
2847
- return this.pickFunctionsMap.set(r, { objArr: e, type: i, cb: s }), this.pickListener.move || Array.from(this.pickFunctionsMap.values()).some(
2848
- (n) => ["move", "enter", "leave"].includes(n.type)
2936
+ 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(
2937
+ (n) => ["move", "enter", "leave", "enterOnStop"].includes(n.type)
2849
2938
  ) && (this.pickListener.move = !0, this.addPickListener("move")), this.pickListener.down || Array.from(this.pickFunctionsMap.values()).some(
2850
2939
  (n) => ["down", "downOutside", "click"].includes(n.type)
2851
2940
  ) && (this.pickListener.down = !0, this.addPickListener("down")), r;
2852
2941
  }
2853
2942
  removePick(e) {
2854
- this.pickFunctionsMap.delete(e);
2943
+ this.pickFunctionsMap.delete(e), this.hasEnterOnStopEvent = Array.from(this.pickFunctionsMap.values()).some(
2944
+ (t) => t.type === "enterOnStop"
2945
+ );
2855
2946
  }
2856
2947
  handlePickNode(e, t, s) {
2857
2948
  if (t === "downOutside")
@@ -2867,7 +2958,7 @@ class ei {
2867
2958
  mouseEvent: p
2868
2959
  }));
2869
2960
  }, m = `pointer${t}`;
2870
- a.element.addEventListener(m, it(h), !1), o.push({ arr: a, type: m, listener: h });
2961
+ a.element.addEventListener(m, Pe(h), !1), o.push({ arr: a, type: m, listener: h });
2871
2962
  }
2872
2963
  return this.pickNodeFunctionsMap.set(i, o), i;
2873
2964
  }
@@ -2884,21 +2975,21 @@ class ei {
2884
2975
  }
2885
2976
  }
2886
2977
  dispose() {
2887
- this.pickFunctionsMap.clear(), this.pickNodeFunctionsMap.clear(), this.activeObjects.clear(), this.prevActiveObjects.clear(), this.objCallbackMap.clear();
2978
+ 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();
2888
2979
  }
2889
2980
  }
2890
2981
  class ti extends ei {
2891
2982
  constructor(e, t) {
2892
- super(e), this.objMap = /* @__PURE__ */ new Map(), this.objects = /* @__PURE__ */ new Map(), this.objectsPm = /* @__PURE__ */ new Map(), this.objectWrapChindIdMap = /* @__PURE__ */ new Map(), this.objectNamesToFactories = /* @__PURE__ */ new Map(), this.mList = t.mList, this.scene = this.createBaseObject(t.scene || new dt(), {
2983
+ super(e), this.objMap = /* @__PURE__ */ new Map(), this.objects = /* @__PURE__ */ new Map(), this.objectsPm = /* @__PURE__ */ new Map(), this.objectWrapChindIdMap = /* @__PURE__ */ new Map(), this.objectNamesToFactories = /* @__PURE__ */ new Map(), this.mList = t.mList, this.scene = this.createBaseObject(t.scene || new ct(), {
2893
2984
  key: "@Scene",
2894
2985
  name: "场景",
2895
2986
  mList: !1
2896
- }), this.group = this.createBaseObject(new ke(), {
2987
+ }), this.group = this.createBaseObject(new Ce(), {
2897
2988
  key: "@Group",
2898
2989
  name: "物体组",
2899
2990
  target: this.scene,
2900
2991
  mList: !1
2901
- }), this.prefabGroup = this.createBaseObject(new ke(), {
2992
+ }), this.prefabGroup = this.createBaseObject(new Ce(), {
2902
2993
  key: "@PrefabGroup",
2903
2994
  name: "预制组",
2904
2995
  target: this.scene,
@@ -2911,7 +3002,9 @@ class ti extends ei {
2911
3002
  createBaseObject(e, t = {}) {
2912
3003
  const s = U({
2913
3004
  mList: !0
2914
- }, t), i = new as();
3005
+ }, t);
3006
+ e instanceof Ce && (e.raycast = (r, o) => r.intersectObjects(e.children, !0, o));
3007
+ const i = new ls();
2915
3008
  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)
2916
3009
  if (s.target.key === "@Scene" && e instanceof Jt)
2917
3010
  i.key = "@Camera";
@@ -2954,12 +3047,12 @@ class ti extends ei {
2954
3047
  }
2955
3048
  draw(e, t, s) {
2956
3049
  return se(this, null, function* () {
2957
- var p, v, _;
3050
+ var p, y, f;
2958
3051
  const i = this.objectNamesToFactories.get(String(e));
2959
3052
  if (!i)
2960
3053
  throw new Error(`Unrecognized factory: ${String(e)}`);
2961
3054
  t || (t = {}), t.target === void 0 && (t.target = s);
2962
- 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);
3055
+ 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);
2963
3056
  let m;
2964
3057
  if (r === null)
2965
3058
  m = null;
@@ -2993,7 +3086,7 @@ class ti extends ei {
2993
3086
  {
2994
3087
  type: t.type,
2995
3088
  key: t.key,
2996
- uId: fs()
3089
+ uId: _s()
2997
3090
  },
2998
3091
  s
2999
3092
  ) : (e.key = i, e.keyType = o, e.keyUId = n, e.keyName = r, this.objects.set(i, e), i);
@@ -3097,12 +3190,12 @@ class si extends ee {
3097
3190
  });
3098
3191
  }
3099
3192
  }
3100
- class ii extends pt {
3193
+ class ii extends dt {
3101
3194
  constructor(e) {
3102
3195
  super(e);
3103
3196
  }
3104
3197
  load(e, t, s, i) {
3105
- const r = new Se(this.manager);
3198
+ const r = new Ae(this.manager);
3106
3199
  r.setResponseType("blob"), r.setRequestHeader(this.requestHeader), r.setPath(this.path), r.setWithCredentials(this.withCredentials), r.load(
3107
3200
  e,
3108
3201
  (o) => {
@@ -3118,7 +3211,7 @@ class ii extends pt {
3118
3211
  );
3119
3212
  }
3120
3213
  }
3121
- class rt extends pt {
3214
+ class it extends dt {
3122
3215
  constructor(e) {
3123
3216
  super(e), this.options = { type: "image" };
3124
3217
  }
@@ -3128,21 +3221,21 @@ class rt extends pt {
3128
3221
  load(e, t, s, i) {
3129
3222
  let r, o;
3130
3223
  this.options.type === "image" ? (o = document.createElement("img"), r = new fe(o)) : this.options.type === "video" ? (o = document.createElement("video"), o.preload = "auto", o.autoplay = !1, o.loop = !1, o.muted = !0, o.setAttribute("webkit-playsinline", "webkit-playsinline"), o.setAttribute("playsinline", ""), r = new es(o)) : r = new fe();
3131
- const n = new Se(this.manager);
3224
+ const n = new Ae(this.manager);
3132
3225
  return n.setResponseType("blob"), n.setRequestHeader(this.requestHeader), n.setPath(this.path), n.setWithCredentials(this.withCredentials), n.load(
3133
3226
  e,
3134
3227
  (a) => {
3135
3228
  let h = a;
3136
3229
  const m = e.split(".").pop(), p = this.options.type === "image" ? `image/${m || "png"}` : `video/${m || "mp4"}`;
3137
3230
  h = h.slice(0, a.size, p);
3138
- const v = () => {
3139
- o.removeEventListener("load", _, !1), o.removeEventListener("error", u, !1);
3140
- }, _ = () => {
3141
- v(), r.needsUpdate = !0, t && t(r);
3142
- }, u = (y) => {
3143
- v(), i && i(y), this.manager.itemError(e), this.manager.itemEnd(e);
3231
+ const y = () => {
3232
+ o.removeEventListener("load", f, !1), o.removeEventListener("error", u, !1);
3233
+ }, f = () => {
3234
+ y(), r.needsUpdate = !0, t && t(r);
3235
+ }, u = (v) => {
3236
+ y(), i && i(v), this.manager.itemError(e), this.manager.itemEnd(e);
3144
3237
  };
3145
- o.addEventListener("load", _, !1), o.addEventListener("error", u, !1);
3238
+ o.addEventListener("load", f, !1), o.addEventListener("error", u, !1);
3146
3239
  const g = window.URL.createObjectURL(h);
3147
3240
  o.src = g;
3148
3241
  },
@@ -3162,7 +3255,7 @@ const ri = {
3162
3255
  };
3163
3256
  class oi {
3164
3257
  constructor(e) {
3165
- this.loadObj = [], this.delLoadArr = [], this.assets = /* @__PURE__ */ new Map(), this.event = new ye.EventEmitter(), this.options = U({
3258
+ this.loadObj = [], this.delLoadArr = [], this.assets = /* @__PURE__ */ new Map(), this.event = new ve.EventEmitter(), this.options = U({
3166
3259
  simpleTexture4deleted: !1,
3167
3260
  prefix: ""
3168
3261
  }, e), this.loadingManager = new ts(
@@ -3209,19 +3302,19 @@ class oi {
3209
3302
  }
3210
3303
  getLoader(e, t) {
3211
3304
  if (e === "images")
3212
- return this.textureLoader || (this.textureLoader = new rt(this.loadingManager), this.options.prefix && this.textureLoader.setPath(this.options.prefix)), this.textureLoader;
3305
+ return this.textureLoader || (this.textureLoader = new it(this.loadingManager), this.options.prefix && this.textureLoader.setPath(this.options.prefix)), this.textureLoader;
3213
3306
  if (e === "media")
3214
- return this.videoTextureLoader || (this.videoTextureLoader = new rt(this.loadingManager), this.videoTextureLoader.setOptions({ type: "video" }), this.options.prefix && this.videoTextureLoader.setPath(this.options.prefix)), this.videoTextureLoader;
3307
+ 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;
3215
3308
  if (e === "gltf" && (t != null && t.dracoPath))
3216
- return this.dracoGltfLoader || (this.dracoGltfLoader = new Ne(this.loadingManager), this.dracoLoader = new gs(), 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;
3309
+ 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;
3217
3310
  if (e === "gltf")
3218
- return this.gltfLoader || (this.gltfLoader = new Ne(this.loadingManager), this.options.prefix && this.gltfLoader.setPath(this.options.prefix)), this.gltfLoader;
3311
+ return this.gltfLoader || (this.gltfLoader = new je(this.loadingManager), this.options.prefix && this.gltfLoader.setPath(this.options.prefix)), this.gltfLoader;
3219
3312
  if (e === "lottie")
3220
- return this.lottieLoader || (this.lottieLoader = new vs(this.loadingManager), this.options.prefix && this.lottieLoader.setPath(this.options.prefix)), this.lottieLoader;
3313
+ return this.lottieLoader || (this.lottieLoader = new Os(this.loadingManager), this.options.prefix && this.lottieLoader.setPath(this.options.prefix)), this.lottieLoader;
3221
3314
  if (e === "gzipJson")
3222
3315
  return this.gzipJsonLoader || (this.gzipJsonLoader = new ii(this.loadingManager), this.options.prefix && this.gzipJsonLoader.setPath(this.options.prefix)), this.gzipJsonLoader;
3223
3316
  if (e === "json")
3224
- return this.jsonLoader || (this.jsonLoader = new Se(this.loadingManager), this.jsonLoader.setResponseType("json"), this.options.prefix && this.jsonLoader.setPath(this.options.prefix)), this.jsonLoader;
3317
+ return this.jsonLoader || (this.jsonLoader = new Ae(this.loadingManager), this.jsonLoader.setResponseType("json"), this.options.prefix && this.jsonLoader.setPath(this.options.prefix)), this.jsonLoader;
3225
3318
  if (e === "exr")
3226
3319
  return this.exrLoader || (this.exrLoader = new ys(this.loadingManager), this.options.prefix && this.exrLoader.setPath(this.options.prefix)), this.exrLoader;
3227
3320
  }
@@ -3259,7 +3352,7 @@ class oi {
3259
3352
  const s = (n = t == null ? void 0 : t.type) != null ? n : this.getAssetType(e);
3260
3353
  if (!s)
3261
3354
  return;
3262
- const i = (t == null ? void 0 : t.cache) !== !1, r = _s();
3355
+ const i = (t == null ? void 0 : t.cache) !== !1, r = gs();
3263
3356
  if (i) {
3264
3357
  if (this.assets.has(e))
3265
3358
  return this.assets.get(e);
@@ -3420,7 +3513,7 @@ class li {
3420
3513
  }
3421
3514
  disposeMaterial(e) {
3422
3515
  if (!e) return;
3423
- const t = new Pe();
3516
+ const t = new Se();
3424
3517
  t.track(Array.isArray(e) ? e : [e]), t.dispose();
3425
3518
  }
3426
3519
  remove(e) {
@@ -3443,8 +3536,8 @@ class li {
3443
3536
  if (typeof h == "string" && !Number.isNaN(Number(h))) {
3444
3537
  const p = Number(h);
3445
3538
  if (p >= 0 && p < a.length) {
3446
- const v = a[p];
3447
- return this.rmBaseObjectMap(e, v), a[p] = m, m && (this.applyColorSpaceToMaterials(m), this.addBaseObjectMap(e)), !0;
3539
+ const y = a[p];
3540
+ return this.rmBaseObjectMap(e, y), a[p] = m, m && (this.applyColorSpaceToMaterials(m), this.addBaseObjectMap(e)), !0;
3448
3541
  }
3449
3542
  }
3450
3543
  return a[h] = m, !0;
@@ -3557,7 +3650,7 @@ class li {
3557
3650
  });
3558
3651
  }
3559
3652
  dispose() {
3560
- const e = new Pe();
3653
+ const e = new Se();
3561
3654
  e.track([...this.materials.values()]), e.dispose(), this.materials.clear(), this.fixBaseObjects.clear(), this.materialBaseObjectMap.clear();
3562
3655
  }
3563
3656
  }
@@ -3584,7 +3677,7 @@ const ci = {
3584
3677
  powerPreference: "high-performance",
3585
3678
  toneMappingExposure: 1,
3586
3679
  alpha: !1,
3587
- outputColorSpace: Os.sRGB,
3680
+ outputColorSpace: Es.sRGB,
3588
3681
  logarithmicDepthBuffer: !1,
3589
3682
  preserveDrawingBuffer: !1,
3590
3683
  stencil: !1,
@@ -3601,16 +3694,16 @@ class di {
3601
3694
  toneMappingExposure: h,
3602
3695
  outputColorSpace: m,
3603
3696
  logarithmicDepthBuffer: p,
3604
- preserveDrawingBuffer: v,
3605
- stencil: _,
3697
+ preserveDrawingBuffer: y,
3698
+ stencil: f,
3606
3699
  depth: u
3607
3700
  } = i, g = new is({
3608
3701
  alpha: r,
3609
3702
  antialias: n,
3610
3703
  powerPreference: a,
3611
3704
  logarithmicDepthBuffer: p,
3612
- preserveDrawingBuffer: v,
3613
- stencil: _,
3705
+ preserveDrawingBuffer: y,
3706
+ stencil: f,
3614
3707
  depth: u
3615
3708
  });
3616
3709
  g.setSize(t, s), g.setPixelRatio(o), g.toneMappingExposure = h, g.outputColorSpace = m, this.renderer = g;
@@ -3645,12 +3738,12 @@ class mi extends ee {
3645
3738
  super(), this.options = e;
3646
3739
  }
3647
3740
  addScene(e, t) {
3648
- const s = new dt();
3741
+ const s = new ct();
3649
3742
  return e != null && e.background && (s.background = e.background), this.addController(s, t);
3650
3743
  }
3651
3744
  removePage(e) {
3652
3745
  super.removePage(e, (t) => {
3653
- const s = new Pe();
3746
+ const s = new Se();
3654
3747
  s.track(t), s.dispose();
3655
3748
  });
3656
3749
  }
@@ -3662,8 +3755,8 @@ class mi extends ee {
3662
3755
  }
3663
3756
  class ui {
3664
3757
  constructor(e) {
3665
- this.event = new ye.EventEmitter();
3666
- const { renderer: t, scene: s, camera: i } = e, r = new Ts(
3758
+ this.event = new ve.EventEmitter();
3759
+ const { renderer: t, scene: s, camera: i } = e, r = new bs(
3667
3760
  i,
3668
3761
  t.domElement
3669
3762
  );
@@ -3755,8 +3848,8 @@ class _i {
3755
3848
  const _e = class _e {
3756
3849
  constructor(e) {
3757
3850
  var r, o;
3758
- this.raycaster = new ct(), this.maxBackufferArea = 5760 * 5760, this.installPlugins = /* @__PURE__ */ new Map(), this._cameraPositon = new j(), this._cameraTarget = new j(), this.event = new ye.EventEmitter(), this.timer = new ns(), this.userData = {}, this.pageActiveIndex = 0, this.pageCountIndex = 0, this.userSetDprCache = 1, this.viewPadding = [0, 0, 0, 0], this._isDispose = !1, this.event.setMaxListeners(1 / 0), (o = (r = this.timer).connect) == null || o.call(r, document), this.options = Dt(_e.options, e, {
3759
- isMergeableObject: Es
3851
+ 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, {
3852
+ isMergeableObject: Ts
3760
3853
  }), this.userSetDprCache = this.options.renderer.devicePixelRatio;
3761
3854
  const {
3762
3855
  container: t,
@@ -3805,7 +3898,7 @@ const _e = class _e {
3805
3898
  return this.mListController.mList;
3806
3899
  }
3807
3900
  tweenUpdateRaf() {
3808
- Ce.update(), this.TweenRaf = requestAnimationFrame(this.tweenUpdateRaf.bind(this));
3901
+ Oe.update(), this.TweenRaf = requestAnimationFrame(this.tweenUpdateRaf.bind(this));
3809
3902
  }
3810
3903
  use(e, ...t) {
3811
3904
  this.installPlugins.has(e.pluginName) ? console.log("plugin already installed") : typeof e.install == "function" && (e.install(this, ...t), this.installPlugins.set(e.pluginName, e));
@@ -3814,16 +3907,16 @@ const _e = class _e {
3814
3907
  sceneOptions: e,
3815
3908
  cameraOptions: t
3816
3909
  } = {}) {
3817
- const s = this.pageCountIndex + 1, i = this.cameraController.addPerspectiveCamera(
3910
+ const s = this.pages.getMinDisabledLayer(), i = this.cameraController.addPerspectiveCamera(
3818
3911
  t,
3819
3912
  s
3820
3913
  ), r = this.sceneController.addScene(e, s);
3821
3914
  r.add(i), this.controlsController.addCameraControls(i, s), this.loaderController.addLoader(r, s);
3822
3915
  const o = this.mListController.addMList(null, s);
3823
- return this.leadController.addLead(r, o, s), this.pageCountIndex = s, s;
3916
+ return this.leadController.addLead(r, o, s), this.pages.enable(s), s;
3824
3917
  }
3825
3918
  removePage(e) {
3826
- this.cameraController.removePage(e), this.sceneController.removePage(e), this.controlsController.removePage(e), this.loaderController.removePage(e), this.mListController.removePage(e), this.leadController.removePage(e), this.pageCountIndex === e && (this.pageCountIndex -= 1), this.pageActiveIndex === e && (this.render(), this.showPage(0));
3919
+ this.controlsController.removePage(e), this.loaderController.removePage(e), this.leadController.removePage(e), this.cameraController.removePage(e), this.sceneController.removePage(e), this.mListController.removePage(e), this.pages.disable(e), this.pageActiveIndex === e && (this.render(), this.showPage(0));
3827
3920
  }
3828
3921
  showPage(e) {
3829
3922
  var s;
@@ -3832,7 +3925,7 @@ const _e = class _e {
3832
3925
  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;
3833
3926
  }
3834
3927
  init() {
3835
- var f;
3928
+ var _;
3836
3929
  const {
3837
3930
  container: e,
3838
3931
  WebGPUTHREE: t,
@@ -3855,12 +3948,12 @@ const _e = class _e {
3855
3948
  })
3856
3949
  });
3857
3950
  this.rendererController = m;
3858
- const p = new Ds({
3951
+ const p = new Rs({
3859
3952
  width: a,
3860
3953
  height: h
3861
- }), v = new mi({}), _ = new Ks({
3954
+ }), y = new mi({}), f = new Ks({
3862
3955
  controlsParams: {
3863
- domElement: (f = o == null ? void 0 : o.domElement) != null ? f : m.renderer.domElement
3956
+ domElement: (_ = o == null ? void 0 : o.domElement) != null ? _ : m.renderer.domElement
3864
3957
  }
3865
3958
  }), u = new ai({
3866
3959
  loaderParams: U({
@@ -3868,21 +3961,21 @@ const _e = class _e {
3868
3961
  }, n)
3869
3962
  }), g = new hi({
3870
3963
  pencil: this
3871
- }), y = new si({
3964
+ }), v = new si({
3872
3965
  pencil: this
3873
3966
  });
3874
- this.sceneController = v, this.cameraController = p, this.controlsController = _, this.loaderController = u, this.mListController = g, this.leadController = y;
3967
+ this.sceneController = y, this.cameraController = p, this.controlsController = f, this.loaderController = u, this.mListController = g, this.leadController = v;
3875
3968
  const l = this.addPage({
3876
3969
  sceneOptions: this.options.scene,
3877
3970
  cameraOptions: this.options.camera
3878
3971
  });
3879
3972
  if (this.showPage(l), s) {
3880
- const O = new Js({
3973
+ const C = new Js({
3881
3974
  container: e,
3882
- sceneController: v,
3975
+ sceneController: y,
3883
3976
  cameraController: p
3884
3977
  });
3885
- O.add(v.scene), this.helperController = O, i && O.addViewHelper();
3978
+ C.add(y.scene), this.helperController = C, i && C.addViewHelper();
3886
3979
  }
3887
3980
  e.appendChild(m.renderer.domElement);
3888
3981
  }
@@ -4004,7 +4097,7 @@ const _e = class _e {
4004
4097
  var s, i, r, o, n, a;
4005
4098
  if (!this.camera || !this.scene)
4006
4099
  return;
4007
- this.event.emit("beforeRender"), this.timer.update(), Ce.update();
4100
+ this.event.emit("beforeRender"), this.timer.update(), Oe.update();
4008
4101
  const e = this.timer.getDelta(), t = this.timer.getElapsed();
4009
4102
  this.controlsController.update(e, t), this.leadController.update(e, t), this.installPlugins.forEach((h) => {
4010
4103
  var m;
@@ -4053,11 +4146,11 @@ const _e = class _e {
4053
4146
  }
4054
4147
  }
4055
4148
  dispose() {
4056
- var e, t, s, i, r, o, n, a, h, m, p, v, _, u;
4057
- 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) => {
4058
- var y;
4059
- (y = g.dispose) == null || y.call(g);
4060
- }), (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;
4149
+ var e, t, s, i, r, o, n, a, h, m, p, y, f, u;
4150
+ 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) => {
4151
+ var v;
4152
+ (v = g.dispose) == null || v.call(g);
4153
+ }), (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;
4061
4154
  }
4062
4155
  };
4063
4156
  _e.options = {
@@ -4080,12 +4173,12 @@ _e.options = {
4080
4173
  css3DRenderer: !1,
4081
4174
  css3DRendererParams: U({}, st)
4082
4175
  };
4083
- let ot = _e;
4176
+ let rt = _e;
4084
4177
  const Xi = J.ACTION;
4085
4178
  export {
4086
- as as BaseObject,
4087
- ot as Pencil,
4088
- Pe as ResourceTracker,
4179
+ ls as BaseObject,
4180
+ rt as Pencil,
4181
+ Se as ResourceTracker,
4089
4182
  Xi as cameraControlsAction,
4090
- ot as default
4183
+ rt as default
4091
4184
  };