@needle-tools/engine 4.12.4 → 4.12.5-next.1be4457

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.
@@ -406,9 +406,9 @@ var D;
406
406
  return O !== void 0 || (O = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), O;
407
407
  }
408
408
  s.isSafari = R;
409
- let L;
409
+ let I;
410
410
  function j() {
411
- return L !== void 0 ? L : L = navigator.userAgent.includes("OculusBrowser");
411
+ return I !== void 0 ? I : I = navigator.userAgent.includes("OculusBrowser");
412
412
  }
413
413
  s.isQuest = j;
414
414
  let B;
@@ -582,7 +582,7 @@ function dr(s, e, t, i) {
582
582
  if (ng) return;
583
583
  const n = pe.Current;
584
584
  let o = n?.domElement ?? document.querySelector("needle-engine");
585
- if (n.isInAR && (o = n.arOverlayElement), !!o) {
585
+ if (n?.isInAR && (o = n.arOverlayElement), !!o) {
586
586
  if (Array.isArray(e)) {
587
587
  let r = "";
588
588
  for (let a = 0; a < e.length; a++) {
@@ -915,8 +915,8 @@ function g1(s, e, t, i, n) {
915
915
  h -= b / c, d -= v / c, e.offsetX !== void 0 && (h += e.offsetX * (an.width * 0.5)), e.offsetY !== void 0 && (d -= e.offsetY * (an.height * 0.5));
916
916
  const A = l?.offsetX || h, O = l?.offsetY || d;
917
917
  h = F.lerp(A, h, t), d = F.lerp(O, d, t);
918
- const R = l?.width || r, L = l?.height || a;
919
- f = F.lerp(R, f, t), p = F.lerp(L, p, t), i.setViewOffset(r, a, h, d, f, p), i.updateProjectionMatrix(), e.damping > 0 && (e.damping *= 1 - t, e.damping < 0.01 && (e.damping = 0), e.damping = Math.max(0, e.damping));
918
+ const R = l?.width || r, I = l?.height || a;
919
+ f = F.lerp(R, f, t), p = F.lerp(I, p, t), i.setViewOffset(r, a, h, d, f, p), i.updateProjectionMatrix(), e.damping > 0 && (e.damping *= 1 - t, e.damping < 0.01 && (e.damping = 0), e.damping = Math.max(0, e.damping));
920
920
  }
921
921
  function o2(s, e, t) {
922
922
  const i = s.length(), n = e.length(), o = F.lerp(i, n, t);
@@ -1281,7 +1281,7 @@ function F0(s, e, t, i) {
1281
1281
  }
1282
1282
  let Ch = !1;
1283
1283
  e1((...s) => {
1284
- I() && pe.Current?.isInXR && (lc(!0), U0("error", ...s));
1284
+ L() && pe.Current?.isInXR && (lc(!0), U0("error", ...s));
1285
1285
  });
1286
1286
  function lc(s) {
1287
1287
  if (s) {
@@ -1530,17 +1530,17 @@ function U0(s, ...e) {
1530
1530
  }
1531
1531
  }
1532
1532
  const F1 = x("nodevlogs");
1533
- function Me(s, e = qi.Log) {
1533
+ function Ae(s, e = qi.Log) {
1534
1534
  dr(e, s);
1535
1535
  }
1536
1536
  function _e(s) {
1537
- Me(s, qi.Warn);
1537
+ Ae(s, qi.Warn);
1538
1538
  }
1539
1539
  function vu(s) {
1540
- Me(s, qi.Error);
1540
+ Ae(s, qi.Error);
1541
1541
  }
1542
1542
  let qp, Af;
1543
- function I() {
1543
+ function L() {
1544
1544
  if (F1) return !1;
1545
1545
  if (qp !== void 0) return qp;
1546
1546
  if (Af !== void 0) return Af;
@@ -1915,11 +1915,11 @@ Oo('if(!globalThis["NEEDLE_ENGINE_VERSION"]) globalThis["NEEDLE_ENGINE_VERSION"]
1915
1915
  Oo('if(!globalThis["NEEDLE_ENGINE_GENERATOR"]) globalThis["NEEDLE_ENGINE_GENERATOR"] = "unknown";');
1916
1916
  Oo('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUILD_TIME"] = "unknown";');
1917
1917
  Oo('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";');
1918
- Oo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.12.4";');
1918
+ Oo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.12.5";');
1919
1919
  Oo('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
1920
- Oo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Fri Feb 06 2026 16:04:43 GMT+0000 (Coordinated Universal Time)";');
1920
+ Oo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Feb 09 2026 15:47:05 GMT+0000 (Coordinated Universal Time)";');
1921
1921
  Oo('globalThis["__NEEDLE_PUBLIC_KEY__"] = "' + NEEDLE_PUBLIC_KEY + '";');
1922
- const Xi = "4.12.4", Rc = "undefined", Ad = "Fri Feb 06 2026 16:04:43 GMT+0000 (Coordinated Universal Time)";
1922
+ const Xi = "4.12.5", Rc = "undefined", Ad = "Mon Feb 09 2026 15:47:05 GMT+0000 (Coordinated Universal Time)";
1923
1923
  H0 && console.log(`Engine version: ${Xi} (generator: ${Rc})
1924
1924
  Project built at ${Ad}`);
1925
1925
  const ur = NEEDLE_PUBLIC_KEY, yo = "needle_isActiveInHierarchy", aa = "builtin_components", rd = "needle_editor_guid";
@@ -1956,7 +1956,7 @@ function hP(s, e) {
1956
1956
  const o = new window.SPECTOR.Spector();
1957
1957
  o.spyCanvases = !0, i();
1958
1958
  return;
1959
- } else I() && console.debug("Spector available: Add '?spector=<frame>' to the URL to enable it and capture a frame.");
1959
+ } else L() && console.debug("Spector available: Add '?spector=<frame>' to the URL to enable it and capture a frame.");
1960
1960
  }
1961
1961
  }
1962
1962
  const wi = /* @__PURE__ */ Symbol("shadowDomOwner"), dP = x("debugpatch");
@@ -2552,13 +2552,13 @@ class mP {
2552
2552
  createInputEvent(e) {
2553
2553
  switch (e.type) {
2554
2554
  case "pointerdown":
2555
- Ge && Me("Create Pointer down"), this.onDownButton(e.deviceIndex, e.button), this.onDown(e);
2555
+ Ge && Ae("Create Pointer down"), this.onDownButton(e.deviceIndex, e.button), this.onDown(e);
2556
2556
  break;
2557
2557
  case "pointermove":
2558
- Ge && Me("Create Pointer move"), this.onMove(e);
2558
+ Ge && Ae("Create Pointer move"), this.onMove(e);
2559
2559
  break;
2560
2560
  case "pointerup":
2561
- Ge && Me("Create Pointer up"), this.onUp(e), this.onReleaseButton(e.deviceIndex, e.button);
2561
+ Ge && Ae("Create Pointer up"), this.onUp(e), this.onReleaseButton(e.deviceIndex, e.button);
2562
2562
  break;
2563
2563
  }
2564
2564
  }
@@ -2652,7 +2652,7 @@ class mP {
2652
2652
  if (this.context.isInAR || this.canReceiveInput(e) === !1) return;
2653
2653
  e.target instanceof HTMLElement && e.target.setPointerCapture(e.pointerId);
2654
2654
  const t = this.getPointerId(e);
2655
- Ge && Me(`pointer down #${t}, identifier:${e.pointerId}`);
2655
+ Ge && Ae(`pointer down #${t}, identifier:${e.pointerId}`);
2656
2656
  const i = this.getAndUpdateSpatialObjectForScreenPosition(t, e.clientX, e.clientY), n = new to("pointerdown", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: t, button: e.button, clientX: e.clientX, clientY: e.clientY, pointerType: e.pointerType, buttonName: this.getButtonName(e), device: i, pressure: e.pressure });
2657
2657
  this.onDown(n);
2658
2658
  };
@@ -3480,7 +3480,7 @@ let Ec = !1;
3480
3480
  const fr = [];
3481
3481
  function Dr() {
3482
3482
  if (Ec) return;
3483
- I() && console.debug("[Needle Engine] User input registered: Media playback is now allowed."), Ec = !0;
3483
+ L() && console.debug("[Needle Engine] User input registered: Media playback is now allowed."), Ec = !0;
3484
3484
  const s = [...fr];
3485
3485
  fr.length = 0, s.forEach((e) => e());
3486
3486
  }
@@ -3490,7 +3490,7 @@ document.addEventListener("click", Dr);
3490
3490
  document.addEventListener("dragstart", Dr);
3491
3491
  document.addEventListener("touchend", Dr);
3492
3492
  document.addEventListener("keydown", Dr);
3493
- typeof window < "u" && "userActivation" in navigator && navigator.userActivation?.isActive && (I() && console.debug("[Needle Engine] User input already active: Media playback is now allowed."), fr.length = 0, Ec = !0);
3493
+ typeof window < "u" && "userActivation" in navigator && navigator.userActivation?.isActive && (L() && console.debug("[Needle Engine] User input already active: Media playback is now allowed."), fr.length = 0, Ec = !0);
3494
3494
  class Zn extends EventTarget {
3495
3495
  static get userInteractionRegistered() {
3496
3496
  return Ec;
@@ -4079,7 +4079,7 @@ class EP {
4079
4079
  console.debug(`Connecting to networking backend on
4080
4080
  ` + Bi);
4081
4081
  const o = await import("./vendor-BIFy-gRe.js").then((c) => c.index), r = o.default?.WebsocketBuilder ?? o.WebsocketBuilder, a = o.default?.ExponentialBackoff ?? o.ExponentialBackoff, l = new r(Bi).withMaxRetries(10).withBackoff(new a(2e3, 4)).onOpen(() => {
4082
- this._connectingToWebsocketPromise = null, this._ws = l, this.connected = !0, I() || yi ? console.log(`Connected to networking backend
4082
+ this._connectingToWebsocketPromise = null, this._ws = l, this.connected = !0, L() || yi ? console.log(`Connected to networking backend
4083
4083
  ` + Bi) : console.debug("Connected to networking backend", Bi), n(!0), this.onSendQueued(Bn.OnConnection);
4084
4084
  }).onClose((c) => {
4085
4085
  this._connectingToWebsocketPromise = null, this.connected = !1, this._isInRoom = !1, n(!1);
@@ -4111,7 +4111,7 @@ class EP {
4111
4111
  else this.handleIncomingStringMessage(n);
4112
4112
  return;
4113
4113
  } catch (n) {
4114
- yi && i === "pong" ? console.log("<<", i) : I() && console.error("Failed to parse message", n);
4114
+ yi && i === "pong" ? console.log("<<", i) : L() && console.error("Failed to parse message", n);
4115
4115
  }
4116
4116
  }
4117
4117
  async handleIncomingBinaryMessage(e) {
@@ -4143,7 +4143,7 @@ class EP {
4143
4143
  if (yi && console.log(e), e) {
4144
4144
  this._isInRoom = !0;
4145
4145
  const r = e;
4146
- this._currentRoomName = r.room, this._currentRoomViewId = r.viewId, this._currentRoomAllowEditing = r.allowEditing ?? !0, this._currentInRoom.length = 0, this._currentInRoom.push(...r.inRoom), (Rh || I()) && console.debug("Joined Needle Engine Room: " + r.room);
4146
+ this._currentRoomName = r.room, this._currentRoomViewId = r.viewId, this._currentRoomAllowEditing = r.allowEditing ?? !0, this._currentInRoom.length = 0, this._currentInRoom.push(...r.inRoom), (Rh || L()) && console.debug("Joined Needle Engine Room: " + r.room);
4147
4147
  const a = new URL(window.location.href);
4148
4148
  a.searchParams.has("room") && a.searchParams.delete("room"), a.searchParams.set("view", this._currentRoomViewId), console.debug(`Room view id: ${this._currentRoomViewId}
4149
4149
  ${a.href}`);
@@ -4155,7 +4155,7 @@ ${a.href}`);
4155
4155
  break;
4156
4156
  case "left-room":
4157
4157
  const n = e;
4158
- n.room === this.currentRoomName && (this._isInRoom = !1, this._currentRoomName = null, this._currentRoomAllowEditing = !0, this._currentInRoom.length = 0, (Rh || I()) && console.debug("Left Needle Engine Room: " + n.room)), ci.sendEvent(this.context, "networking", {
4158
+ n.room === this.currentRoomName && (this._isInRoom = !1, this._currentRoomName = null, this._currentRoomAllowEditing = !0, this._currentInRoom.length = 0, (Rh || L()) && console.debug("Left Needle Engine Room: " + n.room)), ci.sendEvent(this.context, "networking", {
4159
4159
  event: "left_room",
4160
4160
  room: n.room
4161
4161
  });
@@ -4654,7 +4654,7 @@ class $a {
4654
4654
  const h = document.querySelector("needle-engine");
4655
4655
  if (h) {
4656
4656
  const d = h.getAttribute("logo-src");
4657
- d?.length && (e = d, I() && console.debug("[XR] Using custom loading logo from license:", e));
4657
+ d?.length && (e = d, L() && console.debug("[XR] Using custom loading logo from license:", e));
4658
4658
  }
4659
4659
  }
4660
4660
  const t = this._logoObject = new H(new Sn(1, 1, 1, 1), new we({ transparent: !0, side: 2 }));
@@ -4703,7 +4703,7 @@ var Tc;
4703
4703
  ((s) => {
4704
4704
  const e = [];
4705
4705
  function t() {
4706
- e?.length || I() && console.warn("No USDZ exporters found – cannot export USDZ for QuickLook.");
4706
+ e?.length || L() && console.warn("No USDZ exporters found – cannot export USDZ for QuickLook.");
4707
4707
  for (const o of e)
4708
4708
  o.exportAndOpen();
4709
4709
  return !0;
@@ -4798,7 +4798,7 @@ function GP() {
4798
4798
  }, 100);
4799
4799
  });
4800
4800
  }
4801
- D.isDesktop() && I() && window.addEventListener("keydown", (s) => {
4801
+ D.isDesktop() && L() && window.addEventListener("keydown", (s) => {
4802
4802
  (s.key === "x" || s.key === "Escape") && K.active && K.stop();
4803
4803
  });
4804
4804
  function qP(s) {
@@ -4991,10 +4991,10 @@ class K {
4991
4991
  }
4992
4992
  if (e === "quicklook")
4993
4993
  return console.warn("QuickLook mode is only supported on iOS devices"), null;
4994
- if (e == "ar" && (e = "immersive-ar"), I() && x("debugxrpreroom"))
4994
+ if (e == "ar" && (e = "immersive-ar"), L() && x("debugxrpreroom"))
4995
4995
  return console.warn("Debug: Starting temporary XR session"), await $a.start(e, t || K.getDefaultSessionInit(e)), null;
4996
4996
  if (this._currentSessionRequest)
4997
- return console.warn("A XRSession is already being requested"), (He || I()) && _e("A XRSession is already being requested"), this._currentSessionRequest.then(() => this._activeSession);
4997
+ return console.warn("A XRSession is already being requested"), (He || L()) && _e("A XRSession is already being requested"), this._currentSessionRequest.then(() => this._activeSession);
4998
4998
  if (this._activeSession)
4999
4999
  return console.error("A XRSession is already running"), this._activeSession;
5000
5000
  if (i || (i = N.Current), i || (i = pe.All[0]), !i) throw new Error("No Needle Engine Context found");
@@ -5031,7 +5031,7 @@ class K {
5031
5031
  He ? console.log(`%cRequesting ${e} session`, "font-weight:bold;", t, n) : console.log(`%cRequesting ${e} session`, "font-weight:bold;");
5032
5032
  for (const a of n)
5033
5033
  a.onBeforeXR && a.activeAndEnabled && !a.destroyed && a.onBeforeXR(e, t);
5034
- this.invokeSessionRequestStart(e, t), He && Me("Requesting " + e + " session (" + Date.now() + ")"), ci.sendEvent(N.Current, "xr", {
5034
+ this.invokeSessionRequestStart(e, t), He && Ae("Requesting " + e + " session (" + Date.now() + ")"), ci.sendEvent(N.Current, "xr", {
5035
5035
  action: "session_request",
5036
5036
  mode: e,
5037
5037
  features: (t.requiredFeatures ?? []).concat(t.optionalFeatures ?? []).join(","),
@@ -5142,7 +5142,7 @@ class K {
5142
5142
  }
5143
5143
  /** Returns true if running in pass through mode in immersive AR (e.g. user is wearing a headset while in AR) */
5144
5144
  get isPassThrough() {
5145
- return !!(this.environmentBlendMode !== "opaque" && this.interactionMode === "world-space" || this.mode === "immersive-ar" && this.environmentBlendMode !== "opaque" && this.controllers.some((e) => e.inputSource.targetRayMode === "tracked-pointer") || I() && D.isDesktop() && this.mode === "immersive-ar");
5145
+ return !!(this.environmentBlendMode !== "opaque" && this.interactionMode === "world-space" || this.mode === "immersive-ar" && this.environmentBlendMode !== "opaque" && this.controllers.some((e) => e.inputSource.targetRayMode === "tracked-pointer") || L() && D.isDesktop() && this.mode === "immersive-ar");
5146
5146
  }
5147
5147
  get isAR() {
5148
5148
  return this.mode === "immersive-ar";
@@ -6322,20 +6322,20 @@ var Id;
6322
6322
  function t(b, v, A, O, R) {
6323
6323
  if (!v.geometry || !v.geometry.hasAttribute("position"))
6324
6324
  return !1;
6325
- const L = v.geometry;
6325
+ const I = v.geometry;
6326
6326
  if (v?.isSkinnedMesh) {
6327
6327
  const j = v, B = j.bvhNeedsUpdate;
6328
6328
  if (!j.staticGenerator)
6329
- l(), r && (j.staticGenerator = new r(v), j.staticGenerator.applyWorldTransforms = !1, j.staticGeometry = j.staticGenerator.generate(), L.boundsTree = a?.call(j.staticGeometry), j.staticGeometryLastUpdate = performance.now() + Math.random() * 200, j.bvhNeedsUpdate = !0);
6330
- else if (L.boundsTree && (j.autoUpdateMeshBvhInterval !== void 0 && j.autoUpdateMeshBvhInterval >= 0 || B === !0)) {
6329
+ l(), r && (j.staticGenerator = new r(v), j.staticGenerator.applyWorldTransforms = !1, j.staticGeometry = j.staticGenerator.generate(), I.boundsTree = a?.call(j.staticGeometry), j.staticGeometryLastUpdate = performance.now() + Math.random() * 200, j.bvhNeedsUpdate = !0);
6330
+ else if (I.boundsTree && (j.autoUpdateMeshBvhInterval !== void 0 && j.autoUpdateMeshBvhInterval >= 0 || B === !0)) {
6331
6331
  const G = performance.now(), X = G - j.staticGeometryLastUpdate, k = j.autoUpdateMeshBvhInterval ?? 100;
6332
- (B || X > k) && (Yt && console.warn(`Physics: updating skinned mesh bvh for ${v.name} after ${X.toFixed(2)}ms`), j.bvhNeedsUpdate = !1, j.staticGeometryLastUpdate = G, j.staticGenerator?.generate(j.staticGeometry), L.boundsTree.refit());
6332
+ (B || X > k) && (Yt && console.warn(`Physics: updating skinned mesh bvh for ${v.name} after ${X.toFixed(2)}ms`), j.bvhNeedsUpdate = !1, j.staticGeometryLastUpdate = G, j.staticGenerator?.generate(j.staticGeometry), I.boundsTree.refit());
6333
6333
  }
6334
- } else if (!L.boundsTree) {
6334
+ } else if (!I.boundsTree) {
6335
6335
  h || w();
6336
6336
  let j = !0;
6337
- if ((O.xr || L[m] === !1 || L.getAttribute("position")?.isInterleavedBufferAttribute || L.index && L.index?.isInterleavedBufferAttribute || e > 10) && (j = !1), j && f) {
6338
- if (L[p] === void 0) {
6337
+ if ((O.xr || I[m] === !1 || I.getAttribute("position")?.isInterleavedBufferAttribute || I.index && I.index?.isInterleavedBufferAttribute || e > 10) && (j = !1), j && f) {
6338
+ if (I[p] === void 0) {
6339
6339
  let B = null;
6340
6340
  if (g.length > 0) {
6341
6341
  const G = g.shift();
@@ -6349,15 +6349,15 @@ var Id;
6349
6349
  }
6350
6350
  if (B != null && !B.running) {
6351
6351
  const G = v.name;
6352
- Yt && console.log("<<<< worker start", G, B), L[p] = "queued", performance.mark("bvh.create.start");
6353
- const X = L.clone();
6352
+ Yt && console.log("<<<< worker start", G, B), I[p] = "queued", performance.mark("bvh.create.start");
6353
+ const X = I.clone();
6354
6354
  try {
6355
6355
  B.generate(X).then((k) => {
6356
- L[p] = "done", L.boundsTree = k;
6356
+ I[p] = "done", I.boundsTree = k;
6357
6357
  }).catch((k) => {
6358
- L[p] = "failed - " + k?.message, L[m] = !1, Yt && console.error("Failed to generate mesh bvh on worker", k);
6358
+ I[p] = "failed - " + k?.message, I[m] = !1, Yt && console.error("Failed to generate mesh bvh on worker", k);
6359
6359
  }).finally(() => {
6360
- Yt && console.log(">>>>> worker done", G, { hasBoundsTre: L.boundsTree != null }), g.push(B), X.dispose(), performance.mark("bvh.create.end"), performance.measure("bvh.create (worker)", "bvh.create.start", "bvh.create.end");
6360
+ Yt && console.log(">>>>> worker done", G, { hasBoundsTre: I.boundsTree != null }), g.push(B), X.dispose(), performance.mark("bvh.create.end"), performance.measure("bvh.create (worker)", "bvh.create.start", "bvh.create.end");
6361
6361
  });
6362
6362
  } catch (k) {
6363
6363
  console.error("Failed to generate mesh bvh on worker", k);
@@ -6365,18 +6365,18 @@ var Id;
6365
6365
  } else
6366
6366
  Yt && console.warn("No worker available");
6367
6367
  }
6368
- } else (!d || !j) && (l(), o && (performance.mark("bvh.create.start"), L.boundsTree = new o(L), performance.mark("bvh.create.end"), performance.measure("bvh.create", "bvh.create.start", "bvh.create.end")));
6368
+ } else (!d || !j) && (l(), o && (performance.mark("bvh.create.start"), I.boundsTree = new o(I), performance.mark("bvh.create.end"), performance.measure("bvh.create", "bvh.create.start", "bvh.create.end")));
6369
6369
  }
6370
6370
  if (b instanceof cu) {
6371
6371
  const j = b, B = v.raycast;
6372
- if (L.boundsTree)
6372
+ if (I.boundsTree)
6373
6373
  l(), n && (v.acceleratedRaycast || (v.acceleratedRaycast = n.bind(v), Yt && console.debug(`Physics: bind acceleratedRaycast fn to "${v.name}"`)), v.raycast = v.acceleratedRaycast);
6374
- else if (Yt && console.warn("No bounds tree found for mesh", v.name, { workerTask: L[p], hasAcceleratedRaycast: n != null }), R.allowSlowRaycastFallback === !1 && (L.getAttribute("position")?.array?.length ?? 0) > 2e3)
6374
+ else if (Yt && console.warn("No bounds tree found for mesh", v.name, { workerTask: I[p], hasAcceleratedRaycast: n != null }), R.allowSlowRaycastFallback === !1 && (I.getAttribute("position")?.array?.length ?? 0) > 2e3)
6375
6375
  return Yt && console.warn("Skipping raycast because no bounds tree is available and allowSlowRaycastFallback is false"), !1;
6376
6376
  const G = j.firstHitOnly;
6377
6377
  return j.firstHitOnly = !1, j.intersectObject(v, !1, A), j.firstHitOnly = G, v.raycast = B, !0;
6378
6378
  } else if (b instanceof hu) {
6379
- const j = L.boundsTree;
6379
+ const j = I.boundsTree;
6380
6380
  if (j) {
6381
6381
  const B = b;
6382
6382
  if (c.copy(v.matrixWorld).invert(), B.applyMatrix4(c), j.intersectsSphere(B)) {
@@ -6394,7 +6394,7 @@ var Id;
6394
6394
  i || (i = !0, import("./vendor-BIFy-gRe.js").then((b) => b.index$1).then((b) => {
6395
6395
  n = b.acceleratedRaycast, o = b.MeshBVH, r = b.StaticGeometryGenerator, a = b.computeBoundsTree;
6396
6396
  }).catch((b) => {
6397
- (Yt || I()) && console.error("Failed to load BVH library...", b.message);
6397
+ (Yt || L()) && console.error("Failed to load BVH library...", b.message);
6398
6398
  }));
6399
6399
  }
6400
6400
  const c = new J();
@@ -6404,7 +6404,7 @@ var Id;
6404
6404
  h = !0, d = !0, Promise.resolve().then(() => IL).then((b) => {
6405
6405
  f = b.GenerateMeshBVHWorker;
6406
6406
  }).catch((b) => {
6407
- Yt || I() ? console.warn("Failed to setup mesh bvh worker") : console.debug("Failed to setup mesh bvh worker", b);
6407
+ Yt || L() ? console.warn("Failed to setup mesh bvh worker") : console.debug("Failed to setup mesh bvh worker", b);
6408
6408
  }).finally(() => {
6409
6409
  d = !1;
6410
6410
  });
@@ -6488,42 +6488,42 @@ const rv = /* @__PURE__ */ Symbol("disposed");
6488
6488
  function x2(s) {
6489
6489
  return s[rv] === !0;
6490
6490
  }
6491
- function Ae(s) {
6491
+ function Te(s) {
6492
6492
  if (s) {
6493
6493
  if (s[ov] === !1) {
6494
6494
  yr && console.warn("Object is marked as not disposable", s);
6495
6495
  return;
6496
6496
  }
6497
6497
  if (typeof s == "object" && (s[rv] = !0), s instanceof Mi)
6498
- Ae(s.environment), Ae(s.background), Ae(s.customDepthMaterial), Ae(s.customDistanceMaterial);
6498
+ Te(s.environment), Te(s.background), Te(s.customDepthMaterial), Te(s.customDistanceMaterial);
6499
6499
  else if (s instanceof mo)
6500
- Ae(s.geometry), Ae(s.material), Ae(s.skeleton), Ae(s.bindMatrix), Ae(s.bindMatrixInverse), Ae(s.customDepthMaterial), Ae(s.customDistanceMaterial), s.visible = !1;
6500
+ Te(s.geometry), Te(s.material), Te(s.skeleton), Te(s.bindMatrix), Te(s.bindMatrixInverse), Te(s.customDepthMaterial), Te(s.customDistanceMaterial), s.visible = !1;
6501
6501
  else if (s instanceof H)
6502
- Ae(s.geometry), Ae(s.material), Ae(s.customDepthMaterial), Ae(s.customDistanceMaterial), s.visible = !1;
6502
+ Te(s.geometry), Te(s.material), Te(s.customDepthMaterial), Te(s.customDistanceMaterial), s.visible = !1;
6503
6503
  else if (s instanceof M)
6504
6504
  s.visible = !1;
6505
6505
  else if (s instanceof _n) {
6506
6506
  Qr(s);
6507
6507
  for (const e of Object.keys(s.attributes)) {
6508
6508
  const t = s.attributes[e];
6509
- Ae(t);
6509
+ Te(t);
6510
6510
  }
6511
6511
  } else if (s instanceof mt || s instanceof r0)
6512
6512
  yr && console.warn("BufferAttribute dispose not supported", s.count);
6513
6513
  else if (s instanceof Array)
6514
6514
  for (const e of s)
6515
- e instanceof be && Ae(e);
6515
+ e instanceof be && Te(e);
6516
6516
  else if (s instanceof be) {
6517
6517
  Qr(s);
6518
6518
  for (const t of Object.keys(s)) {
6519
6519
  const i = s[t];
6520
- i instanceof Fe && Ae(i);
6520
+ i instanceof Fe && Te(i);
6521
6521
  }
6522
6522
  const e = s.uniforms;
6523
6523
  if (e)
6524
6524
  for (const t of Object.keys(e)) {
6525
6525
  const i = e[t];
6526
- i instanceof Fe ? Ae(i) : i instanceof Gi && Ae(i.value);
6526
+ i instanceof Fe ? Te(i) : i instanceof Gi && Te(i.value);
6527
6527
  }
6528
6528
  } else s instanceof Fe ? (Qr(s), Qr(s.source), s.source?.data instanceof ImageBitmap && Qr(s.source.data)) : s instanceof eS ? (Qr(s.boneTexture), s.boneTexture = null) : s instanceof tS || !(s instanceof M) && yr && console.warn("Unknown object type", s);
6529
6529
  }
@@ -6581,7 +6581,7 @@ function Ld(s, e, t, i) {
6581
6581
  } else if (e && n.has(e)) {
6582
6582
  n.delete(e);
6583
6583
  let o = t[ql] || 0;
6584
- o > 0 && (o -= 1, t[ql] = o), yr && console.warn(`🔴 Removed user of "${t.type}"`, e, t, o, "users:", n), o <= 0 && (Sa.isLoading(t) || (wu && console.warn(`🔴 Removed all user of "${t.type}"`, t), sv() && Ae(t)));
6584
+ o > 0 && (o -= 1, t[ql] = o), yr && console.warn(`🔴 Removed user of "${t.type}"`, e, t, o, "users:", n), o <= 0 && (Sa.isLoading(t) || (wu && console.warn(`🔴 Removed all user of "${t.type}"`, t), sv() && Te(t)));
6585
6585
  }
6586
6586
  t[s] = n;
6587
6587
  }
@@ -6656,9 +6656,9 @@ function Ca(s, e) {
6656
6656
  }
6657
6657
  return !0;
6658
6658
  }
6659
- const em = x("debugnewscripts"), rO = x("debughierarchy"), Ee = [];
6659
+ const em = x("debugnewscripts"), rO = x("debughierarchy"), Re = [];
6660
6660
  function aO() {
6661
- return Ee.length > 0;
6661
+ return Re.length > 0;
6662
6662
  }
6663
6663
  function jd(s) {
6664
6664
  if (em && console.log("Register new components", s.new_scripts.length, [...s.new_scripts], s.alias ? "element: " + s.alias : s.hash, s), s.new_scripts_pre_setup_callbacks.length > 0) {
@@ -6667,31 +6667,31 @@ function jd(s) {
6667
6667
  s.new_scripts_pre_setup_callbacks.length = 0;
6668
6668
  }
6669
6669
  if (!(s.new_scripts.length <= 0)) {
6670
- Ee.length = 0, s.new_scripts.length > 0 && Ee.push(...s.new_scripts), s.new_scripts.length = 0;
6671
- for (let e = 0; e < Ee.length; e++)
6670
+ Re.length = 0, s.new_scripts.length > 0 && Re.push(...s.new_scripts), s.new_scripts.length = 0;
6671
+ for (let e = 0; e < Re.length; e++)
6672
6672
  try {
6673
- const t = Ee[e];
6673
+ const t = Re[e];
6674
6674
  if (t.isComponent !== !0) {
6675
- (I() || em) && console.error(`Registered script is not a Needle Engine component.
6675
+ (L() || em) && console.error(`Registered script is not a Needle Engine component.
6676
6676
  The script will be ignored. Please make sure your component extends "Behaviour" imported from "@needle-tools/engine"
6677
- `, t), Ee.splice(e, 1), e--;
6677
+ `, t), Re.splice(e, 1), e--;
6678
6678
  continue;
6679
6679
  }
6680
6680
  if (t.destroyed) continue;
6681
6681
  if (!t.gameObject) {
6682
6682
  console.warn(`Component can not be initialized: no GameObject assigned.
6683
- Did you add and remove a component in the same frame?`), Ee.splice(e, 1), e--;
6683
+ Did you add and remove a component in the same frame?`), Re.splice(e, 1), e--;
6684
6684
  continue;
6685
6685
  }
6686
6686
  t.context = s, dc(t.gameObject), pg(t, s);
6687
6687
  } catch (t) {
6688
- console.error(t), _s(Ee[e], s), Ee.splice(e, 1), e--;
6688
+ console.error(t), _s(Re[e], s), Re.splice(e, 1), e--;
6689
6689
  }
6690
- for (let e = 0; e < Ee.length; e++)
6690
+ for (let e = 0; e < Re.length; e++)
6691
6691
  try {
6692
- const t = Ee[e];
6692
+ const t = Re[e];
6693
6693
  if (t.destroyed) {
6694
- _s(Ee[e], s), Ee.splice(e, 1), e--;
6694
+ _s(Re[e], s), Re.splice(e, 1), e--;
6695
6695
  continue;
6696
6696
  }
6697
6697
  if (t.registering)
@@ -6702,25 +6702,25 @@ Did you add and remove a component in the same frame?`), Ee.splice(e, 1), e--;
6702
6702
  }
6703
6703
  t.__internalAwake !== void 0 && (t.gameObject || console.error("Calling awake for a component without a GameObject", t, t.gameObject), dc(t.gameObject), t.activeAndEnabled && Ca(t.__internalAwake.bind(t)));
6704
6704
  } catch (t) {
6705
- console.error(t), _s(Ee[e], s), Ee.splice(e, 1), e--;
6705
+ console.error(t), _s(Re[e], s), Re.splice(e, 1), e--;
6706
6706
  }
6707
- for (let e = 0; e < Ee.length; e++)
6707
+ for (let e = 0; e < Re.length; e++)
6708
6708
  try {
6709
- const t = Ee[e];
6709
+ const t = Re[e];
6710
6710
  if (t.destroyed || t.enabled === !1 || (dc(t.gameObject), t.activeAndEnabled === !1)) continue;
6711
6711
  t.__internalEnable !== void 0 && (t.enabled = !0, Ca(t.__internalEnable.bind(t)));
6712
6712
  } catch (t) {
6713
- console.error(t), _s(Ee[e], s), Ee.splice(e, 1), e--;
6713
+ console.error(t), _s(Re[e], s), Re.splice(e, 1), e--;
6714
6714
  }
6715
- for (let e = 0; e < Ee.length; e++)
6715
+ for (let e = 0; e < Re.length; e++)
6716
6716
  try {
6717
- const t = Ee[e];
6717
+ const t = Re[e];
6718
6718
  if (t.destroyed || !t.gameObject) continue;
6719
6719
  s.new_script_start.push(t);
6720
6720
  } catch (t) {
6721
- console.error(t), _s(Ee[e], s), Ee.splice(e, 1), e--;
6721
+ console.error(t), _s(Re[e], s), Re.splice(e, 1), e--;
6722
6722
  }
6723
- Ee.length = 0;
6723
+ Re.length = 0;
6724
6724
  for (const e of s.new_scripts_post_setup_callbacks)
6725
6725
  e && e();
6726
6726
  s.new_scripts_post_setup_callbacks.length = 0;
@@ -6773,7 +6773,7 @@ function ad(s, e = !1) {
6773
6773
  return;
6774
6774
  }
6775
6775
  const t = qc(s);
6776
- dv(s, t, !0) || (em || I() ? console.error(`Error updating hierarchy
6776
+ dv(s, t, !0) || (em || L() ? console.error(`Error updating hierarchy
6777
6777
  Do you have circular references in your project? <a target="_blank" href="https://docs.needle.tools/circular-reference"> Click here for more information.`, s) : console.error('Failed to update active state in hierarchy of "' + s.name + '"', s), console.warn(" ↑ this error might be caused by circular references. Please make sure you don't have files with circular references (e.g. one GLB 1 is loading GLB 2 which is then loading GLB 1 again)."));
6778
6778
  }
6779
6779
  function dv(s, e, t, i = 0) {
@@ -6892,7 +6892,7 @@ function xu(s, e, t = !0, i) {
6892
6892
  return;
6893
6893
  }
6894
6894
  if (!e.isConnected) {
6895
- I() && console.debug("Can not send destroy: not connected", s.guid);
6895
+ L() && console.debug("Can not send destroy: not connected", s.guid);
6896
6896
  return;
6897
6897
  }
6898
6898
  let o = s.guid;
@@ -6957,7 +6957,7 @@ function pv(s, e, t, i) {
6957
6957
  if (l.guid) {
6958
6958
  Bd && console.log("[Local] new instance", "gameobject:", r?.guid);
6959
6959
  const c = new mO(n.guid, l.guid);
6960
- c.seed = a, e.deleteOnDisconnect === !0 && (c.deleteStateOnDisconnect = !0), o && (o.position && (Array.isArray(o.position) ? c.position = { x: o.position[0], y: o.position[1], z: o.position[2] } : c.position = { x: o.position.x, y: o.position.y, z: o.position.z }), o.rotation && (o.rotation instanceof lt ? o.rotation = new V().setFromEuler(o.rotation) : o.rotation instanceof Array && (o.rotation = new V().fromArray(o.rotation)), c.rotation = { x: o.rotation.x, y: o.rotation.y, z: o.rotation.z, w: o.rotation.w }), o.scale && (Array.isArray(o.scale) ? c.scale = { x: o.scale[0], y: o.scale[1], z: o.scale[2] } : c.scale = { x: o.scale.x, y: o.scale.y, z: o.scale.z })), c.position || (c.position = { x: l.position.x, y: l.position.y, z: l.position.z }), c.rotation || (c.rotation = { x: l.quaternion.x, y: l.quaternion.y, z: l.quaternion.z, w: l.quaternion.w }), c.scale || (c.scale = { x: l.scale.x, y: l.scale.y, z: l.scale.z }), c.visible = n.visible, o?.parent && (typeof o.parent == "string" ? c.parent = o.parent : c.parent = o.parent.guid), c.hostData = t, i === !1 && (c.dontSave = !0), !e?.context?.connection && I() && console.debug("Object will be instantiated but it will not be synced: not connected", n.guid), e.context.connection.isInRoom && la.push(new WeakRef(l)), e?.context?.connection.send("new-instance-created", c);
6960
+ c.seed = a, e.deleteOnDisconnect === !0 && (c.deleteStateOnDisconnect = !0), o && (o.position && (Array.isArray(o.position) ? c.position = { x: o.position[0], y: o.position[1], z: o.position[2] } : c.position = { x: o.position.x, y: o.position.y, z: o.position.z }), o.rotation && (o.rotation instanceof lt ? o.rotation = new V().setFromEuler(o.rotation) : o.rotation instanceof Array && (o.rotation = new V().fromArray(o.rotation)), c.rotation = { x: o.rotation.x, y: o.rotation.y, z: o.rotation.z, w: o.rotation.w }), o.scale && (Array.isArray(o.scale) ? c.scale = { x: o.scale[0], y: o.scale[1], z: o.scale[2] } : c.scale = { x: o.scale.x, y: o.scale.y, z: o.scale.z })), c.position || (c.position = { x: l.position.x, y: l.position.y, z: l.position.z }), c.rotation || (c.rotation = { x: l.quaternion.x, y: l.quaternion.y, z: l.quaternion.z, w: l.quaternion.w }), c.scale || (c.scale = { x: l.scale.x, y: l.scale.y, z: l.scale.z }), c.visible = n.visible, o?.parent && (typeof o.parent == "string" ? c.parent = o.parent : c.parent = o.parent.guid), c.hostData = t, i === !1 && (c.dontSave = !0), !e?.context?.connection && L() && console.debug("Object will be instantiated but it will not be synced: not connected", n.guid), e.context.connection.isInRoom && la.push(new WeakRef(l)), e?.context?.connection.send("new-instance-created", c);
6961
6961
  } else console.warn("Missing guid, can not send new instance event", l);
6962
6962
  }
6963
6963
  return r;
@@ -7925,7 +7925,7 @@ function Ki(s, e = !0, t = !1) {
7925
7925
  for (const i of ud)
7926
7926
  i.gameObject = null, i.context = null;
7927
7927
  for (const i of fd)
7928
- ZO(i, !0), t && Ae(i);
7928
+ ZO(i, !0), t && Te(i);
7929
7929
  fd.length = 0, ud.length = 0;
7930
7930
  }
7931
7931
  function cm(s, e = !0, t = !0) {
@@ -8260,10 +8260,10 @@ var Ga;
8260
8260
  if (A) break;
8261
8261
  if (d?.abort?.aborted)
8262
8262
  return console.debug("Aborted upload"), null;
8263
- const L = await v(b.upload);
8264
- L instanceof Error ? (O = L, await So(1e3 * R)) : L.ok && (console.debug("File uploaded successfully"), A = !0);
8265
- } catch (L) {
8266
- console.error(L);
8263
+ const I = await v(b.upload);
8264
+ I instanceof Error ? (O = I, await So(1e3 * R)) : I.ok && (console.debug("File uploaded successfully"), A = !0);
8265
+ } catch (I) {
8266
+ console.error(I);
8267
8267
  }
8268
8268
  if (!A)
8269
8269
  return console.error(O?.message || "Failed to upload file"), null;
@@ -8689,7 +8689,7 @@ class Ls {
8689
8689
  */
8690
8690
  static testIfRootCanAnimate(e, t) {
8691
8691
  const i = e.getRoot();
8692
- return i && (i.userData.static || i.matrixAutoUpdate === !1 || i.matrixWorldAutoUpdate === !1) ? ((t === !0 || t === void 0 && I()) && console.warn(`AnimationUtils: The root object (${i.name || i.type}) of this AnimationAction has matrixAutoUpdate or matrixWorldAutoUpdate set to false. This may prevent the animation from working correctly. If the object is marked as static, try to change it to dynamic.`, { static: i.userData.static, name: i.userData.name, tag: i.userData.tag, matrixAutoUpdate: i.matrixAutoUpdate, matrixWorldAutoUpdate: i.matrixWorldAutoUpdate }), !1) : !0;
8692
+ return i && (i.userData.static || i.matrixAutoUpdate === !1 || i.matrixWorldAutoUpdate === !1) ? ((t === !0 || t === void 0 && L()) && console.warn(`AnimationUtils: The root object (${i.name || i.type}) of this AnimationAction has matrixAutoUpdate or matrixWorldAutoUpdate set to false. This may prevent the animation from working correctly. If the object is marked as static, try to change it to dynamic.`, { static: i.userData.static, name: i.userData.name, tag: i.userData.tag, matrixAutoUpdate: i.matrixAutoUpdate, matrixWorldAutoUpdate: i.matrixWorldAutoUpdate }), !1) : !0;
8693
8693
  }
8694
8694
  /**
8695
8695
  * Tries to get the animation actions from an animation mixer.
@@ -8852,7 +8852,7 @@ class ck {
8852
8852
  h && a.push(h);
8853
8853
  }
8854
8854
  const l = await k0(a);
8855
- l?.anyFailed && (I() || Yr) && console.error("[NEEDLE_lightmaps]Error during extension loading:", l), o();
8855
+ l?.anyFailed && (L() || Yr) && console.error("[NEEDLE_lightmaps]Error during extension loading:", l), o();
8856
8856
  })) : null;
8857
8857
  }
8858
8858
  }
@@ -9006,8 +9006,8 @@ TEX ` + i.texture_lod;
9006
9006
  ` + (n.lastScreenCoverage * 100).toFixed(1) + `% cov
9007
9007
  ` + (n.lastCentrality * 100).toFixed(1) + `% centr
9008
9008
  ` + (Ih.min.x.toFixed(2) + "-" + Ih.max.x.toFixed(2) + "x" + Ih.min.y.toFixed(2) + "-" + Ih.max.y.toFixed(2)) + " scr"), n.lastScreenCoverage > 0.1) {
9009
- const g = e, w = g.worldForward, b = g.worldPosition, A = z(w).multiplyScalar(c * 0.7).add(l), O = A.distanceTo(b), R = h[Math.min(h.length - 1, Math.max(0, o))] + "88", L = this.context.domHeight > 0 ? screen.height / this.context.domHeight : 1, j = e.isPerspectiveCamera ? Math.tan(e.fov * Math.PI / 180 / 2) : 1;
9010
- U.DrawLabel(A, _, O * 0.012 * L * j, void 0, 16777215, R);
9009
+ const g = e, w = g.worldForward, b = g.worldPosition, A = z(w).multiplyScalar(c * 0.7).add(l), O = A.distanceTo(b), R = h[Math.min(h.length - 1, Math.max(0, o))] + "88", I = this.context.domHeight > 0 ? screen.height / this.context.domHeight : 1, j = e.isPerspectiveCamera ? Math.tan(e.fov * Math.PI / 180 / 2) : 1;
9010
+ U.DrawLabel(A, _, O * 0.012 * I * j, void 0, 16777215, R);
9011
9011
  }
9012
9012
  }
9013
9013
  }
@@ -9451,7 +9451,7 @@ vec3 NeutralToneMapping( vec3 color ) {
9451
9451
  if (i >= 0 && n >= 0) {
9452
9452
  const o = Zt.tonemapping_pars_fragment.substring(i, n + t.length);
9453
9453
  Zt.tonemapping_pars_fragment = Zt.tonemapping_pars_fragment.replace(o, s);
9454
- } else I() && console.error("Couldn't find NeutralToneMapping in ShaderChunk.tonemapping_pars_fragment");
9454
+ } else L() && console.error("Couldn't find NeutralToneMapping in ShaderChunk.tonemapping_pars_fragment");
9455
9455
  }
9456
9456
  function Pk() {
9457
9457
  const s = `
@@ -9569,7 +9569,7 @@ vec3 AgXToneMapping( vec3 color ) {
9569
9569
  if (i >= 0 && n >= 0) {
9570
9570
  const o = Zt.tonemapping_pars_fragment.substring(i, n + t.length);
9571
9571
  Zt.tonemapping_pars_fragment = Zt.tonemapping_pars_fragment.replace(o, s);
9572
- } else I() && console.error("Couldn't find AgXToneMapping in ShaderChunk.tonemapping_pars_fragment");
9572
+ } else L() && console.error("Couldn't find AgXToneMapping in ShaderChunk.tonemapping_pars_fragment");
9573
9573
  }
9574
9574
  function Av(s) {
9575
9575
  if (typeof s == "string")
@@ -9655,14 +9655,14 @@ async function kk(s, e) {
9655
9655
  let h = null;
9656
9656
  if (h = fc.getAttributeAndCheckFalsey(l, "qrcode-logo-src"), c && e.showLogo !== !0 && h === !1 || (h ||= fc.getAttributeAndCheckFalsey(l, "logo-src"), c && e.showLogo !== !0 && h === !1) || (h ||= fc.getAttributeAndCheckFalsey(l, "loading-logo-src", {
9657
9657
  onAttribute: () => {
9658
- I() ? console.warn("[QR Code] 'loading-logo-src' is deprecated, please use 'logo-src' or 'qrcode-logo-src' instead.") : console.debug("[QR Code] 'loading-logo-src' is deprecated.");
9658
+ L() ? console.warn("[QR Code] 'loading-logo-src' is deprecated, please use 'logo-src' or 'qrcode-logo-src' instead.") : console.debug("[QR Code] 'loading-logo-src' is deprecated.");
9659
9659
  }
9660
9660
  }), c && e.showLogo !== !0 && h === !1) || (h && !c && (console.warn("[QR Code] Custom logo is only available with a commercial license. Using default Needle logo. Please get a commercial license at https://needle.tools/pricing."), h = null), h ||= Na, !h)) return;
9661
9661
  let d = !1;
9662
9662
  e.showLogo !== !1 && (a.src = h, d = await new Promise((v, A) => {
9663
9663
  a.onload = () => v(!0), a.onerror = (O) => {
9664
9664
  const R = h !== Na ? "'" + h + "'" : null;
9665
- console.error("[QR Code] Error loading logo image for QR code", R, I() ? O : ""), v(!1);
9665
+ console.error("[QR Code] Error loading logo image for QR code", R, L() ? O : ""), v(!1);
9666
9666
  };
9667
9667
  }));
9668
9668
  const f = document.createElement("canvas");
@@ -9677,10 +9677,10 @@ async function kk(s, e) {
9677
9677
  if (d) {
9678
9678
  const v = a.width / a.height;
9679
9679
  v > 1 ? g = _ / v : _ = g * v;
9680
- const A = n * s.width, O = Math.max(_, g), R = Math.round(O + A), L = Math.round(O + A), j = (f.width - O) / 2, B = (f.height - O) / 2;
9680
+ const A = n * s.width, O = Math.max(_, g), R = Math.round(O + A), I = Math.round(O + A), j = (f.width - O) / 2, B = (f.height - O) / 2;
9681
9681
  p.shadowColor = o, p.shadowBlur = i;
9682
9682
  const G = r, X = Math.round(j - A / 2), k = Math.round(B - A / 2);
9683
- p.beginPath(), p.moveTo(X + G, k), p.lineTo(X + R - G, k), p.quadraticCurveTo(X + R, k, X + R, k + G), p.lineTo(X + R, k + L - G), p.quadraticCurveTo(X + R, k + L, X + R - G, k + L), p.lineTo(X + G, k + L), p.quadraticCurveTo(X, k + L, X, k + L - G), p.lineTo(X, k + G), p.quadraticCurveTo(X, k, X + G, k), p.fillStyle = "#ffffff", p.closePath(), p.fill(), p.clip(), p.shadowColor = "transparent";
9683
+ p.beginPath(), p.moveTo(X + G, k), p.lineTo(X + R - G, k), p.quadraticCurveTo(X + R, k, X + R, k + G), p.lineTo(X + R, k + I - G), p.quadraticCurveTo(X + R, k + I, X + R - G, k + I), p.lineTo(X + G, k + I), p.quadraticCurveTo(X, k + I, X, k + I - G), p.lineTo(X, k + G), p.quadraticCurveTo(X, k, X + G, k), p.fillStyle = "#ffffff", p.closePath(), p.fill(), p.clip(), p.shadowColor = "transparent";
9684
9684
  const W = (f.width - _) / 2, q = (f.height - g) / 2;
9685
9685
  p.drawImage(a, W, q, _, g);
9686
9686
  }
@@ -9757,7 +9757,7 @@ class mn {
9757
9757
  if (this._fullscreenButton)
9758
9758
  return this._fullscreenButton;
9759
9759
  if (!document.fullscreenEnabled)
9760
- return I() && console.warn("NeedleMenu: Fullscreen button could not be created, device doesn't support the Fullscreen API"), null;
9760
+ return L() && console.warn("NeedleMenu: Fullscreen button could not be created, device doesn't support the Fullscreen API"), null;
9761
9761
  const t = document.createElement("button");
9762
9762
  this._fullscreenButton = t, t.classList.add("fullscreen-button"), t.title = "Click to enter fullscreen mode", bo.setElementPriority(t, 3);
9763
9763
  const i = Ft("fullscreen"), n = Ft("fullscreen_exit");
@@ -9829,7 +9829,7 @@ class mn {
9829
9829
  const o = document.createElement("div");
9830
9830
  o.classList.add("qr-code-container"), n.appendChild(o), i.addEventListener("click", () => {
9831
9831
  if (n.parentNode) return a();
9832
- I() && window.location.href.includes("://localhost") && _e("To access your website from another device in the same local network you have to use the IP address instead of localhost. The IP address is logged in your development server console when you start the server."), r();
9832
+ L() && window.location.href.includes("://localhost") && _e("To access your website from another device in the same local network you have to use the IP address instead of localhost. The IP address is logged in your development server console when you start the server."), r();
9833
9833
  });
9834
9834
  async function r() {
9835
9835
  await l();
@@ -11039,7 +11039,7 @@ class Ou extends HTMLElement {
11039
11039
  let a = -1;
11040
11040
  const l = () => {
11041
11041
  const c = o - r();
11042
- return ga && c !== a && (a = c, Me(`Menu space left: ${c.toFixed(0)}px`)), c;
11042
+ return ga && c !== a && (a = c, Ae(`Menu space left: ${c.toFixed(0)}px`)), c;
11043
11043
  };
11044
11044
  };
11045
11045
  updateCompactFoldoutItem() {
@@ -11120,7 +11120,7 @@ var Se = /* @__PURE__ */ ((s) => (s[s.Start = -1] = "Start", s[s.EarlyUpdate = 0
11120
11120
  function Sg(s, e) {
11121
11121
  if (!s) return;
11122
11122
  if (!s.isComponent) {
11123
- (I() || Ke) && console.error(`Registered script is not a Needle Engine component.
11123
+ (L() || Ke) && console.error(`Registered script is not a Needle Engine component.
11124
11124
  The script will be ignored. Please make sure your component extends "Behaviour" imported from "@needle-tools/engine"
11125
11125
  `, s);
11126
11126
  return;
@@ -11491,7 +11491,7 @@ class N {
11491
11491
  const t = this.domElement?.shadowRoot?.querySelector("canvas");
11492
11492
  t && (e.canvas = t, Ke && console.log("Using canvas from shadow root", t));
11493
11493
  }
11494
- return Ke && console.log("Using Renderer Parameters:", e, this.domElement), this.renderer = new Ir(e), this.renderer.debug.checkShaderErrors = I() || x("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = Cd, this.renderer.setClearColor(new re("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = aS, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = As, this.renderer.nodes = {
11494
+ return Ke && console.log("Using Renderer Parameters:", e, this.domElement), this.renderer = new Ir(e), this.renderer.debug.checkShaderErrors = L() || x("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = Cd, this.renderer.setClearColor(new re("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = aS, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = As, this.renderer.nodes = {
11495
11495
  library: new lS(),
11496
11496
  modelViewMatrix: null,
11497
11497
  modelNormalViewMatrix: null
@@ -11741,7 +11741,7 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
11741
11741
  Ke && console.log("Creating context", this.name, e);
11742
11742
  const i = globalThis["needle:dependencies:ready"];
11743
11743
  i instanceof Promise && (Ke && console.log("Waiting for dependencies to be ready"), await i.catch((h) => {
11744
- if (Ke || I()) {
11744
+ if (Ke || L()) {
11745
11745
  if (vu("Needle Engine dependencies failed to load. Please check the console for more details"), h instanceof ReferenceError) {
11746
11746
  let d = "YourComponentName";
11747
11747
  const f = h.message.indexOf("'");
@@ -11889,11 +11889,11 @@ Possible solutions:
11889
11889
  _renderlooperrors = 0;
11890
11890
  /** Performs a full update step including script callbacks, rendering (unless isManagedExternally is set to false) and post render callbacks */
11891
11891
  update(e, t) {
11892
- if (t === void 0 && (t = null), I() || Ke || aO())
11892
+ if (t === void 0 && (t = null), L() || Ke || aO())
11893
11893
  try {
11894
11894
  this.internalStep(e, t), this._renderlooperrors = 0;
11895
11895
  } catch (i) {
11896
- this._renderlooperrors += 1, (I() || Ke) && (i instanceof Error || i instanceof TypeError) && Me("Caught unhandled exception during render-loop - see console for details.", qi.Error), console.error("Frame #" + this.time.frame + `
11896
+ this._renderlooperrors += 1, (L() || Ke) && (i instanceof Error || i instanceof TypeError) && Ae("Caught unhandled exception during render-loop - see console for details.", qi.Error), console.error("Frame #" + this.time.frame + `
11897
11897
  `, i), this._renderlooperrors >= 3 && (console.warn("Stopping render loop due to error"), this.renderer.setAnimationLoop(null), ci.sendError(N.Current, "renderloop", i instanceof Error ? i : new Error(String(i)))), this.domElement.dispatchEvent(new CustomEvent("error", { detail: i }));
11898
11898
  }
11899
11899
  else
@@ -13222,7 +13222,7 @@ class E {
13222
13222
  }
13223
13223
  /** @internal */
13224
13224
  __internalEnable(e) {
13225
- return this.__destroyed ? (I() && console.warn("[Needle Engine Dev] Trying to enable destroyed component"), !1) : this.__didAwake ? this.__didEnable ? (e !== !0 && (this.__isEnabled = !0), !1) : (this.__didEnable = !0, this.__isEnabled = !0, this.onEnable(), !0) : !1;
13225
+ return this.__destroyed ? (L() && console.warn("[Needle Engine Dev] Trying to enable destroyed component"), !1) : this.__didAwake ? this.__didEnable ? (e !== !0 && (this.__isEnabled = !0), !1) : (this.__didEnable = !0, this.__isEnabled = !0, this.onEnable(), !0) : !1;
13226
13226
  }
13227
13227
  /** @internal */
13228
13228
  __internalDisable(e) {
@@ -13247,7 +13247,7 @@ class E {
13247
13247
  }
13248
13248
  set enabled(e) {
13249
13249
  if (this.__destroyed) {
13250
- I() && console.warn(`[Needle Engine Dev] Trying to ${e ? "enable" : "disable"} destroyed component`);
13250
+ L() && console.warn(`[Needle Engine Dev] Trying to ${e ? "enable" : "disable"} destroyed component`);
13251
13251
  return;
13252
13252
  }
13253
13253
  if (typeof e == "number" && (e >= 0.5 ? e = !0 : e = !1), !this.__didAwake) {
@@ -14148,7 +14148,7 @@ class wn {
14148
14148
  }
14149
14149
  }
14150
14150
  setStartTransition() {
14151
- this.model.layers.length > 1 && (nt || I()) && console.warn("Multiple layers are not supported yet " + this.animator?.name);
14151
+ this.model.layers.length > 1 && (nt || L()) && console.warn("Multiple layers are not supported yet " + this.animator?.name);
14152
14152
  for (const e of this.model.layers) {
14153
14153
  const t = e.stateMachine;
14154
14154
  t.defaultState === void 0 && (nt && console.warn("AnimatorController default state is undefined, will assign state 0 as default", e), t.defaultState = 0);
@@ -14299,7 +14299,7 @@ Exit Time: ` + c, o.hasExitTime);
14299
14299
  r.conditions || (r.conditions = []);
14300
14300
  if (o.motion || (nt && console.warn("No motion", o), o.motion = Zk(o.name)), this.animator && o.motion.clips) {
14301
14301
  const r = o.motion.clips?.find((a) => a.node.name === this.animator?.gameObject?.name);
14302
- r ? o.motion.clip = r.clip : (nt || I()) && console.warn('Could not find clip for animator "' + this.animator?.gameObject?.name + '"', o.motion.clips.map((a) => a.node.name));
14302
+ r ? o.motion.clip = r.clip : (nt || L()) && console.warn('Could not find clip for animator "' + this.animator?.gameObject?.name + '"', o.motion.clips.map((a) => a.node.name));
14303
14303
  }
14304
14304
  if (!o.motion.clip) {
14305
14305
  nt && console.warn("No clip assigned to state", o);
@@ -14312,7 +14312,7 @@ Exit Time: ` + c, o.hasExitTime);
14312
14312
  const a = this.createAction(r);
14313
14313
  o.motion.action = a;
14314
14314
  } else
14315
- (nt || I()) && console.warn("No valid animationclip assigned", o);
14315
+ (nt || L()) && console.warn("No valid animationclip assigned", o);
14316
14316
  }
14317
14317
  if (o.behaviours && Array.isArray(o.behaviours))
14318
14318
  for (const r of o.behaviours) {
@@ -14322,7 +14322,7 @@ Exit Time: ` + c, o.hasExitTime);
14322
14322
  const l = new a();
14323
14323
  l.isStateMachineBehaviour && (l._context = this.context ?? void 0, Wa(l, r.properties), r.instance = l), nt && console.log("Created animator controller behaviour", o.name, r.typeName, r.properties, l);
14324
14324
  } else
14325
- (nt || I()) && console.warn("Could not find AnimatorBehaviour type: " + r.typeName);
14325
+ (nt || L()) && console.warn("Could not find AnimatorBehaviour type: " + r.typeName);
14326
14326
  }
14327
14327
  }
14328
14328
  }
@@ -15052,8 +15052,8 @@ function aM(s) {
15052
15052
  s.maxZoom = b * 10, s.minZoom = b * 0.01, s.debug === !0 && console.log("Fit camera to objects", { fitHeightDistance: g, fitWidthDistance: w, distance: b, verticalFov: m, horizontalFov: _ });
15053
15053
  const v = 0.05, A = l.clone();
15054
15054
  if (A.y -= a.y * v, s.targetOffset && (s.targetOffset.x !== void 0 && (A.x += s.targetOffset.x), s.targetOffset.y !== void 0 && (A.y += s.targetOffset.y), s.targetOffset.z !== void 0 && (A.z += s.targetOffset.z)), s.relativeTargetOffset && (s.relativeTargetOffset.x !== void 0 && (A.x += s.relativeTargetOffset.x * a.x), s.relativeTargetOffset.y !== void 0 && (A.y += s.relativeTargetOffset.y * a.y), s.relativeTargetOffset.z !== void 0 && (A.z += s.relativeTargetOffset.z * a.z)), n == null || n == "auto") {
15055
- const L = Gc(Fs), j = L ? L.radius : 0, B = Math.max(p.x, p.y, p.z, j);
15056
- t instanceof ce && (t.near = b / 100, t.far = B + b * 10, t.updateProjectionMatrix()), L && (s.maxZoom = Math.max(Math.min(s.maxZoom, j * 0.5), b));
15055
+ const I = Gc(Fs), j = I ? I.radius : 0, B = Math.max(p.x, p.y, p.z, j);
15056
+ t instanceof ce && (t.near = b / 100, t.far = B + b * 10, t.updateProjectionMatrix()), I && (s.maxZoom = Math.max(Math.min(s.maxZoom, j * 0.5), b));
15057
15057
  }
15058
15058
  s.currentZoom !== void 0 && (s.currentZoom < s.minZoom && (s.minZoom = s.currentZoom * 0.9), s.currentZoom > s.maxZoom && (s.maxZoom = s.currentZoom * 1.1));
15059
15059
  const O = l.clone();
@@ -15253,7 +15253,7 @@ const Nt = function(s, e) {
15253
15253
  function cM(s, e, t, i, n) {
15254
15254
  if (!n && !i && !s.onValidate) return;
15255
15255
  if (t !== void 0) {
15256
- console.error("Invalid usage of validate decorator. Only fields can be validated.", s, e, t), Me("Invalid usage of validate decorator. Only fields can be validated. Property: " + e, qi.Error);
15256
+ console.error("Invalid usage of validate decorator. Only fields can be validated.", s, e, t), Ae("Invalid usage of validate decorator. Only fields can be validated. Property: " + e, qi.Error);
15257
15257
  return;
15258
15258
  }
15259
15259
  let o = "";
@@ -15261,7 +15261,7 @@ function cM(s, e, t, i, n) {
15261
15261
  const r = Symbol(o), a = s.__internalAwake;
15262
15262
  s.__internalAwake = function() {
15263
15263
  if (!this.onValidate) {
15264
- I() && console.warn('Usage of @validate decorate detected but there is no onValidate method in your class: "' + s.constructor?.name + '"');
15264
+ L() && console.warn('Usage of @validate decorate detected but there is no onValidate method in your class: "' + s.constructor?.name + '"');
15265
15265
  return;
15266
15266
  }
15267
15267
  if (this[r] === void 0) {
@@ -15479,7 +15479,7 @@ const fi = class md extends E {
15479
15479
  this._watch = void 0, this._propertiesChanged = !1;
15480
15480
  }
15481
15481
  onEnable() {
15482
- this._watch || (this._watch = new uM(this.gameObject, this.context)), this._watch.start(!0, !0), this.startCoroutine(this.beforePhysics(), Se.LateUpdate), I() && (globalThis.NEEDLE_USE_RAPIER ? T.RAPIER_PHYSICS.ready().then(async () => {
15482
+ this._watch || (this._watch = new uM(this.gameObject, this.context)), this._watch.start(!0, !0), this.startCoroutine(this.beforePhysics(), Se.LateUpdate), L() && (globalThis.NEEDLE_USE_RAPIER ? T.RAPIER_PHYSICS.ready().then(async () => {
15483
15483
  await yu(3), this.context.physics.engine?.getBody(this) || console.warn(`Rigidbody could not be created. Ensure "${this.name}" has a Collider component.`);
15484
15484
  }) : console.warn("Rigidbody could not be created: Rapier physics are explicitly disabled."));
15485
15485
  }
@@ -15989,7 +15989,7 @@ class de {
15989
15989
  if (l) {
15990
15990
  const c = o.arguments?.map((h) => h instanceof Object && h.uuid ? e[h.uuid] : h?.isComponent ? e[h.guid] : h);
15991
15991
  t.push(new ao(l.clone, o.methodName, c, o.enabled));
15992
- } else I() && console.warn("Could not find target for event listener");
15992
+ } else L() && console.warn("Could not find target for event listener");
15993
15993
  }
15994
15994
  }
15995
15995
  }
@@ -16112,7 +16112,7 @@ class gM extends sn {
16112
16112
  if (e.endsWith(".glb") || e.endsWith(".gltf")) {
16113
16113
  if (t.serializable instanceof Array && t.serializable.includes(ne))
16114
16114
  return;
16115
- I() && _e("Detected wrong usage of @serializable with Object3D or GameObject. Instead you should use AssetReference here! Please see the console for details.");
16115
+ L() && _e("Detected wrong usage of @serializable with Object3D or GameObject. Instead you should use AssetReference here! Please see the console for details.");
16116
16116
  const i = t.target?.constructor?.name;
16117
16117
  console.warn(`Wrong usage of @serializable detected in your script "${i}"
16118
16118
 
@@ -16137,7 +16137,7 @@ ${t.path}! : AssetReference;
16137
16137
  }
16138
16138
  let i;
16139
16139
  const n = t.gltf?.scene;
16140
- return n && (i = C.findByGuid(e.guid, n)), i || (i = C.findByGuid(e.guid, t.context.scene)), i ? (i && i.isComponent === !0 && (gt && console.warn("Deserialized object reference is a component"), i = i.gameObject), gt && console.log("Deserialized object reference?", e, i, t?.nodeToObject)) : ((I() || gt) && console.warn("Could not resolve object reference", t.path, e, t.target, t.context.scene), e.could_not_resolve = !0), i;
16140
+ return n && (i = C.findByGuid(e.guid, n)), i || (i = C.findByGuid(e.guid, t.context.scene)), i ? (i && i.isComponent === !0 && (gt && console.warn("Deserialized object reference is a component"), i = i.gameObject), gt && console.log("Deserialized object reference?", e, i, t?.nodeToObject)) : ((L() || gt) && console.warn("Could not resolve object reference", t.path, e, t.target, t.context.scene), e.could_not_resolve = !0), i;
16141
16141
  }
16142
16142
  }
16143
16143
  }
@@ -16162,7 +16162,7 @@ class _M extends sn {
16162
16162
  let n = this.findObjectForGuid(e.guid, t.root);
16163
16163
  if (n || t.context && (n = this.findObjectForGuid(e.guid, t.context?.scene), n))
16164
16164
  return n;
16165
- (I() || gt) && console.warn('Could not resolve component reference: "' + i + '" using guid ' + e.guid, t.target), e.could_not_resolve = !0;
16165
+ (L() || gt) && console.warn('Could not resolve component reference: "' + i + '" using guid ' + e.guid, t.target), e.could_not_resolve = !0;
16166
16166
  return;
16167
16167
  }
16168
16168
  }
@@ -16229,7 +16229,7 @@ Could not find method ${r.method} on object ${l.name}`, l, typeof l[r.method]);
16229
16229
  }
16230
16230
  p = Object.getPrototypeOf(p);
16231
16231
  }
16232
- !f && (I() || gt) && h();
16232
+ !f && (L() || gt) && h();
16233
16233
  }
16234
16234
  }
16235
16235
  if (l) {
@@ -16241,7 +16241,7 @@ Could not find method ${r.method} on object ${l.name}`, l, typeof l[r.method]);
16241
16241
  const f = new ao(l, r.method, h, r.enabled);
16242
16242
  i.push(f);
16243
16243
  }
16244
- } else I() && console.warn(`[Dev] EventList: Could not find event listener in scene (${t.object?.name})`, r);
16244
+ } else L() && console.warn(`[Dev] EventList: Could not find event listener in scene (${t.object?.name})`, r);
16245
16245
  }
16246
16246
  const n = new de(i);
16247
16247
  gt && console.log(n);
@@ -16522,7 +16522,7 @@ class hi extends E {
16522
16522
  hits: n
16523
16523
  });
16524
16524
  }
16525
- no && t.isClick && Me("EventSystem: " + t.pointerId + " - " + this.context.time.frame + " - Up:" + t.isUp + ", Down:" + t.isDown);
16525
+ no && t.isClick && Ae("EventSystem: " + t.pointerId + " - " + this.context.time.frame + " - Up:" + t.isUp + ", Down:" + t.isDown);
16526
16526
  const o = {
16527
16527
  sender: this,
16528
16528
  args: t,
@@ -16728,7 +16728,7 @@ class hi extends E {
16728
16728
  const n = this._capturedPointer[i] || [];
16729
16729
  n.push(t), this._capturedPointer[i] = n;
16730
16730
  } else
16731
- I() && !t.z__warned_no_pointermove && (t.z__warned_no_pointermove = !0, console.warn("PointerCapture was requested but the component doesn't implement onPointerMove. It will not receive any pointer events"));
16731
+ L() && !t.z__warned_no_pointermove && (t.z__warned_no_pointermove = !0, console.warn("PointerCapture was requested but the component doesn't implement onPointerMove. It will not receive any pointer events"));
16732
16732
  } else e.z__pointer_cture_rleased && (e.z__pointer_cture_rleased = !1, this.releasePointerCapture(e, t));
16733
16733
  }
16734
16734
  /** removes the component from the pointer capture list */
@@ -16824,7 +16824,7 @@ class Tl {
16824
16824
  return e ? e.isBlock || e.isText ? e : this.findBlockOrTextInParent(e.parent) : null;
16825
16825
  }
16826
16826
  }
16827
- var kM = Object.defineProperty, MM = Object.getOwnPropertyDescriptor, Re = (s, e, t, i) => {
16827
+ var kM = Object.defineProperty, MM = Object.getOwnPropertyDescriptor, Me = (s, e, t, i) => {
16828
16828
  for (var n = i > 1 ? void 0 : i ? MM(e, t) : e, o = s.length - 1, r; o >= 0; o--)
16829
16829
  (r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
16830
16830
  return i && n && kM(e, t, n), n;
@@ -17185,9 +17185,9 @@ class ye extends E {
17185
17185
  */
17186
17186
  setCameraAndLookTarget(e, t = !1) {
17187
17187
  if (!e)
17188
- return (I() || Lt) && console.warn("[OrbitControls] setCameraAndLookTarget target is null"), !1;
17188
+ return (L() || Lt) && console.warn("[OrbitControls] setCameraAndLookTarget target is null"), !1;
17189
17189
  if (!(e instanceof M) && !(e instanceof Si))
17190
- return (I() || Lt) && console.warn("[OrbitControls] setCameraAndLookTarget target is not an Object3D or Camera"), !1;
17190
+ return (L() || Lt) && console.warn("[OrbitControls] setCameraAndLookTarget target is not an Object3D or Camera"), !1;
17191
17191
  e instanceof Si && (e = e.gameObject);
17192
17192
  const i = e.worldPosition, n = e.worldForward;
17193
17193
  e instanceof dS && (Lt && console.debug("[OrbitControls] setCameraAndLookTarget flip forward direction for camera"), n.multiplyScalar(-1));
@@ -17302,79 +17302,79 @@ class ye extends E {
17302
17302
  }
17303
17303
  _haveAttachedKeyboardEvents = !1;
17304
17304
  }
17305
- Re([
17305
+ Me([
17306
17306
  u()
17307
17307
  ], ye.prototype, "autoTarget", 2);
17308
- Re([
17308
+ Me([
17309
17309
  u()
17310
17310
  ], ye.prototype, "autoFit", 2);
17311
- Re([
17311
+ Me([
17312
17312
  u()
17313
17313
  ], ye.prototype, "enableRotate", 2);
17314
- Re([
17314
+ Me([
17315
17315
  u()
17316
17316
  ], ye.prototype, "autoRotate", 2);
17317
- Re([
17317
+ Me([
17318
17318
  u()
17319
17319
  ], ye.prototype, "autoRotateSpeed", 2);
17320
- Re([
17320
+ Me([
17321
17321
  u()
17322
17322
  ], ye.prototype, "minAzimuthAngle", 2);
17323
- Re([
17323
+ Me([
17324
17324
  u()
17325
17325
  ], ye.prototype, "maxAzimuthAngle", 2);
17326
- Re([
17326
+ Me([
17327
17327
  u()
17328
17328
  ], ye.prototype, "minPolarAngle", 2);
17329
- Re([
17329
+ Me([
17330
17330
  u()
17331
17331
  ], ye.prototype, "maxPolarAngle", 2);
17332
- Re([
17332
+ Me([
17333
17333
  u()
17334
17334
  ], ye.prototype, "enableKeys", 2);
17335
- Re([
17335
+ Me([
17336
17336
  u()
17337
17337
  ], ye.prototype, "enableDamping", 2);
17338
- Re([
17338
+ Me([
17339
17339
  u()
17340
17340
  ], ye.prototype, "dampingFactor", 2);
17341
- Re([
17341
+ Me([
17342
17342
  u()
17343
17343
  ], ye.prototype, "enableZoom", 2);
17344
- Re([
17344
+ Me([
17345
17345
  u()
17346
17346
  ], ye.prototype, "minZoom", 2);
17347
- Re([
17347
+ Me([
17348
17348
  u()
17349
17349
  ], ye.prototype, "maxZoom", 2);
17350
- Re([
17350
+ Me([
17351
17351
  u()
17352
17352
  ], ye.prototype, "zoomSpeed", 2);
17353
- Re([
17353
+ Me([
17354
17354
  u()
17355
17355
  ], ye.prototype, "enablePan", 2);
17356
- Re([
17356
+ Me([
17357
17357
  u(Ja)
17358
17358
  ], ye.prototype, "lookAtConstraint", 2);
17359
- Re([
17359
+ Me([
17360
17360
  u()
17361
17361
  ], ye.prototype, "lookAtConstraint01", 2);
17362
- Re([
17362
+ Me([
17363
17363
  u()
17364
17364
  ], ye.prototype, "allowInterrupt", 2);
17365
- Re([
17365
+ Me([
17366
17366
  u()
17367
17367
  ], ye.prototype, "middleClickToFocus", 2);
17368
- Re([
17368
+ Me([
17369
17369
  u()
17370
17370
  ], ye.prototype, "doubleClickToFocus", 2);
17371
- Re([
17371
+ Me([
17372
17372
  u()
17373
17373
  ], ye.prototype, "clickBackgroundToFitScene", 2);
17374
- Re([
17374
+ Me([
17375
17375
  u()
17376
17376
  ], ye.prototype, "targetLerpDuration", 1);
17377
- Re([
17377
+ Me([
17378
17378
  u(M)
17379
17379
  ], ye.prototype, "targetBounds", 2);
17380
17380
  var TM = Object.defineProperty, AM = Object.getOwnPropertyDescriptor, ti = (s, e, t, i) => {
@@ -17703,7 +17703,7 @@ const so = x("debugcam"), tb = x("debugscreenpointtoray"), $t = class Yl extends
17703
17703
  if (typeof t._transparent == "boolean")
17704
17704
  return t._transparent;
17705
17705
  const i = t.environmentBlendMode;
17706
- so && Me("Environment blend mode: " + i + " on " + navigator.userAgent);
17706
+ so && Ae("Environment blend mode: " + i + " on " + navigator.userAgent);
17707
17707
  let n = i === "additive" || i === "alpha-blend";
17708
17708
  if (e.isInAR && i === "opaque") {
17709
17709
  if (navigator.userAgent?.includes("OculusBrowser"))
@@ -18092,7 +18092,7 @@ const xt = x("debugaudio"), on = class oo extends E {
18092
18092
  * @param clip - Optional audio clip or {@link MediaStream} to play
18093
18093
  */
18094
18094
  play(e = void 0) {
18095
- !e && this.clip && (e = this.clip), e !== void 0 && typeof e != "string" && !(e instanceof MediaStream) && (I() && console.warn("Called play on AudioSource with unknown argument type:", e + `
18095
+ !e && this.clip && (e = this.clip), e !== void 0 && typeof e != "string" && !(e instanceof MediaStream) && (L() && console.warn("Called play on AudioSource with unknown argument type:", e + `
18096
18096
  Using the assigned clip instead:`, this.clip), e = this.clip);
18097
18097
  let t = !this.sound || e && e !== this.clip;
18098
18098
  if (typeof e == "string" && !this.audioLoader && (t = !0), (e instanceof MediaStream || typeof e == "string") && (this.clip = e), t) {
@@ -18770,7 +18770,7 @@ class Ur extends E {
18770
18770
  if (!await D.microphonePermissionsGranted())
18771
18771
  return console.error("Cannot connect to voice chat - microphone permissions not granted"), this.updateButton(), !1;
18772
18772
  } else return console.error("Cannot connect to voice chat - not connected to server"), this.updateButton(), !1;
18773
- return this._allowSending = !0, this._net?.stopSendingStream(this._outputStream), Cs(this._outputStream), this._outputStream = await this.getAudioStream(e), this._outputStream ? (this.debug && console.log("VOIP: Got audio stream"), this._net?.startSendingStream(this._outputStream), this.updateButton(), !0) : (this.updateButton(), await D.microphonePermissionsGranted() ? console.error("VOIP: Could not get audio stream - please make sure to connect an audio device and grant microphone permissions") : vu("Microphone permissions not granted: Please grant microphone permissions to use voice chat"), (this.debug || I()) && console.log("VOIP: Failed to get audio stream"), !1);
18773
+ return this._allowSending = !0, this._net?.stopSendingStream(this._outputStream), Cs(this._outputStream), this._outputStream = await this.getAudioStream(e), this._outputStream ? (this.debug && console.log("VOIP: Got audio stream"), this._net?.startSendingStream(this._outputStream), this.updateButton(), !0) : (this.updateButton(), await D.microphonePermissionsGranted() ? console.error("VOIP: Could not get audio stream - please make sure to connect an audio device and grant microphone permissions") : vu("Microphone permissions not granted: Please grant microphone permissions to use voice chat"), (this.debug || L()) && console.log("VOIP: Failed to get audio stream"), !1);
18774
18774
  }
18775
18775
  /** Stop sending audio (muting your own microphone) */
18776
18776
  disconnect(e) {
@@ -18811,7 +18811,7 @@ class Ur extends E {
18811
18811
  // private _analyzer?: AudioAnalyser;
18812
18812
  /** @deprecated */
18813
18813
  getFrequency(e) {
18814
- return this.unsupported_getfrequency || (this.unsupported_getfrequency = !0, I() && _e("VOIP: getFrequency is currently not supported"), console.warn("VOIP: getFrequency is currently not supported")), null;
18814
+ return this.unsupported_getfrequency || (this.unsupported_getfrequency = !0, L() && _e("VOIP: getFrequency is currently not supported"), console.warn("VOIP: getFrequency is currently not supported")), null;
18815
18815
  }
18816
18816
  async getAudioStream(e) {
18817
18817
  if (!navigator.mediaDevices.getUserMedia)
@@ -19422,7 +19422,7 @@ class zr extends Pn {
19422
19422
  r && this.activeAndEnabled && (o.geometry = r, this.context.physics.engine?.addMeshCollider(this, o, this.convex));
19423
19423
  });
19424
19424
  } else
19425
- (I() || x("showcolliders")) && console.warn(`[MeshCollider] A MeshCollider mesh is assigned to an unknown object on "${this.gameObject.name}", but it's neither a Mesh nor a Group. Please double check that you attached the collider component to the right object and report a bug otherwise!`, this);
19425
+ (L() || x("showcolliders")) && console.warn(`[MeshCollider] A MeshCollider mesh is assigned to an unknown object on "${this.gameObject.name}", but it's neither a Mesh nor a Group. Please double check that you attached the collider component to the right object and report a bug otherwise!`, this);
19426
19426
  }
19427
19427
  }
19428
19428
  }
@@ -20357,8 +20357,8 @@ class np {
20357
20357
  const v = b[0];
20358
20358
  if (this._draggedOverObject === v.object ? this._draggedOverObjectDuration += this.context.time.deltaTime : (this._draggedOverObject = v.object, this._draggedOverObjectDuration = 0), v.face) {
20359
20359
  this._hasLastSurfaceHitPoint = !0, this._lastSurfaceHitPoint.copy(v.point);
20360
- const O = this._draggedOverObjectDuration >= 0.15, L = this._totalMovement.length() >= 1e-3, j = z(v.normal || v.face.normal).applyQuaternion(v.object.worldQuaternion);
20361
- if ((O || L) && (this._draggedOverObjectLastSetUp !== this._draggedOverObject || this._draggedOverObjectLastNormal.dot(j) < 0.999999 || this.context.time.frame % 60 === 0)) {
20360
+ const O = this._draggedOverObjectDuration >= 0.15, I = this._totalMovement.length() >= 1e-3, j = z(v.normal || v.face.normal).applyQuaternion(v.object.worldQuaternion);
20361
+ if ((O || I) && (this._draggedOverObjectLastSetUp !== this._draggedOverObject || this._draggedOverObjectLastNormal.dot(j) < 0.999999 || this.context.time.frame % 60 === 0)) {
20362
20362
  this._draggedOverObjectLastSetUp = this._draggedOverObject, this._draggedOverObjectLastNormal.copy(v.face.normal);
20363
20363
  const B = z(), G = z();
20364
20364
  this._bounds.getCenter(B), this._bounds.getSize(G), B.sub(G.multiplyScalar(0.5).multiply(j)), this._hitPointInLocalSpace.copy(B), this._hitNormalInLocalSpace.copy(v.face.normal), this._bounds.getCenter(B), this._bounds.getSize(G), B.add(G.multiplyScalar(0.5).multiply(v.face.normal));
@@ -20366,7 +20366,7 @@ class np {
20366
20366
  this._followObject.localToWorld(X);
20367
20367
  const k = v.point;
20368
20368
  this._dragPlane.setFromNormalAndCoplanarPoint(j, k);
20369
- } else if (!(O || L))
20369
+ } else if (!(O || I))
20370
20370
  return;
20371
20371
  }
20372
20372
  } else f && this.gameObject && this.setPlaneViewAligned(this.gameObject.worldPosition, !1);
@@ -20726,7 +20726,7 @@ function yR(s, e, t) {
20726
20726
  if (r)
20727
20727
  return gc && console.debug(`Mimetype callback returned: ${r}`), r;
20728
20728
  }
20729
- if (I() || gc) {
20729
+ if (L() || gc) {
20730
20730
  const o = new TextDecoder().decode(e.slice(0, Math.min(e.byteLength, 32)));
20731
20731
  console.warn(`Could not determine file type.
20732
20732
 
@@ -21093,7 +21093,7 @@ class rw {
21093
21093
  d?.primitives && (l.sharedMaterials = d.primitives.map((f) => "/materials/" + (f.material ?? 0)), c = !0);
21094
21094
  }
21095
21095
  }
21096
- !c && (An || I()) && console.warn(`[NEEDLE_components] Component '${l.name}' on object '${i.name}' is not added to a mesh or failed to retrieve materials from glTF.`);
21096
+ !c && (An || L()) && console.warn(`[NEEDLE_components] Component '${l.name}' on object '${i.name}' is not added to a mesh or failed to retrieve materials from glTF.`);
21097
21097
  }
21098
21098
  l && this.parser && r.push(
21099
21099
  gg(this.parser, l).catch((c) => console.error(`Error while resolving references (see console for details)
@@ -21261,7 +21261,7 @@ class RR {
21261
21261
  this.objectToWorldMatrix.copy(e.matrixWorld), zd(this.objectToWorldMatrix, this.objectToWorld), this.worldToObjectMatrix.copy(e.matrixWorld).invert(), zd(this.worldToObjectMatrix, this.worldToObject);
21262
21262
  }
21263
21263
  }
21264
- class Te extends c0 {
21264
+ class Ee extends c0 {
21265
21265
  identifier;
21266
21266
  onBeforeRenderSceneCallback = this.onBeforeRenderScene.bind(this);
21267
21267
  clone() {
@@ -21333,7 +21333,7 @@ class Te extends c0 {
21333
21333
  }
21334
21334
  onUpdateUniforms(e, t) {
21335
21335
  const i = N.Current;
21336
- if (e && (Te.viewProjection && this.uniforms[this._viewProjectionName] && (Te.viewProjection.copy(e.projectionMatrix).multiply(e.matrixWorldInverse), zd(Te.viewProjection, Te._viewProjectionValues)), Te.viewMatrix && this.uniforms[this._viewMatrixName] && (Te.viewMatrix.copy(e.matrixWorldInverse), zd(Te.viewMatrix, Te._viewMatrixValues)), this.uniforms[Te._worldSpaceCameraPosName] && Te._worldSpaceCameraPos.setFromMatrixPosition(e.matrixWorld)), this.uniforms._TimeParameters && (this.uniforms._TimeParameters.value = i.sceneLighting.timeVec4), this.uniforms._Time) {
21336
+ if (e && (Ee.viewProjection && this.uniforms[this._viewProjectionName] && (Ee.viewProjection.copy(e.projectionMatrix).multiply(e.matrixWorldInverse), zd(Ee.viewProjection, Ee._viewProjectionValues)), Ee.viewMatrix && this.uniforms[this._viewMatrixName] && (Ee.viewMatrix.copy(e.matrixWorldInverse), zd(Ee.viewMatrix, Ee._viewMatrixValues)), this.uniforms[Ee._worldSpaceCameraPosName] && Ee._worldSpaceCameraPos.setFromMatrixPosition(e.matrixWorld)), this.uniforms._TimeParameters && (this.uniforms._TimeParameters.value = i.sceneLighting.timeVec4), this.uniforms._Time) {
21337
21337
  const a = this.uniforms._Time.value;
21338
21338
  a.x = i.sceneLighting.timeVec4.x / 20, a.y = i.sceneLighting.timeVec4.x, a.z = i.sceneLighting.timeVec4.x * 2, a.w = i.sceneLighting.timeVec4.x * 3;
21339
21339
  }
@@ -21351,12 +21351,12 @@ class Te extends c0 {
21351
21351
  }
21352
21352
  const n = i.mainLight;
21353
21353
  if (n) {
21354
- const a = te(n.gameObject, Te._mainLightPosition);
21355
- this.uniforms._MainLightPosition = { value: a.normalize() }, Te._mainLightColor.set(n.color.r, n.color.g, n.color.b, 0), this.uniforms._MainLightColor = { value: Te._mainLightColor };
21354
+ const a = te(n.gameObject, Ee._mainLightPosition);
21355
+ this.uniforms._MainLightPosition = { value: a.normalize() }, Ee._mainLightColor.set(n.color.r, n.color.g, n.color.b, 0), this.uniforms._MainLightColor = { value: Ee._mainLightColor };
21356
21356
  const l = n.intensity;
21357
- Te._lightData.z = l, this.uniforms.unity_LightData = { value: Te._lightData };
21357
+ Ee._lightData.z = l, this.uniforms.unity_LightData = { value: Ee._lightData };
21358
21358
  }
21359
- if (e && (Te.viewProjection && this.uniforms[this._viewProjectionName] && (this.uniforms[this._viewProjectionName].value = Te._viewProjectionValues), Te.viewMatrix && this.uniforms[this._viewMatrixName] && (this.uniforms[this._viewMatrixName].value = Te._viewMatrixValues), this.uniforms[Te._worldSpaceCameraPosName] && (this.uniforms[Te._worldSpaceCameraPosName] = { value: Te._worldSpaceCameraPos }), i.mainCameraComponent)) {
21359
+ if (e && (Ee.viewProjection && this.uniforms[this._viewProjectionName] && (this.uniforms[this._viewProjectionName].value = Ee._viewProjectionValues), Ee.viewMatrix && this.uniforms[this._viewMatrixName] && (this.uniforms[this._viewMatrixName].value = Ee._viewMatrixValues), this.uniforms[Ee._worldSpaceCameraPosName] && (this.uniforms[Ee._worldSpaceCameraPosName] = { value: Ee._worldSpaceCameraPos }), i.mainCameraComponent)) {
21360
21360
  if (this.uniforms._ProjectionParams) {
21361
21361
  const a = this.uniforms._ProjectionParams.value;
21362
21362
  a.x = 1, a.y = i.mainCameraComponent.nearClipPlane, a.z = i.mainCameraComponent.farClipPlane, a.w = 1 / a.z, this.uniforms._ProjectionParams.value = a;
@@ -21476,7 +21476,7 @@ class ER {
21476
21476
  }
21477
21477
  }
21478
21478
  }
21479
- const m = new Te(
21479
+ const m = new Ee(
21480
21480
  this.identifier,
21481
21481
  {
21482
21482
  name: t.name ?? "",
@@ -21582,7 +21582,7 @@ async function wm(s, e, t, i) {
21582
21582
  const r = new Qd(o);
21583
21583
  return r.setAnimationPointerResolver.bind(r)(new IR()), r;
21584
21584
  } else
21585
- return (TR || I()) && console.error("Missing KHR_animation_pointer extension..."), {
21585
+ return (TR || L()) && console.error("Missing KHR_animation_pointer extension..."), {
21586
21586
  name: "KHR_animation_pointer_NOT_AVAILABLE"
21587
21587
  };
21588
21588
  });
@@ -21728,7 +21728,7 @@ class Ea {
21728
21728
  return i(`Instancing: Can not update geometry (${this.name}), reserved index range is too small: ${this.__reservedIndexRange.toLocaleString()} < ${this.indexCount.toLocaleString()} indices for ${this.name}`);
21729
21729
  return this.renderer.updateGeometry(e, this.__geometryIndex);
21730
21730
  function i(n) {
21731
- return t.updateMeshInformation() && (t.renderer.remove(t, !0), t.renderer.add(t)) ? !0 : ((I() || jt) && console.error(n), !1);
21731
+ return t.updateMeshInformation() && (t.renderer.remove(t, !0), t.renderer.add(t)) ? !0 : ((L() || jt) && console.error(n), !1);
21732
21732
  }
21733
21733
  }
21734
21734
  /** Adds this object to the instancing renderer (effectively activating instancing) */
@@ -21828,7 +21828,7 @@ class DR {
21828
21828
  this.add(t);
21829
21829
  } catch (i) {
21830
21830
  if (console.error(`Failed adding mesh to instancing (object name: "${e.name}", instances: ${this._currentInstanceCount.toLocaleString()}/${this._maxInstanceCount.toLocaleString()}, vertices: ${this._currentVertexCount.toLocaleString()}/${this._maxVertexCount.toLocaleString()}, indices: ${this._currentIndexCount.toLocaleString()}/${this._maxIndexCount.toLocaleString()})
21831
- `, i), I()) {
21831
+ `, i), L()) {
21832
21832
  vu("Failed instancing mesh. See the browser console for details.");
21833
21833
  debugger;
21834
21834
  }
@@ -21866,7 +21866,7 @@ class DR {
21866
21866
  const t = this.geometry;
21867
21867
  for (const i in t.attributes)
21868
21868
  if (i !== "batchId" && !e.hasAttribute(i))
21869
- return I() && console.warn(`BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`), !1;
21869
+ return L() && console.warn(`BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`), !1;
21870
21870
  return !0;
21871
21871
  }
21872
21872
  markNeedsUpdate() {
@@ -21891,7 +21891,7 @@ Mesh: "${this.name}${e.name?.length ? "/" + e.name : ""}" (${f.vertexCount.toLoc
21891
21891
  Max count ${this._maxInstanceCount.toLocaleString()} → ${o.toLocaleString()}
21892
21892
  Max vertex count ${this._maxVertexCount.toLocaleString()} -> ${l.toLocaleString()}
21893
21893
  Max index count ${this._maxIndexCount.toLocaleString()} -> ${c.toLocaleString()}`), this._debugMaterial = db();
21894
- } else I() && console.debug(`[Instancing] Growing Buffer
21894
+ } else L() && console.debug(`[Instancing] Growing Buffer
21895
21895
  Mesh: "${this.name}${e.name?.length ? "/" + e.name : ""}"
21896
21896
  Max count ${this._maxInstanceCount} → ${o}
21897
21897
  Max vertex count ${this._maxVertexCount.toLocaleString()} -> ${l.toLocaleString()}
@@ -21974,7 +21974,7 @@ Index: ${e.__instanceIndex}`), this._batchedMesh.deleteInstance(e.__instanceInde
21974
21974
  }
21975
21975
  function cr(s) {
21976
21976
  if (!s)
21977
- return I() && console.error("Cannot get mesh information from null geometry"), { vertexCount: 0, indexCount: 0 };
21977
+ return L() && console.error("Cannot get mesh information from null geometry"), { vertexCount: 0, indexCount: 0 };
21978
21978
  let e = s.attributes?.position?.count || 0, t = s.index ? s.index.count : 0;
21979
21979
  const i = We.getMeshLODExtension(s);
21980
21980
  if (i) {
@@ -22623,7 +22623,7 @@ class Eo extends E {
22623
22623
  // #region internals
22624
22624
  /** @internal */
22625
22625
  onEnable() {
22626
- this.context.renderer.domElement.addEventListener("dragover", this.onDrag), this.context.renderer.domElement.addEventListener("drop", this.onDrop), window.addEventListener("paste", this.handlePaste), this.context.connection.beginListen("droplistener", this.onNetworkEvent), I() && this.dropArea && (this.dropArea.getComponentInChildren(ui) || console.warn("[DropListener] The assigned DropArea does not seem to have a renderer/mesh. Drag and Drop events will not be detected."));
22626
+ this.context.renderer.domElement.addEventListener("dragover", this.onDrag), this.context.renderer.domElement.addEventListener("drop", this.onDrop), window.addEventListener("paste", this.handlePaste), this.context.connection.beginListen("droplistener", this.onNetworkEvent), L() && this.dropArea && (this.dropArea.getComponentInChildren(ui) || console.warn("[DropListener] The assigned DropArea does not seem to have a renderer/mesh. Drag and Drop events will not be detected."));
22627
22627
  }
22628
22628
  /** @internal */
22629
22629
  onDisable() {
@@ -22865,7 +22865,7 @@ class Eo extends E {
22865
22865
  testObject: (o) => !this._addedObjects.some((r) => r.contains(o))
22866
22866
  });
22867
22867
  if (!i.length)
22868
- return I() && console.log(`Dropped outside of drop area for DropListener "${this.name}".`), !1;
22868
+ return L() && console.log(`Dropped outside of drop area for DropListener "${this.name}".`), !1;
22869
22869
  const n = i[0];
22870
22870
  return !!(this.dropArea && this.dropArea.contains(n.object));
22871
22871
  }
@@ -22973,7 +22973,7 @@ const Fu = class fw extends E {
22973
22973
  const t = this.handleDuplication();
22974
22974
  if (t) {
22975
22975
  const i = C.getComponent(t, ya);
22976
- i ? (i.onPointerDown(e), this._forwardPointerEvents.set(e.event.space, i)) : I() && console.warn(`Duplicated object (${t.name}) does not have DragControls`);
22976
+ i ? (i.onPointerDown(e), this._forwardPointerEvents.set(e.event.space, i)) : L() && console.warn(`Duplicated object (${t.name}) does not have DragControls`);
22977
22977
  } else
22978
22978
  this._currentCount >= this.limitCount ? console.warn(`[Duplicatable] Limit of ${this.limitCount} objects created within a few seconds reached. Please wait a moment before creating more objects.`) : console.warn("[Duplicatable] Could not duplicate object.");
22979
22979
  }
@@ -23975,12 +23975,12 @@ let aE = class {
23975
23975
  he.report("export-usdz-textures", { message: "read back texture", autoStep: !0 });
23976
23976
  const R = b.scale !== void 0 && b.scale.x !== 1 && b.scale.y !== 1 && b.scale.z !== 1 && b.scale.w !== 1;
23977
23977
  (v.isCompressedTexture || v.isRenderTargetTexture || R) && (O = await cE(v, t.maxTextureSize, p, b.scale)), he.report("export-usdz-textures", { message: "convert texture to canvas", autoStep: !0 });
23978
- const L = await dE(O.imageBitmap || O.imageData, t.maxTextureSize).catch((j) => {
23978
+ const I = await dE(O.imageBitmap || O.imageData, t.maxTextureSize).catch((j) => {
23979
23979
  console.error("Error converting texture to canvas", v, j);
23980
23980
  });
23981
- if (L) {
23981
+ if (I) {
23982
23982
  he.report("export-usdz-textures", { message: "convert canvas to blob", autoStep: !0 });
23983
- const j = await L.convertToBlob({ type: A ? "image/png" : "image/jpeg", quality: 0.95 });
23983
+ const j = await I.convertToBlob({ type: A ? "image/png" : "image/jpeg", quality: 0.95 });
23984
23984
  n[`textures/${w}.${A ? "png" : "jpg"}`] = new Uint8Array(await j.arrayBuffer());
23985
23985
  } else
23986
23986
  console.warn("Can`t export texture: ", v);
@@ -24471,7 +24471,7 @@ function Xs(s, e, t, i, n, o, r = void 0, a = void 0) {
24471
24471
  // MirroredRepeatWrapping
24472
24472
  }, _ = s.repeat.clone(), g = s.offset.clone(), w = s.rotation, b = Math.sin(w), v = Math.cos(w);
24473
24473
  g.y = 1 - g.y - _.y, t ? (_.x === 0 && (_.x = 1e-4), _.y === 0 && (_.y = 1e-4), g.x = g.x / _.x, g.y = g.y / _.y, g.x += b / _.x, g.y += v - 1) : (g.x += b * _.x, g.y += (1 - v) * _.y);
24474
- const A = Uu(n), O = _.x != 1 || _.y != 1 || g.x != 0 || g.y != 0 || w != 0, R = `${Xt}/${A}/${"uvReader_" + f}.outputs:result>`, L = `${Xt}/${A}/Transform2d_${e}.outputs:result>`, j = e !== "normal" && r && (r.r !== 1 || r.g !== 1 || r.b !== 1 || a !== 1) || !1, B = e === "normal", G = n instanceof pt && n.normalScale ? n.normalScale.x * 2 : 2, X = G.toFixed(ke), k = (-1 * (G / 2)).toFixed(ke), W = (1 - G).toFixed(ke);
24474
+ const A = Uu(n), O = _.x != 1 || _.y != 1 || g.x != 0 || g.y != 0 || w != 0, R = `${Xt}/${A}/${"uvReader_" + f}.outputs:result>`, I = `${Xt}/${A}/Transform2d_${e}.outputs:result>`, j = e !== "normal" && r && (r.r !== 1 || r.g !== 1 || r.b !== 1 || a !== 1) || !1, B = e === "normal", G = n instanceof pt && n.normalScale ? n.normalScale.x * 2 : 2, X = G.toFixed(ke), k = (-1 * (G / 2)).toFixed(ke), W = (1 - G).toFixed(ke);
24475
24475
  return `
24476
24476
  ${O ? `def Shader "Transform2d_${e}" (
24477
24477
  sdrMetadata = {
@@ -24492,7 +24492,7 @@ function Xs(s, e, t, i, n, o, r = void 0, a = void 0) {
24492
24492
  uniform token info:id = "UsdUVTexture"
24493
24493
  asset inputs:file = @textures/${c}.${p ? "png" : "jpg"}@
24494
24494
  token inputs:sourceColorSpace = "${s.colorSpace === "srgb" ? "sRGB" : "raw"}"
24495
- float2 inputs:st.connect = ${O ? L : R}
24495
+ float2 inputs:st.connect = ${O ? I : R}
24496
24496
  ${j ? `
24497
24497
  float4 inputs:scale = (${r ? r.r + ", " + r.g + ", " + r.b : "1, 1, 1"}, ${a})
24498
24498
  ` : ""}
@@ -25064,7 +25064,7 @@ class $e {
25064
25064
  console.error("This is a rest clip but you're trying to add tracks to it – this is likely a bug");
25065
25065
  return;
25066
25066
  }
25067
- e.name.endsWith("position") ? this.pos = e : e.name.endsWith("quaternion") ? this.rot = e : e.name.endsWith("scale") ? this.scale = e : (e.name.endsWith("activeSelf") ? console.warn("[USDZ] Animation of enabled/disabled state is not supported for USDZ export and will NOT be exported: " + e.name + " on " + (this.root?.name ?? this.target.name) + ". Animate scale 0/1 instead.") : console.warn("[USDZ] Animation track type not supported for USDZ export and will NOT be exported: " + e.name + " on " + (this.root?.name ?? this.target.name) + ". Only .position, .rotation, .scale are supported."), I() && _e("[USDZ] Some animations can't be exported. See console for details."));
25067
+ e.name.endsWith("position") ? this.pos = e : e.name.endsWith("quaternion") ? this.rot = e : e.name.endsWith("scale") ? this.scale = e : (e.name.endsWith("activeSelf") ? console.warn("[USDZ] Animation of enabled/disabled state is not supported for USDZ export and will NOT be exported: " + e.name + " on " + (this.root?.name ?? this.target.name) + ". Animate scale 0/1 instead.") : console.warn("[USDZ] Animation track type not supported for USDZ export and will NOT be exported: " + e.name + " on " + (this.root?.name ?? this.target.name) + ". Only .position, .rotation, .scale are supported."), L() && _e("[USDZ] Some animations can't be exported. See console for details."));
25068
25068
  }
25069
25069
  getFrames() {
25070
25070
  return this.clip ? Math.max(this.pos?.times?.length ?? 0, this.rot?.times?.length ?? 0, this.scale?.times?.length ?? 0) : 2;
@@ -25451,14 +25451,14 @@ class xE {
25451
25451
  _.push({ bone: k, inverse: k.matrixWorld.clone().invert() });
25452
25452
  const v = _[0].bone.parent;
25453
25453
  v || console.error("No bone parent found for skinned mesh during USDZ export", n.skinnedMesh), _.sort((k, W) => Ta(k.bone, v) > Ta(W.bone, v) ? 1 : -1);
25454
- const A = t.quickLookCompatible, O = [], R = [], L = [], j = [];
25454
+ const A = t.quickLookCompatible, O = [], R = [], I = [], j = [];
25455
25455
  for (const { bone: k } of _) {
25456
25456
  if (A) {
25457
25457
  const W = k.scale;
25458
25458
  W.x == 0 && (W.x = 1e-5), W.y == 0 && (W.y = 1e-5), W.z == 0 && (W.z = 1e-5), O.push(new J().compose(k.position, k.quaternion, k.scale));
25459
25459
  } else
25460
25460
  O.push(k.matrix.clone());
25461
- R.push(k.position), L.push(k.quaternion), j.push(k.scale);
25461
+ R.push(k.position), I.push(k.quaternion), j.push(k.scale);
25462
25462
  }
25463
25463
  const B = _.map((k) => '"' + Ta(k.bone, v) + '"').join(", "), G = _.map((k) => yb(k.inverse.clone().invert())).join(", ");
25464
25464
  e.beginBlock('def Skeleton "Rig"'), e.appendLine(`uniform matrix4d[] bindTransforms = [${G}]`), e.appendLine(`uniform token[] joints = [${B}]`), e.appendLine('uniform token purpose = "guide"'), e.appendLine(`uniform matrix4d[] restTransforms = [${O.map((k) => yb(k)).join(", ")}]`);
@@ -25469,7 +25469,7 @@ class xE {
25469
25469
  k = Math.min(k, q), W = Math.max(W, q);
25470
25470
  console.log("Time samples", k, W, X);
25471
25471
  }
25472
- if (e.beginBlock('def SkelAnimation "_anim"'), e.appendLine(`uniform token[] joints = [${B}]`), e.appendLine(`quatf[] rotations = [${d(L)}]`), X && X.quaternion) {
25472
+ if (e.beginBlock('def SkelAnimation "_anim"'), e.appendLine(`uniform token[] joints = [${B}]`), e.appendLine(`quatf[] rotations = [${d(I)}]`), X && X.quaternion) {
25473
25473
  e.beginBlock("quatf[] rotations.timeSamples = {", "");
25474
25474
  const k = a(X.quaternion);
25475
25475
  for (const W of k)
@@ -25608,7 +25608,7 @@ var CE = Object.defineProperty, Ue = (s, e, t, i) => {
25608
25608
  };
25609
25609
  const xb = x("debugusdzbehaviours");
25610
25610
  function Zc(s) {
25611
- s && (s.getComponentInParent(qa) || (I() && console.debug('Raycaster on "' + s.name + '" was automatically added, because no raycaster was found in the parent hierarchy.'), s.addComponent(Zi)));
25611
+ s && (s.getComponentInParent(qa) || (L() && console.debug('Raycaster on "' + s.name + '" was automatically added, because no raycaster was found in the parent hierarchy.'), s.addComponent(Zi)));
25612
25612
  }
25613
25613
  class ol extends E {
25614
25614
  object;
@@ -25684,7 +25684,7 @@ const zu = class qt extends E {
25684
25684
  variantMaterial;
25685
25685
  fadeDuration = 0;
25686
25686
  start() {
25687
- this._objectsWithThisMaterial = this.objectsWithThisMaterial, Zc(this.gameObject), I() && this._objectsWithThisMaterial.length <= 0 && console.warn('ChangeMaterialOnClick: No objects found with material "' + this.materialToSwitch?.name + '"');
25687
+ this._objectsWithThisMaterial = this.objectsWithThisMaterial, Zc(this.gameObject), L() && this._objectsWithThisMaterial.length <= 0 && console.warn('ChangeMaterialOnClick: No objects found with material "' + this.materialToSwitch?.name + '"');
25688
25688
  }
25689
25689
  onPointerEnter(e) {
25690
25690
  this.context.input.setCursor("pointer");
@@ -26041,7 +26041,7 @@ const qg = class Ln extends E {
26041
26041
  afterSerialize() {
26042
26042
  if (Ln.rootsWithExclusivePlayback.size > 1) {
26043
26043
  const e = 'Multiple root objects targeted by more than one animation. To work around QuickLook bug FB13410767, animations will be set as "exclusive" and activating them will stop other animations being marked as exclusive.';
26044
- I() && _e(e), console.warn(e, ...Ln.rootsWithExclusivePlayback);
26044
+ L() && _e(e), console.warn(e, ...Ln.rootsWithExclusivePlayback);
26045
26045
  }
26046
26046
  Ln.animationActions = [], Ln.rootsWithExclusivePlayback = /* @__PURE__ */ new Set();
26047
26047
  }
@@ -26050,7 +26050,7 @@ const qg = class Ln extends E {
26050
26050
  const i = t.document, n = t.extensions.find((a) => a instanceof Gg);
26051
26051
  if (!n) return;
26052
26052
  const o = n.getClipCount(this.target) > 1;
26053
- o && (I() && console.warn("Setting exclusive playback for " + this.target.name + "@" + this.stateName + " because it has " + n.getClipCount(this.target) + " animations. This works around QuickLook bug FB13410767."), Ln.rootsWithExclusivePlayback.add(this.target));
26053
+ o && (L() && console.warn("Setting exclusive playback for " + this.target.name + "@" + this.stateName + " because it has " + n.getClipCount(this.target) + " animations. This works around QuickLook bug FB13410767."), Ln.rootsWithExclusivePlayback.add(this.target));
26054
26054
  const r = this.name ? this.name : "";
26055
26055
  i.traverse((a) => {
26056
26056
  if (a.uuid === this.target?.uuid) {
@@ -26148,7 +26148,7 @@ const qg = class Ln extends E {
26148
26148
  b.tracks = w.tracks.map((O) => {
26149
26149
  const R = O.clone();
26150
26150
  R.times = new Float32Array([0, A]);
26151
- const L = O.values.length, j = O.getValueSize(), B = O.values.slice(L - j, L);
26151
+ const I = O.values.length, j = O.getValueSize(), B = O.values.slice(I - j, I);
26152
26152
  return R.values = new Float32Array(2 * j), R.values.set(B, 0), R.values.set(B, j), R;
26153
26153
  }), b.name = v, e.holdClipMap.set(w, b);
26154
26154
  }
@@ -26338,7 +26338,7 @@ class xr {
26338
26338
  const e = "https://oculus.com/open_url/?url=", t = document.createElement("button");
26339
26339
  return this._sendToQuestButton = t, t.dataset.needle = "webxr-sendtoquest-button", t.innerText = "Open on Quest", t.prepend(Ft("share_windows")), t.title = "Click to send this page to the Oculus Browser on your Quest", t.addEventListener("click", () => {
26340
26340
  const i = encodeURIComponent(window.location.href), n = e + i;
26341
- window.open(n) == null && Me("This page doesn't allow popups. Please paste " + n + " into your browser.");
26341
+ window.open(n) == null && Ae("This page doesn't allow popups. Please paste " + n + " into your browser.");
26342
26342
  }), this.listenToXRSessionState(t), this.hideElementDuringXRSession(t), D.isMozillaXR() || navigator.xr?.addEventListener("devicechange", () => {
26343
26343
  navigator.xr?.isSessionSupported("immersive-vr") ? t.style.display = "none" : t.style.display = "";
26344
26344
  }), t;
@@ -26356,7 +26356,7 @@ class xr {
26356
26356
  return;
26357
26357
  }
26358
26358
  K.isSessionSupported(t).then((i) => {
26359
- e.style.display = i ? "" : "none", I() && !i && console.log('[WebXR] "' + t + '" is not supported on this device. Make sure your server runs using HTTPS and you have a device connected that supports ' + t);
26359
+ e.style.display = i ? "" : "none", L() && !i && console.log('[WebXR] "' + t + '" is not supported on this device. Make sure your server runs using HTTPS and you have a device connected that supports ' + t);
26360
26360
  });
26361
26361
  }
26362
26362
  }
@@ -26864,7 +26864,7 @@ class gn extends E {
26864
26864
  }
26865
26865
  async onCreateAnchor(e, t) {
26866
26866
  if (t.createAnchor === void 0) {
26867
- console.warn("Hit does not support creating an anchor", t), I() && _e("Hit does not support creating an anchor");
26867
+ console.warn("Hit does not support creating an anchor", t), L() && _e("Hit does not support creating an anchor");
26868
26868
  return;
26869
26869
  } else {
26870
26870
  const i = await t.createAnchor(e.viewerPose.transform);
@@ -27121,10 +27121,10 @@ const Dw = function(s = null) {
27121
27121
  let i = "";
27122
27122
  typeof t == "string" ? i = t : i = t.name;
27123
27123
  let n = null, o;
27124
- typeof s == "string" ? o = e[s] : typeof s == "function" && (o = s), o == null && (I() || co) && s != null && console.warn('syncField: no callback function found for property "' + i + '"', '"' + s + '"');
27124
+ typeof s == "string" ? o = e[s] : typeof s == "function" && (o = s), o == null && (L() || co) && s != null && console.warn('syncField: no callback function found for property "' + i + '"', '"' + s + '"');
27125
27125
  const r = e, a = r.__internalAwake;
27126
27126
  if (typeof a != "function") {
27127
- (co || I()) && console.error('@syncField can currently only used on Needle Engine Components, custom object of type "' + e?.constructor?.name + '" is not supported', e);
27127
+ (co || L()) && console.error('@syncField can currently only used on Needle Engine Components, custom object of type "' + e?.constructor?.name + '" is not supported', e);
27128
27128
  return;
27129
27129
  }
27130
27130
  co && console.log(i);
@@ -27138,7 +27138,7 @@ const Dw = function(s = null) {
27138
27138
  set: function(f) {
27139
27139
  const p = this[l];
27140
27140
  if (this[l] = f, d) {
27141
- (I() || co) && console.warn("Recursive call detected", i);
27141
+ (L() || co) && console.warn("Recursive call detected", i);
27142
27142
  return;
27143
27143
  }
27144
27144
  d = !0;
@@ -27756,7 +27756,7 @@ class tn extends E {
27756
27756
  const n = z(i.x, 0, i.y);
27757
27757
  n.multiplyScalar(this.context.time.deltaTimeUnscaled * this.movementSpeed);
27758
27758
  const o = qe(t);
27759
- n.multiplyScalar(o.x), n.applyQuaternion(e.xr.poseOrientation), n.y = 0, n.applyQuaternion(t.worldQuaternion), I() && Number.isNaN(n.x) && console.error("Stick movement resulted in NaN", { stick: i, vec: n }), t.position.add(n), t.updateWorldMatrix(!1, !1);
27759
+ n.multiplyScalar(o.x), n.applyQuaternion(e.xr.poseOrientation), n.y = 0, n.applyQuaternion(t.worldQuaternion), L() && Number.isNaN(n.x) && console.error("Stick movement resulted in NaN", { stick: i, vec: n }), t.position.add(n), t.updateWorldMatrix(!1, !1);
27760
27760
  for (const r of t.children) r.updateWorldMatrix(!1, !1);
27761
27761
  }
27762
27762
  }
@@ -28103,7 +28103,7 @@ const Ll = x("debugwebxr"), GE = x("debugusdz"), ht = class pa extends E {
28103
28103
  for (const o of this.context.scene.children)
28104
28104
  n.add(o);
28105
28105
  this.context.scene.add(n), i = C.addComponent(n, gn), this._createdComponentsInSession.push(i);
28106
- } else (Ll || I()) && console.warn("WebXR: No WebARSessionRoot found in scene and usePlacementReticle is disabled in WebXR component.");
28106
+ } else (Ll || L()) && console.warn("WebXR: No WebARSessionRoot found in scene and usePlacementReticle is disabled in WebXR component.");
28107
28107
  this._activeWebARSessionRoot = i, i && (i.customReticle = this.customARPlacementReticle, i.arScale = this.arScale, i.arTouchTransform = this.usePlacementAdjustment, i.autoPlace = this.autoPlace, i.autoCenter = this.autoCenter, i.useXRAnchor = this.useXRAnchor);
28108
28108
  }
28109
28109
  this.useDefaultControls && this.setDefaultMovementEnabled(!0), (this.showControllerModels || this.showHandModels) && this.setDefaultControllerRenderingEnabled(!0), this.useSpatialGrab && (this._spatialGrabRaycaster = C.findObjectOfType(Xa) ?? void 0, this._spatialGrabRaycaster || (this._spatialGrabRaycaster = this.gameObject.addComponent(Xa))), this.createLocalAvatar(e.xr), e.xr.isScreenBasedAR || (this._exitXRMenuButton = this.context.menu.appendChild({
@@ -28210,7 +28210,7 @@ const Ll = x("debugwebxr"), GE = x("debugusdz"), ht = class pa extends E {
28210
28210
  }), this.createQRCode) {
28211
28211
  const e = Gc(Ns);
28212
28212
  if (e && e.createQRCodeButton === !1)
28213
- I() && console.warn("WebXR: QRCode button is disabled in the Needle Menu component");
28213
+ L() && console.warn("WebXR: QRCode button is disabled in the Needle Menu component");
28214
28214
  else if (!D.isMobileDevice()) {
28215
28215
  const t = mn.getOrCreate().createQRCode();
28216
28216
  this.addButton(t);
@@ -29540,21 +29540,21 @@ class Io extends Ai {
29540
29540
  let g = 0;
29541
29541
  a ? g += this.padding.left : g += this.padding.top;
29542
29542
  let w = 0, b = 0;
29543
- for (let L = 0; L < this.gameObject.children.length; L++) {
29544
- const j = this.gameObject.children[L], B = C.getComponent(j, es);
29543
+ for (let I = 0; I < this.gameObject.children.length; I++) {
29544
+ const j = this.gameObject.children[I], B = C.getComponent(j, es);
29545
29545
  B?.activeAndEnabled && (b += 1, a ? w += B.width : w += B.height);
29546
29546
  }
29547
29547
  let v = 0;
29548
29548
  const A = this.spacing * (b - 1);
29549
29549
  if (d || c) {
29550
- let L = 0;
29551
- a ? L = n -= A : L = r -= A, b > 0 && (v = L / b);
29550
+ let I = 0;
29551
+ a ? I = n -= A : I = r -= A, b > 0 && (v = I / b);
29552
29552
  }
29553
29553
  let O = 0;
29554
29554
  O += this.padding.left, O -= this.padding.right, _ !== 0 && (g = m - w, g *= _, g -= A * _, a ? (g -= this.padding.right * _, g += this.padding.left * (1 - _), g < this.padding.left && (g = this.padding.left)) : (g -= this.padding.bottom * _, g += this.padding.top * (1 - _), g < this.padding.top && (g = this.padding.top)));
29555
29555
  let R = 1;
29556
- for (let L = 0; L < this.gameObject.children.length; L++) {
29557
- const j = this.gameObject.children[L], B = C.getComponent(j, es);
29556
+ for (let I = 0; I < this.gameObject.children.length; I++) {
29557
+ const j = this.gameObject.children[I], B = C.getComponent(j, es);
29558
29558
  if (B?.activeAndEnabled) {
29559
29559
  B.pivot?.set(0.5, 0.5), B.anchorMin.set(0, 1), B.anchorMax.set(0, 1);
29560
29560
  const G = i * 0.5 + O * 0.5;
@@ -29929,10 +29929,10 @@ class Yw {
29929
29929
  if (m instanceof H && !w) {
29930
29930
  const O = m.geometry.clone();
29931
29931
  O.scale(1, 1, -1), this.flipWindingOrder(O), _.geometry = O;
29932
- const R = new re(), L = m.material.opacity;
29932
+ const R = new re(), I = m.material.opacity;
29933
29933
  R.copy(m.material.color), _.material = new we({
29934
29934
  color: R,
29935
- opacity: L * b,
29935
+ opacity: I * b,
29936
29936
  map: m.material.map,
29937
29937
  transparent: !0
29938
29938
  });
@@ -30103,11 +30103,11 @@ const mi = class or extends E {
30103
30103
  /** @internal */
30104
30104
  onEnable() {
30105
30105
  const e = D.supportsQuickLookAR(), t = D.isiOS() || D.isiPad();
30106
- !this.button && (St || e || t) && (this.allowCreateQuicklookButton && (this.button = this.createQuicklookButton()), this.lastCallback = this.quicklookCallback.bind(this), this.link = Ob(this.context, e), this.link.addEventListener("message", this.lastCallback)), St && Me("USDZ Exporter enabled: " + this.name), document.getElementById("open-in-ar")?.addEventListener("click", this.onClickedOpenInARElement), Tc.registerExporter(this);
30106
+ !this.button && (St || e || t) && (this.allowCreateQuicklookButton && (this.button = this.createQuicklookButton()), this.lastCallback = this.quicklookCallback.bind(this), this.link = Ob(this.context, e), this.link.addEventListener("message", this.lastCallback)), St && Ae("USDZ Exporter enabled: " + this.name), document.getElementById("open-in-ar")?.addEventListener("click", this.onClickedOpenInARElement), Tc.registerExporter(this);
30107
30107
  }
30108
30108
  /** @internal */
30109
30109
  onDisable() {
30110
- this.button?.remove(), this.link?.removeEventListener("message", this.lastCallback), St && Me("USDZ Exporter disabled: " + this.name), document.getElementById("open-in-ar")?.removeEventListener("click", this.onClickedOpenInARElement), Tc.unregisterExporter(this);
30110
+ this.button?.remove(), this.link?.removeEventListener("message", this.lastCallback), St && Ae("USDZ Exporter disabled: " + this.name), document.getElementById("open-in-ar")?.removeEventListener("click", this.onClickedOpenInARElement), Tc.unregisterExporter(this);
30111
30111
  }
30112
30112
  onClickedOpenInARElement = (e) => {
30113
30113
  e.preventDefault(), this.exportAndOpen();
@@ -30165,14 +30165,14 @@ const mi = class or extends E {
30165
30165
  for (const O of i) {
30166
30166
  for (const R of O.sharedMeshes)
30167
30167
  if (R) {
30168
- let L = 0;
30168
+ let I = 0;
30169
30169
  const j = { exporter: this, type: "mesh", object: O.gameObject, mesh: R };
30170
30170
  if (or.beforeLODExport.invoke(j), j.overrideLevel !== void 0)
30171
30171
  if (j.overrideLevel === -1) {
30172
30172
  St && console.warn("Skipping LOD export for mesh due to overrideLevel -1", O.gameObject, R);
30173
30173
  continue;
30174
- } else j.overrideLevel >= 0 && (L = j.overrideLevel, St && console.log("Overriding LOD level for mesh export to level " + L + " " + R.name));
30175
- const B = We.assignMeshLOD(R, L);
30174
+ } else j.overrideLevel >= 0 && (I = j.overrideLevel, St && console.log("Overriding LOD level for mesh export to level " + I + " " + R.name));
30175
+ const B = We.assignMeshLOD(R, I);
30176
30176
  B instanceof Promise && n.push(new Promise((G, X) => {
30177
30177
  B.then(() => {
30178
30178
  o++, he.report("export-usdz-textures", { message: "Loaded progressive mesh", currentStep: o, totalSteps: n.length }), G();
@@ -30181,14 +30181,14 @@ const mi = class or extends E {
30181
30181
  }
30182
30182
  for (const R of O.sharedMaterials)
30183
30183
  if (R) {
30184
- let L = 0;
30184
+ let I = 0;
30185
30185
  const j = { exporter: this, type: "texture", object: O.gameObject, material: R };
30186
30186
  if (or.beforeLODExport.invoke(j), j.overrideLevel !== void 0)
30187
30187
  if (j.overrideLevel === -1) {
30188
30188
  St && console.warn("Skipping LOD assignment due to overrideLevel -1", O.gameObject, R);
30189
30189
  continue;
30190
- } else j.overrideLevel >= 0 && (L = j.overrideLevel, St && console.log("Overriding LOD level for texture export to level " + L + " " + R.name));
30191
- const B = We.assignTextureLOD(R, L);
30190
+ } else j.overrideLevel >= 0 && (I = j.overrideLevel, St && console.log("Overriding LOD level for texture export to level " + I + " " + R.name));
30191
+ const B = We.assignTextureLOD(R, I);
30192
30192
  B instanceof Promise && n.push(new Promise((G, X) => {
30193
30193
  B.then(() => {
30194
30194
  o++, he.report("export-usdz-textures", { message: "Loaded progressive texture", currentStep: o, totalSteps: n.length }), G();
@@ -30196,13 +30196,13 @@ const mi = class or extends E {
30196
30196
  }));
30197
30197
  }
30198
30198
  }
30199
- St && Me("Progressive Loading: " + n.length), await Promise.all(n), St && Me("Progressive Loading: done"), he.end("export-usdz-textures");
30199
+ St && Ae("Progressive Loading: " + n.length), await Promise.all(n), St && Ae("Progressive Loading: done"), he.end("export-usdz-textures");
30200
30200
  const r = li.Global.Mask;
30201
30201
  li.Global.Set(ws.AR);
30202
30202
  const a = new aE(), l = new Gg(this.quickLookCompatible);
30203
30203
  let c;
30204
30204
  const h = [];
30205
- this.interactive && (h.push(new Fw()), h.push(new sl()), globalThis.NEEDLE_USE_RAPIER && C.getComponentsInChildren(e, Ze).length > 0 && (this.physics ? (c = new Uw(), h.push(c)) : I() && console.warn("USDZExporter: Physics export is disabled, but there are active Rigidbody components in the scene. They will not be exported.")), h.push(new ey()), h.push(new Yw()));
30205
+ this.interactive && (h.push(new Fw()), h.push(new sl()), globalThis.NEEDLE_USE_RAPIER && C.getComponentsInChildren(e, Ze).length > 0 && (this.physics ? (c = new Uw(), h.push(c)) : L() && console.warn("USDZExporter: Physics export is disabled, but there are active Rigidbody components in the scene. They will not be exported.")), h.push(new ey()), h.push(new Yw()));
30206
30206
  const d = [l, ...h, ...this.extensions], f = { self: this, exporter: a, extensions: d, object: e };
30207
30207
  he.report("export-usdz", "Invoking before-export"), this.dispatchEvent(new CustomEvent("before-export", { detail: f })), this.applyWebARSessionRoot(), this._previousTimeScale = this.context.time.timeScale, this.context.time.timeScale = 0, he.report("export-usdz", "auto export animations and audio sources");
30208
30208
  const p = new Array();
@@ -30210,14 +30210,14 @@ const mi = class or extends E {
30210
30210
  const _ = Qa.instance.objs.map((O) => O.batchedMesh);
30211
30211
  a.keepObject = (O) => {
30212
30212
  let R = !0;
30213
- const L = C.getComponent(O, ui);
30214
- return L && !L.enabled && (R = !1), R && _.includes(O) && (R = !1), R && C.getComponentInParent(O, Du) && (R = !1), R && C.getComponentInParent(O, Fs) && (R = !1), St && !R && console.log("USDZExporter: Discarding object", O), R;
30213
+ const I = C.getComponent(O, ui);
30214
+ return I && !I.enabled && (R = !1), R && _.includes(O) && (R = !1), R && C.getComponentInParent(O, Du) && (R = !1), R && C.getComponentInParent(O, Fs) && (R = !1), St && !R && console.log("USDZExporter: Discarding object", O), R;
30215
30215
  }, a.beforeWritingDocument = () => {
30216
- if (I() && l && c) {
30216
+ if (L() && l && c) {
30217
30217
  const O = l.animatedRoots;
30218
30218
  for (const R of O) {
30219
- const L = C.getComponentsInChildren(R, Ze).filter((B) => B.enabled), j = C.getComponents(R, Pn).filter((B) => B.enabled && !B.isTrigger);
30220
- (L.length > 0 || j.length > 0) && console.error("An animated object has physics components in its child hierarchy. This can lead to undefined behaviour due to a bug in Apple's QuickLook (FB15925487). Remove the physics components from child objects or verify that you get the expected results.", R);
30219
+ const I = C.getComponentsInChildren(R, Ze).filter((B) => B.enabled), j = C.getComponents(R, Pn).filter((B) => B.enabled && !B.isTrigger);
30220
+ (I.length > 0 || j.length > 0) && console.error("An animated object has physics components in its child hierarchy. This can lead to undefined behaviour due to a bug in Apple's QuickLook (FB15925487). Remove the physics components from child objects or verify that you get the expected results.", R);
30221
30221
  }
30222
30222
  }
30223
30223
  };
@@ -30279,7 +30279,7 @@ const mi = class or extends E {
30279
30279
  const i = new URLSearchParams(this.link.href);
30280
30280
  if (i) {
30281
30281
  const n = i.get("callToActionURL");
30282
- St && Me("Quicklook url: " + n), n && (ks() ? globalThis.open(n, "_blank") : console.warn("Quicklook closed: custom redirects require a Needle Engine Pro license: https://needle.tools/pricing", n));
30282
+ St && Ae("Quicklook url: " + n), n && (ks() ? globalThis.open(n, "_blank") : console.warn("Quicklook closed: custom redirects require a Needle Engine Pro license: https://needle.tools/pricing", n));
30283
30283
  }
30284
30284
  }
30285
30285
  }
@@ -31690,7 +31690,7 @@ const tt = class sc {
31690
31690
  }
31691
31691
  break;
31692
31692
  default:
31693
- this._vector.set(0, 0, 0), I() && !globalThis.__particlesystem_shapetype_unsupported && (console.warn("ParticleSystem ShapeType is not supported:", Rm[this.shapeType]), globalThis.__particlesystem_shapetype_unsupported = !0);
31693
+ this._vector.set(0, 0, 0), L() && !globalThis.__particlesystem_shapetype_unsupported && (console.warn("ParticleSystem ShapeType is not supported:", Rm[this.shapeType]), globalThis.__particlesystem_shapetype_unsupported = !0);
31694
31694
  break;
31695
31695
  }
31696
31696
  this.randomizePosition(this._vector, this.randomPositionAmount);
@@ -32103,7 +32103,7 @@ class Xe {
32103
32103
  if (!this.enabled) return;
32104
32104
  const l = r / a, c = this.speedModifier.evaluate(l) * this.speedModifierMultiplier, h = this.x.evaluate(l), d = this.y.evaluate(l), f = this.z.evaluate(l);
32105
32105
  if (this._temp.set(-h, d, f), this._system && this._system.main.simulationSpace === 1 && this._temp.applyQuaternion(this._system.worldQuaternion), this._hasOrbital && this._system?.worldPos) {
32106
- const m = this._temp2.set(i.x, i.y, i.z), _ = this.orbitalXMultiplier, g = this.orbitalYMultiplier, w = this.orbitalZMultiplier, b = c * Math.PI * 2 * 10, v = Math.cos(b * _), A = Math.sin(b * _), O = Math.cos(b * g), R = Math.sin(b * g), L = Math.cos(b * w), j = Math.sin(b * w), B = m.x * (O * L) + m.y * (O * j) + m.z * -R, G = m.x * (A * R * L - v * j) + m.y * (A * R * j + v * L) + m.z * (A * O), X = m.x * (v * R * L + A * j) + m.y * (v * R * j - A * L) + m.z * (v * O), k = this._temp3.set(m.x - B, m.y - G, m.z - X);
32106
+ const m = this._temp2.set(i.x, i.y, i.z), _ = this.orbitalXMultiplier, g = this.orbitalYMultiplier, w = this.orbitalZMultiplier, b = c * Math.PI * 2 * 10, v = Math.cos(b * _), A = Math.sin(b * _), O = Math.cos(b * g), R = Math.sin(b * g), I = Math.cos(b * w), j = Math.sin(b * w), B = m.x * (O * I) + m.y * (O * j) + m.z * -R, G = m.x * (A * R * I - v * j) + m.y * (A * R * j + v * I) + m.z * (A * O), X = m.x * (v * R * I + A * j) + m.y * (v * R * j - A * I) + m.z * (v * O), k = this._temp3.set(m.x - B, m.y - G, m.z - X);
32107
32107
  k.normalize(), k.multiplyScalar(0.2 / o * Math.max(this.orbitalXMultiplier, this.orbitalYMultiplier, this.orbitalZMultiplier)), n.x += k.x, n.y += k.y, n.z += k.z;
32108
32108
  }
32109
32109
  n.x += this._temp.x, n.y += this._temp.y, n.z += this._temp.z, n.x *= c, n.y *= c, n.z *= c;
@@ -32616,7 +32616,7 @@ class kn extends E {
32616
32616
  cameraVelocityScale;
32617
32617
  lengthScale;
32618
32618
  start() {
32619
- if (this.maxParticleSize !== 0.5 && this.minParticleSize !== 0 && I()) {
32619
+ if (this.maxParticleSize !== 0.5 && this.minParticleSize !== 0 && L()) {
32620
32620
  const e = `ParticleSystem "${this.name}" has non-default min/max particle size. This may not render correctly. Please set min size to 0 and the max size to 0.5 and use the "StartSize" setting instead`;
32621
32621
  console.warn(e);
32622
32622
  }
@@ -33158,7 +33158,7 @@ const Vt = class vd extends E {
33158
33158
  if (!this._particleSystem)
33159
33159
  return !1;
33160
33160
  const t = this._particleSystem.behaviors, i = t.indexOf(e);
33161
- return i !== -1 && ((I() || ro) && console.debug("Remove custom ParticleSystem Behaviour", i, e), t.splice(i, 1)), !0;
33161
+ return i !== -1 && ((L() || ro) && console.debug("Remove custom ParticleSystem Behaviour", i, e), t.splice(i, 1)), !0;
33162
33162
  }
33163
33163
  /** Removes all behaviours from the particle system
33164
33164
  * **Note:** this will also remove the default behaviours like SizeBehaviour, ColorBehaviour etc.
@@ -33295,7 +33295,7 @@ const Vt = class vd extends E {
33295
33295
  addSubParticleSystems() {
33296
33296
  if (this._subEmitterSystems && this._particleSystem)
33297
33297
  for (const e of this._subEmitterSystems) {
33298
- e.particleSystem && (e.particleSystem.__internalAwake ? e.particleSystem.__internalAwake() : I() && console.warn("SubParticleSystem serialization issue(?)", e.particleSystem, e));
33298
+ e.particleSystem && (e.particleSystem.__internalAwake ? e.particleSystem.__internalAwake() : L() && console.warn("SubParticleSystem serialization issue(?)", e.particleSystem, e));
33299
33299
  const t = e.particleSystem?._particleSystem;
33300
33300
  if (t) {
33301
33301
  e.particleSystem._isUsedAsSubsystem = !0;
@@ -33373,7 +33373,7 @@ function ox(s, e) {
33373
33373
  if (!s.unsupported_scaling_mode) {
33374
33374
  s.unsupported_scaling_mode = !0;
33375
33375
  const t = "ParticleSystem scale mode " + Em[s.main.scalingMode] + " is not supported";
33376
- I() && _e(t), console.warn(t, s.name, s);
33376
+ L() && _e(t), console.warn(t, s.name, s);
33377
33377
  }
33378
33378
  e = qe(s.gameObject, e);
33379
33379
  break;
@@ -33478,7 +33478,7 @@ function QT(s) {
33478
33478
  const t = s.scene;
33479
33479
  e = Gn(t, Dm);
33480
33480
  } else
33481
- I() && console.warn("No post processing manager found");
33481
+ L() && console.warn("No post processing manager found");
33482
33482
  return e;
33483
33483
  }
33484
33484
  const ut = {
@@ -34710,7 +34710,7 @@ class uh extends E {
34710
34710
  /** @internal */
34711
34711
  awake() {
34712
34712
  tr && (console.log("PostprocessingManager Awake", this), console.log("Press P to toggle post processing"), window.addEventListener("keydown", (e) => {
34713
- e.key === "p" && (this.enabled = !this.enabled, Me("Toggle PostProcessing " + this.name + ": Enabled=" + this.enabled), this.markDirty());
34713
+ e.key === "p" && (this.enabled = !this.enabled, Ae("Toggle PostProcessing " + this.name + ": Enabled=" + this.enabled), this.markDirty());
34714
34714
  })), this.sharedProfile?.__init(this);
34715
34715
  }
34716
34716
  _componentEnabledTime = -1;
@@ -34729,7 +34729,7 @@ class uh extends E {
34729
34729
  if (!this.context.isInXR && (this.context.mainCamera && this._isDirty && this.apply(), this.context.composer && this._postprocessing && this._postprocessing.composer === this.context.composer)) {
34730
34730
  if (this.context.renderer.getContext().isContextLost() && this.context.renderer.forceContextRestore(), this.context.composer.getRenderer() !== this.context.renderer && this.context.composer.setRenderer(this.context.renderer), this.context.composer.setMainScene(this.context.scene), this.multisampling === "auto")
34731
34731
  if (this._postprocessing && this._postprocessing.hasSmaaEffect)
34732
- this._postprocessing.multisampling !== 0 && (this._postprocessing.multisampling = 0, (tr || I()) && console.log(`[PostProcessing] multisampling is disabled because it's set to 'auto' on your PostprocessingManager/Volume component that also has an SMAA effect.
34732
+ this._postprocessing.multisampling !== 0 && (this._postprocessing.multisampling = 0, (tr || L()) && console.log(`[PostProcessing] multisampling is disabled because it's set to 'auto' on your PostprocessingManager/Volume component that also has an SMAA effect.
34733
34733
 
34734
34734
  If you need multisampling consider changing 'auto' to a fixed value (e.g. 4).`));
34735
34735
  else {
@@ -34769,7 +34769,7 @@ If you need multisampling consider changing 'auto' to a fixed value (e.g. 4).`))
34769
34769
  _rapidApplyCount = 0;
34770
34770
  _isDirty = !1;
34771
34771
  apply() {
34772
- if (tr && console.log(`Apply PostProcessing "${this.name || "unnamed"}"`), I() && (this._lastApplyTime !== void 0 && Date.now() - this._lastApplyTime < 100 && (this._rapidApplyCount++, this._rapidApplyCount === 5 && console.warn("Detected rapid post processing modifications - this might be a bug", this)), this._lastApplyTime = Date.now()), this._isDirty = !1, this._activeEffects.length = 0, this.sharedProfile?.components) {
34772
+ if (tr && console.log(`Apply PostProcessing "${this.name || "unnamed"}"`), L() && (this._lastApplyTime !== void 0 && Date.now() - this._lastApplyTime < 100 && (this._rapidApplyCount++, this._rapidApplyCount === 5 && console.warn("Detected rapid post processing modifications - this might be a bug", this)), this._lastApplyTime = Date.now()), this._isDirty = !1, this._activeEffects.length = 0, this.sharedProfile?.components) {
34773
34773
  const e = this.sharedProfile.components;
34774
34774
  for (const t of e)
34775
34775
  t.active && t.enabled && !this._activeEffects.includes(t) && this._activeEffects.push(t);
@@ -35549,7 +35549,7 @@ class yt extends E {
35549
35549
  return this.clip;
35550
35550
  }
35551
35551
  set audioOutputMode(e) {
35552
- e !== this._audioOutputMode && (e === 1 && I() && console.warn("VideoAudioOutputMode.AudioSource is not yet implemented"), this._audioOutputMode = e, this.updateVideoElementSettings());
35552
+ e !== this._audioOutputMode && (e === 1 && L() && console.warn("VideoAudioOutputMode.AudioSource is not yet implemented"), this._audioOutputMode = e, this.updateVideoElementSettings());
35553
35553
  }
35554
35554
  get audioOutputMode() {
35555
35555
  return this._audioOutputMode;
@@ -36121,7 +36121,7 @@ class qr extends E {
36121
36121
  }
36122
36122
  async internalShare(e) {
36123
36123
  if (this.context.connection.isInRoom === !1) {
36124
- console.warn("Can not start screensharing: requires network connection"), I() && _e("Can not start screensharing: requires network connection. Add a SyncedRoom component or join a room first.");
36124
+ console.warn("Can not start screensharing: requires network connection"), L() && _e("Can not start screensharing: requires network connection. Add a SyncedRoom component or join a room first.");
36125
36125
  return;
36126
36126
  }
36127
36127
  if (e?.device && (this.device = e.device), !this.videoPlayer && this.requiresVideoPlayer && (this._videoPlayer || (this._videoPlayer = C.getComponent(this.gameObject, yt) ?? void 0), this.videoPlayer || this._ensureVideoPlayer(), !this.videoPlayer)) {
@@ -36269,7 +36269,7 @@ class qr extends E {
36269
36269
  } else
36270
36270
  console.error("Failed to get user media", r.message, r.code, r);
36271
36271
  }
36272
- !n && I() && (_e("No camera found for sharing. Please connect a camera (see console for more information)"), console.warn("No camera found for sharing. Please connect a camera", i, this.deviceName, "Using deviceFilter? " + this.deviceFilter != null, "Using options? " + t != null, "Using deviceName? " + this.deviceName != null, "Using options.deviceId? " + t?.deviceId != null, "Using options.deviceFilter? " + t?.deviceFilter != null));
36272
+ !n && L() && (_e("No camera found for sharing. Please connect a camera (see console for more information)"), console.warn("No camera found for sharing. Please connect a camera", i, this.deviceName, "Using deviceFilter? " + this.deviceFilter != null, "Using options? " + t != null, "Using deviceName? " + this.deviceName != null, "Using options.deviceId? " + t?.deviceId != null, "Using options.deviceFilter? " + t?.deviceFilter != null));
36273
36273
  }
36274
36274
  // private _cameraSelectionWindow : Window | null = null;
36275
36275
  // private openWindowToSelectCamera(){
@@ -36754,7 +36754,7 @@ let gy = Ar;
36754
36754
  function QA(s, e, t) {
36755
36755
  if (s == null) return null;
36756
36756
  const i = e && !t, n = Bb[s.toLowerCase()];
36757
- return n ? i ? n.url_low : n.url : (typeof s == "string" && s?.length && (I() || Kt) && !s.startsWith("http") && !s.startsWith("file:") && !s.startsWith("blob:") && !s.startsWith("data:") && console.warn(`RemoteSkybox: Unknown magic skybox name "${s}". Valid names are: ${Object.keys(Bb).map((r) => `"${r}"`).join(", ")}`), s);
36757
+ return n ? i ? n.url_low : n.url : (typeof s == "string" && s?.length && (L() || Kt) && !s.startsWith("http") && !s.startsWith("file:") && !s.startsWith("blob:") && !s.startsWith("data:") && console.warn(`RemoteSkybox: Unknown magic skybox name "${s}". Valid names are: ${Object.keys(Bb).map((r) => `"${r}"`).join(", ")}`), s);
36758
36758
  }
36759
36759
  var YA = Object.defineProperty, cf = (s, e, t, i) => {
36760
36760
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
@@ -37727,7 +37727,7 @@ const vx = class Fm extends E {
37727
37727
  for (const n in this.remoteCams) {
37728
37728
  const o = this.remoteCams[n], r = this.context.time.realtimeSinceStartup - o.lastUpdate;
37729
37729
  if (!o || r > this._camTimeoutInSeconds) {
37730
- I() && console.log("Remote cam timeout", n), o?.obj && C.destroy(o.obj), delete this.remoteCams[n], o && delete this.userToCamMap[o.userId], Fm.instances.push(o), this.context.players.removePlayerView(o.userId, _o.Browser);
37730
+ L() && console.log("Remote cam timeout", n), o?.obj && C.destroy(o.obj), delete this.remoteCams[n], o && delete this.userToCamMap[o.userId], Fm.instances.push(o), this.context.players.removePlayerView(o.userId, _o.Browser);
37731
37731
  continue;
37732
37732
  }
37733
37733
  }
@@ -37842,7 +37842,7 @@ class as extends E {
37842
37842
  return this.tryJoinRoom(e + 1);
37843
37843
  } else
37844
37844
  this.joinRandomRoom && (this.roomName === null || this.roomName === void 0 || this.roomName.length <= 0) && (this.roomName = this.generateRoomName());
37845
- return this.requireRoomParameter && !t ? ((Ep || I()) && console.warn('[SyncedRoom] Missing required room parameter "' + this.urlParameterName + `" in url - will not connect.
37845
+ return this.requireRoomParameter && !t ? ((Ep || L()) && console.warn('[SyncedRoom] Missing required room parameter "' + this.urlParameterName + `" in url - will not connect.
37846
37846
  To allow joining a room without a query parameter you can set "requireRoomParameter" to false.`), !1) : (this.context.connection.isConnected || this.context.connection.connect(), this._lastJoinedRoom = this.roomName, this._roomPrefix && (this.roomName = this._roomPrefix + this.roomName), this.roomName.length <= 0 ? (console.warn(`[SyncedRoom] Room name is not set so we can not join a networked room.
37847
37847
  Please choose one of the following options to fix this:
37848
37848
  A) Set a room name in the SyncedRoom component
@@ -37854,7 +37854,7 @@ C) Set "joinRandomRoom" to true`), !1) : (Ep && console.log("Join " + this.roomN
37854
37854
  _userWantsToBeInARoom = !1;
37855
37855
  /** @internal */
37856
37856
  update() {
37857
- this.context.connection.isConnected && (this.context.time.time - this._lastPingTime > 3 && (this._lastPingTime = this.context.time.time, this.context.connection.sendPing()), this.context.connection.isInRoom && (this._lastRoomTime = this.context.time.time)), this._lastRoomTime > 0 && this.context.time.time - this._lastRoomTime > 0.3 && (this._lastRoomTime = -1, this.autoRejoin ? this._userWantsToBeInARoom && (console.log("Disconnected from networking backend - attempt reconnecting now"), this.tryJoinRoom()) : I() && console.warn("You are not connected to a room anymore (possibly because the tab was inactive for too long and the server kicked you?)"));
37857
+ this.context.connection.isConnected && (this.context.time.time - this._lastPingTime > 3 && (this._lastPingTime = this.context.time.time, this.context.connection.sendPing()), this.context.connection.isInRoom && (this._lastRoomTime = this.context.time.time)), this._lastRoomTime > 0 && this.context.time.time - this._lastRoomTime > 0.3 && (this._lastRoomTime = -1, this.autoRejoin ? this._userWantsToBeInARoom && (console.log("Disconnected from networking backend - attempt reconnecting now"), this.tryJoinRoom()) : L() && console.warn("You are not connected to a room anymore (possibly because the tab was inactive for too long and the server kicked you?)"));
37858
37858
  }
37859
37859
  /**
37860
37860
  * Get the URL to view the current room in view only mode.
@@ -37915,7 +37915,7 @@ C) Set "joinRandomRoom" to true`), !1) : (Ep && console.log("Join " + this.roomN
37915
37915
  const t = this.getViewOnlyUrl();
37916
37916
  t?.length ? navigator.canShare({ url: t }) ? navigator.share({ url: t })?.catch((i) => {
37917
37917
  console.warn(i);
37918
- }) : (navigator.clipboard.writeText(t), Me("View only URL copied to clipboard")) : _e("Could not create view only URL");
37918
+ }) : (navigator.clipboard.writeText(t), Ae("View only URL copied to clipboard")) : _e("Could not create view only URL");
37919
37919
  }, e.title = "Copy the view only URL: A page accessed by the view only URL can not be modified by visiting users.", e.textContent = "Share View URL", e.prepend(Ft("visibility"));
37920
37920
  }
37921
37921
  this.context.menu.appendChild(this._viewOnlyButton);
@@ -38349,7 +38349,7 @@ class nu extends yh {
38349
38349
  l.reversed === !0 ? c.time = c.getClip().duration - v : c.time = v, c.timeScale = 0;
38350
38350
  const R = Math.max(0, w);
38351
38351
  if (c.weight = R, r += R, c.clampWhenFinished = !1, c.isRunning() || c.play(), this._useclipOffsets) {
38352
- const L = t == 0 ? this._totalOffsetPosition : this._totalOffsetPosition2, j = t == 0 ? this._totalOffsetRotation : this._totalOffsetRotation2;
38352
+ const I = t == 0 ? this._totalOffsetPosition : this._totalOffsetPosition2, j = t == 0 ? this._totalOffsetRotation : this._totalOffsetRotation2;
38353
38353
  t < 1 && (i = 1 - w), t += 1;
38354
38354
  const B = this._summedPos.set(0, 0, 0), G = this._tempPos.set(0, 0, 0), X = this._summedRot.identity(), k = this._tempRot.identity(), W = h.rotation;
38355
38355
  W && (this._clipRotQuat.identity(), this._clipRotQuat.slerp(W, w));
@@ -38357,11 +38357,11 @@ class nu extends yh {
38357
38357
  if (q.hasOffsets)
38358
38358
  for (let se = 0; se < A; se++)
38359
38359
  q.rootPositionOffset ? G.copy(q.rootPositionOffset) : G.set(0, 0, 0), G.applyQuaternion(X), this._clipRotQuat && G.applyQuaternion(this._clipRotQuat), q.rootQuaternionOffset && (k.copy(q.rootQuaternionOffset), X.multiply(k)), B.add(G);
38360
- this._clipRotQuat && j.multiply(this._clipRotQuat), j.multiply(X), h.position && B.add(h.position), L.add(B);
38360
+ this._clipRotQuat && j.multiply(this._clipRotQuat), j.multiply(X), h.position && B.add(h.position), I.add(B);
38361
38361
  }
38362
38362
  }
38363
38363
  }
38364
- if (this._useclipOffsets && (this._totalOffsetPosition.lerp(this._totalOffsetPosition2, i), this._totalOffsetRotation.slerp(this._totalOffsetRotation2, i)), this.__mixerError === void 0 && (Vn || I()) && this._animator?.runtimeAnimatorController?.mixer && this.mixer !== this._animator?.runtimeAnimatorController?.mixer && (this.__mixerError = !0, console.error("AnimationTrack mixer is not shared with the animator controller - this might result in the timeline to not animate properly. Please report a bug to the Needle Engine team!", this)), this._animator?.runtimeAnimatorController) {
38364
+ if (this._useclipOffsets && (this._totalOffsetPosition.lerp(this._totalOffsetPosition2, i), this._totalOffsetRotation.slerp(this._totalOffsetRotation2, i)), this.__mixerError === void 0 && (Vn || L()) && this._animator?.runtimeAnimatorController?.mixer && this.mixer !== this._animator?.runtimeAnimatorController?.mixer && (this.__mixerError = !0, console.error("AnimationTrack mixer is not shared with the animator controller - this might result in the timeline to not animate properly. Please report a bug to the Needle Engine team!", this)), this._animator?.runtimeAnimatorController) {
38365
38365
  const a = Math.max(0, 1 - r);
38366
38366
  this._animator?.runtimeAnimatorController?.update(a);
38367
38367
  } else
@@ -38685,7 +38685,7 @@ const dn = x("debugtimeline"), Sy = class Um extends E {
38685
38685
  _speed = 1;
38686
38686
  /** @internal */
38687
38687
  awake() {
38688
- dn && console.log(`[Timeline] Awake '${this.name}'`, this), this.rebuildGraph(), !this.isValid() && (dn || I()) && (dn ? console.warn("PlayableDirector is not valid", "Asset?", this.playableAsset, "Tracks:", this.playableAsset?.tracks, "IsArray?", Array.isArray(this.playableAsset?.tracks), this) : this.playableAsset?.tracks?.length ? console.warn("PlayableDirector is not valid") : console.warn("PlayableDirector has no tracks"));
38688
+ dn && console.log(`[Timeline] Awake '${this.name}'`, this), this.rebuildGraph(), !this.isValid() && (dn || L()) && (dn ? console.warn("PlayableDirector is not valid", "Asset?", this.playableAsset, "Tracks:", this.playableAsset?.tracks, "IsArray?", Array.isArray(this.playableAsset?.tracks), this) : this.playableAsset?.tracks?.length ? console.warn("PlayableDirector is not valid") : console.warn("PlayableDirector has no tracks"));
38689
38689
  }
38690
38690
  /** @internal */
38691
38691
  onEnable() {
@@ -39329,7 +39329,7 @@ class $o extends E {
39329
39329
  ir && console.warn("Button Up", this.animationTriggers?.highlightedTrigger, this.animator, this._isHovered), this.interactable && (this.transition == 3 && this.animationTriggers && this.animator ? this.animator.setTrigger(this._isHovered ? this.animationTriggers.highlightedTrigger : this.animationTriggers.normalTrigger) : this.transition === 1 && this.colors && this._image?.setState(this._isHovered ? "hovered" : "normal"));
39330
39330
  }
39331
39331
  onPointerClick(e) {
39332
- if (this.interactable && !(e.button !== 0 && e.event.pointerType === cg.Mouse) && (ir && (console.warn("Button Click", this.onClick), Me("CLICKED button " + this.name + " at " + this.context.time.frameCount)), this.onClick && this.onClick.listenerCount > 0 && (this.onClick.invoke(), e.use(), ir))) {
39332
+ if (this.interactable && !(e.button !== 0 && e.event.pointerType === cg.Mouse) && (ir && (console.warn("Button Click", this.onClick), Ae("CLICKED button " + this.name + " at " + this.context.time.frameCount)), this.onClick && this.onClick.listenerCount > 0 && (this.onClick.invoke(), e.use(), ir))) {
39333
39333
  const t = this.gameObject.worldPosition;
39334
39334
  t.add(this.gameObject.worldUp.multiplyScalar(1 + Math.random() * 0.5)), U.DrawLabel(t, "CLICK:" + Date.now(), 0.1, 1 + Math.random() * 0.5);
39335
39335
  }
@@ -39829,7 +39829,7 @@ const vh = class Rx extends E {
39829
39829
  /** @internal */
39830
39830
  onBeforeRender() {
39831
39831
  let e = this.target;
39832
- if (e || (e = this.context.mainCamera, I() && !this.__did_warn && (this.__did_warn = !0, console.debug(`[LookAt] No target set on ${this.name}, using main camera as target.`))), !e) return;
39832
+ if (e || (e = this.context.mainCamera, L() && !this.__did_warn && (this.__did_warn = !0, console.debug(`[LookAt] No target set on ${this.name}, using main camera as target.`))), !e) return;
39833
39833
  let t = this.copyTargetRotation;
39834
39834
  (this.context.isInVR || this.context.isInPassThrough) && (t = !1), _u(this.gameObject, e, this.keepUpDirection, t), this.invertForward && this.gameObject.quaternion.multiply(Rx.flipYQuat);
39835
39835
  }
@@ -39889,7 +39889,7 @@ class wh extends E {
39889
39889
  }
39890
39890
  this._validateUrl();
39891
39891
  let e = this.url;
39892
- switch (!e.startsWith("mailto:") && e.includes("@") && (e = "mailto:" + e), I() && Me("Open URL: " + e), this.mode) {
39892
+ switch (!e.startsWith("mailto:") && e.includes("@") && (e = "mailto:" + e), this.mode) {
39893
39893
  case 0:
39894
39894
  D.isSafari(), globalThis.open(e, "_blank");
39895
39895
  break;
@@ -39918,7 +39918,7 @@ class wh extends E {
39918
39918
  this.clickable && !e.used && this.url?.length && this.open();
39919
39919
  }
39920
39920
  _validateUrl() {
39921
- this.url && this.url.startsWith("www.") && (I() && console.warn("URL is not valid, adding https:// to the start of the URL", this.url), this.url = "https://" + this.url);
39921
+ this.url && this.url.startsWith("www.") && (L() && console.warn("URL is not valid, adding https:// to the start of the URL", this.url), this.url = "https://" + this.url);
39922
39922
  }
39923
39923
  }
39924
39924
  ky([
@@ -40217,7 +40217,7 @@ class Wo extends E {
40217
40217
  c.needsUpdate = !1;
40218
40218
  try {
40219
40219
  if (c.element = Tx(h), Fl && console.debug(`ScrollMarker #${h} (${c.time.toFixed(2)}) found`, c.element), !c.element) {
40220
- (Fl || I()) && console.warn(`No HTML element found for ScrollMarker: ${c.name} (index ${h})`);
40220
+ (Fl || L()) && console.warn(`No HTML element found for ScrollMarker: ${c.name} (index ${h})`);
40221
40221
  continue;
40222
40222
  }
40223
40223
  } catch (d) {
@@ -40229,7 +40229,7 @@ class Wo extends E {
40229
40229
  }
40230
40230
  n.length <= 0 && document.querySelectorAll("[data-timeline-marker]").forEach((h) => {
40231
40231
  const d = h.getAttribute("data-timeline-marker"), f = parseFloat(d || "NaN");
40232
- isNaN(f) ? (I() || Fl) && console.warn('[ScrollFollow] data-timeline-marker attribute is not a valid number. Supported are numbers only (e.g. <div data-timeline-marker="0.5">)') : n.push({
40232
+ isNaN(f) ? (L() || Fl) && console.warn('[ScrollFollow] data-timeline-marker attribute is not a valid number. Supported are numbers only (e.g. <div data-timeline-marker="0.5">)') : n.push({
40233
40233
  time: f,
40234
40234
  element: h
40235
40235
  });
@@ -40321,7 +40321,7 @@ let rt = class extends E {
40321
40321
  debug = !1;
40322
40322
  /** @internal */
40323
40323
  onEnable() {
40324
- (eo || this.debug || I()) && console.debug("[ViewBox] Using camera fov:", this.referenceFieldOfView), rt.instances.push(this), this._applyCount = 0, this.removeUpdateCallback(), this.context.pre_render_callbacks.push(this.internalUpdate);
40324
+ (eo || this.debug || L()) && console.debug("[ViewBox] Using camera fov:", this.referenceFieldOfView), rt.instances.push(this), this._applyCount = 0, this.removeUpdateCallback(), this.context.pre_render_callbacks.push(this.internalUpdate);
40325
40325
  }
40326
40326
  /** @internal */
40327
40327
  onDisable() {
@@ -40367,7 +40367,7 @@ let rt = class extends E {
40367
40367
  }
40368
40368
  const v = z(p);
40369
40369
  e.worldToLocal(v), e.lookAt(p), e.updateMatrixWorld();
40370
- const A = this.referenceFieldOfView * Math.PI / 180, O = 2 * Math.tan(A / 2) * g, R = O * e.aspect, L = this.projectBoxIntoCamera(e, 1), j = L.maxX - L.minX, B = L.maxY - L.minY, X = this.fit(
40370
+ const A = this.referenceFieldOfView * Math.PI / 180, O = 2 * Math.tan(A / 2) * g, R = O * e.aspect, I = this.projectBoxIntoCamera(e, 1), j = I.maxX - I.minX, B = I.maxY - I.minY, X = this.fit(
40371
40371
  j * e.aspect,
40372
40372
  B,
40373
40373
  R / r,
@@ -40491,7 +40491,7 @@ NeedleXRSession.onSessionRequestStart(evt => {
40491
40491
  evt.init.optionalFeatures = evt.init.optionalFeatures || [];
40492
40492
  evt.init.optionalFeatures.push('camera-access');
40493
40493
  });
40494
- `), I() && vu("No camera feed available - please request the 'camera-access' feature before starting WebXR or add the ARCameraBackground component to your scene"), !1;
40494
+ `), L() && vu("No camera feed available - please request the 'camera-access' feature before starting WebXR or add the ARCameraBackground component to your scene"), !1;
40495
40495
  const n = t.getViewerPose(s.xr.getReferenceSpace());
40496
40496
  if (n)
40497
40497
  for (const o of n.views)
@@ -40538,10 +40538,10 @@ function Lx(s) {
40538
40538
  return console.error("No camera found"), null;
40539
40539
  const a = i.renderer, l = a.xr.enabled && a.xr.isPresenting;
40540
40540
  if (l && i.currentFrameEvent != Se.EarlyUpdate)
40541
- return console.warn("Screenshot: defer to access XR frame"), new Promise((L) => {
40541
+ return console.warn("Screenshot: defer to access XR frame"), new Promise((I) => {
40542
40542
  Bs((j) => {
40543
40543
  const B = Lx(s);
40544
- L(B);
40544
+ I(B);
40545
40545
  }, Se.EarlyUpdate, { once: !0 });
40546
40546
  });
40547
40547
  const c = a.domElement, h = c.width, d = c.height;
@@ -40553,8 +40553,8 @@ function Lx(s) {
40553
40553
  a.xr.enabled = !1, a.xr.isPresenting = !1, c.style.width = `${n}px`, c.style.height = `${o}px`;
40554
40554
  const w = a.getRenderTarget(), b = a.getClearColor(new re()), v = a.getClearAlpha(), A = i.scene.background, O = "aspect" in r ? r.aspect : null;
40555
40555
  try {
40556
- const R = s.render_events !== !1, L = new Array();
40557
- R && (Hc(i.scene, ui, L), L.forEach((k) => {
40556
+ const R = s.render_events !== !1, I = new Array();
40557
+ R && (Hc(i.scene, ui, I), I.forEach((k) => {
40558
40558
  if (k?.onBeforeRender(), k.isInstancingActive && k.instances)
40559
40559
  for (let W = 0; W < k.instances?.length; W++) {
40560
40560
  const q = k.instances[W];
@@ -40575,7 +40575,7 @@ function Lx(s) {
40575
40575
  scene: i.scene,
40576
40576
  camera: r,
40577
40577
  renderer: a
40578
- })) : i.renderNow(r || null), r instanceof ce && O != null && (r.aspect = O, r.updateProjectionMatrix()), R && L.forEach((k) => k.onAfterRender()), !t && "download_filename" in s && s.download_filename)
40578
+ })) : i.renderNow(r || null), r instanceof ce && O != null && (r.aspect = O, r.updateProjectionMatrix()), R && I.forEach((k) => k.onAfterRender()), !t && "download_filename" in s && s.download_filename)
40579
40579
  switch (s.download_filename.split(".").pop()?.toLowerCase()) {
40580
40580
  case "png":
40581
40581
  t = "image/png";
@@ -40936,7 +40936,7 @@ class eL {
40936
40936
  const n = i;
40937
40937
  return n.isImageTrackingExtension && n.component.activeAndEnabled && n.component.trackedImages?.length > 0;
40938
40938
  }).indexOf(this);
40939
- this.shouldExport = t === 0, this.shouldExport && this.component.trackedImages?.length > 1 && (xc || I()) && (_e("USDZ: Only one tracked image is supported."), console.warn("USDZ: Only one tracked image is supported. Will choose the first one in the trackedImages list"));
40939
+ this.shouldExport = t === 0, this.shouldExport && this.component.trackedImages?.length > 1 && (xc || L()) && (_e("USDZ: Only one tracked image is supported."), console.warn("USDZ: Only one tracked image is supported. Will choose the first one in the trackedImages list"));
40940
40940
  }
40941
40941
  onAfterHierarchy(e, t) {
40942
40942
  if (!this.shouldExport) return;
@@ -41106,7 +41106,7 @@ class wf extends E {
41106
41106
  for (const a of this.currentImages)
41107
41107
  if (a.model === n) {
41108
41108
  const l = Date.now() - o.lastTrackingTime;
41109
- if (xc && Me(n.image + ", State: " + a.state + (n.imageDoesNotMove ? " (static)" : "") + (l <= i ? " (hysteresis)" : "")), n.imageDoesNotMove || a.state === "tracked" || l <= i) {
41109
+ if (xc && Ae(n.image + ", State: " + a.state + (n.imageDoesNotMove ? " (static)" : "") + (l <= i ? " (hysteresis)" : "")), n.imageDoesNotMove || a.state === "tracked" || l <= i) {
41110
41110
  r = !0;
41111
41111
  break;
41112
41112
  }
@@ -41302,10 +41302,10 @@ class qo extends E {
41302
41302
  else {
41303
41303
  const f = C.instantiate(this.dataTemplate.asset);
41304
41304
  if (f.name = "xr-tracked-plane", d = f, B0(f, !1), f instanceof H)
41305
- Ae(f.geometry), f.geometry = this.createGeometry(l), this.makeOccluder(f, f.material, this.occluder && !this.dataTemplate);
41305
+ Te(f.geometry), f.geometry = this.createGeometry(l), this.makeOccluder(f, f.material, this.occluder && !this.dataTemplate);
41306
41306
  else if (f instanceof Os)
41307
41307
  for (const _ of f.children)
41308
- _ instanceof H && (Ae(_.geometry), _.geometry = this.createGeometry(l), this.makeOccluder(_, _.material, this.occluder && !this.dataTemplate));
41308
+ _ instanceof H && (Te(_.geometry), _.geometry = this.createGeometry(l), this.makeOccluder(_, _.material, this.occluder && !this.dataTemplate));
41309
41309
  const p = f.getComponent(zr);
41310
41310
  if (p) {
41311
41311
  const _ = f;
@@ -41714,7 +41714,7 @@ async function $m(s, e, t, i, n) {
41714
41714
  await $m(s, r, t, i, n + 1);
41715
41715
  if (zl.length > 0 && n === 0) {
41716
41716
  const r = zl.join(", ");
41717
- console.warn(`Unknown components in scene: ${r}`), zl.length = 0, Qi() && Me(`<strong>Unknown components in scene</strong>:
41717
+ console.warn(`Unknown components in scene: ${r}`), zl.length = 0, Qi() && Ae(`<strong>Unknown components in scene</strong>:
41718
41718
 
41719
41719
  ${r}
41720
41720
 
@@ -41890,7 +41890,7 @@ function fL(s) {
41890
41890
  if (new URL(s, window.location.href).href.startsWith("file://")) {
41891
41891
  const t = `Hi - it looks like you are trying to load a local file which will not work. You need to use a webserver to serve your files.
41892
41892
  Please refer to the documentation on <a href="https://fwd.needle.tools/needle-engine/docs/local-server">https://docs.needle.tools</a> or ask for help in our <a href="https://discord.needle.tools">discord community</a>`;
41893
- Me(t), console.warn(t);
41893
+ Ae(t), console.warn(t);
41894
41894
  }
41895
41895
  }
41896
41896
  function pL(s, e) {
@@ -42480,7 +42480,7 @@ changed from "`, t, '" to "', i, '"'), this.onLoad();
42480
42480
  const m = this.getAttribute("hide-loading-overlay");
42481
42481
  m != null && m !== "0" && (o = !1);
42482
42482
  }
42483
- o === !1 && !n && (I() || (o = !0), console.warn("Needle Engine: You need a commercial license to override the default loading view. Visit https://needle.tools/pricing"), I() && _e('You need a <a target="_blank" href="https://needle.tools/pricing">commercial license</a> to override the default loading view. This will not work in production.')), !this._loadingView && o && (this._loadingView = new ru(this)), o && (this._didFullyLoad !== !0 ? this._loadingView?.onLoadingBegin("begin load") : setTimeout(() => {
42483
+ o === !1 && !n && (L() || (o = !0), console.warn("Needle Engine: You need a commercial license to override the default loading view. Visit https://needle.tools/pricing"), L() && _e('You need a <a target="_blank" href="https://needle.tools/pricing">commercial license</a> to override the default loading view. This will not work in production.')), !this._loadingView && o && (this._loadingView = new ru(this)), o && (this._didFullyLoad !== !0 ? this._loadingView?.onLoadingBegin("begin load") : setTimeout(() => {
42484
42484
  this._loadingView && this._loadingProgress01 < 0.3 && this._loadId === t && this._loadingView.onLoadingBegin("begin load");
42485
42485
  }, 300)), Oe && console.warn(`--------------
42486
42486
  Needle Engine: Begin loading ` + t + `
@@ -42734,9 +42734,9 @@ function bL(s) {
42734
42734
  let f = t[d];
42735
42735
  (f === "_" || f === "-") && (f = " "), !(f === " " && l.length <= 0 || h.includes(f) || (l.length === 0 && (f = f.toUpperCase()), c && f === " ")) && (c && (f = f.toUpperCase()), c = !1, l += f, f === " " && (c = !0));
42736
42736
  }
42737
- return I() && t !== l && console.debug('Generated display name: "' + t + '" → "' + l + '"'), l.trim();
42737
+ return L() && t !== l && console.debug('Generated display name: "' + t + '" → "' + l + '"'), l.trim();
42738
42738
  }
42739
- return I() && console.debug("Loading: use default name", t), t;
42739
+ return L() && console.debug("Loading: use default name", t), t;
42740
42740
  }
42741
42741
  function vL(s) {
42742
42742
  Cg((e) => {
@@ -42823,7 +42823,7 @@ class Oc {
42823
42823
  this.world?.removeCollider(o, !0);
42824
42824
  const r = o.parent();
42825
42825
  r && r.numColliders() <= 0 && (r[ri] || this.world?.removeRigidBody(r));
42826
- } else n instanceof T.RAPIER_PHYSICS.MODULE.RigidBody && (n.numColliders() <= 0 ? this.world?.removeRigidBody(n) : I() && (n.did_log_removing || setTimeout(() => {
42826
+ } else n instanceof T.RAPIER_PHYSICS.MODULE.RigidBody && (n.numColliders() <= 0 ? this.world?.removeRigidBody(n) : L() && (n.did_log_removing || setTimeout(() => {
42827
42827
  n.numColliders() > 0 && (n.did_log_removing = !0, console.warn("RapierPhysics: removing rigidbody with colliders from the physics world is not possible right now, please remove the colliders first"));
42828
42828
  }, 1)));
42829
42829
  }
@@ -43116,7 +43116,7 @@ class Oc {
43116
43116
  if (this._meshCache.has(d))
43117
43117
  Ne && console.warn("Use cached mesh collider"), r = this._meshCache.get(d);
43118
43118
  else {
43119
- (Ne || I()) && console.debug(`[Performance] Your MeshCollider "${e.name}" is scaled: consider applying the scale to the collider mesh instead (${c.x}, ${c.y}, ${c.z})`);
43119
+ (Ne || L()) && console.debug(`[Performance] Your MeshCollider "${e.name}" is scaled: consider applying the scale to the collider mesh instead (${c.x}, ${c.y}, ${c.z})`);
43120
43120
  const f = new Float32Array(r.length);
43121
43121
  for (let p = 0; p < r.length; p += 3)
43122
43122
  f[p] = r[p] * c.x, f[p + 1] = r[p + 1] * c.y, f[p + 2] = r[p + 2] * c.z;
@@ -43358,7 +43358,7 @@ Error:`, r), null;
43358
43358
  }
43359
43359
  const o = i.translation(), r = i.rotation();
43360
43360
  if (Number.isNaN(o.x) || Number.isNaN(r.x)) {
43361
- !n.__COLLIDER_NAN && I() && (console.warn("Collider has NaN values", n.name, n.gameObject, i), n.__COLLIDER_NAN = !0);
43361
+ !n.__COLLIDER_NAN && L() && (console.warn("Collider has NaN values", n.name, n.gameObject, i), n.__COLLIDER_NAN = !0);
43362
43362
  continue;
43363
43363
  }
43364
43364
  const a = t.center;
@@ -43697,7 +43697,7 @@ function kL(s, e, t) {
43697
43697
  const i = new Set(t);
43698
43698
  return Array.from(i);
43699
43699
  }
43700
- const Zb = "needle-button", Bp = I();
43700
+ const Zb = "needle-button", Bp = L();
43701
43701
  class ML extends HTMLElement {
43702
43702
  static observedAttributes = ["ar", "vr", "quicklook", "qrcode"];
43703
43703
  constructor() {
@@ -44372,7 +44372,7 @@ export {
44372
44372
  xy as ControlTrackHandler,
44373
44373
  wl as CursorFollow,
44374
44374
  cl as CustomBranding,
44375
- Te as CustomShader,
44375
+ Ee as CustomShader,
44376
44376
  hm as DefaultReflectionMode,
44377
44377
  iw as Deletable,
44378
44378
  vr as DeleteBox,
@@ -44685,7 +44685,7 @@ export {
44685
44685
  Ki as destroy,
44686
44686
  HO as destroyComponentInstance,
44687
44687
  mR as determineMimeTypeFromExtension,
44688
- Ae as disposeObjectResources,
44688
+ Te as disposeObjectResources,
44689
44689
  Cs as disposeStream,
44690
44690
  rd as editorGuidKeyName,
44691
44691
  lc as enableSpatialConsole,
@@ -44751,7 +44751,7 @@ export {
44751
44751
  NL as isDebugMode,
44752
44752
  GL as isDesktop,
44753
44753
  Va as isDestroyed,
44754
- I as isDevEnvironment,
44754
+ L as isDevEnvironment,
44755
44755
  x2 as isDisposed,
44756
44756
  nD as isExporting,
44757
44757
  UM as isGLTFModel,
@@ -44852,7 +44852,7 @@ export {
44852
44852
  bu as setWorldRotationXYZ,
44853
44853
  Mc as setWorldScale,
44854
44854
  vu as showBalloonError,
44855
- Me as showBalloonMessage,
44855
+ Ae as showBalloonMessage,
44856
44856
  _e as showBalloonWarning,
44857
44857
  N0 as showDebugConsole,
44858
44858
  o2 as slerp,