@tresjs/core 4.2.1 → 4.2.2

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.
package/dist/tres.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: @tresjs/core
3
- * version: v4.2.1
3
+ * version: v4.2.2
4
4
  * (c) 2024
5
5
  * description: Declarative ThreeJS using Vue Components
6
6
  * author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
@@ -8,11 +8,11 @@
8
8
  var bt = Object.defineProperty;
9
9
  var Pt = (e, t, n) => t in e ? bt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
10
10
  var me = (e, t, n) => Pt(e, typeof t != "symbol" ? t + "" : t, n);
11
- import { ref as I, computed as Y, watchEffect as Te, onUnmounted as Q, shallowRef as H, watch as le, readonly as ye, unref as K, provide as _e, inject as Mt, isRef as Ct, reactive as Et, defineComponent as Be, useSlots as Tt, getCurrentInstance as Ie, onMounted as St, openBlock as At, createElementBlock as kt, normalizeClass as xt, normalizeStyle as Lt, createRenderer as Rt, h as He, Fragment as Ot } from "vue";
11
+ import { ref as H, computed as V, watchEffect as Te, onUnmounted as K, shallowRef as $, watch as le, readonly as ye, unref as J, provide as _e, inject as Ct, isRef as Mt, reactive as Et, defineComponent as Be, useSlots as Tt, getCurrentInstance as Ie, onMounted as St, openBlock as At, createElementBlock as kt, normalizeClass as xt, normalizeStyle as Lt, createRenderer as Rt, h as He, Fragment as Ot } from "vue";
12
12
  import * as et from "three";
13
13
  import { PerspectiveCamera as we, Camera as Dt, Clock as tt, Vector3 as Se, Color as ce, Scene as nt, MathUtils as rt, MeshBasicMaterial as ot, DoubleSide as jt, REVISION as Bt, SRGBColorSpace as It, ACESFilmicToneMapping as st, PCFSoftShadowMap as Ht, NoToneMapping as $t, WebGLRenderer as he, TextureLoader as Ut, Vector2 as ge, Raycaster as Ft, BufferAttribute as Wt, Object3D as Nt, Line as zt, BufferGeometry as $e, Float32BufferAttribute as Ue, LineBasicMaterial as Gt, Mesh as Vt, BackSide as Yt, DirectionalLightHelper as qt, PointLightHelper as Jt, SpotLightHelper as Kt, HemisphereLightHelper as Qt, ArrowHelper as Xt } from "three";
14
14
  import { createEventHook as j, useRafFn as it, toValue as k, unrefElement as Zt, useDevicePixelRatio as en, usePointer as tn, useElementBounding as nn, useWindowSize as rn, useElementSize as on, refDebounced as Fe, tryOnScopeDispose as sn, useFps as an, useMemory as ln } from "@vueuse/core";
