gl-draw 0.17.0-beta.41 → 0.17.0-beta.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,10 +26,10 @@ 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 Oe from "@tweenjs/tween.js";
29
+ import * as Ce from "@tweenjs/tween.js";
30
30
  import Dt from "deepmerge";
31
31
  import Ut from "stats-gl";
32
- import { Vector3 as 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 ke, CameraHelper as $t, PointLightHelper as Gt, DirectionalLightHelper as Xt, SpotLightHelper as qt, HemisphereLightHelper as Qt, Box3Helper as ze, Scene as ct, Group as Ce, Camera as Jt, Loader as dt, FileLoader as Me, Texture as fe, VideoTexture as es, LoadingManager as ts, DataTexture as ss, WebGLRenderer as is, REVISION as rs, Object3D as os, Timer as ns } from "three";
32
+ import { Vector3 as 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 ke, CameraHelper as $t, PointLightHelper as Gt, DirectionalLightHelper as Xt, SpotLightHelper as qt, HemisphereLightHelper as Qt, Box3Helper as ze, Scene as ct, Group as Oe, Camera as Jt, Loader as dt, FileLoader as Me, Texture as fe, VideoTexture as es, LoadingManager as ts, DataTexture as ss, WebGLRenderer as is, REVISION as rs, Object3D as os, Timer as ns } from "three";
33
33
  import { M as pt, B as as, a as ls, R as Se, I as he } from "./index.module2.js";
34
34
  import { EffectComposer as Fe } from "three/examples/jsm/postprocessing/EffectComposer";
35
35
  import { RenderPass as hs } from "three/examples/jsm/postprocessing/RenderPass";
@@ -54,8 +54,8 @@ import { generateUUID as _s, makePromiseCreator as gs } from "esus-lite";
54
54
  import { DRACOLoader as ys } from "three/examples/jsm/loaders/DRACOLoader";
55
55
  import { EXRLoader as vs } from "three/examples/jsm/loaders/EXRLoader";
56
56
  import { GLTFLoader as Ne } 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 bs } from "./isPlainObject.module.js";
57
+ import { LottieLoader as Cs } from "three/examples/jsm/loaders/LottieLoader";
58
+ import { a as Os, C as Es, i as bs } from "./isPlainObject.module.js";
59
59
  import { TransformControls as Ts } from "three/examples/jsm/controls/TransformControls";
