@roomle/web-sdk 3.9.0-alpha.4 → 3.9.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/lib/{BufferGeometry-ltw0XkYt.mjs → BufferGeometry-Dxcf7n9V.mjs} +1 -1
  2. package/lib/{BufferGeometry-ltw0XkYt.mjs.map → BufferGeometry-Dxcf7n9V.mjs.map} +1 -1
  3. package/lib/ConfiguratorKernel.wasm +0 -0
  4. package/lib/{GLTFExporter-yfYOtLdk.mjs → GLTFExporter-kpv1e-Ks.mjs} +84 -84
  5. package/lib/{GLTFExporter-yfYOtLdk.mjs.map → GLTFExporter-kpv1e-Ks.mjs.map} +1 -1
  6. package/lib/GaussianBlurNode-CMVlBe39.mjs +59 -0
  7. package/lib/GaussianBlurNode-CMVlBe39.mjs.map +1 -0
  8. package/lib/{PointLightHelper-AxCe6I00.mjs → PointLightHelper-fzRB58rC.mjs} +2 -2
  9. package/lib/{PointLightHelper-AxCe6I00.mjs.map → PointLightHelper-fzRB58rC.mjs.map} +1 -1
  10. package/lib/RoomleCore.wasm +0 -0
  11. package/lib/RoomleToolsCore.wasm +0 -0
  12. package/lib/{SpotLightHelper-DpMerFPv.mjs → SpotLightHelper-D5UFwRPb.mjs} +2 -2
  13. package/lib/{SpotLightHelper-DpMerFPv.mjs.map → SpotLightHelper-D5UFwRPb.mjs.map} +1 -1
  14. package/lib/{USDZExporter-DFJQYX8l.mjs → USDZExporter-Y0SSGr5_.mjs} +2 -2
  15. package/lib/{USDZExporter-DFJQYX8l.mjs.map → USDZExporter-Y0SSGr5_.mjs.map} +1 -1
  16. package/lib/{api-x84SYo8e.mjs → api-52cOotqw.mjs} +2 -2
  17. package/lib/{api-x84SYo8e.mjs.map → api-52cOotqw.mjs.map} +1 -1
  18. package/lib/{asset-loader.worker-A7nEeQB4.mjs → asset-loader.worker-C911tbNL.mjs} +1 -1
  19. package/lib/asset-loader.worker-C911tbNL.mjs.map +1 -0
  20. package/lib/{banana-for-scale-CFY_5rk1.mjs → banana-for-scale-B_LIHI9q.mjs} +3 -3
  21. package/lib/{banana-for-scale-CFY_5rk1.mjs.map → banana-for-scale-B_LIHI9q.mjs.map} +1 -1
  22. package/lib/{budgeteer.sw-CQWYbQSc.mjs → budgeteer.sw-D3VxiASa.mjs} +1 -1
  23. package/lib/budgeteer.sw-D3VxiASa.mjs.map +1 -0
  24. package/lib/{common-utils-L3DF6Ey5.mjs → common-utils-B9PC_rvS.mjs} +2 -2
  25. package/lib/{common-utils-L3DF6Ey5.mjs.map → common-utils-B9PC_rvS.mjs.map} +1 -1
  26. package/lib/{component-dimensioning-FjlPqIvQ.mjs → component-dimensioning-12aJsCzQ.mjs} +31 -31
  27. package/lib/{component-dimensioning-FjlPqIvQ.mjs.map → component-dimensioning-12aJsCzQ.mjs.map} +1 -1
  28. package/lib/{component-raycast-helper-1n4uXeSD.mjs → component-raycast-helper-CcrmOq29.mjs} +14 -14
  29. package/lib/{component-raycast-helper-1n4uXeSD.mjs.map → component-raycast-helper-CcrmOq29.mjs.map} +1 -1
  30. package/lib/configurator-CarZpfPv.mjs +2 -0
  31. package/lib/{configurator-Dw5JbPMY.mjs → configurator-D3ZKy6bf.mjs} +10 -10
  32. package/lib/{configurator-Dw5JbPMY.mjs.map → configurator-D3ZKy6bf.mjs.map} +1 -1
  33. package/lib/{continuous-drawing-helper-DEmx54k_.mjs → continuous-drawing-helper-D25YPUle.mjs} +4 -4
  34. package/lib/{continuous-drawing-helper-DEmx54k_.mjs.map → continuous-drawing-helper-D25YPUle.mjs.map} +1 -1
  35. package/lib/{dimensioning-helper-BXD6AEqL.mjs → dimensioning-helper-d6JA4UMr.mjs} +49 -49
  36. package/lib/{dimensioning-helper-BXD6AEqL.mjs.map → dimensioning-helper-d6JA4UMr.mjs.map} +1 -1
  37. package/lib/dimensioning-helper-pPTkh8pl.mjs +2 -0
  38. package/lib/{glb-viewer-CWkc6wx7.mjs → glb-viewer-BJJ9OIlH.mjs} +35 -35
  39. package/lib/{glb-viewer-CWkc6wx7.mjs.map → glb-viewer-BJJ9OIlH.mjs.map} +1 -1
  40. package/lib/glb-viewer-CJ7BPqI-.mjs +2 -0
  41. package/lib/{highlight-coordinator-BJJw_RgR.mjs → highlight-coordinator-BuFleG2q.mjs} +8 -8
  42. package/lib/{highlight-coordinator-BJJw_RgR.mjs.map → highlight-coordinator-BuFleG2q.mjs.map} +1 -1
  43. package/lib/{homag-intelligence-Dk4WxD0p.mjs → homag-intelligence-BxpMWKLs.mjs} +5 -5
  44. package/lib/{homag-intelligence-Dk4WxD0p.mjs.map → homag-intelligence-BxpMWKLs.mjs.map} +1 -1
  45. package/lib/{imos-ix-poc-export-helper-C9wPB6fl.mjs → imos-ix-poc-export-helper-DU0ag-Lw.mjs} +3 -3
  46. package/lib/{imos-ix-poc-export-helper-C9wPB6fl.mjs.map → imos-ix-poc-export-helper-DU0ag-Lw.mjs.map} +1 -1
  47. package/lib/{kernel-utils-B5QlsCwn.mjs → kernel-utils-Cj5B4fDD.mjs} +16 -16
  48. package/lib/{kernel-utils-B5QlsCwn.mjs.map → kernel-utils-Cj5B4fDD.mjs.map} +1 -1
  49. package/lib/{main-CqSFaC9L.mjs → main-QTvbXAvy.mjs} +27277 -3406
  50. package/lib/main-QTvbXAvy.mjs.map +1 -0
  51. package/lib/{material-viewer-BSgvHUAe.mjs → material-viewer-BPcCfvCC.mjs} +18 -18
  52. package/lib/{material-viewer-BSgvHUAe.mjs.map → material-viewer-BPcCfvCC.mjs.map} +1 -1
  53. package/lib/packages-JQ2uWInj.mjs +4 -0
  54. package/lib/{planner-BgAj8Jp1.mjs → planner-C1-sOmHY.mjs} +5 -5
  55. package/lib/{planner-BgAj8Jp1.mjs.map → planner-C1-sOmHY.mjs.map} +1 -1
  56. package/lib/planner-CnRaQM_h.mjs +2 -0
  57. package/lib/{plugin-system-BBgoIai2.mjs → plugin-system-DlME_5b_.mjs} +2 -2
  58. package/lib/{plugin-system-BBgoIai2.mjs.map → plugin-system-DlME_5b_.mjs.map} +1 -1
  59. package/lib/rolldown-runtime-BwvMKf85.mjs +23 -0
  60. package/lib/roomle-headless.d.ts +32 -4
  61. package/lib/roomle-headless.js +40 -40
  62. package/lib/roomle-headless.js.map +1 -1
  63. package/lib/{roomle-renderer-CkSFbpmg.mjs → roomle-renderer-DYQvV88j.mjs} +2 -2
  64. package/lib/{roomle-renderer-CkSFbpmg.mjs.map → roomle-renderer-DYQvV88j.mjs.map} +1 -1
  65. package/lib/roomle-sdk.d.ts +32 -4
  66. package/lib/roomle-sdk.js +8 -8
  67. package/lib/{roomle-webgpu-renderer-DUr1RZL6.mjs → roomle-webgpu-renderer-BrZZeAGw.mjs} +296 -419
  68. package/lib/roomle-webgpu-renderer-BrZZeAGw.mjs.map +1 -0
  69. package/lib/{scene-renderer-BuMnigf2.mjs → scene-renderer-3nhM4cEu.mjs} +394 -394
  70. package/lib/{scene-renderer-BuMnigf2.mjs.map → scene-renderer-3nhM4cEu.mjs.map} +1 -1
  71. package/lib/{script-loader-DzyUQT3-.mjs → script-loader-3LiaLeLT.mjs} +2 -2
  72. package/lib/{script-loader-DzyUQT3-.mjs.map → script-loader-3LiaLeLT.mjs.map} +1 -1
  73. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  74. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  75. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  76. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  77. package/lib/{stats-helper-BZnX3BX3.mjs → stats-helper-COC7Moh0.mjs} +3 -3
  78. package/lib/{stats-helper-BZnX3BX3.mjs.map → stats-helper-COC7Moh0.mjs.map} +1 -1
  79. package/lib/{three.core-DNErG1F6.mjs → three.core-tV_4n8Wg.mjs} +374 -301
  80. package/lib/{three.core-DNErG1F6.mjs.map → three.core-tV_4n8Wg.mjs.map} +1 -1
  81. package/lib/{three.module-BZkESKo3.mjs → three.module-DC5fF9Zl.mjs} +1568 -1568
  82. package/lib/{three.module-BZkESKo3.mjs.map → three.module-DC5fF9Zl.mjs.map} +1 -1
  83. package/lib/three.tsl-CAEdYyg3.mjs +136 -0
  84. package/lib/three.tsl-CAEdYyg3.mjs.map +1 -0
  85. package/lib/three.tsl-S0OKwamA.mjs +2 -0
  86. package/lib/{three.webgpu-C8myBXe1.mjs → three.webgpu-CkP2nkXM.mjs} +747 -747
  87. package/lib/{three.webgpu-C8myBXe1.mjs.map → three.webgpu-CkP2nkXM.mjs.map} +1 -1
  88. package/lib/three.webgpu-qrxDA_v0.mjs +3 -0
  89. package/lib/{threejs-utils-D7sinreM.mjs → threejs-utils-CElderZe.mjs} +68 -68
  90. package/lib/threejs-utils-CElderZe.mjs.map +1 -0
  91. package/lib/{tools-core-BxOoo-C1.mjs → tools-core-mkA4m80O.mjs} +3 -3
  92. package/lib/{tools-core-BxOoo-C1.mjs.map → tools-core-mkA4m80O.mjs.map} +1 -1
  93. package/lib/workers-HXGCmmZS.mjs +6 -0
  94. package/lib/{workers-BJYv3y38.mjs.map → workers-HXGCmmZS.mjs.map} +1 -1
  95. package/package.json +1 -1
  96. package/lib/asset-loader.worker-A7nEeQB4.mjs.map +0 -1
  97. package/lib/budgeteer.sw-CQWYbQSc.mjs.map +0 -1
  98. package/lib/configurator-DeUTcLI3.mjs +0 -2
  99. package/lib/dimensioning-helper-Do9jwg8T.mjs +0 -2
  100. package/lib/glb-viewer-Ci-IZcIt.mjs +0 -2
  101. package/lib/main-CqSFaC9L.mjs.map +0 -1
  102. package/lib/packages-0mEYlGTx.mjs +0 -4
  103. package/lib/planner-CIvdB7af.mjs +0 -2
  104. package/lib/rolldown-runtime-DgwB9i60.mjs +0 -13
  105. package/lib/roomle-webgpu-renderer-DUr1RZL6.mjs.map +0 -1
  106. package/lib/three.webgpu-WIkDzwXU.mjs +0 -3
  107. package/lib/threejs-utils-D7sinreM.mjs.map +0 -1
  108. package/lib/workers-BJYv3y38.mjs +0 -6
@@ -1,4 +1,4 @@
1
- import { $n as e, A as t, An as n, Ar as r, B as i, Bn as a, Bt as o, C as s, Cr as c, Di as l, Dn as u, Dr as d, E as f, Ei as p, Et as m, Fi as h, Fr as g, Gn as _, Hi as v, Hn as y, In as b, Ir as ee, J as x, Jn as S, Jt as te, K as ne, Kn as re, Kt as ie, L as ae, Li as oe, Lr as se, Lt as ce, Mi as le, Mn as ue, Mr as de, Mt as fe, Nr as pe, Nt as me, On as he, Or as ge, Pi as C, Q as _e, Qn as ve, Qr as ye, Qt as be, Ri as xe, Rr as Se, Si as Ce, Sr as we, St as Te, T as Ee, Tn as De, Tt as Oe, U as ke, Ui as Ae, Un as je, Ur as Me, Ut as Ne, Vn as Pe, Vr as Fe, W as Ie, Wi as Le, Wn as Re, X as ze, Xn as Be, Xt as Ve, Yn as He, Yt as Ue, Zn as We, Zr as Ge, Zt as Ke, _n as qe, _r as Je, a as Ye, ai as Xe, an as Ze, ar as Qe, at as $e, bi as et, bn as tt, bt as nt, cn as rt, dn as it, dr as at, dt as ot, er as st, f as ct, fi as lt, fn as ut, fr as dt, gi as ft, gn as pt, h as mt, hi as ht, hn as gt, ht as _t, in as vt, ir as yt, j as bt, jr as xt, k as St, kn as Ct, kr as wt, li as Tt, lt as Et, m as Dt, mi as Ot, mn as kt, mr as At, mt as jt, n as Mt, ni as Nt, nn as Pt, nr as Ft, nt as It, on as Lt, or as Rt, ot as zt, p as Bt, pi as Vt, pn as Ht, pr as Ut, q as Wt, qn as Gt, qr as Kt, ri as qt, rn as Jt, rr as Yt, si as Xt, sn as Zt, sr as Qt, st as $t, ti as en, tr as tn, ui as nn, ur as rn, ut as an, vn as on, vr as sn, wi as cn, wn as ln, wt as un, x as dn, xi as w, xn as fn, xr as pn, xt as mn, yi as hn, yn as gn, yt as _n, z as vn, zn as yn, zr as bn } from "./three.core-DNErG1F6.mjs";
1
+ import { $ as e, $n as t, $r as n, $t as r, A as i, An as a, Ar as o, B as s, Bn as c, Br as l, Ci as u, Cr as d, Ct as f, D as p, Di as m, Dt as h, E as g, En as _, Et as v, Fi as y, G as b, Gi as ee, Gn as x, Hn as S, Hr as te, Ii as ne, Ir as re, J as ie, Jn as ae, Jr as oe, Kn as se, Ln as ce, Lr as le, M as ue, Mr as de, Ni as fe, Nn as pe, Nr as me, Nt as he, Oi as ge, On as _e, Or as ve, Pr as ye, Pt as be, Qn as xe, Qr as Se, Qt as Ce, R as we, Ri as Te, Rr as Ee, Rt as De, S as Oe, Si as C, Sn as ke, Sr as Ae, St as je, Ti as Me, Tn as Ne, Tt as Pe, Ui as w, Un as Fe, V as Ie, Vn as Le, Vt as Re, W as ze, Wi as Be, Wn as Ve, Wr as He, Wt as Ue, Xn as We, Xt as Ge, Y as Ke, Yn as qe, Yt as Je, Z as Ye, Zn as Xe, Zt as Ze, _i as Qe, _n as $e, a as et, an as tt, ar as nt, bi as rt, bn as it, bt as at, ci as ot, cn as st, cr as ct, ct as lt, di as ut, dr as dt, dt as ft, er as pt, fn as mt, fr as ht, ft as gt, g as _t, gi as vt, gn as yt, gt as bt, h as xt, hi as St, hn as Ct, hr as wt, ht as Tt, ii as Et, in as Dt, ir as Ot, j as kt, jn as At, jr as jt, kn as Mt, kr as Nt, ln as Pt, m as Ft, mi as It, mn as Lt, mr as Rt, n as zt, ni as Bt, nr as Vt, oi as Ht, on as Ut, or as Wt, ot as Gt, p as Kt, pi as qt, pn as Jt, pr as Yt, q as Xt, qn as Zt, qt as Qt, ri as $t, rn as en, rr as tn, rt as nn, sn as rn, sr as an, st as on, tr as sn, ui as cn, ut as ln, vn as un, vr as dn, w as fn, wr as pn, xi as mn, xn as hn, xt as gn, yn as _n, yr as vn, zi as yn, zr as bn } from "./three.core-tV_4n8Wg.mjs";
2
2
  //#region ../../node_modules/three/build/three.webgpu.js
3
3
  var xn = /* @__PURE__ */ "alphaMap.alphaTest.anisotropy.anisotropyMap.anisotropyRotation.aoMap.aoMapIntensity.attenuationColor.attenuationDistance.bumpMap.clearcoat.clearcoatMap.clearcoatNormalMap.clearcoatNormalScale.clearcoatRoughness.color.dispersion.displacementMap.emissive.emissiveIntensity.emissiveMap.envMap.envMapIntensity.gradientMap.ior.iridescence.iridescenceIOR.iridescenceMap.iridescenceThicknessMap.lightMap.lightMapIntensity.map.matcap.metalness.metalnessMap.normalMap.normalScale.opacity.roughness.roughnessMap.sheen.sheenColor.sheenColorMap.sheenRoughnessMap.shininess.specular.specularColor.specularColorMap.specularIntensity.specularIntensityMap.specularMap.thickness.transmission.transmissionMap".split("."), Sn = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), Tn = class {
4
4
  constructor(e) {
@@ -216,7 +216,7 @@ function Ln(e) {
216
216
  if (/vec4/.test(e) || /mat2/.test(e)) return 4;
217
217
  if (/mat3/.test(e)) return 9;
218
218
  if (/mat4/.test(e)) return 16;
219
- C(`TSL: Unsupported type: ${e}`, new On());
219
+ y(`TSL: Unsupported type: ${e}`, new On());
220
220
  }
221
221
  function Rn(e) {
222
222
  if (/float|int|uint/.test(e)) return 1;
@@ -225,7 +225,7 @@ function Rn(e) {
225
225
  if (/vec4/.test(e) || /mat2/.test(e)) return 4;
226
226
  if (/mat3/.test(e)) return 12;
227
227
  if (/mat4/.test(e)) return 16;
228
- C(`TSL: Unsupported type: ${e}`, new On());
228
+ y(`TSL: Unsupported type: ${e}`, new On());
229
229
  }
230
230
  function zn(e) {
231
231
  if (/float|int|uint/.test(e)) return 4;
@@ -233,7 +233,7 @@ function zn(e) {
233
233
  if (/vec3/.test(e) || /vec4/.test(e)) return 16;
234
234
  if (/mat2/.test(e)) return 8;
235
235
  if (/mat3/.test(e) || /mat4/.test(e)) return 16;
236
- C(`TSL: Unsupported type: ${e}`, new On());
236
+ y(`TSL: Unsupported type: ${e}`, new On());
237
237
  }
238
238
  function Bn(e) {
239
239
  if (e == null) return null;
@@ -251,7 +251,7 @@ function Vn(e, ...t) {
251
251
  t[0],
252
252
  t[0],
253
253
  t[0]
254
- ])), e === "color" ? new s(...t) : n === "vec2" ? new et(...t) : n === "vec3" ? new w(...t) : n === "vec4" ? new Ce(...t) : n === "mat2" ? new vt(...t) : n === "mat3" ? new Ze(...t) : n === "mat4" ? new Lt(...t) : e === "bool" ? t[0] || !1 : e === "float" || e === "int" || e === "uint" ? t[0] || 0 : e === "string" ? t[0] || "" : e === "ArrayBuffer" ? Wn(t[0]) : null;
254
+ ])), e === "color" ? new fn(...t) : n === "vec2" ? new mn(...t) : n === "vec3" ? new C(...t) : n === "vec4" ? new u(...t) : n === "mat2" ? new tt(...t) : n === "mat3" ? new Ut(...t) : n === "mat4" ? new rn(...t) : e === "bool" ? t[0] || !1 : e === "float" || e === "int" || e === "uint" ? t[0] || 0 : e === "string" ? t[0] || "" : e === "ArrayBuffer" ? Wn(t[0]) : null;
255
255
  }
256
256
  function Hn(e) {
257
257
  let t = Pn.get(e);
@@ -299,7 +299,7 @@ var Gn = {
299
299
  ], Qn = {
300
300
  analyze: "setup",
301
301
  generate: "analyze"
302
- }, $n = 0, E = class e extends It {
302
+ }, $n = 0, E = class e extends nn {
303
303
  static get type() {
304
304
  return "Node";
305
305
  }
@@ -310,7 +310,7 @@ var Gn = {
310
310
  e === !0 && this.version++;
311
311
  }
312
312
  get uuid() {
313
- return this._uuid === null && (this._uuid = Jt.generateUUID()), this._uuid;
313
+ return this._uuid === null && (this._uuid = Dt.generateUUID()), this._uuid;
314
314
  }
315
315
  get type() {
316
316
  return this.constructor.type;
@@ -447,13 +447,13 @@ var Gn = {
447
447
  if (n && n.isNode === !0) return n.build(e, t);
448
448
  }
449
449
  updateBefore() {
450
- v("Abstract function.");
450
+ w("Abstract function.");
451
451
  }
452
452
  updateAfter() {
453
- v("Abstract function.");
453
+ w("Abstract function.");
454
454
  }
455
455
  update() {
456
- v("Abstract function.");
456
+ w("Abstract function.");
457
457
  }
458
458
  before(e) {
459
459
  return this._beforeNodes === null && (this._beforeNodes = []), this._beforeNodes.push(e), this;
@@ -495,9 +495,9 @@ var Gn = {
495
495
  else if (o === "generate") {
496
496
  if (this.generate.length < 2) {
497
497
  let n = this.getNodeType(e), r = e.getDataFromNode(this);
498
- a = r.snippet, a === void 0 ? r.generated === void 0 ? (r.generated = !0, a = this.generate(e) || "", r.snippet = a) : (v("Node: Recursion detected.", this), a = "/* Recursion detected. */") : r.flowCodes !== void 0 && e.context.nodeBlock !== void 0 && e.addFlowCodeHierarchy(this, e.context.nodeBlock), a = e.format(a, n, t);
498
+ a = r.snippet, a === void 0 ? r.generated === void 0 ? (r.generated = !0, a = this.generate(e) || "", r.snippet = a) : (w("Node: Recursion detected.", this), a = "/* Recursion detected. */") : r.flowCodes !== void 0 && e.context.nodeBlock !== void 0 && e.addFlowCodeHierarchy(this, e.context.nodeBlock), a = e.format(a, n, t);
499
499
  } else a = this.generate(e, t) || "";
500
- a === "" && t !== null && t !== "void" && t !== "OutputType" && (C(`TSL: Invalid generated code, expected a "${t}".`), a = e.generateConst(t));
500
+ a === "" && t !== null && t !== "void" && t !== "OutputType" && (y(`TSL: Invalid generated code, expected a "${t}".`), a = e.generateConst(t));
501
501
  }
502
502
  return e.removeChain(this), a;
503
503
  }
@@ -631,11 +631,11 @@ var er = class extends E {
631
631
  let n = this.getNodeType(e), r = e.getTypeLength(n), i = this.nodes, a = e.getComponentType(n), o = [], s = 0;
632
632
  for (let t of i) {
633
633
  if (s >= r) {
634
- C(`TSL: Length of parameters exceeds maximum length of function '${n}()' type.`, this.stackTrace);
634
+ y(`TSL: Length of parameters exceeds maximum length of function '${n}()' type.`, this.stackTrace);
635
635
  break;
636
636
  }
637
637
  let i = t.getNodeType(e), c = e.getTypeLength(i), l;
638
- if (s + c > r && (C(`TSL: Length of '${n}()' data exceeds maximum length of output type.`, this.stackTrace), c = r - s, i = e.getTypeFromLength(c)), s += c, l = t.build(e, i), e.getComponentType(i) !== a) {
638
+ if (s + c > r && (y(`TSL: Length of '${n}()' data exceeds maximum length of output type.`, this.stackTrace), c = r - s, i = e.getTypeFromLength(c)), s += c, l = t.build(e, i), e.getComponentType(i) !== a) {
639
639
  let t = e.getTypeFromLength(c, a);
640
640
  l = e.format(l, i, t);
641
641
  }
@@ -742,7 +742,7 @@ var er = class extends E {
742
742
  super.deserialize(e), this.nodeType = e.nodeType, this.value = Array.isArray(e.value) ? Vn(e.valueType, ...e.value) : e.value, this.precision = e.precision || null, this.value && this.value.fromArray && (this.value = this.value.fromArray(e.value));
743
743
  }
744
744
  generate() {
745
- v("Abstract function.");
745
+ w("Abstract function.");
746
746
  }
747
747
  }, lr = /float|u?int/, ur = class extends cr {
748
748
  static get type() {
@@ -778,7 +778,7 @@ var er = class extends E {
778
778
  }
779
779
  generate(e) {
780
780
  if (this.hasMember(e) === !1) {
781
- v(`TSL: Member "${this.property}" does not exist in struct.`, this.stackTrace);
781
+ w(`TSL: Member "${this.property}" does not exist in struct.`, this.stackTrace);
782
782
  let t = this.getNodeType(e);
783
783
  return e.generateConst(t);
784
784
  }
@@ -787,7 +787,7 @@ var er = class extends E {
787
787
  }, fr = null, pr = /* @__PURE__ */ new Map();
788
788
  function D(e, t) {
789
789
  if (pr.has(e)) {
790
- v(`TSL: Redefinition of method chaining '${e}'.`);
790
+ w(`TSL: Redefinition of method chaining '${e}'.`);
791
791
  return;
792
792
  }
793
793
  if (typeof t != "function") throw Error(`THREE.TSL: Node element ${e} is not a function`);
@@ -799,7 +799,7 @@ function D(e, t) {
799
799
  }
800
800
  var mr = (e) => e.replace(/r|s/g, "x").replace(/g|t/g, "y").replace(/b|p/g, "z").replace(/a|q/g, "w"), hr = (e) => mr(e).split("").sort().join("");
801
801
  E.prototype.assign = function(...e) {
802
- if (this.isStackNode !== !0) return fr === null ? C("TSL: No stack defined for assign operation. Make sure the assign is inside a Fn().", new On()) : fr.assign(this, ...e), this;
802
+ if (this.isStackNode !== !0) return fr === null ? y("TSL: No stack defined for assign operation. Make sure the assign is inside a Fn().", new On()) : fr.assign(this, ...e), this;
803
803
  {
804
804
  let t = pr.get("assign");
805
805
  return this.addToStack(t(...e));
@@ -885,7 +885,7 @@ var xr = /* @__PURE__ */ new WeakMap(), Sr = function(e, t = null) {
885
885
  let a, o = t, s, c;
886
886
  function l(t) {
887
887
  let n;
888
- return n = o ? /[a-z]/i.test(o) ? o + "()" : o : e.type, s !== void 0 && t.length < s ? (C(`TSL: "${n}" parameter length is less than minimum required.`, new On()), t.concat(Array(s - t.length).fill(0))) : c !== void 0 && t.length > c ? (C(`TSL: "${n}" parameter length exceeds limit.`, new On()), t.slice(0, c)) : t;
888
+ return n = o ? /[a-z]/i.test(o) ? o + "()" : o : e.type, s !== void 0 && t.length < s ? (y(`TSL: "${n}" parameter length is less than minimum required.`, new On()), t.concat(Array(s - t.length).fill(0))) : c !== void 0 && t.length > c ? (y(`TSL: "${n}" parameter length exceeds limit.`, new On()), t.slice(0, c)) : t;
889
889
  }
890
890
  return t === null ? a = (...t) => i(new e(...Jr(l(t)))) : n === null ? a = (...n) => i(new e(t, ...Jr(l(n)))) : (n = O(n), a = (...r) => i(new e(t, ...Jr(l(r)), n))), a.setParameterLength = (...e) => (e.length === 1 ? s = c = e[0] : e.length === 2 && ([s, c] = e), a), a.setName = (e) => (o = e, a), a;
891
891
  }, Er = function(e, ...t) {
@@ -1020,7 +1020,7 @@ var zr = {
1020
1020
  float: Rr
1021
1021
  }, Br = new Map([...Fr, ...Rr]), Vr = (e, t) => Br.has(e) ? Br.get(e) : e.isNode === !0 ? e : new ur(e, t), Hr = function(e, t = null) {
1022
1022
  return (...n) => {
1023
- for (let t of n) if (t === void 0) return C(`TSL: Invalid parameter for the type "${e}".`, new On()), new ur(0, e);
1023
+ for (let t of n) if (t === void 0) return y(`TSL: Invalid parameter for the type "${e}".`, new On()), new ur(0, e);
1024
1024
  if ((n.length === 0 || ![
1025
1025
  "bool",
1026
1026
  "float",
@@ -1053,7 +1053,7 @@ var O = (e, t = null) => Sr(e, t), Kr = (e, t = null) => O(e, t).toVarIntent(),
1053
1053
  constructor(e, t = null) {
1054
1054
  super();
1055
1055
  let n = null;
1056
- t !== null && (typeof t == "object" ? n = t.return : (typeof t == "string" ? n = t : C("TSL: Invalid layout type.", new On()), t = null)), this.shaderNode = new Gr(e, n), t !== null && this.setLayout(t), this.isFn = !0;
1056
+ t !== null && (typeof t == "object" ? n = t.return : (typeof t == "string" ? n = t : y("TSL: Invalid layout type.", new On()), t = null)), this.shaderNode = new Gr(e, n), t !== null && this.setLayout(t), this.isFn = !0;
1057
1057
  }
1058
1058
  setLayout(e) {
1059
1059
  let t = this.shaderNode.nodeType;
@@ -1083,7 +1083,7 @@ var O = (e, t = null) => Sr(e, t), Kr = (e, t = null) => O(e, t).toVarIntent(),
1083
1083
  }
1084
1084
  generate(e) {
1085
1085
  let t = this.getNodeType(e);
1086
- return C("TSL: \"Fn()\" was declared but not invoked. Try calling it like \"Fn()( ...params )\".", this.stackTrace), e.generateConst(t);
1086
+ return y("TSL: \"Fn()\" was declared but not invoked. Try calling it like \"Fn()( ...params )\".", this.stackTrace), e.generateConst(t);
1087
1087
  }
1088
1088
  };
1089
1089
  function M(e, t = null) {
@@ -1111,8 +1111,8 @@ var ti = new Hr("color"), P = new Hr("float", zr.float), F = new Hr("int", zr.in
1111
1111
  D("toColor", ti), D("toFloat", P), D("toInt", F), D("toUint", I), D("toBool", ni), D("toVec2", L), D("toIVec2", ri), D("toUVec2", ii), D("toBVec2", ai), D("toVec3", R), D("toIVec3", oi), D("toUVec3", si), D("toBVec3", ci), D("toVec4", z), D("toIVec4", li), D("toUVec4", ui), D("toBVec4", di), D("toMat2", fi), D("toMat3", pi), D("toMat4", mi);
1112
1112
  var _i = /* @__PURE__ */ k(er).setParameterLength(2), vi = (e, t) => new tr(O(e), t), yi = (e, t) => new ar(O(e), t);
1113
1113
  D("element", _i), D("convert", vi);
1114
- var bi = (e) => (v("TSL: append() has been renamed to Stack().", new On()), ei(e));
1115
- D("append", (e) => (v("TSL: .append() has been renamed to .toStack().", new On()), ei(e)));
1114
+ var bi = (e) => (w("TSL: append() has been renamed to Stack().", new On()), ei(e));
1115
+ D("append", (e) => (w("TSL: .append() has been renamed to .toStack().", new On()), ei(e)));
1116
1116
  var B = class extends E {
1117
1117
  static get type() {
1118
1118
  return "PropertyNode";
@@ -1157,7 +1157,7 @@ var B = class extends E {
1157
1157
  return this.name = e, this;
1158
1158
  }
1159
1159
  label(e) {
1160
- return v("TSL: \"label()\" has been deprecated. Use \"setName()\" instead.", new On()), this.setName(e);
1160
+ return w("TSL: \"label()\" has been deprecated. Use \"setName()\" instead.", new On()), this.setName(e);
1161
1161
  }
1162
1162
  setGroup(e) {
1163
1163
  return this.groupNode = e, this;
@@ -1307,12 +1307,12 @@ var ca = class extends nr {
1307
1307
  return a = i ? "&" + t.build(e) : t.build(e, r), a;
1308
1308
  };
1309
1309
  if (Array.isArray(i)) {
1310
- if (i.length > r.length) C("TSL: The number of provided parameters exceeds the expected number of inputs in 'Fn()'."), i.length = r.length;
1311
- else if (i.length < r.length) for (C("TSL: The number of provided parameters is less than the expected number of inputs in 'Fn()'."); i.length < r.length;) i.push(P(0));
1310
+ if (i.length > r.length) y("TSL: The number of provided parameters exceeds the expected number of inputs in 'Fn()'."), i.length = r.length;
1311
+ else if (i.length < r.length) for (y("TSL: The number of provided parameters is less than the expected number of inputs in 'Fn()'."); i.length < r.length;) i.push(P(0));
1312
1312
  for (let e = 0; e < i.length; e++) t.push(a(i[e], r[e]));
1313
1313
  } else for (let e of r) {
1314
1314
  let n = i[e.name];
1315
- n === void 0 ? (C(`TSL: Input '${e.name}' not found in \'Fn()\'.`), t.push(a(P(0), e))) : t.push(a(n, e));
1315
+ n === void 0 ? (y(`TSL: Input '${e.name}' not found in \'Fn()\'.`), t.push(a(P(0), e))) : t.push(a(n, e));
1316
1316
  }
1317
1317
  return `${n.build(e, "property")}( ${t.join(", ")} )`;
1318
1318
  }
@@ -1367,7 +1367,7 @@ var ua = {
1367
1367
  a === "void" ? o = s = a : (o = r.getNodeType(e), s = i ? i.getNodeType(e) : null, n === "<" || n === ">" || n === "<=" || n === ">=" || n === "==" || n === "!=" ? e.isVector(o) ? s = o : e.isVector(s) ? o = s : o !== s && (o = s = "float") : n === ">>" || n === "<<" ? (o = a, s = e.changeComponentType(s, "uint")) : n === "%" ? (o = a, s = e.isInteger(o) && e.isInteger(s) ? s : o) : e.isMatrix(o) ? s === "float" ? s = "float" : e.isVector(s) ? s = e.getVectorFromMatrix(o) : e.isMatrix(s) || (o = s = a) : o = e.isMatrix(s) ? o === "float" ? "float" : e.isVector(o) ? e.getVectorFromMatrix(s) : s = a : s = a);
1368
1368
  let c = r.build(e, o), l = i ? i.build(e, s) : null, u = e.getFunctionOperator(n);
1369
1369
  if (t !== "void") {
1370
- let r = e.renderer.coordinateSystem === cn;
1370
+ let r = e.renderer.coordinateSystem === Me;
1371
1371
  if (n === "==" || n === "!=" || n === "<" || n === ">" || n === "<=" || n === ">=") return r && e.isVector(o) ? e.format(`${this.getOperatorMethod(e, t)}( ${c}, ${l} )`, a, t) : e.format(`( ${c} ${n} ${l} )`, a, t);
1372
1372
  if (n === "%") return e.isInteger(s) ? e.format(`( ${c} % ${l} )`, a, t) : e.format(`${this.getOperatorMethod(e, a)}( ${c}, ${l} )`, a, t);
1373
1373
  if (n === "!" || n === "~") return e.format(`(${n}${c})`, o, t);
@@ -1394,7 +1394,7 @@ var ua = {
1394
1394
  return e.subAssign(1), t;
1395
1395
  });
1396
1396
  D("add", fa), D("sub", W), D("mul", G), D("div", pa), D("mod", ma), D("equal", ha), D("notEqual", ga), D("lessThan", _a), D("greaterThan", va), D("lessThanEqual", ya), D("greaterThanEqual", ba), D("and", xa), D("or", Sa), D("not", Ca), D("xor", wa), D("bitAnd", Ta), D("bitNot", Ea), D("bitOr", Da), D("bitXor", Oa), D("shiftLeft", ka), D("shiftRight", Aa), D("incrementBefore", ja), D("decrementBefore", Ma), D("increment", Na), D("decrement", Pa);
1397
- var Fa = (e, t) => (v("TSL: \"modInt()\" is deprecated. Use \"mod( int( ... ) )\" instead.", new On()), ma(F(e), F(t)));
1397
+ var Fa = (e, t) => (w("TSL: \"modInt()\" is deprecated. Use \"mod( int( ... ) )\" instead.", new On()), ma(F(e), F(t)));
1398
1398
  D("modInt", Fa);
1399
1399
  var K = class e extends nr {
1400
1400
  static get type() {
@@ -1435,7 +1435,7 @@ var K = class e extends nr {
1435
1435
  if (r === e.NEGATE) return t.format("( - " + o.build(t, a) + " )", i, n);
1436
1436
  {
1437
1437
  let u = [];
1438
- return r === e.CROSS ? u.push(o.build(t, i), s.build(t, i)) : l === 2e3 && r === e.STEP ? u.push(o.build(t, t.getTypeLength(o.getNodeType(t)) === 1 ? "float" : a), s.build(t, a)) : l === 2e3 && (r === e.MIN || r === e.MAX) ? u.push(o.build(t, a), s.build(t, t.getTypeLength(s.getNodeType(t)) === 1 ? "float" : a)) : r === e.REFRACT ? u.push(o.build(t, a), s.build(t, a), c.build(t, "float")) : r === e.MIX ? u.push(o.build(t, a), s.build(t, a), c.build(t, t.getTypeLength(c.getNodeType(t)) === 1 ? "float" : a)) : (l === 2001 && r === e.ATAN && s !== null && (r = "atan2"), t.shaderStage !== "fragment" && (r === e.DFDX || r === e.DFDY) && (v(`TSL: '${r}' is not supported in the ${t.shaderStage} stage.`, this.stackTrace), r = "/*" + r + "*/"), u.push(o.build(t, a)), s !== null && u.push(s.build(t, a)), c !== null && u.push(c.build(t, a))), t.format(`${t.getMethod(r, i)}( ${u.join(", ")} )`, i, n);
1438
+ return r === e.CROSS ? u.push(o.build(t, i), s.build(t, i)) : l === 2e3 && r === e.STEP ? u.push(o.build(t, t.getTypeLength(o.getNodeType(t)) === 1 ? "float" : a), s.build(t, a)) : l === 2e3 && (r === e.MIN || r === e.MAX) ? u.push(o.build(t, a), s.build(t, t.getTypeLength(s.getNodeType(t)) === 1 ? "float" : a)) : r === e.REFRACT ? u.push(o.build(t, a), s.build(t, a), c.build(t, "float")) : r === e.MIX ? u.push(o.build(t, a), s.build(t, a), c.build(t, t.getTypeLength(c.getNodeType(t)) === 1 ? "float" : a)) : (l === 2001 && r === e.ATAN && s !== null && (r = "atan2"), t.shaderStage !== "fragment" && (r === e.DFDX || r === e.DFDY) && (w(`TSL: '${r}' is not supported in the ${t.shaderStage} stage.`, this.stackTrace), r = "/*" + r + "*/"), u.push(o.build(t, a)), s !== null && u.push(s.build(t, a)), c !== null && u.push(c.build(t, a))), t.format(`${t.getMethod(r, i)}( ${u.join(", ")} )`, i, n);
1439
1439
  }
1440
1440
  }
1441
1441
  serialize(e) {
@@ -1483,10 +1483,10 @@ var ts = class extends E {
1483
1483
  }
1484
1484
  e.addFlowCode(`\n${e.tab}if ( ${u} ) {\n\n`).addFlowTab();
1485
1485
  let d = a.build(e, n);
1486
- if (d && (c ? d = l + " = " + d + ";" : (d = "return " + d + ";", s === null && (v("TSL: Return statement used in an inline 'Fn()'. Define a layout struct to allow return values.", this.stackTrace), d = "// " + d))), e.removeFlowTab().addFlowCode(e.tab + " " + d + "\n\n" + e.tab + "}"), o !== null) {
1486
+ if (d && (c ? d = l + " = " + d + ";" : (d = "return " + d + ";", s === null && (w("TSL: Return statement used in an inline 'Fn()'. Define a layout struct to allow return values.", this.stackTrace), d = "// " + d))), e.removeFlowTab().addFlowCode(e.tab + " " + d + "\n\n" + e.tab + "}"), o !== null) {
1487
1487
  e.addFlowCode(" else {\n\n").addFlowTab();
1488
1488
  let t = o.build(e, n);
1489
- t && (c ? t = l + " = " + t + ";" : (t = "return " + t + ";", s === null && (v("TSL: Return statement used in an inline 'Fn()'. Define a layout struct to allow return values.", this.stackTrace), t = "// " + t))), e.removeFlowTab().addFlowCode(e.tab + " " + t + "\n\n" + e.tab + "}\n\n");
1489
+ t && (c ? t = l + " = " + t + ";" : (t = "return " + t + ";", s === null && (w("TSL: Return statement used in an inline 'Fn()'. Define a layout struct to allow return values.", this.stackTrace), t = "// " + t))), e.removeFlowTab().addFlowCode(e.tab + " " + t + "\n\n" + e.tab + "}\n\n");
1490
1490
  } else e.addFlowCode("\n\n");
1491
1491
  return e.format(l, n, t);
1492
1492
  }
@@ -1537,7 +1537,7 @@ function cs(e, t = null) {
1537
1537
  return is(t, { getAO: (t, { material: n }) => n.transparent === !0 ? t : t === null ? e : t.mul(e) });
1538
1538
  }
1539
1539
  function ls(e, t) {
1540
- return v("TSL: \"label()\" has been deprecated. Use \"setName()\" instead."), os(e, t);
1540
+ return w("TSL: \"label()\" has been deprecated. Use \"setName()\" instead."), os(e, t);
1541
1541
  }
1542
1542
  D("context", is), D("label", ls), D("uniformFlow", as), D("setName", os), D("builtinShadowContext", (e, t, n) => ss(t, n, e)), D("builtinAOContext", (e, t) => cs(t, e));
1543
1543
  var us = class extends E {
@@ -1588,7 +1588,7 @@ var us = class extends E {
1588
1588
  let { node: t, name: n, readOnly: r } = this, { renderer: i } = e, a = i.backend.isWebGPUBackend === !0, o = !1, s = !1;
1589
1589
  r && (o = e.isDeterministic(t), s = a ? r : o);
1590
1590
  let c = this.getNodeType(e);
1591
- if (c == "void") return this.isIntent(e) !== !0 && C("TSL: \".toVar()\" can not be used with void type.", this.stackTrace), t.build(e);
1591
+ if (c == "void") return this.isIntent(e) !== !0 && y("TSL: \".toVar()\" can not be used with void type.", this.stackTrace), t.build(e);
1592
1592
  let l = e.getVectorType(c), u = t.build(e, l), d = e.getVarFromNode(this, n, l, void 0, s), f = e.getPropertyName(d), p = f;
1593
1593
  if (s) if (a) p = o ? `const ${f}` : `let ${f}`;
1594
1594
  else {
@@ -1682,11 +1682,11 @@ var bs = /* @__PURE__ */ M(([e]) => q(e.mul(.9478672986).add(.0521327014).pow(2.
1682
1682
  super("vec4"), this.colorNode = e, this.source = t, this.target = n;
1683
1683
  }
1684
1684
  resolveColorSpace(e, t) {
1685
- return t === Ss ? Ee.workingColorSpace : t === Cs ? e.context.outputColorSpace || e.renderer.outputColorSpace : t;
1685
+ return t === Ss ? g.workingColorSpace : t === Cs ? e.context.outputColorSpace || e.renderer.outputColorSpace : t;
1686
1686
  }
1687
1687
  setup(e) {
1688
1688
  let { colorNode: t } = this, n = this.resolveColorSpace(e, this.source), r = this.resolveColorSpace(e, this.target), i = t;
1689
- return Ee.enabled === !1 || n === r || !n || !r ? i : (Ee.getTransfer(n) === "srgb" && (i = z(bs(i.rgb), i.a)), Ee.getPrimaries(n) !== Ee.getPrimaries(r) && (i = z(pi(Ee._getMatrix(new Ze(), n, r)).mul(i.rgb), i.a)), Ee.getTransfer(r) === "srgb" && (i = z(xs(i.rgb), i.a)), i);
1689
+ return g.enabled === !1 || n === r || !n || !r ? i : (g.getTransfer(n) === "srgb" && (i = z(bs(i.rgb), i.a)), g.getPrimaries(n) !== g.getPrimaries(r) && (i = z(pi(g._getMatrix(new Ut(), n, r)).mul(i.rgb), i.a)), g.getTransfer(r) === "srgb" && (i = z(xs(i.rgb), i.a)), i);
1690
1690
  }
1691
1691
  }, Ts = (e, t) => new ws(O(e), Ss, t), Es = (e, t) => new ws(O(e), t, Ss), Ds = (e, t, n) => new ws(O(e), t, n);
1692
1692
  D("workingToColorSpace", Ts), D("colorSpaceToWorking", Es);
@@ -1773,21 +1773,21 @@ var Os = class extends er {
1773
1773
  let t = this.colorNode || e.context.color, n = this._toneMapping;
1774
1774
  if (n === 0) return t;
1775
1775
  let r = null, i = e.renderer.library.getToneMappingFunction(n);
1776
- return i === null ? (C("ToneMappingNode: Unsupported Tone Mapping configuration.", n), r = t) : r = z(i(t.rgb, this.exposureNode), t.a), r;
1776
+ return i === null ? (y("ToneMappingNode: Unsupported Tone Mapping configuration.", n), r = t) : r = z(i(t.rgb, this.exposureNode), t.a), r;
1777
1777
  }
1778
1778
  }, Ps = (e, t, n) => new Ns(e, O(t), O(n)), Fs = /* @__PURE__ */ Ms("toneMappingExposure", "float");
1779
1779
  D("toneMapping", (e, t, n) => Ps(t, n, e));
1780
1780
  var Is = /* @__PURE__ */ new WeakMap();
1781
1781
  function Ls(e, t) {
1782
1782
  let n = Is.get(e);
1783
- return n === void 0 && (n = new Oe(e, t), Is.set(e, n)), n;
1783
+ return n === void 0 && (n = new v(e, t), Is.set(e, n)), n;
1784
1784
  }
1785
1785
  var Rs = class extends cr {
1786
1786
  static get type() {
1787
1787
  return "BufferAttributeNode";
1788
1788
  }
1789
1789
  constructor(e, t = null, n = 0, r = 0) {
1790
- super(e, t), this.isBufferNode = !0, this.bufferType = t, this.bufferStride = n, this.bufferOffset = r, this.usage = qt, this.instanced = !1, this.attribute = null, this.global = !0, e && e.isBufferAttribute === !0 && e.itemSize <= 4 && (this.attribute = e, this.usage = e.usage, this.instanced = e.isInstancedBufferAttribute);
1790
+ super(e, t), this.isBufferNode = !0, this.bufferType = t, this.bufferStride = n, this.bufferOffset = r, this.usage = Et, this.instanced = !1, this.attribute = null, this.global = !0, e && e.isBufferAttribute === !0 && e.itemSize <= 4 && (this.attribute = e, this.usage = e.usage, this.instanced = e.isInstancedBufferAttribute);
1791
1791
  }
1792
1792
  getHash(e) {
1793
1793
  let t;
@@ -1804,7 +1804,7 @@ var Rs = class extends cr {
1804
1804
  if (this.attribute !== null) return;
1805
1805
  let t = this.getNodeType(e), n = e.getTypeLength(t), r = this.value, i = this.bufferStride || n, a = this.bufferOffset, o;
1806
1806
  o = r.isInterleavedBuffer === !0 ? r : r.isBufferAttribute === !0 ? Ls(r.array, i) : Ls(r, i);
1807
- let s = new m(o, n, a);
1807
+ let s = new h(o, n, a);
1808
1808
  o.setUsage(this.usage), this.attribute = s, this.attribute.isInstancedBufferAttribute = this.instanced;
1809
1809
  }
1810
1810
  generate(e) {
@@ -1821,10 +1821,10 @@ var Rs = class extends cr {
1821
1821
  return this.instanced = e, this;
1822
1822
  }
1823
1823
  };
1824
- function zs(e, t = null, n = 0, r = 0, i = qt, a = !1) {
1824
+ function zs(e, t = null, n = 0, r = 0, i = Et, a = !1) {
1825
1825
  return t === "mat3" || t === null && e.itemSize === 9 ? pi(new Rs(e, "vec3", 9, 0).setUsage(i).setInstanced(a), new Rs(e, "vec3", 9, 3).setUsage(i).setInstanced(a), new Rs(e, "vec3", 9, 6).setUsage(i).setInstanced(a)) : t === "mat4" || t === null && e.itemSize === 16 ? mi(new Rs(e, "vec4", 16, 0).setUsage(i).setInstanced(a), new Rs(e, "vec4", 16, 4).setUsage(i).setInstanced(a), new Rs(e, "vec4", 16, 8).setUsage(i).setInstanced(a), new Rs(e, "vec4", 16, 12).setUsage(i).setInstanced(a)) : new Rs(e, t, n, r).setUsage(i);
1826
1826
  }
1827
- var Bs = (e, t = null, n = 0, r = 0) => zs(e, t, n, r), Vs = (e, t = null, n = 0, r = 0) => zs(e, t, n, r, _e), Hs = (e, t = null, n = 0, r = 0) => zs(e, t, n, r, qt, !0), Us = (e, t = null, n = 0, r = 0) => zs(e, t, n, r, _e, !0);
1827
+ var Bs = (e, t = null, n = 0, r = 0) => zs(e, t, n, r), Vs = (t, n = null, r = 0, i = 0) => zs(t, n, r, i, e), Hs = (e, t = null, n = 0, r = 0) => zs(e, t, n, r, Et, !0), Us = (t, n = null, r = 0, i = 0) => zs(t, n, r, i, e, !0);
1828
1828
  D("toAttribute", (e) => Bs(e.value));
1829
1829
  var Ws = class e extends E {
1830
1830
  static get type() {
@@ -1861,7 +1861,7 @@ var Gs = /* @__PURE__ */ A(Ws, Ws.VERTEX), Ks = /* @__PURE__ */ A(Ws, Ws.INSTANC
1861
1861
  return this.name = e, this;
1862
1862
  }
1863
1863
  label(e) {
1864
- return v("TSL: \"label()\" has been deprecated. Use \"setName()\" instead.", new On()), this.setName(e);
1864
+ return w("TSL: \"label()\" has been deprecated. Use \"setName()\" instead.", new On()), this.setName(e);
1865
1865
  }
1866
1866
  onInit(e) {
1867
1867
  return this.onInitFunction = e, this;
@@ -1892,10 +1892,10 @@ var Gs = /* @__PURE__ */ A(Ws, Ws.VERTEX), Ks = /* @__PURE__ */ A(Ws, Ws.INSTANC
1892
1892
  }
1893
1893
  }
1894
1894
  }, Qs = (e, t = [64]) => {
1895
- (t.length === 0 || t.length > 3) && C("TSL: compute() workgroupSize must have 1, 2, or 3 elements", new On());
1895
+ (t.length === 0 || t.length > 3) && y("TSL: compute() workgroupSize must have 1, 2, or 3 elements", new On());
1896
1896
  for (let e = 0; e < t.length; e++) {
1897
1897
  let n = t[e];
1898
- (typeof n != "number" || n <= 0 || !Number.isInteger(n)) && C(`TSL: compute() workgroupSize element at index [ ${e} ] must be a positive integer`, new On());
1898
+ (typeof n != "number" || n <= 0 || !Number.isInteger(n)) && y(`TSL: compute() workgroupSize element at index [ ${e} ] must be a positive integer`, new On());
1899
1899
  }
1900
1900
  for (; t.length < 3;) t.push(1);
1901
1901
  return new Zs(O(e), t);
@@ -1931,7 +1931,7 @@ var ec = class extends E {
1931
1931
  }
1932
1932
  }, tc = (e) => new ec(O(e));
1933
1933
  function nc(e, t = !0) {
1934
- return v("TSL: \"cache()\" has been deprecated. Use \"isolate()\" instead."), tc(e).setParent(t);
1934
+ return w("TSL: \"cache()\" has been deprecated. Use \"isolate()\" instead."), tc(e).setParent(t);
1935
1935
  }
1936
1936
  D("cache", nc), D("isolate", tc);
1937
1937
  var rc = class extends E {
@@ -1987,7 +1987,7 @@ var dc = class extends nr {
1987
1987
  }
1988
1988
  setup({ context: e }) {
1989
1989
  let t = this.colorNode || e.color, n = (this._toneMapping === null ? e.toneMapping : this._toneMapping) || 0, r = (this.outputColorSpace === null ? e.outputColorSpace : this.outputColorSpace) || "";
1990
- return n !== 0 && (t = t.toneMapping(n)), r !== "" && r !== Ee.workingColorSpace && (t = t.workingToColorSpace(r)), t;
1990
+ return n !== 0 && (t = t.toneMapping(n)), r !== "" && r !== g.workingColorSpace && (t = t.workingToColorSpace(r)), t;
1991
1991
  }
1992
1992
  }, fc = (e, t = null, n = null) => new dc(O(e), t, n);
1993
1993
  D("renderOutput", fc);
@@ -2012,13 +2012,13 @@ var pc = class extends nr {
2012
2012
  if (t !== null) t(e, n);
2013
2013
  else {
2014
2014
  let t = "--- TSL debug - " + e.shaderStage + " shader ---", r = "-".repeat(t.length), i = "";
2015
- i += "// #" + t + "#\n", i += e.flow.code.replace(/^\t/gm, "") + "\n", i += "/* ... */ " + n + " /* ... */\n", i += "// #" + r + "#\n", xe(i);
2015
+ i += "// #" + t + "#\n", i += e.flow.code.replace(/^\t/gm, "") + "\n", i += "/* ... */ " + n + " /* ... */\n", i += "// #" + r + "#\n", yn(i);
2016
2016
  }
2017
2017
  return n;
2018
2018
  }
2019
2019
  }, mc = (e, t = null) => new pc(O(e), t).toStack();
2020
2020
  D("debug", mc);
2021
- var hc = class extends It {
2021
+ var hc = class extends nn {
2022
2022
  constructor() {
2023
2023
  super(), this._renderer = null, this.currentFrame = null;
2024
2024
  }
@@ -2060,7 +2060,7 @@ var hc = class extends It {
2060
2060
  }
2061
2061
  setup(e) {
2062
2062
  let t = this.node;
2063
- return e.context.inspector === !0 && this.callback !== null && (t = this.callback(t)), e.renderer.backend.isWebGPUBackend !== !0 && e.renderer.inspector.constructor !== hc && Ae("TSL: \".toInspector()\" is only available with WebGPU."), t;
2063
+ return e.context.inspector === !0 && this.callback !== null && (t = this.callback(t)), e.renderer.backend.isWebGPUBackend !== !0 && e.renderer.inspector.constructor !== hc && Be("TSL: \".toInspector()\" is only available with WebGPU."), t;
2064
2064
  }
2065
2065
  };
2066
2066
  function _c(e, t = "", n = null) {
@@ -2068,7 +2068,7 @@ function _c(e, t = "", n = null) {
2068
2068
  }
2069
2069
  D("toInspector", _c);
2070
2070
  function vc(e) {
2071
- v("TSL: AddNodeElement has been removed in favor of tree-shaking. Trying add", e);
2071
+ w("TSL: AddNodeElement has been removed in favor of tree-shaking. Trying add", e);
2072
2072
  }
2073
2073
  var yc = class extends E {
2074
2074
  static get type() {
@@ -2102,7 +2102,7 @@ var yc = class extends E {
2102
2102
  if (e.hasGeometryAttribute(t) === !0) {
2103
2103
  let r = e.geometry.getAttribute(t), i = e.getTypeFromAttribute(r), a = e.getAttribute(t, i);
2104
2104
  return e.shaderStage === "vertex" ? e.format(a.name, i, n) : vs(this).build(e, n);
2105
- } else return v(`AttributeNode: Vertex attribute "${t}" not found on geometry.`), e.generateConst(n);
2105
+ } else return w(`AttributeNode: Vertex attribute "${t}" not found on geometry.`), e.generateConst(n);
2106
2106
  }
2107
2107
  serialize(e) {
2108
2108
  super.serialize(e), e.global = this.global, e._attributeName = this._attributeName;
@@ -2145,7 +2145,7 @@ var yc = class extends E {
2145
2145
  constructor(e, t = null) {
2146
2146
  super(e), this.name = "NodeError", this.stackTrace = t;
2147
2147
  }
2148
- }, Dc = /* @__PURE__ */ new Xe(), Oc = class extends ra {
2148
+ }, Dc = /* @__PURE__ */ new Ht(), Oc = class extends ra {
2149
2149
  static get type() {
2150
2150
  return "TextureNode";
2151
2151
  }
@@ -2193,10 +2193,10 @@ var yc = class extends E {
2193
2193
  })(), i = this.levelNode;
2194
2194
  i === null && e.context.getTextureLevel && (i = e.context.getTextureLevel(this));
2195
2195
  let a = null, o = null;
2196
- if (this.compareNode !== null) if (e.renderer.hasCompatibility(f.TEXTURE_COMPARE)) a = this.compareNode;
2196
+ if (this.compareNode !== null) if (e.renderer.hasCompatibility(p.TEXTURE_COMPARE)) a = this.compareNode;
2197
2197
  else {
2198
2198
  let e = n.compareFunction;
2199
- e === null || e === 513 || e === 515 || e === 516 || e === 518 ? o = this.compareNode : (a = this.compareNode, Ae("TSL: Only \"LessCompare\", \"LessEqualCompare\", \"GreaterCompare\" and \"GreaterEqualCompare\" are supported for depth texture comparison fallback."));
2199
+ e === null || e === 513 || e === 515 || e === 516 || e === 518 ? o = this.compareNode : (a = this.compareNode, Be("TSL: Only \"LessCompare\", \"LessEqualCompare\", \"GreaterCompare\" and \"GreaterEqualCompare\" are supported for depth texture comparison fallback."));
2200
2200
  }
2201
2201
  t.uvNode = r, t.levelNode = i, t.biasNode = this.biasNode, t.compareNode = a, t.compareStepNode = o, t.gradNode = this.gradNode, t.depthNode = this.depthNode, t.offsetNode = this.offsetNode;
2202
2202
  }
@@ -2249,7 +2249,7 @@ var yc = class extends E {
2249
2249
  let t = this.clone();
2250
2250
  t.biasNode = O(e).mul(Tc(t)), t.referenceNode = this.getBase();
2251
2251
  let n = t.value;
2252
- return t.generateMipmaps === !1 && (n && n.generateMipmaps === !1 || n.minFilter === 1003 || n.magFilter === 1003) && (v("TSL: texture().blur() requires mipmaps and sampling. Use .generateMipmaps=true and .minFilter/.magFilter=THREE.LinearFilter in the Texture."), t.biasNode = null), O(t);
2252
+ return t.generateMipmaps === !1 && (n && n.generateMipmaps === !1 || n.minFilter === 1003 || n.magFilter === 1003) && (w("TSL: texture().blur() requires mipmaps and sampling. Use .generateMipmaps=true and .minFilter/.magFilter=THREE.LinearFilter in the Texture."), t.biasNode = null), O(t);
2253
2253
  }
2254
2254
  level(e) {
2255
2255
  let t = this.clone();
@@ -2411,7 +2411,7 @@ var yc = class extends E {
2411
2411
  }
2412
2412
  setup() {
2413
2413
  let t = this.scope, n = null;
2414
- return n = t === e.SIZE ? U(Hc ||= new et()) : t === e.VIEWPORT ? U(Uc ||= new Ce()) : t === e.DPR ? U(1) : L(Jc.div(qc)), this._output = n, n;
2414
+ return n = t === e.SIZE ? U(Hc ||= new mn()) : t === e.VIEWPORT ? U(Uc ||= new u()) : t === e.DPR ? U(1) : L(Jc.div(qc)), this._output = n, n;
2415
2415
  }
2416
2416
  generate(t) {
2417
2417
  if (this.scope === e.COORDINATE) {
@@ -2426,7 +2426,7 @@ var yc = class extends E {
2426
2426
  }
2427
2427
  };
2428
2428
  Wc.COORDINATE = "coordinate", Wc.VIEWPORT = "viewport", Wc.SIZE = "size", Wc.UV = "uv", Wc.DPR = "dpr";
2429
- var Gc = /* @__PURE__ */ A(Wc, Wc.DPR), Kc = /* @__PURE__ */ A(Wc, Wc.UV), qc = /* @__PURE__ */ A(Wc, Wc.SIZE), Jc = /* @__PURE__ */ A(Wc, Wc.COORDINATE), Yc = /* @__PURE__ */ A(Wc, Wc.VIEWPORT), Xc = Yc.zw, Zc = /* @__PURE__ */ Jc.sub(Yc.xy), Qc = /* @__PURE__ */ Zc.div(Xc), $c = /* @__PURE__ */ M(() => (v("TSL: \"viewportResolution\" is deprecated. Use \"screenSize\" instead.", new On()), qc), "vec2").once()(), el = null, tl = null, nl = null, rl = null, il = null, al = null, ol = null, sl = null, cl = null, ll = null, ul = null, dl = null, fl = null, pl = null, ml = /* @__PURE__ */ U(0, "uint").setName("u_cameraIndex").setGroup(ea("cameraIndex")).toVarying("v_cameraIndex"), hl = /* @__PURE__ */ U("float").setName("cameraNear").setGroup(H).onRenderUpdate(({ camera: e }) => e.near), gl = /* @__PURE__ */ U("float").setName("cameraFar").setGroup(H).onRenderUpdate(({ camera: e }) => e.far), _l = /* @__PURE__ */ M(({ camera: e }) => {
2429
+ var Gc = /* @__PURE__ */ A(Wc, Wc.DPR), Kc = /* @__PURE__ */ A(Wc, Wc.UV), qc = /* @__PURE__ */ A(Wc, Wc.SIZE), Jc = /* @__PURE__ */ A(Wc, Wc.COORDINATE), Yc = /* @__PURE__ */ A(Wc, Wc.VIEWPORT), Xc = Yc.zw, Zc = /* @__PURE__ */ Jc.sub(Yc.xy), Qc = /* @__PURE__ */ Zc.div(Xc), $c = /* @__PURE__ */ M(() => (w("TSL: \"viewportResolution\" is deprecated. Use \"screenSize\" instead.", new On()), qc), "vec2").once()(), el = null, tl = null, nl = null, rl = null, il = null, al = null, ol = null, sl = null, cl = null, ll = null, ul = null, dl = null, fl = null, pl = null, ml = /* @__PURE__ */ U(0, "uint").setName("u_cameraIndex").setGroup(ea("cameraIndex")).toVarying("v_cameraIndex"), hl = /* @__PURE__ */ U("float").setName("cameraNear").setGroup(H).onRenderUpdate(({ camera: e }) => e.near), gl = /* @__PURE__ */ U("float").setName("cameraFar").setGroup(H).onRenderUpdate(({ camera: e }) => e.far), _l = /* @__PURE__ */ M(({ camera: e }) => {
2430
2430
  let t;
2431
2431
  if (e.isArrayCamera && e.cameras.length > 0) {
2432
2432
  let n = [];
@@ -2470,12 +2470,12 @@ var Gc = /* @__PURE__ */ A(Wc, Wc.DPR), Kc = /* @__PURE__ */ A(Wc, Wc.UV), qc =
2470
2470
  let t;
2471
2471
  if (e.isArrayCamera && e.cameras.length > 0) {
2472
2472
  let n = [];
2473
- for (let t = 0, r = e.cameras.length; t < r; t++) n.push(new w());
2473
+ for (let t = 0, r = e.cameras.length; t < r; t++) n.push(new C());
2474
2474
  dl === null ? dl = zc(n).setGroup(H).setName("cameraPositions").onRenderUpdate(({ camera: e }, t) => {
2475
2475
  let n = e.cameras, r = t.array;
2476
2476
  for (let e = 0, t = n.length; e < t; e++) r[e].setFromMatrixPosition(n[e].matrixWorld);
2477
2477
  }) : dl.array = n, t = dl.element(e.isMultiViewCamera ? Vc("gl_ViewID_OVR") : ml).toConst("cameraPosition");
2478
- } else ul === null && (ul = U(new w()).setName("cameraPosition").setGroup(H).onRenderUpdate(({ camera: e }, t) => t.value.setFromMatrixPosition(e.matrixWorld))), t = ul;
2478
+ } else ul === null && (ul = U(new C()).setName("cameraPosition").setGroup(H).onRenderUpdate(({ camera: e }, t) => t.value.setFromMatrixPosition(e.matrixWorld))), t = ul;
2479
2479
  return t;
2480
2480
  }).once()(), Cl = /* @__PURE__ */ M(({ camera: e }) => {
2481
2481
  let t;
@@ -2485,7 +2485,7 @@ var Gc = /* @__PURE__ */ A(Wc, Wc.DPR), Kc = /* @__PURE__ */ A(Wc, Wc.UV), qc =
2485
2485
  pl === null ? pl = zc(n, "vec4").setGroup(H).setName("cameraViewports") : pl.array = n, t = pl.element(ml).toConst("cameraViewport");
2486
2486
  } else fl === null && (fl = z(0, 0, qc.x, qc.y).toConst("cameraViewport")), t = fl;
2487
2487
  return t;
2488
- }).once()(), wl = /* @__PURE__ */ new Ge(), Tl = class e extends E {
2488
+ }).once()(), wl = /* @__PURE__ */ new Se(), Tl = class e extends E {
2489
2489
  static get type() {
2490
2490
  return "Object3DNode";
2491
2491
  }
@@ -2501,12 +2501,12 @@ var Gc = /* @__PURE__ */ A(Wc, Wc.DPR), Kc = /* @__PURE__ */ A(Wc, Wc.UV), qc =
2501
2501
  update(t) {
2502
2502
  let n = this.object3d, r = this.uniformNode, i = this.scope;
2503
2503
  if (i === e.WORLD_MATRIX) r.value = n.matrixWorld;
2504
- else if (i === e.POSITION) r.value = r.value || new w(), r.value.setFromMatrixPosition(n.matrixWorld);
2505
- else if (i === e.SCALE) r.value = r.value || new w(), r.value.setFromMatrixScale(n.matrixWorld);
2506
- else if (i === e.DIRECTION) r.value = r.value || new w(), n.getWorldDirection(r.value);
2504
+ else if (i === e.POSITION) r.value = r.value || new C(), r.value.setFromMatrixPosition(n.matrixWorld);
2505
+ else if (i === e.SCALE) r.value = r.value || new C(), r.value.setFromMatrixScale(n.matrixWorld);
2506
+ else if (i === e.DIRECTION) r.value = r.value || new C(), n.getWorldDirection(r.value);
2507
2507
  else if (i === e.VIEW_POSITION) {
2508
2508
  let e = t.camera;
2509
- r.value = r.value || new w(), r.value.setFromMatrixPosition(n.matrixWorld), r.value.applyMatrix4(e.matrixWorldInverse);
2509
+ r.value = r.value || new C(), r.value.setFromMatrixPosition(n.matrixWorld), r.value.applyMatrix4(e.matrixWorldInverse);
2510
2510
  } else if (i === e.RADIUS) {
2511
2511
  let e = t.object.geometry;
2512
2512
  e.boundingSphere === null && e.computeBoundingSphere(), wl.copy(e.boundingSphere).applyMatrix4(n.matrixWorld), r.value = wl.radius;
@@ -2534,10 +2534,10 @@ var El = /* @__PURE__ */ k(Tl, Tl.DIRECTION).setParameterLength(1), Dl = /* @__P
2534
2534
  update(e) {
2535
2535
  this.object3d = e.object, super.update(e);
2536
2536
  }
2537
- }, Nl = /* @__PURE__ */ A(Ml, Ml.DIRECTION), Pl = /* @__PURE__ */ A(Ml, Ml.WORLD_MATRIX), Fl = /* @__PURE__ */ A(Ml, Ml.POSITION), Il = /* @__PURE__ */ A(Ml, Ml.SCALE), Ll = /* @__PURE__ */ A(Ml, Ml.VIEW_POSITION), Rl = /* @__PURE__ */ A(Ml, Ml.RADIUS), zl = /* @__PURE__ */ U(new Ze()).onObjectUpdate(({ object: e }, t) => t.value.getNormalMatrix(e.matrixWorld)), Bl = /* @__PURE__ */ U(new Lt()).onObjectUpdate(({ object: e }, t) => t.value.copy(e.matrixWorld).invert()), Vl = /* @__PURE__ */ M((e) => e.context.modelViewMatrix || Hl).once()().toVar("modelViewMatrix"), Hl = /* @__PURE__ */ yl.mul(Pl), Ul = /* @__PURE__ */ M((e) => (e.context.isHighPrecisionModelViewMatrix = !0, U("mat4").onObjectUpdate(({ object: e, camera: t }) => e.modelViewMatrix.multiplyMatrices(t.matrixWorldInverse, e.matrixWorld)))).once()().toVar("highpModelViewMatrix"), Wl = /* @__PURE__ */ M((e) => {
2537
+ }, Nl = /* @__PURE__ */ A(Ml, Ml.DIRECTION), Pl = /* @__PURE__ */ A(Ml, Ml.WORLD_MATRIX), Fl = /* @__PURE__ */ A(Ml, Ml.POSITION), Il = /* @__PURE__ */ A(Ml, Ml.SCALE), Ll = /* @__PURE__ */ A(Ml, Ml.VIEW_POSITION), Rl = /* @__PURE__ */ A(Ml, Ml.RADIUS), zl = /* @__PURE__ */ U(new Ut()).onObjectUpdate(({ object: e }, t) => t.value.getNormalMatrix(e.matrixWorld)), Bl = /* @__PURE__ */ U(new rn()).onObjectUpdate(({ object: e }, t) => t.value.copy(e.matrixWorld).invert()), Vl = /* @__PURE__ */ M((e) => e.context.modelViewMatrix || Hl).once()().toVar("modelViewMatrix"), Hl = /* @__PURE__ */ yl.mul(Pl), Ul = /* @__PURE__ */ M((e) => (e.context.isHighPrecisionModelViewMatrix = !0, U("mat4").onObjectUpdate(({ object: e, camera: t }) => e.modelViewMatrix.multiplyMatrices(t.matrixWorldInverse, e.matrixWorld)))).once()().toVar("highpModelViewMatrix"), Wl = /* @__PURE__ */ M((e) => {
2538
2538
  let t = e.context.isHighPrecisionModelViewMatrix;
2539
2539
  return U("mat3").onObjectUpdate(({ object: e, camera: n }) => (t !== !0 && e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse, e.matrixWorld), e.normalMatrix.getNormalMatrix(e.modelViewMatrix)));
2540
- }).once()().toVar("highpModelNormalViewMatrix"), Gl = /* @__PURE__ */ M((e) => e.shaderStage === "fragment" ? e.context.clipSpace.toVarying("v_clipSpace") : (Ae("TSL: `clipSpace` is only available in fragment stage."), z())).once()(), Kl = /* @__PURE__ */ bc("position", "vec3"), ql = /* @__PURE__ */ Kl.toVarying("positionLocal"), Jl = /* @__PURE__ */ Kl.toVarying("positionPrevious"), Yl = /* @__PURE__ */ M((e) => Pl.mul(ql).xyz.toVarying(e.getSubBuildProperty("v_positionWorld")), "vec3").once(["POSITION"])(), Xl = /* @__PURE__ */ M(() => ql.transformDirection(Pl).toVarying("v_positionWorldDirection").normalize().toVar("positionWorldDirection"), "vec3").once(["POSITION"])(), Zl = /* @__PURE__ */ M((e) => {
2540
+ }).once()().toVar("highpModelNormalViewMatrix"), Gl = /* @__PURE__ */ M((e) => e.shaderStage === "fragment" ? e.context.clipSpace.toVarying("v_clipSpace") : (Be("TSL: `clipSpace` is only available in fragment stage."), z())).once()(), Kl = /* @__PURE__ */ bc("position", "vec3"), ql = /* @__PURE__ */ Kl.toVarying("positionLocal"), Jl = /* @__PURE__ */ Kl.toVarying("positionPrevious"), Yl = /* @__PURE__ */ M((e) => Pl.mul(ql).xyz.toVarying(e.getSubBuildProperty("v_positionWorld")), "vec3").once(["POSITION"])(), Xl = /* @__PURE__ */ M(() => ql.transformDirection(Pl).toVarying("v_positionWorldDirection").normalize().toVar("positionWorldDirection"), "vec3").once(["POSITION"])(), Zl = /* @__PURE__ */ M((e) => {
2541
2541
  if (e.shaderStage === "fragment" && e.material.vertexNode) {
2542
2542
  let e = vl.mul(Gl);
2543
2543
  return e.xyz.div(e.w).toVar("positionView");
@@ -2561,7 +2561,7 @@ var El = /* @__PURE__ */ k(Tl, Tl.DIRECTION).setParameterLength(1), Dl = /* @__P
2561
2561
  }, eu = /* @__PURE__ */ A($l), tu = /* @__PURE__ */ P(eu).mul(2).sub(1), nu = /* @__PURE__ */ M(([e], { material: t }) => {
2562
2562
  let n = t.side;
2563
2563
  return n === 1 ? e = e.mul(-1) : n === 2 && (e = e.mul(tu)), e;
2564
- }), ru = /* @__PURE__ */ bc("normal", "vec3"), iu = /* @__PURE__ */ M((e) => e.geometry.hasAttribute("normal") === !1 ? (v("TSL: Vertex attribute \"normal\" not found on geometry."), R(0, 1, 0)) : ru, "vec3").once()().toVar("normalLocal"), au = /* @__PURE__ */ Zl.dFdx().cross(Zl.dFdy()).normalize().toVar("normalFlat"), ou = /* @__PURE__ */ M((e) => {
2564
+ }), ru = /* @__PURE__ */ bc("normal", "vec3"), iu = /* @__PURE__ */ M((e) => e.geometry.hasAttribute("normal") === !1 ? (w("TSL: Vertex attribute \"normal\" not found on geometry."), R(0, 1, 0)) : ru, "vec3").once()().toVar("normalLocal"), au = /* @__PURE__ */ Zl.dFdx().cross(Zl.dFdy()).normalize().toVar("normalFlat"), ou = /* @__PURE__ */ M((e) => {
2565
2565
  let t;
2566
2566
  return t = e.isFlatShading() ? au : du(iu).toVarying("v_normalViewGeometry").normalize(), t;
2567
2567
  }, "vec3").once()().toVar("normalViewGeometry"), su = /* @__PURE__ */ M((e) => {
@@ -2587,14 +2587,14 @@ var El = /* @__PURE__ */ k(Tl, Tl.DIRECTION).setParameterLength(1), Dl = /* @__P
2587
2587
  if (n) return n.transformDirection(e);
2588
2588
  let r = zl.mul(e);
2589
2589
  return yl.transformDirection(r);
2590
- }), fu = M(() => (v("TSL: \"transformedNormalView\" is deprecated. Use \"normalView\" instead."), Y)).once(["NORMAL", "VERTEX"])(), pu = M(() => (v("TSL: \"transformedNormalWorld\" is deprecated. Use \"normalWorld\" instead."), cu)).once(["NORMAL", "VERTEX"])(), mu = M(() => (v("TSL: \"transformedClearcoatNormalView\" is deprecated. Use \"clearcoatNormalView\" instead."), lu)).once(["NORMAL", "VERTEX"])(), hu = /* @__PURE__ */ new Lt(), gu = /* @__PURE__ */ U(0).onReference(({ material: e }) => e).onObjectUpdate(({ material: e }) => e.refractionRatio), _u = /* @__PURE__ */ U(1).onReference(({ material: e }) => e).onObjectUpdate(function({ material: e, scene: t }) {
2590
+ }), fu = M(() => (w("TSL: \"transformedNormalView\" is deprecated. Use \"normalView\" instead."), Y)).once(["NORMAL", "VERTEX"])(), pu = M(() => (w("TSL: \"transformedNormalWorld\" is deprecated. Use \"normalWorld\" instead."), cu)).once(["NORMAL", "VERTEX"])(), mu = M(() => (w("TSL: \"transformedClearcoatNormalView\" is deprecated. Use \"clearcoatNormalView\" instead."), lu)).once(["NORMAL", "VERTEX"])(), hu = /* @__PURE__ */ new rn(), gu = /* @__PURE__ */ U(0).onReference(({ material: e }) => e).onObjectUpdate(({ material: e }) => e.refractionRatio), _u = /* @__PURE__ */ U(1).onReference(({ material: e }) => e).onObjectUpdate(function({ material: e, scene: t }) {
2591
2591
  return e.envMap ? e.envMapIntensity : t.environmentIntensity;
2592
- }), vu = /* @__PURE__ */ U(new Lt()).onReference(function(e) {
2592
+ }), vu = /* @__PURE__ */ U(new rn()).onReference(function(e) {
2593
2593
  return e.material;
2594
2594
  }).onObjectUpdate(function({ material: e, scene: t }) {
2595
2595
  let n = t.environment !== null && e.envMap === null ? t.environmentRotation : e.envMapRotation;
2596
2596
  return n ? hu.makeRotationFromEuler(n).transpose() : hu.identity(), hu;
2597
- }), yu = /* @__PURE__ */ Ql.negate().reflect(Y), bu = /* @__PURE__ */ Ql.negate().refract(Y, gu), xu = /* @__PURE__ */ yu.transformDirection(yl).toVar("reflectVector"), Su = /* @__PURE__ */ bu.transformDirection(yl).toVar("reflectVector"), Cu = /* @__PURE__ */ new bt(), wu = class extends Oc {
2597
+ }), yu = /* @__PURE__ */ Ql.negate().reflect(Y), bu = /* @__PURE__ */ Ql.negate().refract(Y, gu), xu = /* @__PURE__ */ yu.transformDirection(yl).toVar("reflectVector"), Su = /* @__PURE__ */ bu.transformDirection(yl).toVar("reflectVector"), Cu = /* @__PURE__ */ new ue(), wu = class extends Oc {
2598
2598
  static get type() {
2599
2599
  return "CubeTextureNode";
2600
2600
  }
@@ -2606,7 +2606,7 @@ var El = /* @__PURE__ */ k(Tl, Tl.DIRECTION).setParameterLength(1), Dl = /* @__P
2606
2606
  }
2607
2607
  getDefaultUV() {
2608
2608
  let e = this.value;
2609
- return e.mapping === 301 ? xu : e.mapping === 302 ? Su : (C("CubeTextureNode: Mapping \"%s\" not supported.", e.mapping), R(0, 0, 0));
2609
+ return e.mapping === 301 ? xu : e.mapping === 302 ? Su : (y("CubeTextureNode: Mapping \"%s\" not supported.", e.mapping), R(0, 0, 0));
2610
2610
  }
2611
2611
  setUpdateMatrix() {}
2612
2612
  setupUV(e, t) {
@@ -2650,7 +2650,7 @@ var El = /* @__PURE__ */ k(Tl, Tl.DIRECTION).setParameterLength(1), Dl = /* @__P
2650
2650
  return this.name = e, this;
2651
2651
  }
2652
2652
  label(e) {
2653
- return v("TSL: \"label()\" has been deprecated. Use \"setName()\" instead."), this.setName(e);
2653
+ return w("TSL: \"label()\" has been deprecated. Use \"setName()\" instead."), this.setName(e);
2654
2654
  }
2655
2655
  setNodeType(e) {
2656
2656
  let t = null;
@@ -2709,12 +2709,12 @@ var El = /* @__PURE__ */ k(Tl, Tl.DIRECTION).setParameterLength(1), Dl = /* @__P
2709
2709
  }
2710
2710
  setup(e) {
2711
2711
  let { normalMapType: t, scaleNode: n, unpackNormalMode: r } = this, i = this.node.mul(2).sub(1);
2712
- if (t === 0 ? r === "rg" ? i = ld(i.xy) : r === "ga" ? i = ld(i.yw) : r !== "" && C(`THREE.NodeMaterial: Unexpected unpack normal mode: ${r}`) : r !== "" && C(`THREE.NodeMaterial: Normal map type '${t}' is not compatible with unpack normal mode '${r}'`), n !== null) {
2712
+ if (t === 0 ? r === "rg" ? i = ld(i.xy) : r === "ga" ? i = ld(i.yw) : r !== "" && y(`THREE.NodeMaterial: Unexpected unpack normal mode: ${r}`) : r !== "" && y(`THREE.NodeMaterial: Normal map type '${t}' is not compatible with unpack normal mode '${r}'`), n !== null) {
2713
2713
  let t = n;
2714
2714
  e.isFlatShading() === !0 && (t = nu(t)), i = R(i.xy.mul(t), i.z);
2715
2715
  }
2716
2716
  let a = null;
2717
- return t === 1 ? a = du(i) : t === 0 ? a = rd.mul(i).normalize() : (C(`NodeMaterial: Unsupported normal map type: ${t}`), a = Y), a;
2717
+ return t === 1 ? a = du(i) : t === 0 ? a = rd.mul(i).normalize() : (y(`NodeMaterial: Unsupported normal map type: ${t}`), a = Y), a;
2718
2718
  }
2719
2719
  }, dd = /* @__PURE__ */ k(ud).setParameterLength(1, 2), fd = M(({ textureNode: e, bumpScale: t }) => {
2720
2720
  let n = (t) => e.isolate().context({
@@ -2829,7 +2829,7 @@ var El = /* @__PURE__ */ k(Tl, Tl.DIRECTION).setParameterLength(1), Dl = /* @__P
2829
2829
  }
2830
2830
  };
2831
2831
  X.ALPHA_TEST = "alphaTest", X.COLOR = "color", X.OPACITY = "opacity", X.SHININESS = "shininess", X.SPECULAR = "specular", X.SPECULAR_STRENGTH = "specularStrength", X.SPECULAR_INTENSITY = "specularIntensity", X.SPECULAR_COLOR = "specularColor", X.REFLECTIVITY = "reflectivity", X.ROUGHNESS = "roughness", X.METALNESS = "metalness", X.NORMAL = "normal", X.CLEARCOAT = "clearcoat", X.CLEARCOAT_ROUGHNESS = "clearcoatRoughness", X.CLEARCOAT_NORMAL = "clearcoatNormal", X.EMISSIVE = "emissive", X.ROTATION = "rotation", X.SHEEN = "sheen", X.SHEEN_ROUGHNESS = "sheenRoughness", X.ANISOTROPY = "anisotropy", X.IRIDESCENCE = "iridescence", X.IRIDESCENCE_IOR = "iridescenceIOR", X.IRIDESCENCE_THICKNESS = "iridescenceThickness", X.IOR = "ior", X.TRANSMISSION = "transmission", X.THICKNESS = "thickness", X.ATTENUATION_DISTANCE = "attenuationDistance", X.ATTENUATION_COLOR = "attenuationColor", X.LINE_SCALE = "scale", X.LINE_DASH_SIZE = "dashSize", X.LINE_GAP_SIZE = "gapSize", X.LINE_WIDTH = "linewidth", X.LINE_DASH_OFFSET = "dashOffset", X.POINT_SIZE = "size", X.DISPERSION = "dispersion", X.LIGHT_MAP = "light", X.AO = "ao";
2832
- var _d = /* @__PURE__ */ A(X, X.ALPHA_TEST), vd = /* @__PURE__ */ A(X, X.COLOR), yd = /* @__PURE__ */ A(X, X.SHININESS), bd = /* @__PURE__ */ A(X, X.EMISSIVE), xd = /* @__PURE__ */ A(X, X.OPACITY), Sd = /* @__PURE__ */ A(X, X.SPECULAR), Cd = /* @__PURE__ */ A(X, X.SPECULAR_INTENSITY), wd = /* @__PURE__ */ A(X, X.SPECULAR_COLOR), Td = /* @__PURE__ */ A(X, X.SPECULAR_STRENGTH), Ed = /* @__PURE__ */ A(X, X.REFLECTIVITY), Dd = /* @__PURE__ */ A(X, X.ROUGHNESS), Od = /* @__PURE__ */ A(X, X.METALNESS), kd = /* @__PURE__ */ A(X, X.NORMAL), Ad = /* @__PURE__ */ A(X, X.CLEARCOAT), jd = /* @__PURE__ */ A(X, X.CLEARCOAT_ROUGHNESS), Md = /* @__PURE__ */ A(X, X.CLEARCOAT_NORMAL), Nd = /* @__PURE__ */ A(X, X.ROTATION), Pd = /* @__PURE__ */ A(X, X.SHEEN), Fd = /* @__PURE__ */ A(X, X.SHEEN_ROUGHNESS), Id = /* @__PURE__ */ A(X, X.ANISOTROPY), Ld = /* @__PURE__ */ A(X, X.IRIDESCENCE), Rd = /* @__PURE__ */ A(X, X.IRIDESCENCE_IOR), zd = /* @__PURE__ */ A(X, X.IRIDESCENCE_THICKNESS), Bd = /* @__PURE__ */ A(X, X.TRANSMISSION), Vd = /* @__PURE__ */ A(X, X.THICKNESS), Hd = /* @__PURE__ */ A(X, X.IOR), Ud = /* @__PURE__ */ A(X, X.ATTENUATION_DISTANCE), Wd = /* @__PURE__ */ A(X, X.ATTENUATION_COLOR), Gd = /* @__PURE__ */ A(X, X.LINE_SCALE), Kd = /* @__PURE__ */ A(X, X.LINE_DASH_SIZE), qd = /* @__PURE__ */ A(X, X.LINE_GAP_SIZE), Jd = /* @__PURE__ */ A(X, X.LINE_WIDTH), Yd = /* @__PURE__ */ A(X, X.LINE_DASH_OFFSET), Xd = /* @__PURE__ */ A(X, X.POINT_SIZE), Zd = /* @__PURE__ */ A(X, X.DISPERSION), Qd = /* @__PURE__ */ A(X, X.LIGHT_MAP), $d = /* @__PURE__ */ A(X, X.AO), ef = /* @__PURE__ */ U(new et()).onReference(function(e) {
2832
+ var _d = /* @__PURE__ */ A(X, X.ALPHA_TEST), vd = /* @__PURE__ */ A(X, X.COLOR), yd = /* @__PURE__ */ A(X, X.SHININESS), bd = /* @__PURE__ */ A(X, X.EMISSIVE), xd = /* @__PURE__ */ A(X, X.OPACITY), Sd = /* @__PURE__ */ A(X, X.SPECULAR), Cd = /* @__PURE__ */ A(X, X.SPECULAR_INTENSITY), wd = /* @__PURE__ */ A(X, X.SPECULAR_COLOR), Td = /* @__PURE__ */ A(X, X.SPECULAR_STRENGTH), Ed = /* @__PURE__ */ A(X, X.REFLECTIVITY), Dd = /* @__PURE__ */ A(X, X.ROUGHNESS), Od = /* @__PURE__ */ A(X, X.METALNESS), kd = /* @__PURE__ */ A(X, X.NORMAL), Ad = /* @__PURE__ */ A(X, X.CLEARCOAT), jd = /* @__PURE__ */ A(X, X.CLEARCOAT_ROUGHNESS), Md = /* @__PURE__ */ A(X, X.CLEARCOAT_NORMAL), Nd = /* @__PURE__ */ A(X, X.ROTATION), Pd = /* @__PURE__ */ A(X, X.SHEEN), Fd = /* @__PURE__ */ A(X, X.SHEEN_ROUGHNESS), Id = /* @__PURE__ */ A(X, X.ANISOTROPY), Ld = /* @__PURE__ */ A(X, X.IRIDESCENCE), Rd = /* @__PURE__ */ A(X, X.IRIDESCENCE_IOR), zd = /* @__PURE__ */ A(X, X.IRIDESCENCE_THICKNESS), Bd = /* @__PURE__ */ A(X, X.TRANSMISSION), Vd = /* @__PURE__ */ A(X, X.THICKNESS), Hd = /* @__PURE__ */ A(X, X.IOR), Ud = /* @__PURE__ */ A(X, X.ATTENUATION_DISTANCE), Wd = /* @__PURE__ */ A(X, X.ATTENUATION_COLOR), Gd = /* @__PURE__ */ A(X, X.LINE_SCALE), Kd = /* @__PURE__ */ A(X, X.LINE_DASH_SIZE), qd = /* @__PURE__ */ A(X, X.LINE_GAP_SIZE), Jd = /* @__PURE__ */ A(X, X.LINE_WIDTH), Yd = /* @__PURE__ */ A(X, X.LINE_DASH_OFFSET), Xd = /* @__PURE__ */ A(X, X.POINT_SIZE), Zd = /* @__PURE__ */ A(X, X.DISPERSION), Qd = /* @__PURE__ */ A(X, X.LIGHT_MAP), $d = /* @__PURE__ */ A(X, X.AO), ef = /* @__PURE__ */ U(new mn()).onReference(function(e) {
2833
2833
  return e.material;
2834
2834
  }).onRenderUpdate(function({ material: e }) {
2835
2835
  this.value.set(e.anisotropy * Math.cos(e.anisotropyRotation), e.anisotropy * Math.sin(e.anisotropyRotation));
@@ -2943,7 +2943,7 @@ var _d = /* @__PURE__ */ A(X, X.ALPHA_TEST), vd = /* @__PURE__ */ A(X, X.COLOR),
2943
2943
  if (r && n === null) {
2944
2944
  if (i) n = of(r, "vec3", Math.max(r.count, 1)).element(Ks);
2945
2945
  else {
2946
- let e = new mn(r.array, 3), t = r.usage === 35048 ? Us : Hs;
2946
+ let e = new je(r.array, 3), t = r.usage === 35048 ? Us : Hs;
2947
2947
  this.bufferColor = e, n = R(t(e, "vec3", 3, 0));
2948
2948
  }
2949
2949
  this.instanceColorNode = n;
@@ -2967,7 +2967,7 @@ var _d = /* @__PURE__ */ A(X, X.ALPHA_TEST), vd = /* @__PURE__ */ A(X, X.COLOR),
2967
2967
  if (this.isStorageMatrix) n = of(r, "mat4", Math.max(i, 1)).element(Ks);
2968
2968
  else if (i * 16 * 4 <= t.getUniformBufferLimit()) n = Ic(r.array, "mat4", Math.max(i, 1)).element(Ks);
2969
2969
  else {
2970
- let t = new Te(r.array, 16, 1);
2970
+ let t = new f(r.array, 16, 1);
2971
2971
  e === !0 && (this.buffer = t);
2972
2972
  let i = r.usage === 35048 ? Us : Hs;
2973
2973
  n = mi(i(t, "vec4", 16, 0), i(t, "vec4", 16, 4), i(t, "vec4", 16, 8), i(t, "vec4", 16, 12));
@@ -3061,7 +3061,7 @@ var _d = /* @__PURE__ */ A(X, X.ALPHA_TEST), vd = /* @__PURE__ */ A(X, X.COLOR),
3061
3061
  }
3062
3062
  }, hf = (e) => new mf(e), gf = (e, t = null) => {
3063
3063
  let n = new mf(e);
3064
- return n.positionNode = of(new mn(e.geometry.getAttribute("position").array, 3), "vec3").setPBO(!0).toReadOnly().element(Ks).toVar(), n.skinIndexNode = of(new mn(new Uint32Array(e.geometry.getAttribute("skinIndex").array), 4), "uvec4").setPBO(!0).toReadOnly().element(Ks).toVar(), n.skinWeightNode = of(new mn(e.geometry.getAttribute("skinWeight").array, 4), "vec4").setPBO(!0).toReadOnly().element(Ks).toVar(), n.bindMatrixNode = U(e.bindMatrix, "mat4"), n.bindMatrixInverseNode = U(e.bindMatrixInverse, "mat4"), n.boneMatricesNode = Ic(e.skeleton.boneMatrices, "mat4", e.skeleton.bones.length), n.toPositionNode = t, O(n);
3064
+ return n.positionNode = of(new je(e.geometry.getAttribute("position").array, 3), "vec3").setPBO(!0).toReadOnly().element(Ks).toVar(), n.skinIndexNode = of(new je(new Uint32Array(e.geometry.getAttribute("skinIndex").array), 4), "uvec4").setPBO(!0).toReadOnly().element(Ks).toVar(), n.skinWeightNode = of(new je(e.geometry.getAttribute("skinWeight").array, 4), "vec4").setPBO(!0).toReadOnly().element(Ks).toVar(), n.bindMatrixNode = U(e.bindMatrix, "mat4"), n.bindMatrixInverseNode = U(e.bindMatrixInverse, "mat4"), n.boneMatricesNode = Ic(e.skeleton.boneMatrices, "mat4", e.skeleton.bones.length), n.toPositionNode = t, O(n);
3065
3065
  }, _f = class extends E {
3066
3066
  static get type() {
3067
3067
  return "LoopNode";
@@ -3117,7 +3117,7 @@ var _d = /* @__PURE__ */ A(X, X.ALPHA_TEST), vd = /* @__PURE__ */ A(X, X.COLOR),
3117
3117
  case "string":
3118
3118
  a = c + " " + d;
3119
3119
  break;
3120
- default: d.isNode ? a = c + " " + p() + " " + d.build(e) : (C("TSL: 'Loop( { update: ... } )' is not a function, string or number.", this.stackTrace), a = "break /* invalid update */");
3120
+ default: d.isNode ? a = c + " " + p() + " " + d.build(e) : (y("TSL: 'Loop( { update: ... } )' is not a function, string or number.", this.stackTrace), a = "break /* invalid update */");
3121
3121
  }
3122
3122
  else d = l === "int" || l === "uint" ? u.includes("<") ? "++" : "--" : p() + " 1.", a = c + " " + d;
3123
3123
  f = `for ( ${e.getVar(l, c) + " = " + r}; ${c + " " + u + " " + i}; ${a} )`;
@@ -3129,7 +3129,7 @@ var _d = /* @__PURE__ */ A(X, X.ALPHA_TEST), vd = /* @__PURE__ */ A(X, X.COLOR),
3129
3129
  for (let t = 0, n = this.params.length - 1; t < n; t++) e.addFlowCode((t === 0 ? "" : e.tab) + "}\n\n").removeFlowTab();
3130
3130
  e.addFlowTab();
3131
3131
  }
3132
- }, vf = (...e) => new _f(Jr(e, "int")).toStack(), yf = () => cc("continue").toStack(), bf = () => cc("break").toStack(), xf = /* @__PURE__ */ new WeakMap(), Sf = /* @__PURE__ */ new Ce(), Cf = /* @__PURE__ */ M(({ bufferMap: e, influence: t, stride: n, width: r, depth: i, offset: a }) => {
3132
+ }, vf = (...e) => new _f(Jr(e, "int")).toStack(), yf = () => cc("continue").toStack(), bf = () => cc("break").toStack(), xf = /* @__PURE__ */ new WeakMap(), Sf = /* @__PURE__ */ new u(), Cf = /* @__PURE__ */ M(({ bufferMap: e, influence: t, stride: n, width: r, depth: i, offset: a }) => {
3133
3133
  let o = F(Gs).mul(n).add(a), s = o.div(r);
3134
3134
  return jc(e, ri(o.sub(s.mul(r)), s)).depth(i).xyz.mul(t);
3135
3135
  });
@@ -3137,30 +3137,30 @@ function wf(e) {
3137
3137
  let t = e.morphAttributes.position !== void 0, n = e.morphAttributes.normal !== void 0, r = e.morphAttributes.color !== void 0, i = e.morphAttributes.position || e.morphAttributes.normal || e.morphAttributes.color, a = i === void 0 ? 0 : i.length, o = xf.get(e);
3138
3138
  if (o === void 0 || o.count !== a) {
3139
3139
  o !== void 0 && o.texture.dispose();
3140
- let i = e.morphAttributes.position || [], s = e.morphAttributes.normal || [], c = e.morphAttributes.color || [], l = 0;
3141
- t === !0 && (l = 1), n === !0 && (l = 2), r === !0 && (l = 3);
3142
- let u = e.attributes.position.count * l, d = 1, f = 4096;
3143
- u > f && (d = Math.ceil(u / f), u = f);
3144
- let p = new Float32Array(u * d * 4 * a), m = new vn(p, u, d, a);
3145
- m.type = $t, m.needsUpdate = !0;
3146
- let h = l * 4;
3140
+ let i = e.morphAttributes.position || [], c = e.morphAttributes.normal || [], l = e.morphAttributes.color || [], u = 0;
3141
+ t === !0 && (u = 1), n === !0 && (u = 2), r === !0 && (u = 3);
3142
+ let d = e.attributes.position.count * u, f = 1, p = 4096;
3143
+ d > p && (f = Math.ceil(d / p), d = p);
3144
+ let m = new Float32Array(d * f * 4 * a), h = new s(m, d, f, a);
3145
+ h.type = lt, h.needsUpdate = !0;
3146
+ let g = u * 4;
3147
3147
  for (let e = 0; e < a; e++) {
3148
- let a = i[e], o = s[e], l = c[e], f = u * d * 4 * e;
3148
+ let a = i[e], o = c[e], s = l[e], u = d * f * 4 * e;
3149
3149
  for (let e = 0; e < a.count; e++) {
3150
- let i = e * h;
3151
- t === !0 && (Sf.fromBufferAttribute(a, e), p[f + i + 0] = Sf.x, p[f + i + 1] = Sf.y, p[f + i + 2] = Sf.z, p[f + i + 3] = 0), n === !0 && (Sf.fromBufferAttribute(o, e), p[f + i + 4] = Sf.x, p[f + i + 5] = Sf.y, p[f + i + 6] = Sf.z, p[f + i + 7] = 0), r === !0 && (Sf.fromBufferAttribute(l, e), p[f + i + 8] = Sf.x, p[f + i + 9] = Sf.y, p[f + i + 10] = Sf.z, p[f + i + 11] = l.itemSize === 4 ? Sf.w : 1);
3150
+ let i = e * g;
3151
+ t === !0 && (Sf.fromBufferAttribute(a, e), m[u + i + 0] = Sf.x, m[u + i + 1] = Sf.y, m[u + i + 2] = Sf.z, m[u + i + 3] = 0), n === !0 && (Sf.fromBufferAttribute(o, e), m[u + i + 4] = Sf.x, m[u + i + 5] = Sf.y, m[u + i + 6] = Sf.z, m[u + i + 7] = 0), r === !0 && (Sf.fromBufferAttribute(s, e), m[u + i + 8] = Sf.x, m[u + i + 9] = Sf.y, m[u + i + 10] = Sf.z, m[u + i + 11] = s.itemSize === 4 ? Sf.w : 1);
3152
3152
  }
3153
3153
  }
3154
3154
  o = {
3155
3155
  count: a,
3156
- texture: m,
3157
- stride: l,
3158
- size: new et(u, d)
3156
+ texture: h,
3157
+ stride: u,
3158
+ size: new mn(d, f)
3159
3159
  }, xf.set(e, o);
3160
- function g() {
3161
- m.dispose(), xf.delete(e), e.removeEventListener("dispose", g);
3160
+ function _() {
3161
+ h.dispose(), xf.delete(e), e.removeEventListener("dispose", _);
3162
3162
  }
3163
- e.addEventListener("dispose", g);
3163
+ e.addEventListener("dispose", _);
3164
3164
  }
3165
3165
  return o;
3166
3166
  }
@@ -3254,13 +3254,13 @@ var Tf = class extends E {
3254
3254
  setup(e) {
3255
3255
  e.context.irradiance.addAssign(this.node);
3256
3256
  }
3257
- }, Mf = /* @__PURE__ */ new et(), Nf = class extends Oc {
3257
+ }, Mf = /* @__PURE__ */ new mn(), Nf = class extends Oc {
3258
3258
  static get type() {
3259
3259
  return "ViewportTextureNode";
3260
3260
  }
3261
3261
  constructor(e = Kc, t = null, n = null) {
3262
3262
  let r = null;
3263
- n === null ? (r = new Et(), r.minFilter = Ue, n = r) : r = n, super(n, e, t), this.generateMipmaps = !1, this.defaultFramebuffer = r, this.isOutputTextureNode = !0, this.updateBeforeType = T.RENDER, this._cacheTextures = /* @__PURE__ */ new WeakMap();
3263
+ n === null ? (r = new ln(), r.minFilter = Ge, n = r) : r = n, super(n, e, t), this.generateMipmaps = !1, this.defaultFramebuffer = r, this.isOutputTextureNode = !0, this.updateBeforeType = T.RENDER, this._cacheTextures = /* @__PURE__ */ new WeakMap();
3264
3264
  }
3265
3265
  getTextureForReference(e = null) {
3266
3266
  let t, n;
@@ -3292,7 +3292,7 @@ var Tf = class extends E {
3292
3292
  return "ViewportDepthTextureNode";
3293
3293
  }
3294
3294
  constructor(e = Kc, t = null, n = null) {
3295
- n === null && (Rf === null && (Rf = new x()), n = Rf), super(e, t, n);
3295
+ n === null && (Rf === null && (Rf = new Ke()), n = Rf), super(e, t, n);
3296
3296
  }
3297
3297
  }, Bf = /* @__PURE__ */ k(zf).setParameterLength(0, 3), Vf = class e extends E {
3298
3298
  static get type() {
@@ -3408,7 +3408,7 @@ var tp = () => new ep(), np = () => new ep(ep.ALPHA_TO_COVERAGE), rp = () => new
3408
3408
  }
3409
3409
  generate(e) {
3410
3410
  let t = this.getAttributeName(e), n = e.hasGeometryAttribute(t), r;
3411
- return r = n === !0 ? super.generate(e) : e.generateConst(this.nodeType, new Ce(1, 1, 1, 1)), r;
3411
+ return r = n === !0 ? super.generate(e) : e.generateConst(this.nodeType, new u(1, 1, 1, 1)), r;
3412
3412
  }
3413
3413
  serialize(e) {
3414
3414
  super.serialize(e), e.index = this.index;
@@ -3475,7 +3475,7 @@ var tp = () => new ep(), np = () => new ep(ep.ALPHA_TO_COVERAGE), rp = () => new
3475
3475
  }), gp = /* @__PURE__ */ M(([e]) => (N(e.a.equal(0), () => z(0)), z(e.rgb.div(e.a), e.a)), {
3476
3476
  color: "vec4",
3477
3477
  return: "vec4"
3478
- }), _p = class extends Pt {
3478
+ }), _p = class extends en {
3479
3479
  static get type() {
3480
3480
  return "NodeMaterial";
3481
3481
  }
@@ -3637,7 +3637,7 @@ var tp = () => new ep(), np = () => new ep(ep.ALPHA_TO_COVERAGE), rp = () => new
3637
3637
  images: {},
3638
3638
  nodes: {}
3639
3639
  });
3640
- let n = Pt.prototype.toJSON.call(this, e);
3640
+ let n = en.prototype.toJSON.call(this, e);
3641
3641
  n.inputNodes = {};
3642
3642
  for (let { property: t, childNode: r } of this._getNodeChildren()) n.inputNodes[t] = r.toJSON(e).uuid;
3643
3643
  function r(e) {
@@ -3657,14 +3657,14 @@ var tp = () => new ep(), np = () => new ep(ep.ALPHA_TO_COVERAGE), rp = () => new
3657
3657
  copy(e) {
3658
3658
  return this.lightsNode = e.lightsNode, this.envNode = e.envNode, this.aoNode = e.aoNode, this.colorNode = e.colorNode, this.normalNode = e.normalNode, this.opacityNode = e.opacityNode, this.backdropNode = e.backdropNode, this.backdropAlphaNode = e.backdropAlphaNode, this.alphaTestNode = e.alphaTestNode, this.maskNode = e.maskNode, this.maskShadowNode = e.maskShadowNode, this.positionNode = e.positionNode, this.geometryNode = e.geometryNode, this.depthNode = e.depthNode, this.receivedShadowPositionNode = e.receivedShadowPositionNode, this.castShadowPositionNode = e.castShadowPositionNode, this.receivedShadowNode = e.receivedShadowNode, this.castShadowNode = e.castShadowNode, this.outputNode = e.outputNode, this.mrtNode = e.mrtNode, this.fragmentNode = e.fragmentNode, this.vertexNode = e.vertexNode, this.contextNode = e.contextNode, super.copy(e);
3659
3659
  }
3660
- }, vp = /* @__PURE__ */ new o(), yp = class extends _p {
3660
+ }, vp = /* @__PURE__ */ new Re(), yp = class extends _p {
3661
3661
  static get type() {
3662
3662
  return "LineBasicNodeMaterial";
3663
3663
  }
3664
3664
  constructor(e) {
3665
3665
  super(), this.isLineBasicNodeMaterial = !0, this.setDefaultValues(vp), this.setValues(e);
3666
3666
  }
3667
- }, bp = /* @__PURE__ */ new Ne(), xp = class extends _p {
3667
+ }, bp = /* @__PURE__ */ new Ue(), xp = class extends _p {
3668
3668
  static get type() {
3669
3669
  return "LineDashedNodeMaterial";
3670
3670
  }
@@ -3677,7 +3677,7 @@ var tp = () => new ep(), np = () => new ep(ep.ALPHA_TO_COVERAGE), rp = () => new
3677
3677
  let i = vs(bc("lineDistance").mul(t));
3678
3678
  (e ? i.add(e) : i).mod(Ui.add(Wi)).greaterThan(Ui).discard();
3679
3679
  }
3680
- }, Sp = /* @__PURE__ */ new Ht(), Cp = class extends _p {
3680
+ }, Sp = /* @__PURE__ */ new Lt(), Cp = class extends _p {
3681
3681
  static get type() {
3682
3682
  return "MeshNormalNodeMaterial";
3683
3683
  }
@@ -3686,9 +3686,9 @@ var tp = () => new ep(), np = () => new ep(ep.ALPHA_TO_COVERAGE), rp = () => new
3686
3686
  }
3687
3687
  setupDiffuseColor() {
3688
3688
  let e = this.opacityNode ? P(this.opacityNode) : xd;
3689
- V.assign(Es(z(sd(Y), e), bn));
3689
+ V.assign(Es(z(sd(Y), e), l));
3690
3690
  }
3691
- }, wp = /* @__PURE__ */ M(([e = Xl]) => L(e.z.atan(e.x).mul(1 / (Math.PI * 2)).add(.5), e.y.clamp(-1, 1).asin().mul(1 / Math.PI).add(.5))), Tp = class extends r {
3691
+ }, wp = /* @__PURE__ */ M(([e = Xl]) => L(e.z.atan(e.x).mul(1 / (Math.PI * 2)).add(.5), e.y.clamp(-1, 1).asin().mul(1 / Math.PI).add(.5))), Tp = class extends jt {
3692
3692
  constructor(e = 1, t = {}) {
3693
3693
  super(e, e, t), this.isCubeRenderTarget = !0;
3694
3694
  let n = {
@@ -3696,7 +3696,7 @@ var tp = () => new ep(), np = () => new ep(ep.ALPHA_TO_COVERAGE), rp = () => new
3696
3696
  height: e,
3697
3697
  depth: 1
3698
3698
  };
3699
- this.texture = new bt([
3699
+ this.texture = new ue([
3700
3700
  n,
3701
3701
  n,
3702
3702
  n,
@@ -3708,12 +3708,12 @@ var tp = () => new ep(), np = () => new ep(ep.ALPHA_TO_COVERAGE), rp = () => new
3708
3708
  fromEquirectangularTexture(e, t) {
3709
3709
  let n = t.minFilter, r = t.generateMipmaps;
3710
3710
  t.generateMipmaps = !0, this.texture.type = t.type, this.texture.colorSpace = t.colorSpace, this.texture.generateMipmaps = t.generateMipmaps, this.texture.minFilter = t.minFilter, this.texture.magFilter = t.magFilter;
3711
- let i = new ct(5, 5, 5), a = wp(Xl), o = new _p();
3712
- o.colorNode = J(t, a, 0), o.side = 1, o.blending = 0;
3713
- let s = new Zt(i, o), c = new Fe();
3714
- c.add(s), t.minFilter === 1008 && (t.minFilter = ie);
3715
- let l = new St(1, 10, this), u = e.getMRT();
3716
- return e.setMRT(null), l.update(e, c), e.setMRT(u), t.minFilter = n, t.generateMipmaps = r, s.geometry.dispose(), s.material.dispose(), this;
3711
+ let a = new Kt(5, 5, 5), o = wp(Xl), s = new _p();
3712
+ s.colorNode = J(t, o, 0), s.side = 1, s.blending = 0;
3713
+ let c = new st(a, s), l = new te();
3714
+ l.add(c), t.minFilter === 1008 && (t.minFilter = Qt);
3715
+ let u = new i(1, 10, this), d = e.getMRT();
3716
+ return e.setMRT(null), u.update(e, l), e.setMRT(d), t.minFilter = n, t.generateMipmaps = r, c.geometry.dispose(), c.material.dispose(), this;
3717
3717
  }
3718
3718
  clear(e, t = !0, n = !0, r = !0) {
3719
3719
  let i = e.getRenderTarget();
@@ -3726,7 +3726,7 @@ var tp = () => new ep(), np = () => new ep(ep.ALPHA_TO_COVERAGE), rp = () => new
3726
3726
  }
3727
3727
  constructor(e) {
3728
3728
  super("vec3"), this.envNode = e, this._cubeTexture = null, this._cubeTextureNode = Eu(null);
3729
- let t = new bt();
3729
+ let t = new ue();
3730
3730
  t.isRenderTargetTexture = !0, this._defaultTexture = t, this.updateBeforeType = T.RENDER;
3731
3731
  }
3732
3732
  updateBefore(e) {
@@ -3818,11 +3818,11 @@ var jp = /* @__PURE__ */ k(Dp).setParameterLength(1), Mp = class extends Df {
3818
3818
  r.rgb.addAssign(i.rgb.mul(Td.mul(Ed)));
3819
3819
  break;
3820
3820
  default:
3821
- v("BasicLightingModel: Unsupported .combine value:", t.combine);
3821
+ w("BasicLightingModel: Unsupported .combine value:", t.combine);
3822
3822
  break;
3823
3823
  }
3824
3824
  }
3825
- }, Ip = /* @__PURE__ */ new rt(), Lp = class extends _p {
3825
+ }, Ip = /* @__PURE__ */ new Pt(), Lp = class extends _p {
3826
3826
  static get type() {
3827
3827
  return "MeshBasicNodeMaterial";
3828
3828
  }
@@ -3868,7 +3868,7 @@ var jp = /* @__PURE__ */ k(Dp).setParameterLength(1), Mp = class extends Df {
3868
3868
  let { ambientOcclusion: t, irradiance: n, reflectedLight: r } = e.context;
3869
3869
  r.indirectDiffuse.addAssign(n.mul(zp({ diffuseColor: V }))), r.indirectDiffuse.mulAssign(t);
3870
3870
  }
3871
- }, Wp = /* @__PURE__ */ new it(), Gp = class extends _p {
3871
+ }, Wp = /* @__PURE__ */ new mt(), Gp = class extends _p {
3872
3872
  static get type() {
3873
3873
  return "MeshLambertNodeMaterial";
3874
3874
  }
@@ -3882,7 +3882,7 @@ var jp = /* @__PURE__ */ k(Dp).setParameterLength(1), Mp = class extends Df {
3882
3882
  setupLightingModel() {
3883
3883
  return new Up(!1);
3884
3884
  }
3885
- }, Kp = /* @__PURE__ */ new kt(), qp = class extends _p {
3885
+ }, Kp = /* @__PURE__ */ new Ct(), qp = class extends _p {
3886
3886
  static get type() {
3887
3887
  return "MeshPhongNodeMaterial";
3888
3888
  }
@@ -4573,7 +4573,7 @@ var jp = /* @__PURE__ */ k(Dp).setParameterLength(1), Mp = class extends Df {
4573
4573
  13702,
4574
4574
  1183
4575
4575
  ]), rm = null, im = /* @__PURE__ */ M(({ roughness: e, dotNV: t }) => {
4576
- rm === null && (rm = new i(nm, 16, 16, we, jt), rm.name = "DFG_LUT", rm.minFilter = ie, rm.magFilter = ie, rm.wrapS = dn, rm.wrapT = dn, rm.generateMipmaps = !1, rm.needsUpdate = !0);
4576
+ rm === null && (rm = new Ie(nm, 16, 16, d, Tt), rm.name = "DFG_LUT", rm.minFilter = Qt, rm.magFilter = Qt, rm.wrapS = Oe, rm.wrapT = Oe, rm.generateMipmaps = !1, rm.needsUpdate = !0);
4577
4577
  let n = L(e, t);
4578
4578
  return J(rm, n).rg;
4579
4579
  }), am = /* @__PURE__ */ M(({ lightDirection: e, f0: t, f90: n, roughness: r, f: i, USE_IRIDESCENCE: a, USE_ANISOTROPY: o }) => {
@@ -5259,7 +5259,7 @@ var jp = /* @__PURE__ */ k(Dp).setParameterLength(1), Mp = class extends Df {
5259
5259
  .446,
5260
5260
  .526,
5261
5261
  .582
5262
- ], hh = 20, gh = 512, _h = /* @__PURE__ */ new De(-1, 1, 1, -1, 0, 1), vh = /* @__PURE__ */ new u(90, 1), yh = /* @__PURE__ */ new s(), bh = null, xh = 0, Sh = 0, Ch = /* @__PURE__ */ new w(), wh = /* @__PURE__ */ new WeakMap(), Th = [
5262
+ ], hh = 20, gh = 512, _h = /* @__PURE__ */ new _(-1, 1, 1, -1, 0, 1), vh = /* @__PURE__ */ new _e(90, 1), yh = /* @__PURE__ */ new fn(), bh = null, xh = 0, Sh = 0, Ch = /* @__PURE__ */ new C(), wh = /* @__PURE__ */ new WeakMap(), Th = [
5263
5263
  3,
5264
5264
  1,
5265
5265
  5,
@@ -5276,7 +5276,7 @@ var jp = /* @__PURE__ */ k(Dp).setParameterLength(1), Mp = class extends Df {
5276
5276
  fromScene(e, t = 0, n = .1, r = 100, i = {}) {
5277
5277
  let { size: a = 256, position: o = Ch, renderTarget: s = null } = i;
5278
5278
  if (this._setSize(a), this._hasInitialized === !1) {
5279
- v("PMREMGenerator: \".fromScene()\" called before the backend is initialized. Try using \"await renderer.init()\" instead.");
5279
+ w("PMREMGenerator: \".fromScene()\" called before the backend is initialized. Try using \"await renderer.init()\" instead.");
5280
5280
  let a = s || this._allocateTarget();
5281
5281
  return i.renderTarget = a, this.fromSceneAsync(e, t, n, r, i), a;
5282
5282
  }
@@ -5285,29 +5285,29 @@ var jp = /* @__PURE__ */ k(Dp).setParameterLength(1), Mp = class extends Df {
5285
5285
  return c.depthBuffer = !0, this._init(c), this._sceneToCubeUV(e, n, r, c, o), t > 0 && this._blur(c, 0, 0, t), this._applyPMREM(c), this._cleanup(c), c;
5286
5286
  }
5287
5287
  async fromSceneAsync(e, t = 0, n = .1, r = 100, i = {}) {
5288
- return Ae("PMREMGenerator: \".fromSceneAsync()\" is deprecated. Use \"await renderer.init()\" instead."), await this._renderer.init(), this.fromScene(e, t, n, r, i);
5288
+ return Be("PMREMGenerator: \".fromSceneAsync()\" is deprecated. Use \"await renderer.init()\" instead."), await this._renderer.init(), this.fromScene(e, t, n, r, i);
5289
5289
  }
5290
5290
  fromEquirectangular(e, t = null) {
5291
5291
  if (this._hasInitialized === !1) {
5292
- v("PMREMGenerator: .fromEquirectangular() called before the backend is initialized. Try using \"await renderer.init()\" instead."), this._setSizeFromTexture(e);
5292
+ w("PMREMGenerator: .fromEquirectangular() called before the backend is initialized. Try using \"await renderer.init()\" instead."), this._setSizeFromTexture(e);
5293
5293
  let n = t || this._allocateTarget();
5294
5294
  return this.fromEquirectangularAsync(e, n), n;
5295
5295
  }
5296
5296
  return this._fromTexture(e, t);
5297
5297
  }
5298
5298
  async fromEquirectangularAsync(e, t = null) {
5299
- return Ae("PMREMGenerator: \".fromEquirectangularAsync()\" is deprecated. Use \"await renderer.init()\" instead."), await this._renderer.init(), this._fromTexture(e, t);
5299
+ return Be("PMREMGenerator: \".fromEquirectangularAsync()\" is deprecated. Use \"await renderer.init()\" instead."), await this._renderer.init(), this._fromTexture(e, t);
5300
5300
  }
5301
5301
  fromCubemap(e, t = null) {
5302
5302
  if (this._hasInitialized === !1) {
5303
- v("PMREMGenerator: .fromCubemap() called before the backend is initialized. Try using .fromCubemapAsync() instead."), this._setSizeFromTexture(e);
5303
+ w("PMREMGenerator: .fromCubemap() called before the backend is initialized. Try using .fromCubemapAsync() instead."), this._setSizeFromTexture(e);
5304
5304
  let n = t || this._allocateTarget();
5305
5305
  return this.fromCubemapAsync(e, t), n;
5306
5306
  }
5307
5307
  return this._fromTexture(e, t);
5308
5308
  }
5309
5309
  async fromCubemapAsync(e, t = null) {
5310
- return Ae("PMREMGenerator: \".fromCubemapAsync()\" is deprecated. Use \"await renderer.init()\" instead."), await this._renderer.init(), this._fromTexture(e, t);
5310
+ return Be("PMREMGenerator: \".fromCubemapAsync()\" is deprecated. Use \"await renderer.init()\" instead."), await this._renderer.init(), this._fromTexture(e, t);
5311
5311
  }
5312
5312
  async compileCubemapShader() {
5313
5313
  this._cubemapMaterial === null && (this._cubemapMaterial = Ph(), await this._compileMaterial(this._cubemapMaterial));
@@ -5347,7 +5347,7 @@ var jp = /* @__PURE__ */ k(Dp).setParameterLength(1), Mp = class extends Df {
5347
5347
  }
5348
5348
  }
5349
5349
  async _compileMaterial(e) {
5350
- let t = new Zt(new Dt(), e);
5350
+ let t = new st(new xt(), e);
5351
5351
  await this._renderer.compile(t, _h);
5352
5352
  }
5353
5353
  _sceneToCubeUV(e, t, n, r, i) {
@@ -5368,7 +5368,7 @@ var jp = /* @__PURE__ */ k(Dp).setParameterLength(1), Mp = class extends Df {
5368
5368
  1,
5369
5369
  -1
5370
5370
  ], c = this._renderer, l = c.autoClear;
5371
- c.getClearColor(yh), c.autoClear = !1, this._backgroundBox === null && (this._backgroundBox = new Zt(new ct(), new rt({
5371
+ c.getClearColor(yh), c.autoClear = !1, this._backgroundBox === null && (this._backgroundBox = new st(new Kt(), new Pt({
5372
5372
  name: "PMREM.Background",
5373
5373
  side: 1,
5374
5374
  depthWrite: !1,
@@ -5413,11 +5413,11 @@ var jp = /* @__PURE__ */ k(Dp).setParameterLength(1), Mp = class extends Df {
5413
5413
  }
5414
5414
  _halfBlur(e, t, n, r, i, a, o) {
5415
5415
  let s = this._renderer, c = this._blurMaterial;
5416
- a !== "latitudinal" && a !== "longitudinal" && C("blur direction must be either latitudinal or longitudinal!");
5416
+ a !== "latitudinal" && a !== "longitudinal" && y("blur direction must be either latitudinal or longitudinal!");
5417
5417
  let l = this._lodMeshes[r];
5418
5418
  l.material = c;
5419
5419
  let u = wh.get(c), d = this._sizeLods[n] - 1, f = isFinite(i) ? Math.PI / (2 * d) : 2 * Math.PI / (2 * hh - 1), p = i / f, m = isFinite(i) ? 1 + Math.floor(3 * p) : hh;
5420
- m > hh && v(`sigmaRadians, ${i}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${hh}`);
5420
+ m > hh && w(`sigmaRadians, ${i}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${hh}`);
5421
5421
  let h = [], g = 0;
5422
5422
  for (let e = 0; e < hh; ++e) {
5423
5423
  let t = e / p, n = Math.exp(-t * t / 2);
@@ -5427,8 +5427,8 @@ var jp = /* @__PURE__ */ k(Dp).setParameterLength(1), Mp = class extends Df {
5427
5427
  e.texture.frame = (e.texture.frame || 0) + 1, u.envMap.value = e.texture, u.samples.value = m, u.weights.array = h, u.latitudinal.value = a === "latitudinal" ? 1 : 0, o && (u.poleAxis.value = o);
5428
5428
  let { _lodMax: _ } = this;
5429
5429
  u.dTheta.value = f, u.mipInt.value = _ - n;
5430
- let y = this._sizeLods[r], b = 3 * y * (r > _ - ph ? r - _ + ph : 0), ee = 4 * (this._cubeSize - y);
5431
- this._setViewport(t, b, ee, 3 * y, 2 * y), s.setRenderTarget(t), s.render(l, _h);
5430
+ let v = this._sizeLods[r], b = 3 * v * (r > _ - ph ? r - _ + ph : 0), ee = 4 * (this._cubeSize - v);
5431
+ this._setViewport(t, b, ee, 3 * v, 2 * v), s.setRenderTarget(t), s.render(l, _h);
5432
5432
  }
5433
5433
  _setViewport(e, t, n, r, i) {
5434
5434
  this._renderer.isWebGLRenderer ? (e.viewport.set(t, e.height - i - n, r, i), e.scissor.set(t, e.height - i - n, r, i)) : (e.viewport.set(t, n, r, i), e.scissor.set(t, n, r, i));
@@ -5487,8 +5487,8 @@ function kh(e) {
5487
5487
  ];
5488
5488
  m.set(a, 6 * i);
5489
5489
  }
5490
- let h = new Dt();
5491
- h.setAttribute("position", new Bt(f, 3)), h.setAttribute("uv", new Bt(p, 2)), h.setAttribute("faceIndex", new Bt(m, 1)), r.push(new Zt(h, null)), i > ph && i--;
5490
+ let h = new xt();
5491
+ h.setAttribute("position", new Ft(f, 3)), h.setAttribute("uv", new Ft(p, 2)), h.setAttribute("faceIndex", new Ft(m, 1)), r.push(new st(h, null)), i > ph && i--;
5492
5492
  }
5493
5493
  return {
5494
5494
  lodMeshes: r,
@@ -5497,13 +5497,13 @@ function kh(e) {
5497
5497
  };
5498
5498
  }
5499
5499
  function Ah(e, t) {
5500
- let n = new r(e, t, {
5501
- magFilter: ie,
5502
- minFilter: ie,
5500
+ let n = new jt(e, t, {
5501
+ magFilter: Qt,
5502
+ minFilter: Qt,
5503
5503
  generateMipmaps: !1,
5504
- type: jt,
5505
- format: Re,
5506
- colorSpace: Ke
5504
+ type: Tt,
5505
+ format: x,
5506
+ colorSpace: Ce
5507
5507
  });
5508
5508
  return n.texture.mapping = 306, n.texture.name = "PMREM.cubeUv", n.texture.isPMREMTexture = !0, n.scissorTest = !0, n;
5509
5509
  }
@@ -5512,7 +5512,7 @@ function jh(e) {
5512
5512
  return t.depthTest = !1, t.depthWrite = !1, t.blending = 0, t.name = `PMREM_${e}`, t;
5513
5513
  }
5514
5514
  function Mh(e, t, n) {
5515
- let r = zc(Array(hh).fill(0)), i = U(new w(0, 1, 0)), a = U(0), o = P(hh), s = U(0), c = {
5515
+ let r = zc(Array(hh).fill(0)), i = U(new C(0, 1, 0)), a = U(0), o = P(hh), s = U(0), c = {
5516
5516
  n: o,
5517
5517
  latitudinal: s,
5518
5518
  weights: r,
@@ -5585,7 +5585,7 @@ var Bh = class extends nr {
5585
5585
  }
5586
5586
  constructor(e, t = null, n = null) {
5587
5587
  super("vec3"), this._value = e, this._pmrem = null, this.uvNode = t, this.levelNode = n, this._generator = null;
5588
- let r = new Xe();
5588
+ let r = new Ht();
5589
5589
  r.isRenderTargetTexture = !0, this._texture = J(r), this._width = U(0), this._height = U(0), this._maxMip = U(0), this.updateBeforeType = T.RENDER;
5590
5590
  }
5591
5591
  set value(e) {
@@ -5656,7 +5656,7 @@ var Uh = /* @__PURE__ */ k(Bh).setParameterLength(1, 3), Wh = /* @__PURE__ */ ne
5656
5656
  }, qh = (e) => ({
5657
5657
  getUV: () => e,
5658
5658
  getTextureLevel: () => P(1)
5659
- }), Jh = /* @__PURE__ */ new pt(), Yh = class extends _p {
5659
+ }), Jh = /* @__PURE__ */ new $e(), Yh = class extends _p {
5660
5660
  static get type() {
5661
5661
  return "MeshStandardNodeMaterial";
5662
5662
  }
@@ -5683,7 +5683,7 @@ var Uh = /* @__PURE__ */ k(Bh).setParameterLength(1, 3), Wh = /* @__PURE__ */ ne
5683
5683
  copy(e) {
5684
5684
  return this.emissiveNode = e.emissiveNode, this.metalnessNode = e.metalnessNode, this.roughnessNode = e.roughnessNode, super.copy(e);
5685
5685
  }
5686
- }, Xh = /* @__PURE__ */ new gt(), Zh = class extends Yh {
5686
+ }, Xh = /* @__PURE__ */ new yt(), Zh = class extends Yh {
5687
5687
  static get type() {
5688
5688
  return "MeshPhysicalNodeMaterial";
5689
5689
  }
@@ -5773,7 +5773,7 @@ var Uh = /* @__PURE__ */ k(Bh).setParameterLength(1, 3), Wh = /* @__PURE__ */ ne
5773
5773
  let { ambientOcclusion: t, irradiance: n, reflectedLight: r } = e.context;
5774
5774
  r.indirectDiffuse.addAssign(n.mul(zp({ diffuseColor: V }))), r.indirectDiffuse.mulAssign(t);
5775
5775
  }
5776
- }, eg = /* @__PURE__ */ new qe(), tg = class extends _p {
5776
+ }, eg = /* @__PURE__ */ new un(), tg = class extends _p {
5777
5777
  static get type() {
5778
5778
  return "MeshToonNodeMaterial";
5779
5779
  }
@@ -5786,7 +5786,7 @@ var Uh = /* @__PURE__ */ k(Bh).setParameterLength(1, 3), Wh = /* @__PURE__ */ ne
5786
5786
  }, ng = /* @__PURE__ */ M(() => {
5787
5787
  let e = R(Ql.z, 0, Ql.x.negate()).normalize(), t = Ql.cross(e);
5788
5788
  return L(e.dot(Y), t.dot(Y)).mul(.495).add(.5);
5789
- }).once(["NORMAL", "VERTEX"])().toVar("matcapUV"), rg = /* @__PURE__ */ new ut(), ig = class extends _p {
5789
+ }).once(["NORMAL", "VERTEX"])().toVar("matcapUV"), rg = /* @__PURE__ */ new Jt(), ig = class extends _p {
5790
5790
  static get type() {
5791
5791
  return "MeshMatcapNodeMaterial";
5792
5792
  }
@@ -5817,7 +5817,7 @@ var Uh = /* @__PURE__ */ k(Bh).setParameterLength(1, 3), Wh = /* @__PURE__ */ ne
5817
5817
  return r.mul(i).mul(a).mul(z(n, 1)).xyz;
5818
5818
  }
5819
5819
  }
5820
- }, og = /* @__PURE__ */ k(ag).setParameterLength(2), sg = /* @__PURE__ */ new Nt(), cg = class extends _p {
5820
+ }, og = /* @__PURE__ */ k(ag).setParameterLength(2), sg = /* @__PURE__ */ new $t(), cg = class extends _p {
5821
5821
  static get type() {
5822
5822
  return "SpriteNodeMaterial";
5823
5823
  }
@@ -5845,7 +5845,7 @@ var Uh = /* @__PURE__ */ k(Bh).setParameterLength(1, 3), Wh = /* @__PURE__ */ ne
5845
5845
  set sizeAttenuation(e) {
5846
5846
  this._useSizeAttenuation !== e && (this._useSizeAttenuation = e, this.needsUpdate = !0);
5847
5847
  }
5848
- }, lg = /* @__PURE__ */ new ue(), ug = /* @__PURE__ */ new et(), dg = class extends cg {
5848
+ }, lg = /* @__PURE__ */ new pe(), ug = /* @__PURE__ */ new mn(), dg = class extends cg {
5849
5849
  static get type() {
5850
5850
  return "PointsNodeMaterial";
5851
5851
  }
@@ -5889,7 +5889,7 @@ var Uh = /* @__PURE__ */ k(Bh).setParameterLength(1, 3), Wh = /* @__PURE__ */ ne
5889
5889
  finish({ context: e }) {
5890
5890
  V.a.mulAssign(this.shadowNode.oneMinus()), e.outgoingLight.rgb.assign(V.rgb);
5891
5891
  }
5892
- }, mg = /* @__PURE__ */ new Me(), hg = class extends _p {
5892
+ }, mg = /* @__PURE__ */ new He(), hg = class extends _p {
5893
5893
  static get type() {
5894
5894
  return "ShadowNodeMaterial";
5895
5895
  }
@@ -6189,7 +6189,7 @@ function jg(e) {
6189
6189
  t.push(e, r, r, i, i, e);
6190
6190
  }
6191
6191
  }
6192
- let i = new (r.count >= 65535 ? nn : Tt)(t, 1);
6192
+ let i = new (r.count >= 65535 ? ut : cn)(t, 1);
6193
6193
  return i.version = kg(e), i.__id = Ag(e), i;
6194
6194
  }
6195
6195
  var Mg = class extends Cg {
@@ -6281,7 +6281,7 @@ var Mg = class extends Cg {
6281
6281
  }, this.memoryMap = /* @__PURE__ */ new Map();
6282
6282
  }
6283
6283
  update(e, t, n) {
6284
- this.render.drawCalls++, e.isMesh || e.isSprite ? this.render.triangles += t / 3 * n : e.isPoints ? this.render.points += n * t : e.isLineSegments ? this.render.lines += t / 2 * n : e.isLine ? this.render.lines += n * (t - 1) : C("WebGPUInfo: Unknown object type.");
6284
+ this.render.drawCalls++, e.isMesh || e.isSprite ? this.render.triangles += t / 3 * n : e.isPoints ? this.render.points += n * t : e.isLineSegments ? this.render.lines += t / 2 * n : e.isLine ? this.render.lines += n * (t - 1) : y("WebGPUInfo: Unknown object type.");
6285
6285
  }
6286
6286
  reset() {
6287
6287
  this.render.drawCalls = 0, this.render.frameCalls = 0, this.compute.frameCalls = 0, this.render.triangles = 0, this.render.points = 0, this.render.lines = 0;
@@ -6610,7 +6610,7 @@ var Wg = class {
6610
6610
  g: 0,
6611
6611
  b: 0,
6612
6612
  a: 1
6613
- }, this.depth = !0, this.clearDepth = !0, this.clearDepthValue = 1, this.stencil = !1, this.clearStencil = !0, this.clearStencilValue = 1, this.viewport = !1, this.viewportValue = new Ce(), this.scissor = !1, this.scissorValue = new Ce(), this.renderTarget = null, this.textures = null, this.depthTexture = null, this.activeCubeFace = 0, this.activeMipmapLevel = 0, this.sampleCount = 1, this.width = 0, this.height = 0, this.occlusionQueryCount = 0, this.clippingContext = null, this.camera = null, this.isRenderContext = !0;
6613
+ }, this.depth = !0, this.clearDepth = !0, this.clearDepthValue = 1, this.stencil = !1, this.clearStencil = !0, this.clearStencilValue = 1, this.viewport = !1, this.viewportValue = new u(), this.scissor = !1, this.scissorValue = new u(), this.renderTarget = null, this.textures = null, this.depthTexture = null, this.activeCubeFace = 0, this.activeMipmapLevel = 0, this.sampleCount = 1, this.width = 0, this.height = 0, this.occlusionQueryCount = 0, this.clippingContext = null, this.camera = null, this.isRenderContext = !0;
6614
6614
  }
6615
6615
  getCacheKey() {
6616
6616
  return Yg(this);
@@ -6638,13 +6638,13 @@ var Xg = class {
6638
6638
  dispose() {
6639
6639
  this._renderContexts = {};
6640
6640
  }
6641
- }, Zg = /* @__PURE__ */ new w(), Qg = class extends Cg {
6641
+ }, Zg = /* @__PURE__ */ new C(), Qg = class extends Cg {
6642
6642
  constructor(e, t, n) {
6643
6643
  super(), this.renderer = e, this.backend = t, this.info = n, this._htmlTextures = /* @__PURE__ */ new Set();
6644
6644
  }
6645
6645
  updateRenderTarget(e, t = 0) {
6646
6646
  let n = this.get(e), r = e.samples === 0 ? 1 : e.samples, i = n.depthTextureMips ||= {}, a = e.textures, o = this.getSize(a[0]), s = o.width >> t, c = o.height >> t, l = e.depthTexture || i[t], u = e.depthBuffer === !0 || e.stencilBuffer === !0, d = !1;
6647
- l === void 0 && u && (l = new x(), l.format = e.stencilBuffer ? Wt : ne, l.type = e.stencilBuffer ? Ot : ft, l.image.width = s, l.image.height = c, l.image.depth = o.depth, l.renderTarget = e, l.isArrayTexture = e.multiview === !0 && o.depth > 1, i[t] = l), (n.width !== o.width || o.height !== n.height) && (d = !0, l && (l.needsUpdate = !0, l.image.width = s, l.image.height = c, l.image.depth = l.isArrayTexture ? l.image.depth : 1)), n.width = o.width, n.height = o.height, n.textures = a, n.depthTexture = l || null, n.depth = e.depthBuffer, n.stencil = e.stencilBuffer, n.renderTarget = e, n.sampleCount !== r && (d = !0, l && (l.needsUpdate = !0), n.sampleCount = r);
6647
+ l === void 0 && u && (l = new Ke(), l.format = e.stencilBuffer ? ie : Xt, l.type = e.stencilBuffer ? St : Qe, l.image.width = s, l.image.height = c, l.image.depth = o.depth, l.renderTarget = e, l.isArrayTexture = e.multiview === !0 && o.depth > 1, i[t] = l), (n.width !== o.width || o.height !== n.height) && (d = !0, l && (l.needsUpdate = !0, l.image.width = s, l.image.height = c, l.image.depth = l.isArrayTexture ? l.image.depth : 1)), n.width = o.width, n.height = o.height, n.textures = a, n.depthTexture = l || null, n.depth = e.depthBuffer, n.stencil = e.stencilBuffer, n.renderTarget = e, n.sampleCount !== r && (d = !0, l && (l.needsUpdate = !0), n.sampleCount = r);
6648
6648
  let f = { sampleCount: r };
6649
6649
  if (e.isXRRenderTarget !== !0) {
6650
6650
  for (let e = 0; e < a.length; e++) {
@@ -6663,7 +6663,7 @@ var Xg = class {
6663
6663
  let r = e.isRenderTargetTexture || e.isDepthTexture || e.isFramebufferTexture, i = this.backend;
6664
6664
  if (r && n.initialized === !0 && i.destroyTexture(e), e.isFramebufferTexture) {
6665
6665
  let t = this.renderer.getRenderTarget();
6666
- t ? e.type = t.texture.type : e.type = lt;
6666
+ t ? e.type = t.texture.type : e.type = qt;
6667
6667
  }
6668
6668
  if (e.isHTMLTexture && e.image) {
6669
6669
  let t = this.renderer.domElement;
@@ -6682,8 +6682,8 @@ var Xg = class {
6682
6682
  if (t.width = a, t.height = o, t.depth = s, t.needsMipmaps = this.needsMipmaps(e), t.levels = t.needsMipmaps ? this.getMipLevels(e, a, o) : 1, e.isCubeTexture && e.mipmaps.length > 0 && t.levels++, r || e.isStorageTexture === !0 || e.isExternalTexture === !0) i.createTexture(e, t), n.generation = e.version;
6683
6683
  else if (e.version > 0) {
6684
6684
  let r = e.image;
6685
- if (r === void 0) v("Renderer: Texture marked for update but image is undefined.");
6686
- else if (r.complete === !1) v("Renderer: Texture marked for update but image is incomplete.");
6685
+ if (r === void 0) w("Renderer: Texture marked for update but image is undefined.");
6686
+ else if (r.complete === !1) w("Renderer: Texture marked for update but image is incomplete.");
6687
6687
  else {
6688
6688
  if (e.images) {
6689
6689
  let n = [];
@@ -6695,7 +6695,7 @@ var Xg = class {
6695
6695
  t.needsMipmaps && e.mipmaps.length === 0 && !a && i.generateMipmaps(e), e.onUpdate && e.onUpdate(e);
6696
6696
  }
6697
6697
  } else i.createDefaultTexture(e), n.isDefaultTexture = !0, n.generation = e.version;
6698
- n.initialized !== !0 && (n.initialized = !0, n.generation = e.version, n.bindGroups = /* @__PURE__ */ new Set(), this.info.createTexture(e), e.isVideoTexture && Ee.enabled === !0 && Ee.getTransfer(e.colorSpace) !== "srgb" && v("WebGPURenderer: Video textures must use a color space with a sRGB transfer function, e.g. SRGBColorSpace."), n.onDispose = () => {
6698
+ n.initialized !== !0 && (n.initialized = !0, n.generation = e.version, n.bindGroups = /* @__PURE__ */ new Set(), this.info.createTexture(e), e.isVideoTexture && g.enabled === !0 && g.getTransfer(e.colorSpace) !== "srgb" && w("WebGPURenderer: Video textures must use a color space with a sRGB transfer function, e.g. SRGBColorSpace."), n.onDispose = () => {
6699
6699
  this._destroyTexture(e);
6700
6700
  }, e.addEventListener("dispose", n.onDispose)), n.version = e.version;
6701
6701
  }
@@ -6733,7 +6733,7 @@ var Xg = class {
6733
6733
  this._htmlTextures.delete(e), this.delete(e), this.info.destroyTexture(e);
6734
6734
  }
6735
6735
  }
6736
- }, $g = class extends s {
6736
+ }, $g = class extends fn {
6737
6737
  constructor(e, t, n, r = 1) {
6738
6738
  super(e, t, n), this.a = r;
6739
6739
  }
@@ -6755,7 +6755,7 @@ var Xg = class {
6755
6755
  }
6756
6756
  getMemberType(e, t) {
6757
6757
  let n = this.getNodeType(e), r = e.getStructTypeNode(n), i;
6758
- return r === null ? (C(`TSL: Member "${t}" not found in struct "${n}".`, new On()), i = "float") : i = r.getMemberType(e, t), i;
6758
+ return r === null ? (y(`TSL: Member "${t}" not found in struct "${n}".`, new On()), i = "float") : i = r.getMemberType(e, t), i;
6759
6759
  }
6760
6760
  getHash() {
6761
6761
  return String(this.id);
@@ -6780,7 +6780,7 @@ var Xg = class {
6780
6780
  return this.hasOutput(e) ? this.outputNode.getMemberType(e, t) : "void";
6781
6781
  }
6782
6782
  addToStack(e, t = this.nodes.length) {
6783
- return e.isNode === !0 ? (this.nodes.splice(t, 0, e), this) : (C("TSL: Invalid node added to stack.", new On()), this);
6783
+ return e.isNode === !0 ? (this.nodes.splice(t, 0, e), this) : (y("TSL: Invalid node added to stack.", new On()), this);
6784
6784
  }
6785
6785
  addToStackBefore(e) {
6786
6786
  let t = this._currentNode ? this.nodes.indexOf(this._currentNode) : 0;
@@ -6802,7 +6802,7 @@ var Xg = class {
6802
6802
  Case(...e) {
6803
6803
  let t = [];
6804
6804
  if (e.length >= 2) for (let n = 0; n < e.length - 1; n++) t.push(this._expressionNode.equal(O(e[n])));
6805
- else C("TSL: Invalid parameter length. Case() requires at least two parameters.", new On());
6805
+ else y("TSL: Invalid parameter length. Case() requires at least two parameters.", new On());
6806
6806
  let n = e[e.length - 1], r = new Gr(n), i = t[0];
6807
6807
  for (let e = 1; e < t.length; e++) i = i.or(t[e]);
6808
6808
  let a = ns(i, r);
@@ -7275,8 +7275,8 @@ var ev = /* @__PURE__ */ M(([e, t, n = L(.5)]) => og(e.sub(n), t).add(n)), tv =
7275
7275
  o = o.div(o.dot(R(1)));
7276
7276
  let s = i.yz.mul(r), c = i.zx.mul(r), l = i.xy.mul(r), u = e.value, d = t === null ? u : t.value, f = n === null ? u : n.value;
7277
7277
  return fa(J(u, s).mul(o.x), J(d, c).mul(o.y), J(f, l).mul(o.z));
7278
- }), ov = (...e) => av(...e), sv = new he(), cv = new w(), lv = new w(), uv = new w(), dv = new Lt(), fv = new w(0, 0, -1), pv = new Ce(), mv = new w(), hv = new w(), gv = new Ce(), _v = new et(), vv = new r(), yv = Kc.flipX();
7279
- vv.depthTexture = new x(1, 1);
7278
+ }), ov = (...e) => av(...e), sv = new Mt(), cv = new C(), lv = new C(), uv = new C(), dv = new rn(), fv = new C(0, 0, -1), pv = new u(), mv = new C(), hv = new C(), gv = new u(), _v = new mn(), vv = new jt(), yv = Kc.flipX();
7279
+ vv.depthTexture = new Ke(1, 1);
7280
7280
  var bv = !1, xv = class e extends Oc {
7281
7281
  static get type() {
7282
7282
  return "ReflectorNode";
@@ -7316,8 +7316,8 @@ var bv = !1, xv = class e extends Oc {
7316
7316
  }
7317
7317
  constructor(e, t = {}) {
7318
7318
  super();
7319
- let { target: n = new ln(), resolutionScale: r = 1, generateMipmaps: i = !1, bounces: a = !0, depth: o = !1, samples: s = 0 } = t;
7320
- this.textureNode = e, this.target = n, this.resolutionScale = r, t.resolution !== void 0 && (Ae("ReflectorNode: The \"resolution\" parameter has been renamed to \"resolutionScale\"."), this.resolutionScale = t.resolution), this.generateMipmaps = i, this.bounces = a, this.depth = o, this.samples = s, this.updateBeforeType = a ? T.RENDER : T.FRAME, this.virtualCameras = /* @__PURE__ */ new WeakMap(), this.renderTargets = /* @__PURE__ */ new Map(), this.forceUpdate = !1, this.hasOutput = !1;
7319
+ let { target: n = new Ne(), resolutionScale: r = 1, generateMipmaps: i = !1, bounces: a = !0, depth: o = !1, samples: s = 0 } = t;
7320
+ this.textureNode = e, this.target = n, this.resolutionScale = r, t.resolution !== void 0 && (Be("ReflectorNode: The \"resolution\" parameter has been renamed to \"resolutionScale\"."), this.resolutionScale = t.resolution), this.generateMipmaps = i, this.bounces = a, this.depth = o, this.samples = s, this.updateBeforeType = a ? T.RENDER : T.FRAME, this.virtualCameras = /* @__PURE__ */ new WeakMap(), this.renderTargets = /* @__PURE__ */ new Map(), this.forceUpdate = !1, this.hasOutput = !1;
7321
7321
  }
7322
7322
  _updateResolution(e, t) {
7323
7323
  let n = this.resolutionScale;
@@ -7336,10 +7336,10 @@ var bv = !1, xv = class e extends Oc {
7336
7336
  }
7337
7337
  getRenderTarget(e) {
7338
7338
  let t = this.renderTargets.get(e);
7339
- return t === void 0 && (t = new r(0, 0, {
7340
- type: jt,
7339
+ return t === void 0 && (t = new jt(0, 0, {
7340
+ type: Tt,
7341
7341
  samples: this.samples
7342
- }), this.generateMipmaps === !0 && (t.texture.minFilter = te, t.texture.generateMipmaps = !0), this.depth === !0 && (t.depthTexture = new x()), this.renderTargets.set(e, t)), t;
7342
+ }), this.generateMipmaps === !0 && (t.texture.minFilter = Je, t.texture.generateMipmaps = !0), this.depth === !0 && (t.depthTexture = new Ke()), this.renderTargets.set(e, t)), t;
7343
7343
  }
7344
7344
  updateBefore(e) {
7345
7345
  if (this.bounces === !1 && bv) return !1;
@@ -7363,12 +7363,12 @@ var bv = !1, xv = class e extends Oc {
7363
7363
  t.name = (t.name || "Scene") + " [ Reflector ]", l ? (r.clear(), this.hasOutput = !1) : (r.render(t, o), this.hasOutput = !0), t.name = m, r.setMRT(f), r.setRenderTarget(d), r.autoClear = p, i.visible = !0, bv = !1, this.forceUpdate = !1;
7364
7364
  }
7365
7365
  get resolution() {
7366
- return Ae("ReflectorNode: The \"resolution\" property has been renamed to \"resolutionScale\"."), this.resolutionScale;
7366
+ return Be("ReflectorNode: The \"resolution\" property has been renamed to \"resolutionScale\"."), this.resolutionScale;
7367
7367
  }
7368
7368
  set resolution(e) {
7369
- Ae("ReflectorNode: The \"resolution\" property has been renamed to \"resolutionScale\"."), this.resolutionScale = e;
7369
+ Be("ReflectorNode: The \"resolution\" property has been renamed to \"resolutionScale\"."), this.resolutionScale = e;
7370
7370
  }
7371
- }, Cv = (e) => new xv(e), wv = /* @__PURE__ */ new De(-1, 1, 1, -1, 0, 1), Tv = /* @__PURE__ */ new class extends Dt {
7371
+ }, Cv = (e) => new xv(e), wv = /* @__PURE__ */ new _(-1, 1, 1, -1, 0, 1), Tv = /* @__PURE__ */ new class extends xt {
7372
7372
  constructor(e = !1) {
7373
7373
  super();
7374
7374
  let t = e === !1 ? [
@@ -7386,7 +7386,7 @@ var bv = !1, xv = class e extends Oc {
7386
7386
  2,
7387
7387
  0
7388
7388
  ];
7389
- this.setAttribute("position", new zt([
7389
+ this.setAttribute("position", new on([
7390
7390
  -1,
7391
7391
  3,
7392
7392
  0,
@@ -7396,25 +7396,25 @@ var bv = !1, xv = class e extends Oc {
7396
7396
  3,
7397
7397
  -1,
7398
7398
  0
7399
- ], 3)), this.setAttribute("uv", new zt(t, 2));
7399
+ ], 3)), this.setAttribute("uv", new on(t, 2));
7400
7400
  }
7401
- }(), Ev = class extends Zt {
7401
+ }(), Ev = class extends st {
7402
7402
  constructor(e = null) {
7403
7403
  super(Tv, e), this.camera = wv, this.isQuadMesh = !0;
7404
7404
  }
7405
7405
  async renderAsync(e) {
7406
- Ae("QuadMesh: \"renderAsync()\" has been deprecated. Use \"render()\" and \"await renderer.init();\" when creating the renderer."), await e.init(), e.render(this, wv);
7406
+ Be("QuadMesh: \"renderAsync()\" has been deprecated. Use \"render()\" and \"await renderer.init();\" when creating the renderer."), await e.init(), e.render(this, wv);
7407
7407
  }
7408
7408
  render(e) {
7409
7409
  e.render(this, wv);
7410
7410
  }
7411
- }, Dv = /* @__PURE__ */ new et(), Ov = class extends Oc {
7411
+ }, Dv = /* @__PURE__ */ new mn(), Ov = class extends Oc {
7412
7412
  static get type() {
7413
7413
  return "RTTNode";
7414
7414
  }
7415
- constructor(e, t = null, n = null, i = { type: jt }) {
7416
- let a = new r(t, n, i);
7417
- super(a.texture, xc()), this.isRTTNode = !0, this.node = e, this.width = t, this.height = n, this.pixelRatio = 1, this.renderTarget = a, this.textureNeedsUpdate = !0, this.autoUpdate = !0, this._rttNode = null, this._quadMesh = new Ev(new _p()), this.updateBeforeType = T.RENDER;
7415
+ constructor(e, t = null, n = null, r = { type: Tt }) {
7416
+ let i = new jt(t, n, r);
7417
+ super(i.texture, xc()), this.isRTTNode = !0, this.node = e, this.width = t, this.height = n, this.pixelRatio = 1, this.renderTarget = i, this.textureNeedsUpdate = !0, this.autoUpdate = !0, this._rttNode = null, this._quadMesh = new Ev(new _p()), this.updateBeforeType = T.RENDER;
7418
7418
  }
7419
7419
  get autoResize() {
7420
7420
  return this.width === null;
@@ -7511,12 +7511,12 @@ var bv = !1, xv = class e extends Oc {
7511
7511
  }
7512
7512
  };
7513
7513
  Rv.OBJECT = "object", Rv.MATERIAL = "material", Rv.FRAME = "frame", Rv.BEFORE_OBJECT = "beforeObject", Rv.BEFORE_MATERIAL = "beforeMaterial", Rv.BEFORE_FRAME = "beforeFrame";
7514
- var zv = (e, t) => new Rv(e, t).toStack(), Bv = (e) => zv(Rv.OBJECT, e), Vv = (e) => zv(Rv.MATERIAL, e), Hv = (e) => zv(Rv.FRAME, e), Uv = (e) => zv(Rv.BEFORE_OBJECT, e), Wv = (e) => zv(Rv.BEFORE_MATERIAL, e), Gv = (e) => zv(Rv.BEFORE_FRAME, e), Kv = class extends mn {
7514
+ var zv = (e, t) => new Rv(e, t).toStack(), Bv = (e) => zv(Rv.OBJECT, e), Vv = (e) => zv(Rv.MATERIAL, e), Hv = (e) => zv(Rv.FRAME, e), Uv = (e) => zv(Rv.BEFORE_OBJECT, e), Wv = (e) => zv(Rv.BEFORE_MATERIAL, e), Gv = (e) => zv(Rv.BEFORE_FRAME, e), Kv = class extends je {
7515
7515
  constructor(e, t, n = Float32Array) {
7516
7516
  let r = ArrayBuffer.isView(e) ? e : new n(e * t);
7517
7517
  super(r, t), this.isStorageInstancedBufferAttribute = !0;
7518
7518
  }
7519
- }, qv = class extends Bt {
7519
+ }, qv = class extends Ft {
7520
7520
  constructor(e, t, n = Float32Array) {
7521
7521
  let r = ArrayBuffer.isView(e) ? e : new n(e * t);
7522
7522
  super(r, t), this.isStorageBufferAttribute = !0;
@@ -7539,7 +7539,7 @@ var zv = (e, t) => new Rv(e, t).toStack(), Bv = (e) => zv(Rv.OBJECT, e), Vv = (e
7539
7539
  generate() {
7540
7540
  return "vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y )";
7541
7541
  }
7542
- }, Zv = /* @__PURE__ */ A(Xv), Qv = /* @__PURE__ */ new Lt(), $v = /* @__PURE__ */ U(0).setGroup(H).onRenderUpdate(({ scene: e }) => e.backgroundBlurriness), ey = /* @__PURE__ */ U(1).setGroup(H).onRenderUpdate(({ scene: e }) => e.backgroundIntensity), ty = /* @__PURE__ */ U(new Lt()).setGroup(H).onRenderUpdate(({ scene: e }) => {
7542
+ }, Zv = /* @__PURE__ */ A(Xv), Qv = /* @__PURE__ */ new rn(), $v = /* @__PURE__ */ U(0).setGroup(H).onRenderUpdate(({ scene: e }) => e.backgroundBlurriness), ey = /* @__PURE__ */ U(1).setGroup(H).onRenderUpdate(({ scene: e }) => e.backgroundIntensity), ty = /* @__PURE__ */ U(new rn()).setGroup(H).onRenderUpdate(({ scene: e }) => {
7543
7543
  let t = e.background;
7544
7544
  return t !== null && t.isTexture && t.mapping !== 300 ? Qv.makeRotationFromEuler(e.backgroundRotation).transpose() : Qv.identity(), Qv;
7545
7545
  }), ny = class extends Oc {
@@ -7649,7 +7649,7 @@ var zv = (e, t) => new Rv(e, t).toStack(), Bv = (e) => zv(Rv.OBJECT, e), Vv = (e
7649
7649
  return "VelocityNode";
7650
7650
  }
7651
7651
  constructor() {
7652
- super("vec2"), this.projectionMatrix = null, this.updateType = T.OBJECT, this.updateAfterType = T.OBJECT, this.previousModelWorldMatrix = U(new Lt()), this.previousProjectionMatrix = U(new Lt()).setGroup(H), this.previousCameraViewMatrix = U(new Lt());
7652
+ super("vec2"), this.projectionMatrix = null, this.updateType = T.OBJECT, this.updateAfterType = T.OBJECT, this.previousModelWorldMatrix = U(new rn()), this.previousProjectionMatrix = U(new rn()).setGroup(H), this.previousCameraViewMatrix = U(new rn());
7653
7653
  }
7654
7654
  setProjectionMatrix(e) {
7655
7655
  this.projectionMatrix = e;
@@ -7658,7 +7658,7 @@ var zv = (e, t) => new Rv(e, t).toStack(), Bv = (e) => zv(Rv.OBJECT, e), Vv = (e
7658
7658
  let r = hy(n);
7659
7659
  this.previousModelWorldMatrix.value.copy(r);
7660
7660
  let i = my(t);
7661
- i.frameId !== e && (i.frameId = e, i.previousProjectionMatrix === void 0 ? (i.previousProjectionMatrix = new Lt(), i.previousCameraViewMatrix = new Lt(), i.currentProjectionMatrix = new Lt(), i.currentCameraViewMatrix = new Lt(), i.previousProjectionMatrix.copy(this.projectionMatrix || t.projectionMatrix), i.previousCameraViewMatrix.copy(t.matrixWorldInverse)) : (i.previousProjectionMatrix.copy(i.currentProjectionMatrix), i.previousCameraViewMatrix.copy(i.currentCameraViewMatrix)), i.currentProjectionMatrix.copy(this.projectionMatrix || t.projectionMatrix), i.currentCameraViewMatrix.copy(t.matrixWorldInverse), this.previousProjectionMatrix.value.copy(i.previousProjectionMatrix), this.previousCameraViewMatrix.value.copy(i.previousCameraViewMatrix));
7661
+ i.frameId !== e && (i.frameId = e, i.previousProjectionMatrix === void 0 ? (i.previousProjectionMatrix = new rn(), i.previousCameraViewMatrix = new rn(), i.currentProjectionMatrix = new rn(), i.currentCameraViewMatrix = new rn(), i.previousProjectionMatrix.copy(this.projectionMatrix || t.projectionMatrix), i.previousCameraViewMatrix.copy(t.matrixWorldInverse)) : (i.previousProjectionMatrix.copy(i.currentProjectionMatrix), i.previousCameraViewMatrix.copy(i.currentCameraViewMatrix)), i.currentProjectionMatrix.copy(this.projectionMatrix || t.projectionMatrix), i.currentCameraViewMatrix.copy(t.matrixWorldInverse), this.previousProjectionMatrix.value.copy(i.previousProjectionMatrix), this.previousCameraViewMatrix.value.copy(i.previousCameraViewMatrix));
7662
7662
  }
7663
7663
  updateAfter({ object: e }) {
7664
7664
  hy(e).copy(e.matrixWorld);
@@ -7674,7 +7674,7 @@ function my(e) {
7674
7674
  }
7675
7675
  function hy(e, t = 0) {
7676
7676
  let n = my(e), r = n[t];
7677
- return r === void 0 && (n[t] = r = new Lt(), n[t].copy(e.matrixWorld)), r;
7677
+ return r === void 0 && (n[t] = r = new rn(), n[t].copy(e.matrixWorld)), r;
7678
7678
  }
7679
7679
  var gy = /* @__PURE__ */ A(py), _y = /* @__PURE__ */ M(([e]) => xy(e.rgb)), vy = /* @__PURE__ */ M(([e, t = P(1)]) => t.mix(xy(e.rgb), e.rgb)), yy = /* @__PURE__ */ M(([e, t = P(1)]) => {
7680
7680
  let n = fa(e.r, e.g, e.b).div(3), r = e.r.max(e.g.max(e.b)), i = r.sub(n).mul(t).mul(-3);
@@ -7682,7 +7682,7 @@ var gy = /* @__PURE__ */ A(py), _y = /* @__PURE__ */ M(([e]) => xy(e.rgb)), vy =
7682
7682
  }), by = /* @__PURE__ */ M(([e, t = P(1)]) => {
7683
7683
  let n = R(.57735, .57735, .57735), r = t.cos();
7684
7684
  return R(e.rgb.mul(r).add(n.cross(e.rgb).mul(t.sin()).add(n.mul(Fo(n, e.rgb).mul(r.oneMinus())))));
7685
- }), xy = (e, t = R(Ee.getLuminanceCoefficients(new w()))) => Fo(e, t), Sy = /* @__PURE__ */ M(([e, t = R(1), n = R(0), r = R(1), i = P(1), a = R(Ee.getLuminanceCoefficients(new w(), Ke))]) => {
7685
+ }), xy = (e, t = R(g.getLuminanceCoefficients(new C()))) => Fo(e, t), Sy = /* @__PURE__ */ M(([e, t = R(1), n = R(0), r = R(1), i = P(1), a = R(g.getLuminanceCoefficients(new C(), Ce))]) => {
7686
7686
  let o = e.rgb.dot(R(a)), s = Ao(e.rgb.mul(t).add(n), 0).toVar(), c = s.pow(r).toVar();
7687
7687
  return N(s.r.greaterThan(0), () => {
7688
7688
  s.r.assign(c.r);
@@ -7696,7 +7696,7 @@ var gy = /* @__PURE__ */ A(py), _y = /* @__PURE__ */ M(([e]) => xy(e.rgb)), vy =
7696
7696
  return "ViewportSharedTextureNode";
7697
7697
  }
7698
7698
  constructor(e = Kc, t = null) {
7699
- wy === null && (wy = new Et()), super(e, t, wy);
7699
+ wy === null && (wy = new ln()), super(e, t, wy);
7700
7700
  }
7701
7701
  getTextureForReference() {
7702
7702
  return wy;
@@ -7704,7 +7704,7 @@ var gy = /* @__PURE__ */ A(py), _y = /* @__PURE__ */ M(([e]) => xy(e.rgb)), vy =
7704
7704
  updateReference() {
7705
7705
  return this;
7706
7706
  }
7707
- }, Ey = /* @__PURE__ */ k(Ty).setParameterLength(0, 2), Dy = /* @__PURE__ */ new et(), Oy = class extends Oc {
7707
+ }, Ey = /* @__PURE__ */ k(Ty).setParameterLength(0, 2), Dy = /* @__PURE__ */ new mn(), Oy = class extends Oc {
7708
7708
  static get type() {
7709
7709
  return "PassTextureNode";
7710
7710
  }
@@ -7739,17 +7739,17 @@ var gy = /* @__PURE__ */ A(py), _y = /* @__PURE__ */ M(([e]) => xy(e.rgb)), vy =
7739
7739
  static get type() {
7740
7740
  return "PassNode";
7741
7741
  }
7742
- constructor(e, t, n, i = {}) {
7743
- super("vec4"), this.scope = e, this.scene = t, this.camera = n, this.options = i, this._pixelRatio = 1, this._width = 1, this._height = 1;
7744
- let a = new x();
7745
- a.isRenderTargetTexture = !0, a.name = "depth";
7746
- let o = new r(this._width * this._pixelRatio, this._height * this._pixelRatio, {
7747
- type: jt,
7748
- ...i
7742
+ constructor(e, t, n, r = {}) {
7743
+ super("vec4"), this.scope = e, this.scene = t, this.camera = n, this.options = r, this._pixelRatio = 1, this._width = 1, this._height = 1;
7744
+ let i = new Ke();
7745
+ i.isRenderTargetTexture = !0, i.name = "depth";
7746
+ let a = new jt(this._width * this._pixelRatio, this._height * this._pixelRatio, {
7747
+ type: Tt,
7748
+ ...r
7749
7749
  });
7750
- o.texture.name = "output", o.depthTexture = a, this.renderTarget = o, this.overrideMaterial = null, this.transparent = !0, this.opaque = !0, this.contextNode = null, this._contextNodeCache = null, this._textures = {
7751
- output: o.texture,
7752
- depth: a
7750
+ a.texture.name = "output", a.depthTexture = i, this.renderTarget = a, this.overrideMaterial = null, this.transparent = !0, this.opaque = !0, this.contextNode = null, this._contextNodeCache = null, this._textures = {
7751
+ output: a.texture,
7752
+ depth: i
7753
7753
  }, this._textureNodes = {}, this._linearDepthNodes = {}, this._viewZNodes = {}, this._previousTextures = {}, this._previousTextureNodes = {}, this._cameraNear = U(0), this._cameraFar = U(0), this._mrt = null, this._layers = null, this._resolutionScale = 1, this._viewport = null, this._scissor = null, this.isPassNode = !0, this.updateBeforeType = T.FRAME, this.global = !0;
7754
7754
  }
7755
7755
  setResolutionScale(e) {
@@ -7759,10 +7759,10 @@ var gy = /* @__PURE__ */ A(py), _y = /* @__PURE__ */ M(([e]) => xy(e.rgb)), vy =
7759
7759
  return this._resolutionScale;
7760
7760
  }
7761
7761
  setResolution(e) {
7762
- return v("PassNode: .setResolution() is deprecated. Use .setResolutionScale() instead."), this.setResolutionScale(e);
7762
+ return w("PassNode: .setResolution() is deprecated. Use .setResolutionScale() instead."), this.setResolutionScale(e);
7763
7763
  }
7764
7764
  getResolution() {
7765
- return v("PassNode: .getResolution() is deprecated. Use .getResolutionScale() instead."), this.getResolutionScale();
7765
+ return w("PassNode: .getResolution() is deprecated. Use .getResolutionScale() instead."), this.getResolutionScale();
7766
7766
  }
7767
7767
  setLayers(e) {
7768
7768
  return this._layers = e, this;
@@ -7820,7 +7820,7 @@ var gy = /* @__PURE__ */ A(py), _y = /* @__PURE__ */ M(([e]) => xy(e.rgb)), vy =
7820
7820
  e.setRenderTarget(this.renderTarget), e.setMRT(this._mrt), await e.compileAsync(this.scene, this.camera), e.setRenderTarget(t), e.setMRT(n);
7821
7821
  }
7822
7822
  setup({ renderer: t }) {
7823
- return this.renderTarget.samples = this.options.samples === void 0 ? t.samples : this.options.samples, this.renderTarget.texture.type = t.getOutputBufferType(), t.reversedDepthBuffer === !0 && (this.renderTarget.depthTexture.type = $t), this.scope === e.COLOR ? this.getTextureNode() : this.getLinearDepthNode();
7823
+ return this.renderTarget.samples = this.options.samples === void 0 ? t.samples : this.options.samples, this.renderTarget.texture.type = t.getOutputBufferType(), t.reversedDepthBuffer === !0 && (this.renderTarget.depthTexture.type = lt), this.scope === e.COLOR ? this.getTextureNode() : this.getLinearDepthNode();
7824
7824
  }
7825
7825
  updateBefore(e) {
7826
7826
  let { renderer: t } = e, { scene: n } = this, r, i, a = t.getOutputRenderTarget();
@@ -7844,10 +7844,10 @@ var gy = /* @__PURE__ */ A(py), _y = /* @__PURE__ */ M(([e]) => xy(e.rgb)), vy =
7844
7844
  this.renderTarget.setSize(n, r), this._scissor === null ? this.renderTarget.scissorTest = !1 : (this.renderTarget.scissor.copy(this._scissor).multiplyScalar(this._pixelRatio * this._resolutionScale).floor(), this.renderTarget.scissorTest = !0), this._viewport !== null && this.renderTarget.viewport.copy(this._viewport).multiplyScalar(this._pixelRatio * this._resolutionScale).floor();
7845
7845
  }
7846
7846
  setScissor(e, t, n, r) {
7847
- e === null ? this._scissor = null : (this._scissor === null && (this._scissor = new Ce()), e.isVector4 ? this._scissor.copy(e) : this._scissor.set(e, t, n, r));
7847
+ e === null ? this._scissor = null : (this._scissor === null && (this._scissor = new u()), e.isVector4 ? this._scissor.copy(e) : this._scissor.set(e, t, n, r));
7848
7848
  }
7849
7849
  setViewport(e, t, n, r) {
7850
- e === null ? this._viewport = null : (this._viewport === null && (this._viewport = new Ce()), e.isVector4 ? this._viewport.copy(e) : this._viewport.set(e, t, n, r));
7850
+ e === null ? this._viewport = null : (this._viewport === null && (this._viewport = new u()), e.isVector4 ? this._viewport.copy(e) : this._viewport.set(e, t, n, r));
7851
7851
  }
7852
7852
  setPixelRatio(e) {
7853
7853
  this._pixelRatio = e, this.setSize(this._width, this._height);
@@ -7884,7 +7884,7 @@ var jy = (e, t, n) => new Ay(Ay.COLOR, e, t, n), My = (e, t) => new Oy(e, t), Ny
7884
7884
  let t = this._materialCache.get(e);
7885
7885
  return t === void 0 && (t = this._createMaterial(), this._materialCache.set(e, t)), t;
7886
7886
  }
7887
- }, Fy = (e, t, n = new s(0, 0, 0), r = .003, i = 1) => new Py(e, t, O(n), O(r), O(i)), Iy = /* @__PURE__ */ M(([e, t]) => e.mul(t).clamp()).setLayout({
7887
+ }, Fy = (e, t, n = new fn(0, 0, 0), r = .003, i = 1) => new Py(e, t, O(n), O(r), O(i)), Iy = /* @__PURE__ */ M(([e, t]) => e.mul(t).clamp()).setLayout({
7888
7888
  name: "linearToneMapping",
7889
7889
  type: "vec3",
7890
7890
  inputs: [{
@@ -8067,17 +8067,17 @@ var nb = M(([e, t], n) => qo(e, t, tb(n))), rb = M(([e], t) => {
8067
8067
  let t = e.object, n = null;
8068
8068
  if (t.count > 1) {
8069
8069
  let r = this.getConstNode(this.minNode), i = this.getConstNode(this.maxNode), a = r.value, o = i.value, s = e.getTypeLength(Bn(a)), c = e.getTypeLength(Bn(o));
8070
- ob ||= new Ce(), sb ||= new Ce(), ob.setScalar(0), sb.setScalar(0), s === 1 ? ob.setScalar(a) : a.isColor ? ob.set(a.r, a.g, a.b, 1) : ob.set(a.x, a.y, a.z || 0, a.w || 0), c === 1 ? sb.setScalar(o) : o.isColor ? sb.set(o.r, o.g, o.b, 1) : sb.set(o.x, o.y, o.z || 0, o.w || 0);
8071
- let l = 4 * t.count, u = new Float32Array(l);
8070
+ ob ||= new u(), sb ||= new u(), ob.setScalar(0), sb.setScalar(0), s === 1 ? ob.setScalar(a) : a.isColor ? ob.set(a.r, a.g, a.b, 1) : ob.set(a.x, a.y, a.z || 0, a.w || 0), c === 1 ? sb.setScalar(o) : o.isColor ? sb.set(o.r, o.g, o.b, 1) : sb.set(o.x, o.y, o.z || 0, o.w || 0);
8071
+ let l = 4 * t.count, d = new Float32Array(l);
8072
8072
  for (let e = 0; e < l; e++) {
8073
8073
  let t = e % 4, n = ob.getComponent(t), r = sb.getComponent(t);
8074
- u[e] = Jt.lerp(n, r, Math.random());
8074
+ d[e] = Dt.lerp(n, r, Math.random());
8075
8075
  }
8076
- let d = this.getNodeType(e);
8077
- if (t.count * 4 * 4 <= e.getUniformBufferLimit()) n = Ic(u, "vec4", t.count).element(Ks).convert(d);
8076
+ let f = this.getNodeType(e);
8077
+ if (t.count * 4 * 4 <= e.getUniformBufferLimit()) n = Ic(d, "vec4", t.count).element(Ks).convert(f);
8078
8078
  else {
8079
- let t = new mn(u, 4);
8080
- e.geometry.setAttribute("__range" + this.id, t), n = Hs(t).convert(d);
8079
+ let t = new je(d, 4);
8080
+ e.geometry.setAttribute("__range" + this.id, t), n = Hs(t).convert(f);
8081
8081
  }
8082
8082
  } else n = P(0);
8083
8083
  return n;
@@ -8106,7 +8106,7 @@ var nb = M(([e, t], n) => qo(e, t, tb(n))), rb = M(([e], t) => {
8106
8106
  }
8107
8107
  generate(e, t) {
8108
8108
  let n = this.getBuiltinName(e), r = this.getNodeType(e);
8109
- return e.shaderStage === "compute" ? e.format(n, r, t) : (v(`ComputeBuiltinNode: Compute built-in value ${n} can not be accessed in the ${e.shaderStage} stage`), e.generateConst(r));
8109
+ return e.shaderStage === "compute" ? e.format(n, r, t) : (w(`ComputeBuiltinNode: Compute built-in value ${n} can not be accessed in the ${e.shaderStage} stage`), e.generateConst(r));
8110
8110
  }
8111
8111
  serialize(e) {
8112
8112
  super.serialize(e), e.global = this.global, e._builtinName = this._builtinName;
@@ -8145,7 +8145,7 @@ var nb = M(([e, t], n) => qo(e, t, tb(n))), rb = M(([e], t) => {
8145
8145
  return this.name = e, this;
8146
8146
  }
8147
8147
  label(e) {
8148
- return v("TSL: \"label()\" has been deprecated. Use \"setName()\" instead.", new On()), this.setName(e);
8148
+ return w("TSL: \"label()\" has been deprecated. Use \"setName()\" instead.", new On()), this.setName(e);
8149
8149
  }
8150
8150
  setScope(e) {
8151
8151
  return this.scope = e, this;
@@ -8233,16 +8233,16 @@ function dx(e, t = Yl) {
8233
8233
  }
8234
8234
  function fx(e) {
8235
8235
  let t = lx(e);
8236
- return t.position ||= U(new w()).setGroup(H).onRenderUpdate((t, n) => n.value.setFromMatrixPosition(e.matrixWorld));
8236
+ return t.position ||= U(new C()).setGroup(H).onRenderUpdate((t, n) => n.value.setFromMatrixPosition(e.matrixWorld));
8237
8237
  }
8238
8238
  function px(e) {
8239
8239
  let t = lx(e);
8240
- return t.targetPosition ||= U(new w()).setGroup(H).onRenderUpdate((t, n) => n.value.setFromMatrixPosition(e.target.matrixWorld));
8240
+ return t.targetPosition ||= U(new C()).setGroup(H).onRenderUpdate((t, n) => n.value.setFromMatrixPosition(e.target.matrixWorld));
8241
8241
  }
8242
8242
  function mx(e) {
8243
8243
  let t = lx(e);
8244
- return t.viewPosition ||= U(new w()).setGroup(H).onRenderUpdate(({ camera: t }, n) => {
8245
- n.value = n.value || new w(), n.value.setFromMatrixPosition(e.matrixWorld), n.value.applyMatrix4(t.matrixWorldInverse);
8244
+ return t.viewPosition ||= U(new C()).setGroup(H).onRenderUpdate(({ camera: t }, n) => {
8245
+ n.value = n.value || new C(), n.value.setFromMatrixPosition(e.matrixWorld), n.value.applyMatrix4(t.matrixWorldInverse);
8246
8246
  });
8247
8247
  }
8248
8248
  var hx = (e) => yl.transformDirection(fx(e).sub(px(e))), gx = (e) => e.sort((e, t) => e.id - t.id), _x = (e, t) => {
@@ -8289,7 +8289,7 @@ var hx = (e) => yl.transformDirection(fx(e).sub(px(e))), gx = (e) => e.sort((e,
8289
8289
  if (n !== null && (r = _x(e.id, n)), r === null) {
8290
8290
  let t = i.getLightNodeClass(e.constructor);
8291
8291
  if (t === null) {
8292
- v(`LightsNode.setupNodeLights: Light node not found for ${e.constructor.name}`);
8292
+ w(`LightsNode.setupNodeLights: Light node not found for ${e.constructor.name}`);
8293
8293
  continue;
8294
8294
  }
8295
8295
  vx.has(e) === !1 && vx.set(e, new t(e)), r = vx.get(e);
@@ -8353,7 +8353,7 @@ var hx = (e) => yl.transformDirection(fx(e).sub(px(e))), gx = (e) => e.sort((e,
8353
8353
  }
8354
8354
  }, Cx = /* @__PURE__ */ xi("vec3", "shadowPositionWorld");
8355
8355
  function wx(e, t = {}) {
8356
- return t.toneMapping = e.toneMapping, t.toneMappingExposure = e.toneMappingExposure, t.outputColorSpace = e.outputColorSpace, t.renderTarget = e.getRenderTarget(), t.activeCubeFace = e.getActiveCubeFace(), t.activeMipmapLevel = e.getActiveMipmapLevel(), t.renderObjectFunction = e.getRenderObjectFunction(), t.pixelRatio = e.getPixelRatio(), t.mrt = e.getMRT(), t.clearColor = e.getClearColor(t.clearColor || new s()), t.clearAlpha = e.getClearAlpha(), t.autoClear = e.autoClear, t.scissorTest = e.getScissorTest(), t;
8356
+ return t.toneMapping = e.toneMapping, t.toneMappingExposure = e.toneMappingExposure, t.outputColorSpace = e.outputColorSpace, t.renderTarget = e.getRenderTarget(), t.activeCubeFace = e.getActiveCubeFace(), t.activeMipmapLevel = e.getActiveMipmapLevel(), t.renderObjectFunction = e.getRenderObjectFunction(), t.pixelRatio = e.getPixelRatio(), t.mrt = e.getMRT(), t.clearColor = e.getClearColor(t.clearColor || new fn()), t.clearAlpha = e.getClearAlpha(), t.autoClear = e.autoClear, t.scissorTest = e.getScissorTest(), t;
8357
8357
  }
8358
8358
  function Tx(e, t) {
8359
8359
  return t = wx(e, t), e.setMRT(null), e.setRenderObjectFunction(null), e.setClearColor(0, 1), e.autoClear = !0, t;
@@ -8483,7 +8483,7 @@ var Nx = /* @__PURE__ */ Object.freeze({
8483
8483
  return Kx[e];
8484
8484
  }
8485
8485
  setupRenderTarget(e, t) {
8486
- let n = new x(e.mapSize.width, e.mapSize.height);
8486
+ let n = new Ke(e.mapSize.width, e.mapSize.height);
8487
8487
  n.name = "ShadowDepthTexture", n.compareFunction = t.renderer.reversedDepthBuffer ? 518 : 515;
8488
8488
  let r = t.createRenderTarget(e.mapSize.width, e.mapSize.height);
8489
8489
  return r.texture.name = "ShadowMap", r.texture.type = e.mapType, r.depthTexture = n, {
@@ -8492,25 +8492,25 @@ var Nx = /* @__PURE__ */ Object.freeze({
8492
8492
  };
8493
8493
  }
8494
8494
  setupShadow(e) {
8495
- let { renderer: t, camera: n } = e, { light: r, shadow: i } = this, { depthTexture: a, shadowMap: o } = this.setupRenderTarget(i, e), s = t.shadowMap.type, c = t.hasCompatibility(f.TEXTURE_COMPARE);
8496
- if ((s === 1 || s === 2) && c ? (a.minFilter = ie, a.magFilter = ie) : (a.minFilter = gn, a.magFilter = gn), i.camera.coordinateSystem = n.coordinateSystem, i.camera.updateProjectionMatrix(), s === 3 && i.isPointLightShadow !== !0) {
8495
+ let { renderer: t, camera: n } = e, { light: r, shadow: i } = this, { depthTexture: a, shadowMap: o } = this.setupRenderTarget(i, e), s = t.shadowMap.type, c = t.hasCompatibility(p.TEXTURE_COMPARE);
8496
+ if ((s === 1 || s === 2) && c ? (a.minFilter = Qt, a.magFilter = Qt) : (a.minFilter = it, a.magFilter = it), i.camera.coordinateSystem = n.coordinateSystem, i.camera.updateProjectionMatrix(), s === 3 && i.isPointLightShadow !== !0) {
8497
8497
  a.compareFunction = null, o.depth > 1 ? (o._vsmShadowMapVertical || (o._vsmShadowMapVertical = e.createRenderTarget(i.mapSize.width, i.mapSize.height, {
8498
- format: we,
8499
- type: jt,
8498
+ format: d,
8499
+ type: Tt,
8500
8500
  depth: o.depth,
8501
8501
  depthBuffer: !1
8502
8502
  }), o._vsmShadowMapVertical.texture.name = "VSMVertical"), this.vsmShadowMapVertical = o._vsmShadowMapVertical, o._vsmShadowMapHorizontal || (o._vsmShadowMapHorizontal = e.createRenderTarget(i.mapSize.width, i.mapSize.height, {
8503
- format: we,
8504
- type: jt,
8503
+ format: d,
8504
+ type: Tt,
8505
8505
  depth: o.depth,
8506
8506
  depthBuffer: !1
8507
8507
  }), o._vsmShadowMapHorizontal.texture.name = "VSMHorizontal"), this.vsmShadowMapHorizontal = o._vsmShadowMapHorizontal) : (this.vsmShadowMapVertical = e.createRenderTarget(i.mapSize.width, i.mapSize.height, {
8508
- format: we,
8509
- type: jt,
8508
+ format: d,
8509
+ type: Tt,
8510
8510
  depthBuffer: !1
8511
8511
  }), this.vsmShadowMapHorizontal = e.createRenderTarget(i.mapSize.width, i.mapSize.height, {
8512
- format: we,
8513
- type: jt,
8512
+ format: d,
8513
+ type: Tt,
8514
8514
  depthBuffer: !1
8515
8515
  }));
8516
8516
  let t = J(a);
@@ -8532,23 +8532,23 @@ var Nx = /* @__PURE__ */ Object.freeze({
8532
8532
  depthLayer: this.depthLayer
8533
8533
  }).context(e.getSharedContext()), l.name = "VSMHorizontal";
8534
8534
  }
8535
- let l = Au("intensity", "float", i).setGroup(H), u = Au("normalBias", "float", i).setGroup(H), d = ux(r), p = cu.mul(u), m;
8536
- m = !t.highPrecision || e.material.receivedShadowPositionNode || e.context.shadowPositionWorld ? d.mul(Cx.add(p)) : U("mat4").onObjectUpdate(({ object: e }, t) => t.value.multiplyMatrices(d.value, e.matrixWorld)).mul(ql).add(d.mul(z(p, 0)));
8537
- let h = this.setupShadowCoord(e, m), g = i.filterNode || this.getShadowFilterFn(t.shadowMap.type) || null;
8538
- if (g === null) throw Error("THREE.WebGPURenderer: Shadow map type not supported yet.");
8539
- let _ = s === 3 && i.isPointLightShadow !== !0 ? this.vsmShadowMapHorizontal.texture : a, v = this.setupShadowFilter(e, {
8540
- filterFn: g,
8535
+ let l = Au("intensity", "float", i).setGroup(H), u = Au("normalBias", "float", i).setGroup(H), f = ux(r), m = cu.mul(u), h;
8536
+ h = !t.highPrecision || e.material.receivedShadowPositionNode || e.context.shadowPositionWorld ? f.mul(Cx.add(m)) : U("mat4").onObjectUpdate(({ object: e }, t) => t.value.multiplyMatrices(f.value, e.matrixWorld)).mul(ql).add(f.mul(z(m, 0)));
8537
+ let g = this.setupShadowCoord(e, h), _ = i.filterNode || this.getShadowFilterFn(t.shadowMap.type) || null;
8538
+ if (_ === null) throw Error("THREE.WebGPURenderer: Shadow map type not supported yet.");
8539
+ let v = s === 3 && i.isPointLightShadow !== !0 ? this.vsmShadowMapHorizontal.texture : a, y = this.setupShadowFilter(e, {
8540
+ filterFn: _,
8541
8541
  shadowTexture: o.texture,
8542
- depthTexture: _,
8543
- shadowCoord: h,
8542
+ depthTexture: v,
8543
+ shadowCoord: g,
8544
8544
  shadow: i,
8545
8545
  depthLayer: this.depthLayer
8546
- }), y;
8547
- t.shadowMap.transmitted === !0 && (o.texture.isCubeTexture ? y = Eu(o.texture, h.xyz) : (y = J(o.texture, h), a.isArrayTexture && (y = y.depth(this.depthLayer))));
8548
- let b;
8549
- b = y ? q(1, v.rgb.mix(y, 1), l.mul(y.a)).toVar() : q(1, v, l).toVar(), this.shadowMap = o, this.shadow.map = o;
8550
- let ee = `${this.light.type} Shadow [ ${this.light.name || "ID: " + this.light.id} ]`;
8551
- return y && b.toInspector(`${ee} / Color`, () => this.shadowMap.texture.isCubeTexture ? Eu(this.shadowMap.texture) : J(this.shadowMap.texture)), b.toInspector(`${ee} / Depth`, () => this.shadowMap.texture.isCubeTexture ? Eu(this.shadowMap.texture).r.oneMinus() : jc(this.shadowMap.depthTexture, xc().mul(Cc(J(this.shadowMap.depthTexture)))).r.oneMinus());
8546
+ }), b;
8547
+ t.shadowMap.transmitted === !0 && (o.texture.isCubeTexture ? b = Eu(o.texture, g.xyz) : (b = J(o.texture, g), a.isArrayTexture && (b = b.depth(this.depthLayer))));
8548
+ let ee;
8549
+ ee = b ? q(1, y.rgb.mix(b, 1), l.mul(b.a)).toVar() : q(1, y, l).toVar(), this.shadowMap = o, this.shadow.map = o;
8550
+ let x = `${this.light.type} Shadow [ ${this.light.name || "ID: " + this.light.id} ]`;
8551
+ return b && ee.toInspector(`${x} / Color`, () => this.shadowMap.texture.isCubeTexture ? Eu(this.shadowMap.texture) : J(this.shadowMap.texture)), ee.toInspector(`${x} / Depth`, () => this.shadowMap.texture.isCubeTexture ? Eu(this.shadowMap.texture).r.oneMinus() : jc(this.shadowMap.depthTexture, xc().mul(Cc(J(this.shadowMap.depthTexture)))).r.oneMinus());
8552
8552
  }
8553
8553
  setup(e) {
8554
8554
  if (e.renderer.shadowMap.enabled !== !1) return M(() => {
@@ -8586,34 +8586,34 @@ var Nx = /* @__PURE__ */ Object.freeze({
8586
8586
  let { shadow: t } = this, n = t.needsUpdate || t.autoUpdate;
8587
8587
  n && (this._cameraFrameId[e.camera] === e.frameId && (n = !1), this._cameraFrameId[e.camera] = e.frameId), n && (this.updateShadow(e), this.shadowMap.depthTexture.version === this._depthVersionCached && (t.needsUpdate = !1));
8588
8588
  }
8589
- }, Xx = (e, t) => new Yx(e, t), Zx = /* @__PURE__ */ new s(), Qx = /* @__PURE__ */ new Lt(), $x = /* @__PURE__ */ new w(), eS = /* @__PURE__ */ new w(), tS = [
8590
- /* @__PURE__ */ new w(1, 0, 0),
8591
- /* @__PURE__ */ new w(-1, 0, 0),
8592
- /* @__PURE__ */ new w(0, -1, 0),
8593
- /* @__PURE__ */ new w(0, 1, 0),
8594
- /* @__PURE__ */ new w(0, 0, 1),
8595
- /* @__PURE__ */ new w(0, 0, -1)
8589
+ }, Xx = (e, t) => new Yx(e, t), Zx = /* @__PURE__ */ new fn(), Qx = /* @__PURE__ */ new rn(), $x = /* @__PURE__ */ new C(), eS = /* @__PURE__ */ new C(), tS = [
8590
+ /* @__PURE__ */ new C(1, 0, 0),
8591
+ /* @__PURE__ */ new C(-1, 0, 0),
8592
+ /* @__PURE__ */ new C(0, -1, 0),
8593
+ /* @__PURE__ */ new C(0, 1, 0),
8594
+ /* @__PURE__ */ new C(0, 0, 1),
8595
+ /* @__PURE__ */ new C(0, 0, -1)
8596
8596
  ], nS = [
8597
- /* @__PURE__ */ new w(0, -1, 0),
8598
- /* @__PURE__ */ new w(0, -1, 0),
8599
- /* @__PURE__ */ new w(0, 0, -1),
8600
- /* @__PURE__ */ new w(0, 0, 1),
8601
- /* @__PURE__ */ new w(0, -1, 0),
8602
- /* @__PURE__ */ new w(0, -1, 0)
8597
+ /* @__PURE__ */ new C(0, -1, 0),
8598
+ /* @__PURE__ */ new C(0, -1, 0),
8599
+ /* @__PURE__ */ new C(0, 0, -1),
8600
+ /* @__PURE__ */ new C(0, 0, 1),
8601
+ /* @__PURE__ */ new C(0, -1, 0),
8602
+ /* @__PURE__ */ new C(0, -1, 0)
8603
8603
  ], rS = [
8604
- /* @__PURE__ */ new w(1, 0, 0),
8605
- /* @__PURE__ */ new w(-1, 0, 0),
8606
- /* @__PURE__ */ new w(0, 1, 0),
8607
- /* @__PURE__ */ new w(0, -1, 0),
8608
- /* @__PURE__ */ new w(0, 0, 1),
8609
- /* @__PURE__ */ new w(0, 0, -1)
8604
+ /* @__PURE__ */ new C(1, 0, 0),
8605
+ /* @__PURE__ */ new C(-1, 0, 0),
8606
+ /* @__PURE__ */ new C(0, 1, 0),
8607
+ /* @__PURE__ */ new C(0, -1, 0),
8608
+ /* @__PURE__ */ new C(0, 0, 1),
8609
+ /* @__PURE__ */ new C(0, 0, -1)
8610
8610
  ], iS = [
8611
- /* @__PURE__ */ new w(0, -1, 0),
8612
- /* @__PURE__ */ new w(0, -1, 0),
8613
- /* @__PURE__ */ new w(0, 0, 1),
8614
- /* @__PURE__ */ new w(0, 0, -1),
8615
- /* @__PURE__ */ new w(0, -1, 0),
8616
- /* @__PURE__ */ new w(0, -1, 0)
8611
+ /* @__PURE__ */ new C(0, -1, 0),
8612
+ /* @__PURE__ */ new C(0, -1, 0),
8613
+ /* @__PURE__ */ new C(0, 0, 1),
8614
+ /* @__PURE__ */ new C(0, 0, -1),
8615
+ /* @__PURE__ */ new C(0, -1, 0),
8616
+ /* @__PURE__ */ new C(0, -1, 0)
8617
8617
  ], aS = /* @__PURE__ */ M(({ depthTexture: e, bd3D: t, dp: n }) => Eu(e, t).compare(n)), oS = /* @__PURE__ */ M(({ depthTexture: e, bd3D: t, dp: n, shadow: r }) => {
8618
8618
  let i = Au("radius", "float", r).setGroup(H), a = Au("mapSize", "vec2", r).setGroup(H), o = i.div(a.x), s = ho(t), c = eo(Io(t, s.x.greaterThan(s.z).select(R(0, 1, 0), R(1, 0, 0)))), l = Io(t, c), u = Pv(Jc.xy).mul(6.28318530718), d = Fv(0, 5, u), f = Fv(1, 5, u), p = Fv(2, 5, u), m = Fv(3, 5, u), h = Fv(4, 5, u);
8619
8619
  return Eu(e, t.add(c.mul(d.x).add(l.mul(d.y)).mul(o))).compare(n).add(Eu(e, t.add(c.mul(f.x).add(l.mul(f.y)).mul(o))).compare(n)).add(Eu(e, t.add(c.mul(p.x).add(l.mul(p.y)).mul(o))).compare(n)).add(Eu(e, t.add(c.mul(m.x).add(l.mul(m.y)).mul(o))).compare(n)).add(Eu(e, t.add(c.mul(h.x).add(l.mul(h.y)).mul(o))).compare(n)).mul(1 / 5);
@@ -8651,19 +8651,19 @@ var Nx = /* @__PURE__ */ Object.freeze({
8651
8651
  shadow: i
8652
8652
  });
8653
8653
  }
8654
- setupRenderTarget(e, n) {
8655
- let r = new t(e.mapSize.width);
8656
- r.name = "PointShadowDepthTexture", r.compareFunction = n.renderer.reversedDepthBuffer ? 518 : 515;
8657
- let i = n.createCubeRenderTarget(e.mapSize.width);
8658
- return i.texture.name = "PointShadowMap", i.depthTexture = r, {
8659
- shadowMap: i,
8660
- depthTexture: r
8654
+ setupRenderTarget(e, t) {
8655
+ let n = new kt(e.mapSize.width);
8656
+ n.name = "PointShadowDepthTexture", n.compareFunction = t.renderer.reversedDepthBuffer ? 518 : 515;
8657
+ let r = t.createCubeRenderTarget(e.mapSize.width);
8658
+ return r.texture.name = "PointShadowMap", r.depthTexture = n, {
8659
+ shadowMap: r,
8660
+ depthTexture: n
8661
8661
  };
8662
8662
  }
8663
8663
  renderShadow(e) {
8664
- let { shadow: t, shadowMap: n, light: r } = this, { renderer: i, scene: a } = e, o = t.camera, s = t.matrix, c = i.coordinateSystem === p, l = c ? tS : rS, u = c ? nS : iS;
8664
+ let { shadow: t, shadowMap: n, light: r } = this, { renderer: i, scene: a } = e, o = t.camera, s = t.matrix, c = i.coordinateSystem === m, l = c ? tS : rS, u = c ? nS : iS;
8665
8665
  n.setSize(t.mapSize.width, t.mapSize.width);
8666
- let d = i.autoClear, f = i.getClearColor(Zx), m = i.getClearAlpha();
8666
+ let d = i.autoClear, f = i.getClearColor(Zx), p = i.getClearAlpha();
8667
8667
  i.autoClear = !1, i.setClearColor(t.clearColor, t.clearAlpha);
8668
8668
  for (let e = 0; e < 6; e++) {
8669
8669
  i.setRenderTarget(n, e), i.clear();
@@ -8672,14 +8672,14 @@ var Nx = /* @__PURE__ */ Object.freeze({
8672
8672
  let d = a.name;
8673
8673
  a.name = `Point Light Shadow [ ${r.name || "ID: " + r.id} ] - Face ${e + 1}`, i.render(a, o), a.name = d;
8674
8674
  }
8675
- i.autoClear = d, i.setClearColor(f, m);
8675
+ i.autoClear = d, i.setClearColor(f, p);
8676
8676
  }
8677
8677
  }, lS = (e, t) => new cS(e, t), uS = class extends Df {
8678
8678
  static get type() {
8679
8679
  return "AnalyticLightNode";
8680
8680
  }
8681
8681
  constructor(e = null) {
8682
- super(), this.light = e, this.color = new s(), this.colorNode = e && e.colorNode || U(this.color).setGroup(H), this.baseColorNode = null, this.shadowNode = null, this.shadowColorNode = null, this.isAnalyticLightNode = !0, this.updateType = T.FRAME, e && e.shadow && (this._shadowDisposeListener = () => {
8682
+ super(), this.light = e, this.color = new fn(), this.colorNode = e && e.colorNode || U(this.color).setGroup(H), this.baseColorNode = null, this.shadowNode = null, this.shadowColorNode = null, this.isAnalyticLightNode = !0, this.updateType = T.FRAME, e && e.shadow && (this._shadowDisposeListener = () => {
8683
8683
  this.disposeShadow();
8684
8684
  }, e.addEventListener("dispose", this._shadowDisposeListener));
8685
8685
  }
@@ -10748,35 +10748,35 @@ var Nx = /* @__PURE__ */ Object.freeze({
10748
10748
  constructor(e, t) {
10749
10749
  super(), this.renderer = e, this.nodes = t;
10750
10750
  }
10751
- update(e, t, n) {
10752
- let r = this.renderer, i = this.nodes.getBackgroundNode(e) || e.background, a = !1;
10753
- if (i === null) r._clearColor.getRGB(KC), KC.a = r._clearColor.a;
10754
- else if (i.isColor === !0) i.getRGB(KC), KC.a = 1, a = !0;
10755
- else if (i.isNode === !0) {
10756
- let n = this.get(e), a = i;
10757
- KC.copy(r._clearColor);
10758
- let o = n.backgroundMesh;
10759
- if (o === void 0) {
10760
- let e = z(a).mul(ey).context({
10751
+ update(e, t, r) {
10752
+ let i = this.renderer, a = this.nodes.getBackgroundNode(e) || e.background, o = !1;
10753
+ if (a === null) i._clearColor.getRGB(KC), KC.a = i._clearColor.a;
10754
+ else if (a.isColor === !0) a.getRGB(KC), KC.a = 1, o = !0;
10755
+ else if (a.isNode === !0) {
10756
+ let r = this.get(e), o = a;
10757
+ KC.copy(i._clearColor);
10758
+ let s = r.backgroundMesh;
10759
+ if (s === void 0) {
10760
+ let e = z(o).mul(ey).context({
10761
10761
  getUV: () => ty.mul(su),
10762
10762
  getTextureLevel: () => $v
10763
- }), t = _l.element(3).element(3).equal(1), r = pa(1, _l.element(1).element(1)).mul(3), s = t.select(ql.mul(r), ql), c = Vl.mul(z(s, 0)), l = _l.mul(z(c.xyz, 1));
10764
- l = l.setZ(l.w);
10765
- let u = new _p();
10766
- u.name = "Background.material", u.side = 1, u.depthTest = !1, u.depthWrite = !1, u.allowOverride = !1, u.fog = !1, u.lights = !1, u.vertexNode = l, u.colorNode = e, n.backgroundMeshNode = e, n.backgroundMesh = o = new Zt(new ye(1, 32, 32), u), o.frustumCulled = !1, o.name = "Background.mesh";
10767
- function d() {
10768
- i.removeEventListener("dispose", d), o.material.dispose(), o.geometry.dispose();
10763
+ }), t = _l.element(3).element(3).equal(1), i = pa(1, _l.element(1).element(1)).mul(3), c = t.select(ql.mul(i), ql), l = Vl.mul(z(c, 0)), u = _l.mul(z(l.xyz, 1));
10764
+ u = u.setZ(u.w);
10765
+ let d = new _p();
10766
+ d.name = "Background.material", d.side = 1, d.depthTest = !1, d.depthWrite = !1, d.allowOverride = !1, d.fog = !1, d.lights = !1, d.vertexNode = u, d.colorNode = e, r.backgroundMeshNode = e, r.backgroundMesh = s = new st(new n(1, 32, 32), d), s.frustumCulled = !1, s.name = "Background.mesh";
10767
+ function f() {
10768
+ a.removeEventListener("dispose", f), s.material.dispose(), s.geometry.dispose();
10769
10769
  }
10770
- i.addEventListener("dispose", d);
10770
+ a.addEventListener("dispose", f);
10771
10771
  }
10772
- let s = a.getCacheKey();
10773
- n.backgroundCacheKey !== s && (n.backgroundMeshNode.node = z(a).mul(ey), n.backgroundMeshNode.needsUpdate = !0, o.material.needsUpdate = !0, n.backgroundCacheKey = s), t.unshift(o, o.geometry, o.material, 0, 0, null, null);
10774
- } else C("Renderer: Unsupported background configuration.", i);
10775
- let o = r.xr.getEnvironmentBlendMode();
10776
- if (o === "additive" ? KC.set(0, 0, 0, 1) : o === "alpha-blend" && KC.set(0, 0, 0, 0), r.autoClear === !0 || a === !0) {
10777
- let e = n.clearColorValue;
10778
- e.r = KC.r, e.g = KC.g, e.b = KC.b, e.a = KC.a, (r.backend.isWebGLBackend === !0 || r.alpha === !0) && (e.r *= e.a, e.g *= e.a, e.b *= e.a), n.depthClearValue = r.getClearDepth(), n.stencilClearValue = r.getClearStencil(), n.clearColor = r.autoClearColor === !0, n.clearDepth = r.autoClearDepth === !0, n.clearStencil = r.autoClearStencil === !0;
10779
- } else n.clearColor = !1, n.clearDepth = !1, n.clearStencil = !1;
10772
+ let c = o.getCacheKey();
10773
+ r.backgroundCacheKey !== c && (r.backgroundMeshNode.node = z(o).mul(ey), r.backgroundMeshNode.needsUpdate = !0, s.material.needsUpdate = !0, r.backgroundCacheKey = c), t.unshift(s, s.geometry, s.material, 0, 0, null, null);
10774
+ } else y("Renderer: Unsupported background configuration.", a);
10775
+ let s = i.xr.getEnvironmentBlendMode();
10776
+ if (s === "additive" ? KC.set(0, 0, 0, 1) : s === "alpha-blend" && KC.set(0, 0, 0, 0), i.autoClear === !0 || o === !0) {
10777
+ let e = r.clearColorValue;
10778
+ e.r = KC.r, e.g = KC.g, e.b = KC.b, e.a = KC.a, (i.backend.isWebGLBackend === !0 || i.alpha === !0) && (e.r *= e.a, e.g *= e.a, e.b *= e.a), r.depthClearValue = i.getClearDepth(), r.stencilClearValue = i.getClearStencil(), r.clearColor = i.autoClearColor === !0, r.clearDepth = i.autoClearDepth === !0, r.clearStencil = i.autoClearStencil === !0;
10779
+ } else r.clearColor = !1, r.clearDepth = !1, r.clearStencil = !1;
10780
10780
  }
10781
10781
  }, JC = 0, YC = class {
10782
10782
  constructor(e = "", t = []) {
@@ -10857,31 +10857,31 @@ var Nx = /* @__PURE__ */ Object.freeze({
10857
10857
  super(e, t), this.isNumberUniform = !0, this.boundary = 4, this.itemSize = 1;
10858
10858
  }
10859
10859
  }, sw = class extends aw {
10860
- constructor(e, t = new et()) {
10860
+ constructor(e, t = new mn()) {
10861
10861
  super(e, t), this.isVector2Uniform = !0, this.boundary = 8, this.itemSize = 2;
10862
10862
  }
10863
10863
  }, cw = class extends aw {
10864
- constructor(e, t = new w()) {
10864
+ constructor(e, t = new C()) {
10865
10865
  super(e, t), this.isVector3Uniform = !0, this.boundary = 16, this.itemSize = 3;
10866
10866
  }
10867
10867
  }, lw = class extends aw {
10868
- constructor(e, t = new Ce()) {
10868
+ constructor(e, t = new u()) {
10869
10869
  super(e, t), this.isVector4Uniform = !0, this.boundary = 16, this.itemSize = 4;
10870
10870
  }
10871
10871
  }, uw = class extends aw {
10872
- constructor(e, t = new s()) {
10872
+ constructor(e, t = new fn()) {
10873
10873
  super(e, t), this.isColorUniform = !0, this.boundary = 16, this.itemSize = 3;
10874
10874
  }
10875
10875
  }, dw = class extends aw {
10876
- constructor(e, t = new vt()) {
10876
+ constructor(e, t = new tt()) {
10877
10877
  super(e, t), this.isMatrix2Uniform = !0, this.boundary = 8, this.itemSize = 4;
10878
10878
  }
10879
10879
  }, fw = class extends aw {
10880
- constructor(e, t = new Ze()) {
10880
+ constructor(e, t = new Ut()) {
10881
10881
  super(e, t), this.isMatrix3Uniform = !0, this.boundary = 48, this.itemSize = 12;
10882
10882
  }
10883
10883
  }, pw = class extends aw {
10884
- constructor(e, t = new Lt()) {
10884
+ constructor(e, t = new rn()) {
10885
10885
  super(e, t), this.isMatrix4Uniform = !0, this.boundary = 64, this.itemSize = 16;
10886
10886
  }
10887
10887
  }, mw = class extends ow {
@@ -11011,7 +11011,7 @@ var Nx = /* @__PURE__ */ Object.freeze({
11011
11011
  return e.transparent === !1 && e.blending === 1 && e.alphaToCoverage === !1;
11012
11012
  }
11013
11013
  createRenderTarget(e, t, n) {
11014
- return new r(e, t, n);
11014
+ return new jt(e, t, n);
11015
11015
  }
11016
11016
  createCubeRenderTarget(e, t) {
11017
11017
  return new Tp(e, t);
@@ -11144,19 +11144,19 @@ var Nx = /* @__PURE__ */ Object.freeze({
11144
11144
  return !1;
11145
11145
  }
11146
11146
  getVertexIndex() {
11147
- v("Abstract function.");
11147
+ w("Abstract function.");
11148
11148
  }
11149
11149
  getInstanceIndex() {
11150
- v("Abstract function.");
11150
+ w("Abstract function.");
11151
11151
  }
11152
11152
  getDrawIndex() {
11153
- v("Abstract function.");
11153
+ w("Abstract function.");
11154
11154
  }
11155
11155
  getFrontFacing() {
11156
- v("Abstract function.");
11156
+ w("Abstract function.");
11157
11157
  }
11158
11158
  getFragCoord() {
11159
- v("Abstract function.");
11159
+ w("Abstract function.");
11160
11160
  }
11161
11161
  isFlipY() {
11162
11162
  return !1;
@@ -11166,10 +11166,10 @@ var Nx = /* @__PURE__ */ Object.freeze({
11166
11166
  return t.usageCount = t.usageCount === void 0 ? 1 : t.usageCount + 1, t.usageCount;
11167
11167
  }
11168
11168
  generateTexture() {
11169
- v("Abstract function.");
11169
+ w("Abstract function.");
11170
11170
  }
11171
11171
  generateTextureLod() {
11172
- v("Abstract function.");
11172
+ w("Abstract function.");
11173
11173
  }
11174
11174
  generateArrayDeclaration(e, t) {
11175
11175
  return this.getType(e) + "[ " + t + " ]";
@@ -11191,7 +11191,7 @@ var Nx = /* @__PURE__ */ Object.freeze({
11191
11191
  return e + "( " + r.join(", ") + " )";
11192
11192
  }
11193
11193
  generateConst(e, t = null) {
11194
- if (t === null && (e === "float" || e === "int" || e === "uint" ? t = 0 : e === "bool" ? t = !1 : e === "color" ? t = new s() : e === "vec2" || e === "uvec2" || e === "ivec2" ? t = new et() : e === "vec3" || e === "uvec3" || e === "ivec3" ? t = new w() : (e === "vec4" || e === "uvec4" || e === "ivec4") && (t = new Ce())), e === "float") return Ew(t);
11194
+ if (t === null && (e === "float" || e === "int" || e === "uint" ? t = 0 : e === "bool" ? t = !1 : e === "color" ? t = new fn() : e === "vec2" || e === "uvec2" || e === "ivec2" ? t = new mn() : e === "vec3" || e === "uvec3" || e === "ivec3" ? t = new C() : (e === "vec4" || e === "uvec4" || e === "ivec4") && (t = new u())), e === "float") return Ew(t);
11195
11195
  if (e === "int") return `${Math.round(t)}`;
11196
11196
  if (e === "uint") return t >= 0 ? `${Math.round(t)}u` : "0u";
11197
11197
  if (e === "bool") return t ? "true" : "false";
@@ -11265,7 +11265,7 @@ var Nx = /* @__PURE__ */ Object.freeze({
11265
11265
  let t = e;
11266
11266
  e.isInterleavedBufferAttribute && (t = e.data);
11267
11267
  let n = t.array, r = e.itemSize, i = e.normalized, a;
11268
- return !(e instanceof $e) && i !== !0 && (a = this.getTypeFromArray(n)), this.getTypeFromLength(r, a);
11268
+ return !(e instanceof Gt) && i !== !0 && (a = this.getTypeFromArray(n)), this.getTypeFromLength(r, a);
11269
11269
  }
11270
11270
  getTypeLength(e) {
11271
11271
  let t = this.getVectorType(e), n = /vec([2-4])/.exec(t);
@@ -11377,7 +11377,7 @@ var Nx = /* @__PURE__ */ Object.freeze({
11377
11377
  registerDeclaration(e) {
11378
11378
  let t = this.shaderStage, n = this.declarations[t] || (this.declarations[t] = {}), r = this.getPropertyName(e), i = 1, a = r;
11379
11379
  for (; n[a] !== void 0;) a = r + "_" + i++;
11380
- i > 1 && (e.name = a, v(`TSL: Declaration name '${r}' of '${e.type}' already in use. Renamed to '${a}'.`)), n[a] = e;
11380
+ i > 1 && (e.name = a, w(`TSL: Declaration name '${r}' of '${e.type}' already in use. Renamed to '${a}'.`)), n[a] = e;
11381
11381
  }
11382
11382
  getCodeFromNode(e, t, n = this.shaderStage) {
11383
11383
  let r = this.getDataFromNode(e), i = r.code;
@@ -11457,7 +11457,7 @@ var Nx = /* @__PURE__ */ Object.freeze({
11457
11457
  return null;
11458
11458
  }
11459
11459
  buildFunctionCode() {
11460
- v("Abstract function.");
11460
+ w("Abstract function.");
11461
11461
  }
11462
11462
  flowChildNode(e, t = null) {
11463
11463
  let n = this.flow, r = { code: "" };
@@ -11479,10 +11479,10 @@ var Nx = /* @__PURE__ */ Object.freeze({
11479
11479
  return this.attributes.concat(this.bufferAttributes);
11480
11480
  }
11481
11481
  getAttributes() {
11482
- v("Abstract function.");
11482
+ w("Abstract function.");
11483
11483
  }
11484
11484
  getVaryings() {
11485
- v("Abstract function.");
11485
+ w("Abstract function.");
11486
11486
  }
11487
11487
  getVar(e, t, n = null) {
11488
11488
  return `${n === null ? this.getType(e) : this.generateArrayDeclaration(e, n)} ${t}`;
@@ -11493,7 +11493,7 @@ var Nx = /* @__PURE__ */ Object.freeze({
11493
11493
  return n.join(t ? "\n" : "\n ");
11494
11494
  }
11495
11495
  getUniforms() {
11496
- v("Abstract function.");
11496
+ w("Abstract function.");
11497
11497
  }
11498
11498
  getCodes(e) {
11499
11499
  let t = this.codes[e], n = "";
@@ -11516,7 +11516,7 @@ var Nx = /* @__PURE__ */ Object.freeze({
11516
11516
  return this.buildStage;
11517
11517
  }
11518
11518
  buildCode() {
11519
- v("Abstract function.");
11519
+ w("Abstract function.");
11520
11520
  }
11521
11521
  get subBuild() {
11522
11522
  return this.subBuildLayers[this.subBuildLayers.length - 1] || null;
@@ -11551,12 +11551,12 @@ var Nx = /* @__PURE__ */ Object.freeze({
11551
11551
  if (t.contextNode.isContextNode === !0 ? this.context = {
11552
11552
  ...this.context,
11553
11553
  ...t.contextNode.getFlowContextData()
11554
- } : C("NodeBuilder: \"renderer.contextNode\" must be an instance of `context()`."), n && n.contextNode && (n.contextNode.isContextNode === !0 ? this.context = {
11554
+ } : y("NodeBuilder: \"renderer.contextNode\" must be an instance of `context()`."), n && n.contextNode && (n.contextNode.isContextNode === !0 ? this.context = {
11555
11555
  ...this.context,
11556
11556
  ...n.contextNode.getFlowContextData()
11557
- } : C("NodeBuilder: \"material.contextNode\" must be an instance of `context()`.")), n !== null) {
11557
+ } : y("NodeBuilder: \"material.contextNode\" must be an instance of `context()`.")), n !== null) {
11558
11558
  let e = t.library.fromMaterial(n);
11559
- e === null && (C(`NodeBuilder: Material "${n.type}" is not compatible.`), e = new _p()), e.build(this);
11559
+ e === null && (y(`NodeBuilder: Material "${n.type}" is not compatible.`), e = new _p()), e.build(this);
11560
11560
  } else this.addFlow("compute", e);
11561
11561
  }
11562
11562
  build() {
@@ -11579,7 +11579,7 @@ var Nx = /* @__PURE__ */ Object.freeze({
11579
11579
  this.setShaderStage(t);
11580
11580
  let n = this.flowNodes[t];
11581
11581
  for (let t of n) e === "generate" ? this.flowNode(t) : t.build(this);
11582
- await Le();
11582
+ await ee();
11583
11583
  }
11584
11584
  }
11585
11585
  return this.setBuildStage(null), this.setShaderStage(null), this.buildCode(), this.buildUpdateNodes(), this;
@@ -11701,7 +11701,7 @@ var Aw = class extends uS {
11701
11701
  return "HemisphereLightNode";
11702
11702
  }
11703
11703
  constructor(e = null) {
11704
- super(e), this.lightPositionNode = fx(e), this.lightDirectionNode = this.lightPositionNode.normalize(), this.groundColorNode = U(new s()).setGroup(H);
11704
+ super(e), this.lightPositionNode = fx(e), this.lightDirectionNode = this.lightPositionNode.normalize(), this.groundColorNode = U(new fn()).setGroup(H);
11705
11705
  }
11706
11706
  update(e) {
11707
11707
  let { light: t } = this;
@@ -11757,7 +11757,7 @@ var Aw = class extends uS {
11757
11757
  constructor(e = null) {
11758
11758
  super(e);
11759
11759
  let t = [];
11760
- for (let e = 0; e < 9; e++) t.push(new w());
11760
+ for (let e = 0; e < 9; e++) t.push(new C());
11761
11761
  this.lightProbe = zc(t);
11762
11762
  }
11763
11763
  update(e) {
@@ -11791,12 +11791,12 @@ var Aw = class extends uS {
11791
11791
  t.assign(Go(e.mul(-2).mul(i)));
11792
11792
  }), t;
11793
11793
  }
11794
- }, Rw = /* @__PURE__ */ new Lt(), zw = /* @__PURE__ */ new Lt(), Bw = null, Vw = class extends uS {
11794
+ }, Rw = /* @__PURE__ */ new rn(), zw = /* @__PURE__ */ new rn(), Bw = null, Vw = class extends uS {
11795
11795
  static get type() {
11796
11796
  return "RectAreaLightNode";
11797
11797
  }
11798
11798
  constructor(e = null) {
11799
- super(e), this.halfHeight = U(new w()).setGroup(H), this.halfWidth = U(new w()).setGroup(H), this.updateType = T.RENDER;
11799
+ super(e), this.halfHeight = U(new C()).setGroup(H), this.halfWidth = U(new C()).setGroup(H), this.updateType = T.RENDER;
11800
11800
  }
11801
11801
  update(e) {
11802
11802
  super.update(e);
@@ -11821,14 +11821,14 @@ var Aw = class extends uS {
11821
11821
  }
11822
11822
  }, Hw = class {
11823
11823
  parseFunction() {
11824
- v("Abstract function.");
11824
+ w("Abstract function.");
11825
11825
  }
11826
11826
  }, Uw = class {
11827
11827
  constructor(e, t, n = "", r = "") {
11828
11828
  this.type = e, this.inputs = t, this.name = n, this.precision = r;
11829
11829
  }
11830
11830
  getCode() {
11831
- v("Abstract function.");
11831
+ w("Abstract function.");
11832
11832
  }
11833
11833
  };
11834
11834
  Uw.isNodeFunction = !0;
@@ -11904,7 +11904,7 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
11904
11904
  try {
11905
11905
  t ? await n.buildAsync() : n.build();
11906
11906
  } catch (r) {
11907
- n = this._createNodeBuilder(e, new _p()), t ? await n.buildAsync() : n.build(), C("TSL: " + r);
11907
+ n = this._createNodeBuilder(e, new _p()), t ? await n.buildAsync() : n.build(), y("TSL: " + r);
11908
11908
  }
11909
11909
  return n;
11910
11910
  };
@@ -11916,7 +11916,7 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
11916
11916
  } catch (n) {
11917
11917
  t = this._createNodeBuilder(e, new _p()), t.build();
11918
11918
  let r = n.stackTrace;
11919
- !r && n.stack && (r = new On(n.stack)), C("TSL: " + n, r);
11919
+ !r && n.stack && (r = new On(n.stack)), y("TSL: " + n, r);
11920
11920
  }
11921
11921
  r = this._createNodeBuilderState(t), i.set(a, r);
11922
11922
  }
@@ -12007,7 +12007,7 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12007
12007
  return e = n.isCubeTexture === !0 ? Eu(n) : J(n), jp(e);
12008
12008
  }
12009
12009
  } else if (n.isTexture === !0) return J(n, Kc.flipY()).setUpdateMatrix(!0);
12010
- else n.isColor !== !0 && C("WebGPUNodes: Unsupported background configuration.", n);
12010
+ else n.isColor !== !0 && y("WebGPUNodes: Unsupported background configuration.", n);
12011
12011
  }, r), t.background = n, t.backgroundBlurriness = e.backgroundBlurriness);
12012
12012
  } else t.backgroundNode && (delete t.backgroundNode, delete t.background);
12013
12013
  }
@@ -12020,7 +12020,7 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12020
12020
  n ? t.fog !== n && (t.fogNode = this.getCacheNode("fog", n, () => {
12021
12021
  if (n.isFogExp2) return ab(Au("color", "color", n).setGroup(H), rb(Au("density", "float", n).setGroup(H)));
12022
12022
  if (n.isFog) return ab(Au("color", "color", n).setGroup(H), nb(Au("near", "float", n).setGroup(H), Au("far", "float", n).setGroup(H)));
12023
- C("Renderer: Unsupported fog configuration.", n);
12023
+ y("Renderer: Unsupported fog configuration.", n);
12024
12024
  }), t.fog = n) : (delete t.fogNode, delete t.fog);
12025
12025
  }
12026
12026
  updateEnvironment(e) {
@@ -12028,7 +12028,7 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12028
12028
  n ? t.environment !== n && (t.environmentNode = this.getCacheNode("environment", n, () => {
12029
12029
  if (n.isCubeTexture === !0) return Eu(n);
12030
12030
  if (n.isTexture === !0) return J(n);
12031
- C("Nodes: Unsupported environment configuration.", n);
12031
+ y("Nodes: Unsupported environment configuration.", n);
12032
12032
  }), t.environment = n) : t.environmentNode && (delete t.environmentNode, delete t.environment);
12033
12033
  }
12034
12034
  getNodeFrame(e = this.renderer, t = null, n = null, r = null, i = null) {
@@ -12069,9 +12069,9 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12069
12069
  dispose() {
12070
12070
  super.dispose(), this.nodeFrame = new Ow(), this.nodeBuilderCache = /* @__PURE__ */ new Map(), this.cacheLib = {};
12071
12071
  }
12072
- }, $w = /* @__PURE__ */ new he(), eT = class e {
12072
+ }, $w = /* @__PURE__ */ new Mt(), eT = class e {
12073
12073
  constructor(e = null) {
12074
- this.version = 0, this.clipIntersection = null, this.cacheKey = "", this.shadowPass = !1, this.viewNormalMatrix = new Ze(), this.clippingGroupContexts = /* @__PURE__ */ new WeakMap(), this.intersectionPlanes = [], this.unionPlanes = [], this.parentVersion = null, e !== null && (this.viewNormalMatrix = e.viewNormalMatrix, this.clippingGroupContexts = e.clippingGroupContexts, this.shadowPass = e.shadowPass, this.viewMatrix = e.viewMatrix);
12074
+ this.version = 0, this.clipIntersection = null, this.cacheKey = "", this.shadowPass = !1, this.viewNormalMatrix = new Ut(), this.clippingGroupContexts = /* @__PURE__ */ new WeakMap(), this.intersectionPlanes = [], this.unionPlanes = [], this.parentVersion = null, e !== null && (this.viewNormalMatrix = e.viewNormalMatrix, this.clippingGroupContexts = e.clippingGroupContexts, this.shadowPass = e.shadowPass, this.viewMatrix = e.viewMatrix);
12075
12075
  }
12076
12076
  projectPlanes(e, t, n) {
12077
12077
  let r = e.length;
@@ -12090,7 +12090,7 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12090
12090
  let r = t.clippingPlanes, i = r.length, a, o;
12091
12091
  if (this.clipIntersection ? (a = this.intersectionPlanes, o = e.intersectionPlanes.length) : (a = this.unionPlanes, o = e.unionPlanes.length), a.length !== o + i) {
12092
12092
  a.length = o + i;
12093
- for (let e = 0; e < i; e++) a[o + e] = new Ce();
12093
+ for (let e = 0; e < i; e++) a[o + e] = new u();
12094
12094
  n = !0;
12095
12095
  }
12096
12096
  this.projectPlanes(r, a, o), n && (this.version++, this.cacheKey = `${this.intersectionPlanes.length}:${this.unionPlanes.length}`);
@@ -12153,7 +12153,7 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12153
12153
  }
12154
12154
  addType(e, t, n) {
12155
12155
  if (n.has(t)) {
12156
- v(`Redefinition of node ${t}`);
12156
+ w(`Redefinition of node ${t}`);
12157
12157
  return;
12158
12158
  }
12159
12159
  if (typeof e != "function") throw Error(`Node class ${e.name} is not a class.`);
@@ -12162,7 +12162,7 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12162
12162
  }
12163
12163
  addClass(e, t, n) {
12164
12164
  if (n.has(t)) {
12165
- v(`Redefinition of node ${t.name}`);
12165
+ w(`Redefinition of node ${t.name}`);
12166
12166
  return;
12167
12167
  }
12168
12168
  if (typeof e != "function") throw Error(`Node class ${e.name} is not a class.`);
@@ -12178,16 +12178,16 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12178
12178
  let t = oT.get(e);
12179
12179
  return t === void 0 && (t = this.createNode(), oT.set(e, t)), t;
12180
12180
  }
12181
- }, cT = class extends r {
12181
+ }, cT = class extends jt {
12182
12182
  constructor(e = 1, t = 1, n = {}) {
12183
12183
  super(e, t, n), this.isXRRenderTarget = !0, this._hasExternalTextures = !1, this._autoAllocateDepthBuffer = !0, this._isOpaqueFramebuffer = !1;
12184
12184
  }
12185
12185
  copy(e) {
12186
12186
  return super.copy(e), this._hasExternalTextures = e._hasExternalTextures, this._autoAllocateDepthBuffer = e._autoAllocateDepthBuffer, this._isOpaqueFramebuffer = e._isOpaqueFramebuffer, this;
12187
12187
  }
12188
- }, lT = /* @__PURE__ */ new w(), uT = /* @__PURE__ */ new w(), dT = /* @__PURE__ */ new WeakMap(), fT = class extends It {
12188
+ }, lT = /* @__PURE__ */ new C(), uT = /* @__PURE__ */ new C(), dT = /* @__PURE__ */ new WeakMap(), fT = class extends nn {
12189
12189
  constructor(e, t = !1) {
12190
- super(), this.enabled = !1, this.isPresenting = !1, this.cameraAutoUpdate = !0, this._renderer = e, this._cameraL = new u(), this._cameraL.viewport = new Ce(), this._cameraR = new u(), this._cameraR.viewport = new Ce(), this._cameras = [this._cameraL, this._cameraR], this._cameraXR = new Ye(), this._currentDepthNear = null, this._currentDepthFar = null, this._controllers = [], this._controllerInputSources = [], this._xrRenderTarget = null, this._layers = [], this._sessionUsesLayers = !1, this._supportsGlBinding = typeof XRWebGLBinding < "u", this._createXRLayer = yT.bind(this), this._gl = null, this._currentAnimationContext = null, this._currentAnimationLoop = null, this._currentPixelRatio = null, this._currentSize = new et(), this._onSessionEvent = gT.bind(this), this._onSessionEnd = _T.bind(this), this._onInputSourcesChange = vT.bind(this), this._onAnimationFrame = bT.bind(this), this._referenceSpace = null, this._referenceSpaceType = "local-floor", this._customReferenceSpace = null, this._framebufferScaleFactor = 1, this._foveation = 1, this._session = null, this._glBaseLayer = null, this._glBinding = null, this._glProjLayer = null, this._xrFrame = null, this._supportsLayers = this._supportsGlBinding && "createProjectionLayer" in XRWebGLBinding.prototype, this._useMultiviewIfPossible = t, this._useMultiview = !1;
12190
+ super(), this.enabled = !1, this.isPresenting = !1, this.cameraAutoUpdate = !0, this._renderer = e, this._cameraL = new _e(), this._cameraL.viewport = new u(), this._cameraR = new _e(), this._cameraR.viewport = new u(), this._cameras = [this._cameraL, this._cameraR], this._cameraXR = new et(), this._currentDepthNear = null, this._currentDepthFar = null, this._controllers = [], this._controllerInputSources = [], this._xrRenderTarget = null, this._layers = [], this._sessionUsesLayers = !1, this._supportsGlBinding = typeof XRWebGLBinding < "u", this._createXRLayer = yT.bind(this), this._gl = null, this._currentAnimationContext = null, this._currentAnimationLoop = null, this._currentPixelRatio = null, this._currentSize = new mn(), this._onSessionEvent = gT.bind(this), this._onSessionEnd = _T.bind(this), this._onInputSourcesChange = vT.bind(this), this._onAnimationFrame = bT.bind(this), this._referenceSpace = null, this._referenceSpaceType = "local-floor", this._customReferenceSpace = null, this._framebufferScaleFactor = 1, this._foveation = 1, this._session = null, this._glBaseLayer = null, this._glBinding = null, this._glProjLayer = null, this._xrFrame = null, this._supportsLayers = this._supportsGlBinding && "createProjectionLayer" in XRWebGLBinding.prototype, this._useMultiviewIfPossible = t, this._useMultiview = !1;
12191
12191
  }
12192
12192
  getController(e) {
12193
12193
  return this._getController(e).getTargetRaySpace();
@@ -12208,13 +12208,13 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12208
12208
  return this._framebufferScaleFactor;
12209
12209
  }
12210
12210
  setFramebufferScaleFactor(e) {
12211
- this._framebufferScaleFactor = e, this.isPresenting === !0 && v("XRManager: Cannot change framebuffer scale while presenting.");
12211
+ this._framebufferScaleFactor = e, this.isPresenting === !0 && w("XRManager: Cannot change framebuffer scale while presenting.");
12212
12212
  }
12213
12213
  getReferenceSpaceType() {
12214
12214
  return this._referenceSpaceType;
12215
12215
  }
12216
12216
  setReferenceSpaceType(e) {
12217
- this._referenceSpaceType = e, this.isPresenting === !0 && v("XRManager: Cannot change reference space type while presenting.");
12217
+ this._referenceSpaceType = e, this.isPresenting === !0 && w("XRManager: Cannot change reference space type while presenting.");
12218
12218
  }
12219
12219
  getReferenceSpace() {
12220
12220
  return this._customReferenceSpace || this._referenceSpace;
@@ -12237,62 +12237,62 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12237
12237
  useMultiview() {
12238
12238
  return this._useMultiview;
12239
12239
  }
12240
- createQuadLayer(e, t, n, r, i, a, o, s = {}) {
12241
- let c = new Ct(e, t), l = new cT(i, a, {
12242
- format: Re,
12243
- type: lt,
12244
- depthTexture: new x(i, a, s.stencil ? Ot : ft, void 0, void 0, void 0, void 0, void 0, void 0, s.stencil ? Wt : ne),
12245
- stencilBuffer: s.stencil,
12240
+ createQuadLayer(e, t, n, r, i, o, s, c = {}) {
12241
+ let l = new a(e, t), u = new cT(i, o, {
12242
+ format: x,
12243
+ type: qt,
12244
+ depthTexture: new Ke(i, o, c.stencil ? St : Qe, void 0, void 0, void 0, void 0, void 0, void 0, c.stencil ? ie : Xt),
12245
+ stencilBuffer: c.stencil,
12246
12246
  resolveDepthBuffer: !1,
12247
12247
  resolveStencilBuffer: !1
12248
12248
  });
12249
- l._autoAllocateDepthBuffer = !0;
12250
- let u = new rt({
12249
+ u._autoAllocateDepthBuffer = !0;
12250
+ let d = new Pt({
12251
12251
  color: 16777215,
12252
12252
  side: 0
12253
12253
  });
12254
- u.map = l.texture, u.map.offset.y = 1, u.map.repeat.y = -1;
12255
- let d = new Zt(c, u);
12256
- d.position.copy(n), d.quaternion.copy(r);
12257
- let f = {
12254
+ d.map = u.texture, d.map.offset.y = 1, d.map.repeat.y = -1;
12255
+ let f = new st(l, d);
12256
+ f.position.copy(n), f.quaternion.copy(r);
12257
+ let p = {
12258
12258
  type: "quad",
12259
12259
  width: e,
12260
12260
  height: t,
12261
12261
  translation: n,
12262
12262
  quaternion: r,
12263
12263
  pixelwidth: i,
12264
- pixelheight: a,
12265
- plane: d,
12266
- material: u,
12267
- rendercall: o,
12268
- renderTarget: l
12264
+ pixelheight: o,
12265
+ plane: f,
12266
+ material: d,
12267
+ rendercall: s,
12268
+ renderTarget: u
12269
12269
  };
12270
- if (this._layers.push(f), this._session !== null) {
12271
- f.plane.material = new rt({
12270
+ if (this._layers.push(p), this._session !== null) {
12271
+ p.plane.material = new Pt({
12272
12272
  color: 16777215,
12273
12273
  side: 0
12274
- }), f.plane.material.blending = 5, f.plane.material.blendEquation = 100, f.plane.material.blendSrc = 200, f.plane.material.blendDst = 200, f.xrlayer = this._createXRLayer(f);
12274
+ }), p.plane.material.blending = 5, p.plane.material.blendEquation = 100, p.plane.material.blendSrc = 200, p.plane.material.blendDst = 200, p.xrlayer = this._createXRLayer(p);
12275
12275
  let e = this._session.renderState.layers;
12276
- e.unshift(f.xrlayer), this._session.updateRenderState({ layers: e });
12277
- } else l.isXRRenderTarget = !1;
12278
- return d;
12276
+ e.unshift(p.xrlayer), this._session.updateRenderState({ layers: e });
12277
+ } else u.isXRRenderTarget = !1;
12278
+ return f;
12279
12279
  }
12280
12280
  createCylinderLayer(e, t, n, r, i, a, o, s, c = {}) {
12281
- let l = new ae(e, e, e * t / n, 64, 64, !0, Math.PI - t / 2, t), u = new cT(a, o, {
12282
- format: Re,
12283
- type: lt,
12284
- depthTexture: new x(a, o, c.stencil ? Ot : ft, void 0, void 0, void 0, void 0, void 0, void 0, c.stencil ? Wt : ne),
12281
+ let l = new we(e, e, e * t / n, 64, 64, !0, Math.PI - t / 2, t), u = new cT(a, o, {
12282
+ format: x,
12283
+ type: qt,
12284
+ depthTexture: new Ke(a, o, c.stencil ? St : Qe, void 0, void 0, void 0, void 0, void 0, void 0, c.stencil ? ie : Xt),
12285
12285
  stencilBuffer: c.stencil,
12286
12286
  resolveDepthBuffer: !1,
12287
12287
  resolveStencilBuffer: !1
12288
12288
  });
12289
12289
  u._autoAllocateDepthBuffer = !0;
12290
- let d = new rt({
12290
+ let d = new Pt({
12291
12291
  color: 16777215,
12292
12292
  side: 1
12293
12293
  });
12294
12294
  d.map = u.texture, d.map.offset.y = 1, d.map.repeat.y = -1;
12295
- let f = new Zt(l, d);
12295
+ let f = new st(l, d);
12296
12296
  f.position.copy(r), f.quaternion.copy(i);
12297
12297
  let p = {
12298
12298
  type: "cylinder",
@@ -12309,7 +12309,7 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12309
12309
  renderTarget: u
12310
12310
  };
12311
12311
  if (this._layers.push(p), this._session !== null) {
12312
- p.plane.material = new rt({
12312
+ p.plane.material = new Pt({
12313
12313
  color: 16777215,
12314
12314
  side: 1
12315
12315
  }), p.plane.material.blending = 5, p.plane.material.blendEquation = 100, p.plane.material.blendSrc = 200, p.plane.material.blendDst = 200, p.xrlayer = this._createXRLayer(p);
@@ -12319,9 +12319,9 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12319
12319
  return f;
12320
12320
  }
12321
12321
  renderLayers() {
12322
- let e = new w(), t = new b(), n = this._renderer, r = this.isPresenting;
12322
+ let e = new C(), t = new ce(), n = this._renderer, r = this.isPresenting;
12323
12323
  this.isPresenting = !1;
12324
- let i = new et();
12324
+ let i = new mn();
12325
12325
  n.getSize(i);
12326
12326
  let a = n.getRenderTarget();
12327
12327
  for (let r of this._layers) {
@@ -12347,7 +12347,7 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12347
12347
  if (n.isWebGPUBackend === !0) throw Error("THREE.XRManager: XR is currently not supported with a WebGPU backend. Use WebGL by passing \"{ forceWebGL: true }\" to the constructor of the renderer.");
12348
12348
  if (e.addEventListener("select", this._onSessionEvent), e.addEventListener("selectstart", this._onSessionEvent), e.addEventListener("selectend", this._onSessionEvent), e.addEventListener("squeeze", this._onSessionEvent), e.addEventListener("squeezestart", this._onSessionEvent), e.addEventListener("squeezeend", this._onSessionEvent), e.addEventListener("end", this._onSessionEnd), e.addEventListener("inputsourceschange", this._onInputSourcesChange), await n.makeXRCompatible(), this._currentPixelRatio = t.getPixelRatio(), t.getSize(this._currentSize), this._currentAnimationContext = t._animation.getContext(), this._currentAnimationLoop = t._animation.getAnimationLoop(), t._animation.stop(), this._supportsLayers === !0) {
12349
12349
  let n = null, a = null, o = null;
12350
- t.depth && (o = t.stencil ? r.DEPTH24_STENCIL8 : r.DEPTH_COMPONENT24, n = t.stencil ? Wt : ne, a = t.stencil ? Ot : ft);
12350
+ t.depth && (o = t.stencil ? r.DEPTH24_STENCIL8 : r.DEPTH_COMPONENT24, n = t.stencil ? ie : Xt, a = t.stencil ? St : Qe);
12351
12351
  let s = {
12352
12352
  colorFormat: r.RGBA8,
12353
12353
  depthFormat: o,
@@ -12357,10 +12357,10 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12357
12357
  this._useMultiviewIfPossible && t.hasFeature("OVR_multiview2") && (s.textureType = "texture-array", this._useMultiview = !0), this._glBinding = this.getBinding();
12358
12358
  let c = this._glBinding.createProjectionLayer(s), l = [c];
12359
12359
  this._glProjLayer = c, t.setPixelRatio(1), t._setXRLayerSize(c.textureWidth, c.textureHeight);
12360
- let u = this._useMultiview ? 2 : 1, d = new x(c.textureWidth, c.textureHeight, a, void 0, void 0, void 0, void 0, void 0, void 0, n, u);
12360
+ let u = this._useMultiview ? 2 : 1, d = new Ke(c.textureWidth, c.textureHeight, a, void 0, void 0, void 0, void 0, void 0, void 0, n, u);
12361
12361
  if (this._xrRenderTarget = new cT(c.textureWidth, c.textureHeight, {
12362
- format: Re,
12363
- type: lt,
12362
+ format: x,
12363
+ type: qt,
12364
12364
  colorSpace: t.outputColorSpace,
12365
12365
  depthTexture: d,
12366
12366
  stencilBuffer: t.stencil,
@@ -12369,7 +12369,7 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12369
12369
  resolveStencilBuffer: c.ignoreDepthValues === !1,
12370
12370
  depth: this._useMultiview ? 2 : 1,
12371
12371
  multiview: this._useMultiview
12372
- }), this._xrRenderTarget._hasExternalTextures = !0, this._xrRenderTarget.depth = this._useMultiview ? 2 : 1, this._sessionUsesLayers = e.enabledFeatures.includes("layers"), this._referenceSpace = await e.requestReferenceSpace(this.getReferenceSpaceType()), this._sessionUsesLayers) for (let e of this._layers) e.plane.material = new rt({
12372
+ }), this._xrRenderTarget._hasExternalTextures = !0, this._xrRenderTarget.depth = this._useMultiview ? 2 : 1, this._sessionUsesLayers = e.enabledFeatures.includes("layers"), this._referenceSpace = await e.requestReferenceSpace(this.getReferenceSpaceType()), this._sessionUsesLayers) for (let e of this._layers) e.plane.material = new Pt({
12373
12373
  color: 16777215,
12374
12374
  side: e.type === "cylinder" ? 1 : 0
12375
12375
  }), e.plane.material.blending = 5, e.plane.material.blendEquation = 100, e.plane.material.blendSrc = 200, e.plane.material.blendDst = 200, e.xrlayer = this._createXRLayer(e), l.unshift(e.xrlayer);
@@ -12383,8 +12383,8 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12383
12383
  framebufferScaleFactor: this.getFramebufferScaleFactor()
12384
12384
  }, i = new XRWebGLLayer(e, r, n);
12385
12385
  this._glBaseLayer = i, e.updateRenderState({ baseLayer: i }), t.setPixelRatio(1), t._setXRLayerSize(i.framebufferWidth, i.framebufferHeight), this._xrRenderTarget = new cT(i.framebufferWidth, i.framebufferHeight, {
12386
- format: Re,
12387
- type: lt,
12386
+ format: x,
12387
+ type: qt,
12388
12388
  colorSpace: t.outputColorSpace,
12389
12389
  stencilBuffer: t.stencil,
12390
12390
  resolveDepthBuffer: i.ignoreDepthValues === !1,
@@ -12409,7 +12409,7 @@ var Ww = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?
12409
12409
  }
12410
12410
  _getController(e) {
12411
12411
  let t = this._controllers[e];
12412
- return t === void 0 && (t = new l(), this._controllers[e] = t), t;
12412
+ return t === void 0 && (t = new ge(), this._controllers[e] = t), t;
12413
12413
  }
12414
12414
  };
12415
12415
  function pT(e, t, n) {
@@ -12425,7 +12425,7 @@ function mT(e, t) {
12425
12425
  t === null ? e.matrixWorld.copy(e.matrix) : e.matrixWorld.multiplyMatrices(t.matrixWorld, e.matrix), e.matrixWorldInverse.copy(e.matrixWorld).invert();
12426
12426
  }
12427
12427
  function hT(e, t, n) {
12428
- n === null ? e.matrix.copy(t.matrixWorld) : (e.matrix.copy(n.matrixWorld), e.matrix.invert(), e.matrix.multiply(t.matrixWorld)), e.matrix.decompose(e.position, e.quaternion, e.scale), e.updateMatrixWorld(!0), e.projectionMatrix.copy(t.projectionMatrix), e.projectionMatrixInverse.copy(t.projectionMatrixInverse), e.isPerspectiveCamera && (e.fov = a * 2 * Math.atan(1 / e.projectionMatrix.elements[5]), e.zoom = 1);
12428
+ n === null ? e.matrix.copy(t.matrixWorld) : (e.matrix.copy(n.matrixWorld), e.matrix.invert(), e.matrix.multiply(t.matrixWorld)), e.matrix.decompose(e.position, e.quaternion, e.scale), e.updateMatrixWorld(!0), e.projectionMatrix.copy(t.projectionMatrix), e.projectionMatrixInverse.copy(t.projectionMatrixInverse), e.isPerspectiveCamera && (e.fov = Le * 2 * Math.atan(1 / e.projectionMatrix.elements[5]), e.zoom = 1);
12429
12429
  }
12430
12430
  function gT(e) {
12431
12431
  let t = this._controllerInputSources.indexOf(e.inputSource);
@@ -12447,9 +12447,9 @@ function _T() {
12447
12447
  t !== null && (this._controllerInputSources[e] = null, this._controllers[e].disconnect(t));
12448
12448
  }
12449
12449
  if (this._currentDepthNear = null, this._currentDepthFar = null, t._resetXRState(), this._session = null, this._xrRenderTarget = null, this._glBinding = null, this._glBaseLayer = null, this._glProjLayer = null, this._sessionUsesLayers === !0) for (let e of this._layers) e.renderTarget = new cT(e.pixelwidth, e.pixelheight, {
12450
- format: Re,
12451
- type: lt,
12452
- depthTexture: new x(e.pixelwidth, e.pixelheight, e.stencilBuffer ? Ot : ft, void 0, void 0, void 0, void 0, void 0, void 0, e.stencilBuffer ? Wt : ne),
12450
+ format: x,
12451
+ type: qt,
12452
+ depthTexture: new Ke(e.pixelwidth, e.pixelheight, e.stencilBuffer ? St : Qe, void 0, void 0, void 0, void 0, void 0, void 0, e.stencilBuffer ? ie : Xt),
12453
12453
  stencilBuffer: e.stencilBuffer,
12454
12454
  resolveDepthBuffer: !1,
12455
12455
  resolveStencilBuffer: !1
@@ -12513,7 +12513,7 @@ function bT(e, t) {
12513
12513
  s = e.viewport, r === 0 && i.setXRRenderTargetTextures(this._xrRenderTarget, e.colorTexture, this._glProjLayer.ignoreDepthValues && !this._useMultiview ? void 0 : e.depthStencilTexture);
12514
12514
  } else s = a.getViewport(o);
12515
12515
  let c = this._cameras[r];
12516
- c === void 0 && (c = new u(), c.layers.enable(r), c.viewport = new Ce(), this._cameras[r] = c), c.matrix.fromArray(o.transform.matrix), c.matrix.decompose(c.position, c.quaternion, c.scale), c.projectionMatrix.fromArray(o.projectionMatrix), c.projectionMatrixInverse.copy(c.projectionMatrix).invert(), c.viewport.set(s.x, s.y, s.width, s.height), r === 0 && (n.matrix.copy(c.matrix), n.matrix.decompose(n.position, n.quaternion, n.scale)), t === !0 && n.cameras.push(c);
12516
+ c === void 0 && (c = new _e(), c.layers.enable(r), c.viewport = new u(), this._cameras[r] = c), c.matrix.fromArray(o.transform.matrix), c.matrix.decompose(c.position, c.quaternion, c.scale), c.projectionMatrix.fromArray(o.projectionMatrix), c.projectionMatrixInverse.copy(c.projectionMatrix).invert(), c.viewport.set(s.x, s.y, s.width, s.height), r === 0 && (n.matrix.copy(c.matrix), n.matrix.decompose(n.position, n.quaternion, n.scale)), t === !0 && n.cameras.push(c);
12517
12517
  }
12518
12518
  r.setOutputRenderTarget(this._xrRenderTarget);
12519
12519
  }
@@ -12526,9 +12526,9 @@ function bT(e, t) {
12526
12526
  data: t
12527
12527
  }), this._xrFrame = null;
12528
12528
  }
12529
- var xT = class extends It {
12529
+ var xT = class extends nn {
12530
12530
  constructor(e) {
12531
- super(), this.domElement = e, this._pixelRatio = 1, this._width = this.domElement.width, this._height = this.domElement.height, this._viewport = new Ce(0, 0, this._width, this._height), this._scissor = new Ce(0, 0, this._width, this._height), this._scissorTest = !1, this.colorTexture = new Et(), this.depthTexture = new x();
12531
+ super(), this.domElement = e, this._pixelRatio = 1, this._width = this.domElement.width, this._height = this.domElement.height, this._viewport = new u(0, 0, this._width, this._height), this._scissor = new u(0, 0, this._width, this._height), this._scissorTest = !1, this.colorTexture = new ln(), this.depthTexture = new Ke();
12532
12532
  }
12533
12533
  getPixelRatio() {
12534
12534
  return this._pixelRatio;
@@ -12575,19 +12575,19 @@ var xT = class extends It {
12575
12575
  dispose() {
12576
12576
  this.dispatchEvent({ type: "dispose" });
12577
12577
  }
12578
- }, ST = /* @__PURE__ */ new Fe(), CT = /* @__PURE__ */ new et(), wT = /* @__PURE__ */ new Ce(), TT = /* @__PURE__ */ new an(), ET = /* @__PURE__ */ new ot(), DT = /* @__PURE__ */ new Lt(), OT = /* @__PURE__ */ new Ce(), kT = {
12578
+ }, ST = /* @__PURE__ */ new te(), CT = /* @__PURE__ */ new mn(), wT = /* @__PURE__ */ new u(), TT = /* @__PURE__ */ new ft(), ET = /* @__PURE__ */ new gt(), DT = /* @__PURE__ */ new rn(), OT = /* @__PURE__ */ new u(), kT = {
12579
12579
  0: 1,
12580
12580
  1: 0,
12581
12581
  2: 2
12582
12582
  }, AT = class {
12583
12583
  constructor(e, t = {}) {
12584
12584
  this.isRenderer = !0;
12585
- let { logarithmicDepthBuffer: n = !1, reversedDepthBuffer: r = !1, alpha: i = !0, depth: a = !0, stencil: o = !1, antialias: s = !1, samples: c = 0, getFallback: l = null, outputBufferType: u = jt, multiview: d = !1 } = t;
12586
- this.backend = e, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.alpha = i, this.logarithmicDepthBuffer = n, this.reversedDepthBuffer = r, this.outputColorSpace = bn, this.toneMapping = 0, this.toneMappingExposure = 1, this.sortObjects = !0, this.depth = a, this.stencil = o, this.info = new Ng(), this.contextNode = is(), this.library = new iT(), this.lighting = new sT(), this._samples = c || s === !0 ? 4 : 0, this._onCanvasTargetResize = this._onCanvasTargetResize.bind(this), this._canvasTarget = new xT(e.getDomElement()), this._canvasTarget.addEventListener("resize", this._onCanvasTargetResize), this._canvasTarget.isDefaultCanvasTarget = !0, this._inspector = new hc(), this._inspector.setRenderer(this), this._getFallback = l, this._attributes = null, this._geometries = null, this._nodes = null, this._animation = null, this._bindings = null, this._objects = null, this._pipelines = null, this._bundles = null, this._renderLists = null, this._renderContexts = null, this._textures = null, this._background = null, this._quadCache = /* @__PURE__ */ new Map(), this._currentRenderContext = null, this._opaqueSort = null, this._transparentSort = null, this._frameBufferTargets = /* @__PURE__ */ new Map(), this._clearColor = new $g(0, 0, 0, this.alpha === !0 ? 0 : 1), this._clearDepth = 1, this._clearStencil = 0, this._renderTarget = null, this._activeCubeFace = 0, this._activeMipmapLevel = 0, this._outputRenderTarget = null, this._mrt = null, this._renderObjectFunction = null, this._currentRenderObjectFunction = null, this._currentRenderBundle = null, this._handleObjectFunction = this._renderObjectDirect, this._isDeviceLost = !1, this.onDeviceLost = this._onDeviceLost, this._outputBufferType = u, this._cacheShadowNodes = /* @__PURE__ */ new WeakMap(), this._initialized = !1, this._callDepth = -1, this._initPromise = null, this._compilationPromises = null, this.transparent = !0, this.opaque = !0, this.shadowMap = {
12585
+ let { logarithmicDepthBuffer: n = !1, reversedDepthBuffer: r = !1, alpha: i = !0, depth: a = !0, stencil: o = !1, antialias: s = !1, samples: c = 0, getFallback: u = null, outputBufferType: d = Tt, multiview: f = !1 } = t;
12586
+ this.backend = e, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.alpha = i, this.logarithmicDepthBuffer = n, this.reversedDepthBuffer = r, this.outputColorSpace = l, this.toneMapping = 0, this.toneMappingExposure = 1, this.sortObjects = !0, this.depth = a, this.stencil = o, this.info = new Ng(), this.contextNode = is(), this.library = new iT(), this.lighting = new sT(), this._samples = c || s === !0 ? 4 : 0, this._onCanvasTargetResize = this._onCanvasTargetResize.bind(this), this._canvasTarget = new xT(e.getDomElement()), this._canvasTarget.addEventListener("resize", this._onCanvasTargetResize), this._canvasTarget.isDefaultCanvasTarget = !0, this._inspector = new hc(), this._inspector.setRenderer(this), this._getFallback = u, this._attributes = null, this._geometries = null, this._nodes = null, this._animation = null, this._bindings = null, this._objects = null, this._pipelines = null, this._bundles = null, this._renderLists = null, this._renderContexts = null, this._textures = null, this._background = null, this._quadCache = /* @__PURE__ */ new Map(), this._currentRenderContext = null, this._opaqueSort = null, this._transparentSort = null, this._frameBufferTargets = /* @__PURE__ */ new Map(), this._clearColor = new $g(0, 0, 0, this.alpha === !0 ? 0 : 1), this._clearDepth = 1, this._clearStencil = 0, this._renderTarget = null, this._activeCubeFace = 0, this._activeMipmapLevel = 0, this._outputRenderTarget = null, this._mrt = null, this._renderObjectFunction = null, this._currentRenderObjectFunction = null, this._currentRenderBundle = null, this._handleObjectFunction = this._renderObjectDirect, this._isDeviceLost = !1, this.onDeviceLost = this._onDeviceLost, this._outputBufferType = d, this._cacheShadowNodes = /* @__PURE__ */ new WeakMap(), this._initialized = !1, this._callDepth = -1, this._initPromise = null, this._compilationPromises = null, this.transparent = !0, this.opaque = !0, this.shadowMap = {
12587
12587
  enabled: !1,
12588
12588
  transmitted: !1,
12589
12589
  type: 1
12590
- }, this.xr = new fT(this, d), this.debug = {
12590
+ }, this.xr = new fT(this, f), this.debug = {
12591
12591
  checkShaderErrors: !0,
12592
12592
  onShaderError: null,
12593
12593
  getShaderAsync: async (e, t, n) => {
@@ -12648,14 +12648,14 @@ var xT = class extends It {
12648
12648
  let t = this._objects.get(e.object, e.material, e.scene, e.camera, e.lightsNode, e.renderContext, e.clippingContext, e.passId);
12649
12649
  t.drawRange = e.object.geometry.drawRange, t.group = e.group, this._geometries.updateForRender(t), await this._nodes.getForRenderAsync(t), this._nodes.updateBefore(t), this._nodes.updateForRender(t), this._bindings.updateForRender(t);
12650
12650
  let n = [];
12651
- this._pipelines.getForRender(t, n), n.length > 0 && await Promise.all(n), this._nodes.updateAfter(t), await Le();
12651
+ this._pipelines.getForRender(t, n), n.length > 0 && await Promise.all(n), this._nodes.updateAfter(t), await ee();
12652
12652
  }
12653
12653
  }
12654
12654
  async renderAsync(e, t) {
12655
- Ae("Renderer: \"renderAsync()\" has been deprecated. Use \"render()\" and \"await renderer.init();\" when creating the renderer."), await this.init(), this.render(e, t);
12655
+ Be("Renderer: \"renderAsync()\" has been deprecated. Use \"render()\" and \"await renderer.init();\" when creating the renderer."), await this.init(), this.render(e, t);
12656
12656
  }
12657
12657
  async waitForGPU() {
12658
- C("Renderer: waitForGPU() has been removed. Read https://github.com/mrdoob/three.js/issues/32012 for more information.");
12658
+ y("Renderer: waitForGPU() has been removed. Read https://github.com/mrdoob/three.js/issues/32012 for more information.");
12659
12659
  }
12660
12660
  set inspector(e) {
12661
12661
  this._inspector !== null && this._inspector.setRenderer(null), this._inspector = e, this._inspector.setRenderer(this);
@@ -12681,11 +12681,11 @@ var xT = class extends It {
12681
12681
  return this._outputBufferType;
12682
12682
  }
12683
12683
  getColorBufferType() {
12684
- return Ae("Renderer: \".getColorBufferType()\" has been renamed to \".getOutputBufferType()\"."), this.getOutputBufferType();
12684
+ return Be("Renderer: \".getColorBufferType()\" has been renamed to \".getOutputBufferType()\"."), this.getOutputBufferType();
12685
12685
  }
12686
12686
  _onDeviceLost(e) {
12687
12687
  let t = `THREE.WebGPURenderer: ${e.api} Device Lost:\n\nMessage: ${e.message}`;
12688
- e.reason && (t += `\nReason: ${e.reason}`), C(t), this._isDeviceLost = !0;
12688
+ e.reason && (t += `\nReason: ${e.reason}`), y(t), this._isDeviceLost = !0;
12689
12689
  }
12690
12690
  _renderBundle(e, t, n) {
12691
12691
  let { bundleGroup: r, camera: i, renderList: a } = e, o = this._currentRenderContext, s = this._bundles.get(r, i, o), c = this.backend.get(s), l = r.version !== c.version;
@@ -12710,30 +12710,30 @@ var xT = class extends It {
12710
12710
  return this._initialized;
12711
12711
  }
12712
12712
  _getFrameBufferTarget() {
12713
- let { currentToneMapping: e, currentColorSpace: t } = this, n = e !== 0, i = t !== Ee.workingColorSpace;
12714
- if (n === !1 && i === !1) return null;
12715
- let { width: a, height: o } = this.getDrawingBufferSize(CT), { depth: s, stencil: c } = this, l = this._outputRenderTarget || this._canvasTarget, u = this._frameBufferTargets.get(l);
12716
- if (u === void 0) {
12717
- u = new r(a, o, {
12718
- depthBuffer: s,
12719
- stencilBuffer: c,
12713
+ let { currentToneMapping: e, currentColorSpace: t } = this, n = e !== 0, r = t !== g.workingColorSpace;
12714
+ if (n === !1 && r === !1) return null;
12715
+ let { width: i, height: a } = this.getDrawingBufferSize(CT), { depth: o, stencil: s } = this, c = this._outputRenderTarget || this._canvasTarget, l = this._frameBufferTargets.get(c);
12716
+ if (l === void 0) {
12717
+ l = new jt(i, a, {
12718
+ depthBuffer: o,
12719
+ stencilBuffer: s,
12720
12720
  type: this._outputBufferType,
12721
- format: Re,
12722
- colorSpace: Ee.workingColorSpace,
12721
+ format: x,
12722
+ colorSpace: g.workingColorSpace,
12723
12723
  generateMipmaps: !1,
12724
- minFilter: ie,
12725
- magFilter: ie,
12724
+ minFilter: Qt,
12725
+ magFilter: Qt,
12726
12726
  samples: this.samples
12727
- }), u.isPostProcessingRenderTarget = !0;
12727
+ }), l.isPostProcessingRenderTarget = !0;
12728
12728
  let e = () => {
12729
- l.removeEventListener("dispose", e), u.dispose(), this._frameBufferTargets.delete(l);
12729
+ c.removeEventListener("dispose", e), l.dispose(), this._frameBufferTargets.delete(c);
12730
12730
  };
12731
- l.addEventListener("dispose", e), this._frameBufferTargets.set(l, u);
12731
+ c.addEventListener("dispose", e), this._frameBufferTargets.set(c, l);
12732
12732
  }
12733
- let d = this.getOutputRenderTarget();
12734
- u.depthBuffer = s, u.stencilBuffer = c, d === null ? u.setSize(a, o, 1) : u.setSize(d.width, d.height, d.depth);
12735
- let f = this._outputRenderTarget ? this._outputRenderTarget.viewport : l._viewport, p = this._outputRenderTarget ? this._outputRenderTarget.scissor : l._scissor, m = this._outputRenderTarget ? 1 : l._pixelRatio, h = this._outputRenderTarget ? this._outputRenderTarget.scissorTest : l._scissorTest;
12736
- return u.viewport.copy(f), u.scissor.copy(p), u.viewport.multiplyScalar(m), u.scissor.multiplyScalar(m), u.scissorTest = h, u.multiview = d === null ? !1 : d.multiview, u.resolveDepthBuffer = d === null ? !0 : d.resolveDepthBuffer, u._autoAllocateDepthBuffer = d === null ? !1 : d._autoAllocateDepthBuffer, u;
12733
+ let u = this.getOutputRenderTarget();
12734
+ l.depthBuffer = o, l.stencilBuffer = s, u === null ? l.setSize(i, a, 1) : l.setSize(u.width, u.height, u.depth);
12735
+ let d = this._outputRenderTarget ? this._outputRenderTarget.viewport : c._viewport, f = this._outputRenderTarget ? this._outputRenderTarget.scissor : c._scissor, p = this._outputRenderTarget ? 1 : c._pixelRatio, m = this._outputRenderTarget ? this._outputRenderTarget.scissorTest : c._scissorTest;
12736
+ return l.viewport.copy(d), l.scissor.copy(f), l.viewport.multiplyScalar(p), l.scissor.multiplyScalar(p), l.scissorTest = m, l.multiview = u === null ? !1 : u.multiview, l.resolveDepthBuffer = u === null ? !0 : u.resolveDepthBuffer, l._autoAllocateDepthBuffer = u === null ? !1 : u._autoAllocateDepthBuffer, l;
12737
12737
  }
12738
12738
  _renderScene(e, t, n = !0) {
12739
12739
  if (this._isDeviceLost === !0) return;
@@ -12916,19 +12916,19 @@ var xT = class extends It {
12916
12916
  this.clear(!1, !1, !0);
12917
12917
  }
12918
12918
  async clearAsync(e = !0, t = !0, n = !0) {
12919
- Ae("Renderer: \"clearAsync()\" has been deprecated. Use \"clear()\" and \"await renderer.init();\" when creating the renderer."), await this.init(), this.clear(e, t, n);
12919
+ Be("Renderer: \"clearAsync()\" has been deprecated. Use \"clear()\" and \"await renderer.init();\" when creating the renderer."), await this.init(), this.clear(e, t, n);
12920
12920
  }
12921
12921
  async clearColorAsync() {
12922
- Ae("Renderer: \"clearColorAsync()\" has been deprecated. Use \"clearColor()\" and \"await renderer.init();\" when creating the renderer."), this.clear(!0, !1, !1);
12922
+ Be("Renderer: \"clearColorAsync()\" has been deprecated. Use \"clearColor()\" and \"await renderer.init();\" when creating the renderer."), this.clear(!0, !1, !1);
12923
12923
  }
12924
12924
  async clearDepthAsync() {
12925
- Ae("Renderer: \"clearDepthAsync()\" has been deprecated. Use \"clearDepth()\" and \"await renderer.init();\" when creating the renderer."), this.clear(!1, !0, !1);
12925
+ Be("Renderer: \"clearDepthAsync()\" has been deprecated. Use \"clearDepth()\" and \"await renderer.init();\" when creating the renderer."), this.clear(!1, !0, !1);
12926
12926
  }
12927
12927
  async clearStencilAsync() {
12928
- Ae("Renderer: \"clearStencilAsync()\" has been deprecated. Use \"clearStencil()\" and \"await renderer.init();\" when creating the renderer."), this.clear(!1, !1, !0);
12928
+ Be("Renderer: \"clearStencilAsync()\" has been deprecated. Use \"clearStencil()\" and \"await renderer.init();\" when creating the renderer."), this.clear(!1, !1, !0);
12929
12929
  }
12930
12930
  get needsFrameBufferTarget() {
12931
- let e = this.currentToneMapping !== 0, t = this.currentColorSpace !== Ee.workingColorSpace;
12931
+ let e = this.currentToneMapping !== 0, t = this.currentColorSpace !== g.workingColorSpace;
12932
12932
  return e || t;
12933
12933
  }
12934
12934
  get samples() {
@@ -12942,7 +12942,7 @@ var xT = class extends It {
12942
12942
  return this.isOutputTarget ? this.toneMapping : 0;
12943
12943
  }
12944
12944
  get currentColorSpace() {
12945
- return this.isOutputTarget ? this.outputColorSpace : Ee.workingColorSpace;
12945
+ return this.isOutputTarget ? this.outputColorSpace : g.workingColorSpace;
12946
12946
  }
12947
12947
  get isOutputTarget() {
12948
12948
  return this._renderTarget === this._outputRenderTarget || this._renderTarget === null;
@@ -12987,7 +12987,7 @@ var xT = class extends It {
12987
12987
  }
12988
12988
  compute(e, t = null) {
12989
12989
  if (this._isDeviceLost === !0) return;
12990
- if (this._initialized === !1) return v("Renderer: .compute() called before the backend is initialized. Try using .computeAsync() instead."), this.computeAsync(e, t);
12990
+ if (this._initialized === !1) return w("Renderer: .compute() called before the backend is initialized. Try using .computeAsync() instead."), this.computeAsync(e, t);
12991
12991
  let n = this._nodes.nodeFrame, r = n.renderId;
12992
12992
  this.info.calls++, this.info.compute.calls++, this.info.compute.frameCalls++, n.renderId = this.info.calls, this.backend.updateTimeStampUID(e), this.inspector.beginCompute(this.backend.getTimestampUID(e), e);
12993
12993
  let i = this.backend, a = this._pipelines, o = this._bindings, s = this._nodes, c = Array.isArray(e) ? e : [e];
@@ -13012,7 +13012,7 @@ var xT = class extends It {
13012
13012
  this._initialized === !1 && await this.init(), this.compute(e, t);
13013
13013
  }
13014
13014
  async hasFeatureAsync(e) {
13015
- return Ae("Renderer: \"hasFeatureAsync()\" has been deprecated. Use \"hasFeature()\" and \"await renderer.init();\" when creating the renderer."), await this.init(), this.hasFeature(e);
13015
+ return Be("Renderer: \"hasFeatureAsync()\" has been deprecated. Use \"hasFeature()\" and \"await renderer.init();\" when creating the renderer."), await this.init(), this.hasFeature(e);
13016
13016
  }
13017
13017
  async resolveTimestampsAsync(e = "render") {
13018
13018
  return this._initialized === !1 && await this.init(), this.backend.resolveTimestampsAsync(e);
@@ -13025,7 +13025,7 @@ var xT = class extends It {
13025
13025
  return this._initialized;
13026
13026
  }
13027
13027
  async initTextureAsync(e) {
13028
- Ae("Renderer: \"initTextureAsync()\" has been deprecated. Use \"initTexture()\" and \"await renderer.init();\" when creating the renderer."), await this.init(), this.initTexture(e);
13028
+ Be("Renderer: \"initTextureAsync()\" has been deprecated. Use \"initTexture()\" and \"await renderer.init();\" when creating the renderer."), await this.init(), this.initTexture(e);
13029
13029
  }
13030
13030
  initTexture(e) {
13031
13031
  if (this._initialized === !1) throw Error("Renderer: .initTexture() called before the backend is initialized. Use \"await renderer.init();\" before before using this method.");
@@ -13041,7 +13041,7 @@ var xT = class extends It {
13041
13041
  if (t !== null) if (t.isVector2) t = OT.set(t.x, t.y, e.image.width, e.image.height).floor();
13042
13042
  else if (t.isVector4) t = OT.copy(t).floor();
13043
13043
  else {
13044
- C("Renderer.copyFramebufferToTexture: Invalid rectangle.");
13044
+ y("Renderer.copyFramebufferToTexture: Invalid rectangle.");
13045
13045
  return;
13046
13046
  }
13047
13047
  else t = OT.set(0, 0, e.image.width, e.image.height);
@@ -13067,7 +13067,7 @@ var xT = class extends It {
13067
13067
  let { geometry: t, material: a } = e;
13068
13068
  a.visible && r.push(e, t, a, n, OT.z, null, i);
13069
13069
  }
13070
- } else if (e.isLineLoop) C("Renderer: Objects of type THREE.LineLoop are not supported. Please use THREE.Line or THREE.LineSegments.");
13070
+ } else if (e.isLineLoop) y("Renderer: Objects of type THREE.LineLoop are not supported. Please use THREE.Line or THREE.LineSegments.");
13071
13071
  else if (e.isMesh || e.isLine || e.isPoints) {
13072
13072
  let a = t.isArrayCamera ? ET : TT;
13073
13073
  if (!e.frustumCulled || a.intersectsObject(e, t)) {
@@ -13117,7 +13117,7 @@ var xT = class extends It {
13117
13117
  let r = e.map !== null, i = e.colorNode && e.colorNode.isNode, a = e.castShadowNode && e.castShadowNode.isNode, o = e.maskShadowNode && e.maskShadowNode.isNode || e.maskNode && e.maskNode.isNode, s = null, c = null, l = null;
13118
13118
  if (r || i || a || o) {
13119
13119
  let t, n;
13120
- if (a ? (t = e.castShadowNode.rgb, n = e.castShadowNode.a, this.shadowMap.transmitted !== !0 && Ae("Renderer: `shadowMap.transmitted` needs to be set to `true` when using `material.castShadowNode`.")) : (t = R(0), n = P(1)), r && (n = n.mul(Au("map", "texture", e).a)), i && (n = n.mul(e.colorNode.a)), c = z(t, n), o) {
13120
+ if (a ? (t = e.castShadowNode.rgb, n = e.castShadowNode.a, this.shadowMap.transmitted !== !0 && Be("Renderer: `shadowMap.transmitted` needs to be set to `true` when using `material.castShadowNode`.")) : (t = R(0), n = P(1)), r && (n = n.mul(Au("map", "texture", e).a)), i && (n = n.mul(e.colorNode.a)), c = z(t, n), o) {
13121
13121
  let t = e.maskShadowNode || e.maskNode;
13122
13122
  c = M(([e]) => (t.not().discard(), e))(c);
13123
13123
  }
@@ -13298,7 +13298,7 @@ var NT = class extends jT {
13298
13298
  if (e.isColorUniform) return this.updateColor(e);
13299
13299
  if (e.isMatrix3Uniform) return this.updateMatrix3(e);
13300
13300
  if (e.isMatrix4Uniform) return this.updateMatrix4(e);
13301
- C("WebGPUUniformsGroup: Unsupported uniform type.", e);
13301
+ y("WebGPUUniformsGroup: Unsupported uniform type.", e);
13302
13302
  }
13303
13303
  updateNumber(e) {
13304
13304
  let t = !1, n = this.values, r = e.getValue(), i = e.offset, a = e.getType();
@@ -13485,22 +13485,22 @@ ${n.code}
13485
13485
  setupPBO(e) {
13486
13486
  let t = e.value;
13487
13487
  if (t.pbo === void 0) {
13488
- let e = t.array, n = t.count * t.itemSize, { itemSize: r } = t, a = t.array.constructor.name.toLowerCase().includes("int"), o = a ? wt : ge;
13489
- r === 2 ? o = a ? c : we : r === 3 ? o = a ? At : Ut : r === 4 && (o = a ? _ : Re);
13488
+ let e = t.array, n = t.count * t.itemSize, { itemSize: r } = t, i = t.array.constructor.name.toLowerCase().includes("int"), a = i ? o : Nt;
13489
+ r === 2 ? a = i ? pn : d : r === 3 ? a = i ? wt : Rt : r === 4 && (a = i ? se : x);
13490
13490
  let s = {
13491
- Float32Array: $t,
13492
- Uint8Array: lt,
13493
- Uint16Array: hn,
13494
- Uint32Array: ft,
13495
- Int8Array: mt,
13496
- Int16Array: Kt,
13497
- Int32Array: un,
13498
- Uint8ClampedArray: lt
13499
- }, l = 2 ** Math.ceil(Math.log2(Math.sqrt(n / r))), u = Math.ceil(n / r / l);
13500
- l * u * r < n && u++;
13501
- let d = l * u * r, f = new e.constructor(d);
13491
+ Float32Array: lt,
13492
+ Uint8Array: qt,
13493
+ Uint16Array: rt,
13494
+ Uint32Array: Qe,
13495
+ Int8Array: _t,
13496
+ Int16Array: oe,
13497
+ Int32Array: Pe,
13498
+ Uint8ClampedArray: qt
13499
+ }, c = 2 ** Math.ceil(Math.log2(Math.sqrt(n / r))), l = Math.ceil(n / r / c);
13500
+ c * l * r < n && l++;
13501
+ let u = c * l * r, f = new e.constructor(u);
13502
13502
  f.set(e, 0), t.array = f;
13503
- let p = new i(t.array, l, u, o, s[t.array.constructor.name] || 1015);
13503
+ let p = new Ie(t.array, c, l, a, s[t.array.constructor.name] || 1015);
13504
13504
  p.needsUpdate = !0, p.isPBOTexture = !0;
13505
13505
  let m = new Oc(p, null, null);
13506
13506
  m.setPrecision("high"), t.pboNode = m, t.pbo = m.value, this.getUniformFromNode(t.pboNode, "texture", this.shaderStage, this.context.nodeName);
@@ -13547,7 +13547,7 @@ ${n.code}
13547
13547
  }
13548
13548
  generateTextureCompare(e, t, n, r, i, a, o = this.shaderStage) {
13549
13549
  if (o === "fragment") return e.isCubeTexture ? `texture( ${t}, vec4( ${n}, ${r} ) )` : i ? a ? `textureOffset( ${t}, vec4( ${n}, ${i}, ${r} ), ${a} )` : `texture( ${t}, vec4( ${n}, ${i}, ${r} ) )` : a ? `textureOffset( ${t}, vec3( ${n}, ${r} ), ${a} )` : `texture( ${t}, vec3( ${n}, ${r} ) )`;
13550
- C(`WebGPURenderer: THREE.DepthTexture.compareFunction() does not support ${o} shader.`);
13550
+ y(`WebGPURenderer: THREE.DepthTexture.compareFunction() does not support ${o} shader.`);
13551
13551
  }
13552
13552
  getUniforms(e) {
13553
13553
  let t = this.uniforms[e], n = [], r = {};
@@ -13659,13 +13659,13 @@ ${n.code}
13659
13659
  return `uint( gl_InstanceID ) % ${this.object.workgroupSize.reduce((e, t) => e * t, 1)}u`;
13660
13660
  }
13661
13661
  getSubgroupSize() {
13662
- C("GLSLNodeBuilder: WebGLBackend does not support the subgroupSize node");
13662
+ y("GLSLNodeBuilder: WebGLBackend does not support the subgroupSize node");
13663
13663
  }
13664
13664
  getInvocationSubgroupIndex() {
13665
- C("GLSLNodeBuilder: WebGLBackend does not support the invocationSubgroupIndex node");
13665
+ y("GLSLNodeBuilder: WebGLBackend does not support the invocationSubgroupIndex node");
13666
13666
  }
13667
13667
  getSubgroupIndex() {
13668
- C("GLSLNodeBuilder: WebGLBackend does not support the subgroupIndex node");
13668
+ y("GLSLNodeBuilder: WebGLBackend does not support the subgroupIndex node");
13669
13669
  }
13670
13670
  getDrawIndex() {
13671
13671
  return this.renderer.backend.extensions.has("WEBGL_multi_draw") ? "uint( gl_DrawID )" : "nodeUniformDrawId";
@@ -13867,8 +13867,8 @@ void main() {
13867
13867
  }, nE = null, rE = null, iE = class {
13868
13868
  constructor(e = {}) {
13869
13869
  this.parameters = Object.assign({}, e), this.data = /* @__PURE__ */ new WeakMap(), this.renderer = null, this.domElement = null, this.timestampQueryPool = {
13870
- [Xt.RENDER]: null,
13871
- [Xt.COMPUTE]: null
13870
+ [ot.RENDER]: null,
13871
+ [ot.COMPUTE]: null
13872
13872
  }, this.trackTimestamp = e.trackTimestamp === !0;
13873
13873
  }
13874
13874
  async init(e) {
@@ -13920,7 +13920,7 @@ void main() {
13920
13920
  return t ? t.getTimestampFrames() : [];
13921
13921
  }
13922
13922
  _getQueryPool(e) {
13923
- let t = e.startsWith("c:") ? Xt.COMPUTE : Xt.RENDER;
13923
+ let t = e.startsWith("c:") ? ot.COMPUTE : ot.RENDER;
13924
13924
  return this.timestampQueryPool[t];
13925
13925
  }
13926
13926
  getTimestamp(e) {
@@ -13932,7 +13932,7 @@ void main() {
13932
13932
  isOccluded() {}
13933
13933
  async resolveTimestampsAsync(e = "render") {
13934
13934
  if (!this.trackTimestamp) {
13935
- Ae("WebGPURenderer: Timestamp tracking is disabled.");
13935
+ Be("WebGPURenderer: Timestamp tracking is disabled.");
13936
13936
  return;
13937
13937
  }
13938
13938
  let t = this.timestampQueryPool[e];
@@ -13944,7 +13944,7 @@ void main() {
13944
13944
  async hasFeatureAsync() {}
13945
13945
  hasFeature() {}
13946
13946
  getDrawingBufferSize() {
13947
- return nE ||= new et(), this.renderer.getDrawingBufferSize(nE);
13947
+ return nE ||= new mn(), this.renderer.getDrawingBufferSize(nE);
13948
13948
  }
13949
13949
  setScissorTest() {}
13950
13950
  getClearColor() {
@@ -13953,7 +13953,7 @@ void main() {
13953
13953
  }
13954
13954
  getDomElement() {
13955
13955
  let e = this.domElement;
13956
- return e === null && (e = this.parameters.canvas === void 0 ? le() : this.parameters.canvas, "setAttribute" in e && e.setAttribute("data-engine", "three.js r184 webgpu"), this.domElement = e), e;
13956
+ return e === null && (e = this.parameters.canvas === void 0 ? fe() : this.parameters.canvas, "setAttribute" in e && e.setAttribute("data-engine", "three.js r184 webgpu"), this.domElement = e), e;
13957
13957
  }
13958
13958
  hasCompatibility() {
13959
13959
  return !1;
@@ -14083,7 +14083,7 @@ void main() {
14083
14083
  207: e.ONE_MINUS_DST_ALPHA
14084
14084
  };
14085
14085
  let t = e.getParameter(e.SCISSOR_BOX), n = e.getParameter(e.VIEWPORT);
14086
- this.currentScissor = new Ce().fromArray(t), this.currentViewport = new Ce().fromArray(n), this._tempVec4 = new Ce();
14086
+ this.currentScissor = new u().fromArray(t), this.currentViewport = new u().fromArray(n), this._tempVec4 = new u();
14087
14087
  }
14088
14088
  enable(e) {
14089
14089
  let { enabled: t } = this;
@@ -14110,7 +14110,7 @@ void main() {
14110
14110
  setMRTBlending(e, t, n) {
14111
14111
  let r = this.gl, i = this.backend.drawBuffersIndexedExt;
14112
14112
  if (!i) {
14113
- Ae("WebGPURenderer: Multiple Render Targets (MRT) blending configuration is not fully supported in compatibility mode. The material blending will be used for all render targets.");
14113
+ Be("WebGPURenderer: Multiple Render Targets (MRT) blending configuration is not fully supported in compatibility mode. The material blending will be used for all render targets.");
14114
14114
  return;
14115
14115
  }
14116
14116
  for (let a = 0; a < e.length; a++) {
@@ -14184,7 +14184,7 @@ void main() {
14184
14184
  c.blendFuncSeparate(c.DST_COLOR, c.ONE_MINUS_SRC_ALPHA, c.ZERO, c.ONE);
14185
14185
  break;
14186
14186
  default:
14187
- C("WebGLState: Invalid blending: ", e);
14187
+ y("WebGLState: Invalid blending: ", e);
14188
14188
  break;
14189
14189
  }
14190
14190
  else switch (e) {
@@ -14195,13 +14195,13 @@ void main() {
14195
14195
  c.blendFuncSeparate(c.SRC_ALPHA, c.ONE, c.ONE, c.ONE);
14196
14196
  break;
14197
14197
  case 3:
14198
- C("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");
14198
+ y("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");
14199
14199
  break;
14200
14200
  case 4:
14201
- C("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");
14201
+ y("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");
14202
14202
  break;
14203
14203
  default:
14204
- C("WebGLState: Invalid blending: ", e);
14204
+ y("WebGLState: Invalid blending: ", e);
14205
14205
  break;
14206
14206
  }
14207
14207
  this.currentBlendSrc = null, this.currentBlendDst = null, this.currentBlendSrcAlpha = null, this.currentBlendDstAlpha = null, this.currentBlending = e, this.currentPremultipledAlpha = s;
@@ -14227,7 +14227,7 @@ void main() {
14227
14227
  this.currentDepthMask !== e && (this.gl.depthMask(e), this.currentDepthMask = e);
14228
14228
  }
14229
14229
  setDepthFunc(e) {
14230
- if (this.currentDepthReversed && (e = pe[e]), this.currentDepthFunc !== e) {
14230
+ if (this.currentDepthReversed && (e = ye[e]), this.currentDepthFunc !== e) {
14231
14231
  let { gl: t } = this;
14232
14232
  switch (e) {
14233
14233
  case 0:
@@ -14366,7 +14366,7 @@ void main() {
14366
14366
  this.backend = e, this.gl = this.backend.gl, this.extensions = e.extensions;
14367
14367
  }
14368
14368
  convert(e, t = "") {
14369
- let { gl: n, extensions: r } = this, i, a = Ee.getTransfer(t);
14369
+ let { gl: n, extensions: r } = this, i, a = g.getTransfer(t);
14370
14370
  if (e === 1009) return n.UNSIGNED_BYTE;
14371
14371
  if (e === 1017) return n.UNSIGNED_SHORT_4_4_4_4;
14372
14372
  if (e === 1018) return n.UNSIGNED_SHORT_5_5_5_1;
@@ -14467,16 +14467,16 @@ void main() {
14467
14467
  _init() {
14468
14468
  let e = this.gl;
14469
14469
  pE = {
14470
- [xt]: e.REPEAT,
14471
- [dn]: e.CLAMP_TO_EDGE,
14472
- [on]: e.MIRRORED_REPEAT
14470
+ [de]: e.REPEAT,
14471
+ [Oe]: e.CLAMP_TO_EDGE,
14472
+ [_n]: e.MIRRORED_REPEAT
14473
14473
  }, mE = {
14474
- [gn]: e.NEAREST,
14475
- [fn]: e.NEAREST_MIPMAP_NEAREST,
14476
- [tt]: e.NEAREST_MIPMAP_LINEAR,
14477
- [ie]: e.LINEAR,
14478
- [Ve]: e.LINEAR_MIPMAP_NEAREST,
14479
- [Ue]: e.LINEAR_MIPMAP_LINEAR
14474
+ [it]: e.NEAREST,
14475
+ [ke]: e.NEAREST_MIPMAP_NEAREST,
14476
+ [hn]: e.NEAREST_MIPMAP_LINEAR,
14477
+ [Qt]: e.LINEAR,
14478
+ [Ze]: e.LINEAR_MIPMAP_NEAREST,
14479
+ [Ge]: e.LINEAR_MIPMAP_LINEAR
14480
14480
  }, hE = {
14481
14481
  512: e.NEVER,
14482
14482
  519: e.ALWAYS,
@@ -14492,29 +14492,29 @@ void main() {
14492
14492
  let { gl: t } = this, n;
14493
14493
  return n = e.isCubeTexture === !0 ? t.TEXTURE_CUBE_MAP : e.isArrayTexture === !0 || e.isDataArrayTexture === !0 || e.isCompressedArrayTexture === !0 ? t.TEXTURE_2D_ARRAY : e.isData3DTexture === !0 ? t.TEXTURE_3D : t.TEXTURE_2D, n;
14494
14494
  }
14495
- getInternalFormat(e, t, n, r, i, a = !1) {
14496
- let { gl: o, extensions: s } = this;
14495
+ getInternalFormat(e, t, n, i, a, o = !1) {
14496
+ let { gl: s, extensions: c } = this;
14497
14497
  if (e !== null) {
14498
- if (o[e] !== void 0) return o[e];
14499
- v("WebGLBackend: Attempt to use non-existing WebGL internal format '" + e + "'");
14498
+ if (s[e] !== void 0) return s[e];
14499
+ w("WebGLBackend: Attempt to use non-existing WebGL internal format '" + e + "'");
14500
14500
  }
14501
- let c = null;
14502
- r && (c = s.get("EXT_texture_norm16"), c || v("WebGLRenderer: Unable to use normalized textures without EXT_texture_norm16 extension"));
14503
- let l = t;
14504
- if (t === o.RED && (n === o.FLOAT && (l = o.R32F), n === o.HALF_FLOAT && (l = o.R16F), n === o.UNSIGNED_BYTE && (l = o.R8), n === o.BYTE && (l = o.R8_SNORM), n === o.UNSIGNED_SHORT && c && (l = c.R16_EXT), n === o.SHORT && c && (l = c.R16_SNORM_EXT)), t === o.RED_INTEGER && (n === o.UNSIGNED_BYTE && (l = o.R8UI), n === o.UNSIGNED_SHORT && (l = o.R16UI), n === o.UNSIGNED_INT && (l = o.R32UI), n === o.BYTE && (l = o.R8I), n === o.SHORT && (l = o.R16I), n === o.INT && (l = o.R32I)), t === o.RG && (n === o.FLOAT && (l = o.RG32F), n === o.HALF_FLOAT && (l = o.RG16F), n === o.UNSIGNED_BYTE && (l = o.RG8), n === o.BYTE && (l = o.RG8_SNORM), n === o.UNSIGNED_SHORT && c && (l = c.RG16_EXT), n === o.SHORT && c && (l = c.RG16_SNORM_EXT)), t === o.RG_INTEGER && (n === o.UNSIGNED_BYTE && (l = o.RG8UI), n === o.UNSIGNED_SHORT && (l = o.RG16UI), n === o.UNSIGNED_INT && (l = o.RG32UI), n === o.BYTE && (l = o.RG8I), n === o.SHORT && (l = o.RG16I), n === o.INT && (l = o.RG32I)), t === o.RGB) {
14505
- let e = a ? be : Ee.getTransfer(i);
14506
- n === o.FLOAT && (l = o.RGB32F), n === o.HALF_FLOAT && (l = o.RGB16F), n === o.UNSIGNED_BYTE && (l = e === "srgb" ? o.SRGB8 : o.RGB8), n === o.BYTE && (l = o.RGB8_SNORM), n === o.UNSIGNED_SHORT && c && (l = c.RGB16_EXT), n === o.SHORT && c && (l = c.RGB16_SNORM_EXT), n === o.UNSIGNED_SHORT_5_6_5 && (l = o.RGB565), n === o.UNSIGNED_SHORT_5_5_5_1 && (l = o.RGB5_A1), n === o.UNSIGNED_SHORT_4_4_4_4 && (l = o.RGB4), n === o.UNSIGNED_INT_5_9_9_9_REV && (l = o.RGB9_E5), n === o.UNSIGNED_INT_10F_11F_11F_REV && (l = o.R11F_G11F_B10F);
14501
+ let l = null;
14502
+ i && (l = c.get("EXT_texture_norm16"), l || w("WebGLRenderer: Unable to use normalized textures without EXT_texture_norm16 extension"));
14503
+ let u = t;
14504
+ if (t === s.RED && (n === s.FLOAT && (u = s.R32F), n === s.HALF_FLOAT && (u = s.R16F), n === s.UNSIGNED_BYTE && (u = s.R8), n === s.BYTE && (u = s.R8_SNORM), n === s.UNSIGNED_SHORT && l && (u = l.R16_EXT), n === s.SHORT && l && (u = l.R16_SNORM_EXT)), t === s.RED_INTEGER && (n === s.UNSIGNED_BYTE && (u = s.R8UI), n === s.UNSIGNED_SHORT && (u = s.R16UI), n === s.UNSIGNED_INT && (u = s.R32UI), n === s.BYTE && (u = s.R8I), n === s.SHORT && (u = s.R16I), n === s.INT && (u = s.R32I)), t === s.RG && (n === s.FLOAT && (u = s.RG32F), n === s.HALF_FLOAT && (u = s.RG16F), n === s.UNSIGNED_BYTE && (u = s.RG8), n === s.BYTE && (u = s.RG8_SNORM), n === s.UNSIGNED_SHORT && l && (u = l.RG16_EXT), n === s.SHORT && l && (u = l.RG16_SNORM_EXT)), t === s.RG_INTEGER && (n === s.UNSIGNED_BYTE && (u = s.RG8UI), n === s.UNSIGNED_SHORT && (u = s.RG16UI), n === s.UNSIGNED_INT && (u = s.RG32UI), n === s.BYTE && (u = s.RG8I), n === s.SHORT && (u = s.RG16I), n === s.INT && (u = s.RG32I)), t === s.RGB) {
14505
+ let e = o ? r : g.getTransfer(a);
14506
+ n === s.FLOAT && (u = s.RGB32F), n === s.HALF_FLOAT && (u = s.RGB16F), n === s.UNSIGNED_BYTE && (u = e === "srgb" ? s.SRGB8 : s.RGB8), n === s.BYTE && (u = s.RGB8_SNORM), n === s.UNSIGNED_SHORT && l && (u = l.RGB16_EXT), n === s.SHORT && l && (u = l.RGB16_SNORM_EXT), n === s.UNSIGNED_SHORT_5_6_5 && (u = s.RGB565), n === s.UNSIGNED_SHORT_5_5_5_1 && (u = s.RGB5_A1), n === s.UNSIGNED_SHORT_4_4_4_4 && (u = s.RGB4), n === s.UNSIGNED_INT_5_9_9_9_REV && (u = s.RGB9_E5), n === s.UNSIGNED_INT_10F_11F_11F_REV && (u = s.R11F_G11F_B10F);
14507
14507
  }
14508
- if (t === o.RGB_INTEGER && (n === o.UNSIGNED_BYTE && (l = o.RGB8UI), n === o.UNSIGNED_SHORT && (l = o.RGB16UI), n === o.UNSIGNED_INT && (l = o.RGB32UI), n === o.BYTE && (l = o.RGB8I), n === o.SHORT && (l = o.RGB16I), n === o.INT && (l = o.RGB32I)), t === o.RGBA) {
14509
- let e = a ? be : Ee.getTransfer(i);
14510
- n === o.FLOAT && (l = o.RGBA32F), n === o.HALF_FLOAT && (l = o.RGBA16F), n === o.UNSIGNED_BYTE && (l = e === "srgb" ? o.SRGB8_ALPHA8 : o.RGBA8), n === o.BYTE && (l = o.RGBA8_SNORM), n === o.UNSIGNED_SHORT && c && (l = c.RGBA16_EXT), n === o.SHORT && c && (l = c.RGBA16_SNORM_EXT), n === o.UNSIGNED_SHORT_4_4_4_4 && (l = o.RGBA4), n === o.UNSIGNED_SHORT_5_5_5_1 && (l = o.RGB5_A1);
14508
+ if (t === s.RGB_INTEGER && (n === s.UNSIGNED_BYTE && (u = s.RGB8UI), n === s.UNSIGNED_SHORT && (u = s.RGB16UI), n === s.UNSIGNED_INT && (u = s.RGB32UI), n === s.BYTE && (u = s.RGB8I), n === s.SHORT && (u = s.RGB16I), n === s.INT && (u = s.RGB32I)), t === s.RGBA) {
14509
+ let e = o ? r : g.getTransfer(a);
14510
+ n === s.FLOAT && (u = s.RGBA32F), n === s.HALF_FLOAT && (u = s.RGBA16F), n === s.UNSIGNED_BYTE && (u = e === "srgb" ? s.SRGB8_ALPHA8 : s.RGBA8), n === s.BYTE && (u = s.RGBA8_SNORM), n === s.UNSIGNED_SHORT && l && (u = l.RGBA16_EXT), n === s.SHORT && l && (u = l.RGBA16_SNORM_EXT), n === s.UNSIGNED_SHORT_4_4_4_4 && (u = s.RGBA4), n === s.UNSIGNED_SHORT_5_5_5_1 && (u = s.RGB5_A1);
14511
14511
  }
14512
- return t === o.RGBA_INTEGER && (n === o.UNSIGNED_BYTE && (l = o.RGBA8UI), n === o.UNSIGNED_SHORT && (l = o.RGBA16UI), n === o.UNSIGNED_INT && (l = o.RGBA32UI), n === o.BYTE && (l = o.RGBA8I), n === o.SHORT && (l = o.RGBA16I), n === o.INT && (l = o.RGBA32I)), t === o.DEPTH_COMPONENT && (n === o.UNSIGNED_SHORT && (l = o.DEPTH_COMPONENT16), n === o.UNSIGNED_INT && (l = o.DEPTH_COMPONENT24), n === o.FLOAT && (l = o.DEPTH_COMPONENT32F)), t === o.DEPTH_STENCIL && n === o.UNSIGNED_INT_24_8 && (l = o.DEPTH24_STENCIL8), (l === o.R16F || l === o.R32F || l === o.RG16F || l === o.RG32F || l === o.RGBA16F || l === o.RGBA32F) && s.get("EXT_color_buffer_float"), l;
14512
+ return t === s.RGBA_INTEGER && (n === s.UNSIGNED_BYTE && (u = s.RGBA8UI), n === s.UNSIGNED_SHORT && (u = s.RGBA16UI), n === s.UNSIGNED_INT && (u = s.RGBA32UI), n === s.BYTE && (u = s.RGBA8I), n === s.SHORT && (u = s.RGBA16I), n === s.INT && (u = s.RGBA32I)), t === s.DEPTH_COMPONENT && (n === s.UNSIGNED_SHORT && (u = s.DEPTH_COMPONENT16), n === s.UNSIGNED_INT && (u = s.DEPTH_COMPONENT24), n === s.FLOAT && (u = s.DEPTH_COMPONENT32F)), t === s.DEPTH_STENCIL && n === s.UNSIGNED_INT_24_8 && (u = s.DEPTH24_STENCIL8), (u === s.R16F || u === s.R32F || u === s.RG16F || u === s.RG32F || u === s.RGBA16F || u === s.RGBA32F) && c.get("EXT_color_buffer_float"), u;
14513
14513
  }
14514
14514
  setTextureParameters(e, t) {
14515
- let { gl: n, extensions: r, backend: i } = this, { state: a } = this.backend, o = Ee.getPrimaries(Ee.workingColorSpace), s = t.colorSpace === "" ? null : Ee.getPrimaries(t.colorSpace), c = t.colorSpace === "" || o === s ? n.NONE : n.BROWSER_DEFAULT_WEBGL;
14515
+ let { gl: n, extensions: r, backend: i } = this, { state: a } = this.backend, o = g.getPrimaries(g.workingColorSpace), s = t.colorSpace === "" ? null : g.getPrimaries(t.colorSpace), c = t.colorSpace === "" || o === s ? n.NONE : n.BROWSER_DEFAULT_WEBGL;
14516
14516
  a.pixelStorei(n.UNPACK_FLIP_Y_WEBGL, t.flipY), a.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t.premultiplyAlpha), a.pixelStorei(n.UNPACK_ALIGNMENT, t.unpackAlignment), a.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL, c), n.texParameteri(e, n.TEXTURE_WRAP_S, pE[t.wrapS]), n.texParameteri(e, n.TEXTURE_WRAP_T, pE[t.wrapT]), (e === n.TEXTURE_3D || e === n.TEXTURE_2D_ARRAY) && (t.isArrayTexture || n.texParameteri(e, n.TEXTURE_WRAP_R, pE[t.wrapR])), n.texParameteri(e, n.TEXTURE_MAG_FILTER, mE[t.magFilter]);
14517
- let l = t.mipmaps !== void 0 && t.mipmaps.length > 0, u = t.minFilter === 1006 && l ? Ue : t.minFilter;
14517
+ let l = t.mipmaps !== void 0 && t.mipmaps.length > 0, u = t.minFilter === 1006 && l ? Ge : t.minFilter;
14518
14518
  if (n.texParameteri(e, n.TEXTURE_MIN_FILTER, mE[u]), t.compareFunction && (n.texParameteri(e, n.TEXTURE_COMPARE_MODE, n.COMPARE_REF_TO_TEXTURE), n.texParameteri(e, n.TEXTURE_COMPARE_FUNC, hE[t.compareFunction])), r.has("EXT_texture_filter_anisotropic") === !0) {
14519
14519
  if (t.magFilter === 1003 || t.minFilter !== 1005 && t.minFilter !== 1008 || t.type === 1015 && r.has("OES_texture_float_linear") === !1) return;
14520
14520
  if (t.anisotropy > 1) {
@@ -14550,7 +14550,7 @@ void main() {
14550
14550
  let r = e.mipmaps, i = t.image;
14551
14551
  for (let t = 0; t < r.length; t++) {
14552
14552
  let a = r[t];
14553
- e.isCompressedArrayTexture ? e.format === n.RGBA ? n.texSubImage3D(n.TEXTURE_2D_ARRAY, t, 0, 0, 0, a.width, a.height, i.depth, s, c, a.data) : s === null ? v("WebGLBackend: Attempt to load unsupported compressed texture format in .uploadTexture()") : n.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY, t, 0, 0, 0, a.width, a.height, i.depth, s, a.data) : s === null ? v("WebGLBackend: Unsupported compressed texture format") : n.compressedTexSubImage2D(n.TEXTURE_2D, t, 0, 0, a.width, a.height, s, a.data);
14553
+ e.isCompressedArrayTexture ? e.format === n.RGBA ? n.texSubImage3D(n.TEXTURE_2D_ARRAY, t, 0, 0, 0, a.width, a.height, i.depth, s, c, a.data) : s === null ? w("WebGLBackend: Attempt to load unsupported compressed texture format in .uploadTexture()") : n.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY, t, 0, 0, 0, a.width, a.height, i.depth, s, a.data) : s === null ? w("WebGLBackend: Unsupported compressed texture format") : n.compressedTexSubImage2D(n.TEXTURE_2D, t, 0, 0, a.width, a.height, s, a.data);
14554
14554
  }
14555
14555
  } else if (e.isCubeTexture) {
14556
14556
  let a = t.images, o = e.mipmaps;
@@ -14565,7 +14565,7 @@ void main() {
14565
14565
  } else if (e.isDataArrayTexture || e.isArrayTexture) {
14566
14566
  let r = t.image;
14567
14567
  if (e.layerUpdates.size > 0) {
14568
- let t = h(r.width, r.height, e.format, e.type);
14568
+ let t = ne(r.width, r.height, e.format, e.type);
14569
14569
  for (let i of e.layerUpdates) {
14570
14570
  let e = r.data.subarray(i * t / r.data.BYTES_PER_ELEMENT, (i + 1) * t / r.data.BYTES_PER_ELEMENT);
14571
14571
  n.texSubImage3D(n.TEXTURE_2D_ARRAY, 0, 0, 0, i, r.width, r.height, 1, s, c, e);
@@ -14766,7 +14766,7 @@ var vE = class {
14766
14766
  }
14767
14767
  getTimestamp(e) {
14768
14768
  let t = this.timestamps.get(e);
14769
- return t === void 0 && (v(`TimestampQueryPool: No timestamp available for uid ${e}.`), t = 0), t;
14769
+ return t === void 0 && (w(`TimestampQueryPool: No timestamp available for uid ${e}.`), t = 0), t;
14770
14770
  }
14771
14771
  hasTimestamp(e) {
14772
14772
  return this.timestamps.has(e);
@@ -14777,7 +14777,7 @@ var vE = class {
14777
14777
  }, CE = class extends SE {
14778
14778
  constructor(e, t, n = 2048) {
14779
14779
  if (super(n), this.gl = e, this.type = t, this.ext = e.getExtension("EXT_disjoint_timer_query_webgl2") || e.getExtension("EXT_disjoint_timer_query"), !this.ext) {
14780
- v("EXT_disjoint_timer_query not supported; timestamps will be disabled."), this.trackTimestamp = !1;
14780
+ w("EXT_disjoint_timer_query not supported; timestamps will be disabled."), this.trackTimestamp = !1;
14781
14781
  return;
14782
14782
  }
14783
14783
  this.queries = [];
@@ -14786,7 +14786,7 @@ var vE = class {
14786
14786
  }
14787
14787
  allocateQueriesForContext(e) {
14788
14788
  if (!this.trackTimestamp) return null;
14789
- if (this.currentQueryIndex + 2 > this.maxQueries) return Ae(`WebGLTimestampQueryPool [${this.type}]: Maximum number of queries exceeded, when using trackTimestamp it is necessary to resolves the queries via renderer.resolveTimestampsAsync( THREE.TimestampQuery.${this.type.toUpperCase()} ).`), null;
14789
+ if (this.currentQueryIndex + 2 > this.maxQueries) return Be(`WebGLTimestampQueryPool [${this.type}]: Maximum number of queries exceeded, when using trackTimestamp it is necessary to resolves the queries via renderer.resolveTimestampsAsync( THREE.TimestampQuery.${this.type.toUpperCase()} ).`), null;
14790
14790
  let t = this.currentQueryIndex;
14791
14791
  return this.currentQueryIndex += 2, this.queryStates.set(t, "inactive"), this.queryOffsets.set(e, t), t;
14792
14792
  }
@@ -14798,7 +14798,7 @@ var vE = class {
14798
14798
  if (n) try {
14799
14799
  this.queryStates.get(t) === "inactive" && (this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT, n), this.activeQuery = t, this.queryStates.set(t, "started"));
14800
14800
  } catch (e) {
14801
- C("Error in beginQuery:", e), this.activeQuery = null, this.queryStates.set(t, "inactive");
14801
+ y("Error in beginQuery:", e), this.activeQuery = null, this.queryStates.set(t, "inactive");
14802
14802
  }
14803
14803
  }
14804
14804
  endQuery(e) {
@@ -14807,7 +14807,7 @@ var vE = class {
14807
14807
  if (t != null && this.activeQuery === t) try {
14808
14808
  this.gl.endQuery(this.ext.TIME_ELAPSED_EXT), this.queryStates.set(t, "ended"), this.activeQuery = null;
14809
14809
  } catch (e) {
14810
- C("Error in endQuery:", e), this.queryStates.set(t, "inactive"), this.activeQuery = null;
14810
+ y("Error in endQuery:", e), this.queryStates.set(t, "inactive"), this.activeQuery = null;
14811
14811
  }
14812
14812
  }
14813
14813
  async resolveQueriesAsync() {
@@ -14830,7 +14830,7 @@ var vE = class {
14830
14830
  let r = t[n[n.length - 1]];
14831
14831
  return this.lastValue = r, this.frames = n, this.currentQueryIndex = 0, this.queryOffsets.clear(), this.queryStates.clear(), this.activeQuery = null, r;
14832
14832
  } catch (e) {
14833
- return C("Error resolving queries:", e), this.lastValue;
14833
+ return y("Error resolving queries:", e), this.lastValue;
14834
14834
  } finally {
14835
14835
  this.pendingResolve = !1;
14836
14836
  }
@@ -14862,7 +14862,7 @@ var vE = class {
14862
14862
  let r = this.gl.getQueryParameter(e, this.gl.QUERY_RESULT);
14863
14863
  t(Number(r) / 1e6);
14864
14864
  } catch (e) {
14865
- C("Error checking query:", e), t(this.lastValue);
14865
+ y("Error checking query:", e), t(this.lastValue);
14866
14866
  }
14867
14867
  };
14868
14868
  o();
@@ -14896,10 +14896,10 @@ var vE = class {
14896
14896
  };
14897
14897
  e.onDeviceLost(n);
14898
14898
  }
14899
- this._onContextLost = i, e.domElement.addEventListener("webglcontextlost", i, !1), this.gl = r, this.extensions = new vE(this), this.capabilities = new yE(this), this.attributeUtils = new sE(this), this.textureUtils = new gE(this), this.bufferRenderer = new xE(this), this.state = new uE(this), this.utils = new dE(this), this.extensions.get("EXT_color_buffer_float"), this.extensions.get("WEBGL_clip_cull_distance"), this.extensions.get("OES_texture_float_linear"), this.extensions.get("EXT_color_buffer_half_float"), this.extensions.get("WEBGL_multisampled_render_to_texture"), this.extensions.get("WEBGL_render_shared_exponent"), this.extensions.get("WEBGL_multi_draw"), this.extensions.get("OVR_multiview2"), this.extensions.get("EXT_clip_control"), this.disjoint = this.extensions.get("EXT_disjoint_timer_query_webgl2"), this.parallel = this.extensions.get("KHR_parallel_shader_compile"), this.drawBuffersIndexedExt = this.extensions.get("OES_draw_buffers_indexed"), t.reversedDepthBuffer && (this.extensions.has("EXT_clip_control") ? e.reversedDepthBuffer = !0 : (v("WebGPURenderer: Unable to use reversed depth buffer due to missing EXT_clip_control extension. Fallback to default depth buffer."), e.reversedDepthBuffer = !1)), e.reversedDepthBuffer && this.state.setReversedDepth(!0);
14899
+ this._onContextLost = i, e.domElement.addEventListener("webglcontextlost", i, !1), this.gl = r, this.extensions = new vE(this), this.capabilities = new yE(this), this.attributeUtils = new sE(this), this.textureUtils = new gE(this), this.bufferRenderer = new xE(this), this.state = new uE(this), this.utils = new dE(this), this.extensions.get("EXT_color_buffer_float"), this.extensions.get("WEBGL_clip_cull_distance"), this.extensions.get("OES_texture_float_linear"), this.extensions.get("EXT_color_buffer_half_float"), this.extensions.get("WEBGL_multisampled_render_to_texture"), this.extensions.get("WEBGL_render_shared_exponent"), this.extensions.get("WEBGL_multi_draw"), this.extensions.get("OVR_multiview2"), this.extensions.get("EXT_clip_control"), this.disjoint = this.extensions.get("EXT_disjoint_timer_query_webgl2"), this.parallel = this.extensions.get("KHR_parallel_shader_compile"), this.drawBuffersIndexedExt = this.extensions.get("OES_draw_buffers_indexed"), t.reversedDepthBuffer && (this.extensions.has("EXT_clip_control") ? e.reversedDepthBuffer = !0 : (w("WebGPURenderer: Unable to use reversed depth buffer due to missing EXT_clip_control extension. Fallback to default depth buffer."), e.reversedDepthBuffer = !1)), e.reversedDepthBuffer && this.state.setReversedDepth(!0);
14900
14900
  }
14901
14901
  get coordinateSystem() {
14902
- return cn;
14902
+ return Me;
14903
14903
  }
14904
14904
  async getArrayBufferAsync(e, t = null, n = 0, r = -1) {
14905
14905
  return await this.attributeUtils.getArrayBufferAsync(e, t, n, r);
@@ -14920,7 +14920,7 @@ var vE = class {
14920
14920
  this.set(e.depthTexture, {
14921
14921
  textureGPU: n,
14922
14922
  glInternalFormat: t
14923
- }), this.extensions.has("WEBGL_multisampled_render_to_texture") === !0 && e._autoAllocateDepthBuffer === !0 && e.multiview === !1 && v("WebGLBackend: Render-to-texture extension was disabled because an external texture was provided"), e._autoAllocateDepthBuffer = !1;
14923
+ }), this.extensions.has("WEBGL_multisampled_render_to_texture") === !0 && e._autoAllocateDepthBuffer === !0 && e.multiview === !1 && w("WebGLBackend: Render-to-texture extension was disabled because an external texture was provided"), e._autoAllocateDepthBuffer = !1;
14924
14924
  }
14925
14925
  }
14926
14926
  initTimestampQuery(e, t) {
@@ -14947,7 +14947,7 @@ var vE = class {
14947
14947
  let { width: e, height: n } = this.getDrawingBufferSize();
14948
14948
  t.scissor(0, 0, e, n);
14949
14949
  }
14950
- this.initTimestampQuery(Xt.RENDER, this.getTimestampUID(e)), n.previousContext = this._currentContext, this._currentContext = e, this._setFramebuffer(e), this.clear(e.clearColor, e.clearDepth, e.clearStencil, e, !1);
14950
+ this.initTimestampQuery(ot.RENDER, this.getTimestampUID(e)), n.previousContext = this._currentContext, this._currentContext = e, this._setFramebuffer(e), this.clear(e.clearColor, e.clearDepth, e.clearStencil, e, !1);
14951
14951
  let r = e.occlusionQueryCount;
14952
14952
  r > 0 && (n.currentOcclusionQueries = n.occlusionQueries, n.currentOcclusionQueryObjects = n.occlusionQueryObjects, n.lastOcclusionObject = null, n.occlusionQueries = Array(r), n.occlusionQueryObjects = Array(r), n.occlusionQueryIndex = 0);
14953
14953
  }
@@ -14973,7 +14973,7 @@ var vE = class {
14973
14973
  n.scissor(0, 0, e, t);
14974
14974
  }
14975
14975
  }
14976
- this.prepareTimestampBuffer(Xt.RENDER, this.getTimestampUID(e));
14976
+ this.prepareTimestampBuffer(ot.RENDER, this.getTimestampUID(e));
14977
14977
  }
14978
14978
  resolveOccludedAsync(e) {
14979
14979
  let t = this.get(e), { currentOcclusionQueries: n, currentOcclusionQueryObjects: r } = t;
@@ -15040,7 +15040,7 @@ var vE = class {
15040
15040
  }
15041
15041
  beginCompute(e) {
15042
15042
  let { state: t, gl: n } = this;
15043
- t.bindFramebuffer(n.FRAMEBUFFER, null), this.initTimestampQuery(Xt.COMPUTE, this.getTimestampUID(e));
15043
+ t.bindFramebuffer(n.FRAMEBUFFER, null), this.initTimestampQuery(ot.COMPUTE, this.getTimestampUID(e));
15044
15044
  }
15045
15045
  compute(e, t, n, r, i = null) {
15046
15046
  let { state: a, gl: o } = this;
@@ -15048,7 +15048,7 @@ var vE = class {
15048
15048
  let { programGPU: s, transformBuffers: c, attributes: l } = this.get(r), u = this._getVaoKey(l), d = this.vaoCache[u];
15049
15049
  d === void 0 ? this.vaoCache[u] = this._createVao(l) : a.setVertexState(d), a.useProgram(s), this._bindUniforms(n);
15050
15050
  let f = this._getTransformFeedback(c);
15051
- o.bindTransformFeedback(o.TRANSFORM_FEEDBACK, f), o.beginTransformFeedback(o.POINTS), i = i === null ? t.count : i, Array.isArray(i) ? (Ae("WebGLBackend.compute(): The count parameter must be a single number, not an array."), i = i[0]) : i && typeof i == "object" && i.isIndirectStorageBufferAttribute && (Ae("WebGLBackend.compute(): The count parameter must be a single number, not IndirectStorageBufferAttribute"), i = t.count), l[0].isStorageInstancedBufferAttribute ? o.drawArraysInstanced(o.POINTS, 0, 1, i) : o.drawArrays(o.POINTS, 0, i), o.endTransformFeedback(), o.bindTransformFeedback(o.TRANSFORM_FEEDBACK, null);
15051
+ o.bindTransformFeedback(o.TRANSFORM_FEEDBACK, f), o.beginTransformFeedback(o.POINTS), i = i === null ? t.count : i, Array.isArray(i) ? (Be("WebGLBackend.compute(): The count parameter must be a single number, not an array."), i = i[0]) : i && typeof i == "object" && i.isIndirectStorageBufferAttribute && (Be("WebGLBackend.compute(): The count parameter must be a single number, not IndirectStorageBufferAttribute"), i = t.count), l[0].isStorageInstancedBufferAttribute ? o.drawArraysInstanced(o.POINTS, 0, 1, i) : o.drawArrays(o.POINTS, 0, i), o.endTransformFeedback(), o.bindTransformFeedback(o.TRANSFORM_FEEDBACK, null);
15052
15052
  for (let e = 0; e < c.length; e++) {
15053
15053
  let t = c[e];
15054
15054
  t.pbo && this.has(t.pbo) && this.textureUtils.copyBufferToTexture(t.transformBuffer, t.pbo), t.switchBuffers();
@@ -15056,7 +15056,7 @@ var vE = class {
15056
15056
  }
15057
15057
  finishCompute(e) {
15058
15058
  let { state: t, gl: n } = this;
15059
- this.discard = !1, t.disable(n.RASTERIZER_DISCARD), this.prepareTimestampBuffer(Xt.COMPUTE, this.getTimestampUID(e)), this._currentContext && this._setFramebuffer(this._currentContext);
15059
+ this.discard = !1, t.disable(n.RASTERIZER_DISCARD), this.prepareTimestampBuffer(ot.COMPUTE, this.getTimestampUID(e)), this._currentContext && this._setFramebuffer(this._currentContext);
15060
15060
  }
15061
15061
  _isRenderCameraDepthArray(e) {
15062
15062
  return e.depthTexture && e.depthTexture.isArrayTexture && e.camera.isArrayCamera;
@@ -15220,9 +15220,9 @@ var vE = class {
15220
15220
  if (r.getProgramParameter(e, r.LINK_STATUS) === !1) if (typeof this.renderer.debug.onShaderError == "function") this.renderer.debug.onShaderError(r, e, n, t);
15221
15221
  else {
15222
15222
  let a = this._getShaderErrors(r, n, "vertex"), o = this._getShaderErrors(r, t, "fragment");
15223
- C("THREE.WebGLProgram: Shader Error " + r.getError() + " - VALIDATE_STATUS " + r.getProgramParameter(e, r.VALIDATE_STATUS) + "\n\nProgram Info Log: " + i + "\n" + a + "\n" + o);
15223
+ y("THREE.WebGLProgram: Shader Error " + r.getError() + " - VALIDATE_STATUS " + r.getProgramParameter(e, r.VALIDATE_STATUS) + "\n\nProgram Info Log: " + i + "\n" + a + "\n" + o);
15224
15224
  }
15225
- else i !== "" && v("WebGLProgram: Program Info Log:", i);
15225
+ else i !== "" && w("WebGLProgram: Program Info Log:", i);
15226
15226
  }
15227
15227
  }
15228
15228
  _completeCompile(e, t) {
@@ -15287,7 +15287,7 @@ var vE = class {
15287
15287
  let a = n.updateRanges;
15288
15288
  if (t.bindBuffer(t.UNIFORM_BUFFER, i), a.length === 0) t.bufferData(t.UNIFORM_BUFFER, r, t.DYNAMIC_DRAW);
15289
15289
  else {
15290
- let e = oe(r), n = e ? 1 : r.BYTES_PER_ELEMENT;
15290
+ let e = Te(r), n = e ? 1 : r.BYTES_PER_ELEMENT;
15291
15291
  for (let i = 0, o = a.length; i < o; i++) {
15292
15292
  let o = a[i], s = o.start * n, c = o.count * n, l = s * (e ? r.BYTES_PER_ELEMENT : 1);
15293
15293
  t.bufferSubData(t.UNIFORM_BUFFER, l, r, s, c);
@@ -15306,7 +15306,7 @@ var vE = class {
15306
15306
  let n = this.get(e).bufferGPU, r = e.buffer, i = e.updateRanges;
15307
15307
  if (t.bindBuffer(t.UNIFORM_BUFFER, n), i.length === 0) t.bufferData(t.UNIFORM_BUFFER, r, t.DYNAMIC_DRAW);
15308
15308
  else {
15309
- let e = oe(r), n = e ? 1 : r.BYTES_PER_ELEMENT;
15309
+ let e = Te(r), n = e ? 1 : r.BYTES_PER_ELEMENT;
15310
15310
  for (let a = 0, o = i.length; a < o; a++) {
15311
15311
  let o = i[a], s = o.start * n, c = o.count * n, l = s * (e ? r.BYTES_PER_ELEMENT : 1);
15312
15312
  t.bufferSubData(t.UNIFORM_BUFFER, l, r, s, c);
@@ -15346,7 +15346,7 @@ var vE = class {
15346
15346
  this.textureUtils.copyFramebufferToTexture(e, t, n);
15347
15347
  }
15348
15348
  hasCompatibility(e) {
15349
- return e === f.TEXTURE_COMPARE ? !0 : super.hasCompatibility(e);
15349
+ return e === p.TEXTURE_COMPARE ? !0 : super.hasCompatibility(e);
15350
15350
  }
15351
15351
  initRenderTarget(e) {
15352
15352
  let { gl: t, state: n } = this;
@@ -15934,7 +15934,7 @@ var vE = class {
15934
15934
  mipmapFilter: this._convertFilterMode(e.minFilter),
15935
15935
  maxAnisotropy: 1
15936
15936
  };
15937
- e.isDepthTexture && e.compareFunction === null && (i.magFilter = PE.Nearest, i.minFilter = PE.Nearest, i.mipmapFilter = PE.Nearest), i.magFilter === PE.Linear && i.minFilter === PE.Linear && i.mipmapFilter === PE.Linear && (i.maxAnisotropy = e.anisotropy), e.isDepthTexture && e.compareFunction !== null && t.hasCompatibility(f.TEXTURE_COMPARE) && (i.compare = $E[e.compareFunction]), r = {
15937
+ e.isDepthTexture && e.compareFunction === null && (i.magFilter = PE.Nearest, i.minFilter = PE.Nearest, i.mipmapFilter = PE.Nearest), i.magFilter === PE.Linear && i.minFilter === PE.Linear && i.mipmapFilter === PE.Linear && (i.maxAnisotropy = e.anisotropy), e.isDepthTexture && e.compareFunction !== null && t.hasCompatibility(p.TEXTURE_COMPARE) && (i.compare = $E[e.compareFunction]), r = {
15938
15938
  sampler: t.device.createSampler(i),
15939
15939
  usedTimes: 0
15940
15940
  }, this._samplerCache.set(n, r);
@@ -15981,14 +15981,14 @@ var vE = class {
15981
15981
  usage: p
15982
15982
  };
15983
15983
  if (l === void 0) {
15984
- v("WebGPURenderer: Texture format not supported."), this.createDefaultTexture(e);
15984
+ w("WebGPURenderer: Texture format not supported."), this.createDefaultTexture(e);
15985
15985
  return;
15986
15986
  }
15987
15987
  e.isCubeTexture && (m.textureBindingViewDimension = UE.Cube);
15988
15988
  try {
15989
15989
  r.texture = n.device.createTexture(m);
15990
15990
  } catch {
15991
- v("WebGPURenderer: Failed to create texture with descriptor:", m), this.createDefaultTexture(e);
15991
+ w("WebGPURenderer: Failed to create texture with descriptor:", m), this.createDefaultTexture(e);
15992
15992
  return;
15993
15993
  }
15994
15994
  if (f) {
@@ -16025,7 +16025,7 @@ var vE = class {
16025
16025
  let n = this.backend, r = n.renderer.getCanvasTarget(), { width: i, height: a } = n.getDrawingBufferSize(), o = n.renderer.currentSamples, s = r.depthTexture;
16026
16026
  if (s.width === i && s.height === a && s.samples === o && s.depth === e && s.stencil === t) return n.get(s).texture;
16027
16027
  let c = n.get(s).texture, l, u;
16028
- if (t ? (l = Wt, u = n.renderer.reversedDepthBuffer === !0 ? $t : Ot) : e && (l = ne, u = n.renderer.reversedDepthBuffer === !0 ? $t : ft), c !== void 0) {
16028
+ if (t ? (l = ie, u = n.renderer.reversedDepthBuffer === !0 ? lt : St) : e && (l = Xt, u = n.renderer.reversedDepthBuffer === !0 ? lt : Qe), c !== void 0) {
16029
16029
  if (s.image.width === i && s.image.height === a && s.format === l && s.type === u && s.samples === o) return c;
16030
16030
  this.destroyTexture(s);
16031
16031
  }
@@ -16097,8 +16097,8 @@ var vE = class {
16097
16097
  _getDefaultTextureGPU(e) {
16098
16098
  let t = this.defaultTexture[e];
16099
16099
  if (t === void 0) {
16100
- let n = new Xe();
16101
- n.minFilter = gn, n.magFilter = gn, this.createTexture(n, {
16100
+ let n = new Ht();
16101
+ n.minFilter = it, n.magFilter = it, this.createTexture(n, {
16102
16102
  width: 1,
16103
16103
  height: 1,
16104
16104
  format: e
@@ -16109,8 +16109,8 @@ var vE = class {
16109
16109
  _getDefaultCubeTextureGPU(e) {
16110
16110
  let t = this.defaultCubeTexture[e];
16111
16111
  if (t === void 0) {
16112
- let n = new bt();
16113
- n.minFilter = gn, n.magFilter = gn, this.createTexture(n, {
16112
+ let n = new ue();
16113
+ n.minFilter = it, n.magFilter = it, this.createTexture(n, {
16114
16114
  width: 1,
16115
16115
  height: 1,
16116
16116
  depth: 6
@@ -16370,260 +16370,260 @@ var vE = class {
16370
16370
  return t = e.is3DTexture || e.isData3DTexture ? HE.ThreeD : HE.TwoD, t;
16371
16371
  }
16372
16372
  };
16373
- function nD(t, n) {
16374
- let r = t.format, i = t.type, a = t.normalized, o = t.colorSpace, s = Ee.getTransfer(o), l, u = !1;
16375
- if (a && (u = n.features.has(KE.TextureFormatsTier1), u === !1 && v("WebGPURenderer: Unable to use normalized textures without texture-formats-tier1 feature.")), t.isCompressedTexture === !0 || t.isCompressedArrayTexture === !0) switch (r) {
16376
- case pn:
16377
- case rn:
16378
- l = s === "srgb" ? Q.BC1RGBAUnormSRGB : Q.BC1RGBAUnorm;
16373
+ function nD(e, n) {
16374
+ let r = e.format, i = e.type, a = e.normalized, s = e.colorSpace, l = g.getTransfer(s), u, f = !1;
16375
+ if (a && (f = n.features.has(KE.TextureFormatsTier1), f === !1 && w("WebGPURenderer: Unable to use normalized textures without texture-formats-tier1 feature.")), e.isCompressedTexture === !0 || e.isCompressedArrayTexture === !0) switch (r) {
16376
+ case Ae:
16377
+ case dt:
16378
+ u = l === "srgb" ? Q.BC1RGBAUnormSRGB : Q.BC1RGBAUnorm;
16379
16379
  break;
16380
- case at:
16381
- l = s === "srgb" ? Q.BC2RGBAUnormSRGB : Q.BC2RGBAUnorm;
16380
+ case ht:
16381
+ u = l === "srgb" ? Q.BC2RGBAUnormSRGB : Q.BC2RGBAUnorm;
16382
16382
  break;
16383
- case dt:
16384
- l = s === "srgb" ? Q.BC3RGBAUnormSRGB : Q.BC3RGBAUnorm;
16383
+ case Yt:
16384
+ u = l === "srgb" ? Q.BC3RGBAUnormSRGB : Q.BC3RGBAUnorm;
16385
16385
  break;
16386
- case y:
16387
- l = Q.BC4RUnorm;
16386
+ case Fe:
16387
+ u = Q.BC4RUnorm;
16388
16388
  break;
16389
- case se:
16390
- l = Q.BC4RSnorm;
16389
+ case Ee:
16390
+ u = Q.BC4RSnorm;
16391
16391
  break;
16392
- case Pe:
16393
- l = Q.BC5RGUnorm;
16392
+ case S:
16393
+ u = Q.BC5RGUnorm;
16394
16394
  break;
16395
- case ee:
16396
- l = Q.BC5RGSnorm;
16395
+ case le:
16396
+ u = Q.BC5RGSnorm;
16397
16397
  break;
16398
- case Rt:
16399
- l = s === "srgb" ? Q.BC7RGBAUnormSRGB : Q.BC7RGBAUnorm;
16398
+ case an:
16399
+ u = l === "srgb" ? Q.BC7RGBAUnormSRGB : Q.BC7RGBAUnorm;
16400
16400
  break;
16401
- case sn:
16402
- case Je:
16403
- l = s === "srgb" ? Q.ETC2RGB8UnormSRGB : Q.ETC2RGB8Unorm;
16401
+ case vn:
16402
+ case dn:
16403
+ u = l === "srgb" ? Q.ETC2RGB8UnormSRGB : Q.ETC2RGB8Unorm;
16404
+ break;
16405
+ case ct:
16406
+ u = l === "srgb" ? Q.ETC2RGBA8UnormSRGB : Q.ETC2RGBA8Unorm;
16404
16407
  break;
16405
- case Qt:
16406
- l = s === "srgb" ? Q.ETC2RGBA8UnormSRGB : Q.ETC2RGBA8Unorm;
16408
+ case c:
16409
+ u = Q.EACR11Unorm;
16407
16410
  break;
16408
- case yn:
16409
- l = Q.EACR11Unorm;
16411
+ case re:
16412
+ u = Q.EACR11Snorm;
16410
16413
  break;
16411
- case g:
16412
- l = Q.EACR11Snorm;
16414
+ case Ve:
16415
+ u = Q.EACRG11Unorm;
16413
16416
  break;
16414
- case je:
16415
- l = Q.EACRG11Unorm;
16417
+ case bn:
16418
+ u = Q.EACRG11Snorm;
16416
16419
  break;
16417
- case Se:
16418
- l = Q.EACRG11Snorm;
16420
+ case t:
16421
+ u = l === "srgb" ? Q.ASTC4x4UnormSRGB : Q.ASTC4x4Unorm;
16419
16422
  break;
16420
- case ve:
16421
- l = s === "srgb" ? Q.ASTC4x4UnormSRGB : Q.ASTC4x4Unorm;
16423
+ case pt:
16424
+ u = l === "srgb" ? Q.ASTC5x4UnormSRGB : Q.ASTC5x4Unorm;
16422
16425
  break;
16423
- case e:
16424
- l = s === "srgb" ? Q.ASTC5x4UnormSRGB : Q.ASTC5x4Unorm;
16426
+ case sn:
16427
+ u = l === "srgb" ? Q.ASTC5x5UnormSRGB : Q.ASTC5x5Unorm;
16425
16428
  break;
16426
- case st:
16427
- l = s === "srgb" ? Q.ASTC5x5UnormSRGB : Q.ASTC5x5Unorm;
16429
+ case Vt:
16430
+ u = l === "srgb" ? Q.ASTC6x5UnormSRGB : Q.ASTC6x5Unorm;
16428
16431
  break;
16429
16432
  case tn:
16430
- l = s === "srgb" ? Q.ASTC6x5UnormSRGB : Q.ASTC6x5Unorm;
16433
+ u = l === "srgb" ? Q.ASTC6x6UnormSRGB : Q.ASTC6x6Unorm;
16431
16434
  break;
16432
- case Ft:
16433
- l = s === "srgb" ? Q.ASTC6x6UnormSRGB : Q.ASTC6x6Unorm;
16435
+ case Ot:
16436
+ u = l === "srgb" ? Q.ASTC8x5UnormSRGB : Q.ASTC8x5Unorm;
16434
16437
  break;
16435
- case Yt:
16436
- l = s === "srgb" ? Q.ASTC8x5UnormSRGB : Q.ASTC8x5Unorm;
16438
+ case nt:
16439
+ u = l === "srgb" ? Q.ASTC8x6UnormSRGB : Q.ASTC8x6Unorm;
16437
16440
  break;
16438
- case yt:
16439
- l = s === "srgb" ? Q.ASTC8x6UnormSRGB : Q.ASTC8x6Unorm;
16441
+ case Wt:
16442
+ u = l === "srgb" ? Q.ASTC8x8UnormSRGB : Q.ASTC8x8Unorm;
16440
16443
  break;
16441
- case Qe:
16442
- l = s === "srgb" ? Q.ASTC8x8UnormSRGB : Q.ASTC8x8Unorm;
16444
+ case ae:
16445
+ u = l === "srgb" ? Q.ASTC10x5UnormSRGB : Q.ASTC10x5Unorm;
16443
16446
  break;
16444
- case Gt:
16445
- l = s === "srgb" ? Q.ASTC10x5UnormSRGB : Q.ASTC10x5Unorm;
16447
+ case qe:
16448
+ u = l === "srgb" ? Q.ASTC10x6UnormSRGB : Q.ASTC10x6Unorm;
16446
16449
  break;
16447
- case S:
16448
- l = s === "srgb" ? Q.ASTC10x6UnormSRGB : Q.ASTC10x6Unorm;
16450
+ case We:
16451
+ u = l === "srgb" ? Q.ASTC10x8UnormSRGB : Q.ASTC10x8Unorm;
16449
16452
  break;
16450
- case He:
16451
- l = s === "srgb" ? Q.ASTC10x8UnormSRGB : Q.ASTC10x8Unorm;
16453
+ case Zt:
16454
+ u = l === "srgb" ? Q.ASTC10x10UnormSRGB : Q.ASTC10x10Unorm;
16452
16455
  break;
16453
- case re:
16454
- l = s === "srgb" ? Q.ASTC10x10UnormSRGB : Q.ASTC10x10Unorm;
16456
+ case Xe:
16457
+ u = l === "srgb" ? Q.ASTC12x10UnormSRGB : Q.ASTC12x10Unorm;
16455
16458
  break;
16456
- case Be:
16457
- l = s === "srgb" ? Q.ASTC12x10UnormSRGB : Q.ASTC12x10Unorm;
16459
+ case xe:
16460
+ u = l === "srgb" ? Q.ASTC12x12UnormSRGB : Q.ASTC12x12Unorm;
16458
16461
  break;
16459
- case We:
16460
- l = s === "srgb" ? Q.ASTC12x12UnormSRGB : Q.ASTC12x12Unorm;
16461
- break;
16462
- case Re:
16463
- l = s === "srgb" ? Q.RGBA8UnormSRGB : Q.RGBA8Unorm;
16462
+ case x:
16463
+ u = l === "srgb" ? Q.RGBA8UnormSRGB : Q.RGBA8Unorm;
16464
16464
  break;
16465
- default: C("WebGPURenderer: Unsupported texture format.", r);
16465
+ default: y("WebGPURenderer: Unsupported texture format.", r);
16466
16466
  }
16467
16467
  else switch (r) {
16468
- case Re:
16468
+ case x:
16469
16469
  switch (i) {
16470
- case mt:
16471
- l = Q.RGBA8Snorm;
16470
+ case _t:
16471
+ u = Q.RGBA8Snorm;
16472
16472
  break;
16473
- case Kt:
16474
- l = u ? Q.RGBA16Snorm : Q.RGBA16Sint;
16473
+ case oe:
16474
+ u = f ? Q.RGBA16Snorm : Q.RGBA16Sint;
16475
16475
  break;
16476
- case hn:
16477
- l = u ? Q.RGBA16Unorm : Q.RGBA16Uint;
16476
+ case rt:
16477
+ u = f ? Q.RGBA16Unorm : Q.RGBA16Uint;
16478
16478
  break;
16479
- case ft:
16480
- l = Q.RGBA32Uint;
16479
+ case Qe:
16480
+ u = Q.RGBA32Uint;
16481
16481
  break;
16482
- case un:
16483
- l = Q.RGBA32Sint;
16482
+ case Pe:
16483
+ u = Q.RGBA32Sint;
16484
16484
  break;
16485
- case lt:
16486
- l = s === "srgb" ? Q.RGBA8UnormSRGB : Q.RGBA8Unorm;
16485
+ case qt:
16486
+ u = l === "srgb" ? Q.RGBA8UnormSRGB : Q.RGBA8Unorm;
16487
16487
  break;
16488
- case jt:
16489
- l = Q.RGBA16Float;
16488
+ case Tt:
16489
+ u = Q.RGBA16Float;
16490
16490
  break;
16491
- case $t:
16492
- l = Q.RGBA32Float;
16491
+ case lt:
16492
+ u = Q.RGBA32Float;
16493
16493
  break;
16494
- default: C("WebGPURenderer: Unsupported texture type with RGBAFormat.", i);
16494
+ default: y("WebGPURenderer: Unsupported texture type with RGBAFormat.", i);
16495
16495
  }
16496
16496
  break;
16497
- case Ut:
16497
+ case Rt:
16498
16498
  switch (i) {
16499
- case ht:
16500
- l = Q.RGB9E5UFloat;
16499
+ case vt:
16500
+ u = Q.RGB9E5UFloat;
16501
16501
  break;
16502
- case Vt:
16503
- l = Q.RG11B10UFloat;
16502
+ case It:
16503
+ u = Q.RG11B10UFloat;
16504
16504
  break;
16505
- default: C("WebGPURenderer: Unsupported texture type with RGBFormat.", i);
16505
+ default: y("WebGPURenderer: Unsupported texture type with RGBFormat.", i);
16506
16506
  }
16507
16507
  break;
16508
- case ge:
16508
+ case Nt:
16509
16509
  switch (i) {
16510
- case mt:
16511
- l = Q.R8Snorm;
16510
+ case _t:
16511
+ u = Q.R8Snorm;
16512
16512
  break;
16513
- case Kt:
16514
- l = u ? Q.R16Snorm : Q.R16Sint;
16513
+ case oe:
16514
+ u = f ? Q.R16Snorm : Q.R16Sint;
16515
16515
  break;
16516
- case hn:
16517
- l = u ? Q.R16Unorm : Q.R16Uint;
16516
+ case rt:
16517
+ u = f ? Q.R16Unorm : Q.R16Uint;
16518
16518
  break;
16519
- case ft:
16520
- l = Q.R32Uint;
16519
+ case Qe:
16520
+ u = Q.R32Uint;
16521
16521
  break;
16522
- case un:
16523
- l = Q.R32Sint;
16522
+ case Pe:
16523
+ u = Q.R32Sint;
16524
16524
  break;
16525
- case lt:
16526
- l = Q.R8Unorm;
16525
+ case qt:
16526
+ u = Q.R8Unorm;
16527
16527
  break;
16528
- case jt:
16529
- l = Q.R16Float;
16528
+ case Tt:
16529
+ u = Q.R16Float;
16530
16530
  break;
16531
- case $t:
16532
- l = Q.R32Float;
16531
+ case lt:
16532
+ u = Q.R32Float;
16533
16533
  break;
16534
- default: C("WebGPURenderer: Unsupported texture type with RedFormat.", i);
16534
+ default: y("WebGPURenderer: Unsupported texture type with RedFormat.", i);
16535
16535
  }
16536
16536
  break;
16537
- case we:
16537
+ case d:
16538
16538
  switch (i) {
16539
- case mt:
16540
- l = Q.RG8Snorm;
16539
+ case _t:
16540
+ u = Q.RG8Snorm;
16541
16541
  break;
16542
- case Kt:
16543
- l = u ? Q.RG16Snorm : Q.RG16Sint;
16542
+ case oe:
16543
+ u = f ? Q.RG16Snorm : Q.RG16Sint;
16544
16544
  break;
16545
- case hn:
16546
- l = u ? Q.RG16Unorm : Q.RG16Uint;
16545
+ case rt:
16546
+ u = f ? Q.RG16Unorm : Q.RG16Uint;
16547
16547
  break;
16548
- case ft:
16549
- l = Q.RG32Uint;
16548
+ case Qe:
16549
+ u = Q.RG32Uint;
16550
16550
  break;
16551
- case un:
16552
- l = Q.RG32Sint;
16551
+ case Pe:
16552
+ u = Q.RG32Sint;
16553
16553
  break;
16554
- case lt:
16555
- l = Q.RG8Unorm;
16554
+ case qt:
16555
+ u = Q.RG8Unorm;
16556
16556
  break;
16557
- case jt:
16558
- l = Q.RG16Float;
16557
+ case Tt:
16558
+ u = Q.RG16Float;
16559
16559
  break;
16560
- case $t:
16561
- l = Q.RG32Float;
16560
+ case lt:
16561
+ u = Q.RG32Float;
16562
16562
  break;
16563
- default: C("WebGPURenderer: Unsupported texture type with RGFormat.", i);
16563
+ default: y("WebGPURenderer: Unsupported texture type with RGFormat.", i);
16564
16564
  }
16565
16565
  break;
16566
- case ne:
16566
+ case Xt:
16567
16567
  switch (i) {
16568
- case hn:
16569
- l = Q.Depth16Unorm;
16568
+ case rt:
16569
+ u = Q.Depth16Unorm;
16570
16570
  break;
16571
- case ft:
16572
- l = Q.Depth24Plus;
16571
+ case Qe:
16572
+ u = Q.Depth24Plus;
16573
16573
  break;
16574
- case $t:
16575
- l = Q.Depth32Float;
16574
+ case lt:
16575
+ u = Q.Depth32Float;
16576
16576
  break;
16577
- default: C("WebGPURenderer: Unsupported texture type with DepthFormat.", i);
16577
+ default: y("WebGPURenderer: Unsupported texture type with DepthFormat.", i);
16578
16578
  }
16579
16579
  break;
16580
- case Wt:
16580
+ case ie:
16581
16581
  switch (i) {
16582
- case Ot:
16583
- l = Q.Depth24PlusStencil8;
16582
+ case St:
16583
+ u = Q.Depth24PlusStencil8;
16584
16584
  break;
16585
- case $t:
16586
- n && n.features.has(KE.Depth32FloatStencil8) === !1 && C("WebGPURenderer: Depth textures with DepthStencilFormat + FloatType can only be used with the \"depth32float-stencil8\" GPU feature."), l = Q.Depth32FloatStencil8;
16585
+ case lt:
16586
+ n && n.features.has(KE.Depth32FloatStencil8) === !1 && y("WebGPURenderer: Depth textures with DepthStencilFormat + FloatType can only be used with the \"depth32float-stencil8\" GPU feature."), u = Q.Depth32FloatStencil8;
16587
16587
  break;
16588
- default: C("WebGPURenderer: Unsupported texture type with DepthStencilFormat.", i);
16588
+ default: y("WebGPURenderer: Unsupported texture type with DepthStencilFormat.", i);
16589
16589
  }
16590
16590
  break;
16591
- case wt:
16591
+ case o:
16592
16592
  switch (i) {
16593
- case un:
16594
- l = Q.R32Sint;
16593
+ case Pe:
16594
+ u = Q.R32Sint;
16595
16595
  break;
16596
- case ft:
16597
- l = Q.R32Uint;
16596
+ case Qe:
16597
+ u = Q.R32Uint;
16598
16598
  break;
16599
- default: C("WebGPURenderer: Unsupported texture type with RedIntegerFormat.", i);
16599
+ default: y("WebGPURenderer: Unsupported texture type with RedIntegerFormat.", i);
16600
16600
  }
16601
16601
  break;
16602
- case c:
16602
+ case pn:
16603
16603
  switch (i) {
16604
- case un:
16605
- l = Q.RG32Sint;
16604
+ case Pe:
16605
+ u = Q.RG32Sint;
16606
16606
  break;
16607
- case ft:
16608
- l = Q.RG32Uint;
16607
+ case Qe:
16608
+ u = Q.RG32Uint;
16609
16609
  break;
16610
- default: C("WebGPURenderer: Unsupported texture type with RGIntegerFormat.", i);
16610
+ default: y("WebGPURenderer: Unsupported texture type with RGIntegerFormat.", i);
16611
16611
  }
16612
16612
  break;
16613
- case _:
16613
+ case se:
16614
16614
  switch (i) {
16615
- case un:
16616
- l = Q.RGBA32Sint;
16615
+ case Pe:
16616
+ u = Q.RGBA32Sint;
16617
16617
  break;
16618
- case ft:
16619
- l = Q.RGBA32Uint;
16618
+ case Qe:
16619
+ u = Q.RGBA32Uint;
16620
16620
  break;
16621
- default: C("WebGPURenderer: Unsupported texture type with RGBAIntegerFormat.", i);
16621
+ default: y("WebGPURenderer: Unsupported texture type with RGBAIntegerFormat.", i);
16622
16622
  }
16623
16623
  break;
16624
- default: C("WebGPURenderer: Unsupported texture format.", r);
16624
+ default: y("WebGPURenderer: Unsupported texture format.", r);
16625
16625
  }
16626
- return l;
16626
+ return u;
16627
16627
  }
16628
16628
  var rD = /^[fn]*\s*([a-z_0-9]+)?\s*\(([\s\S]*?)\)\s*[\-\>]*\s*([a-z_0-9]+(?:<[\s\S]+?>)?)/i, iD = /([a-z_0-9]+)\s*:\s*([a-z_0-9]+(?:<[\s\S]+?>)?)/gi, aD = {
16629
16629
  f32: "float",
@@ -16719,9 +16719,9 @@ var rD = /^[fn]*\s*([a-z_0-9]+)?\s*\(([\s\S]*?)\)\s*[\-\>]*\s*([a-z_0-9]+(?:<[\s
16719
16719
  [qn.WRITE_ONLY]: "write",
16720
16720
  [qn.READ_WRITE]: "read_write"
16721
16721
  }, uD = {
16722
- [xt]: "repeat",
16723
- [dn]: "clamp",
16724
- [on]: "mirror"
16722
+ [de]: "repeat",
16723
+ [Oe]: "clamp",
16724
+ [_n]: "mirror"
16725
16725
  }, dD = {
16726
16726
  vertex: EE.VERTEX,
16727
16727
  fragment: EE.FRAGMENT,
@@ -16801,7 +16801,7 @@ var yD = class extends Dw {
16801
16801
  let t = `tsl_coord_${uD[e.wrapS]}S_${uD[e.wrapT]}_${e.is3DTexture || e.isData3DTexture ? "3d" : "2d"}T`, n = hD[t];
16802
16802
  if (n === void 0) {
16803
16803
  let r = [], i = e.is3DTexture || e.isData3DTexture ? "vec3f" : "vec2f", a = `fn ${t}( coord : ${i} ) -> ${i} {\n\n\treturn ${i}(\n`, o = (e, t) => {
16804
- e === 1e3 ? (r.push(gD.repeatWrapping_float), a += `\t\ttsl_repeatWrapping_float( coord.${t} )`) : e === 1001 ? (r.push(gD.clampWrapping_float), a += `\t\ttsl_clampWrapping_float( coord.${t} )`) : e === 1002 ? (r.push(gD.mirrorWrapping_float), a += `\t\ttsl_mirrorWrapping_float( coord.${t} )`) : (a += `\t\tcoord.${t}`, v(`WebGPURenderer: Unsupported texture wrap type "${e}" for vertex shader.`));
16804
+ e === 1e3 ? (r.push(gD.repeatWrapping_float), a += `\t\ttsl_repeatWrapping_float( coord.${t} )`) : e === 1001 ? (r.push(gD.clampWrapping_float), a += `\t\ttsl_clampWrapping_float( coord.${t} )`) : e === 1002 ? (r.push(gD.mirrorWrapping_float), a += `\t\ttsl_mirrorWrapping_float( coord.${t} )`) : (a += `\t\tcoord.${t}`, w(`WebGPURenderer: Unsupported texture wrap type "${e}" for vertex shader.`));
16805
16805
  };
16806
16806
  o(e.wrapS, "x"), a += ",\n", o(e.wrapT, "y"), (e.is3DTexture || e.isData3DTexture) && (a += ",\n", o(e.wrapR, "z")), a += "\n );\n\n}\n", hD[t] = n = new Ky(a, r);
16807
16807
  }
@@ -16850,7 +16850,7 @@ var yD = class extends Dw {
16850
16850
  return a = r ? `textureStore( ${t}, ${n}, ${r}, ${i} )` : `textureStore( ${t}, ${n}, ${i} )`, a;
16851
16851
  }
16852
16852
  isSampleCompare(e) {
16853
- return e.isDepthTexture === !0 && e.compareFunction !== null && this.renderer.hasCompatibility(f.TEXTURE_COMPARE);
16853
+ return e.isDepthTexture === !0 && e.compareFunction !== null && this.renderer.hasCompatibility(p.TEXTURE_COMPARE);
16854
16854
  }
16855
16855
  isUnfilterable(e) {
16856
16856
  return this.getComponentTypeFromTexture(e) !== "float" || !this.isAvailable("float32Filterable") && e.type === 1015 || this.isSampleCompare(e) === !1 && e.minFilter === 1003 && e.magFilter === 1003 || this.renderer.backend.utils.getTextureSampleData(e).primarySamples > 1;
@@ -16861,18 +16861,18 @@ var yD = class extends Dw {
16861
16861
  }
16862
16862
  generateTextureGrad(e, t, n, r, i, a, o = this.shaderStage) {
16863
16863
  if (o === "fragment") return i ? a ? `textureSampleGrad( ${t}, ${t}_sampler, ${n}, ${i}, ${r[0]}, ${r[1]}, ${a} )` : `textureSampleGrad( ${t}, ${t}_sampler, ${n}, ${i}, ${r[0]}, ${r[1]} )` : a ? `textureSampleGrad( ${t}, ${t}_sampler, ${n}, ${r[0]}, ${r[1]}, ${a} )` : `textureSampleGrad( ${t}, ${t}_sampler, ${n}, ${r[0]}, ${r[1]} )`;
16864
- C(`WebGPURenderer: THREE.TextureNode.gradient() does not support ${o} shader.`);
16864
+ y(`WebGPURenderer: THREE.TextureNode.gradient() does not support ${o} shader.`);
16865
16865
  }
16866
16866
  generateTextureCompare(e, t, n, r, i, a, o = this.shaderStage) {
16867
16867
  if (o === "fragment") return e.isDepthTexture === !0 && e.isArrayTexture === !0 ? a ? `textureSampleCompare( ${t}, ${t}_sampler, ${n}, ${i}, ${r}, ${a} )` : `textureSampleCompare( ${t}, ${t}_sampler, ${n}, ${i}, ${r} )` : a ? `textureSampleCompare( ${t}, ${t}_sampler, ${n}, ${r}, ${a} )` : `textureSampleCompare( ${t}, ${t}_sampler, ${n}, ${r} )`;
16868
- C(`WebGPURenderer: THREE.DepthTexture.compareFunction() does not support ${o} shader.`);
16868
+ y(`WebGPURenderer: THREE.DepthTexture.compareFunction() does not support ${o} shader.`);
16869
16869
  }
16870
16870
  generateTextureLevel(e, t, n, r, i, a) {
16871
16871
  return this.isUnfilterable(e) === !1 ? i ? a ? `textureSampleLevel( ${t}, ${t}_sampler, ${n}, ${i}, ${r}, ${a} )` : `textureSampleLevel( ${t}, ${t}_sampler, ${n}, ${i}, ${r} )` : a ? `textureSampleLevel( ${t}, ${t}_sampler, ${n}, ${r}, ${a} )` : `textureSampleLevel( ${t}, ${t}_sampler, ${n}, ${r} )` : this.isFilteredTexture(e) ? this.generateFilteredTexture(e, t, n, a, r, i) : this.generateTextureLod(e, t, n, i, a, r);
16872
16872
  }
16873
16873
  generateTextureBias(e, t, n, r, i, a, o = this.shaderStage) {
16874
16874
  if (o === "fragment") return i ? a ? `textureSampleBias( ${t}, ${t}_sampler, ${n}, ${i}, ${r}, ${a} )` : `textureSampleBias( ${t}, ${t}_sampler, ${n}, ${i}, ${r} )` : a ? `textureSampleBias( ${t}, ${t}_sampler, ${n}, ${r}, ${a} )` : `textureSampleBias( ${t}, ${t}_sampler, ${n}, ${r} )`;
16875
- C(`WebGPURenderer: THREE.TextureNode.biasNode does not support ${o} shader.`);
16875
+ y(`WebGPURenderer: THREE.TextureNode.biasNode does not support ${o} shader.`);
16876
16876
  }
16877
16877
  getPropertyName(e, t = this.shaderStage) {
16878
16878
  if (e.isNodeVarying === !0 && e.needsInterpolation === !0) {
@@ -16891,7 +16891,7 @@ var yD = class extends Dw {
16891
16891
  return t === void 0 ? null : (this._include(t), t);
16892
16892
  }
16893
16893
  getNodeAccess(e, t) {
16894
- return t === "compute" ? e.access : e.isAtomic === !0 ? (v("WebGPURenderer: Atomic operations are only supported in compute shaders."), qn.READ_WRITE) : qn.READ_ONLY;
16894
+ return t === "compute" ? e.access : e.isAtomic === !0 ? (w("WebGPURenderer: Atomic operations are only supported in compute shaders."), qn.READ_WRITE) : qn.READ_ONLY;
16895
16895
  }
16896
16896
  getStorageAccess(e, t) {
16897
16897
  return lD[this.getNodeAccess(e, t)];
@@ -17391,7 +17391,7 @@ var<${n}> ${e} : ${a};`;
17391
17391
  [Float32Array, ["float32"]]
17392
17392
  ]);
17393
17393
  typeof Float16Array < "u" && xD.set(Float16Array, ["float16"]);
17394
- var SD = new Map([[$e, ["float16"]]]), CD = new Map([
17394
+ var SD = new Map([[Gt, ["float16"]]]), CD = new Map([
17395
17395
  [Int32Array, "sint32"],
17396
17396
  [Int16Array, "sint32"],
17397
17397
  [Uint32Array, "uint32"],
@@ -17433,7 +17433,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
17433
17433
  let s = t.updateRanges;
17434
17434
  if (s.length === 0) r.queue.writeBuffer(a, 0, o, 0);
17435
17435
  else {
17436
- let e = oe(o), n = e ? 1 : o.BYTES_PER_ELEMENT;
17436
+ let e = Te(o), n = e ? 1 : o.BYTES_PER_ELEMENT;
17437
17437
  for (let t = 0, c = s.length; t < c; t++) {
17438
17438
  let c = s[t], l, u;
17439
17439
  if (i._force3to4BytesAlignment === !0) {
@@ -17517,7 +17517,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
17517
17517
  a = `${e}x${i}`;
17518
17518
  }
17519
17519
  }
17520
- return a || C("WebGPUAttributeUtils: Vertex format not supported yet."), a;
17520
+ return a || y("WebGPUAttributeUtils: Vertex format not supported yet."), a;
17521
17521
  }
17522
17522
  _getBufferAttribute(e) {
17523
17523
  return e.isInterleavedBufferAttribute && (e = e.data), e;
@@ -17544,7 +17544,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
17544
17544
  let t = this.backend, n = t.device, r = e.buffer, i = t.get(e).buffer, a = e.updateRanges;
17545
17545
  if (a.length === 0) n.queue.writeBuffer(i, 0, r, 0);
17546
17546
  else {
17547
- let e = oe(r), t = e ? 1 : r.BYTES_PER_ELEMENT;
17547
+ let e = Te(r), t = e ? 1 : r.BYTES_PER_ELEMENT;
17548
17548
  for (let o = 0, s = a.length; o < s; o++) {
17549
17549
  let s = a[o], c = s.start * t, l = s.count * t, u = c * (e ? r.BYTES_PER_ELEMENT : 1);
17550
17550
  n.queue.writeBuffer(i, u, r, c, l);
@@ -17652,8 +17652,8 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
17652
17652
  r.isSampledCubeTexture ? t.viewDimension = UE.Cube : r.texture.isArrayTexture || r.texture.isDataArrayTexture || r.texture.isCompressedArrayTexture ? t.viewDimension = UE.TwoDArray : r.isSampledTexture3D && (t.viewDimension = UE.ThreeD), i.texture = t;
17653
17653
  } else if (r.isSampler) {
17654
17654
  let t = {};
17655
- r.texture.isDepthTexture && (r.texture.compareFunction !== null && e.hasCompatibility(f.TEXTURE_COMPARE) ? t.type = BE.Comparison : t.type = BE.NonFiltering), i.sampler = t;
17656
- } else C(`WebGPUBindingUtils: Unsupported binding "${r}".`);
17655
+ r.texture.isDepthTexture && (r.texture.compareFunction !== null && e.hasCompatibility(p.TEXTURE_COMPARE) ? t.type = BE.Comparison : t.type = BE.NonFiltering), i.sampler = t;
17656
+ } else y(`WebGPUBindingUtils: Unsupported binding "${r}".`);
17657
17657
  t.push(i), n++;
17658
17658
  }
17659
17659
  return t;
@@ -17708,7 +17708,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
17708
17708
  if (n !== null) if (this.backend.compatibilityMode !== !0) {
17709
17709
  let e = n.getBlendMode(r.name);
17710
17710
  e.blending === 6 ? a = m : e.blending !== 0 && (a = this._getBlending(e));
17711
- } else Ae("WebGPURenderer: Multiple Render Targets (MRT) blending configuration is not fully supported in compatibility mode. The material blending will be used for all render targets."), a = m;
17711
+ } else Be("WebGPURenderer: Multiple Render Targets (MRT) blending configuration is not fully supported in compatibility mode. The material blending will be used for all render targets."), a = m;
17712
17712
  else a = m;
17713
17713
  _.push({
17714
17714
  format: i,
@@ -17724,27 +17724,27 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
17724
17724
  writeMask: g
17725
17725
  });
17726
17726
  }
17727
- let v = c.get(o).module, y = c.get(s).module, b = this._getPrimitiveState(n, i, r), ee = this._getDepthCompare(r), x = u.getCurrentDepthStencilFormat(e.context), S = this._getSampleCount(e.context), te = {
17727
+ let v = c.get(o).module, b = c.get(s).module, ee = this._getPrimitiveState(n, i, r), x = this._getDepthCompare(r), S = u.getCurrentDepthStencilFormat(e.context), te = this._getSampleCount(e.context), ne = {
17728
17728
  label: `renderPipeline_${r.name || r.type}_${r.id}`,
17729
17729
  vertex: Object.assign({}, v, { buffers: p }),
17730
- fragment: Object.assign({}, y, { targets: _ }),
17731
- primitive: b,
17730
+ fragment: Object.assign({}, b, { targets: _ }),
17731
+ primitive: ee,
17732
17732
  multisample: {
17733
- count: S,
17734
- alphaToCoverageEnabled: r.alphaToCoverage && S > 1
17733
+ count: te,
17734
+ alphaToCoverageEnabled: r.alphaToCoverage && te > 1
17735
17735
  },
17736
17736
  layout: l.createPipelineLayout({ bindGroupLayouts: f })
17737
- }, ne = {}, re = e.context.depth, ie = e.context.stencil;
17738
- if ((re === !0 || ie === !0) && (re === !0 && (ne.format = x, ne.depthWriteEnabled = r.depthWrite, ne.depthCompare = ee), ie === !0 && (ne.stencilFront = h, ne.stencilBack = h, ne.stencilReadMask = r.stencilFuncMask, ne.stencilWriteMask = r.stencilWriteMask), r.polygonOffset === !0 && (ne.depthBias = r.polygonOffsetUnits, ne.depthBiasSlopeScale = r.polygonOffsetFactor, ne.depthBiasClamp = 0), te.depthStencil = ne), l.pushErrorScope("validation"), t === null) d.pipeline = l.createRenderPipeline(te), l.popErrorScope().then((e) => {
17739
- e !== null && (d.error = !0, C(e.message));
17737
+ }, re = {}, ie = e.context.depth, ae = e.context.stencil;
17738
+ if ((ie === !0 || ae === !0) && (ie === !0 && (re.format = S, re.depthWriteEnabled = r.depthWrite, re.depthCompare = x), ae === !0 && (re.stencilFront = h, re.stencilBack = h, re.stencilReadMask = r.stencilFuncMask, re.stencilWriteMask = r.stencilWriteMask), r.polygonOffset === !0 && (re.depthBias = r.polygonOffsetUnits, re.depthBiasSlopeScale = r.polygonOffsetFactor, re.depthBiasClamp = 0), ne.depthStencil = re), l.pushErrorScope("validation"), t === null) d.pipeline = l.createRenderPipeline(ne), l.popErrorScope().then((e) => {
17739
+ e !== null && (d.error = !0, y(e.message));
17740
17740
  });
17741
17741
  else {
17742
17742
  let e = new Promise(async (e) => {
17743
17743
  try {
17744
- d.pipeline = await l.createRenderPipelineAsync(te);
17744
+ d.pipeline = await l.createRenderPipelineAsync(ne);
17745
17745
  } catch {}
17746
17746
  let t = await l.popErrorScope();
17747
- t !== null && (d.error = !0, C(t.message)), e();
17747
+ t !== null && (d.error = !0, y(t.message)), e();
17748
17748
  });
17749
17749
  t.push(e);
17750
17750
  }
@@ -17816,10 +17816,10 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
17816
17816
  a($.SrcAlpha, $.One, $.One, $.One);
17817
17817
  break;
17818
17818
  case 3:
17819
- C(`WebGPURenderer: "SubtractiveBlending" requires "${e.isMaterial ? "material" : "blendMode"}.premultipliedAlpha = true".`);
17819
+ y(`WebGPURenderer: "SubtractiveBlending" requires "${e.isMaterial ? "material" : "blendMode"}.premultipliedAlpha = true".`);
17820
17820
  break;
17821
17821
  case 4:
17822
- C(`WebGPURenderer: "MultiplyBlending" requires "${e.isMaterial ? "material" : "blendMode"}.premultipliedAlpha = true".`);
17822
+ y(`WebGPURenderer: "MultiplyBlending" requires "${e.isMaterial ? "material" : "blendMode"}.premultipliedAlpha = true".`);
17823
17823
  break;
17824
17824
  }
17825
17825
  }
@@ -17827,7 +17827,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
17827
17827
  color: t,
17828
17828
  alpha: n
17829
17829
  };
17830
- C("WebGPURenderer: Invalid blending: ", r);
17830
+ y("WebGPURenderer: Invalid blending: ", r);
17831
17831
  }
17832
17832
  _getBlendFactor(e) {
17833
17833
  let t;
@@ -17871,7 +17871,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
17871
17871
  case Dg:
17872
17872
  t = $.OneMinusConstant;
17873
17873
  break;
17874
- default: C("WebGPURenderer: Blend factor not supported.", e);
17874
+ default: y("WebGPURenderer: Blend factor not supported.", e);
17875
17875
  }
17876
17876
  return t;
17877
17877
  }
@@ -17902,38 +17902,38 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
17902
17902
  case 517:
17903
17903
  t = DE.NotEqual;
17904
17904
  break;
17905
- default: C("WebGPURenderer: Invalid stencil function.", n);
17905
+ default: y("WebGPURenderer: Invalid stencil function.", n);
17906
17906
  }
17907
17907
  return t;
17908
17908
  }
17909
17909
  _getStencilOperation(e) {
17910
17910
  let t;
17911
17911
  switch (e) {
17912
- case me:
17912
+ case be:
17913
17913
  t = LE.Keep;
17914
17914
  break;
17915
17915
  case 0:
17916
17916
  t = LE.Zero;
17917
17917
  break;
17918
- case de:
17918
+ case me:
17919
17919
  t = LE.Replace;
17920
17920
  break;
17921
- case fe:
17921
+ case he:
17922
17922
  t = LE.Invert;
17923
17923
  break;
17924
- case _n:
17924
+ case at:
17925
17925
  t = LE.IncrementClamp;
17926
17926
  break;
17927
- case ke:
17927
+ case ze:
17928
17928
  t = LE.DecrementClamp;
17929
17929
  break;
17930
- case nt:
17930
+ case gn:
17931
17931
  t = LE.IncrementWrap;
17932
17932
  break;
17933
- case Ie:
17933
+ case b:
17934
17934
  t = LE.DecrementWrap;
17935
17935
  break;
17936
- default: C("WebGPURenderer: Invalid stencil operation.", t);
17936
+ default: y("WebGPURenderer: Invalid stencil operation.", t);
17937
17937
  }
17938
17938
  return t;
17939
17939
  }
@@ -17955,7 +17955,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
17955
17955
  case 104:
17956
17956
  t = FE.Max;
17957
17957
  break;
17958
- default: C("WebGPUPipelineUtils: Blend equation not supported.", e);
17958
+ default: y("WebGPUPipelineUtils: Blend equation not supported.", e);
17959
17959
  }
17960
17960
  return t;
17961
17961
  }
@@ -17972,7 +17972,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
17972
17972
  let t;
17973
17973
  if (e.depthTest === !1) t = DE.Always;
17974
17974
  else {
17975
- let n = this.backend.parameters.reversedDepthBuffer ? pe[e.depthFunc] : e.depthFunc;
17975
+ let n = this.backend.parameters.reversedDepthBuffer ? ye[e.depthFunc] : e.depthFunc;
17976
17976
  switch (n) {
17977
17977
  case 0:
17978
17978
  t = DE.Never;
@@ -17998,7 +17998,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
17998
17998
  case 7:
17999
17999
  t = DE.NotEqual;
18000
18000
  break;
18001
- default: C("WebGPUPipelineUtils: Invalid depth function.", n);
18001
+ default: y("WebGPUPipelineUtils: Invalid depth function.", n);
18002
18002
  }
18003
18003
  }
18004
18004
  return t;
@@ -18023,7 +18023,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
18023
18023
  }
18024
18024
  allocateQueriesForContext(e) {
18025
18025
  if (!this.trackTimestamp || this.isDisposed) return null;
18026
- if (this.currentQueryIndex + 2 > this.maxQueries) return Ae(`WebGPUTimestampQueryPool [${this.type}]: Maximum number of queries exceeded, when using trackTimestamp it is necessary to resolves the queries via renderer.resolveTimestampsAsync( THREE.TimestampQuery.${this.type.toUpperCase()} ).`), null;
18026
+ if (this.currentQueryIndex + 2 > this.maxQueries) return Be(`WebGPUTimestampQueryPool [${this.type}]: Maximum number of queries exceeded, when using trackTimestamp it is necessary to resolves the queries via renderer.resolveTimestampsAsync( THREE.TimestampQuery.${this.type.toUpperCase()} ).`), null;
18027
18027
  let t = this.currentQueryIndex;
18028
18028
  return this.currentQueryIndex += 2, this.queryOffsets.set(e, t), t;
18029
18029
  }
@@ -18058,7 +18058,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
18058
18058
  let c = o[s[s.length - 1]];
18059
18059
  return this.resultBuffer.unmap(), this.lastValue = c, this.frames = s, c;
18060
18060
  } catch (e) {
18061
- return C("Error resolving queries:", e), this.resultBuffer.mapState === "mapped" && this.resultBuffer.unmap(), this.lastValue;
18061
+ return y("Error resolving queries:", e), this.resultBuffer.mapState === "mapped" && this.resultBuffer.unmap(), this.lastValue;
18062
18062
  }
18063
18063
  }
18064
18064
  async dispose() {
@@ -18066,12 +18066,12 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
18066
18066
  if (this.isDisposed = !0, this.pendingResolve) try {
18067
18067
  await this.pendingResolve;
18068
18068
  } catch (e) {
18069
- C("Error waiting for pending resolve:", e);
18069
+ y("Error waiting for pending resolve:", e);
18070
18070
  }
18071
18071
  if (this.resultBuffer && this.resultBuffer.mapState === "mapped") try {
18072
18072
  this.resultBuffer.unmap();
18073
18073
  } catch (e) {
18074
- C("Error unmapping buffer:", e);
18074
+ y("Error unmapping buffer:", e);
18075
18075
  }
18076
18076
  this.querySet &&= (this.querySet.destroy(), null), this.resolveBuffer &&= (this.resolveBuffer.destroy(), null), this.resultBuffer &&= (this.resultBuffer.destroy(), null), this.queryOffsets.clear(), this.pendingResolve = null;
18077
18077
  }
@@ -18085,7 +18085,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
18085
18085
  constructor(e = {}) {
18086
18086
  super(e), this.isWebGPUBackend = !0, this.parameters.alpha = e.alpha === void 0 ? !0 : e.alpha, this.parameters.requiredLimits = e.requiredLimits === void 0 ? {} : e.requiredLimits, this.compatibilityMode = null, this.device = null, this.defaultRenderPassdescriptor = null, this.utils = new bD(this), this.attributeUtils = new wD(this), this.bindingUtils = new ED(this), this.capabilities = new DD(this), this.pipelineUtils = new OD(this), this.textureUtils = new tD(this), this.occludedResolveCache = /* @__PURE__ */ new Map();
18087
18087
  let t = typeof navigator > "u" ? !0 : /Android/.test(navigator.userAgent) === !1;
18088
- this._compatibility = { [f.TEXTURE_COMPARE]: t };
18088
+ this._compatibility = { [p.TEXTURE_COMPARE]: t };
18089
18089
  }
18090
18090
  async init(e) {
18091
18091
  await super.init(e);
@@ -18132,7 +18132,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
18132
18132
  return n;
18133
18133
  }
18134
18134
  get coordinateSystem() {
18135
- return p;
18135
+ return m;
18136
18136
  }
18137
18137
  async getArrayBufferAsync(e, t = null, n = 0, r = -1) {
18138
18138
  return await this.attributeUtils.getArrayBufferAsync(e, t, n, r);
@@ -18227,7 +18227,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
18227
18227
  label: `occlusionQuerySet_${e.id}`
18228
18228
  }), t.occlusionQuerySet = i, t.occlusionQueryIndex = 0, t.occlusionQueryObjects = Array(r), t.lastOcclusionObject = null);
18229
18229
  let a;
18230
- a = e.textures === null ? this._getDefaultRenderPassDescriptor() : this._getRenderPassDescriptor(e, { loadOp: kE.Load }), this.initTimestampQuery(Xt.RENDER, this.getTimestampUID(e), a), a.occlusionQuerySet = i;
18230
+ a = e.textures === null ? this._getDefaultRenderPassDescriptor() : this._getRenderPassDescriptor(e, { loadOp: kE.Load }), this.initTimestampQuery(ot.RENDER, this.getTimestampUID(e), a), a.occlusionQuerySet = i;
18231
18231
  let o = a.depthStencilAttachment;
18232
18232
  if (e.textures !== null) {
18233
18233
  let t = a.colorAttachments;
@@ -18403,7 +18403,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
18403
18403
  }
18404
18404
  beginCompute(e) {
18405
18405
  let t = this.get(e), n = { label: "computeGroup_" + e.id };
18406
- this.initTimestampQuery(Xt.COMPUTE, this.getTimestampUID(e), n), t.cmdEncoderGPU = this.device.createCommandEncoder({ label: "computeGroup_" + e.id }), t.passEncoderGPU = t.cmdEncoderGPU.beginComputePass(n);
18406
+ this.initTimestampQuery(ot.COMPUTE, this.getTimestampUID(e), n), t.cmdEncoderGPU = this.device.createCommandEncoder({ label: "computeGroup_" + e.id }), t.passEncoderGPU = t.cmdEncoderGPU.beginComputePass(n);
18407
18407
  }
18408
18408
  compute(e, t, n, r, i = null) {
18409
18409
  let a = this.get(t), { passEncoderGPU: o } = this.get(e), s = this.get(r).pipeline;
@@ -18702,7 +18702,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
18702
18702
  i = t.renderTarget ? e.isDepthTexture ? this.get(t.depthTexture).texture : this.get(t.textures[0]).texture : e.isDepthTexture ? this.textureUtils.getDepthBuffer(t.depth, t.stencil) : this.context.getCurrentTexture();
18703
18703
  let a = this.get(e).texture;
18704
18704
  if (i.format !== a.format) {
18705
- C("WebGPUBackend: copyFramebufferToTexture: Source and destination formats do not match.", i.format, a.format);
18705
+ y("WebGPUBackend: copyFramebufferToTexture: Source and destination formats do not match.", i.format, a.format);
18706
18706
  return;
18707
18707
  }
18708
18708
  let o;
@@ -18735,14 +18735,14 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
18735
18735
  if (this.timestampQueryPool) for (let e of Object.values(this.timestampQueryPool)) e !== null && e.dispose();
18736
18736
  this.parameters.device === void 0 && this.device !== null && this.device.destroy();
18737
18737
  }
18738
- }, MD = class extends en {
18738
+ }, MD = class extends Bt {
18739
18739
  constructor(e, t, n, r, i, a) {
18740
18740
  super(e, t, n, r, i, a), this.iesMap = null;
18741
18741
  }
18742
18742
  copy(e, t) {
18743
18743
  return super.copy(e, t), this.iesMap = e.iesMap, this;
18744
18744
  }
18745
- }, ND = class extends en {
18745
+ }, ND = class extends Bt {
18746
18746
  constructor(e, t, n, r, i, a) {
18747
18747
  super(e, t, n, r, i, a), this.aspect = null;
18748
18748
  }
@@ -18751,12 +18751,12 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
18751
18751
  }
18752
18752
  }, PD = class extends iT {
18753
18753
  constructor() {
18754
- super(), this.addMaterial(qp, "MeshPhongMaterial"), this.addMaterial(Yh, "MeshStandardMaterial"), this.addMaterial(Zh, "MeshPhysicalMaterial"), this.addMaterial(tg, "MeshToonMaterial"), this.addMaterial(Lp, "MeshBasicMaterial"), this.addMaterial(Gp, "MeshLambertMaterial"), this.addMaterial(Cp, "MeshNormalMaterial"), this.addMaterial(ig, "MeshMatcapMaterial"), this.addMaterial(yp, "LineBasicMaterial"), this.addMaterial(xp, "LineDashedMaterial"), this.addMaterial(dg, "PointsMaterial"), this.addMaterial(cg, "SpriteMaterial"), this.addMaterial(hg, "ShadowMaterial"), this.addLight(pS, n), this.addLight(jw, ze), this.addLight(Vw, d), this.addLight(Nw, en), this.addLight(Aw, Mt), this.addLight(Mw, _t), this.addLight(Fw, ce), this.addLight(Pw, MD), this.addLight(Lw, ND), this.addToneMapping(Iy, 1), this.addToneMapping(Ly, 2), this.addToneMapping(Ry, 3), this.addToneMapping(By, 4), this.addToneMapping(Wy, 6), this.addToneMapping(Gy, 7);
18754
+ super(), this.addMaterial(qp, "MeshPhongMaterial"), this.addMaterial(Yh, "MeshStandardMaterial"), this.addMaterial(Zh, "MeshPhysicalMaterial"), this.addMaterial(tg, "MeshToonMaterial"), this.addMaterial(Lp, "MeshBasicMaterial"), this.addMaterial(Gp, "MeshLambertMaterial"), this.addMaterial(Cp, "MeshNormalMaterial"), this.addMaterial(ig, "MeshMatcapMaterial"), this.addMaterial(yp, "LineBasicMaterial"), this.addMaterial(xp, "LineDashedMaterial"), this.addMaterial(dg, "PointsMaterial"), this.addMaterial(cg, "SpriteMaterial"), this.addMaterial(hg, "ShadowMaterial"), this.addLight(pS, At), this.addLight(jw, Ye), this.addLight(Vw, ve), this.addLight(Nw, Bt), this.addLight(Aw, zt), this.addLight(Mw, bt), this.addLight(Fw, De), this.addLight(Pw, MD), this.addLight(Lw, ND), this.addToneMapping(Iy, 1), this.addToneMapping(Ly, 2), this.addToneMapping(Ry, 3), this.addToneMapping(By, 4), this.addToneMapping(Wy, 6), this.addToneMapping(Gy, 7);
18755
18755
  }
18756
18756
  }, FD = class extends AT {
18757
18757
  constructor(e = {}) {
18758
18758
  let t;
18759
- e.forceWebGL ? t = wE : (t = jD, e.getFallback = () => (v("WebGPURenderer: WebGPU is not available, running under WebGL2 backend."), new wE(e)));
18759
+ e.forceWebGL ? t = wE : (t = jD, e.getFallback = () => (w("WebGPURenderer: WebGPU is not available, running under WebGL2 backend."), new wE(e)));
18760
18760
  let n = new t(e);
18761
18761
  super(n, e), this.library = new PD(), this.isWebGPURenderer = !0, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
18762
18762
  }
@@ -18770,7 +18770,7 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
18770
18770
  let e = this.renderer;
18771
18771
  this._update(), this._context.onBeforeRenderPipeline !== null && this._context.onBeforeRenderPipeline();
18772
18772
  let t = e.toneMapping, n = e.outputColorSpace;
18773
- e.toneMapping = 0, e.outputColorSpace = Ee.workingColorSpace;
18773
+ e.toneMapping = 0, e.outputColorSpace = g.workingColorSpace;
18774
18774
  let r = e.xr.enabled;
18775
18775
  e.xr.enabled = !1, this._quadMesh.render(e), e.xr.enabled = r, e.toneMapping = t, e.outputColorSpace = n, this._context.onAfterRenderPipeline !== null && this._context.onAfterRenderPipeline();
18776
18776
  }
@@ -18791,10 +18791,10 @@ var SD = new Map([[$e, ["float16"]]]), CD = new Map([
18791
18791
  }
18792
18792
  }
18793
18793
  async renderAsync() {
18794
- Ae("RenderPipeline: \"renderAsync()\" has been deprecated. Use \"render()\" and \"await renderer.init();\" when creating the renderer."), await this.renderer.init(), this.render();
18794
+ Be("RenderPipeline: \"renderAsync()\" has been deprecated. Use \"render()\" and \"await renderer.init();\" when creating the renderer."), await this.renderer.init(), this.render();
18795
18795
  }
18796
18796
  };
18797
18797
  //#endregion
18798
18798
  export { sf as $, I_ as $n, e_ as $t, tr as A, Nw as An, qn as At, $l as B, a_ as Bn, Gn as Bt, Ky as C, Wc as Cn, qp as Ct, ts as D, hg as Dn, Ml as Dt, Zs as E, Yx as En, tg as Et, jw as F, qv as Fn, Ec as Ft, Yw as G, oy as Gn, ew as Gt, Zy as H, Z as Hn, QC as Ht, Gh as I, af as In, Ow as It, Pw as J, Ns as Jn, da as Jt, Mw as K, Oc as Kn, ud as Kt, Rv as L, Kv as Ln, kw as Lt, Tp as M, n_ as Mn, Dw as Mt, wu as N, On as Nn, rw as Nt, ur as O, mf as On, Tf as Ot, pc as P, nf as Pn, tw as Pt, gc as Q, ra as Qn, M_ as Qt, sc as R, ny as Rn, _p as Rt, ep as S, Iv as Sn, Cp as St, ub as T, Sx as Tn, Yh as Tt, U_ as U, GC as Un, T as Ut, ca as V, hs as Vn, Kn as Vt, tE as W, nr as Wn, $C as Wt, cr as X, Rc as Xn, Oh as Xt, Ws as Y, Py as Yn, c_ as Yt, hc as Z, Qi as Zn, Bh as Zt, Fc as _, dc as _n, Zn as _r, wc as _t, ia as a, Xv as an, Vf as ar, sT as at, rc as b, Nx as bn, Gp as bt, yc as c, Lw as cn, Nf as cr, Df as ct, Np as d, Ov as dn, jD as dr, xp as dt, Ay as en, uy as er, lf as et, df as f, cb as fn, FD as fr, _f as ft, Rs as g, xv as gn, Xn as gr, K as gt, u_ as h, ku as hn, Jn as hr, Mu as ht, er as i, cS as in, cp as ir, Fw as it, Dp as j, cg as jn, ZC as jt, rs as k, ar as kn, E as kt, _b as l, B as ln, wE as lr, bx as lt, C_ as m, ks as mn, Yn as mr, X as mt, Aw as n, Hm as nn, _s as nr, ec as nt, oa as o, dg as on, zf as or, kf as ot, g_ as p, Vw as pn, Cb as pr, m_ as pt, MD as q, Sc as qn, Tl as qt, uS as r, pS as rn, py as rr, rr as rt, Tb as s, ND as sn, Ty as sr, Pp as st, Of as t, Up as tn, us as tr, jf as tt, Mp as u, Ev as un, yE as ur, yp as ut, Bc as v, ID as vn, dr as vt, ws as w, or as wn, Zh as wt, xT as x, ag as xn, ig as xt, md as y, js as yn, Lp as yt, sr as z, o_ as zn, Tn as zt };
18799
18799
 
18800
- //# sourceMappingURL=three.webgpu-C8myBXe1.mjs.map
18800
+ //# sourceMappingURL=three.webgpu-CkP2nkXM.mjs.map