15
- const cn = "@tresjs/core", un = "module", fn = "4.2.1", dn = "pnpm@9.1.4", pn = "Declarative ThreeJS using Vue Components", mn = "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)", hn = "MIT", gn = [
15
+ const cn = "@tresjs/core", un = "module", fn = "4.2.2", dn = "pnpm@9.1.4", pn = "Declarative ThreeJS using Vue Components", mn = "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)", hn = "MIT", gn = [
16
16
  "vue",
17
17
  "3d",
18
18
  "threejs",
@@ -40,9 +40,9 @@ const cn = "@tresjs/core", un = "module", fn = "4.2.1", dn = "pnpm@9.1.4", pn =
40
40
  }, _n = "./dist/tres.js", wn = "./dist/tres.js", bn = "./dist/index.d.ts", Pn = [
41
41
  "*.d.ts",
42
42
  "dist"
43
- ], Mn = {
43
+ ], Cn = {
44
44
  access: "public"
45
- }, Cn = {
45
+ }, Mn = {
46
46
  dev: "cd playground && npm run dev",
47
47
  build: "vite build",
48
48
  playground: "cd playground && npm run dev",
@@ -122,8 +122,8 @@ const cn = "@tresjs/core", un = "module", fn = "4.2.1", dn = "pnpm@9.1.4", pn =
122
122
  module: wn,
123
123
  types: bn,
124
124
  files: Pn,
125
- publishConfig: Mn,
126
- scripts: Cn,
125
+ publishConfig: Cn,
126
+ scripts: Mn,
127
127
  peerDependencies: En,
128
128
  dependencies: Tn,
129
129
  devDependencies: Sn
@@ -140,11 +140,11 @@ function kn(e) {
140
140
  function at(e) {
141
141
  return typeof e == "string";
142
142
  }
143
- function V(e) {
143
+ function G(e) {
144
144
  return typeof e == "function";
145
145
  }
146
146
  function N(e) {
147
- return e === Object(e) && !de(e) && !V(e);
147
+ return e === Object(e) && !de(e) && !G(e);
148
148
  }
149
149
  function W(e) {
150
150
  return N(e) && "isObject3D" in e && !!e.isObject3D;
@@ -171,7 +171,7 @@ function Dn(e) {
171
171
  return N(e) && !!e.isPrimitive;
172
172
  }
173
173
  const jn = ({ sizes: e }) => {
174
- const t = I([]), n = Y(
174
+ const t = H([]), n = V(
175
175
  () => t.value[0]
176
176
  ), r = (i) => {
177
177
  const l = i instanceof Dt ? i : t.value.find((o) => o.uuid === i);
@@ -196,7 +196,7 @@ const jn = ({ sizes: e }) => {
196
196
  e.aspectRatio.value && t.value.forEach((i) => {
197
197
  !i.manual && (i instanceof we || Bn(i)) && (i instanceof we ? i.aspect = e.aspectRatio.value : (i.left = e.width.value * -0.5, i.right = e.width.value * 0.5, i.top = e.height.value * 0.5, i.bottom = e.height.value * -0.5), i.updateProjectionMatrix());
198
198
  });
199
- }), Q(() => {
199
+ }), K(() => {
200
200
  t.value = [];
201
201
  }), {
202
202
  camera: n,
@@ -209,16 +209,16 @@ const jn = ({ sizes: e }) => {
209
209
  function Bn(e) {
210
210
  return e.hasOwnProperty("isOrthographicCamera") && e.isOrthographicCamera;
211
211
  }
212
- const lt = j(), ct = j(), Ae = j(), ee = new tt();
212
+ const lt = j(), ct = j(), Ae = j(), Z = new tt();
213
213
  let ue = 0, fe = 0;
214
214
  const { pause: In, resume: Ne, isActive: Hn } = it(
215
215
  () => {
216
- lt.trigger({ delta: ue, elapsed: fe, clock: ee }), ct.trigger({ delta: ue, elapsed: fe, clock: ee }), Ae.trigger({ delta: ue, elapsed: fe, clock: ee });
216
+ lt.trigger({ delta: ue, elapsed: fe, clock: Z }), ct.trigger({ delta: ue, elapsed: fe, clock: Z }), Ae.trigger({ delta: ue, elapsed: fe, clock: Z });
217
217
  },
218
218
  { immediate: !1 }
219
219
  );
220
220
  Ae.on(() => {
221
- ue = ee.getDelta(), fe = ee.getElapsedTime();
221
+ ue = Z.getDelta(), fe = Z.getElapsedTime();
222
222
  });
223
223
  let ze = !1;
224
224
  const $r = () => (ze || (ze = !0, Ne()), {
@@ -229,7 +229,7 @@ const $r = () => (ze || (ze = !0, Ne()), {
229
229
  resume: Ne,
230
230
  isActive: Hn
231
231
  }), Ur = !0, oe = "[TresJS ▲ ■ ●] ";
232
- function z() {
232
+ function Y() {
233
233
  function e(...r) {
234
234
  typeof r[0] == "string" ? r[0] = oe + r[0] : r.unshift(oe), console.error(...r);
235
235
  }
@@ -407,7 +407,7 @@ function er(e, t, n) {
407
407
  }
408
408
  }
409
409
  const { target: r, key: s } = Pe(e, n);
410
- t.__tres.previousAttach = r[s], r[s] = X(t);
410
+ t.__tres.previousAttach = r[s], r[s] = Q(t);
411
411
  } else
412
412
  t.__tres.previousAttach = n(e, t);
413
413
  }
@@ -420,7 +420,7 @@ function tr(e, t, n) {
420
420
  (s = (r = t.__tres) == null ? void 0 : r.previousAttach) == null || s.call(r, e, t);
421
421
  (a = t.__tres) == null || delete a.previousAttach;
422
422
  }
423
- function G(e, t, n) {
423
+ function z(e, t, n) {
424
424
  const r = e;
425
425
  return r.__tres = {
426
426
  type: "unknown",
@@ -441,7 +441,7 @@ function pt(e) {
441
441
  }
442
442
  function nr(e, t, n) {
443
443
  var s;
444
- if (!V(e.setPixelRatio))
444
+ if (!G(e.setPixelRatio))
445
445
  return;
446
446
  let r = 0;
447
447
  if (de(n) && n.length >= 2) {
@@ -451,28 +451,28 @@ function nr(e, t, n) {
451
451
  r !== ((s = e.getPixelRatio) == null ? void 0 : s.call(e)) && e.setPixelRatio(r);
452
452
  }
453
453
  function rr(e, t, n, r, s) {
454
- const a = [...t.__tres.objects], i = X(t);
455
- if (e = X(e), i === e)
454
+ const a = [...t.__tres.objects], i = Q(t);
455
+ if (e = Q(e), i === e)
456
456
  return !0;
457
- const l = G(e, t.__tres ?? {}, s), c = t.parent ?? t.__tres.parent ?? null, o = { ...t.__tres.memoizedProps };
457
+ const l = z(e, t.__tres ?? {}, s), c = t.parent ?? t.__tres.parent ?? null, o = { ...t.__tres.memoizedProps };
458
458
  delete o.object;
459
459
  for (const u of a)
460
460
  mt(u, s), ht(u, s);
461
461
  i.__tres.objects = [], r.remove(t);
462
- for (const [u, v] of Object.entries(o))
463
- r.patchProp(l, u, l[u], v);
462
+ for (const [u, y] of Object.entries(o))
463
+ r.patchProp(l, u, l[u], y);
464
464
  n(e), r.insert(t, c);
465
465
  for (const u of a)
466
466
  r.insert(u, t);
467
467
  return !0;
468
468
  }
469
- function X(e) {
469
+ function Q(e) {
470
470
  return Dn(e) ? (e.object.__tres = e.__tres, e.object) : e;
471
471
  }
472
472
  function mt(e, t) {
473
473
  var r, s, a, i;
474
474
  const n = ((r = e.__tres) == null ? void 0 : r.parent) || t.scene.value;
475
- e.__tres && (e.__tres.parent = null), n && n.__tres && "objects" in n.__tres && Zn(n.__tres.objects, (l) => l !== e), (s = e.__tres) != null && s.attach ? tr(n, e, e.__tres.attach) : ((i = (a = e.parent) == null ? void 0 : a.remove) == null || i.call(a, X(e)), e.parent = null);
475
+ e.__tres && (e.__tres.parent = null), n && n.__tres && "objects" in n.__tres && Zn(n.__tres.objects, (l) => l !== e), (s = e.__tres) != null && s.attach ? tr(n, e, e.__tres.attach) : ((i = (a = e.parent) == null ? void 0 : a.remove) == null || i.call(a, Q(e)), e.parent = null);
476
476
  }
477
477
  function ht(e, t) {
478
478
  var n;
@@ -503,7 +503,7 @@ function sr({
503
503
  options: t,
504
504
  contextParts: { sizes: n, render: r, invalidate: s, advance: a }
505
505
  }) {
506
- const i = Y(() => ({
506
+ const i = V(() => ({
507
507
  alpha: k(t.alpha) ?? !0,
508
508
  depth: k(t.depth),
509
509
  canvas: Zt(e),
@@ -516,7 +516,7 @@ function sr({
516
516
  preserveDrawingBuffer: k(t.preserveDrawingBuffer),
517
517
  logarithmicDepthBuffer: k(t.logarithmicDepthBuffer),
518
518
  failIfMajorPerformanceCaveat: k(t.failIfMajorPerformanceCaveat)
519
- })), l = H(new he(i.value));
519
+ })), l = $(new he(i.value));
520
520
  function c() {
521
521
  t.renderMode === "on-demand" && s();
522
522
  }
@@ -527,40 +527,40 @@ function sr({
527
527
  }, {
528
528
  immediate: !0
529
529
  }), le(() => t.clearColor, c);
530
- const { pixelRatio: o } = en(), { logError: u } = z(), f = (() => {
531
- const p = new he(), P = {
530
+ const { pixelRatio: o } = en(), { logError: u } = Y(), f = (() => {
531
+ const v = new he(), b = {
532
532
  shadowMap: {
533
- enabled: p.shadowMap.enabled,
534
- type: p.shadowMap.type
533
+ enabled: v.shadowMap.enabled,
534
+ type: v.shadowMap.type
535
535
  },
536
- toneMapping: p.toneMapping,
537
- toneMappingExposure: p.toneMappingExposure,
538
- outputColorSpace: p.outputColorSpace
536
+ toneMapping: v.toneMapping,
537
+ toneMappingExposure: v.toneMappingExposure,
538
+ outputColorSpace: v.outputColorSpace
539
539
  };
540
- return p.dispose(), P;
541
- })(), _ = k(t.renderMode);
542
- return _ === "on-demand" && s(), _ === "manual" && setTimeout(() => {
540
+ return v.dispose(), b;
541
+ })(), g = k(t.renderMode);
542
+ return g === "on-demand" && s(), g === "manual" && setTimeout(() => {
543
543
  a();
544
544
  }, 100), Te(() => {
545
- const p = k(t.preset);
546
- p && (p in ie || u(`Renderer Preset must be one of these: ${Object.keys(ie).join(", ")}`), ut(l.value, ie[p])), nr(l.value, o.value, k(t.dpr)), _ === "always" && (r.frames.value = Math.max(1, r.frames.value));
547
- const P = (g, E) => {
548
- const C = k(g), T = () => {
549
- if (p)
550
- return Ve(ie[p], E);
545
+ const v = k(t.preset);
546
+ v && (v in ie || u(`Renderer Preset must be one of these: ${Object.keys(ie).join(", ")}`), ut(l.value, ie[v])), nr(l.value, o.value, k(t.dpr)), g === "always" && (r.frames.value = Math.max(1, r.frames.value));
547
+ const b = (M, E) => {
548
+ const P = k(M), S = () => {
549
+ if (v)
550
+ return Ve(ie[v], E);
551
551
  };
552
- if (C !== void 0)
553
- return C;
554
- const M = T();
555
- return M !== void 0 ? M : Ve(f, E);
556
- }, m = (g, E) => Vn(l.value, E, P(g, E));
552
+ if (P !== void 0)
553
+ return P;
554
+ const C = S();
555
+ return C !== void 0 ? C : Ve(f, E);
556
+ }, m = (M, E) => Vn(l.value, E, b(M, E));
557
557
  m(t.shadows, "shadowMap.enabled"), m(t.toneMapping ?? st, "toneMapping"), m(t.shadowMapType, "shadowMap.type"), or < 150 && m(!t.useLegacyLights, "physicallyCorrectLights"), m(t.outputColorSpace, "outputColorSpace"), m(t.toneMappingExposure, "toneMappingExposure");
558
- const y = P(t.clearColor, "clearColor");
559
- y && l.value.setClearColor(
560
- y ? $n(y) : new ce(0)
558
+ const d = b(t.clearColor, "clearColor");
559
+ d && l.value.setClearColor(
560
+ d ? $n(d) : new ce(0)
561
561
  // default clear color is not easily/efficiently retrievable from three
562
562
  );
563
- }), Q(() => {
563
+ }), K(() => {
564
564
  l.value.dispose(), l.value.forceContextLoss();
565
565
  }), {
566
566
  renderer: l
@@ -574,18 +574,18 @@ function ar(e) {
574
574
  }), t;
575
575
  }
576
576
  async function Wr(e, t, n, r, s) {
577
- const { logError: a } = z(), i = new e();
577
+ const { logError: a } = Y(), i = new e();
578
578
  s && s(i), n && n(i);
579
579
  const c = (Array.isArray(t) ? t : [t]).map(
580
- (o) => new Promise((u, v) => {
580
+ (o) => new Promise((u, y) => {
581
581
  i.load(
582
582
  o,
583
583
  (f) => {
584
- const _ = f;
585
- _.scene && Object.assign(_, ar(_.scene)), u(_);
584
+ const g = f;
585
+ g.scene && Object.assign(g, ar(g.scene)), u(g);
586
586
  },
587
587
  r,
588
- (f) => v(a("[useLoader] - Failed to load resource", f))
588
+ (f) => y(a("[useLoader] - Failed to load resource", f))
589
589
  );
590
590
  })
591
591
  );
@@ -614,7 +614,7 @@ async function Nr(e, t) {
614
614
  metalnessMap: c,
615
615
  aoMap: o,
616
616
  alphaMap: u,
617
- matcap: v
617
+ matcap: y
618
618
  } = e;
619
619
  return {
620
620
  map: s ? await r(s) : null,
@@ -624,38 +624,38 @@ async function Nr(e, t) {
624
624
  metalnessMap: c ? await r(c) : null,
625
625
  aoMap: o ? await r(o) : null,
626
626
  alphaMap: u ? await r(u) : null,
627
- matcap: v ? await r(v) : null
627
+ matcap: y ? await r(y) : null
628
628
  };
629
629
  }
630
630
  }
631
631
  const lr = (e, t) => {
632
- const n = Y(() => t.renderer.value.domElement), r = H([]), { x: s, y: a } = tn({ target: n });
632
+ const n = V(() => t.renderer.value.domElement), r = $([]), { x: s, y: a } = tn({ target: n });
633
633
  let i = 0;
634
- const { width: l, height: c, top: o, left: u } = nn(n), v = ({ x: h, y: S }) => {
634
+ const { width: l, height: c, top: o, left: u } = nn(n), y = ({ x: h, y: T }) => {
635
635
  if (n.value)
636
636
  return {
637
637
  x: (h - u.value) / l.value * 2 - 1,
638
- y: -((S - o.value) / c.value) * 2 + 1
638
+ y: -((T - o.value) / c.value) * 2 + 1
639
639
  };
640
- }, f = ({ x: h, y: S }) => {
640
+ }, f = ({ x: h, y: T }) => {
641
641
  if (t.camera.value)
642
- return t.raycaster.value.setFromCamera(new ge(h, S), t.camera.value), r.value = t.raycaster.value.intersectObjects(e.value, !0), r.value;
643
- }, _ = (h) => {
644
- const S = v({
642
+ return t.raycaster.value.setFromCamera(new ge(h, T), t.camera.value), r.value = t.raycaster.value.intersectObjects(e.value, !0), r.value;
643
+ }, g = (h) => {
644
+ const T = y({
645
645
  x: (h == null ? void 0 : h.clientX) ?? s.value,
646
646
  y: (h == null ? void 0 : h.clientY) ?? a.value
647
647
  });
648
- return S ? f(S) || [] : [];
649
- }, p = j(), P = j(), m = j(), y = j(), g = j(), E = j(), C = j(), T = j();
650
- function M(h) {
651
- const S = {};
648
+ return T ? f(T) || [] : [];
649
+ }, v = j(), b = j(), m = j(), d = j(), M = j(), E = j(), P = j(), S = j();
650
+ function C(h) {
651
+ const T = {};
652
652
  for (const U in h)
653
- typeof U != "function" && (S[U] = h[U]);
654
- return S;
653
+ typeof U != "function" && (T[U] = h[U]);
654
+ return T;
655
655
  }
656
- const w = (h, S) => {
656
+ const _ = (h, T) => {
657
657
  var Oe, De, je;
658
- const U = M(S), ne = new Se(S == null ? void 0 : S.clientX, S == null ? void 0 : S.clientY, 0).unproject((Oe = t.camera) == null ? void 0 : Oe.value);
658
+ const U = C(T), ne = new Se(T == null ? void 0 : T.clientX, T == null ? void 0 : T.clientY, 0).unproject((Oe = t.camera) == null ? void 0 : Oe.value);
659
659
  h.trigger({
660
660
  ...U,
661
661
  intersections: r.value,
@@ -663,52 +663,52 @@ const lr = (e, t) => {
663
663
  unprojectedPoint: ne,
664
664
  ray: (De = t.raycaster) == null ? void 0 : De.value.ray,
665
665
  camera: (je = t.camera) == null ? void 0 : je.value,
666
- sourceEvent: S,
666
+ sourceEvent: T,
667
667
  delta: i,
668
668
  stopPropagating: !1
669
669
  });
670
670
  };
671
671
  let L;
672
672
  const x = (h) => {
673
- _(h), w(m, h), L = h;
674
- }, d = () => {
673
+ g(h), _(m, h), L = h;
674
+ }, p = () => {
675
675
  L && x(L);
676
676
  };
677
- let b, A, D;
678
- const $ = (h) => {
679
- var S;
680
- b = (S = r.value[0]) == null ? void 0 : S.object, i = 0, A = new ge(
677
+ let w, A, D;
678
+ const O = (h) => {
679
+ var T;
680
+ w = (T = r.value[0]) == null ? void 0 : T.object, i = 0, A = new ge(
681
681
  (h == null ? void 0 : h.clientX) ?? s.value,
682
682
  (h == null ? void 0 : h.clientY) ?? a.value
683
- ), w(g, h);
683
+ ), _(M, h);
684
684
  };
685
- let R, O = !1;
686
- const q = (h) => {
687
- var S, U, ne;
688
- h instanceof PointerEvent && (r.value.length === 0 && w(E, h), b === ((S = r.value[0]) == null ? void 0 : S.object) && (D = new ge(
685
+ let B, R = !1;
686
+ const te = (h) => {
687
+ var T, U, ne;
688
+ h instanceof PointerEvent && (r.value.length === 0 && _(E, h), w === ((T = r.value[0]) == null ? void 0 : T.object) && (D = new ge(
689
689
  (h == null ? void 0 : h.clientX) ?? s.value,
690
690
  (h == null ? void 0 : h.clientY) ?? a.value
691
- ), i = A == null ? void 0 : A.distanceTo(D), h.button === 0 ? (w(p, h), R === ((U = r.value[0]) == null ? void 0 : U.object) ? O = !0 : (R = (ne = r.value[0]) == null ? void 0 : ne.object, O = !1)) : h.button === 2 && w(C, h)), w(y, h));
691
+ ), i = A == null ? void 0 : A.distanceTo(D), h.button === 0 ? (_(v, h), B === ((U = r.value[0]) == null ? void 0 : U.object) ? R = !0 : (B = (ne = r.value[0]) == null ? void 0 : ne.object, R = !1)) : h.button === 2 && _(P, h)), _(d, h));
692
692
  }, xe = (h) => {
693
- O && (w(P, h), R = void 0, O = !1);
694
- }, Le = (h) => w(m, h), Re = (h) => w(T, h);
695
- return n.value.addEventListener("pointerup", q), n.value.addEventListener("pointerdown", $), n.value.addEventListener("pointermove", x), n.value.addEventListener("pointerleave", Le), n.value.addEventListener("dblclick", xe), n.value.addEventListener("wheel", Re), Q(() => {
696
- n != null && n.value && (n.value.removeEventListener("pointerup", q), n.value.removeEventListener("pointerdown", $), n.value.removeEventListener("pointermove", x), n.value.removeEventListener("pointerleave", Le), n.value.removeEventListener("dblclick", xe), n.value.removeEventListener("wheel", Re));
693
+ R && (_(b, h), B = void 0, R = !1);
694
+ }, Le = (h) => _(m, h), Re = (h) => _(S, h);
695
+ return n.value.addEventListener("pointerup", te), n.value.addEventListener("pointerdown", O), n.value.addEventListener("pointermove", x), n.value.addEventListener("pointerleave", Le), n.value.addEventListener("dblclick", xe), n.value.addEventListener("wheel", Re), K(() => {
696
+ n != null && n.value && (n.value.removeEventListener("pointerup", te), n.value.removeEventListener("pointerdown", O), n.value.removeEventListener("pointermove", x), n.value.removeEventListener("pointerleave", Le), n.value.removeEventListener("dblclick", xe), n.value.removeEventListener("wheel", Re));
697
697
  }), {
698
698
  intersects: r,
699
- onClick: (h) => p.on(h).off,
700
- onDblClick: (h) => P.on(h).off,
701
- onContextMenu: (h) => C.on(h).off,
699
+ onClick: (h) => v.on(h).off,
700
+ onDblClick: (h) => b.on(h).off,
701
+ onContextMenu: (h) => P.on(h).off,
702
702
  onPointerMove: (h) => m.on(h).off,
703
- onPointerUp: (h) => y.on(h).off,
704
- onPointerDown: (h) => g.on(h).off,
703
+ onPointerUp: (h) => d.on(h).off,
704
+ onPointerDown: (h) => M.on(h).off,
705
705
  onPointerMissed: (h) => E.on(h).off,
706
- onWheel: (h) => T.on(h).off,
707
- forceUpdate: d
706
+ onWheel: (h) => S.on(h).off,
707
+ forceUpdate: p
708
708
  };
709
709
  };
710
710
  function zr() {
711
- const { logWarning: e } = z();
711
+ const { logWarning: e } = Y();
712
712
  function t(a, i, l) {
713
713
  let c = null;
714
714
  return a.traverse((o) => {
@@ -746,102 +746,102 @@ function ke(e) {
746
746
  function cr(e) {
747
747
  return (e / 1024).toFixed(2);
748
748
  }
749
- const Me = I({}), Ce = (e) => Object.assign(Me.value, e);
749
+ const Ce = H({}), Me = (e) => Object.assign(Ce.value, e);
750
750
  function ur(e, t, n) {
751
751
  var x;
752
- const r = H(), s = H();
752
+ const r = $(), s = $();
753
753
  e && (r.value = e), t && (s.value = t);
754
- const a = (d) => {
755
- var b;
756
- return ((b = d.__tres) == null ? void 0 : b.eventCount) > 0;
757
- }, i = (d) => {
758
- var b;
759
- return ((b = d.children) == null ? void 0 : b.some((A) => i(A))) || a(d);
760
- }, l = H(((x = r.value) == null ? void 0 : x.children).filter(i) || []);
761
- function c(d, b) {
762
- if (Array.isArray(d))
763
- for (const A of d)
764
- A(b);
765
- typeof d == "function" && d(b);
754
+ const a = (p) => {
755
+ var w;
756
+ return ((w = p.__tres) == null ? void 0 : w.eventCount) > 0;
757
+ }, i = (p) => {
758
+ var w;
759
+ return ((w = p.children) == null ? void 0 : w.some((A) => i(A))) || a(p);
760
+ }, l = $(((x = r.value) == null ? void 0 : x.children).filter(i) || []);
761
+ function c(p, w) {
762
+ if (Array.isArray(p))
763
+ for (const A of p)
764
+ A(w);
765
+ typeof p == "function" && p(w);
766
766
  }
767
- function o(d, b) {
768
- const A = [], D = () => b.stopPropagating = !0;
769
- b.stopPropagation = D;
770
- for (const $ of b == null ? void 0 : b.intersections) {
771
- if (b.stopPropagating)
767
+ function o(p, w) {
768
+ const A = [], D = () => w.stopPropagating = !0;
769
+ w.stopPropagation = D;
770
+ for (const O of w == null ? void 0 : w.intersections) {
771
+ if (w.stopPropagating)
772
772
  return;
773
- b = { ...b, ...$ };
774
- const { object: R } = $;
775
- b.eventObject = R, c(R[d], b), A.push(R);
776
- let O = R.parent;
777
- for (; O !== null && !b.stopPropagating && !A.includes(O); )
778
- b.eventObject = O, c(O[d], b), A.push(O), O = O.parent;
779
- const q = zn(d.slice(2));
780
- n(q, { intersection: $, event: b });
773
+ w = { ...w, ...O };
774
+ const { object: B } = O;
775
+ w.eventObject = B, c(B[p], w), A.push(B);
776
+ let R = B.parent;
777
+ for (; R !== null && !w.stopPropagating && !A.includes(R); )
778
+ w.eventObject = R, c(R[p], w), A.push(R), R = R.parent;
779
+ const te = zn(p.slice(2));
780
+ n(te, { intersection: O, event: w });
781
781
  }
782
782
  }
783
783
  const {
784
784
  onClick: u,
785
- onDblClick: v,
785
+ onDblClick: y,
786
786
  onContextMenu: f,
787
- onPointerMove: _,
788
- onPointerDown: p,
789
- onPointerUp: P,
787
+ onPointerMove: g,
788
+ onPointerDown: v,
789
+ onPointerUp: b,
790
790
  onPointerMissed: m,
791
- onWheel: y,
792
- forceUpdate: g
791
+ onWheel: d,
792
+ forceUpdate: M
793
793
  } = lr(l, t);
794
- P((d) => o("onPointerUp", d)), p((d) => o("onPointerDown", d)), u((d) => o("onClick", d)), v((d) => o("onDoubleClick", d)), f((d) => o("onContextMenu", d)), y((d) => o("onWheel", d));
794
+ b((p) => o("onPointerUp", p)), v((p) => o("onPointerDown", p)), u((p) => o("onClick", p)), y((p) => o("onDoubleClick", p)), f((p) => o("onContextMenu", p)), d((p) => o("onWheel", p));
795
795
  let E = [];
796
- _((d) => {
797
- const b = d.intersections.map(({ object: D }) => D), A = d.intersections;
796
+ g((p) => {
797
+ const w = p.intersections.map(({ object: D }) => D), A = p.intersections;
798
798
  E.forEach(({ object: D }) => {
799
- b.includes(D) || (d.intersections = E, o("onPointerLeave", d), o("onPointerOut", d));
800
- }), d.intersections = A, d.intersections.forEach(({ object: D }) => {
801
- E.includes(D) || (o("onPointerEnter", d), o("onPointerOver", d));
802
- }), o("onPointerMove", d), E = d.intersections;
799
+ w.includes(D) || (p.intersections = E, o("onPointerLeave", p), o("onPointerOut", p));
800
+ }), p.intersections = A, p.intersections.forEach(({ object: D }) => {
801
+ E.includes(D) || (o("onPointerEnter", p), o("onPointerOver", p));
802
+ }), o("onPointerMove", p), E = p.intersections;
803
803
  });
804
- const C = [];
805
- m((d) => {
806
- const b = () => d.stopPropagating = !0;
807
- d.stopPropagation = b, C.forEach((A) => {
808
- d.stopPropagating || (d.eventObject = A, c(A.onPointerMissed, d));
809
- }), n("pointer-missed", { event: d });
804
+ const P = [];
805
+ m((p) => {
806
+ const w = () => p.stopPropagating = !0;
807
+ p.stopPropagation = w, P.forEach((A) => {
808
+ p.stopPropagating || (p.eventObject = A, c(A.onPointerMissed, p));
809
+ }), n("pointer-missed", { event: p });
810
810
  });
811
- function T(d) {
812
- re(d) && W(d) && l.value.push(d);
811
+ function S(p) {
812
+ re(p) && W(p) && l.value.push(p);
813
813
  }
814
- function M(d) {
815
- if (re(d) && W(d)) {
816
- const b = l.value.indexOf(d);
817
- b > -1 && l.value.splice(b, 1);
814
+ function C(p) {
815
+ if (re(p) && W(p)) {
816
+ const w = l.value.indexOf(p);
817
+ w > -1 && l.value.splice(w, 1);
818
818
  }
819
819
  }
820
- function w(d) {
821
- re(d) && W(d) && d.onPointerMissed && C.push(d);
820
+ function _(p) {
821
+ re(p) && W(p) && p.onPointerMissed && P.push(p);
822
822
  }
823
- function L(d) {
824
- if (re(d) && W(d)) {
825
- const b = C.indexOf(d);
826
- b > -1 && C.splice(b, 1);
823
+ function L(p) {
824
+ if (re(p) && W(p)) {
825
+ const w = P.indexOf(p);
826
+ w > -1 && P.splice(w, 1);
827
827
  }
828
828
  }
829
829
  return t.eventManager = {
830
- forceUpdate: g,
831
- registerObject: T,
832
- deregisterObject: M,
833
- registerPointerMissedObject: w,
830
+ forceUpdate: M,
831
+ registerObject: S,
832
+ deregisterObject: C,
833
+ registerPointerMissedObject: _,
834
834
  deregisterPointerMissedObject: L
835
835
  }, {
836
- forceUpdate: g,
837
- registerObject: T,
838
- deregisterObject: M,
839
- registerPointerMissedObject: w,
836
+ forceUpdate: M,
837
+ registerObject: S,
838
+ deregisterObject: C,
839
+ registerPointerMissedObject: _,
840
840
  deregisterPointerMissedObject: L
841
841
  };
842
842
  }
843
843
  function fr(e, t, n = 10) {
844
- const r = k(e) ? rn() : on(Y(() => k(t).parentElement)), s = ye(Fe(r.width, n)), a = ye(Fe(r.height, n)), i = Y(() => s.value / a.value);
844
+ const r = k(e) ? rn() : on(V(() => k(t).parentElement)), s = ye(Fe(r.width, n)), a = ye(Fe(r.height, n)), i = V(() => s.value / a.value);
845
845
  return {
846
846
  height: a,
847
847
  width: s,
@@ -852,9 +852,9 @@ function ve() {
852
852
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set();
853
853
  let n = 0, r = !1;
854
854
  const s = () => {
855
- const o = Array.from(e.entries()).sort((u, v) => {
856
- const f = u[1].priority - v[1].priority;
857
- return f === 0 ? u[1].addI - v[1].addI : f;
855
+ const o = Array.from(e.entries()).sort((u, y) => {
856
+ const f = u[1].priority - y[1].priority;
857
+ return f === 0 ? u[1].addI - y[1].addI : f;
858
858
  });
859
859
  t.clear(), o.forEach((u) => t.add(u[0]));
860
860
  }, a = (o) => {
@@ -862,9 +862,9 @@ function ve() {
862
862
  };
863
863
  return { on: (o, u = 0) => {
864
864
  e.set(o, { priority: u, addI: n++ });
865
- const v = () => a(o);
866
- return sn(v), r = !0, {
867
- off: v
865
+ const y = () => a(o);
866
+ return sn(y), r = !0, {
867
+ off: y
868
868
  };
869
869
  }, off: a, trigger: (...o) => {
870
870
  r && (s(), r = !1), t.forEach((u) => u(...o));
@@ -876,77 +876,77 @@ function ve() {
876
876
  }
877
877
  function dr() {
878
878
  let e = !0, t = !0, n = !1;
879
- const r = new tt(!1), s = I(r.running), a = I(!1);
879
+ const r = new tt(!1), s = H(r.running), a = H(!1);
880
880
  let i;
881
881
  const l = rt.generateUUID();
882
882
  let c = null;
883
- const o = ve(), u = ve(), v = ve();
884
- M();
883
+ const o = ve(), u = ve(), y = ve();
884
+ C();
885
885
  let f = {};
886
- function _(w) {
887
- f = w;
886
+ function g(_) {
887
+ f = _;
888
888
  }
889
- function p(w, L, x = 0) {
889
+ function v(_, L, x = 0) {
890
890
  switch (L) {
891
891
  case "before":
892
- return o.on(w, x);
892
+ return o.on(_, x);
893
893
  case "render":
894
- return c || (c = w), u.dispose(), u.on(w);
894
+ return c || (c = _), u.dispose(), u.on(_);
895
895
  case "after":
896
- return v.on(w, x);
896
+ return y.on(_, x);
897
897
  }
898
898
  }
899
- function P() {
900
- t && (t = !1, M(), T());
899
+ function b() {
900
+ t && (t = !1, C(), S());
901
901
  }
902
902
  function m() {
903
- t = !0, M(), cancelAnimationFrame(i);
903
+ t = !0, C(), cancelAnimationFrame(i);
904
904
  }
905
- function y() {
906
- n = !1, M();
905
+ function d() {
906
+ n = !1, C();
907
907
  }
908
- function g() {
909
- n = !0, M();
908
+ function M() {
909
+ n = !0, C();
910
910
  }
911
911
  function E() {
912
912
  a.value = !0;
913
913
  }
914
- function C() {
914
+ function P() {
915
915
  a.value = !1;
916
916
  }
917
- function T() {
917
+ function S() {
918
918
  if (!e) {
919
- i = requestAnimationFrame(T);
919
+ i = requestAnimationFrame(S);
920
920
  return;
921
921
  }
922
- const w = r.getDelta(), L = r.getElapsedTime(), x = {
923
- camera: K(f.camera),
924
- scene: K(f.scene),
925
- renderer: K(f.renderer),
926
- raycaster: K(f.raycaster),
927
- controls: K(f.controls),
922
+ const _ = r.getDelta(), L = r.getElapsedTime(), x = {
923
+ camera: J(f.camera),
924
+ scene: J(f.scene),
925
+ renderer: J(f.renderer),
926
+ raycaster: J(f.raycaster),
927
+ controls: J(f.controls),
928
928
  invalidate: f.invalidate,
929
929
  advance: f.advance
930
- }, d = { delta: w, elapsed: L, clock: r, ...x };
931
- s.value && o.trigger(d), a.value || (u.count ? u.trigger(d) : c && c(d)), s.value && v.trigger(d), i = requestAnimationFrame(T);
930
+ }, p = { delta: _, elapsed: L, clock: r, ...x };
931
+ s.value && o.trigger(p), a.value || (u.count ? u.trigger(p) : c && c(p)), s.value && y.trigger(p), i = requestAnimationFrame(S);
932
932
  }
933
- function M() {
934
- const w = !t && !n;
935
- r.running !== w && (r.running ? r.stop() : r.start()), s.value = r.running;
933
+ function C() {
934
+ const _ = !t && !n;
935
+ r.running !== _ && (r.running ? r.stop() : r.start()), s.value = r.running;
936
936
  }
937
937
  return {
938
938
  loopId: l,
939
- register: (w, L, x) => p(w, L, x),
940
- start: P,
939
+ register: (_, L, x) => v(_, L, x),
940
+ start: b,
941
941
  stop: m,
942
- pause: g,
943
- resume: y,
942
+ pause: M,
943
+ resume: d,
944
944
  pauseRender: E,
945
- resumeRender: C,
945
+ resumeRender: P,
946
946
  isRenderPaused: a,
947
947
  isActive: s,
948
- setContext: _,
949
- setReady: (w) => e = w
948
+ setContext: g,
949
+ setReady: (_) => e = _
950
950
  };
951
951
  }
952
952
  function pr(e, t, n = 100) {
@@ -960,8 +960,8 @@ function pr(e, t, n = 100) {
960
960
  i = !0, l && clearTimeout(l);
961
961
  }
962
962
  c();
963
- const u = (f, ..._) => {
964
- f(..._);
963
+ const u = (f, ...g) => {
964
+ f(...g);
965
965
  };
966
966
  return {
967
967
  on: (f) => {
@@ -969,8 +969,8 @@ function pr(e, t, n = 100) {
969
969
  return u(f, t), { off: () => {
970
970
  } };
971
971
  {
972
- const _ = r.on(f);
973
- return s.add(_.off), r.on(f);
972
+ const g = r.on(f);
973
+ return s.add(g.off), r.on(f);
974
974
  }
975
975
  },
976
976
  off: r.off,
@@ -978,10 +978,10 @@ function pr(e, t, n = 100) {
978
978
  cancel: o
979
979
  };
980
980
  }
981
- const te = /* @__PURE__ */ new WeakMap();
981
+ const ee = /* @__PURE__ */ new WeakMap();
982
982
  function gt(e) {
983
- if (e = e || pe(), te.has(e))
984
- return te.get(e);
983
+ if (e = e || pe(), ee.has(e))
984
+ return ee.get(e);
985
985
  const t = 100, n = Date.now(), a = pr(() => {
986
986
  if (Date.now() - n >= t)
987
987
  return !0;
@@ -990,12 +990,12 @@ function gt(e) {
990
990
  return !!(i && l.width > 0 && l.height > 0);
991
991
  }
992
992
  }, e);
993
- return te.set(e, a), a;
993
+ return ee.set(e, a), a;
994
994
  }
995
995
  function Gr(e) {
996
996
  const t = pe();
997
997
  if (t)
998
- return te.has(t) ? te.get(t).on(e) : gt(t).on(e);
998
+ return ee.has(t) ? ee.get(t).on(e) : gt(t).on(e);
999
999
  }
1000
1000
  function mr({
1001
1001
  scene: e,
@@ -1005,43 +1005,43 @@ function mr({
1005
1005
  rendererOptions: s,
1006
1006
  emit: a
1007
1007
  }) {
1008
- const { logWarning: i } = z(), l = H(e), c = fr(n, t), {
1009
- camera: o,
1010
- cameras: u,
1011
- registerCamera: v,
1012
- deregisterCamera: f,
1013
- setCameraActive: _
1014
- } = jn({ sizes: c, scene: e }), p = {
1015
- mode: I(s.renderMode || "always"),
1016
- priority: I(0),
1017
- frames: I(0),
1008
+ const i = $(e), l = fr(n, t), {
1009
+ camera: c,
1010
+ cameras: o,
1011
+ registerCamera: u,
1012
+ deregisterCamera: y,
1013
+ setCameraActive: f
1014
+ } = jn({ sizes: l, scene: e }), g = {
1015
+ mode: H(s.renderMode || "always"),
1016
+ priority: H(0),
1017
+ frames: H(0),
1018
1018
  maxFrames: 60,
1019
- canBeInvalidated: Y(() => p.mode.value === "on-demand" && p.frames.value === 0)
1019
+ canBeInvalidated: V(() => g.mode.value === "on-demand" && g.frames.value === 0)
1020
1020
  };
1021
- function P(R = 1) {
1022
- s.renderMode === "on-demand" ? p.frames.value = Math.min(p.maxFrames, p.frames.value + R) : i("`invalidate` can only be used when `renderMode` is set to `on-demand`");
1021
+ function v(O = 1) {
1022
+ s.renderMode === "on-demand" && (g.frames.value = Math.min(g.maxFrames, g.frames.value + O));
1023
1023
  }
1024
- function m() {
1025
- s.renderMode === "manual" ? p.frames.value = 1 : i("`advance` can only be used when `renderMode` is set to `manual`");
1024
+ function b() {
1025
+ s.renderMode === "manual" && (g.frames.value = 1);
1026
1026
  }
1027
- const { renderer: y } = sr(
1027
+ const { renderer: m } = sr(
1028
1028
  {
1029
1029
  scene: e,
1030
1030
  canvas: t,
1031
1031
  options: s,
1032
1032
  emit: a,
1033
1033
  // TODO: replace contextParts with full ctx at https://github.com/Tresjs/tres/issues/516
1034
- contextParts: { sizes: c, camera: o, render: p, invalidate: P, advance: m },
1034
+ contextParts: { sizes: l, camera: c, render: g, invalidate: v, advance: b },
1035
1035
  disableRender: r
1036
1036
  }
1037
- ), g = {
1038
- sizes: c,
1039
- scene: l,
1040
- camera: o,
1041
- cameras: ye(u),
1042
- renderer: y,
1043
- raycaster: H(new Ft()),
1044
- controls: I(null),
1037
+ ), d = {
1038
+ sizes: l,
1039
+ scene: i,
1040
+ camera: c,
1041
+ cameras: ye(o),
1042
+ renderer: m,
1043
+ raycaster: $(new Ft()),
1044
+ controls: H(null),
1045
1045
  perf: {
1046
1046
  maxFrames: 160,
1047
1047
  fps: {
@@ -1054,41 +1054,41 @@ function mr({
1054
1054
  accumulator: []
1055
1055
  }
1056
1056
  },
1057
- render: p,
1058
- advance: m,
1059
- extend: Ce,
1060
- invalidate: P,
1061
- registerCamera: v,
1062
- setCameraActive: _,
1063
- deregisterCamera: f,
1057
+ render: g,
1058
+ advance: b,
1059
+ extend: Me,
1060
+ invalidate: v,
1061
+ registerCamera: u,
1062
+ setCameraActive: f,
1063
+ deregisterCamera: y,
1064
1064
  loop: dr()
1065
1065
  };
1066
- _e("useTres", g), g.scene.value.__tres = {
1067
- root: g
1068
- }, g.loop.register(() => {
1069
- o.value && p.frames.value > 0 && (y.value.render(e, o.value), a("render", g.renderer.value)), p.priority.value = 0, p.mode.value === "always" ? p.frames.value = 1 : p.frames.value = Math.max(0, p.frames.value - 1);
1066
+ _e("useTres", d), d.scene.value.__tres = {
1067
+ root: d
1068
+ }, d.loop.register(() => {
1069
+ c.value && g.frames.value > 0 && (m.value.render(e, c.value), a("render", d.renderer.value)), g.priority.value = 0, g.mode.value === "always" ? g.frames.value = 1 : g.frames.value = Math.max(0, g.frames.value - 1);
1070
1070
  }, "render");
1071
- const { on: E, cancel: C } = gt(g);
1072
- g.loop.setReady(!1), g.loop.start(), E(() => {
1073
- a("ready", g), g.loop.setReady(!0), ur(e, g, a);
1074
- }), Q(() => {
1075
- C(), g.loop.stop();
1071
+ const { on: M, cancel: E } = gt(d);
1072
+ d.loop.setReady(!1), d.loop.start(), M(() => {
1073
+ a("ready", d), d.loop.setReady(!0), ur(e, d, a);
1074
+ }), K(() => {
1075
+ E(), d.loop.stop();
1076
1076
  });
1077
- const T = 100, M = an({ every: T }), { isSupported: w, memory: L } = ln({ interval: T }), x = 160;
1078
- let d = performance.now();
1079
- const b = ({ timestamp: R }) => {
1080
- g.scene.value && (g.perf.memory.allocatedMem = ke(g.scene.value)), R - d >= T && (d = R, g.perf.fps.accumulator.push(M.value), g.perf.fps.accumulator.length > x && g.perf.fps.accumulator.shift(), g.perf.fps.value = M.value, w.value && L.value && (g.perf.memory.accumulator.push(L.value.usedJSHeapSize / 1024 / 1024), g.perf.memory.accumulator.length > x && g.perf.memory.accumulator.shift(), g.perf.memory.currentMem = g.perf.memory.accumulator.reduce((O, q) => O + q, 0) / g.perf.memory.accumulator.length));
1077
+ const P = 100, S = an({ every: P }), { isSupported: C, memory: _ } = ln({ interval: P }), L = 160;
1078
+ let x = performance.now();
1079
+ const p = ({ timestamp: O }) => {
1080
+ d.scene.value && (d.perf.memory.allocatedMem = ke(d.scene.value)), O - x >= P && (x = O, d.perf.fps.accumulator.push(S.value), d.perf.fps.accumulator.length > L && d.perf.fps.accumulator.shift(), d.perf.fps.value = S.value, C.value && _.value && (d.perf.memory.accumulator.push(_.value.usedJSHeapSize / 1024 / 1024), d.perf.memory.accumulator.length > L && d.perf.memory.accumulator.shift(), d.perf.memory.currentMem = d.perf.memory.accumulator.reduce((B, R) => B + R, 0) / d.perf.memory.accumulator.length));
1081
1081
  };
1082
- let A = 0;
1083
- const D = 1, { pause: $ } = it(({ delta: R }) => {
1084
- window.__TRES__DEVTOOLS__ && (b({ timestamp: performance.now() }), A += R, A >= D && (window.__TRES__DEVTOOLS__.cb(g), A = 0));
1082
+ let w = 0;
1083
+ const A = 1, { pause: D } = it(({ delta: O }) => {
1084
+ window.__TRES__DEVTOOLS__ && (p({ timestamp: performance.now() }), w += O, w >= A && (window.__TRES__DEVTOOLS__.cb(d), w = 0));
1085
1085
  }, { immediate: !0 });
1086
- return Q(() => {
1087
- $();
1088
- }), g;
1086
+ return K(() => {
1087
+ D();
1088
+ }), d;
1089
1089
  }
1090
1090
  function pe() {
1091
- const e = Mt("useTres");
1091
+ const e = Ct("useTres");
1092
1092
  if (!e)
1093
1093
  throw new Error("useTresContext must be used together with useTresContextProvider");
1094
1094
  return e;
@@ -1114,14 +1114,14 @@ function Yr() {
1114
1114
  invalidate: i,
1115
1115
  advance: l
1116
1116
  });
1117
- function c(v, f = 0) {
1118
- return r.register(v, "before", f);
1117
+ function c(y, f = 0) {
1118
+ return r.register(y, "before", f);
1119
1119
  }
1120
- function o(v) {
1121
- return r.register(v, "render");
1120
+ function o(y) {
1121
+ return r.register(y, "render");
1122
1122
  }
1123
- function u(v, f = 0) {
1124
- return r.register(v, "after", f);
1123
+ function u(y, f = 0) {
1124
+ return r.register(y, "after", f);
1125
1125
  }
1126
1126
  return {
1127
1127
  pause: r.pause,
@@ -1153,7 +1153,7 @@ function hr(e, t = {}, n = {}) {
1153
1153
  };
1154
1154
  return a = new Proxy({}, i), a;
1155
1155
  }
1156
- const { logError: Ke } = z(), Qe = [
1156
+ const { logError: Ke } = Y(), Qe = [
1157
1157
  "onClick",
1158
1158
  "onContextMenu",
1159
1159
  "onPointerMove",
@@ -1170,66 +1170,66 @@ const { logError: Ke } = z(), Qe = [
1170
1170
  "onWheel"
1171
1171
  ], gr = (e) => {
1172
1172
  const t = e.scene.value;
1173
- function n(o, u, v, f) {
1173
+ function n(o, u, y, f) {
1174
1174
  if (f || (f = {}), f.args || (f.args = []), o === "template" || Wn(o))
1175
1175
  return null;
1176
- let _ = o.replace("Tres", ""), p;
1176
+ let g = o.replace("Tres", ""), v;
1177
1177
  if (o === "primitive") {
1178
- (!N(f.object) || Ct(f.object)) && Ke(
1178
+ (!N(f.object) || Mt(f.object)) && Ke(
1179
1179
  "Tres primitives need an 'object' prop, whose value is an object or shallowRef<object>"
1180
- ), _ = f.object.type;
1181
- const P = {};
1182
- p = hr(
1180
+ ), g = f.object.type;
1181
+ const b = {};
1182
+ v = hr(
1183
1183
  f.object,
1184
1184
  {
1185
- object: (y) => y,
1185
+ object: (d) => d,
1186
1186
  isPrimitive: () => !0,
1187
- __tres: () => P
1187
+ __tres: () => b
1188
1188
  },
1189
1189
  {
1190
- object: (y, g, E, C) => {
1191
- rr(y, E, C, { patchProp: a, remove: s, insert: r }, e);
1190
+ object: (d, M, E, P) => {
1191
+ rr(d, E, P, { patchProp: a, remove: s, insert: r }, e);
1192
1192
  },
1193
- __tres: (y) => {
1194
- Object.assign(P, y);
1193
+ __tres: (d) => {
1194
+ Object.assign(b, d);
1195
1195
  }
1196
1196
  }
1197
1197
  );
1198
1198
  } else {
1199
- const P = Me.value[_];
1200
- P || Ke(
1201
- `${_} is not defined on the THREE namespace. Use extend to add it to the catalog.`
1202
- ), p = new P(...f.args);
1199
+ const b = Ce.value[g];
1200
+ b || Ke(
1201
+ `${g} is not defined on the THREE namespace. Use extend to add it to the catalog.`
1202
+ ), v = new b(...f.args);
1203
1203
  }
1204
- return p ? (p.isCamera && (f != null && f.position || p.position.set(3, 3, 3), f != null && f.lookAt || p.lookAt(0, 0, 0)), p = G(p, {
1205
- ...p.__tres,
1206
- type: _,
1204
+ return v ? (v.isCamera && (f != null && f.position || v.position.set(3, 3, 3), f != null && f.lookAt || v.lookAt(0, 0, 0)), v = z(v, {
1205
+ ...v.__tres,
1206
+ type: g,
1207
1207
  memoizedProps: f,
1208
1208
  eventCount: 0,
1209
1209
  primitive: o === "primitive",
1210
1210
  attach: f.attach
1211
- }, e), p) : null;
1211
+ }, e), v) : null;
1212
1212
  }
1213
1213
  function r(o, u) {
1214
- var _, p, P;
1214
+ var g, v, b;
1215
1215
  if (!o)
1216
1216
  return;
1217
1217
  u = u || t;
1218
- const v = o.__tres ? o : G(o, {}, e), f = u.__tres ? u : G(u, {}, e);
1219
- o = X(v), u = X(f), o.__tres && ((_ = o.__tres) == null ? void 0 : _.eventCount) > 0 && ((p = e.eventManager) == null || p.registerObject(o)), e.registerCamera(o), (P = e.eventManager) == null || P.registerPointerMissedObject(o), v.__tres.attach ? er(f, v, v.__tres.attach) : W(o) && W(f) && (f.add(o), o.dispatchEvent({ type: "added" })), v.__tres.parent = f, f.__tres.objects && !f.__tres.objects.includes(v) && f.__tres.objects.push(v);
1218
+ const y = o.__tres ? o : z(o, {}, e), f = u.__tres ? u : z(u, {}, e);
1219
+ o = Q(y), u = Q(f), o.__tres && ((g = o.__tres) == null ? void 0 : g.eventCount) > 0 && ((v = e.eventManager) == null || v.registerObject(o)), e.registerCamera(o), (b = e.eventManager) == null || b.registerPointerMissedObject(o), y.__tres.attach ? er(f, y, y.__tres.attach) : W(o) && W(f) && (f.add(o), o.dispatchEvent({ type: "added" })), y.__tres.parent = f, f.__tres.objects && !f.__tres.objects.includes(y) && f.__tres.objects.push(y);
1220
1220
  }
1221
1221
  function s(o, u) {
1222
- var p, P, m, y;
1222
+ var v, b, m, d;
1223
1223
  if (!o)
1224
1224
  return;
1225
- o != null && o.__tres && ((p = o.__tres) == null ? void 0 : p.eventCount) > 0 && ((P = e.eventManager) == null || P.deregisterObject(o)), u = be(u) ? "default" : u;
1226
- const v = (m = o.__tres) == null ? void 0 : m.dispose;
1227
- be(v) || (v === null ? u = !1 : u = v);
1228
- const f = (y = o.__tres) == null ? void 0 : y.primitive, _ = u === "default" ? !f : !!u;
1229
- if (o.__tres && "objects" in o.__tres && [...o.__tres.objects].forEach((g) => s(g, u)), _ && o.children && [...o.children].forEach((g) => s(g, u)), mt(o, e), ht(o, e), _ && !On(o)) {
1230
- if (V(u))
1225
+ o != null && o.__tres && ((v = o.__tres) == null ? void 0 : v.eventCount) > 0 && ((b = e.eventManager) == null || b.deregisterObject(o)), u = be(u) ? "default" : u;
1226
+ const y = (m = o.__tres) == null ? void 0 : m.dispose;
1227
+ be(y) || (y === null ? u = !1 : u = y);
1228
+ const f = (d = o.__tres) == null ? void 0 : d.primitive, g = u === "default" ? !f : !!u;
1229
+ if (o.__tres && "objects" in o.__tres && [...o.__tres.objects].forEach((M) => s(M, u)), g && o.children && [...o.children].forEach((M) => s(M, u)), mt(o, e), ht(o, e), g && !On(o)) {
1230
+ if (G(u))
1231
1231
  u(o);
1232
- else if (V(o.dispose))
1232
+ else if (G(o.dispose))
1233
1233
  try {
1234
1234
  o.dispose();
1235
1235
  } catch {
@@ -1237,66 +1237,66 @@ const { logError: Ke } = z(), Qe = [
1237
1237
  }
1238
1238
  "__tres" in o && delete o.__tres;
1239
1239
  }
1240
- function a(o, u, v, f) {
1241
- var g, E;
1240
+ function a(o, u, y, f) {
1241
+ var M, E;
1242
1242
  if (!o)
1243
1243
  return;
1244
- let _ = o, p = u;
1244
+ let g = o, v = u;
1245
1245
  if (o.__tres && (o.__tres.memoizedProps[u] = f), u === "attach") {
1246
- const C = ((g = o.__tres) == null ? void 0 : g.parent) || o.parent;
1247
- s(o), G(o, { attach: f }, e), C && r(o, C);
1246
+ const P = ((M = o.__tres) == null ? void 0 : M.parent) || o.parent;
1247
+ s(o), z(o, { attach: f }, e), P && r(o, P);
1248
1248
  return;
1249
1249
  }
1250
1250
  if (u === "dispose") {
1251
- o.__tres || (o = G(o, {}, e)), o.__tres.dispose = f;
1251
+ o.__tres || (o = z(o, {}, e)), o.__tres.dispose = f;
1252
1252
  return;
1253
1253
  }
1254
- if (W(o) && p === "blocks-pointer-events") {
1255
- f || f === "" ? o[p] = f : delete o[p];
1254
+ if (W(o) && v === "blocks-pointer-events") {
1255
+ f || f === "" ? o[v] = f : delete o[v];
1256
1256
  return;
1257
1257
  }
1258
1258
  Qe.includes(u) && o.__tres && (o.__tres.eventCount += 1);
1259
- let P = se(p), m = _ == null ? void 0 : _[P];
1260
- if (p === "args") {
1261
- const C = o, T = v ?? [], M = f ?? [], w = ((E = o.__tres) == null ? void 0 : E.type) || o.type;
1262
- w && T.length && !Yn(T, M) && (_ = Object.assign(
1263
- C,
1264
- new Me.value[w](...f)
1259
+ let b = se(v), m = g == null ? void 0 : g[b];
1260
+ if (v === "args") {
1261
+ const P = o, S = y ?? [], C = f ?? [], _ = ((E = o.__tres) == null ? void 0 : E.type) || o.type;
1262
+ _ && S.length && !Yn(S, C) && (g = Object.assign(
1263
+ P,
1264
+ new Ce.value[_](...f)
1265
1265
  ));
1266
1266
  return;
1267
1267
  }
1268
- if (_.type === "BufferGeometry") {
1269
- if (p === "args")
1268
+ if (g.type === "BufferGeometry") {
1269
+ if (v === "args")
1270
1270
  return;
1271
- _.setAttribute(
1272
- se(p),
1271
+ g.setAttribute(
1272
+ se(v),
1273
1273
  new Wt(...f)
1274
1274
  );
1275
1275
  return;
1276
1276
  }
1277
- if (p.includes("-") && m === void 0) {
1278
- const C = p.split("-");
1279
- m = C.reduce((T, M) => T[se(M)], _), p = C.pop(), P = p, m != null && m.set || (_ = C.reduce((T, M) => T[se(M)], _));
1277
+ if (v.includes("-") && m === void 0) {
1278
+ const P = v.split("-");
1279
+ m = P.reduce((S, C) => S[se(C)], g), v = P.pop(), b = v, m != null && m.set || (g = P.reduce((S, C) => S[se(C)], g));
1280
1280
  }
1281
- let y = f;
1282
- if (y === "" && (y = !0), V(m)) {
1283
- Qe.includes(u) || (de(y) ? o[P](...y) : o[P](y)), P.startsWith("on") && V(y) && (_[P] = y);
1281
+ let d = f;
1282
+ if (d === "" && (d = !0), G(m)) {
1283
+ Qe.includes(u) || (de(d) ? o[b](...d) : o[b](d)), b.startsWith("on") && G(d) && (g[b] = d);
1284
1284
  return;
1285
1285
  }
1286
- !(m != null && m.set) && !V(m) ? _[P] = y : m.constructor === y.constructor && (m != null && m.copy) ? m == null || m.copy(y) : de(y) ? m.set(...y) : !m.isColor && m.setScalar ? m.setScalar(y) : m.set(y), pt(o);
1286
+ !(m != null && m.set) && !G(m) ? g[b] = d : m.constructor === d.constructor && (m != null && m.copy) ? m == null || m.copy(d) : de(d) ? m.set(...d) : !m.isColor && m.setScalar ? m.setScalar(d) : m.set(d), pt(o);
1287
1287
  }
1288
1288
  function i(o) {
1289
1289
  var u;
1290
1290
  return ((u = o == null ? void 0 : o.__tres) == null ? void 0 : u.parent) || null;
1291
1291
  }
1292
1292
  function l(o) {
1293
- const u = G(new Nt(), { type: "Comment" }, e);
1293
+ const u = z(new Nt(), { type: "Comment" }, e);
1294
1294
  return u.name = o, u;
1295
1295
  }
1296
1296
  function c(o) {
1297
- var _;
1298
- const u = i(o), v = ((_ = u == null ? void 0 : u.__tres) == null ? void 0 : _.objects) || [], f = v.indexOf(o);
1299
- return f < 0 || f >= v.length - 1 ? null : v[f + 1];
1297
+ var g;
1298
+ const u = i(o), y = ((g = u == null ? void 0 : u.__tres) == null ? void 0 : g.objects) || [], f = y.indexOf(o);
1299
+ return f < 0 || f >= y.length - 1 ? null : y[f + 1];
1300
1300
  }
1301
1301
  return {
1302
1302
  insert: r,
@@ -1322,15 +1322,15 @@ function vt() {
1322
1322
  return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
1323
1323
  }
1324
1324
  const yr = typeof Proxy == "function", _r = "devtools-plugin:setup", wr = "plugin:settings:set";
1325
- let J, Ee;
1325
+ let q, Ee;
1326
1326
  function br() {
1327
1327
  var e;
1328
- return J !== void 0 || (typeof window < "u" && window.performance ? (J = !0, Ee = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (J = !0, Ee = globalThis.perf_hooks.performance) : J = !1), J;
1328
+ return q !== void 0 || (typeof window < "u" && window.performance ? (q = !0, Ee = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (q = !0, Ee = globalThis.perf_hooks.performance) : q = !1), q;
1329
1329
  }
1330
1330
  function Pr() {
1331
1331
  return br() ? Ee.now() : Date.now();
1332
1332
  }
1333
- class Mr {
1333
+ class Cr {
1334
1334
  constructor(t, n) {
1335
1335
  this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
1336
1336
  const r = {};
@@ -1392,12 +1392,12 @@ class Mr {
1392
1392
  n.resolve(await this.target[n.method](...n.args));
1393
1393
  }
1394
1394
  }
1395
- function Cr(e, t) {
1395
+ function Mr(e, t) {
1396
1396
  const n = e, r = vt(), s = vr(), a = yr && n.enableEarlyProxy;
1397
1397
  if (s && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !a))
1398
1398
  s.emit(_r, e, t);
1399
1399
  else {
1400
- const i = a ? new Mr(n, s) : null;
1400
+ const i = a ? new Cr(n, s) : null;
1401
1401
  (r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
1402
1402
  pluginDescriptor: n,
1403
1403
  setupFn: t,
@@ -1460,11 +1460,11 @@ function _t(e, t, n = "") {
1460
1460
  t.children.push(s), _t(r, s, n);
1461
1461
  });
1462
1462
  }
1463
- const Tr = [], Z = "tres:inspector", Sr = Et({
1463
+ const Tr = [], X = "tres:inspector", Sr = Et({
1464
1464
  sceneGraph: null
1465
1465
  });
1466
1466
  function Ar(e, t) {
1467
- Cr(
1467
+ Mr(
1468
1468
  {
1469
1469
  id: "dev.esm.tres",
1470
1470
  label: "TresJS 🪐",
@@ -1478,16 +1478,16 @@ function Ar(e, t) {
1478
1478
  typeof n.now != "function" && Er(
1479
1479
  "You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."
1480
1480
  ), n.addInspector({
1481
- id: Z,
1481
+ id: X,
1482
1482
  label: "TresJS 🪐",
1483
1483
  icon: "account_tree",
1484
1484
  treeFilterPlaceholder: "Search instances"
1485
1485
  }), setInterval(() => {
1486
- n.sendInspectorTree(Z);
1486
+ n.sendInspectorTree(X);
1487
1487
  }, 1e3), setInterval(() => {
1488
1488
  n.notifyComponentUpdate();
1489
1489
  }, 5e3), n.on.getInspectorTree((a) => {
1490
- if (a.inspectorId === Z) {
1490
+ if (a.inspectorId === X) {
1491
1491
  const i = yt(t.scene.value);
1492
1492
  _t(t.scene.value, i, a.filter), Sr.sceneGraph = i, a.rootNodes = [i];
1493
1493
  }
@@ -1495,7 +1495,7 @@ function Ar(e, t) {
1495
1495
  let r = null, s = null;
1496
1496
  n.on.getInspectorState((a) => {
1497
1497
  var i;
1498
- if (a.inspectorId === Z) {
1498
+ if (a.inspectorId === X) {
1499
1499
  const [l] = t.scene.value.getObjectsByProperty("uuid", a.nodeId);
1500
1500
  if (!l)
1501
1501
  return;
@@ -1523,7 +1523,7 @@ function Ar(e, t) {
1523
1523
  }))) || []);
1524
1524
  }
1525
1525
  }), n.on.editInspectorState((a) => {
1526
- a.inspectorId === Z && Jn(t.scene.value, a.nodeId, a.path, a.state.value);
1526
+ a.inspectorId === X && Jn(t.scene.value, a.nodeId, a.path, a.state.value);
1527
1527
  });
1528
1528
  }
1529
1529
  );
@@ -1573,66 +1573,66 @@ const kr = ["data-scene", "data-tres"], xr = /* @__PURE__ */ Be({
1573
1573
  "ready"
1574
1574
  ],
1575
1575
  setup(e, { expose: t, emit: n }) {
1576
- var P;
1577
- const r = e, s = n, a = Tt(), { logWarning: i } = z(), l = I(), c = H(new nt()), o = (P = Ie()) == null ? void 0 : P.appContext.app;
1578
- Ce(et);
1576
+ var b;
1577
+ const r = e, s = n, a = Tt(), { logWarning: i } = Y(), l = H(), c = $(new nt()), o = (b = Ie()) == null ? void 0 : b.appContext.app;
1578
+ Me(et);
1579
1579
  const u = (m) => Be({
1580
1580
  setup() {
1581
- var g;
1582
- const y = (g = Ie()) == null ? void 0 : g.appContext;
1583
- return y && (y.app = o), _e("useTres", m), _e("extend", Ce), typeof window < "u" && Ar(y == null ? void 0 : y.app, m), () => He(Ot, null, a != null && a.default ? a.default() : []);
1581
+ var M;
1582
+ const d = (M = Ie()) == null ? void 0 : M.appContext;
1583
+ return d && (d.app = o), _e("useTres", m), _e("extend", Me), typeof window < "u" && Ar(d == null ? void 0 : d.app, m), () => He(Ot, null, a != null && a.default ? a.default() : []);
1584
1584
  }
1585
- }), v = (m) => {
1586
- const y = u(m), { render: g } = Rt(gr(m));
1587
- g(He(y), c.value);
1588
- }, f = (m, y = !1) => {
1589
- dt(m.scene.value), y && (m.renderer.value.dispose(), m.renderer.value.renderLists.dispose(), m.renderer.value.forceContextLoss()), c.value.__tres = {
1585
+ }), y = (m) => {
1586
+ const d = u(m), { render: M } = Rt(gr(m));
1587
+ M(He(d), c.value);
1588
+ }, f = (m, d = !1) => {
1589
+ dt(m.scene.value), d && (m.renderer.value.dispose(), m.renderer.value.renderLists.dispose(), m.renderer.value.forceContextLoss()), c.value.__tres = {
1590
1590
  root: m
1591
- }, v(m);
1592
- }, _ = Y(() => r.disableRender), p = H(null);
1593
- return t({ context: p, dispose: () => f(p.value, !0) }), St(() => {
1591
+ }, y(m);
1592
+ }, g = V(() => r.disableRender), v = $(null);
1593
+ return t({ context: v, dispose: () => f(v.value, !0) }), St(() => {
1594
1594
  const m = l;
1595
- p.value = mr({
1595
+ v.value = mr({
1596
1596
  scene: c.value,
1597
1597
  canvas: m,
1598
1598
  windowSize: r.windowSize ?? !1,
1599
- disableRender: _.value ?? !1,
1599
+ disableRender: g.value ?? !1,
1600
1600
  rendererOptions: r,
1601
1601
  emit: s
1602
1602
  });
1603
- const { registerCamera: y, camera: g, cameras: E, deregisterCamera: C } = p.value;
1604
- v(p.value);
1605
- const T = () => {
1606
- const M = new we(
1603
+ const { registerCamera: d, camera: M, cameras: E, deregisterCamera: P } = v.value;
1604
+ y(v.value);
1605
+ const S = () => {
1606
+ const C = new we(
1607
1607
  45,
1608
1608
  window.innerWidth / window.innerHeight,
1609
1609
  0.1,
1610
1610
  1e3
1611
1611
  );
1612
- M.position.set(3, 3, 3), M.lookAt(0, 0, 0), y(M);
1613
- const w = Te(() => {
1614
- E.value.length >= 2 && (M.removeFromParent(), C(M), w == null || w());
1612
+ C.position.set(3, 3, 3), C.lookAt(0, 0, 0), d(C);
1613
+ const _ = Te(() => {
1614
+ E.value.length >= 2 && (C.removeFromParent(), P(C), _ == null || _());
1615
1615
  });
1616
1616
  };
1617
1617
  le(
1618
1618
  () => r.camera,
1619
- (M, w) => {
1620
- M && y(M), w && (w.removeFromParent(), C(w));
1619
+ (C, _) => {
1620
+ C && d(C), _ && (_.removeFromParent(), P(_));
1621
1621
  },
1622
1622
  {
1623
1623
  immediate: !0
1624
1624
  }
1625
- ), g.value || (i(
1625
+ ), M.value || (i(
1626
1626
  "No camera found. Creating a default perspective camera. To have full control over a camera, please add one to the scene."
1627
- ), T());
1628
- }), Q(() => {
1629
- f(p.value);
1630
- }), (m, y) => (At(), kt("canvas", {
1627
+ ), S());
1628
+ }), K(() => {
1629
+ f(v.value);
1630
+ }), (m, d) => (At(), kt("canvas", {
1631
1631
  ref_key: "canvas",
1632
1632
  ref: l,
1633
1633
  "data-scene": c.value.uuid,
1634
1634
  class: xt(m.$attrs.class),
1635
- "data-tres": `tresjs ${K(An).version}`,
1635
+ "data-tres": `tresjs ${J(An).version}`,
1636
1636
  style: Lt({
1637
1637
  display: "block",
1638
1638
  width: "100%",
@@ -1688,7 +1688,7 @@ class wt extends zt {
1688
1688
  this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
1689
1689
  }
1690
1690
  }
1691
- const { logWarning: Ze } = z();
1691
+ const { logWarning: Ze } = Y();
1692
1692
  let ae, F;
1693
1693
  const Or = {
1694
1694
  DirectionalLight: qt,
@@ -1714,8 +1714,8 @@ const Or = {
1714
1714
  }
1715
1715
  F = e.parent.children.find((t) => t instanceof ae), F && F.dispose && F.dispose(), e.parent.remove(F);
1716
1716
  }
1717
- }, { logWarning: Dr } = z();
1718
- let B = null;
1717
+ }, { logWarning: Dr } = Y();
1718
+ let I = null;
1719
1719
  const Qr = {
1720
1720
  updated: (e, t) => {
1721
1721
  var s;
@@ -1724,9 +1724,9 @@ const Qr = {
1724
1724
  Dr(`v-distance-to: problem with binding value: ${t.value}`);
1725
1725
  return;
1726
1726
  }
1727
- B && (B.dispose(), e.parent.remove(B));
1727
+ I && (I.dispose(), e.parent.remove(I));
1728
1728
  const r = n.clone().sub(e.position);
1729
- r.normalize(), B = new Xt(r, e.position, e.position.distanceTo(n), 16776960), e.parent.add(B), console.table(
1729
+ r.normalize(), I = new Xt(r, e.position, e.position.distanceTo(n), 16776960), e.parent.add(I), console.table(
1730
1730
  [
1731
1731
  ["Distance:", e.position.distanceTo(n)],
1732
1732
  [`origin: ${e.name || e.type}`, `x:${e.position.x}, y:${e.position.y}, z:${(s = e.position) == null ? void 0 : s.z}`],
@@ -1735,7 +1735,7 @@ const Qr = {
1735
1735
  );
1736
1736
  },
1737
1737
  unmounted: (e) => {
1738
- B == null || B.dispose(), e.parent.remove(B);
1738
+ I == null || I.dispose(), e.parent.remove(I);
1739
1739
  }
1740
1740
  }, Xr = {
1741
1741
  install(e) {
@@ -1744,11 +1744,11 @@ const Qr = {
1744
1744
  };
1745
1745
  export {
1746
1746
  xr as TresCanvas,
1747
- Me as catalogue,
1747
+ Ce as catalogue,
1748
1748
  dr as createRenderLoop,
1749
1749
  Xr as default,
1750
1750
  dt as dispose,
1751
- Ce as extend,
1751
+ Me as extend,
1752
1752
  Ur as isProd,
1753
1753
  $n as normalizeColor,
1754
1754
  Fr as normalizeVectorFlexibleParam,
@@ -1757,7 +1757,7 @@ export {
1757
1757
  ar as trasverseObjects,
1758
1758
  jn as useCamera,
1759
1759
  Wr as useLoader,
1760
- z as useLogger,
1760
+ Y as useLogger,
1761
1761
  Yr as useLoop,
1762
1762
  lr as useRaycaster,
1763
1763
  $r as useRenderLoop,