60
60
  const M = {
61
61
  LEFT: 1,
@@ -128,10 +128,10 @@ function Be(c, e, t, s, i = 1 / 0, r, o) {
128
128
  s = Math.max(1e-4, s);
129
129
  const n = 2 / s, a = n * r, h = 1 / (1 + a + 0.48 * a * a + 0.235 * a * a * a);
130
130
  let m = e.x, p = e.y, v = e.z, f = c.x - m, u = c.y - p, g = c.z - v;
131
- const y = m, l = p, _ = v, C = i * s, O = C * C, T = f * f + u * u + g * g;
132
- if (T > O) {
131
+ const y = m, l = p, _ = v, O = i * s, C = O * O, T = f * f + u * u + g * g;
132
+ if (T > C) {
133
133
  const ve = Math.sqrt(T);
134
- f = f / ve * C, u = u / ve * C, g = g / ve * C;
134
+ f = f / ve * O, u = u / ve * O, g = g / ve * O;
135
135
  }
136
136
  m = c.x - f, p = c.y - u, v = c.z - g;
137
137
  const E = (t.x + n * f) * r, x = (t.y + n * u) * r, R = (t.z + n * g) * r;
@@ -243,7 +243,7 @@ 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 b.Vector3(), this._focalOffsetVelocity = new b.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (l, _, C, O) => {
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 b.Vector3(), this._focalOffsetVelocity = new b.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (l, _, O, C) => {
247
247
  let T, E;
248
248
  if (Y(this._camera)) {
249
249
  const x = w.copy(this._camera.position).sub(this._target), R = this._camera.getEffectiveFOV() * ie, V = x.length() * Math.tan(R * 0.5);
@@ -253,30 +253,30 @@ class J extends ws {
253
253
  T = 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
- O ? (C ? this.setFocalOffset(
256
+ C ? (O ? this.setFocalOffset(
257
257
  this._focalOffsetEnd.x + T,
258
258
  this._focalOffsetEnd.y,
259
259
  this._focalOffsetEnd.z,
260
260
  !0
261
- ) : this.truck(T, 0, !0), this.forward(-E, !0)) : C ? this.setFocalOffset(
261
+ ) : this.truck(T, 0, !0), this.forward(-E, !0)) : O ? this.setFocalOffset(
262
262
  this._focalOffsetEnd.x + T,
263
263
  this._focalOffsetEnd.y + E,
264
264
  this._focalOffsetEnd.z,
265
265
  !0
266
266
  ) : this.truck(T, E, !0);
267
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), T = this._sphericalEnd.radius, E = this._sphericalEnd.radius * O, x = z(
268
+ const O = $ * this.azimuthRotateSpeed * l / this._elementRect.height, C = $ * this.polarRotateSpeed * _ / this._elementRect.height;
269
+ this.rotate(O, C, !0);
270
+ }, this._dollyInternal = (l, _, O) => {
271
+ const C = Math.pow(0.95, -l * this.dollySpeed), T = this._sphericalEnd.radius, E = this._sphericalEnd.radius * C, x = z(
272
272
  E,
273
273
  this.minDistance,
274
274
  this.maxDistance
275
275
  ), R = x - E;
276
- this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(E, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(R, !0), this._dollyToNoClamp(x, !0)) : this._dollyToNoClamp(x, !0), this.dollyToCursor && (this._changedDolly += (this.infinityDolly ? E : x) - T, this._dollyControlCoord.set(_, C)), this._lastDollyDirection = Math.sign(-l);
277
- }, this._zoomInternal = (l, _, C) => {
278
- const O = Math.pow(0.95, l * this.dollySpeed), T = this._zoom, E = this._zoom * O;
279
- this.zoomTo(E, !0), this.dollyToCursor && (this._changedZoom += E - T, this._dollyControlCoord.set(_, C));
276
+ this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(E, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(R, !0), this._dollyToNoClamp(x, !0)) : this._dollyToNoClamp(x, !0), this.dollyToCursor && (this._changedDolly += (this.infinityDolly ? E : x) - T, this._dollyControlCoord.set(_, O)), this._lastDollyDirection = Math.sign(-l);
277
+ }, this._zoomInternal = (l, _, O) => {
278
+ const C = Math.pow(0.95, l * this.dollySpeed), T = this._zoom, E = this._zoom * C;
279
+ this.zoomTo(E, !0), this.dollyToCursor && (this._changedZoom += E - T, this._dollyControlCoord.set(_, O));
280
280
  }, typeof b == "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 b.Quaternion().setFromUnitVectors(
@@ -305,18 +305,18 @@ class J extends ws {
305
305
  const s = new b.Vector2(), i = new b.Vector2(), r = new b.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 O = this._domElement.getBoundingClientRect(), T = (l.clientX - O.left) / (O.right - O.left), E = (l.clientY - O.top) / (O.bottom - O.top);
308
+ const C = this._domElement.getBoundingClientRect(), T = (l.clientX - C.left) / (C.right - C.left), E = (l.clientY - C.top) / (C.bottom - C.top);
309
309
  if (T < this._interactiveArea.left || T > this._interactiveArea.right || E < this._interactiveArea.top || E > this._interactiveArea.bottom)
310
310
  return;
311
311
  }
312
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
313
  if (_ !== null) {
314
- const O = this._findPointerByMouseButton(_);
315
- O && this._disposePointer(O);
314
+ const C = this._findPointerByMouseButton(_);
315
+ C && this._disposePointer(C);
316
316
  }
317
317
  if ((l.buttons & M.LEFT) === M.LEFT && this._lockedPointer)
318
318
  return;
319
- const C = {
319
+ const O = {
320
320
  pointerId: l.pointerId,
321
321
  clientX: l.clientX,
322
322
  clientY: l.clientY,
@@ -324,7 +324,7 @@ class J extends ws {
324
324
  deltaY: 0,
325
325
  mouseButton: _
326
326
  };
327
- this._activePointers.push(C), this._domElement.ownerDocument.removeEventListener(
327
+ this._activePointers.push(O), this._domElement.ownerDocument.removeEventListener(
328
328
  "pointermove",
329
329
  n,
330
330
  { passive: !1 }
@@ -338,9 +338,9 @@ class J extends ws {
338
338
  ), this._domElement.ownerDocument.addEventListener("pointerup", a), this._isDragging = !0, v(l);
339
339
  }, n = (l) => {
340
340
  l.cancelable && l.preventDefault();
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")
341
+ const _ = l.pointerId, O = this._lockedPointer || this._findPointerById(_);
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")
344
344
  switch (this._activePointers.length) {
345
345
  case 1:
346
346
  this._state = this.touches.one;
@@ -391,7 +391,7 @@ class J extends ws {
391
391
  const E = performance.now();
392
392
  h - E < 1e3 && this._getClientRect(this._elementRect), h = E;
393
393
  }
394
- const _ = 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, T = this.dollyToCursor ? (l.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
394
+ const _ = xs ? -1 : -3, O = l.deltaMode === 1 || l.ctrlKey ? l.deltaY / _ : l.deltaY / (_ * 10), C = this.dollyToCursor ? (l.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, T = 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(-C, O, T), this._isUserControllingDolly = !0;
413
+ this._dollyInternal(-O, C, T), this._isUserControllingDolly = !0;
414
414
  break;
415
415
  }
416
416
  case d.ZOOM: {
417
- this._zoomInternal(-C, O, T), this._isUserControllingZoom = !0;
417
+ this._zoomInternal(-O, C, T), 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 _ = l instanceof PointerEvent ? l.pointerId : 0, C = this._findPointerById(_);
426
- C && this._disposePointer(C), this._domElement.ownerDocument.removeEventListener(
425
+ const _ = l instanceof PointerEvent ? l.pointerId : 0, O = this._findPointerById(_);
426
+ O && this._disposePointer(O), this._domElement.ownerDocument.removeEventListener(
427
427
  "pointermove",
428
428
  n,
429
429
  { passive: !1 }
@@ -438,7 +438,7 @@ class J extends ws {
438
438
  }, v = (l) => {
439
439
  if (!this._enabled) return;
440
440
  if (Ee(this._activePointers, U), this._getClientRect(this._elementRect), s.copy(U), i.copy(U), this._activePointers.length >= 2) {
441
- const C = U.x - this._activePointers[1].clientX, O = U.y - this._activePointers[1].clientY, T = Math.sqrt(C * C + O * O);
441
+ const O = U.x - this._activePointers[1].clientX, C = U.y - this._activePointers[1].clientY, T = Math.sqrt(O * O + C * C);
442
442
  r.set(0, T);
443
443
  const E = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, x = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
444
444
  i.set(E, x);
@@ -463,15 +463,15 @@ class J extends ws {
463
463
  }, f = () => {
464
464
  if (!this._enabled || !this._dragNeedsUpdate) return;
465
465
  this._dragNeedsUpdate = !1, Ee(this._activePointers, U);
466
- const _ = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, C = _ ? -_.deltaX : i.x - U.x, O = _ ? -_.deltaY : i.y - U.y;
467
- if (i.copy(U), ((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) {
466
+ const _ = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, O = _ ? -_.deltaX : i.x - U.x, C = _ ? -_.deltaY : i.y - U.y;
467
+ if (i.copy(U), ((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
468
  const T = this.dollyToCursor ? (s.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, E = this.dollyToCursor ? (s.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, x = this.dollyDragInverted ? -1 : 1;
469
469
  (this._state & d.DOLLY) === d.DOLLY ? (this._dollyInternal(
470
- x * O * de,
470
+ x * C * de,
471
471
  T,
472
472
  E
473
473
  ), this._isUserControllingDolly = !0) : (this._zoomInternal(
474
- x * O * de,
474
+ x * C * de,
475
475
  T,
476
476
  E
477
477
  ), this._isUserControllingZoom = !0);
@@ -482,7 +482,7 @@ class J extends ws {
482
482
  const V = this.dollyToCursor ? (i.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, le = this.dollyToCursor ? (i.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
483
483
  (this._state & d.TOUCH_DOLLY) === d.TOUCH_DOLLY || (this._state & d.TOUCH_DOLLY_ROTATE) === d.TOUCH_DOLLY_ROTATE || (this._state & d.TOUCH_DOLLY_TRUCK) === d.TOUCH_DOLLY_TRUCK || (this._state & d.TOUCH_DOLLY_SCREEN_PAN) === d.TOUCH_DOLLY_SCREEN_PAN || (this._state & d.TOUCH_DOLLY_OFFSET) === d.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(R * de, V, le), this._isUserControllingDolly = !0) : (this._zoomInternal(R * 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(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" });
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" });
486
486
  }, u = () => {
487
487
  Ee(this._activePointers, U), i.copy(U), 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",
@@ -520,11 +520,11 @@ class J extends ws {
520
520
  { passive: !1 }
521
521
  ), this._domElement.ownerDocument.addEventListener("pointerup", a), v());
522
522
  }, this.unlockPointer = () => {
523
- var l, _, C;
523
+ var l, _, O;
524
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
- ), (C = this._domElement) === null || C === void 0 || C.ownerDocument.removeEventListener(
527
+ ), (O = this._domElement) === null || O === void 0 || O.ownerDocument.removeEventListener(
528
528
  "pointerlockerror",
529
529
  y
530
530
  ), this.cancel();
@@ -1003,7 +1003,7 @@ class J extends ws {
1003
1003
  this.moveTo(l.x, l.y, l.z, t)
1004
1004
  ), a.push(this.dollyTo(_, t)), a.push(this.setFocalOffset(0, 0, 0, t));
1005
1005
  } else if (H(this._camera)) {
1006
- const _ = this._camera, C = _.right - _.left, O = _.top - _.bottom, T = s ? Math.max(C / y.x, O / y.y) : Math.min(C / y.x, O / y.y);
1006
+ const _ = this._camera, O = _.right - _.left, C = _.top - _.bottom, T = s ? Math.max(O / y.x, C / y.y) : Math.min(O / y.x, C / y.y);
1007
1007
  a.push(
1008
1008
  this.moveTo(l.x, l.y, l.z, t)
1009
1009
  ), a.push(this.zoomTo(T, t)), a.push(this.setFocalOffset(0, 0, 0, t));
@@ -1094,11 +1094,11 @@ class J extends ws {
1094
1094
  ae.setFromVector3(
1095
1095
  _.sub(l).applyQuaternion(this._yAxisUpSpace)
1096
1096
  ), this._targetEnd.copy(g.lerp(l, f));
1097
- const C = ae.theta - k.theta, O = ae.phi - k.phi, T = ae.radius - k.radius;
1097
+ const O = ae.theta - k.theta, C = ae.phi - k.phi, T = ae.radius - k.radius;
1098
1098
  this._sphericalEnd.set(
1099
1099
  k.radius + T * f,
1100
- k.phi + O * f,
1101
- k.theta + C * f
1100
+ k.phi + C * f,
1101
+ k.theta + O * 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,
@@ -1456,32 +1456,32 @@ class J extends ws {
1456
1456
  if (Y(this._camera) && this._changedDolly !== 0) {
1457
1457
  const p = this._spherical.radius - this._lastDistance, v = this._camera, f = this._getCameraDirection(ne), u = w.copy(f).cross(v.up).normalize();
1458
1458
  u.lengthSq() === 0 && (u.x = 1);
1459
- const g = L.crossVectors(u, f), y = this._sphericalEnd.radius * Math.tan(v.getEffectiveFOV() * ie * 0.5), _ = (this._sphericalEnd.radius - p - this._sphericalEnd.radius) / this._sphericalEnd.radius, C = G.copy(this._targetEnd).add(
1459
+ const g = L.crossVectors(u, f), y = this._sphericalEnd.radius * Math.tan(v.getEffectiveFOV() * ie * 0.5), _ = (this._sphericalEnd.radius - p - this._sphericalEnd.radius) / this._sphericalEnd.radius, O = G.copy(this._targetEnd).add(
1460
1460
  u.multiplyScalar(
1461
1461
  this._dollyControlCoord.x * y * v.aspect
1462
1462
  )
1463
1463
  ).add(
1464
1464
  g.multiplyScalar(this._dollyControlCoord.y * y)
1465
- ), O = w.copy(this._targetEnd).lerp(C, _), T = this._lastDollyDirection === K.IN && this._spherical.radius <= this.minDistance, E = this._lastDollyDirection === K.OUT && this.maxDistance <= this._spherical.radius;
1465
+ ), C = w.copy(this._targetEnd).lerp(O, _), T = this._lastDollyDirection === K.IN && this._spherical.radius <= this.minDistance, E = this._lastDollyDirection === K.OUT && this.maxDistance <= this._spherical.radius;
1466
1466
  if (this.infinityDolly && (T || E)) {
1467
1467
  this._sphericalEnd.radius -= p, this._spherical.radius -= p;
1468
1468
  const R = L.copy(f).multiplyScalar(-p);
1469
- O.add(R);
1469
+ C.add(R);
1470
1470
  }
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);
1471
+ this._boundary.clampPoint(C, C);
1472
+ const x = L.subVectors(C, this._targetEnd);
1473
+ this._targetEnd.copy(C), this._target.add(x), this._changedDolly -= p, A(this._changedDolly) && (this._changedDolly = 0);
1474
1474
  } else if (H(this._camera) && this._changedZoom !== 0) {
1475
1475
  const p = this._zoom - this._lastZoom, v = this._camera, f = w.set(
1476
1476
  this._dollyControlCoord.x,
1477
1477
  this._dollyControlCoord.y,
1478
1478
  (v.near + v.far) / (v.near - v.far)
1479
- ).unproject(v), u = L.set(0, 0, -1).applyQuaternion(v.quaternion), g = G.copy(f).add(u.multiplyScalar(-f.dot(v.up))), l = -(this._zoom - p - this._zoom) / this._zoom, _ = this._getCameraDirection(ne), C = this._targetEnd.dot(_), O = w.copy(this._targetEnd).lerp(g, l), T = O.dot(_), E = _.multiplyScalar(
1480
- T - C
1479
+ ).unproject(v), u = L.set(0, 0, -1).applyQuaternion(v.quaternion), g = G.copy(f).add(u.multiplyScalar(-f.dot(v.up))), l = -(this._zoom - p - this._zoom) / this._zoom, _ = this._getCameraDirection(ne), O = this._targetEnd.dot(_), C = w.copy(this._targetEnd).lerp(g, l), T = C.dot(_), E = _.multiplyScalar(
1480
+ T - O
1481
1481
  );
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);
1482
+ C.sub(E), this._boundary.clampPoint(C, C);
1483
+ const x = L.subVectors(C, this._targetEnd);
1484
+ this._targetEnd.copy(C), this._target.add(x), this._changedZoom -= p, 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;
@@ -1780,7 +1780,7 @@ S.prototype.emit = function(e) {
1780
1780
  if (typeof a == "function")
1781
1781
  $e(a, this, t);
1782
1782
  else
1783
- for (var h = a.length, m = Ot(a, h), s = 0; s < h; ++s)
1783
+ for (var h = a.length, m = Ct(a, h), s = 0; s < h; ++s)
1784
1784
  $e(m[s], this, t);
1785
1785
  return !0;
1786
1786
  };
@@ -1865,7 +1865,7 @@ function yt(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 ? As(i) : Ot(i, i.length);
1868
+ return i === void 0 ? [] : typeof i == "function" ? t ? [i.listener || i] : [i] : t ? As(i) : Ct(i, i.length);
1869
1869
  }
1870
1870
  S.prototype.listeners = function(e) {
1871
1871
  return yt(this, e, !0);
@@ -1891,7 +1891,7 @@ function vt(c) {
1891
1891
  S.prototype.eventNames = function() {
1892
1892
  return this._eventsCount > 0 ? ue(this._events) : [];
1893
1893
  };
1894
- function Ot(c, e) {
1894
+ function Ct(c, e) {
1895
1895
  for (var t = new Array(e), s = 0; s < e; ++s)
1896
1896
  t[s] = c[s];
1897
1897
  return t;
@@ -1914,13 +1914,13 @@ function Ms(c, e) {
1914
1914
  function r() {
1915
1915
  typeof c.removeListener == "function" && c.removeListener("error", i), t([].slice.call(arguments));
1916
1916
  }
1917
- Ct(c, e, r, { once: !0 }), e !== "error" && Rs(c, i, { once: !0 });
1917
+ Ot(c, e, r, { once: !0 }), e !== "error" && Rs(c, i, { once: !0 });
1918
1918
  });
1919
1919
  }
1920
1920
  function Rs(c, e, t) {
1921
- typeof c.on == "function" && Ct(c, "error", e, t);
1921
+ typeof c.on == "function" && Ot(c, "error", e, t);
1922
1922
  }
1923
- function Ct(c, e, t, s) {
1923
+ function Ot(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")
@@ -2479,10 +2479,10 @@ class $s {
2479
2479
  q.setFromMatrixPosition(u.matrixWorld), q.applyMatrix4(Qe);
2480
2480
  const l = q.z >= -1 && q.z <= 1 && u.layers.test(y.layers) === !0, _ = u.element;
2481
2481
  _.style.display = l === !0 ? "" : "none", l === !0 && (u.onBeforeRender(t, g, y), _.style.transform = "translate(" + -100 * u.center.x + "%," + -100 * u.center.y + "%)translate(" + (q.x * r + r) + "px," + (-q.y * o + o) + "px)", _.parentNode !== a && a.appendChild(_), u.onAfterRender(t, g, y));
2482
- const C = {
2482
+ const O = {
2483
2483
  distanceToCameraSquared: p(y, u)
2484
2484
  };
2485
- n.objects.set(u, C);
2485
+ n.objects.set(u, O);
2486
2486
  }
2487
2487
  for (let l = 0, _ = u.children.length; l < _; l++)
2488
2488
  m(u.children[l], g, y);
@@ -2500,8 +2500,8 @@ class $s {
2500
2500
  const g = v(u).sort(function(l, _) {
2501
2501
  if (l.renderOrder !== _.renderOrder)
2502
2502
  return _.renderOrder - l.renderOrder;
2503
- const C = n.objects.get(l).distanceToCameraSquared, O = n.objects.get(_).distanceToCameraSquared;
2504
- return C - O;
2503
+ const O = n.objects.get(l).distanceToCameraSquared, C = n.objects.get(_).distanceToCameraSquared;
2504
+ return O - C;
2505
2505
  }), y = g.length;
2506
2506
  for (let l = 0, _ = g.length; l < _; l++)
2507
2507
  g[l].element.style.zIndex = y - l;
@@ -2534,9 +2534,9 @@ class qs {
2534
2534
  }, this.render = function(y, l) {
2535
2535
  const _ = l.projectionMatrix.elements[5] * o;
2536
2536
  l.view && l.view.enabled ? (h.style.transform = `translate( ${-l.view.offsetX * (s / l.view.width)}px, ${-l.view.offsetY * (i / l.view.height)}px )`, h.style.transform += `scale( ${l.view.fullWidth / l.view.width}, ${l.view.fullHeight / l.view.height} )`) : h.style.transform = "", y.matrixWorldAutoUpdate === !0 && y.updateMatrixWorld(), l.parent === null && l.matrixWorldAutoUpdate === !0 && l.updateMatrixWorld();
2537
- let C, O;
2538
- l.isOrthographicCamera && (C = -(l.right + l.left) / 2, O = (l.top + l.bottom) / 2);
2539
- const T = l.view && l.view.enabled ? l.view.height / l.view.fullHeight : 1, E = l.isOrthographicCamera ? `scale( ${T} )scale(` + _ + ")translate(" + p(C) + "px," + p(O) + "px)" + v(l.matrixWorldInverse) : `scale( ${T} )translateZ(` + _ + "px)" + v(l.matrixWorldInverse), R = (l.isPerspectiveCamera ? "perspective(" + _ + "px) " : "") + E + "translate(" + r + "px," + o + "px)";
2537
+ let O, C;
2538
+ l.isOrthographicCamera && (O = -(l.right + l.left) / 2, C = (l.top + l.bottom) / 2);
2539
+ const T = l.view && l.view.enabled ? l.view.height / l.view.fullHeight : 1, E = l.isOrthographicCamera ? `scale( ${T} )scale(` + _ + ")translate(" + p(O) + "px," + p(C) + "px)" + v(l.matrixWorldInverse) : `scale( ${T} )translateZ(` + _ + "px)" + v(l.matrixWorldInverse), R = (l.isPerspectiveCamera ? "perspective(" + _ + "px) " : "") + E + "translate(" + r + "px," + o + "px)";
2540
2540
  n.camera.style !== R && (m.style.transform = R, n.camera.style = R), g(y, y, l);
2541
2541
  }, this.setSize = function(y, l) {
2542
2542
  s = y, i = l, r = s / 2, o = i / 2, a.style.width = y + "px", a.style.height = l + "px", h.style.width = y + "px", h.style.height = l + "px", m.style.width = y + "px", m.style.height = l + "px";
@@ -2557,14 +2557,14 @@ class qs {
2557
2557
  for (let l = 0, _ = y.children.length; l < _; l++)
2558
2558
  u(y.children[l]);
2559
2559
  }
2560
- function g(y, l, _, C) {
2560
+ function g(y, l, _, O) {
2561
2561
  if (y.visible === !1) {
2562
2562
  u(y);
2563
2563
  return;
2564
2564
  }
2565
2565
  if (y.isCSS3DObject) {
2566
- const O = y.layers.test(_.layers) === !0, T = y.element;
2567
- if (T.style.display = O === !0 ? "" : "none", O === !0) {
2566
+ const C = y.layers.test(_.layers) === !0, T = y.element;
2567
+ if (T.style.display = C === !0 ? "" : "none", C === !0) {
2568
2568
  y.onBeforeRender(t, l, _);
2569
2569
  let E;
2570
2570
  y.isCSS3DSprite ? (N.copy(_.matrixWorldInverse), N.transpose(), y.rotation2D !== 0 && N.multiply(Xs.makeRotationZ(y.rotation2D)), y.matrixWorld.decompose(tt, Gs, st), N.setPosition(tt), N.scale(st), N.elements[3] = 0, N.elements[7] = 0, N.elements[11] = 0, N.elements[15] = 1, E = f(N)) : E = f(y.matrixWorld);
@@ -2577,8 +2577,8 @@ class qs {
2577
2577
  T.parentNode !== m && m.appendChild(T), y.onAfterRender(t, l, _);
2578
2578
  }
2579
2579
  }
2580
- for (let O = 0, T = y.children.length; O < T; O++)
2581
- g(y.children[O], l, _);
2580
+ for (let C = 0, T = y.children.length; C < T; C++)
2581
+ g(y.children[C], l, _);
2582
2582
  }
2583
2583
  }
2584
2584
  }
@@ -2595,13 +2595,12 @@ class Qs {
2595
2595
  /**
2596
2596
  * 添加标签到碰撞检测系统
2597
2597
  * @param node Node 实例
2598
- * @param options 配置项,priority 越大越优先显示,不传则使用 node.options.priority
2599
2598
  */
2600
2599
  add(e, t = {}) {
2601
- var s, i;
2602
- this.labels.set(e, {
2600
+ var s;
2601
+ this.options.enabled || console.warn("collision.enabled is false, please enable it before adding nodes."), this.labels.set(e, {
2603
2602
  node: e,
2604
- priority: (i = (s = t.priority) != null ? s : e.options.priority) != null ? i : 0,
2603
+ priority: (s = t.priority) != null ? s : 0,
2605
2604
  visible: !0
2606
2605
  });
2607
2606
  }
@@ -2657,11 +2656,13 @@ class Qs {
2657
2656
  this.labels.forEach((n) => {
2658
2657
  const a = n.node.element;
2659
2658
  if (!a) return;
2660
- const h = a.style.display === "none";
2661
- h && (a.style.visibility = "hidden", a.style.display = "");
2662
- const m = a.getBoundingClientRect();
2663
- if (h && (a.style.display = "none", a.style.visibility = ""), m.width === 0 || m.height === 0) return;
2664
- m.right >= -t && m.left <= s + t && m.bottom >= -t && m.top <= i + t ? (n.bounds = m, r.push(n)) : (this.setNodeVisibility(n.node, !1), n.visible = !1);
2659
+ const h = a.firstElementChild;
2660
+ if (!h) return;
2661
+ const m = h.style.opacity === "0";
2662
+ m && (h.style.visibility = "hidden", h.style.opacity = "1");
2663
+ const p = h.getBoundingClientRect();
2664
+ if (m && (h.style.opacity = "0", h.style.visibility = ""), p.width === 0 || p.height === 0) return;
2665
+ p.right >= -t && p.left <= s + t && p.bottom >= -t && p.top <= i + t ? (n.bounds = p, r.push(n)) : (this.setNodeVisibility(n.node, !1), n.visible = !1);
2665
2666
  }), r.sort((n, a) => a.priority - n.priority);
2666
2667
  const o = [];
2667
2668
  for (const n of r) {
@@ -2689,11 +2690,13 @@ class Qs {
2689
2690
  return !(e.right + s < t.left || e.left - s > t.right || e.bottom + s < t.top || e.top - s > t.bottom);
2690
2691
  }
2691
2692
  /**
2692
- * 设置节点可见性
2693
+ * 设置节点可见性(操作子元素)
2693
2694
  */
2694
2695
  setNodeVisibility(e, t) {
2695
2696
  const s = e.element;
2696
- s && (t ? s.style.opacity = "1" : s.style.opacity = "0");
2697
+ if (!s) return;
2698
+ const i = s.firstElementChild;
2699
+ i && (t ? i.style.opacity = "1" : i.style.opacity = "0");
2697
2700
  }
2698
2701
  /**
2699
2702
  * 获取当前可见的标签数量
@@ -2720,18 +2723,23 @@ class Qs {
2720
2723
  this.labels.forEach((n) => {
2721
2724
  const a = n.node.element;
2722
2725
  if (!a) {
2723
- console.log("Skipping: element is null");
2726
+ console.log("Skipping: wrapper is null");
2727
+ return;
2728
+ }
2729
+ const h = a.firstElementChild;
2730
+ if (!h) {
2731
+ console.log("Skipping: child element is null");
2724
2732
  return;
2725
2733
  }
2726
- const h = a.style.display === "none";
2727
- h && (a.style.visibility = "hidden", a.style.display = "");
2728
- const m = a.getBoundingClientRect();
2729
- if (h && (a.style.display = "none", a.style.visibility = ""), m.width === 0 || m.height === 0) {
2730
- console.log("Skipping: rect is 0", m);
2734
+ const m = h.style.opacity === "0";
2735
+ m && (h.style.visibility = "hidden", h.style.opacity = "1");
2736
+ const p = h.getBoundingClientRect();
2737
+ if (m && (h.style.opacity = "0", h.style.visibility = ""), p.width === 0 || p.height === 0) {
2738
+ console.log("Skipping: rect is 0", p);
2731
2739
  return;
2732
2740
  }
2733
- const p = m.right >= -t && m.left <= s + t && m.bottom >= -t && m.top <= i + t;
2734
- console.log(`Entry priority=${n.priority}, inViewport=${p}`), p ? (n.bounds = m, r.push(n)) : (this.setNodeVisibility(n.node, !1), n.visible = !1);
2741
+ const v = p.right >= -t && p.left <= s + t && p.bottom >= -t && p.top <= i + t;
2742
+ console.log(`Entry priority=${n.priority}, inViewport=${v}`), v ? (n.bounds = p, r.push(n)) : (this.setNodeVisibility(n.node, !1), n.visible = !1);
2735
2743
  }), console.log("Entries in viewport:", r.length), r.sort((n, a) => a.priority - n.priority), console.log("Sorted entries:", r.map((n) => n.priority));
2736
2744
  const o = [];
2737
2745
  for (const n of r) {
@@ -3157,12 +3165,12 @@ class si extends ti {
3157
3165
  key: "@Scene",
3158
3166
  name: "场景",
3159
3167
  mList: !1
3160
- }), this.group = this.createBaseObject(new Ce(), {
3168
+ }), this.group = this.createBaseObject(new Oe(), {
3161
3169
  key: "@Group",
3162
3170
  name: "物体组",
3163
3171
  target: this.scene,
3164
3172
  mList: !1
3165
- }), this.prefabGroup = this.createBaseObject(new Ce(), {
3173
+ }), this.prefabGroup = this.createBaseObject(new Oe(), {
3166
3174
  key: "@PrefabGroup",
3167
3175
  name: "预制组",
3168
3176
  target: this.scene,
@@ -3176,7 +3184,7 @@ class si extends ti {
3176
3184
  const s = D({
3177
3185
  mList: !0
3178
3186
  }, t);
3179
- e instanceof Ce && (e.raycast = (r, o) => r.intersectObjects(e.children, !0, o));
3187
+ e instanceof Oe && (e.raycast = (r, o) => r.intersectObjects(e.children, !0, o));
3180
3188
  const i = new ls();
3181
3189
  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)
3182
3190
  if (s.target.key === "@Scene" && e instanceof Jt)
@@ -3483,7 +3491,7 @@ class ni {
3483
3491
  if (e === "gltf")
3484
3492
  return this.gltfLoader || (this.gltfLoader = new Ne(this.loadingManager), this.options.prefix && this.gltfLoader.setPath(this.options.prefix)), this.gltfLoader;
3485
3493
  if (e === "lottie")
3486
- return this.lottieLoader || (this.lottieLoader = new Os(this.loadingManager), this.options.prefix && this.lottieLoader.setPath(this.options.prefix)), this.lottieLoader;
3494
+ return this.lottieLoader || (this.lottieLoader = new Cs(this.loadingManager), this.options.prefix && this.lottieLoader.setPath(this.options.prefix)), this.lottieLoader;
3487
3495
  if (e === "gzipJson")
3488
3496
  return this.gzipJsonLoader || (this.gzipJsonLoader = new ri(this.loadingManager), this.options.prefix && this.gzipJsonLoader.setPath(this.options.prefix)), this.gzipJsonLoader;
3489
3497
  if (e === "json")
@@ -3779,7 +3787,7 @@ class hi {
3779
3787
  });
3780
3788
  }
3781
3789
  applyColorSpaceToMaterials(e) {
3782
- Cs({ material: e });
3790
+ Os({ material: e });
3783
3791
  }
3784
3792
  material2array(e) {
3785
3793
  return Array.isArray(e) ? e : [e];
@@ -4071,7 +4079,7 @@ const _e = class _e {
4071
4079
  return this.mListController.mList;
4072
4080
  }
4073
4081
  tweenUpdateRaf() {
4074
- Oe.update(), this.TweenRaf = requestAnimationFrame(this.tweenUpdateRaf.bind(this));
4082
+ Ce.update(), this.TweenRaf = requestAnimationFrame(this.tweenUpdateRaf.bind(this));
4075
4083
  }
4076
4084
  use(e, ...t) {
4077
4085
  this.installPlugins.has(e.pluginName) ? console.log("plugin already installed") : typeof e.install == "function" && (e.install(this, ...t), this.installPlugins.set(e.pluginName, e));
@@ -4143,12 +4151,12 @@ const _e = class _e {
4143
4151
  cameraOptions: this.options.camera
4144
4152
  });
4145
4153
  if (this.showPage(l), s) {
4146
- const C = new ei({
4154
+ const O = new ei({
4147
4155
  container: e,
4148
4156
  sceneController: v,
4149
4157
  cameraController: p
4150
4158
  });
4151
- C.add(v.scene), this.helperController = C, i && C.addViewHelper();
4159
+ O.add(v.scene), this.helperController = O, i && O.addViewHelper();
4152
4160
  }
4153
4161
  e.appendChild(m.renderer.domElement);
4154
4162
  }
@@ -4270,7 +4278,7 @@ const _e = class _e {
4270
4278
  var s, i, r, o, n, a;
4271
4279
  if (!this.camera || !this.scene)
4272
4280
  return;
4273
- this.event.emit("beforeRender"), this.timer.update(), Oe.update();
4281
+ this.event.emit("beforeRender"), this.timer.update(), Ce.update();
4274
4282
  const e = this.timer.getDelta(), t = this.timer.getElapsed();
4275
4283
  this.controlsController.update(e, t), this.leadController.update(e, t), this.installPlugins.forEach((h) => {
4276
4284
  var m;
@@ -4320,7 +4328,7 @@ const _e = class _e {
4320
4328
  }
4321
4329
  dispose() {
4322
4330
  var e, t, s, i, r, o, n, a, h, m, p, v, f, u;
4323
- 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) => {
4331
+ 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) => {
4324
4332
  var y;
4325
4333
  (y = g.dispose) == null || y.call(g);
4326
4334
  }), (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(), (f = this.stats) == null || f.dom.remove(), (u = this.renderer) == null || u.domElement.remove(), this._isDispose = !0;