shaders 2.0.673 → 2.0.674

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 (124) hide show
  1. package/dist/react/components/FloatingParticles.d.ts +29 -0
  2. package/dist/react/components/FloatingParticles.d.ts.map +1 -0
  3. package/dist/react/engine/Shader.d.ts.map +1 -1
  4. package/dist/react/index.cjs +21 -21
  5. package/dist/react/index.cjs.map +1 -1
  6. package/dist/react/index.d.ts +1 -0
  7. package/dist/react/index.d.ts.map +1 -1
  8. package/dist/react/index.js +317 -315
  9. package/dist/react/index.js.map +1 -1
  10. package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
  11. package/dist/svelte/engine/Shader.svelte +9 -10
  12. package/dist/vue/components/AngularBlur.vue.d.ts.map +1 -1
  13. package/dist/vue/components/Ascii.vue.d.ts.map +1 -1
  14. package/dist/vue/components/Blob.vue.d.ts.map +1 -1
  15. package/dist/vue/components/Blur.vue.d.ts.map +1 -1
  16. package/dist/vue/components/Bulge.vue.d.ts.map +1 -1
  17. package/dist/vue/components/CRTScreen.vue.d.ts.map +1 -1
  18. package/dist/vue/components/Checkerboard.vue.d.ts.map +1 -1
  19. package/dist/vue/components/ChromaFlow.vue.d.ts.map +1 -1
  20. package/dist/vue/components/ChromaticAberration.vue.d.ts.map +1 -1
  21. package/dist/vue/components/Circle.vue.d.ts.map +1 -1
  22. package/dist/vue/components/ColorMapping.vue.d.ts.map +1 -1
  23. package/dist/vue/components/Dither.vue.d.ts.map +1 -1
  24. package/dist/vue/components/DotGrid.vue.d.ts.map +1 -1
  25. package/dist/vue/components/Duotone.vue.d.ts.map +1 -1
  26. package/dist/vue/components/Exposure.vue.d.ts.map +1 -1
  27. package/dist/vue/components/FilmGrain.vue.d.ts.map +1 -1
  28. package/dist/vue/components/FloatingParticles.vue.d.ts.map +1 -1
  29. package/dist/vue/components/GlassTiles.vue.d.ts.map +1 -1
  30. package/dist/vue/components/Glitch.vue.d.ts.map +1 -1
  31. package/dist/vue/components/Glow.vue.d.ts.map +1 -1
  32. package/dist/vue/components/Godrays.vue.d.ts.map +1 -1
  33. package/dist/vue/components/Grayscale.vue.d.ts.map +1 -1
  34. package/dist/vue/components/Grid.vue.d.ts.map +1 -1
  35. package/dist/vue/components/GridDistortion.vue.d.ts.map +1 -1
  36. package/dist/vue/components/Group.vue.d.ts.map +1 -1
  37. package/dist/vue/components/HalfTone.vue.d.ts.map +1 -1
  38. package/dist/vue/components/HueShift.vue.d.ts.map +1 -1
  39. package/dist/vue/components/ImageTexture.vue.d.ts.map +1 -1
  40. package/dist/vue/components/Invert.vue.d.ts.map +1 -1
  41. package/dist/vue/components/LinearBlur.vue.d.ts.map +1 -1
  42. package/dist/vue/components/LinearGradient.vue.d.ts.map +1 -1
  43. package/dist/vue/components/Liquify.vue.d.ts.map +1 -1
  44. package/dist/vue/components/Mirror.vue.d.ts.map +1 -1
  45. package/dist/vue/components/PerlinNoise.vue.d.ts.map +1 -1
  46. package/dist/vue/components/Pixelate.vue.d.ts.map +1 -1
  47. package/dist/vue/components/Posterize.vue.d.ts.map +1 -1
  48. package/dist/vue/components/ProgressiveBlur.vue.d.ts.map +1 -1
  49. package/dist/vue/components/RadialBlur.vue.d.ts.map +1 -1
  50. package/dist/vue/components/RadialGradient.vue.d.ts.map +1 -1
  51. package/dist/vue/components/Ripples.vue.d.ts.map +1 -1
  52. package/dist/vue/components/Saturation.vue.d.ts.map +1 -1
  53. package/dist/vue/components/SimplexNoise.vue.d.ts.map +1 -1
  54. package/dist/vue/components/SineWave.vue.d.ts.map +1 -1
  55. package/dist/vue/components/SolidColor.vue.d.ts.map +1 -1
  56. package/dist/vue/components/Spiral.vue.d.ts.map +1 -1
  57. package/dist/vue/components/Stretch.vue.d.ts.map +1 -1
  58. package/dist/vue/components/Swirl.vue.d.ts.map +1 -1
  59. package/dist/vue/components/TiltShift.vue.d.ts.map +1 -1
  60. package/dist/vue/components/Tint.vue.d.ts.map +1 -1
  61. package/dist/vue/components/Twirl.vue.d.ts.map +1 -1
  62. package/dist/vue/components/VCR.vue.d.ts.map +1 -1
  63. package/dist/vue/components/Vibrance.vue.d.ts.map +1 -1
  64. package/dist/vue/components/Vignette.vue.d.ts.map +1 -1
  65. package/dist/vue/components/Voronoi.vue.d.ts.map +1 -1
  66. package/dist/vue/engine/Shader.vue.d.ts.map +1 -1
  67. package/dist/vue/index100.js +4 -4
  68. package/dist/vue/index102.js +4 -4
  69. package/dist/vue/index104.js +4 -4
  70. package/dist/vue/index106.js +4 -4
  71. package/dist/vue/index108.js +4 -4
  72. package/dist/vue/index110.js +4 -4
  73. package/dist/vue/index112.js +4 -4
  74. package/dist/vue/index114.js +4 -4
  75. package/dist/vue/index116.js +4 -4
  76. package/dist/vue/index118.js +4 -4
  77. package/dist/vue/index120.js +4 -4
  78. package/dist/vue/index122.js +4 -4
  79. package/dist/vue/index124.js +4 -4
  80. package/dist/vue/index126.js +4 -4
  81. package/dist/vue/index128.js +4 -4
  82. package/dist/vue/index130.js +4 -4
  83. package/dist/vue/index132.js +4 -4
  84. package/dist/vue/index134.js +4 -4
  85. package/dist/vue/index136.js +4 -4
  86. package/dist/vue/index138.js +4 -4
  87. package/dist/vue/index140.js +4 -4
  88. package/dist/vue/index142.js +4 -4
  89. package/dist/vue/index144.js +4 -4
  90. package/dist/vue/index146.js +4 -4
  91. package/dist/vue/index148.js +4 -4
  92. package/dist/vue/index150.js +4 -4
  93. package/dist/vue/index152.js +4 -4
  94. package/dist/vue/index154.js +4 -4
  95. package/dist/vue/index156.js +4 -4
  96. package/dist/vue/index158.js +4 -4
  97. package/dist/vue/index160.js +4 -4
  98. package/dist/vue/index162.js +4 -4
  99. package/dist/vue/index164.js +4 -4
  100. package/dist/vue/index166.js +4 -4
  101. package/dist/vue/index168.js +4 -4
  102. package/dist/vue/index172.js +4 -4
  103. package/dist/vue/index61.js +157 -155
  104. package/dist/vue/index62.js +4 -4
  105. package/dist/vue/index64.js +4 -4
  106. package/dist/vue/index66.js +4 -4
  107. package/dist/vue/index68.js +4 -4
  108. package/dist/vue/index70.js +4 -4
  109. package/dist/vue/index72.js +4 -4
  110. package/dist/vue/index74.js +4 -4
  111. package/dist/vue/index76.js +4 -4
  112. package/dist/vue/index78.js +4 -4
  113. package/dist/vue/index80.js +4 -4
  114. package/dist/vue/index82.js +4 -4
  115. package/dist/vue/index84.js +4 -4
  116. package/dist/vue/index86.js +4 -4
  117. package/dist/vue/index88.js +4 -4
  118. package/dist/vue/index90.js +4 -4
  119. package/dist/vue/index92.js +4 -4
  120. package/dist/vue/index94.js +4 -4
  121. package/dist/vue/index96.js +4 -4
  122. package/dist/vue/index98.js +4 -4
  123. package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
  124. package/package.json +1 -1
@@ -14,7 +14,7 @@ var DL = Object.defineProperty, $L = (t, e) => {
14
14
  * Copyright 2010-2025 Three.js Authors
15
15
  * SPDX-License-Identifier: MIT
16
16
  */
17
- const yc = 1e3, _o = 1001, xc = 1002, Hr = 1003, BN = 1004, Jd = 1005, ys = 1006, Xx = 1007, Na = 1008, Oi = 1009, Pd = 1010, Id = 1011, Hh = 1012, Pi = 1013, fr = 1014, hs = 1015, Ui = 1016, Ro = 1020, kN = 35902, T1 = 1022, Rs = 1023, Vn = 1026, Aa = 1027, w1 = 1028, S1 = 1029, wl = 1030, M1 = 1031, _1 = 1033, Gy = 33776, Pf = 33777, If = 33778, Of = 33779, bw = 35840, vw = 35841, Tw = 35842, ww = 35843, Sw = 36196, Yx = 37492, Zx = 37496, Jx = 37808, Qx = 37809, Kx = 37810, eb = 37811, tb = 37812, rb = 37813, ib = 37814, sb = 37815, nb = 37816, ab = 37817, ob = 37818, lb = 37819, ub = 37820, hb = 37821, jy = 36492, Mw = 36284, _w = 36285, Nw = 36286, ki = "srgb", Nl = "srgb-linear", Qf = "linear", De = "srgb", ml = 7680, Kf = 35044, Xh = 35048, Di = 2e3, $n = 2001;
17
+ const yc = 1e3, _o = 1001, xc = 1002, Hr = 1003, BN = 1004, Jd = 1005, ys = 1006, Xx = 1007, Na = 1008, Oi = 1009, Pd = 1010, Id = 1011, Hh = 1012, Pi = 1013, gr = 1014, hs = 1015, Ui = 1016, Ro = 1020, kN = 35902, T1 = 1022, Rs = 1023, Vn = 1026, Aa = 1027, w1 = 1028, S1 = 1029, wl = 1030, M1 = 1031, _1 = 1033, Gy = 33776, Pf = 33777, If = 33778, Of = 33779, bw = 35840, vw = 35841, Tw = 35842, ww = 35843, Sw = 36196, Yx = 37492, Zx = 37496, Jx = 37808, Qx = 37809, Kx = 37810, eb = 37811, tb = 37812, rb = 37813, ib = 37814, sb = 37815, nb = 37816, ab = 37817, ob = 37818, lb = 37819, ub = 37820, hb = 37821, jy = 36492, Mw = 36284, _w = 36285, Nw = 36286, ki = "srgb", Nl = "srgb-linear", Qf = "linear", De = "srgb", ml = 7680, Kf = 35044, Xh = 35048, Di = 2e3, $n = 2001;
18
18
  var jo = class {
19
19
  addEventListener(e, r) {
20
20
  this._listeners === void 0 && (this._listeners = {});
@@ -4390,7 +4390,7 @@ var BF = class i2 {
4390
4390
  }), this.isFramebufferTexture = !0, this.magFilter = Hr, this.minFilter = Hr, this.generateMipmaps = !1, this.needsUpdate = !0;
4391
4391
  }
4392
4392
  }, yn = class extends Vs {
4393
- constructor(e, r, i = fr, s, n, a, o = Hr, l = Hr, h, u = Vn, c = 1) {
4393
+ constructor(e, r, i = gr, s, n, a, o = Hr, l = Hr, h, u = Vn, c = 1) {
4394
4394
  if (u !== Vn && u !== Aa) throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
4395
4395
  let d = {
4396
4396
  width: e,
@@ -6018,7 +6018,7 @@ const $z = {
6018
6018
  ">=": "greaterThanEqual",
6019
6019
  "%": "mod"
6020
6020
  };
6021
- var Sr = class bb extends cr {
6021
+ var Mr = class bb extends cr {
6022
6022
  static get type() {
6023
6023
  return "OperatorNode";
6024
6024
  }
@@ -6079,14 +6079,14 @@ var Sr = class bb extends cr {
6079
6079
  super.deserialize(e), this.op = e.op;
6080
6080
  }
6081
6081
  };
6082
- const Tr = /* @__PURE__ */ ee(Sr, "+").setParameterLength(2, 1 / 0).setName("add"), nt = /* @__PURE__ */ ee(Sr, "-").setParameterLength(2, 1 / 0).setName("sub"), $e = /* @__PURE__ */ ee(Sr, "*").setParameterLength(2, 1 / 0).setName("mul"), zs = /* @__PURE__ */ ee(Sr, "/").setParameterLength(2, 1 / 0).setName("div"), Tm = /* @__PURE__ */ ee(Sr, "%").setParameterLength(2).setName("mod"), q1 = /* @__PURE__ */ ee(Sr, "==").setParameterLength(2).setName("equal"), $2 = /* @__PURE__ */ ee(Sr, "!=").setParameterLength(2).setName("notEqual"), G2 = /* @__PURE__ */ ee(Sr, "<").setParameterLength(2).setName("lessThan"), H1 = /* @__PURE__ */ ee(Sr, ">").setParameterLength(2).setName("greaterThan"), j2 = /* @__PURE__ */ ee(Sr, "<=").setParameterLength(2).setName("lessThanEqual"), W2 = /* @__PURE__ */ ee(Sr, ">=").setParameterLength(2).setName("greaterThanEqual"), q2 = /* @__PURE__ */ ee(Sr, "&&").setParameterLength(2, 1 / 0).setName("and"), H2 = /* @__PURE__ */ ee(Sr, "||").setParameterLength(2, 1 / 0).setName("or"), X2 = /* @__PURE__ */ ee(Sr, "!").setParameterLength(1).setName("not"), Y2 = /* @__PURE__ */ ee(Sr, "^^").setParameterLength(2).setName("xor"), Z2 = /* @__PURE__ */ ee(Sr, "&").setParameterLength(2).setName("bitAnd"), J2 = /* @__PURE__ */ ee(Sr, "~").setParameterLength(2).setName("bitNot"), Q2 = /* @__PURE__ */ ee(Sr, "|").setParameterLength(2).setName("bitOr"), K2 = /* @__PURE__ */ ee(Sr, "^").setParameterLength(2).setName("bitXor"), eA = /* @__PURE__ */ ee(Sr, "<<").setParameterLength(2).setName("shiftLeft"), tA = /* @__PURE__ */ ee(Sr, ">>").setParameterLength(2).setName("shiftRight"), rA = V(([t]) => (t.addAssign(1), t)), iA = V(([t]) => (t.subAssign(1), t)), sA = /* @__PURE__ */ V(([t]) => {
6082
+ const wr = /* @__PURE__ */ ee(Mr, "+").setParameterLength(2, 1 / 0).setName("add"), nt = /* @__PURE__ */ ee(Mr, "-").setParameterLength(2, 1 / 0).setName("sub"), $e = /* @__PURE__ */ ee(Mr, "*").setParameterLength(2, 1 / 0).setName("mul"), zs = /* @__PURE__ */ ee(Mr, "/").setParameterLength(2, 1 / 0).setName("div"), Tm = /* @__PURE__ */ ee(Mr, "%").setParameterLength(2).setName("mod"), q1 = /* @__PURE__ */ ee(Mr, "==").setParameterLength(2).setName("equal"), $2 = /* @__PURE__ */ ee(Mr, "!=").setParameterLength(2).setName("notEqual"), G2 = /* @__PURE__ */ ee(Mr, "<").setParameterLength(2).setName("lessThan"), H1 = /* @__PURE__ */ ee(Mr, ">").setParameterLength(2).setName("greaterThan"), j2 = /* @__PURE__ */ ee(Mr, "<=").setParameterLength(2).setName("lessThanEqual"), W2 = /* @__PURE__ */ ee(Mr, ">=").setParameterLength(2).setName("greaterThanEqual"), q2 = /* @__PURE__ */ ee(Mr, "&&").setParameterLength(2, 1 / 0).setName("and"), H2 = /* @__PURE__ */ ee(Mr, "||").setParameterLength(2, 1 / 0).setName("or"), X2 = /* @__PURE__ */ ee(Mr, "!").setParameterLength(1).setName("not"), Y2 = /* @__PURE__ */ ee(Mr, "^^").setParameterLength(2).setName("xor"), Z2 = /* @__PURE__ */ ee(Mr, "&").setParameterLength(2).setName("bitAnd"), J2 = /* @__PURE__ */ ee(Mr, "~").setParameterLength(2).setName("bitNot"), Q2 = /* @__PURE__ */ ee(Mr, "|").setParameterLength(2).setName("bitOr"), K2 = /* @__PURE__ */ ee(Mr, "^").setParameterLength(2).setName("bitXor"), eA = /* @__PURE__ */ ee(Mr, "<<").setParameterLength(2).setName("shiftLeft"), tA = /* @__PURE__ */ ee(Mr, ">>").setParameterLength(2).setName("shiftRight"), rA = V(([t]) => (t.addAssign(1), t)), iA = V(([t]) => (t.subAssign(1), t)), sA = /* @__PURE__ */ V(([t]) => {
6083
6083
  let e = C(t).toConst();
6084
6084
  return t.addAssign(1), e;
6085
6085
  }), nA = /* @__PURE__ */ V(([t]) => {
6086
6086
  let e = C(t).toConst();
6087
6087
  return t.subAssign(1), e;
6088
6088
  });
6089
- q("add", Tr), q("sub", nt), q("mul", $e), q("div", zs), q("mod", Tm), q("equal", q1), q("notEqual", $2), q("lessThan", G2), q("greaterThan", H1), q("lessThanEqual", j2), q("greaterThanEqual", W2), q("and", q2), q("or", H2), q("not", X2), q("xor", Y2), q("bitAnd", Z2), q("bitNot", J2), q("bitOr", Q2), q("bitXor", K2), q("shiftLeft", eA), q("shiftRight", tA), q("incrementBefore", rA), q("decrementBefore", iA), q("increment", sA), q("decrement", nA);
6089
+ q("add", wr), q("sub", nt), q("mul", $e), q("div", zs), q("mod", Tm), q("equal", q1), q("notEqual", $2), q("lessThan", G2), q("greaterThan", H1), q("lessThanEqual", j2), q("greaterThanEqual", W2), q("and", q2), q("or", H2), q("not", X2), q("xor", Y2), q("bitAnd", Z2), q("bitNot", J2), q("bitOr", Q2), q("bitXor", K2), q("shiftLeft", eA), q("shiftRight", tA), q("incrementBefore", rA), q("decrementBefore", iA), q("increment", sA), q("decrement", nA);
6090
6090
  const aA = (t, e) => (console.warn('THREE.TSL: "remainder()" is deprecated. Use "mod( int( ... ) )" instead.'), Tm(t, e)), oA = (t, e) => (console.warn('THREE.TSL: "modInt()" is deprecated. Use "mod( int( ... ) )" instead.'), Tm(C(t), C(e)));
6091
6091
  q("remainder", aA), q("modInt", oA);
6092
6092
  var D = class Dt extends cr {
@@ -6726,7 +6726,7 @@ var Xn = class extends vm {
6726
6726
  return this.value.uuid;
6727
6727
  }
6728
6728
  getNodeType() {
6729
- return this.value.isDepthTexture === !0 ? "float" : this.value.type === fr ? "uvec4" : this.value.type === Pi ? "ivec4" : "vec4";
6729
+ return this.value.isDepthTexture === !0 ? "float" : this.value.type === gr ? "uvec4" : this.value.type === Pi ? "ivec4" : "vec4";
6730
6730
  }
6731
6731
  getInputType() {
6732
6732
  return "texture";
@@ -7007,7 +7007,7 @@ var Bs = class extends qr {
7007
7007
  const NB = /* @__PURE__ */ me(Bs, Bs.DIRECTION), Ps = /* @__PURE__ */ me(Bs, Bs.WORLD_MATRIX), AB = /* @__PURE__ */ me(Bs, Bs.POSITION), EB = /* @__PURE__ */ me(Bs, Bs.SCALE), CB = /* @__PURE__ */ me(Bs, Bs.VIEW_POSITION), RB = /* @__PURE__ */ me(Bs, Bs.RADIUS), lE = /* @__PURE__ */ _e(new Gs()).onObjectUpdate(({ object: t }, e) => e.value.getNormalMatrix(t.matrixWorld)), PB = /* @__PURE__ */ _e(new ft()).onObjectUpdate(({ object: t }, e) => e.value.copy(t.matrixWorld).invert()), Hu = /* @__PURE__ */ V((t) => t.renderer.overrideNodes.modelViewMatrix || uE).once()().toVar("modelViewMatrix"), uE = /* @__PURE__ */ Hi.mul(Ps), Tb = /* @__PURE__ */ V((t) => (t.context.isHighPrecisionModelViewMatrix = !0, _e("mat4").onObjectUpdate(({ object: e, camera: r }) => e.modelViewMatrix.multiplyMatrices(r.matrixWorldInverse, e.matrixWorld)))).once()().toVar("highpModelViewMatrix"), wb = /* @__PURE__ */ V((t) => {
7008
7008
  let e = t.context.isHighPrecisionModelViewMatrix;
7009
7009
  return _e("mat3").onObjectUpdate(({ object: r, camera: i }) => (e !== !0 && r.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse, r.matrixWorld), r.normalMatrix.getNormalMatrix(r.modelViewMatrix)));
7010
- }).once()().toVar("highpModelNormalViewMatrix"), _m = /* @__PURE__ */ ka("position", "vec3"), ur = /* @__PURE__ */ _m.toVarying("positionLocal"), ug = /* @__PURE__ */ _m.toVarying("positionPrevious"), Ra = /* @__PURE__ */ V((t) => Ps.mul(ur).xyz.toVarying(t.getNamespace("v_positionWorld")), "vec3").once("POSITION")(), cv = /* @__PURE__ */ V((t) => ur.transformDirection(Ps).toVarying(t.getNamespace("v_positionWorldDirection")).normalize().toVar("positionWorldDirection"), "vec3").once("POSITION")(), yr = /* @__PURE__ */ V((t) => t.context.setupPositionView().toVarying(t.getNamespace("v_positionView")), "vec3").once("POSITION")(), Wt = /* @__PURE__ */ yr.negate().toVarying("v_positionViewDirection").normalize().toVar("positionViewDirection");
7010
+ }).once()().toVar("highpModelNormalViewMatrix"), _m = /* @__PURE__ */ ka("position", "vec3"), ur = /* @__PURE__ */ _m.toVarying("positionLocal"), ug = /* @__PURE__ */ _m.toVarying("positionPrevious"), Ra = /* @__PURE__ */ V((t) => Ps.mul(ur).xyz.toVarying(t.getNamespace("v_positionWorld")), "vec3").once("POSITION")(), cv = /* @__PURE__ */ V((t) => ur.transformDirection(Ps).toVarying(t.getNamespace("v_positionWorldDirection")).normalize().toVar("positionWorldDirection"), "vec3").once("POSITION")(), xr = /* @__PURE__ */ V((t) => t.context.setupPositionView().toVarying(t.getNamespace("v_positionView")), "vec3").once("POSITION")(), Wt = /* @__PURE__ */ xr.negate().toVarying("v_positionViewDirection").normalize().toVar("positionViewDirection");
7011
7011
  var IB = class extends Ce {
7012
7012
  static get type() {
7013
7013
  return "FrontFacingNode";
@@ -7020,7 +7020,7 @@ var IB = class extends Ce {
7020
7020
  return e.coordinateSystem === Di && r.side === 1 ? "false" : t.getFrontFacing();
7021
7021
  }
7022
7022
  };
7023
- const hE = /* @__PURE__ */ me(IB), Nm = /* @__PURE__ */ N(hE).mul(2).sub(1), ry = /* @__PURE__ */ ka("normal", "vec3"), Wi = /* @__PURE__ */ V((t) => t.geometry.hasAttribute("normal") === !1 ? (console.warn('THREE.TSL: Vertex attribute "normal" not found on geometry.'), I(0, 1, 0)) : ry, "vec3").once()().toVar("normalLocal"), cE = /* @__PURE__ */ yr.dFdx().cross(yr.dFdy()).normalize().toVar("normalFlat"), vn = /* @__PURE__ */ V((t) => {
7023
+ const hE = /* @__PURE__ */ me(IB), Nm = /* @__PURE__ */ N(hE).mul(2).sub(1), ry = /* @__PURE__ */ ka("normal", "vec3"), Wi = /* @__PURE__ */ V((t) => t.geometry.hasAttribute("normal") === !1 ? (console.warn('THREE.TSL: Vertex attribute "normal" not found on geometry.'), I(0, 1, 0)) : ry, "vec3").once()().toVar("normalLocal"), cE = /* @__PURE__ */ xr.dFdx().cross(xr.dFdy()).normalize().toVar("normalFlat"), vn = /* @__PURE__ */ V((t) => {
7024
7024
  let e;
7025
7025
  return e = t.material.flatShading === !0 ? cE : gs(dv(Wi), "v_normalView").normalize(), e;
7026
7026
  }, "vec3").once()().toVar("normalView"), Am = /* @__PURE__ */ V((t) => {
@@ -7153,7 +7153,7 @@ const Sa = (t, e, r = null) => Z(new FB(t, e, r)), ny = /* @__PURE__ */ V((t) =>
7153
7153
  return t = t.cross(Cl).normalize(), t = xt(t, lr, xo.mul(Pn.oneMinus()).oneMinus().pow2().pow2()).normalize(), t;
7154
7154
  })(), GB = /* @__PURE__ */ V((t) => {
7155
7155
  let { eye_pos: e, surf_norm: r, mapN: i, uv: s } = t, n = e.dFdx(), a = e.dFdy(), o = s.dFdx(), l = s.dFdy(), h = r, u = a.cross(h), c = h.cross(n), d = u.mul(o.x).add(c.mul(l.x)), m = u.mul(o.y).add(c.mul(l.y)), p = d.dot(d).max(m.dot(m)), f = Nm.mul(p.inverseSqrt());
7156
- return Tr(d.mul(i.x, f), m.mul(i.y, f), h.mul(i.z)).normalize();
7156
+ return wr(d.mul(i.x, f), m.mul(i.y, f), h.mul(i.z)).normalize();
7157
7157
  });
7158
7158
  var jB = class extends cr {
7159
7159
  static get type() {
@@ -7167,7 +7167,7 @@ var jB = class extends cr {
7167
7167
  r !== null && (i = I(i.xy.mul(r), i.z));
7168
7168
  let s = null;
7169
7169
  return e === 1 ? s = dv(i) : e === 0 && (s = t.hasGeometryAttribute("tangent") === !0 ? Ml.mul(i).normalize() : GB({
7170
- eye_pos: yr,
7170
+ eye_pos: xr,
7171
7171
  surf_norm: vn,
7172
7172
  mapN: i,
7173
7173
  uv: Yt()
@@ -7197,7 +7197,7 @@ var HB = class extends cr {
7197
7197
  bumpScale: t
7198
7198
  });
7199
7199
  return qB({
7200
- surf_pos: yr,
7200
+ surf_pos: xr,
7201
7201
  surf_norm: vn,
7202
7202
  dHdxy: e
7203
7203
  });
@@ -7507,11 +7507,11 @@ var oC = class extends Ce {
7507
7507
  super("void"), this.skinnedMesh = t, this.updateType = He.OBJECT, this.skinIndexNode = ka("skinIndex", "uvec4"), this.skinWeightNode = ka("skinWeight", "vec4"), this.bindMatrixNode = Ft("bindMatrix", "mat4"), this.bindMatrixInverseNode = Ft("bindMatrixInverse", "mat4"), this.boneMatricesNode = Sb("skeleton.boneMatrices", "mat4", t.skeleton.bones.length), this.positionNode = ur, this.toPositionNode = ur, this.previousBoneMatricesNode = null;
7508
7508
  }
7509
7509
  getSkinnedPosition(t = this.boneMatricesNode, e = this.positionNode) {
7510
- let { skinIndexNode: r, skinWeightNode: i, bindMatrixNode: s, bindMatrixInverseNode: n } = this, a = t.element(r.x), o = t.element(r.y), l = t.element(r.z), h = t.element(r.w), u = s.mul(e), c = Tr(a.mul(i.x).mul(u), o.mul(i.y).mul(u), l.mul(i.z).mul(u), h.mul(i.w).mul(u));
7510
+ let { skinIndexNode: r, skinWeightNode: i, bindMatrixNode: s, bindMatrixInverseNode: n } = this, a = t.element(r.x), o = t.element(r.y), l = t.element(r.z), h = t.element(r.w), u = s.mul(e), c = wr(a.mul(i.x).mul(u), o.mul(i.y).mul(u), l.mul(i.z).mul(u), h.mul(i.w).mul(u));
7511
7511
  return n.mul(c).xyz;
7512
7512
  }
7513
7513
  getSkinnedNormal(t = this.boneMatricesNode, e = Wi) {
7514
- let { skinIndexNode: r, skinWeightNode: i, bindMatrixNode: s, bindMatrixInverseNode: n } = this, a = t.element(r.x), o = t.element(r.y), l = t.element(r.z), h = t.element(r.w), u = Tr(i.x.mul(a), i.y.mul(o), i.z.mul(l), i.w.mul(h));
7514
+ let { skinIndexNode: r, skinWeightNode: i, bindMatrixNode: s, bindMatrixInverseNode: n } = this, a = t.element(r.x), o = t.element(r.y), l = t.element(r.z), h = t.element(r.w), u = wr(i.x.mul(a), i.y.mul(o), i.z.mul(l), i.w.mul(h));
7515
7515
  return u = n.mul(u).mul(s), u.transformDirection(e).xyz;
7516
7516
  }
7517
7517
  getPreviousSkinnedPosition(t) {
@@ -7827,12 +7827,12 @@ var Pa = class Sd extends Ce {
7827
7827
  setup({ camera: e }) {
7828
7828
  let { scope: r } = this, i = this.valueNode, s = null;
7829
7829
  if (r === Sd.DEPTH_BASE) i !== null && (s = fC().assign(i));
7830
- else if (r === Sd.DEPTH) s = e.isPerspectiveCamera ? pC(yr.z, To, wo) : lc(yr.z, To, wo);
7830
+ else if (r === Sd.DEPTH) s = e.isPerspectiveCamera ? pC(xr.z, To, wo) : lc(xr.z, To, wo);
7831
7831
  else if (r === Sd.LINEAR_DEPTH) if (i !== null) if (e.isPerspectiveCamera) {
7832
7832
  let n = Tv(i, To, wo);
7833
7833
  s = lc(n, To, wo);
7834
7834
  } else s = i;
7835
- else s = lc(yr.z, To, wo);
7835
+ else s = lc(xr.z, To, wo);
7836
7836
  return s;
7837
7837
  }
7838
7838
  };
@@ -7865,7 +7865,7 @@ var Oo = class Df extends Ce {
7865
7865
  let l = Cs(r);
7866
7866
  bt(a, ({ i: h }) => {
7867
7867
  let u = l.element(h);
7868
- i.assign(yr.dot(u.xyz).negate().add(u.w)), s.assign(i.fwidth().div(2)), n.mulAssign(Hn(s.negate(), s, i));
7868
+ i.assign(xr.dot(u.xyz).negate().add(u.w)), s.assign(i.fwidth().div(2)), n.mulAssign(Hn(s.negate(), s, i));
7869
7869
  });
7870
7870
  }
7871
7871
  let o = e.length;
@@ -7873,7 +7873,7 @@ var Oo = class Df extends Ce {
7873
7873
  let l = Cs(e), h = N(1).toVar("intersectionClipOpacity");
7874
7874
  bt(o, ({ i: u }) => {
7875
7875
  let c = l.element(u);
7876
- i.assign(yr.dot(c.xyz).negate().add(c.w)), s.assign(i.fwidth().div(2)), h.mulAssign(Hn(s.negate(), s, i).oneMinus());
7876
+ i.assign(xr.dot(c.xyz).negate().add(c.w)), s.assign(i.fwidth().div(2)), h.mulAssign(Hn(s.negate(), s, i).oneMinus());
7877
7877
  }), n.mulAssign(h.oneMinus());
7878
7878
  }
7879
7879
  mt.a.mulAssign(n), mt.a.equal(0).discard();
@@ -7886,7 +7886,7 @@ var Oo = class Df extends Ce {
7886
7886
  let n = Cs(r);
7887
7887
  bt(i, ({ i: a }) => {
7888
7888
  let o = n.element(a);
7889
- yr.dot(o.xyz).greaterThan(o.w).discard();
7889
+ xr.dot(o.xyz).greaterThan(o.w).discard();
7890
7890
  });
7891
7891
  }
7892
7892
  let s = e.length;
@@ -7894,7 +7894,7 @@ var Oo = class Df extends Ce {
7894
7894
  let n = Cs(e), a = Wn(!0).toVar("clipped");
7895
7895
  bt(s, ({ i: o }) => {
7896
7896
  let l = n.element(o);
7897
- a.assign(yr.dot(l.xyz).greaterThan(l.w).and(a));
7897
+ a.assign(xr.dot(l.xyz).greaterThan(l.w).and(a));
7898
7898
  }), a.discard();
7899
7899
  }
7900
7900
  })();
@@ -7904,15 +7904,15 @@ var Oo = class Df extends Ce {
7904
7904
  return r.enableHardwareClipping(i), V(() => {
7905
7905
  let s = Cs(e), n = Mm(r.getClipDistance());
7906
7906
  bt(i, ({ i: a }) => {
7907
- let o = s.element(a), l = yr.dot(o.xyz).sub(o.w).negate();
7907
+ let o = s.element(a), l = xr.dot(o.xyz).sub(o.w).negate();
7908
7908
  n.element(a).assign(l);
7909
7909
  });
7910
7910
  })();
7911
7911
  }
7912
7912
  };
7913
7913
  Oo.ALPHA_TO_COVERAGE = "alphaToCoverage", Oo.DEFAULT = "default", Oo.HARDWARE = "hardware";
7914
- const Sk = () => Z(new Oo()), Mk = () => Z(new Oo(Oo.ALPHA_TO_COVERAGE)), _k = () => Z(new Oo(Oo.HARDWARE)), nS = /* @__PURE__ */ V(([t]) => Ha($e(1e4, ls($e(17, t.x).add($e(0.1, t.y)))).mul(Tr(0.1, Bt(ls($e(13, t.y).add(t.x))))))), aS = /* @__PURE__ */ V(([t]) => nS(se(nS(t.xy), t.z))), Nk = /* @__PURE__ */ V(([t]) => {
7915
- let e = ir(zn(Q1(t.xyz)), zn(K1(t.xyz))), r = N(1).div(N(0.05).mul(e)).toVar("pixScale"), i = se(vc(Fn(Ln(r))), vc(Zg(Ln(r)))), s = se(aS(Fn(i.x.mul(t.xyz))), aS(Fn(i.y.mul(t.xyz)))), n = Ha(Ln(r)), a = Tr($e(n.oneMinus(), s.x), $e(n, s.y)), o = ji(n, n.oneMinus()), l = I(a.mul(a).div($e(2, o).mul(nt(1, o))), a.sub($e(0.5, o)).div(nt(1, o)), nt(1, nt(1, a).mul(nt(1, a)).div($e(2, o).mul(nt(1, o))))), h = a.lessThan(o.oneMinus()).select(a.lessThan(o).select(l.x, l.y), l.z);
7914
+ const Sk = () => Z(new Oo()), Mk = () => Z(new Oo(Oo.ALPHA_TO_COVERAGE)), _k = () => Z(new Oo(Oo.HARDWARE)), nS = /* @__PURE__ */ V(([t]) => Ha($e(1e4, ls($e(17, t.x).add($e(0.1, t.y)))).mul(wr(0.1, Bt(ls($e(13, t.y).add(t.x))))))), aS = /* @__PURE__ */ V(([t]) => nS(se(nS(t.xy), t.z))), Nk = /* @__PURE__ */ V(([t]) => {
7915
+ let e = ir(zn(Q1(t.xyz)), zn(K1(t.xyz))), r = N(1).div(N(0.05).mul(e)).toVar("pixScale"), i = se(vc(Fn(Ln(r))), vc(Zg(Ln(r)))), s = se(aS(Fn(i.x.mul(t.xyz))), aS(Fn(i.y.mul(t.xyz)))), n = Ha(Ln(r)), a = wr($e(n.oneMinus(), s.x), $e(n, s.y)), o = ji(n, n.oneMinus()), l = I(a.mul(a).div($e(2, o).mul(nt(1, o))), a.sub($e(0.5, o)).div(nt(1, o)), nt(1, nt(1, a).mul(nt(1, a)).div($e(2, o).mul(nt(1, o))))), h = a.lessThan(o.oneMinus()).select(a.lessThan(o).select(l.x, l.y), l.z);
7916
7916
  return qn(h, 1e-6, 1);
7917
7917
  }).setLayout({
7918
7918
  name: "getAlphaHashThreshold",
@@ -8013,7 +8013,7 @@ var hr = class extends Fi {
8013
8013
  let { renderer: e, camera: r } = t, i = this.depthNode;
8014
8014
  if (i === null) {
8015
8015
  let s = e.getMRT();
8016
- s && s.has("depth") ? i = s.get("depth") : e.logarithmicDepthBuffer === !0 && (i = r.isPerspectiveCamera ? wv(yr.z, To, wo) : lc(yr.z, To, wo));
8016
+ s && s.has("depth") ? i = s.get("depth") : e.logarithmicDepthBuffer === !0 && (i = r.isPerspectiveCamera ? wv(xr.z, To, wo) : lc(xr.z, To, wo));
8017
8017
  }
8018
8018
  i !== null && Sv.assign(i).toStack();
8019
8019
  }
@@ -8021,7 +8021,7 @@ var hr = class extends Fi {
8021
8021
  return Hu.mul(ur).xyz;
8022
8022
  }
8023
8023
  setupModelViewProjection() {
8024
- return qu.mul(yr);
8024
+ return qu.mul(xr);
8025
8025
  }
8026
8026
  setupVertex(t) {
8027
8027
  return t.addStack(), this.setupPosition(t), t.context.vertex = t.removeStack(), xv;
@@ -8723,8 +8723,8 @@ const MC = /* @__PURE__ */ V((t) => {
8723
8723
  type: "vec3"
8724
8724
  }
8725
8725
  ]
8726
- }), ly = 1 / 6, CC = (t) => $e(ly, $e(t, $e(t, t.negate().add(3)).sub(3)).add(1)), Ab = (t) => $e(ly, $e(t, $e(t, $e(3, t).sub(6))).add(4)), RC = (t) => $e(ly, $e(t, $e(t, $e(-3, t).add(3)).add(3)).add(1)), Eb = (t) => $e(ly, fn(t, 3)), uS = (t) => CC(t).add(Ab(t)), hS = (t) => RC(t).add(Eb(t)), cS = (t) => Tr(-1, Ab(t).div(CC(t).add(Ab(t)))), dS = (t) => Tr(1, Eb(t).div(RC(t).add(Eb(t)))), mS = (t, e, r) => {
8727
- let i = t.uvNode, s = $e(i, e.zw).add(0.5), n = Fn(s), a = Ha(s), o = uS(a.x), l = hS(a.x), h = cS(a.x), u = dS(a.x), c = cS(a.y), d = dS(a.y), m = se(n.x.add(h), n.y.add(c)).sub(0.5).mul(e.xy), p = se(n.x.add(u), n.y.add(c)).sub(0.5).mul(e.xy), f = se(n.x.add(h), n.y.add(d)).sub(0.5).mul(e.xy), g = se(n.x.add(u), n.y.add(d)).sub(0.5).mul(e.xy), y = uS(a.y).mul(Tr(o.mul(t.sample(m).level(r)), l.mul(t.sample(p).level(r)))), T = hS(a.y).mul(Tr(o.mul(t.sample(f).level(r)), l.mul(t.sample(g).level(r))));
8726
+ }), ly = 1 / 6, CC = (t) => $e(ly, $e(t, $e(t, t.negate().add(3)).sub(3)).add(1)), Ab = (t) => $e(ly, $e(t, $e(t, $e(3, t).sub(6))).add(4)), RC = (t) => $e(ly, $e(t, $e(t, $e(-3, t).add(3)).add(3)).add(1)), Eb = (t) => $e(ly, fn(t, 3)), uS = (t) => CC(t).add(Ab(t)), hS = (t) => RC(t).add(Eb(t)), cS = (t) => wr(-1, Ab(t).div(CC(t).add(Ab(t)))), dS = (t) => wr(1, Eb(t).div(RC(t).add(Eb(t)))), mS = (t, e, r) => {
8727
+ let i = t.uvNode, s = $e(i, e.zw).add(0.5), n = Fn(s), a = Ha(s), o = uS(a.x), l = hS(a.x), h = cS(a.x), u = dS(a.x), c = cS(a.y), d = dS(a.y), m = se(n.x.add(h), n.y.add(c)).sub(0.5).mul(e.xy), p = se(n.x.add(u), n.y.add(c)).sub(0.5).mul(e.xy), f = se(n.x.add(h), n.y.add(d)).sub(0.5).mul(e.xy), g = se(n.x.add(u), n.y.add(d)).sub(0.5).mul(e.xy), y = uS(a.y).mul(wr(o.mul(t.sample(m).level(r)), l.mul(t.sample(p).level(r)))), T = hS(a.y).mul(wr(o.mul(t.sample(f).level(r)), l.mul(t.sample(g).level(r))));
8728
8728
  return y.add(T);
8729
8729
  }, PC = /* @__PURE__ */ V(([t, e = N(3)]) => {
8730
8730
  let r = se(t.size(C(e))), i = se(t.size(C(e.add(1)))), s = zs(1, r), n = zs(1, i), a = mS(t, Me(s, r), Fn(e)), o = mS(t, Me(n, i), Zg(e));
@@ -8928,7 +8928,7 @@ var IC = class extends oy {
8928
8928
  })));
8929
8929
  }
8930
8930
  directRectArea({ lightColor: t, lightPosition: e, halfWidth: r, halfHeight: i, reflectedLight: s, ltc_1: n, ltc_2: a }) {
8931
- let o = e.add(r).sub(i), l = e.sub(r).sub(i), h = e.sub(r).add(i), u = e.add(r).add(i), c = lr, d = Wt, m = yr.toVar(), p = t4({
8931
+ let o = e.add(r).sub(i), l = e.sub(r).sub(i), h = e.sub(r).add(i), u = e.add(r).add(i), c = lr, d = Wt, m = xr.toVar(), p = t4({
8932
8932
  N: c,
8933
8933
  V: d,
8934
8934
  roughness: Pn
@@ -9794,7 +9794,7 @@ var j4 = class extends kC {
9794
9794
  n.assign(uy(n, l));
9795
9795
  }
9796
9796
  let o = s === null ? KE : se(s);
9797
- return this.sizeAttenuation === !0 && (o = o.mul(o.div(yr.z.negate()))), i && i.isNode && (o = o.mul(se(i))), n.mulAssign(o.mul(2)), n.assign(n.div(oc.z)), n.y.assign(n.y.mul(a)), n.assign(n.mul(e.w)), e.addAssign(Me(n, 0, 0)), e;
9797
+ return this.sizeAttenuation === !0 && (o = o.mul(o.div(xr.z.negate()))), i && i.isNode && (o = o.mul(se(i))), n.mulAssign(o.mul(2)), n.assign(n.div(oc.z)), n.y.assign(n.y.mul(a)), n.assign(n.mul(e.w)), e.addAssign(Me(n, 0, 0)), e;
9798
9798
  }
9799
9799
  get alphaToCoverage() {
9800
9800
  return this._useAlphaToCoverage;
@@ -10458,7 +10458,7 @@ var gU = class extends qo {
10458
10458
  }
10459
10459
  updateRenderTarget(t, e = 0) {
10460
10460
  let r = this.get(t), i = t.samples === 0 ? 1 : t.samples, s = r.depthTextureMips || (r.depthTextureMips = {}), n = t.textures, a = this.getSize(n[0]), o = a.width >> e, l = a.height >> e, h = t.depthTexture || s[e], u = t.depthBuffer === !0 || t.stencilBuffer === !0, c = !1;
10461
- h === void 0 && u && (h = new yn(), h.format = t.stencilBuffer ? Aa : Vn, h.type = t.stencilBuffer ? Ro : fr, h.image.width = o, h.image.height = l, h.image.depth = a.depth, h.isArrayTexture = t.multiview === !0 && a.depth > 1, s[e] = h), (r.width !== a.width || a.height !== r.height) && (c = !0, h && (h.needsUpdate = !0, h.image.width = o, h.image.height = l, h.image.depth = h.isArrayTexture ? h.image.depth : 1)), r.width = a.width, r.height = a.height, r.textures = n, r.depthTexture = h || null, r.depth = t.depthBuffer, r.stencil = t.stencilBuffer, r.renderTarget = t, r.sampleCount !== i && (c = !0, h && (h.needsUpdate = !0), r.sampleCount = i);
10461
+ h === void 0 && u && (h = new yn(), h.format = t.stencilBuffer ? Aa : Vn, h.type = t.stencilBuffer ? Ro : gr, h.image.width = o, h.image.height = l, h.image.depth = a.depth, h.isArrayTexture = t.multiview === !0 && a.depth > 1, s[e] = h), (r.width !== a.width || a.height !== r.height) && (c = !0, h && (h.needsUpdate = !0, h.image.width = o, h.image.height = l, h.image.depth = h.isArrayTexture ? h.image.depth : 1)), r.width = a.width, r.height = a.height, r.textures = n, r.depthTexture = h || null, r.depth = t.depthBuffer, r.stencil = t.stencilBuffer, r.renderTarget = t, r.sampleCount !== i && (c = !0, h && (h.needsUpdate = !0), r.sampleCount = i);
10462
10462
  let d = { sampleCount: i };
10463
10463
  if (t.isXRRenderTarget !== !0) {
10464
10464
  for (let m = 0; m < n.length; m++) {
@@ -10752,7 +10752,7 @@ var MU = class extends jC {
10752
10752
  const qC = /* @__PURE__ */ ee(MU), _U = /* @__PURE__ */ V(([t]) => {
10753
10753
  let e = t.toUint().mul(747796405).add(2891336453), r = e.shiftRight(e.shiftRight(28).add(4)).bitXor(e).mul(277803737);
10754
10754
  return r.shiftRight(22).bitXor(r).toFloat().mul(1 / 2 ** 32);
10755
- }), Pb = (t, e) => fn($e(4, t.mul(nt(1, t))), e), NU = (t, e) => t.lessThan(0.5) ? Pb(t.mul(2), e).div(2) : nt(1, Pb($e(nt(1, t), 2), e).div(2)), AU = (t, e, r) => fn(zs(fn(t, e), Tr(fn(t, e), fn(nt(1, t), r))), 1 / e), EU = (t, e) => ls(og.mul(e.mul(t).sub(1))).div(og.mul(e.mul(t).sub(1))), ba = /* @__PURE__ */ V(([t]) => t.fract().sub(0.5).abs()).setLayout({
10755
+ }), Pb = (t, e) => fn($e(4, t.mul(nt(1, t))), e), NU = (t, e) => t.lessThan(0.5) ? Pb(t.mul(2), e).div(2) : nt(1, Pb($e(nt(1, t), 2), e).div(2)), AU = (t, e, r) => fn(zs(fn(t, e), wr(fn(t, e), fn(nt(1, t), r))), 1 / e), EU = (t, e) => ls(og.mul(e.mul(t).sub(1))).div(og.mul(e.mul(t).sub(1))), ba = /* @__PURE__ */ V(([t]) => t.fract().sub(0.5).abs()).setLayout({
10756
10756
  name: "tri",
10757
10757
  type: "float",
10758
10758
  inputs: [{
@@ -10829,7 +10829,7 @@ var PU = class extends Ce {
10829
10829
  return r;
10830
10830
  }
10831
10831
  };
10832
- const IU = /* @__PURE__ */ ee(PU), ui = (t) => (...e) => IU(t, ...e), Xu = /* @__PURE__ */ _e(0).setGroup(Ee).onRenderUpdate((t) => t.time), HC = /* @__PURE__ */ _e(0).setGroup(Ee).onRenderUpdate((t) => t.deltaTime), OU = /* @__PURE__ */ _e(0, "uint").setGroup(Ee).onRenderUpdate((t) => t.frameId), VU = (t = 1) => (console.warn('TSL: timerLocal() is deprecated. Use "time" instead.'), Xu.mul(t)), LU = (t = 1) => (console.warn('TSL: timerGlobal() is deprecated. Use "time" instead.'), Xu.mul(t)), FU = (t = 1) => (console.warn('TSL: timerDelta() is deprecated. Use "deltaTime" instead.'), HC.mul(t)), zU = (t = Xu) => t.add(0.75).mul(Math.PI * 2).sin().mul(0.5).add(0.5), BU = (t = Xu) => t.fract().round(), kU = (t = Xu) => t.add(0.5).fract().mul(2).sub(1).abs(), UU = (t = Xu) => t.fract(), DU = /* @__PURE__ */ V(([t, e, r = se(0.5)]) => uy(t.sub(r), e).add(r)), $U = /* @__PURE__ */ V(([t, e, r = se(0.5)]) => {
10832
+ const IU = /* @__PURE__ */ ee(PU), hi = (t) => (...e) => IU(t, ...e), Xu = /* @__PURE__ */ _e(0).setGroup(Ee).onRenderUpdate((t) => t.time), HC = /* @__PURE__ */ _e(0).setGroup(Ee).onRenderUpdate((t) => t.deltaTime), OU = /* @__PURE__ */ _e(0, "uint").setGroup(Ee).onRenderUpdate((t) => t.frameId), VU = (t = 1) => (console.warn('TSL: timerLocal() is deprecated. Use "time" instead.'), Xu.mul(t)), LU = (t = 1) => (console.warn('TSL: timerGlobal() is deprecated. Use "time" instead.'), Xu.mul(t)), FU = (t = 1) => (console.warn('TSL: timerDelta() is deprecated. Use "deltaTime" instead.'), HC.mul(t)), zU = (t = Xu) => t.add(0.75).mul(Math.PI * 2).sin().mul(0.5).add(0.5), BU = (t = Xu) => t.fract().round(), kU = (t = Xu) => t.add(0.5).fract().mul(2).sub(1).abs(), UU = (t = Xu) => t.fract(), DU = /* @__PURE__ */ V(([t, e, r = se(0.5)]) => uy(t.sub(r), e).add(r)), $U = /* @__PURE__ */ V(([t, e, r = se(0.5)]) => {
10833
10833
  let i = t.sub(r), s = i.dot(i), n = s.mul(s), a = n.mul(e);
10834
10834
  return t.add(i.mul(a));
10835
10835
  }), GU = /* @__PURE__ */ V(({ position: t = null, horizontal: e = !0, vertical: r = !1 }) => {
@@ -10865,7 +10865,7 @@ var HU = class extends Ce {
10865
10865
  let { textureXNode: t, textureYNode: e, textureZNode: r, scaleNode: i, positionNode: s, normalNode: n } = this, a = n.abs().normalize();
10866
10866
  a = a.div(a.dot(I(1)));
10867
10867
  let o = s.yz.mul(i), l = s.zx.mul(i), h = s.xy.mul(i), u = t.value, c = e === null ? u : e.value, d = r === null ? u : r.value, m = Qe(u, o).mul(a.x), p = Qe(c, l).mul(a.y), f = Qe(d, h).mul(a.z);
10868
- return Tr(m, p, f);
10868
+ return wr(m, p, f);
10869
10869
  }
10870
10870
  };
10871
10871
  const XC = /* @__PURE__ */ ee(HU).setParameterLength(1, 6), XU = (...t) => XC(...t), mh = new yo(), rl = new F(), ph = new F(), P0 = new F(), Qc = new ft(), Rp = new F(0, 0, -1), En = new lt(), Kc = new F(), Pp = new F(), ed = new lt(), Ip = new tt(), cg = new qa(), YU = xn.flipX();
@@ -11294,7 +11294,7 @@ const b6 = /* @__PURE__ */ me(x6), rR = /* @__PURE__ */ V(([t, e]) => ji(1, t.on
11294
11294
  color: "vec4",
11295
11295
  return: "vec4"
11296
11296
  }), S6 = (...t) => (console.warn('THREE.TSL: "burn" has been renamed. Use "blendBurn" instead.'), rR(t)), M6 = (...t) => (console.warn('THREE.TSL: "dodge" has been renamed. Use "blendDodge" instead.'), iR(t)), _6 = (...t) => (console.warn('THREE.TSL: "screen" has been renamed. Use "blendScreen" instead.'), sR(t)), N6 = (...t) => (console.warn('THREE.TSL: "overlay" has been renamed. Use "blendOverlay" instead.'), nR(t)), A6 = /* @__PURE__ */ V(([t]) => Iv(t.rgb)), E6 = /* @__PURE__ */ V(([t, e = N(1)]) => e.mix(Iv(t.rgb), t.rgb)), C6 = /* @__PURE__ */ V(([t, e = N(1)]) => {
11297
- let r = Tr(t.r, t.g, t.b).div(3), i = t.r.max(t.g.max(t.b)), s = i.sub(r).mul(e).mul(-3);
11297
+ let r = wr(t.r, t.g, t.b).div(3), i = t.r.max(t.g.max(t.b)), s = i.sub(r).mul(e).mul(-3);
11298
11298
  return xt(t.rgb, i, s);
11299
11299
  }), R6 = /* @__PURE__ */ V(([t, e = N(1)]) => {
11300
11300
  let r = I(0.57735, 0.57735, 0.57735), i = e.cos();
@@ -11840,7 +11840,7 @@ return { ...output, ` + r + " };", n = i + this.codeNode.code + s;
11840
11840
  const J6 = /* @__PURE__ */ ee(Z6).setParameterLength(1, 2);
11841
11841
  function yR(t) {
11842
11842
  let e, r = t.context.getViewZ;
11843
- return r !== void 0 && (e = r(this)), (e || yr.z).negate();
11843
+ return r !== void 0 && (e = r(this)), (e || xr.z).negate();
11844
11844
  }
11845
11845
  const Ov = V(([t, e], r) => {
11846
11846
  let i = yR(r);
@@ -12168,13 +12168,13 @@ const FS = /* @__PURE__ */ new WeakMap(), vR = /* @__PURE__ */ V(({ depthTexture
12168
12168
  let T = Qe(t, g);
12169
12169
  return t.isArrayTexture && (T = T.depth(i)), T.compare(y);
12170
12170
  }, n = Ft("mapSize", "vec2", r).setGroup(Ee), a = Ft("radius", "float", r).setGroup(Ee), o = se(1).div(n), l = o.x.negate().mul(a), h = o.y.negate().mul(a), u = o.x.mul(a), c = o.y.mul(a), d = l.div(2), m = h.div(2), p = u.div(2), f = c.div(2);
12171
- return Tr(s(e.xy.add(se(l, h)), e.z), s(e.xy.add(se(0, h)), e.z), s(e.xy.add(se(u, h)), e.z), s(e.xy.add(se(d, m)), e.z), s(e.xy.add(se(0, m)), e.z), s(e.xy.add(se(p, m)), e.z), s(e.xy.add(se(l, 0)), e.z), s(e.xy.add(se(d, 0)), e.z), s(e.xy, e.z), s(e.xy.add(se(p, 0)), e.z), s(e.xy.add(se(u, 0)), e.z), s(e.xy.add(se(d, f)), e.z), s(e.xy.add(se(0, f)), e.z), s(e.xy.add(se(p, f)), e.z), s(e.xy.add(se(l, c)), e.z), s(e.xy.add(se(0, c)), e.z), s(e.xy.add(se(u, c)), e.z)).mul(1 / 17);
12171
+ return wr(s(e.xy.add(se(l, h)), e.z), s(e.xy.add(se(0, h)), e.z), s(e.xy.add(se(u, h)), e.z), s(e.xy.add(se(d, m)), e.z), s(e.xy.add(se(0, m)), e.z), s(e.xy.add(se(p, m)), e.z), s(e.xy.add(se(l, 0)), e.z), s(e.xy.add(se(d, 0)), e.z), s(e.xy, e.z), s(e.xy.add(se(p, 0)), e.z), s(e.xy.add(se(u, 0)), e.z), s(e.xy.add(se(d, f)), e.z), s(e.xy.add(se(0, f)), e.z), s(e.xy.add(se(p, f)), e.z), s(e.xy.add(se(l, c)), e.z), s(e.xy.add(se(0, c)), e.z), s(e.xy.add(se(u, c)), e.z)).mul(1 / 17);
12172
12172
  }), wR = /* @__PURE__ */ V(({ depthTexture: t, shadowCoord: e, shadow: r, depthLayer: i }) => {
12173
12173
  let s = (c, d) => {
12174
12174
  let m = Qe(t, c);
12175
12175
  return t.isArrayTexture && (m = m.depth(i)), m.compare(d);
12176
12176
  }, n = Ft("mapSize", "vec2", r).setGroup(Ee), a = se(1).div(n), o = a.x, l = a.y, h = e.xy, u = Ha(h.mul(n).add(0.5));
12177
- return h.subAssign(u.mul(a)), Tr(s(h, e.z), s(h.add(se(o, 0)), e.z), s(h.add(se(0, l)), e.z), s(h.add(a), e.z), xt(s(h.add(se(o.negate(), 0)), e.z), s(h.add(se(o.mul(2), 0)), e.z), u.x), xt(s(h.add(se(o.negate(), l)), e.z), s(h.add(se(o.mul(2), l)), e.z), u.x), xt(s(h.add(se(0, l.negate())), e.z), s(h.add(se(0, l.mul(2))), e.z), u.y), xt(s(h.add(se(o, l.negate())), e.z), s(h.add(se(o, l.mul(2))), e.z), u.y), xt(xt(s(h.add(se(o.negate(), l.negate())), e.z), s(h.add(se(o.mul(2), l.negate())), e.z), u.x), xt(s(h.add(se(o.negate(), l.mul(2))), e.z), s(h.add(se(o.mul(2), l.mul(2))), e.z), u.x), u.y)).mul(1 / 9);
12177
+ return h.subAssign(u.mul(a)), wr(s(h, e.z), s(h.add(se(o, 0)), e.z), s(h.add(se(0, l)), e.z), s(h.add(a), e.z), xt(s(h.add(se(o.negate(), 0)), e.z), s(h.add(se(o.mul(2), 0)), e.z), u.x), xt(s(h.add(se(o.negate(), l)), e.z), s(h.add(se(o.mul(2), l)), e.z), u.x), xt(s(h.add(se(0, l.negate())), e.z), s(h.add(se(0, l.mul(2))), e.z), u.y), xt(s(h.add(se(o, l.negate())), e.z), s(h.add(se(o, l.mul(2))), e.z), u.y), xt(xt(s(h.add(se(o.negate(), l.negate())), e.z), s(h.add(se(o.mul(2), l.negate())), e.z), u.x), xt(s(h.add(se(o.negate(), l.mul(2))), e.z), s(h.add(se(o.mul(2), l.mul(2))), e.z), u.x), u.y)).mul(1 / 9);
12178
12178
  }), SR = /* @__PURE__ */ V(({ depthTexture: t, shadowCoord: e, depthLayer: r }) => {
12179
12179
  let i = N(1).toVar(), s = Qe(t).sample(e.xy);
12180
12180
  t.isArrayTexture && (s = s.depth(r)), s = s.rg;
@@ -12210,7 +12210,7 @@ const FS = /* @__PURE__ */ new WeakMap(), vR = /* @__PURE__ */ V(({ depthTexture
12210
12210
  type: "int",
12211
12211
  condition: "<"
12212
12212
  }, ({ i: u }) => {
12213
- let c = l.add(N(u).mul(o)), d = i.sample(Tr(Pm.xy, se(0, c).mul(e)).div(r));
12213
+ let c = l.add(N(u).mul(o)), d = i.sample(wr(Pm.xy, se(0, c).mul(e)).div(r));
12214
12214
  i.value.isArrayTexture && (d = d.depth(s)), d = d.x, n.addAssign(d), a.addAssign(d.mul(d));
12215
12215
  }), n.divAssign(t), a.divAssign(t);
12216
12216
  let h = Kn(a.sub(n.mul(n)));
@@ -12223,8 +12223,8 @@ const FS = /* @__PURE__ */ new WeakMap(), vR = /* @__PURE__ */ V(({ depthTexture
12223
12223
  type: "int",
12224
12224
  condition: "<"
12225
12225
  }, ({ i: u }) => {
12226
- let c = l.add(N(u).mul(o)), d = i.sample(Tr(Pm.xy, se(c, 0).mul(e)).div(r));
12227
- i.value.isArrayTexture && (d = d.depth(s)), n.addAssign(d.x), a.addAssign(Tr(d.y.mul(d.y), d.x.mul(d.x)));
12226
+ let c = l.add(N(u).mul(o)), d = i.sample(wr(Pm.xy, se(c, 0).mul(e)).div(r));
12227
+ i.value.isArrayTexture && (d = d.depth(s)), n.addAssign(d.x), a.addAssign(wr(d.y.mul(d.y), d.x.mul(d.x)));
12228
12228
  }), n.divAssign(t), a.divAssign(t);
12229
12229
  let h = Kn(a.sub(n.mul(n)));
12230
12230
  return se(n, h);
@@ -12450,7 +12450,7 @@ var Yu = class extends Vc {
12450
12450
  return this.light.uuid;
12451
12451
  }
12452
12452
  getLightVector(t) {
12453
- return Bv(this.light).sub(t.context.positionView || yr);
12453
+ return Bv(this.light).sub(t.context.positionView || xr);
12454
12454
  }
12455
12455
  setupDirect() {
12456
12456
  }
@@ -12559,7 +12559,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
12559
12559
  name: "b",
12560
12560
  type: "bool"
12561
12561
  }]
12562
- }), br = /* @__PURE__ */ V(([t]) => {
12562
+ }), vr = /* @__PURE__ */ V(([t]) => {
12563
12563
  let e = N(t).toVar();
12564
12564
  return C(Fn(e));
12565
12565
  }).setLayout({
@@ -12571,7 +12571,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
12571
12571
  }]
12572
12572
  }), Ht = /* @__PURE__ */ V(([t, e]) => {
12573
12573
  let r = N(t).toVar();
12574
- return e.assign(br(r)), r.sub(N(e));
12574
+ return e.assign(vr(r)), r.sub(N(e));
12575
12575
  }), XD = /* @__PURE__ */ V(([t, e, r, i, s, n]) => {
12576
12576
  let a = N(n).toVar(), o = N(s).toVar(), l = N(i).toVar(), h = N(r).toVar(), u = N(e).toVar(), c = N(t).toVar(), d = N(nt(1, o)).toVar();
12577
12577
  return nt(1, a).mul(c.mul(d).add(u.mul(o))).add(a.mul(h.mul(d).add(l.mul(o))));
@@ -12636,7 +12636,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
12636
12636
  type: "float"
12637
12637
  }
12638
12638
  ]
12639
- }), IR = /* @__PURE__ */ ui([XD, YD]), ZD = /* @__PURE__ */ V(([t, e, r, i, s, n, a, o, l, h, u]) => {
12639
+ }), IR = /* @__PURE__ */ hi([XD, YD]), ZD = /* @__PURE__ */ V(([t, e, r, i, s, n, a, o, l, h, u]) => {
12640
12640
  let c = N(u).toVar(), d = N(h).toVar(), m = N(l).toVar(), p = N(o).toVar(), f = N(a).toVar(), g = N(n).toVar(), y = N(s).toVar(), T = N(i).toVar(), w = N(r).toVar(), v = N(e).toVar(), M = N(t).toVar(), S = N(nt(1, m)).toVar(), _ = N(nt(1, d)).toVar();
12641
12641
  return N(nt(1, c)).toVar().mul(_.mul(M.mul(S).add(v.mul(m))).add(d.mul(w.mul(S).add(T.mul(m))))).add(c.mul(_.mul(y.mul(S).add(g.mul(m))).add(d.mul(f.mul(S).add(p.mul(m))))));
12642
12642
  }).setLayout({
@@ -12740,7 +12740,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
12740
12740
  type: "float"
12741
12741
  }
12742
12742
  ]
12743
- }), OR = /* @__PURE__ */ ui([ZD, JD]), QD = /* @__PURE__ */ V(([t, e, r]) => {
12743
+ }), OR = /* @__PURE__ */ hi([ZD, JD]), QD = /* @__PURE__ */ V(([t, e, r]) => {
12744
12744
  let i = N(r).toVar(), s = N(e).toVar(), n = we(t).toVar(), a = we(n.bitAnd(we(7))).toVar(), o = N(Ud(a.lessThan(we(4)), s, i)).toVar(), l = N($e(2, Ud(a.lessThan(we(4)), i, s))).toVar();
12745
12745
  return dg(o, Wn(a.bitAnd(we(1)))).add(dg(l, Wn(a.bitAnd(we(2)))));
12746
12746
  }).setLayout({
@@ -12784,7 +12784,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
12784
12784
  type: "float"
12785
12785
  }
12786
12786
  ]
12787
- }), ti = /* @__PURE__ */ ui([QD, KD]), e8 = /* @__PURE__ */ V(([t, e, r]) => {
12787
+ }), ti = /* @__PURE__ */ hi([QD, KD]), e8 = /* @__PURE__ */ V(([t, e, r]) => {
12788
12788
  let i = N(r).toVar(), s = N(e).toVar(), n = Oc(t).toVar();
12789
12789
  return I(ti(n.x, s, i), ti(n.y, s, i), ti(n.z, s, i));
12790
12790
  }).setLayout({
@@ -12828,7 +12828,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
12828
12828
  type: "float"
12829
12829
  }
12830
12830
  ]
12831
- }), Ss = /* @__PURE__ */ ui([e8, t8]), r8 = /* @__PURE__ */ V(([t]) => {
12831
+ }), Ss = /* @__PURE__ */ hi([e8, t8]), r8 = /* @__PURE__ */ V(([t]) => {
12832
12832
  let e = N(t).toVar();
12833
12833
  return $e(0.6616, e);
12834
12834
  }).setLayout({
@@ -12858,7 +12858,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
12858
12858
  name: "v",
12859
12859
  type: "vec3"
12860
12860
  }]
12861
- }), VR = /* @__PURE__ */ ui([r8, s8]), n8 = /* @__PURE__ */ V(([t]) => {
12861
+ }), VR = /* @__PURE__ */ hi([r8, s8]), n8 = /* @__PURE__ */ V(([t]) => {
12862
12862
  let e = I(t).toVar();
12863
12863
  return $e(0.982, e);
12864
12864
  }).setLayout({
@@ -12868,7 +12868,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
12868
12868
  name: "v",
12869
12869
  type: "vec3"
12870
12870
  }]
12871
- }), LR = /* @__PURE__ */ ui([i8, n8]), ns = /* @__PURE__ */ V(([t, e]) => {
12871
+ }), LR = /* @__PURE__ */ hi([i8, n8]), ns = /* @__PURE__ */ V(([t, e]) => {
12872
12872
  let r = C(e).toVar(), i = we(t).toVar();
12873
12873
  return i.shiftLeft(r).bitOr(i.shiftRight(C(32).sub(r)));
12874
12874
  }).setLayout({
@@ -13018,7 +13018,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13018
13018
  type: "int"
13019
13019
  }
13020
13020
  ]
13021
- }), Nt = /* @__PURE__ */ ui([
13021
+ }), Nt = /* @__PURE__ */ hi([
13022
13022
  a8,
13023
13023
  o8,
13024
13024
  l8,
@@ -13057,7 +13057,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13057
13057
  type: "int"
13058
13058
  }
13059
13059
  ]
13060
- }), Ms = /* @__PURE__ */ ui([c8, d8]), m8 = /* @__PURE__ */ V(([t]) => {
13060
+ }), Ms = /* @__PURE__ */ hi([c8, d8]), m8 = /* @__PURE__ */ V(([t]) => {
13061
13061
  let e = se(t).toVar(), r = C().toVar(), i = C().toVar(), s = N(Ht(e.x, r)).toVar(), n = N(Ht(e.y, i)).toVar(), a = N(Bn(s)).toVar(), o = N(Bn(n)).toVar(), l = N(IR(ti(Nt(r, i), s, n), ti(Nt(r.add(C(1)), i), s.sub(1), n), ti(Nt(r, i.add(C(1))), s, n.sub(1)), ti(Nt(r.add(C(1)), i.add(C(1))), s.sub(1), n.sub(1)), a, o)).toVar();
13062
13062
  return VR(l);
13063
13063
  }).setLayout({
@@ -13077,7 +13077,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13077
13077
  name: "p",
13078
13078
  type: "vec3"
13079
13079
  }]
13080
- }), Gv = /* @__PURE__ */ ui([m8, p8]), f8 = /* @__PURE__ */ V(([t]) => {
13080
+ }), Gv = /* @__PURE__ */ hi([m8, p8]), f8 = /* @__PURE__ */ V(([t]) => {
13081
13081
  let e = se(t).toVar(), r = C().toVar(), i = C().toVar(), s = N(Ht(e.x, r)).toVar(), n = N(Ht(e.y, i)).toVar(), a = N(Bn(s)).toVar(), o = N(Bn(n)).toVar(), l = I(IR(Ss(Ms(r, i), s, n), Ss(Ms(r.add(C(1)), i), s.sub(1), n), Ss(Ms(r, i.add(C(1))), s, n.sub(1)), Ss(Ms(r.add(C(1)), i.add(C(1))), s.sub(1), n.sub(1)), a, o)).toVar();
13082
13082
  return VR(l);
13083
13083
  }).setLayout({
@@ -13097,8 +13097,8 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13097
13097
  name: "p",
13098
13098
  type: "vec3"
13099
13099
  }]
13100
- }), jv = /* @__PURE__ */ ui([f8, g8]), y8 = /* @__PURE__ */ V(([t]) => {
13101
- let e = N(t).toVar(), r = C(br(e)).toVar();
13100
+ }), jv = /* @__PURE__ */ hi([f8, g8]), y8 = /* @__PURE__ */ V(([t]) => {
13101
+ let e = N(t).toVar(), r = C(vr(e)).toVar();
13102
13102
  return Ti(Nt(r));
13103
13103
  }).setLayout({
13104
13104
  name: "mx_cell_noise_float_0",
@@ -13108,7 +13108,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13108
13108
  type: "float"
13109
13109
  }]
13110
13110
  }), x8 = /* @__PURE__ */ V(([t]) => {
13111
- let e = se(t).toVar(), r = C(br(e.x)).toVar(), i = C(br(e.y)).toVar();
13111
+ let e = se(t).toVar(), r = C(vr(e.x)).toVar(), i = C(vr(e.y)).toVar();
13112
13112
  return Ti(Nt(r, i));
13113
13113
  }).setLayout({
13114
13114
  name: "mx_cell_noise_float_1",
@@ -13118,7 +13118,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13118
13118
  type: "vec2"
13119
13119
  }]
13120
13120
  }), b8 = /* @__PURE__ */ V(([t]) => {
13121
- let e = I(t).toVar(), r = C(br(e.x)).toVar(), i = C(br(e.y)).toVar(), s = C(br(e.z)).toVar();
13121
+ let e = I(t).toVar(), r = C(vr(e.x)).toVar(), i = C(vr(e.y)).toVar(), s = C(vr(e.z)).toVar();
13122
13122
  return Ti(Nt(r, i, s));
13123
13123
  }).setLayout({
13124
13124
  name: "mx_cell_noise_float_2",
@@ -13128,7 +13128,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13128
13128
  type: "vec3"
13129
13129
  }]
13130
13130
  }), v8 = /* @__PURE__ */ V(([t]) => {
13131
- let e = Me(t).toVar(), r = C(br(e.x)).toVar(), i = C(br(e.y)).toVar(), s = C(br(e.z)).toVar(), n = C(br(e.w)).toVar();
13131
+ let e = Me(t).toVar(), r = C(vr(e.x)).toVar(), i = C(vr(e.y)).toVar(), s = C(vr(e.z)).toVar(), n = C(vr(e.w)).toVar();
13132
13132
  return Ti(Nt(r, i, s, n));
13133
13133
  }).setLayout({
13134
13134
  name: "mx_cell_noise_float_3",
@@ -13137,13 +13137,13 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13137
13137
  name: "p",
13138
13138
  type: "vec4"
13139
13139
  }]
13140
- }), T8 = /* @__PURE__ */ ui([
13140
+ }), T8 = /* @__PURE__ */ hi([
13141
13141
  y8,
13142
13142
  x8,
13143
13143
  b8,
13144
13144
  v8
13145
13145
  ]), w8 = /* @__PURE__ */ V(([t]) => {
13146
- let e = N(t).toVar(), r = C(br(e)).toVar();
13146
+ let e = N(t).toVar(), r = C(vr(e)).toVar();
13147
13147
  return I(Ti(Nt(r, C(0))), Ti(Nt(r, C(1))), Ti(Nt(r, C(2))));
13148
13148
  }).setLayout({
13149
13149
  name: "mx_cell_noise_vec3_0",
@@ -13153,7 +13153,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13153
13153
  type: "float"
13154
13154
  }]
13155
13155
  }), S8 = /* @__PURE__ */ V(([t]) => {
13156
- let e = se(t).toVar(), r = C(br(e.x)).toVar(), i = C(br(e.y)).toVar();
13156
+ let e = se(t).toVar(), r = C(vr(e.x)).toVar(), i = C(vr(e.y)).toVar();
13157
13157
  return I(Ti(Nt(r, i, C(0))), Ti(Nt(r, i, C(1))), Ti(Nt(r, i, C(2))));
13158
13158
  }).setLayout({
13159
13159
  name: "mx_cell_noise_vec3_1",
@@ -13163,7 +13163,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13163
13163
  type: "vec2"
13164
13164
  }]
13165
13165
  }), M8 = /* @__PURE__ */ V(([t]) => {
13166
- let e = I(t).toVar(), r = C(br(e.x)).toVar(), i = C(br(e.y)).toVar(), s = C(br(e.z)).toVar();
13166
+ let e = I(t).toVar(), r = C(vr(e.x)).toVar(), i = C(vr(e.y)).toVar(), s = C(vr(e.z)).toVar();
13167
13167
  return I(Ti(Nt(r, i, s, C(0))), Ti(Nt(r, i, s, C(1))), Ti(Nt(r, i, s, C(2))));
13168
13168
  }).setLayout({
13169
13169
  name: "mx_cell_noise_vec3_2",
@@ -13173,7 +13173,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13173
13173
  type: "vec3"
13174
13174
  }]
13175
13175
  }), _8 = /* @__PURE__ */ V(([t]) => {
13176
- let e = Me(t).toVar(), r = C(br(e.x)).toVar(), i = C(br(e.y)).toVar(), s = C(br(e.z)).toVar(), n = C(br(e.w)).toVar();
13176
+ let e = Me(t).toVar(), r = C(vr(e.x)).toVar(), i = C(vr(e.y)).toVar(), s = C(vr(e.z)).toVar(), n = C(vr(e.w)).toVar();
13177
13177
  return I(Ti(Nt(r, i, s, n, C(0))), Ti(Nt(r, i, s, n, C(1))), Ti(Nt(r, i, s, n, C(2))));
13178
13178
  }).setLayout({
13179
13179
  name: "mx_cell_noise_vec3_3",
@@ -13182,7 +13182,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13182
13182
  name: "p",
13183
13183
  type: "vec4"
13184
13184
  }]
13185
- }), zR = /* @__PURE__ */ ui([
13185
+ }), zR = /* @__PURE__ */ hi([
13186
13186
  w8,
13187
13187
  S8,
13188
13188
  M8,
@@ -13371,7 +13371,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13371
13371
  type: "int"
13372
13372
  }
13373
13373
  ]
13374
- }), Lc = /* @__PURE__ */ ui([E8, C8]), R8 = /* @__PURE__ */ V(([t, e, r]) => {
13374
+ }), Lc = /* @__PURE__ */ hi([E8, C8]), R8 = /* @__PURE__ */ V(([t, e, r]) => {
13375
13375
  let i = C(r).toVar(), s = N(e).toVar(), n = se(t).toVar(), a = C().toVar(), o = C().toVar(), l = se(Ht(n.x, a), Ht(n.y, o)).toVar(), h = N(1e6).toVar();
13376
13376
  return bt({
13377
13377
  start: -1,
@@ -13536,7 +13536,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13536
13536
  type: "int"
13537
13537
  }
13538
13538
  ]
13539
- }), V8 = /* @__PURE__ */ ui([R8, O8]), L8 = /* @__PURE__ */ V(([t, e, r]) => {
13539
+ }), V8 = /* @__PURE__ */ hi([R8, O8]), L8 = /* @__PURE__ */ V(([t, e, r]) => {
13540
13540
  let i = C(r).toVar(), s = N(e).toVar(), n = I(t).toVar(), a = C().toVar(), o = C().toVar(), l = C().toVar(), h = I(Ht(n.x, a), Ht(n.y, o), Ht(n.z, l)).toVar(), u = se(1e6, 1e6).toVar();
13541
13541
  return bt({
13542
13542
  start: -1,
@@ -13584,7 +13584,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13584
13584
  type: "int"
13585
13585
  }
13586
13586
  ]
13587
- }), F8 = /* @__PURE__ */ ui([P8, L8]), z8 = /* @__PURE__ */ V(([t, e, r]) => {
13587
+ }), F8 = /* @__PURE__ */ hi([P8, L8]), z8 = /* @__PURE__ */ V(([t, e, r]) => {
13588
13588
  let i = C(r).toVar(), s = N(e).toVar(), n = I(t).toVar(), a = C().toVar(), o = C().toVar(), l = C().toVar(), h = I(Ht(n.x, a), Ht(n.y, o), Ht(n.z, l)).toVar(), u = I(1e6, 1e6, 1e6).toVar();
13589
13589
  return bt({
13590
13590
  start: -1,
@@ -13634,7 +13634,7 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13634
13634
  type: "int"
13635
13635
  }
13636
13636
  ]
13637
- }), B8 = /* @__PURE__ */ ui([I8, z8]), k8 = /* @__PURE__ */ V(([t]) => {
13637
+ }), B8 = /* @__PURE__ */ hi([I8, z8]), k8 = /* @__PURE__ */ V(([t]) => {
13638
13638
  let e = t.y, r = t.z, i = I().toVar();
13639
13639
  return je(e.lessThan(1e-4), () => {
13640
13640
  i.assign(I(r, r, r));
@@ -13675,9 +13675,9 @@ const qD = /* @__PURE__ */ V(([t = Yt()]) => {
13675
13675
  je(r.greaterThanEqual(a), () => {
13676
13676
  l.assign(i.sub(s).div(o));
13677
13677
  }).ElseIf(i.greaterThanEqual(a), () => {
13678
- l.assign(Tr(2, s.sub(r).div(o)));
13678
+ l.assign(wr(2, s.sub(r).div(o)));
13679
13679
  }).Else(() => {
13680
- l.assign(Tr(4, r.sub(i).div(o)));
13680
+ l.assign(wr(4, r.sub(i).div(o)));
13681
13681
  }), l.mulAssign(1 / 6), je(l.lessThan(0), () => {
13682
13682
  l.addAssign(1);
13683
13683
  });
@@ -13752,7 +13752,7 @@ var x = /* @__PURE__ */ Object.freeze({
13752
13752
  abs: Bt,
13753
13753
  acesFilmicToneMapping: cR,
13754
13754
  acos: Z1,
13755
- add: Tr,
13755
+ add: wr,
13756
13756
  addMethodChaining: q,
13757
13757
  addNodeElement: lB,
13758
13758
  agxToneMapping: dR,
@@ -14086,7 +14086,7 @@ var x = /* @__PURE__ */ Object.freeze({
14086
14086
  output: ac,
14087
14087
  outputStruct: SU,
14088
14088
  overlay: N6,
14089
- overloadingFn: ui,
14089
+ overloadingFn: hi,
14090
14090
  parabola: Pb,
14091
14091
  parallaxDirection: wE,
14092
14092
  parallaxUV: $B,
@@ -14102,7 +14102,7 @@ var x = /* @__PURE__ */ Object.freeze({
14102
14102
  positionGeometry: _m,
14103
14103
  positionLocal: ur,
14104
14104
  positionPrevious: ug,
14105
- positionView: yr,
14105
+ positionView: xr,
14106
14106
  positionViewDirection: Wt,
14107
14107
  positionWorld: Ra,
14108
14108
  positionWorldDirection: cv,
@@ -14741,7 +14741,7 @@ var jR = class {
14741
14741
  let e = t.type;
14742
14742
  if (t.isDataTexture) {
14743
14743
  if (e === Pi) return "int";
14744
- if (e === fr) return "uint";
14744
+ if (e === gr) return "uint";
14745
14745
  }
14746
14746
  return "float";
14747
14747
  }
@@ -15681,7 +15681,7 @@ var Z$ = class extends jo {
15681
15681
  let l = new o2(t, e), h = new _d(s, n, {
15682
15682
  format: Rs,
15683
15683
  type: Oi,
15684
- depthTexture: new yn(s, n, o.stencil ? Ro : fr, void 0, void 0, void 0, void 0, void 0, void 0, o.stencil ? Aa : Vn),
15684
+ depthTexture: new yn(s, n, o.stencil ? Ro : gr, void 0, void 0, void 0, void 0, void 0, void 0, o.stencil ? Aa : Vn),
15685
15685
  stencilBuffer: o.stencil,
15686
15686
  resolveDepthBuffer: !1,
15687
15687
  resolveStencilBuffer: !1
@@ -15721,7 +15721,7 @@ var Z$ = class extends jo {
15721
15721
  let h = new UF(t, t, t * e / r, 64, 64, !0, Math.PI - e / 2, e), u = new _d(n, a, {
15722
15722
  format: Rs,
15723
15723
  type: Oi,
15724
- depthTexture: new yn(n, a, l.stencil ? Ro : fr, void 0, void 0, void 0, void 0, void 0, void 0, l.stencil ? Aa : Vn),
15724
+ depthTexture: new yn(n, a, l.stencil ? Ro : gr, void 0, void 0, void 0, void 0, void 0, void 0, l.stencil ? Aa : Vn),
15725
15725
  stencilBuffer: l.stencil,
15726
15726
  resolveDepthBuffer: !1,
15727
15727
  resolveStencilBuffer: !1
@@ -15790,7 +15790,7 @@ var Z$ = class extends jo {
15790
15790
  if (r.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.');
15791
15791
  if (t.addEventListener("select", this._onSessionEvent), t.addEventListener("selectstart", this._onSessionEvent), t.addEventListener("selectend", this._onSessionEvent), t.addEventListener("squeeze", this._onSessionEvent), t.addEventListener("squeezestart", this._onSessionEvent), t.addEventListener("squeezeend", this._onSessionEvent), t.addEventListener("end", this._onSessionEnd), t.addEventListener("inputsourceschange", this._onInputSourcesChange), await r.makeXRCompatible(), this._currentPixelRatio = e.getPixelRatio(), e.getSize(this._currentSize), this._currentAnimationContext = e._animation.getContext(), this._currentAnimationLoop = e._animation.getAnimationLoop(), e._animation.stop(), this._useLayers === !0) {
15792
15792
  let n = null, a = null, o = null;
15793
- e.depth && (o = e.stencil ? i.DEPTH24_STENCIL8 : i.DEPTH_COMPONENT24, n = e.stencil ? Aa : Vn, a = e.stencil ? Ro : fr);
15793
+ e.depth && (o = e.stencil ? i.DEPTH24_STENCIL8 : i.DEPTH_COMPONENT24, n = e.stencil ? Aa : Vn, a = e.stencil ? Ro : gr);
15794
15794
  let l = {
15795
15795
  colorFormat: i.RGBA8,
15796
15796
  depthFormat: o,
@@ -15892,7 +15892,7 @@ function e9() {
15892
15892
  if (this._currentDepthNear = null, this._currentDepthFar = null, e._resetXRState(), this._session = null, this._xrRenderTarget = null, this._supportsLayers === !0) for (let r of this._layers) r.renderTarget = new _d(r.pixelwidth, r.pixelheight, {
15893
15893
  format: Rs,
15894
15894
  type: Oi,
15895
- depthTexture: new yn(r.pixelwidth, r.pixelheight, r.stencilBuffer ? Ro : fr, void 0, void 0, void 0, void 0, void 0, void 0, r.stencilBuffer ? Aa : Vn),
15895
+ depthTexture: new yn(r.pixelwidth, r.pixelheight, r.stencilBuffer ? Ro : gr, void 0, void 0, void 0, void 0, void 0, void 0, r.stencilBuffer ? Aa : Vn),
15896
15896
  stencilBuffer: r.stencilBuffer,
15897
15897
  resolveDepthBuffer: !1,
15898
15898
  resolveStencilBuffer: !1
@@ -16699,7 +16699,7 @@ ${r.code}
16699
16699
  Float32Array: hs,
16700
16700
  Uint8Array: Oi,
16701
16701
  Uint16Array: Hh,
16702
- Uint32Array: fr,
16702
+ Uint32Array: gr,
16703
16703
  Int8Array: Pd,
16704
16704
  Int16Array: Id,
16705
16705
  Int32Array: Pi,
@@ -16732,7 +16732,7 @@ ${r.code}
16732
16732
  let u = this.getDataFromNode(e), c = u.propertySizeName;
16733
16733
  c === void 0 && (c = l + "Size", this.getVarFromNode(e, c, "uint"), this.addLineFlowCode(`${c} = uint( textureSize( ${n}, 0 ).x )`, t), u.propertySizeName = c);
16734
16734
  let { itemSize: d } = i, m = "." + ju.join("").slice(0, d), p = `ivec2(${a} % ${c}, ${a} / ${c})`, f = this.generateTextureLoad(null, n, p, null, "0"), g = "vec4";
16735
- i.pbo.type === fr ? g = "uvec4" : i.pbo.type === Pi && (g = "ivec4"), this.addLineFlowCode(`${l} = ${g}(${f})${m}`, t), o.propertyName = l;
16735
+ i.pbo.type === gr ? g = "uvec4" : i.pbo.type === Pi && (g = "ivec4"), this.addLineFlowCode(`${l} = ${g}(${f})${m}`, t), o.propertyName = l;
16736
16736
  }
16737
16737
  return l;
16738
16738
  }
@@ -16767,7 +16767,7 @@ ${r.code}
16767
16767
  let a = null, o = !1;
16768
16768
  if (n.type === "texture" || n.type === "texture3D") {
16769
16769
  let h = n.node.value, u = "";
16770
- (h.isDataTexture === !0 || h.isData3DTexture === !0) && (h.type === fr ? u = "u" : h.type === Pi && (u = "i")), a = n.type === "texture3D" && h.isArrayTexture === !1 ? `${u}sampler3D ${n.name};` : h.compareFunction ? h.isArrayTexture === !0 ? `sampler2DArrayShadow ${n.name};` : `sampler2DShadow ${n.name};` : h.isArrayTexture === !0 || h.isDataArrayTexture === !0 || h.isCompressedArrayTexture === !0 ? `${u}sampler2DArray ${n.name};` : `${u}sampler2D ${n.name};`;
16770
+ (h.isDataTexture === !0 || h.isData3DTexture === !0) && (h.type === gr ? u = "u" : h.type === Pi && (u = "i")), a = n.type === "texture3D" && h.isArrayTexture === !1 ? `${u}sampler3D ${n.name};` : h.compareFunction ? h.isArrayTexture === !0 ? `sampler2DArrayShadow ${n.name};` : `sampler2DShadow ${n.name};` : h.isArrayTexture === !0 || h.isDataArrayTexture === !0 || h.isCompressedArrayTexture === !0 ? `${u}sampler2DArray ${n.name};` : `${u}sampler2D ${n.name};`;
16771
16771
  } else if (n.type === "cubeTexture") a = `samplerCube ${n.name};`;
16772
16772
  else if (n.type === "buffer") {
16773
16773
  let h = n.node, u = this.getType(h.bufferType), c = h.bufferCount, d = c > 0 ? c : "";
@@ -17546,7 +17546,7 @@ var b9 = class {
17546
17546
  if (t === Id) return r.SHORT;
17547
17547
  if (t === Hh) return r.UNSIGNED_SHORT;
17548
17548
  if (t === Pi) return r.INT;
17549
- if (t === fr) return r.UNSIGNED_INT;
17549
+ if (t === gr) return r.UNSIGNED_INT;
17550
17550
  if (t === hs) return r.FLOAT;
17551
17551
  if (t === Ui) return r.HALF_FLOAT;
17552
17552
  if (t === 1021) return r.ALPHA;
@@ -18637,7 +18637,7 @@ const Qh = {
18637
18637
  LineStrip: "line-strip",
18638
18638
  TriangleList: "triangle-list",
18639
18639
  TriangleStrip: "triangle-strip"
18640
- }, ai = {
18640
+ }, oi = {
18641
18641
  Never: "never",
18642
18642
  Less: "less",
18643
18643
  Equal: "equal",
@@ -19173,7 +19173,7 @@ var L9 = class {
19173
19173
  }
19174
19174
  getDepthBuffer(t = !0, e = !1) {
19175
19175
  let r = this.backend, { width: i, height: s } = r.getDrawingBufferSize(), n = this.depthTexture, a = r.get(n).texture, o, l;
19176
- if (e ? (o = Aa, l = Ro) : t && (o = Vn, l = fr), a !== void 0) {
19176
+ if (e ? (o = Aa, l = Ro) : t && (o = Vn, l = gr), a !== void 0) {
19177
19177
  if (n.image.width === i && n.image.height === s && n.format === o && n.type === l) return a;
19178
19178
  this.destroyTexture(n);
19179
19179
  }
@@ -19581,7 +19581,7 @@ function Lb(t, e = null) {
19581
19581
  case Hh:
19582
19582
  a = P.RGBA16Uint;
19583
19583
  break;
19584
- case fr:
19584
+ case gr:
19585
19585
  a = P.RGBA32Uint;
19586
19586
  break;
19587
19587
  case Pi:
@@ -19620,7 +19620,7 @@ function Lb(t, e = null) {
19620
19620
  case Hh:
19621
19621
  a = P.R16Uint;
19622
19622
  break;
19623
- case fr:
19623
+ case gr:
19624
19624
  a = P.R32Uint;
19625
19625
  break;
19626
19626
  case Pi:
@@ -19650,7 +19650,7 @@ function Lb(t, e = null) {
19650
19650
  case Hh:
19651
19651
  a = P.RG16Uint;
19652
19652
  break;
19653
- case fr:
19653
+ case gr:
19654
19654
  a = P.RG32Uint;
19655
19655
  break;
19656
19656
  case Pi:
@@ -19674,7 +19674,7 @@ function Lb(t, e = null) {
19674
19674
  case Hh:
19675
19675
  a = P.Depth16Unorm;
19676
19676
  break;
19677
- case fr:
19677
+ case gr:
19678
19678
  a = P.Depth24Plus;
19679
19679
  break;
19680
19680
  case hs:
@@ -19701,7 +19701,7 @@ function Lb(t, e = null) {
19701
19701
  case Pi:
19702
19702
  a = P.R32Sint;
19703
19703
  break;
19704
- case fr:
19704
+ case gr:
19705
19705
  a = P.R32Uint;
19706
19706
  break;
19707
19707
  default:
@@ -19713,7 +19713,7 @@ function Lb(t, e = null) {
19713
19713
  case Pi:
19714
19714
  a = P.RG32Sint;
19715
19715
  break;
19716
- case fr:
19716
+ case gr:
19717
19717
  a = P.RG32Uint;
19718
19718
  break;
19719
19719
  default:
@@ -19725,7 +19725,7 @@ function Lb(t, e = null) {
19725
19725
  case Pi:
19726
19726
  a = P.RGBA32Sint;
19727
19727
  break;
19728
- case fr:
19728
+ case gr:
19729
19729
  a = P.RGBA32Uint;
19730
19730
  break;
19731
19731
  default:
@@ -20658,7 +20658,7 @@ var Y9 = class {
20658
20658
  if (l > 1 && (o.multisampled = !0, n.texture.isDepthTexture || (o.sampleType = nl.UnfilterableFloat)), n.texture.isDepthTexture) e.compatibilityMode && n.texture.compareFunction === null ? o.sampleType = nl.UnfilterableFloat : o.sampleType = nl.Depth;
20659
20659
  else if (n.texture.isDataTexture || n.texture.isDataArrayTexture || n.texture.isData3DTexture) {
20660
20660
  let h = n.texture.type;
20661
- h === Pi ? o.sampleType = nl.SInt : h === fr ? o.sampleType = nl.UInt : h === hs && (this.backend.hasFeature("float32-filterable") ? o.sampleType = nl.Float : o.sampleType = nl.UnfilterableFloat);
20661
+ h === Pi ? o.sampleType = nl.SInt : h === gr ? o.sampleType = nl.UInt : h === hs && (this.backend.hasFeature("float32-filterable") ? o.sampleType = nl.Float : o.sampleType = nl.UnfilterableFloat);
20662
20662
  }
20663
20663
  n.isSampledCubeTexture ? o.viewDimension = ii.Cube : n.texture.isArrayTexture || n.texture.isDataArrayTexture || n.texture.isCompressedArrayTexture ? o.viewDimension = ii.TwoDArray : n.isSampledTexture3D && (o.viewDimension = ii.ThreeD), a.texture = o;
20664
20664
  } else console.error(`WebGPUBindingUtils: Unsupported binding "${n}".`);
@@ -20949,28 +20949,28 @@ var Y9 = class {
20949
20949
  let e, r = t.stencilFunc;
20950
20950
  switch (r) {
20951
20951
  case 512:
20952
- e = ai.Never;
20952
+ e = oi.Never;
20953
20953
  break;
20954
20954
  case 519:
20955
- e = ai.Always;
20955
+ e = oi.Always;
20956
20956
  break;
20957
20957
  case 513:
20958
- e = ai.Less;
20958
+ e = oi.Less;
20959
20959
  break;
20960
20960
  case 515:
20961
- e = ai.LessEqual;
20961
+ e = oi.LessEqual;
20962
20962
  break;
20963
20963
  case 514:
20964
- e = ai.Equal;
20964
+ e = oi.Equal;
20965
20965
  break;
20966
20966
  case 518:
20967
- e = ai.GreaterEqual;
20967
+ e = oi.GreaterEqual;
20968
20968
  break;
20969
20969
  case 516:
20970
- e = ai.Greater;
20970
+ e = oi.Greater;
20971
20971
  break;
20972
20972
  case 517:
20973
- e = ai.NotEqual;
20973
+ e = oi.NotEqual;
20974
20974
  break;
20975
20975
  default:
20976
20976
  console.error("THREE.WebGPURenderer: Invalid stencil function.", r);
@@ -21055,33 +21055,33 @@ var Y9 = class {
21055
21055
  }
21056
21056
  _getDepthCompare(t) {
21057
21057
  let e;
21058
- if (t.depthTest === !1) e = ai.Always;
21058
+ if (t.depthTest === !1) e = oi.Always;
21059
21059
  else {
21060
21060
  let r = t.depthFunc;
21061
21061
  switch (r) {
21062
21062
  case 0:
21063
- e = ai.Never;
21063
+ e = oi.Never;
21064
21064
  break;
21065
21065
  case 1:
21066
- e = ai.Always;
21066
+ e = oi.Always;
21067
21067
  break;
21068
21068
  case 2:
21069
- e = ai.Less;
21069
+ e = oi.Less;
21070
21070
  break;
21071
21071
  case 3:
21072
- e = ai.LessEqual;
21072
+ e = oi.LessEqual;
21073
21073
  break;
21074
21074
  case 4:
21075
- e = ai.Equal;
21075
+ e = oi.Equal;
21076
21076
  break;
21077
21077
  case 5:
21078
- e = ai.GreaterEqual;
21078
+ e = oi.GreaterEqual;
21079
21079
  break;
21080
21080
  case 6:
21081
- e = ai.Greater;
21081
+ e = oi.Greater;
21082
21082
  break;
21083
21083
  case 7:
21084
- e = ai.NotEqual;
21084
+ e = oi.NotEqual;
21085
21085
  break;
21086
21086
  default:
21087
21087
  console.error("THREE.WebGPUPipelineUtils: Invalid depth function.", r);
@@ -22667,9 +22667,9 @@ function Je(t) {
22667
22667
  let e = t.space || t.spaceId;
22668
22668
  return e instanceof Pe || (t.space = Pe.get(e)), t.alpha === void 0 && (t.alpha = 1), t;
22669
22669
  }
22670
- var oi, Pe = (oi = class {
22670
+ var li, Pe = (li = class {
22671
22671
  constructor(e) {
22672
- this.id = e.id, this.name = e.name, this.base = e.base ? oi.get(e.base) : null, this.aliases = e.aliases, this.base && (this.fromBase = e.fromBase, this.toBase = e.toBase);
22672
+ this.id = e.id, this.name = e.name, this.base = e.base ? li.get(e.base) : null, this.aliases = e.aliases, this.base && (this.fromBase = e.fromBase, this.toBase = e.toBase);
22673
22673
  let r = e.coords ?? this.base.coords;
22674
22674
  for (let s in r) "name" in r[s] || (r[s].name = s);
22675
22675
  this.coords = r;
@@ -22681,7 +22681,7 @@ var oi, Pe = (oi = class {
22681
22681
  this.formats.color?.id || (this.formats.color = {
22682
22682
  ...this.formats.color ?? {},
22683
22683
  id: e.cssId || this.id
22684
- }), e.gamutSpace ? this.gamutSpace = e.gamutSpace === "self" ? this : oi.get(e.gamutSpace) : this.isPolar ? this.gamutSpace = this.base : this.gamutSpace = this, this.gamutSpace.isUnbounded && (this.inGamut = (s, n) => !0), this.referred = e.referred, Object.defineProperty(this, "path", {
22684
+ }), e.gamutSpace ? this.gamutSpace = e.gamutSpace === "self" ? this : li.get(e.gamutSpace) : this.isPolar ? this.gamutSpace = this.base : this.gamutSpace = this, this.gamutSpace.isUnbounded && (this.inGamut = (s, n) => !0), this.referred = e.referred, Object.defineProperty(this, "path", {
22685
22685
  value: UJ(this).reverse(),
22686
22686
  writable: !1,
22687
22687
  enumerable: !0,
@@ -22724,7 +22724,7 @@ var oi, Pe = (oi = class {
22724
22724
  let o = Je(e);
22725
22725
  [e, r] = [o.space, o.coords];
22726
22726
  }
22727
- if (e = oi.get(e), this.equals(e)) return r;
22727
+ if (e = li.get(e), this.equals(e)) return r;
22728
22728
  r = r.map((o) => Number.isNaN(o) ? 0 : o);
22729
22729
  let i = this.path, s = e.path, n, a;
22730
22730
  for (let o = 0; o < i.length && i[o].equals(s[o]); o++) n = i[o], a = o;
@@ -22738,7 +22738,7 @@ var oi, Pe = (oi = class {
22738
22738
  let i = Je(e);
22739
22739
  [e, r] = [i.space, i.coords];
22740
22740
  }
22741
- return e = oi.get(e), e.to(this, r);
22741
+ return e = li.get(e), e.to(this, r);
22742
22742
  }
22743
22743
  toString() {
22744
22744
  return `${this.name} (${this.id})`;
@@ -22752,7 +22752,7 @@ var oi, Pe = (oi = class {
22752
22752
  return e;
22753
22753
  }
22754
22754
  static get all() {
22755
- return [...new Set(Object.values(oi.registry))];
22755
+ return [...new Set(Object.values(li.registry))];
22756
22756
  }
22757
22757
  static register(e, r) {
22758
22758
  if (arguments.length === 1 && (r = arguments[0], e = r.id), r = this.get(r), this.registry[e] && this.registry[e] !== r) throw Error(`Duplicate color space registration: '${e}'`);
@@ -22760,18 +22760,18 @@ var oi, Pe = (oi = class {
22760
22760
  return r;
22761
22761
  }
22762
22762
  static get(e, ...r) {
22763
- if (!e || e instanceof oi) return e;
22763
+ if (!e || e instanceof li) return e;
22764
22764
  if (Vo(e) === "string") {
22765
- let s = oi.registry[e.toLowerCase()];
22765
+ let s = li.registry[e.toLowerCase()];
22766
22766
  if (!s) throw TypeError(`No color space found with id = "${e}"`);
22767
22767
  return s;
22768
22768
  }
22769
- if (r.length) return oi.get(...r);
22769
+ if (r.length) return li.get(...r);
22770
22770
  throw TypeError(`${e} is not a valid color space`);
22771
22771
  }
22772
22772
  static resolveCoord(e, r) {
22773
22773
  let i = Vo(e), s, n;
22774
- if (i === "string" ? e.includes(".") ? [s, n] = e.split(".") : [s, n] = [, e] : Array.isArray(e) ? [s, n] = e : (s = e.space, n = e.coordId), s = oi.get(s), s || (s = r), !s) throw TypeError(`Cannot resolve coordinate reference ${e}: No color space specified and relative references are not allowed here`);
22774
+ if (i === "string" ? e.includes(".") ? [s, n] = e.split(".") : [s, n] = [, e] : Array.isArray(e) ? [s, n] = e : (s = e.space, n = e.coordId), s = li.get(s), s || (s = r), !s) throw TypeError(`Cannot resolve coordinate reference ${e}: No color space specified and relative references are not allowed here`);
22775
22775
  if (i = Vo(n), i === "number" || i === "string" && n >= 0) {
22776
22776
  let l = Object.entries(s.coords)[n];
22777
22777
  if (l) return {
@@ -22781,7 +22781,7 @@ var oi, Pe = (oi = class {
22781
22781
  ...l[1]
22782
22782
  };
22783
22783
  }
22784
- s = oi.get(s);
22784
+ s = li.get(s);
22785
22785
  let a = n.toLowerCase(), o = 0;
22786
22786
  for (let l in s.coords) {
22787
22787
  let h = s.coords[l];
@@ -22795,10 +22795,10 @@ var oi, Pe = (oi = class {
22795
22795
  }
22796
22796
  throw TypeError(`No "${n}" coordinate found in ${s.name}. Its coordinates are: ${Object.keys(s.coords).join(", ")}`);
22797
22797
  }
22798
- }, $y(oi, "registry", {}), $y(oi, "DEFAULT_FORMAT", {
22798
+ }, $y(li, "registry", {}), $y(li, "DEFAULT_FORMAT", {
22799
22799
  type: "functions",
22800
22800
  name: "color"
22801
- }), oi);
22801
+ }), li);
22802
22802
  function UJ(t) {
22803
22803
  let e = [t];
22804
22804
  for (let r = t; r = r.base; ) e.push(r);
@@ -22825,7 +22825,7 @@ function fM(t, { coords: e } = {}) {
22825
22825
  }
22826
22826
  return t;
22827
22827
  }
22828
- var li = new Pe({
22828
+ var ui = new Pe({
22829
22829
  id: "xyz-d65",
22830
22830
  name: "XYZ D65",
22831
22831
  coords: {
@@ -22851,7 +22851,7 @@ var li = new Pe({
22851
22851
  range: [0, 1],
22852
22852
  name: "Blue"
22853
22853
  }
22854
- }), e.base || (e.base = li), e.toXYZ_M && e.fromXYZ_M && (e.toBase ?? (e.toBase = (r) => {
22854
+ }), e.base || (e.base = ui), e.toXYZ_M && e.fromXYZ_M && (e.toBase ?? (e.toBase = (r) => {
22855
22855
  let i = Qt(e.toXYZ_M, r);
22856
22856
  return this.white !== this.base.white && (i = gg(this.white, this.base.white, i)), i;
22857
22857
  }), e.fromBase ?? (e.fromBase = (r) => (r = gg(this.base.white, this.white, r), Qt(e.fromXYZ_M, r)))), e.referred ?? (e.referred = "display"), super(e);
@@ -22885,9 +22885,9 @@ var tT = new Pe({
22885
22885
  id: "xyz-d50",
22886
22886
  name: "XYZ D50",
22887
22887
  white: "D50",
22888
- base: li,
22889
- fromBase: (t) => gg(li.white, "D50", t),
22890
- toBase: (t) => gg("D50", li.white, t)
22888
+ base: ui,
22889
+ fromBase: (t) => gg(ui.white, "D50", t),
22890
+ toBase: (t) => gg("D50", ui.white, t)
22891
22891
  });
22892
22892
  const gM = 24 / 116, Gp = 24389 / 27;
22893
22893
  let Y0 = Vi.D50;
@@ -23080,7 +23080,7 @@ var Mc = new Pe({
23080
23080
  b: { refRange: [-0.4, 0.4] }
23081
23081
  },
23082
23082
  white: "D65",
23083
- base: li,
23083
+ base: ui,
23084
23084
  fromBase(t) {
23085
23085
  let e = Qt($J, t), r = e.map((i) => Math.cbrt(i));
23086
23086
  return Qt(jJ, r);
@@ -23161,7 +23161,7 @@ var rT = new Pe({
23161
23161
  name: "Za"
23162
23162
  }
23163
23163
  },
23164
- base: li,
23164
+ base: ui,
23165
23165
  fromBase(t) {
23166
23166
  return t.map((e) => Math.max(e * 203, 0));
23167
23167
  },
@@ -23615,7 +23615,7 @@ var gQ = new Pe({
23615
23615
  name: "Hue"
23616
23616
  }
23617
23617
  },
23618
- base: li,
23618
+ base: ui,
23619
23619
  fromBase(t) {
23620
23620
  let e = I3(t, RM);
23621
23621
  return [
@@ -23701,7 +23701,7 @@ var cm = new Pe({
23701
23701
  name: "Tone"
23702
23702
  }
23703
23703
  },
23704
- base: li,
23704
+ base: ui,
23705
23705
  fromBase(t) {
23706
23706
  return vQ(t);
23707
23707
  },
@@ -24908,10 +24908,10 @@ function IQ(t, e) {
24908
24908
  return t = Je(t), e = Je(e), t.space === e.space && t.alpha === e.alpha && t.coords.every((r, i) => r === e.coords[i]);
24909
24909
  }
24910
24910
  function Do(t) {
24911
- return ds(t, [li, "y"]);
24911
+ return ds(t, [ui, "y"]);
24912
24912
  }
24913
24913
  function B3(t, e) {
24914
- Ua(t, [li, "y"], e);
24914
+ Ua(t, [ui, "y"], e);
24915
24915
  }
24916
24916
  function OQ(t) {
24917
24917
  Object.defineProperty(t.prototype, "luminance", {
@@ -24982,7 +24982,7 @@ var qb = new Pe({
24982
24982
  b: { refRange: [-125, 125] }
24983
24983
  },
24984
24984
  white: Q0,
24985
- base: li,
24985
+ base: ui,
24986
24986
  fromBase(t) {
24987
24987
  let e = t.map((i, s) => i / Q0[s]), r = e.map((i) => i > 0.008856451679035631 ? Math.cbrt(i) : (Xp * i + 16) / 116);
24988
24988
  return [
@@ -25031,11 +25031,11 @@ function $Q(t, e, r = {}) {
25031
25031
  throw TypeError(`Unknown contrast algorithm: ${i}`);
25032
25032
  }
25033
25033
  function by(t) {
25034
- let [e, r, i] = Lm(t, li), s = e + 15 * r + 3 * i;
25034
+ let [e, r, i] = Lm(t, ui), s = e + 15 * r + 3 * i;
25035
25035
  return [4 * e / s, 9 * r / s];
25036
25036
  }
25037
25037
  function k3(t) {
25038
- let [e, r, i] = Lm(t, li), s = e + r + i;
25038
+ let [e, r, i] = Lm(t, ui), s = e + r + i;
25039
25039
  return [e / s, r / s];
25040
25040
  }
25041
25041
  function GQ(t) {
@@ -25473,7 +25473,7 @@ var W3 = new Xi({
25473
25473
  });
25474
25474
  let q3 = Vi.D65;
25475
25475
  const GM = 24389 / 27, [jM, WM] = by({
25476
- space: li,
25476
+ space: ui,
25477
25477
  coords: q3
25478
25478
  });
25479
25479
  var H3 = new Pe({
@@ -25488,14 +25488,14 @@ var H3 = new Pe({
25488
25488
  v: { refRange: [-215, 215] }
25489
25489
  },
25490
25490
  white: q3,
25491
- base: li,
25491
+ base: ui,
25492
25492
  fromBase(t) {
25493
25493
  let e = [
25494
25494
  Lr(t[0]),
25495
25495
  Lr(t[1]),
25496
25496
  Lr(t[2])
25497
25497
  ], r = e[1], [i, s] = by({
25498
- space: li,
25498
+ space: ui,
25499
25499
  coords: e
25500
25500
  });
25501
25501
  if (!Number.isFinite(i) || !Number.isFinite(s)) return [
@@ -26116,7 +26116,7 @@ var cK = new Xi({
26116
26116
  REC_2100_PQ: oK,
26117
26117
  XYZ_ABS_D65: rT,
26118
26118
  XYZ_D50: tT,
26119
- XYZ_D65: li,
26119
+ XYZ_D65: ui,
26120
26120
  sRGB: Ac,
26121
26121
  sRGB_Linear: F3
26122
26122
  }), ss = class zi {
@@ -29054,7 +29054,7 @@ function UK() {
29054
29054
  }
29055
29055
  }), t;
29056
29056
  }
29057
- const pr = /* @__PURE__ */ UK();
29057
+ const fr = /* @__PURE__ */ UK();
29058
29058
  function Va(t) {
29059
29059
  return t < 0.04045 ? t * 0.0773993808 : Math.pow(t * 0.9478672986 + 0.0521327014, 2.4);
29060
29060
  }
@@ -33129,7 +33129,7 @@ class Xa {
33129
33129
  * @return {Color} A reference to this color.
33130
33130
  */
33131
33131
  setHex(e, r = Es) {
33132
- return e = Math.floor(e), this.r = (e >> 16 & 255) / 255, this.g = (e >> 8 & 255) / 255, this.b = (e & 255) / 255, pr.colorSpaceToWorking(this, r), this;
33132
+ return e = Math.floor(e), this.r = (e >> 16 & 255) / 255, this.g = (e >> 8 & 255) / 255, this.b = (e & 255) / 255, fr.colorSpaceToWorking(this, r), this;
33133
33133
  }
33134
33134
  /**
33135
33135
  * Sets this color from RGB values.
@@ -33140,8 +33140,8 @@ class Xa {
33140
33140
  * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space.
33141
33141
  * @return {Color} A reference to this color.
33142
33142
  */
33143
- setRGB(e, r, i, s = pr.workingColorSpace) {
33144
- return this.r = e, this.g = r, this.b = i, pr.colorSpaceToWorking(this, s), this;
33143
+ setRGB(e, r, i, s = fr.workingColorSpace) {
33144
+ return this.r = e, this.g = r, this.b = i, fr.colorSpaceToWorking(this, s), this;
33145
33145
  }
33146
33146
  /**
33147
33147
  * Sets this color from RGB values.
@@ -33152,14 +33152,14 @@ class Xa {
33152
33152
  * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space.
33153
33153
  * @return {Color} A reference to this color.
33154
33154
  */
33155
- setHSL(e, r, i, s = pr.workingColorSpace) {
33155
+ setHSL(e, r, i, s = fr.workingColorSpace) {
33156
33156
  if (e = uT(e, 1), r = ot(r, 0, 1), i = ot(i, 0, 1), r === 0)
33157
33157
  this.r = this.g = this.b = i;
33158
33158
  else {
33159
33159
  const n = i <= 0.5 ? i * (1 + r) : i + r - i * r, a = 2 * i - n;
33160
33160
  this.r = Tx(a, n, e + 1 / 3), this.g = Tx(a, n, e), this.b = Tx(a, n, e - 1 / 3);
33161
33161
  }
33162
- return pr.colorSpaceToWorking(this, s), this;
33162
+ return fr.colorSpaceToWorking(this, s), this;
33163
33163
  }
33164
33164
  /**
33165
33165
  * Sets this color from a CSS-style string. For example, `rgb(250, 0,0)`,
@@ -33303,7 +33303,7 @@ class Xa {
33303
33303
  * @return {number} The hexadecimal value.
33304
33304
  */
33305
33305
  getHex(e = Es) {
33306
- return pr.workingToColorSpace(fi.copy(this), e), Math.round(ot(fi.r * 255, 0, 255)) * 65536 + Math.round(ot(fi.g * 255, 0, 255)) * 256 + Math.round(ot(fi.b * 255, 0, 255));
33306
+ return fr.workingToColorSpace(fi.copy(this), e), Math.round(ot(fi.r * 255, 0, 255)) * 65536 + Math.round(ot(fi.g * 255, 0, 255)) * 256 + Math.round(ot(fi.b * 255, 0, 255));
33307
33307
  }
33308
33308
  /**
33309
33309
  * Returns the hexadecimal value of this color as a string (for example, 'FFFFFF').
@@ -33322,8 +33322,8 @@ class Xa {
33322
33322
  * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space.
33323
33323
  * @return {{h:number,s:number,l:number}} The HSL representation of this color.
33324
33324
  */
33325
- getHSL(e, r = pr.workingColorSpace) {
33326
- pr.workingToColorSpace(fi.copy(this), r);
33325
+ getHSL(e, r = fr.workingColorSpace) {
33326
+ fr.workingToColorSpace(fi.copy(this), r);
33327
33327
  const i = fi.r, s = fi.g, n = fi.b, a = Math.max(i, s, n), o = Math.min(i, s, n);
33328
33328
  let l, h;
33329
33329
  const u = (o + a) / 2;
@@ -33353,8 +33353,8 @@ class Xa {
33353
33353
  * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space.
33354
33354
  * @return {Color} The RGB representation of this color.
33355
33355
  */
33356
- getRGB(e, r = pr.workingColorSpace) {
33357
- return pr.workingToColorSpace(fi.copy(this), r), e.r = fi.r, e.g = fi.g, e.b = fi.b, e;
33356
+ getRGB(e, r = fr.workingColorSpace) {
33357
+ return fr.workingToColorSpace(fi.copy(this), r), e.r = fi.r, e.g = fi.g, e.b = fi.b, e;
33358
33358
  }
33359
33359
  /**
33360
33360
  * Returns the value of this color as a CSS style string. Example: `rgb(255,0,0)`.
@@ -33363,7 +33363,7 @@ class Xa {
33363
33363
  * @return {string} The CSS representation of this color.
33364
33364
  */
33365
33365
  getStyle(e = Es) {
33366
- pr.workingToColorSpace(fi.copy(this), e);
33366
+ fr.workingToColorSpace(fi.copy(this), e);
33367
33367
  const r = fi.r, i = fi.g, s = fi.b;
33368
33368
  return e !== Es ? `color(${e} ${r.toFixed(3)} ${i.toFixed(3)} ${s.toFixed(3)})` : `rgb(${Math.round(r * 255)},${Math.round(i * 255)},${Math.round(s * 255)})`;
33369
33369
  }
@@ -36197,25 +36197,25 @@ const Ol = {
36197
36197
  fragmentNode: ({ uniforms: t, childNode: e, onCleanup: r, onBeforeRender: i, dimensions: s }) => {
36198
36198
  let { vec2: n, vec3: a, vec4: o, floor: l, fract: h, dot: u, ceil: c, sqrt: d, screenUV: m, convertToTexture: p, texture: f } = Ie;
36199
36199
  if (!e) return o(0, 0, 0, 0);
36200
- let g = Math.round(s.width), y = Math.round(s.height), T = p(e, g, y), w = 2048, v = (Qr, Js, dr, de) => {
36200
+ let g = Math.round(s.width), y = Math.round(s.height), T = p(e, g, y), w = 2048, v = (Qr, Js, mr, de) => {
36201
36201
  let le = Qr.length, be = Math.max(2, Math.ceil(Math.sqrt(le))), xe = Math.max(1, 2 / de), We = Math.min(128 * xe, w / be), Vt = We * 0.75, st = document.createElement("canvas");
36202
36202
  st.width = w, st.height = w;
36203
36203
  let ct = st.getContext("2d");
36204
- ct.clearRect(0, 0, st.width, st.height), ct.fillStyle = "#ffffff", ct.font = `${Vt}px ${dr}`, ct.textAlign = "center", ct.textBaseline = "middle";
36204
+ ct.clearRect(0, 0, st.width, st.height), ct.fillStyle = "#ffffff", ct.font = `${Vt}px ${mr}`, ct.textAlign = "center", ct.textBaseline = "middle";
36205
36205
  for (let et = 0; et < le; et++) {
36206
36206
  let dt = Qr[et], Er = Math.floor(et / be), Ni = et % be, aa = Ni * We + We / 2, Qs = Er * We + We / 2;
36207
36207
  ct.fillText(dt, aa, Qs);
36208
36208
  }
36209
- let Ut = ct.getImageData(0, 0, st.width, st.height), mr = new Uint8Array(Ut.data), Mt = be * We / w;
36209
+ let Ut = ct.getImageData(0, 0, st.width, st.height), pr = new Uint8Array(Ut.data), Mt = be * We / w;
36210
36210
  return {
36211
- data: mr,
36211
+ data: pr,
36212
36212
  width: w,
36213
36213
  height: w,
36214
36214
  atlasSize: be,
36215
36215
  cellSize: Js,
36216
36216
  charCount: le,
36217
36217
  characters: Qr,
36218
- fontFamily: dr,
36218
+ fontFamily: mr,
36219
36219
  uvScale: Mt
36220
36220
  };
36221
36221
  }, M = v(t.characters.uniform.value, t.cellSize.uniform.value, t.fontFamily.uniform.value, t.spacing.uniform.value);
@@ -36226,12 +36226,12 @@ const Ol = {
36226
36226
  i(() => {
36227
36227
  let Qr = Date.now();
36228
36228
  if (Qr - Q < 16) return;
36229
- let Js = t.characters.uniform.value, dr = t.cellSize.uniform.value, de = t.fontFamily.uniform.value, le = t.spacing.uniform.value;
36230
- (Js !== A || dr !== O || de !== $ || le !== j) && (console.log(`Updating atlas texture: cellSize ${O} → ${dr}, spacing ${j} → ${le}`), Q = Qr, M = v(Js, dr, de, le), S.image.data = M.data, S.needsUpdate = !0, re.value = M.charCount, K.value = M.cellSize, fe.value = M.uvScale, A = Js, O = dr, $ = de, j = le);
36229
+ let Js = t.characters.uniform.value, mr = t.cellSize.uniform.value, de = t.fontFamily.uniform.value, le = t.spacing.uniform.value;
36230
+ (Js !== A || mr !== O || de !== $ || le !== j) && (console.log(`Updating atlas texture: cellSize ${O} → ${mr}, spacing ${j} → ${le}`), Q = Qr, M = v(Js, mr, de, le), S.image.data = M.data, S.needsUpdate = !0, re.value = M.charCount, K.value = M.cellSize, fe.value = M.uvScale, A = Js, O = mr, $ = de, j = le);
36231
36231
  }), r(() => {
36232
36232
  S.dispose();
36233
36233
  });
36234
- let re = $d(M.charCount), K = $d(M.cellSize), fe = $d(M.uvScale), oe = K.mul(1.5), ge = n(g, y).div(oe), he = m.mul(ge), Te = l(he), ce = h(he), ye = t.spacing.uniform, Ve = n(0.5), at = ce.sub(Ve), wt = at.div(ye), Xe = wt.add(Ve), sr = i3(o3(py(at), n(ye.mul(0.5)))), nr = Te.add(n(0.5)).div(ge), Ot = T.sample(nr), St = u(Ot.rgb, a(0.299, 0.587, 0.114)), Gt = re, Nr = St.mul(0.8).add(0.1), Jr = Nr.mul(Gt), jt = l(Jr.min(Gt.sub(1e-4))), Ar = c(d(Gt)), ci = jt.mod(Ar), Yi = l(jt.div(Ar)), Ys = lm(1).div(Ar).mul(fe), Zs = n(ci, Yi).mul(Ys), sa = Zs.add(Xe.mul(Ys)), _n = _.sample(sa), Ja = u(_n.rgb, a(0.299, 0.587, 0.114)), na = Ja.lessThan(0.1);
36234
+ let re = $d(M.charCount), K = $d(M.cellSize), fe = $d(M.uvScale), oe = K.mul(1.5), ge = n(g, y).div(oe), he = m.mul(ge), Te = l(he), ce = h(he), ye = t.spacing.uniform, Ve = n(0.5), at = ce.sub(Ve), wt = at.div(ye), Xe = wt.add(Ve), sr = i3(o3(py(at), n(ye.mul(0.5)))), nr = Te.add(n(0.5)).div(ge), Ot = T.sample(nr), St = u(Ot.rgb, a(0.299, 0.587, 0.114)), Gt = re, Ar = St.mul(0.8).add(0.1), Jr = Ar.mul(Gt), jt = l(Jr.min(Gt.sub(1e-4))), dr = c(d(Gt)), ai = jt.mod(dr), Yi = l(jt.div(dr)), Ys = lm(1).div(dr).mul(fe), Zs = n(ai, Yi).mul(Ys), sa = Zs.add(Xe.mul(Ys)), _n = _.sample(sa), Ja = u(_n.rgb, a(0.299, 0.587, 0.114)), na = Ja.lessThan(0.1);
36235
36235
  return o(_n.rgb.mul(Ot.rgb), c3(u3(na, sr), lm(0), Ot.a));
36236
36236
  }
36237
36237
  }, Vl = {
@@ -36398,8 +36398,8 @@ const Ol = {
36398
36398
  }
36399
36399
  },
36400
36400
  fragmentNode: ({ uniforms: t }) => {
36401
- let { vec2: e, vec3: r, vec4: i, float: s, screenUV: n, smoothstep: a, sin: o, length: l, timerLocal: h, viewportSize: u, mix: c, pow: d, max: m, normalize: p, dot: f, reflect: g } = Ie, y = h().mul(t.speed.uniform).add(t.seed.uniform), T = t.colorA.uniform, w = t.colorB.uniform, v = t.colorC.uniform, M = t.size.uniform, S = t.conformity.uniform, _ = t.edgeWidth.uniform, A = t.edgeCurve.uniform, O = t.highlightIntensity.uniform, $ = t.highlightLightX.uniform, j = t.highlightLightY.uniform, Q = t.highlightLightZ.uniform, re = t.highlightColor.uniform, K = s(0.5), fe = u.x.div(u.y), oe = e(n.x.mul(fe), n.y), ge = e(t.center.uniform.x.mul(fe), t.center.uniform.y.oneMinus()), he = oe.sub(ge), Te = l(he), ce = M, ye = s(4), Ve = o(he.x.mul(ye.mul(s(0.8))).add(y.mul(s(0.8)))).mul(o(he.y.mul(ye.mul(s(0.7))).add(y.mul(s(0.6))))).add(o(he.x.mul(ye.mul(s(1.2))).sub(he.y.mul(ye.mul(s(0.9))).add(y.mul(s(0.4)))))).mul(s(0.15)).mul(S), at = o(he.x.mul(ye.mul(s(1.4))).sub(y.mul(s(0.5)))).mul(o(he.y.mul(ye.mul(s(1.1))).add(y.mul(s(0.7))))).mul(s(0.12)).mul(S).mul(a(s(0.15), s(0.25), K)), wt = o(he.x.mul(ye.mul(s(1.8))).add(he.y.mul(ye.mul(s(1.6))).add(y.mul(s(0.3))))).add(o(he.x.mul(ye.mul(s(0.6))).sub(y.mul(s(0.9))))).mul(s(0.1)).mul(S).mul(a(s(0.3), s(0.4), K)), Xe = o(he.x.mul(ye.mul(s(2.2))).add(y.mul(s(0.2)))).mul(o(he.y.mul(ye.mul(s(1.9))).sub(y.mul(s(0.8))))).mul(s(0.08)).mul(S).mul(a(s(0.45), s(0.55), K)), sr = o(he.x.mul(ye.mul(s(2.8))).sub(he.y.mul(ye.mul(s(2.4))).add(y.mul(s(0.6))))).mul(s(0.06)).mul(S).mul(a(s(0.6), s(0.7), K)), nr = o(he.x.mul(ye.mul(s(3.2))).add(y.mul(s(1.1)))).add(o(he.y.mul(ye.mul(s(3.5))).sub(y.mul(s(0.4))))).mul(s(0.04)).mul(S).mul(a(s(0.75), s(0.85), K)), Ot = Ve.add(at).add(wt).add(Xe).add(sr).add(nr), St = ce.add(Ot), Gt = a(St.add(_), St.sub(_), Te), Nr = d(Gt, A), Jr = l(he), jt = St, Ar = a(s(0), jt, Jr), ci = s(1).sub(Ar.mul(s(0.1))), Yi = p(r(he.x.mul(Ar.add(s(0.2))), he.y.mul(Ar.add(s(0.2))), ci)), Ys = p(r($, j, Q)), Zs = r(s(0), s(0), s(1)), sa = g(Ys.negate(), Yi), _n = s(32), Ja = m(s(0), f(sa, Zs)), na = d(Ja, _n), Qr = Ar.mul(s(0.5)).add(s(0.5)), Js = na.mul(Qr), dr = Js.mul(O).mul(Nr), de = he.x.mul(s(3)), le = he.y.mul(s(3)), be = o(de.add(y.mul(s(0.4)))).mul(o(le.add(y.mul(s(0.3))))).add(o(de.mul(s(0.7)).add(le.mul(s(0.8))).add(y.mul(s(0.2))))).mul(s(0.5)).add(s(0.5)), xe = o(de.mul(s(1.3)).sub(y.mul(s(0.5)))).mul(o(le.mul(s(1.1)).add(y.mul(s(0.6))))).add(o(de.mul(s(0.5)).sub(le.mul(s(0.6)).sub(y.mul(s(0.3)))))).mul(s(0.5)).add(s(0.5)), We = o(de.mul(s(0.8)).add(le.mul(s(1.2)).add(y.mul(s(0.1))))).mul(s(0.3)).add(s(0.5)), Vt = a(s(0.1), s(0.9), be), st = a(s(0.08), s(0.99), xe.mul(We)), ct = c(T.rgb, w.rgb, Vt), Ut = c(ct, v.rgb, st), mr = T.a.add(w.a).add(v.a).div(s(3)), Mt = re.rgb.mul(dr), et = Ut.add(Mt);
36402
- return i(et, mr.mul(Nr));
36401
+ let { vec2: e, vec3: r, vec4: i, float: s, screenUV: n, smoothstep: a, sin: o, length: l, timerLocal: h, viewportSize: u, mix: c, pow: d, max: m, normalize: p, dot: f, reflect: g } = Ie, y = h().mul(t.speed.uniform).add(t.seed.uniform), T = t.colorA.uniform, w = t.colorB.uniform, v = t.colorC.uniform, M = t.size.uniform, S = t.conformity.uniform, _ = t.edgeWidth.uniform, A = t.edgeCurve.uniform, O = t.highlightIntensity.uniform, $ = t.highlightLightX.uniform, j = t.highlightLightY.uniform, Q = t.highlightLightZ.uniform, re = t.highlightColor.uniform, K = s(0.5), fe = u.x.div(u.y), oe = e(n.x.mul(fe), n.y), ge = e(t.center.uniform.x.mul(fe), t.center.uniform.y.oneMinus()), he = oe.sub(ge), Te = l(he), ce = M, ye = s(4), Ve = o(he.x.mul(ye.mul(s(0.8))).add(y.mul(s(0.8)))).mul(o(he.y.mul(ye.mul(s(0.7))).add(y.mul(s(0.6))))).add(o(he.x.mul(ye.mul(s(1.2))).sub(he.y.mul(ye.mul(s(0.9))).add(y.mul(s(0.4)))))).mul(s(0.15)).mul(S), at = o(he.x.mul(ye.mul(s(1.4))).sub(y.mul(s(0.5)))).mul(o(he.y.mul(ye.mul(s(1.1))).add(y.mul(s(0.7))))).mul(s(0.12)).mul(S).mul(a(s(0.15), s(0.25), K)), wt = o(he.x.mul(ye.mul(s(1.8))).add(he.y.mul(ye.mul(s(1.6))).add(y.mul(s(0.3))))).add(o(he.x.mul(ye.mul(s(0.6))).sub(y.mul(s(0.9))))).mul(s(0.1)).mul(S).mul(a(s(0.3), s(0.4), K)), Xe = o(he.x.mul(ye.mul(s(2.2))).add(y.mul(s(0.2)))).mul(o(he.y.mul(ye.mul(s(1.9))).sub(y.mul(s(0.8))))).mul(s(0.08)).mul(S).mul(a(s(0.45), s(0.55), K)), sr = o(he.x.mul(ye.mul(s(2.8))).sub(he.y.mul(ye.mul(s(2.4))).add(y.mul(s(0.6))))).mul(s(0.06)).mul(S).mul(a(s(0.6), s(0.7), K)), nr = o(he.x.mul(ye.mul(s(3.2))).add(y.mul(s(1.1)))).add(o(he.y.mul(ye.mul(s(3.5))).sub(y.mul(s(0.4))))).mul(s(0.04)).mul(S).mul(a(s(0.75), s(0.85), K)), Ot = Ve.add(at).add(wt).add(Xe).add(sr).add(nr), St = ce.add(Ot), Gt = a(St.add(_), St.sub(_), Te), Ar = d(Gt, A), Jr = l(he), jt = St, dr = a(s(0), jt, Jr), ai = s(1).sub(dr.mul(s(0.1))), Yi = p(r(he.x.mul(dr.add(s(0.2))), he.y.mul(dr.add(s(0.2))), ai)), Ys = p(r($, j, Q)), Zs = r(s(0), s(0), s(1)), sa = g(Ys.negate(), Yi), _n = s(32), Ja = m(s(0), f(sa, Zs)), na = d(Ja, _n), Qr = dr.mul(s(0.5)).add(s(0.5)), Js = na.mul(Qr), mr = Js.mul(O).mul(Ar), de = he.x.mul(s(3)), le = he.y.mul(s(3)), be = o(de.add(y.mul(s(0.4)))).mul(o(le.add(y.mul(s(0.3))))).add(o(de.mul(s(0.7)).add(le.mul(s(0.8))).add(y.mul(s(0.2))))).mul(s(0.5)).add(s(0.5)), xe = o(de.mul(s(1.3)).sub(y.mul(s(0.5)))).mul(o(le.mul(s(1.1)).add(y.mul(s(0.6))))).add(o(de.mul(s(0.5)).sub(le.mul(s(0.6)).sub(y.mul(s(0.3)))))).mul(s(0.5)).add(s(0.5)), We = o(de.mul(s(0.8)).add(le.mul(s(1.2)).add(y.mul(s(0.1))))).mul(s(0.3)).add(s(0.5)), Vt = a(s(0.1), s(0.9), be), st = a(s(0.08), s(0.99), xe.mul(We)), ct = c(T.rgb, w.rgb, Vt), Ut = c(ct, v.rgb, st), pr = T.a.add(w.a).add(v.a).div(s(3)), Mt = re.rgb.mul(mr), et = Ut.add(Mt);
36402
+ return i(et, pr.mul(Ar));
36403
36403
  }
36404
36404
  }, Ll = {
36405
36405
  name: "Blur",
@@ -36666,29 +36666,29 @@ const Ol = {
36666
36666
  p.magFilter = ps, p.minFilter = ps, p.needsUpdate = !0;
36667
36667
  let f = l(m), g = l(p), y = a(0.5), T = a(0.5), w = a(0), v = a(0), M = 0.5, S = 0.5, _ = Date.now();
36668
36668
  e(({ pointer: Qr }) => {
36669
- let Js = Date.now(), dr = Math.min((Js - _) / 1e3, 0.016);
36669
+ let Js = Date.now(), mr = Math.min((Js - _) / 1e3, 0.016);
36670
36670
  _ = Js;
36671
- let de = dr > 0 ? (Qr.x - M) / dr : 0, le = dr > 0 ? (Qr.y - S) / dr : 0;
36671
+ let de = mr > 0 ? (Qr.x - M) / mr : 0, le = mr > 0 ? (Qr.y - S) / mr : 0;
36672
36672
  w.value = w.value * 0.85 + de * 0.15, v.value = v.value * 0.85 + le * 0.15, y.value = Qr.x, T.value = Qr.y;
36673
- let be = t.duration.uniform.value, xe = t.intensity.uniform.value, We = t.radius.uniform.value * 0.05, Vt = t.momentum.uniform.value, st = new Float32Array(c), ct = new Float32Array(d), Ut = 1 - dr / Math.max(be / 150 * 5, 1);
36674
- for (let mr = 0; mr < 16384 * 2; mr++) st[mr] = c[mr] * Ut;
36675
- for (let mr = 0; mr < 128; mr++) for (let Mt = 0; Mt < 128; Mt++) {
36676
- let et = (mr * 128 + Mt) * 2, dt = 1 - dr / Math.max(be / 150 * 20, 1);
36673
+ let be = t.duration.uniform.value, xe = t.intensity.uniform.value, We = t.radius.uniform.value * 0.05, Vt = t.momentum.uniform.value, st = new Float32Array(c), ct = new Float32Array(d), Ut = 1 - mr / Math.max(be / 150 * 5, 1);
36674
+ for (let pr = 0; pr < 16384 * 2; pr++) st[pr] = c[pr] * Ut;
36675
+ for (let pr = 0; pr < 128; pr++) for (let Mt = 0; Mt < 128; Mt++) {
36676
+ let et = (pr * 128 + Mt) * 2, dt = 1 - mr / Math.max(be / 150 * 20, 1);
36677
36677
  if (ct[et] = d[et] * dt, ct[et + 1] = d[et + 1] * dt, Math.abs(c[et]) > 1e-3 || Math.abs(c[et + 1]) > 1e-3) {
36678
- let Er = Vt * 50 * dr, Ni = Mt - c[et] * Er, aa = mr - c[et + 1] * Er, Qs = Math.floor(Ni), oa = Math.floor(aa), $c = Qs + 1, Zo = oa + 1;
36678
+ let Er = Vt * 50 * mr, Ni = Mt - c[et] * Er, aa = pr - c[et + 1] * Er, Qs = Math.floor(Ni), oa = Math.floor(aa), $c = Qs + 1, Zo = oa + 1;
36679
36679
  if (Qs >= 0 && oa >= 0 && $c < 128 && Zo < 128) {
36680
36680
  let Qa = Ni - Qs, th = aa - oa, IL = (oa * 128 + Qs) * 2, OL = (oa * 128 + $c) * 2, VL = (Zo * 128 + Qs) * 2, LL = (Zo * 128 + $c) * 2, FL = d[IL] * (1 - Qa) * (1 - th) + d[OL] * Qa * (1 - th) + d[VL] * (1 - Qa) * th + d[LL] * Qa * th;
36681
36681
  ct[et] = FL * dt;
36682
36682
  }
36683
36683
  }
36684
36684
  }
36685
- for (let mr = 0; mr < 128; mr++) for (let Mt = 0; Mt < 128; Mt++) {
36686
- let et = (mr * 128 + Mt) * 2, dt = (Mt + 0.5) / 128, Er = (mr + 0.5) / 128, Ni = dt - Qr.x, aa = Er - Qr.y, Qs = Math.sqrt(Ni * Ni + aa * aa), oa = Math.sqrt(w.value * w.value + v.value * v.value), $c = Math.min(oa * oa * 20, 1), Zo = We * $c;
36685
+ for (let pr = 0; pr < 128; pr++) for (let Mt = 0; Mt < 128; Mt++) {
36686
+ let et = (pr * 128 + Mt) * 2, dt = (Mt + 0.5) / 128, Er = (pr + 0.5) / 128, Ni = dt - Qr.x, aa = Er - Qr.y, Qs = Math.sqrt(Ni * Ni + aa * aa), oa = Math.sqrt(w.value * w.value + v.value * v.value), $c = Math.min(oa * oa * 20, 1), Zo = We * $c;
36687
36687
  if (Qs < Zo * 2 && Math.abs(de) + Math.abs(le) > 0.01) {
36688
36688
  let Qa = Math.exp(-Qs * Qs / (Zo * Zo));
36689
- st[et] += w.value * Qa * (xe * 100) * dr * 0.01, st[et + 1] += v.value * Qa * (xe * 100) * dr * 0.01;
36689
+ st[et] += w.value * Qa * (xe * 100) * mr * 0.01, st[et + 1] += v.value * Qa * (xe * 100) * mr * 0.01;
36690
36690
  let th = Math.min(oa * 10, 1);
36691
- ct[et] += Qa * (xe * 100) * dr * 0.01 * th, ct[et + 1] = 0;
36691
+ ct[et] += Qa * (xe * 100) * mr * 0.01 * th, ct[et + 1] = 0;
36692
36692
  }
36693
36693
  st[et] = Math.max(-1, Math.min(1, st[et])), st[et + 1] = Math.max(-1, Math.min(1, st[et + 1])), ct[et] = Math.max(0, Math.min(1, ct[et])), ct[et + 1] = 0;
36694
36694
  }
@@ -36696,7 +36696,7 @@ const Ol = {
36696
36696
  }), r(() => {
36697
36697
  m.dispose(), p.dispose();
36698
36698
  });
36699
- let A = g.sample(o).x, O = i(n(1 / 128), n(1 / 128)), $ = g.sample(o.add(i(O.x, n(0)))).x, j = g.sample(o.add(i(n(0), O.y))).x, Q = g.sample(o.add(i(O.x.negate(), n(0)))).x, re = g.sample(o.add(i(n(0), O.y.negate()))).x, K = A.add($).add(j).add(Q).add(re).mul(n(0.2)), fe = h(n(0), n(0.1), K), oe = i(n(1 / 128), n(1 / 128)), ge = f.sample(o).xy, he = f.sample(o.add(i(oe.x, n(0)))).xy, Te = f.sample(o.add(i(n(0), oe.y))).xy, ce = f.sample(o.add(i(oe.x.negate(), n(0)))).xy, ye = f.sample(o.add(i(n(0), oe.y.negate()))).xy, Ve = ge.add(he).add(Te).add(ce).add(ye).mul(n(0.2)), at = t.baseColor.uniform, wt = t.upColor.uniform, Xe = t.downColor.uniform, sr = t.leftColor.uniform, nr = t.rightColor.uniform, Ot = Ve.x.mul(Ve.x).add(Ve.y.mul(Ve.y)).sqrt(), St = h(n(0.01), n(0.1), Ot), Gt = Ve.x.div(Ot.add(n(1e-3))), Nr = Ve.y.div(Ot.add(n(1e-3))), Jr = h(n(0), n(0.7), Gt.max(n(0))), jt = h(n(0), n(0.7), Gt.negate().max(n(0))), Ar = h(n(0), n(0.7), Nr.max(n(0))), ci = h(n(0), n(0.7), Nr.negate().max(n(0))), Yi = sr.mul(jt).add(nr.mul(Jr)), Ys = Xe.mul(ci).add(wt.mul(Ar)), Zs = jt.add(Jr), sa = Ar.add(ci), _n = Zs.add(sa).add(n(1e-3)), Ja = Yi.mul(Zs.div(_n)).add(Ys.mul(sa.div(_n))), na = u(at, Ja, St);
36699
+ let A = g.sample(o).x, O = i(n(1 / 128), n(1 / 128)), $ = g.sample(o.add(i(O.x, n(0)))).x, j = g.sample(o.add(i(n(0), O.y))).x, Q = g.sample(o.add(i(O.x.negate(), n(0)))).x, re = g.sample(o.add(i(n(0), O.y.negate()))).x, K = A.add($).add(j).add(Q).add(re).mul(n(0.2)), fe = h(n(0), n(0.1), K), oe = i(n(1 / 128), n(1 / 128)), ge = f.sample(o).xy, he = f.sample(o.add(i(oe.x, n(0)))).xy, Te = f.sample(o.add(i(n(0), oe.y))).xy, ce = f.sample(o.add(i(oe.x.negate(), n(0)))).xy, ye = f.sample(o.add(i(n(0), oe.y.negate()))).xy, Ve = ge.add(he).add(Te).add(ce).add(ye).mul(n(0.2)), at = t.baseColor.uniform, wt = t.upColor.uniform, Xe = t.downColor.uniform, sr = t.leftColor.uniform, nr = t.rightColor.uniform, Ot = Ve.x.mul(Ve.x).add(Ve.y.mul(Ve.y)).sqrt(), St = h(n(0.01), n(0.1), Ot), Gt = Ve.x.div(Ot.add(n(1e-3))), Ar = Ve.y.div(Ot.add(n(1e-3))), Jr = h(n(0), n(0.7), Gt.max(n(0))), jt = h(n(0), n(0.7), Gt.negate().max(n(0))), dr = h(n(0), n(0.7), Ar.max(n(0))), ai = h(n(0), n(0.7), Ar.negate().max(n(0))), Yi = sr.mul(jt).add(nr.mul(Jr)), Ys = Xe.mul(ai).add(wt.mul(dr)), Zs = jt.add(Jr), sa = dr.add(ai), _n = Zs.add(sa).add(n(1e-3)), Ja = Yi.mul(Zs.div(_n)).add(Ys.mul(sa.div(_n))), na = u(at, Ja, St);
36700
36700
  return s(na.rgb.mul(fe), na.a.mul(fe));
36701
36701
  }
36702
36702
  }, kl = {
@@ -36861,7 +36861,7 @@ const Ol = {
36861
36861
  fragmentNode: ({ uniforms: t, childNode: e, dimensions: r }) => {
36862
36862
  let { vec2: i, vec3: s, vec4: n, float: a, screenUV: o, sin: l, fract: h, smoothstep: u, mix: c, length: d, convertToTexture: m } = Ie;
36863
36863
  if (!e) return n(0, 0, 0, 0);
36864
- let p = Math.round(r.width), f = Math.round(r.height), g = m(e, p, f), y = t.pixelSize.uniform, T = t.colorShift.uniform, w = t.scanlineIntensity.uniform, v = t.scanlineFrequency.uniform, M = t.brightness.uniform, S = t.contrast.uniform, _ = t.curvature.uniform, A = t.scaleToFill.uniform, O = A.greaterThan(a(0.5)).select(a(1).add(_.mul(a(2))), a(1)), $ = o.sub(i(0.5, 0.5)).div(O).add(i(0.5, 0.5)), j = $.sub(i(0.5, 0.5)), Q = d(j), re = _.mul(Q.mul(Q)), K = $.add(j.mul(re)), fe = K.x.lessThan(a(0)).or(K.x.greaterThan(a(1))).or(K.y.lessThan(a(0))).or(K.y.greaterThan(a(1))), oe = T.mul(a(2e-3)), ge = K.add(i(oe, a(0))), he = K, Te = K.sub(i(oe, a(0))), ce = g.sample(ge).r, ye = g.sample(he).g, Ve = g.sample(Te).b, at = s(ce, ye, Ve), wt = at.sub(a(0.5)).mul(S).add(a(0.5)).mul(M), Xe = K.y.mul(v), sr = l(Xe.mul(a(3.14159 * 2))), nr = a(1).sub(w.mul(sr.mul(a(0.5)).add(a(0.5)))), Ot = wt.mul(nr), St = y.mul(a(0.5)), Gt = h(K.mul(St)), Nr = l(Gt.x.mul(a(6.28318))).mul(a(0.1)).add(a(0.95)), Jr = l(Gt.x.mul(a(6.28318)).add(a(2.09))).mul(a(0.1)).add(a(0.95)), jt = l(Gt.x.mul(a(6.28318)).add(a(4.18))).mul(a(0.1)).add(a(0.95)), Ar = s(Ot.r.mul(Nr), Ot.g.mul(Jr), Ot.b.mul(jt)), ci = d(j), Yi = u(a(0.8), a(0.3), ci), Ys = Ar.mul(Yi), Zs = c(s(0, 0, 0), Ys, fe.select(a(0), a(1)));
36864
+ let p = Math.round(r.width), f = Math.round(r.height), g = m(e, p, f), y = t.pixelSize.uniform, T = t.colorShift.uniform, w = t.scanlineIntensity.uniform, v = t.scanlineFrequency.uniform, M = t.brightness.uniform, S = t.contrast.uniform, _ = t.curvature.uniform, A = t.scaleToFill.uniform, O = A.greaterThan(a(0.5)).select(a(1).add(_.mul(a(2))), a(1)), $ = o.sub(i(0.5, 0.5)).div(O).add(i(0.5, 0.5)), j = $.sub(i(0.5, 0.5)), Q = d(j), re = _.mul(Q.mul(Q)), K = $.add(j.mul(re)), fe = K.x.lessThan(a(0)).or(K.x.greaterThan(a(1))).or(K.y.lessThan(a(0))).or(K.y.greaterThan(a(1))), oe = T.mul(a(2e-3)), ge = K.add(i(oe, a(0))), he = K, Te = K.sub(i(oe, a(0))), ce = g.sample(ge).r, ye = g.sample(he).g, Ve = g.sample(Te).b, at = s(ce, ye, Ve), wt = at.sub(a(0.5)).mul(S).add(a(0.5)).mul(M), Xe = K.y.mul(v), sr = l(Xe.mul(a(3.14159 * 2))), nr = a(1).sub(w.mul(sr.mul(a(0.5)).add(a(0.5)))), Ot = wt.mul(nr), St = y.mul(a(0.5)), Gt = h(K.mul(St)), Ar = l(Gt.x.mul(a(6.28318))).mul(a(0.1)).add(a(0.95)), Jr = l(Gt.x.mul(a(6.28318)).add(a(2.09))).mul(a(0.1)).add(a(0.95)), jt = l(Gt.x.mul(a(6.28318)).add(a(4.18))).mul(a(0.1)).add(a(0.95)), dr = s(Ot.r.mul(Ar), Ot.g.mul(Jr), Ot.b.mul(jt)), ai = d(j), Yi = u(a(0.8), a(0.3), ai), Ys = dr.mul(Yi), Zs = c(s(0, 0, 0), Ys, fe.select(a(0), a(1)));
36865
36865
  return n(Zs, a(1));
36866
36866
  }
36867
36867
  }, Gl = {
@@ -37115,8 +37115,8 @@ const Ol = {
37115
37115
  let he = v(oe).sub(0.5), Te = a(ge), ce = o(ge);
37116
37116
  return p(Te, ce, ce.negate(), Te).mul(he.mul(0.66)).add(oe).add(0.5);
37117
37117
  }), S = T(([oe]) => y.mul(t.randomness.uniform).mul(w(oe).sub(0.5)).mul(2)), _ = T(([oe, ge, he]) => oe.add(v(he).sub(0.5).mul(ge))), A = T(([oe]) => {
37118
- let ge = u(oe), he = S(ge), Te = M(ge, he), ce = _(r(1, 1), r(0.25, 0.2), ge), ye = d(oe.sub(Te).mul(ce)), Ve = t.particleSize.uniform.mul(0.01), at = t.particleSoftness.uniform, wt = Ve.mul(0.6), Xe = Ve.mul(0.6).add(at.mul(Ve.mul(2.4))), sr = l(Xe, wt, ye), nr = t.twinkle.uniform, Ot = ge.x.mul(12.9898).add(ge.y.mul(78.233)).sin().mul(43758.5453).fract(), St = y.mul(2).add(Ot.mul(6.28318)), Gt = a(St).mul(0.5).add(0.5), Nr = h(n(1), Gt, nr);
37119
- return sr.mul(Nr).mul(t.particleColor.uniform.rgb);
37118
+ let ge = u(oe), he = S(ge), Te = M(ge, he), ce = _(r(1, 1), r(0.25, 0.2), ge), ye = d(oe.sub(Te).mul(ce)), Ve = t.particleSize.uniform.mul(0.01), at = t.particleSoftness.uniform, wt = Ve.mul(0.6), Xe = Ve.mul(0.6).add(at.mul(Ve.mul(2.4))), sr = l(Xe, wt, ye), nr = t.twinkle.uniform, Ot = ge.x.mul(12.9898).add(ge.y.mul(78.233)).sin().mul(43758.5453).fract(), St = y.mul(2).add(Ot.mul(6.28318)), Gt = a(St).mul(0.5).add(0.5), Ar = h(n(1), Gt, nr);
37119
+ return sr.mul(Ar).mul(t.particleColor.uniform.rgb);
37120
37120
  }), O = T(([oe]) => {
37121
37121
  let ge = n(1.05), he = n(0.9), Te = t.count.uniform, ce = i(0), ye = n(1), Ve = n(1), at = r(0), wt = t.angle.uniform.mul(3.14159).div(180), Xe = r(o(wt), a(wt)), sr = y.mul(Xe).mul(t.speed.uniform);
37122
37122
  for (let nr = 0; nr < 12; nr++) {
@@ -39858,7 +39858,7 @@ const zte = {
39858
39858
  ">=": "greaterThanEqual",
39859
39859
  "%": "mod"
39860
39860
  };
39861
- var Mr = class a1 extends bs {
39861
+ var _r = class a1 extends bs {
39862
39862
  static get type() {
39863
39863
  return "OperatorNode";
39864
39864
  }
@@ -39919,7 +39919,7 @@ var Mr = class a1 extends bs {
39919
39919
  super.deserialize(e), this.op = e.op;
39920
39920
  }
39921
39921
  };
39922
- const _5 = /* @__PURE__ */ ve(Mr, "+").setParameterLength(2, 1 / 0).setName("add"), o1 = /* @__PURE__ */ ve(Mr, "-").setParameterLength(2, 1 / 0).setName("sub"), ST = /* @__PURE__ */ ve(Mr, "*").setParameterLength(2, 1 / 0).setName("mul"), N5 = /* @__PURE__ */ ve(Mr, "/").setParameterLength(2, 1 / 0).setName("div"), My = /* @__PURE__ */ ve(Mr, "%").setParameterLength(2).setName("mod"), A5 = /* @__PURE__ */ ve(Mr, "==").setParameterLength(2).setName("equal"), Bte = /* @__PURE__ */ ve(Mr, "!=").setParameterLength(2).setName("notEqual"), kte = /* @__PURE__ */ ve(Mr, "<").setParameterLength(2).setName("lessThan"), Ute = /* @__PURE__ */ ve(Mr, ">").setParameterLength(2).setName("greaterThan"), Dte = /* @__PURE__ */ ve(Mr, "<=").setParameterLength(2).setName("lessThanEqual"), $te = /* @__PURE__ */ ve(Mr, ">=").setParameterLength(2).setName("greaterThanEqual"), Gte = /* @__PURE__ */ ve(Mr, "&&").setParameterLength(2, 1 / 0).setName("and"), jte = /* @__PURE__ */ ve(Mr, "||").setParameterLength(2, 1 / 0).setName("or"), Wte = /* @__PURE__ */ ve(Mr, "!").setParameterLength(1).setName("not"), qte = /* @__PURE__ */ ve(Mr, "^^").setParameterLength(2).setName("xor"), Hte = /* @__PURE__ */ ve(Mr, "&").setParameterLength(2).setName("bitAnd"), Xte = /* @__PURE__ */ ve(Mr, "~").setParameterLength(2).setName("bitNot"), Yte = /* @__PURE__ */ ve(Mr, "|").setParameterLength(2).setName("bitOr"), Zte = /* @__PURE__ */ ve(Mr, "^").setParameterLength(2).setName("bitXor"), Jte = /* @__PURE__ */ ve(Mr, "<<").setParameterLength(2).setName("shiftLeft"), Qte = /* @__PURE__ */ ve(Mr, ">>").setParameterLength(2).setName("shiftRight"), Kte = qs(([t]) => (t.addAssign(1), t)), ere = qs(([t]) => (t.subAssign(1), t)), tre = /* @__PURE__ */ qs(([t]) => {
39922
+ const _5 = /* @__PURE__ */ ve(_r, "+").setParameterLength(2, 1 / 0).setName("add"), o1 = /* @__PURE__ */ ve(_r, "-").setParameterLength(2, 1 / 0).setName("sub"), ST = /* @__PURE__ */ ve(_r, "*").setParameterLength(2, 1 / 0).setName("mul"), N5 = /* @__PURE__ */ ve(_r, "/").setParameterLength(2, 1 / 0).setName("div"), My = /* @__PURE__ */ ve(_r, "%").setParameterLength(2).setName("mod"), A5 = /* @__PURE__ */ ve(_r, "==").setParameterLength(2).setName("equal"), Bte = /* @__PURE__ */ ve(_r, "!=").setParameterLength(2).setName("notEqual"), kte = /* @__PURE__ */ ve(_r, "<").setParameterLength(2).setName("lessThan"), Ute = /* @__PURE__ */ ve(_r, ">").setParameterLength(2).setName("greaterThan"), Dte = /* @__PURE__ */ ve(_r, "<=").setParameterLength(2).setName("lessThanEqual"), $te = /* @__PURE__ */ ve(_r, ">=").setParameterLength(2).setName("greaterThanEqual"), Gte = /* @__PURE__ */ ve(_r, "&&").setParameterLength(2, 1 / 0).setName("and"), jte = /* @__PURE__ */ ve(_r, "||").setParameterLength(2, 1 / 0).setName("or"), Wte = /* @__PURE__ */ ve(_r, "!").setParameterLength(1).setName("not"), qte = /* @__PURE__ */ ve(_r, "^^").setParameterLength(2).setName("xor"), Hte = /* @__PURE__ */ ve(_r, "&").setParameterLength(2).setName("bitAnd"), Xte = /* @__PURE__ */ ve(_r, "~").setParameterLength(2).setName("bitNot"), Yte = /* @__PURE__ */ ve(_r, "|").setParameterLength(2).setName("bitOr"), Zte = /* @__PURE__ */ ve(_r, "^").setParameterLength(2).setName("bitXor"), Jte = /* @__PURE__ */ ve(_r, "<<").setParameterLength(2).setName("shiftLeft"), Qte = /* @__PURE__ */ ve(_r, ">>").setParameterLength(2).setName("shiftRight"), Kte = qs(([t]) => (t.addAssign(1), t)), ere = qs(([t]) => (t.subAssign(1), t)), tre = /* @__PURE__ */ qs(([t]) => {
39923
39923
  let e = mm(t).toConst();
39924
39924
  return t.addAssign(1), e;
39925
39925
  }), rre = /* @__PURE__ */ qs(([t]) => {
@@ -41050,12 +41050,12 @@ const tse = /* @__PURE__ */ qs(([t]) => U5(t.rgb)), rse = /* @__PURE__ */ qs(([t
41050
41050
  for (let nr = 0; nr < f; nr++) for (let Ot = 0; Ot < f; Ot++) {
41051
41051
  let St = (nr * f + Ot) * 2;
41052
41052
  g[St] *= 1 - at * ce, g[St + 1] *= 1 - at * ce;
41053
- let Gt = (Ot + 0.5) / f, Nr = (nr + 0.5) / f, Jr = Gt - he.x, jt = Nr - he.y, Ar = Math.sqrt(Jr * Jr + jt * jt);
41054
- if (Ar < Xe * 2 && Math.abs(ye) + Math.abs(Ve) > 0.01) {
41055
- let ci = Math.exp(-Ar * Ar / (Xe * Xe));
41056
- if (g[St] += M.value * ci * wt * ce * 0.5, g[St + 1] += S.value * ci * wt * ce * 0.5, sr > 0) {
41053
+ let Gt = (Ot + 0.5) / f, Ar = (nr + 0.5) / f, Jr = Gt - he.x, jt = Ar - he.y, dr = Math.sqrt(Jr * Jr + jt * jt);
41054
+ if (dr < Xe * 2 && Math.abs(ye) + Math.abs(Ve) > 0.01) {
41055
+ let ai = Math.exp(-dr * dr / (Xe * Xe));
41056
+ if (g[St] += M.value * ai * wt * ce * 0.5, g[St + 1] += S.value * ai * wt * ce * 0.5, sr > 0) {
41057
41057
  let Yi = Math.atan2(jt, Jr) + Math.PI * 0.5;
41058
- g[St] += Math.cos(Yi) * sr * ci * ce * 2, g[St + 1] += Math.sin(Yi) * sr * ci * ce * 2;
41058
+ g[St] += Math.cos(Yi) * sr * ai * ce * 2, g[St + 1] += Math.sin(Yi) * sr * ai * ce * 2;
41059
41059
  }
41060
41060
  }
41061
41061
  g[St] = Math.max(-1, Math.min(1, g[St])), g[St + 1] = Math.max(-1, Math.min(1, g[St + 1]));
@@ -41321,10 +41321,10 @@ const tse = /* @__PURE__ */ qs(([t]) => U5(t.rgb)), rse = /* @__PURE__ */ qs(([t
41321
41321
  f[Xe] *= 1 - Te * oe, f[Xe + 1] *= 1 - Te * oe;
41322
41322
  let sr = (wt + 0.5) / 32, nr = (at + 0.5) / 32, Ot = sr - K.x, St = nr - K.y, Gt = Math.sqrt(Ot * Ot + St * St);
41323
41323
  if (Gt < ye * 2 && Math.abs(ge) + Math.abs(he) > 0.01) {
41324
- let Nr = Math.exp(-Gt * Gt / (ye * ye));
41325
- if (f[Xe] += v.value * Nr * ce * oe * 0.5, f[Xe + 1] += M.value * Nr * ce * oe * 0.5, Ve > 0) {
41324
+ let Ar = Math.exp(-Gt * Gt / (ye * ye));
41325
+ if (f[Xe] += v.value * Ar * ce * oe * 0.5, f[Xe + 1] += M.value * Ar * ce * oe * 0.5, Ve > 0) {
41326
41326
  let Jr = Math.atan2(St, Ot) + Math.PI * 0.5;
41327
- f[Xe] += Math.cos(Jr) * Ve * Nr * oe * 2, f[Xe + 1] += Math.sin(Jr) * Ve * Nr * oe * 2;
41327
+ f[Xe] += Math.cos(Jr) * Ve * Ar * oe * 2, f[Xe + 1] += Math.sin(Jr) * Ve * Ar * oe * 2;
41328
41328
  }
41329
41329
  }
41330
41330
  f[Xe] = Math.max(-1, Math.min(1, f[Xe])), f[Xe + 1] = Math.max(-1, Math.min(1, f[Xe + 1]));
@@ -42379,8 +42379,8 @@ function Pse() {
42379
42379
  let { width: Vt, height: st } = t.getBoundingClientRect(), ct = Math.round(Vt), Ut = Math.round(st);
42380
42380
  ct > 0 && Ut > 0 && (g === 0 || y === 0 || ct !== g || Ut !== y ? (ge(ct, Ut), !We && T && ye()) : n && u && a.rootId && (n.needsUpdate = !0, ye(), jt().catch(console.warn)));
42381
42381
  }
42382
- f && Ar();
42383
- } else !p && be && ci();
42382
+ f && dr();
42383
+ } else !p && be && ai();
42384
42384
  }, ce = !1, ye = () => {
42385
42385
  if (!a.rootId || !n || O) return;
42386
42386
  if (a.nodes.get(a.rootId)) {
@@ -42506,7 +42506,7 @@ function Pse() {
42506
42506
  let Mt = Array.from(a.nodes.values()).filter((et) => et.parentId === be);
42507
42507
  Mt.length > 0 && (st = Math.max(...Mt.map((et) => et.metadata.renderOrder)) + 1);
42508
42508
  }
42509
- let ct = xe?.opacity === void 0 ? 1 : xe.opacity, Ut = $d(ct), mr = {
42509
+ let ct = xe?.opacity === void 0 ? 1 : xe.opacity, Ut = $d(ct), pr = {
42510
42510
  id: de,
42511
42511
  fragmentNodeFunc: le,
42512
42512
  parentId: be,
@@ -42524,7 +42524,7 @@ function Pse() {
42524
42524
  beforeRenderCallbacks: [],
42525
42525
  afterRenderCallbacks: []
42526
42526
  };
42527
- a.nodes.set(de, mr), be === null && (a.rootId = de), n && u && g > 0 && y > 0 ? (j.includes(de) || j.push(de), Q || (Q = !0, queueMicrotask(() => {
42527
+ a.nodes.set(de, pr), be === null && (a.rootId = de), n && u && g > 0 && y > 0 ? (j.includes(de) || j.push(de), Q || (Q = !0, queueMicrotask(() => {
42528
42528
  Q = !1, j = [], ye();
42529
42529
  }))) : n && u && (ce || (ce = !0, requestAnimationFrame(() => {
42530
42530
  ce = !1, g > 0 && y > 0 && ye();
@@ -42556,7 +42556,7 @@ function Pse() {
42556
42556
  let be = Ve(de);
42557
42557
  for (let xe of be) Gt(xe.id);
42558
42558
  a.rootId === de && (a.rootId = null), a.nodes.delete(de), n && u && ye();
42559
- }, Nr = (de) => {
42559
+ }, Ar = (de) => {
42560
42560
  let le = {
42561
42561
  deltaTime: de,
42562
42562
  pointer: {
@@ -42595,7 +42595,7 @@ function Pse() {
42595
42595
  }, jt = async () => {
42596
42596
  if (!u || !e || !i || !r || !n || g === 0 || y === 0) return;
42597
42597
  let de = performance.now(), le = v > 0 ? (de - v) / 1e3 : 0.016, be = Math.min(le, 0.1);
42598
- v = de, Nr(be);
42598
+ v = de, Ar(be);
42599
42599
  try {
42600
42600
  if (O) return;
42601
42601
  e instanceof mM ? await e.renderAsync(i, r).then(() => {
@@ -42606,13 +42606,13 @@ function Pse() {
42606
42606
  } catch (xe) {
42607
42607
  console.error("Render frame error:", xe);
42608
42608
  }
42609
- }, Ar = () => {
42609
+ }, dr = () => {
42610
42610
  if (o || !f || !p) return;
42611
42611
  let de = () => {
42612
42612
  o = requestAnimationFrame(de), jt().catch(console.warn);
42613
42613
  };
42614
42614
  de();
42615
- }, ci = () => {
42615
+ }, ai = () => {
42616
42616
  o && (cancelAnimationFrame(o), o = null);
42617
42617
  }, Yi = (de) => {
42618
42618
  if (!t) return;
@@ -42663,7 +42663,7 @@ function Pse() {
42663
42663
  let xe = de.getBoundingClientRect();
42664
42664
  p = xe.width > 0 && xe.height > 0 && xe.top < window.innerHeight && xe.bottom > 0 && xe.left < window.innerWidth && xe.right > 0, T = p && xe.width > 0 && xe.height > 0, f = !oe();
42665
42665
  let { width: We, height: Vt } = de.getBoundingClientRect(), st = Math.round(We), ct = Math.round(Vt);
42666
- st > 0 && ct > 0 ? (ge(st, ct), d = !0, await jt()) : d = !1, f && p && Ar(), le.signal.aborted || (u = !0);
42666
+ st > 0 && ct > 0 ? (ge(st, ct), d = !0, await jt()) : d = !1, f && p && dr(), le.signal.aborted || (u = !0);
42667
42667
  } catch (be) {
42668
42668
  console.error("[Shaders] Initialization error:", be);
42669
42669
  } finally {
@@ -42671,7 +42671,7 @@ function Pse() {
42671
42671
  }
42672
42672
  },
42673
42673
  cleanup: () => {
42674
- if (m && m.abort(), l && (l.disconnect(), l = null), h && (h.disconnect(), h = null), $ && (t && (t.removeEventListener("mousedown", Ja), t.removeEventListener("touchstart", na)), window && (window.removeEventListener("mousemove", Ys), window.removeEventListener("touchmove", Zs), window.removeEventListener("mouseup", sa), window.removeEventListener("touchend", _n)), $ = !1), ci(), a.nodes.clear(), a.rootId = null, a.idToNodeId.clear(), j = [], Q = !1, re = [], K = !1, s) {
42674
+ if (m && m.abort(), l && (l.disconnect(), l = null), h && (h.disconnect(), h = null), $ && (t && (t.removeEventListener("mousedown", Ja), t.removeEventListener("touchstart", na)), window && (window.removeEventListener("mousemove", Ys), window.removeEventListener("touchmove", Zs), window.removeEventListener("mouseup", sa), window.removeEventListener("touchend", _n)), $ = !1), ai(), a.nodes.clear(), a.rootId = null, a.idToNodeId.clear(), j = [], Q = !1, re = [], K = !1, s) {
42675
42675
  i && i.remove(s);
42676
42676
  try {
42677
42677
  s.geometry && typeof s.geometry.dispose == "function" && s.geometry.dispose();
@@ -42695,7 +42695,9 @@ function Pse() {
42695
42695
  showLicenseWarning: () => {
42696
42696
  !Rse() || iN || (console.warn("Shaders is running in development mode. Please purchase a license at https://shaders.com to use it in production."), iN = !0);
42697
42697
  },
42698
- isInitialized: () => u
42698
+ isInitialized: () => u,
42699
+ startAnimation: dr,
42700
+ stopAnimation: ai
42699
42701
  };
42700
42702
  }
42701
42703
  const { uniform: Ise } = Ie;
@@ -43675,7 +43677,7 @@ class Z5 extends Re {
43675
43677
  return e.format(n, s, r);
43676
43678
  }
43677
43679
  }
43678
- class _r extends Re {
43680
+ class Nr extends Re {
43679
43681
  static get type() {
43680
43682
  return "TempNode";
43681
43683
  }
@@ -43709,7 +43711,7 @@ class _r extends Re {
43709
43711
  return super.build(e, r);
43710
43712
  }
43711
43713
  }
43712
- class qse extends _r {
43714
+ class qse extends Nr {
43713
43715
  static get type() {
43714
43716
  return "JoinNode";
43715
43717
  }
@@ -43811,7 +43813,7 @@ class l1 extends Re {
43811
43813
  super.deserialize(e), this.components = e.components;
43812
43814
  }
43813
43815
  }
43814
- class Xse extends _r {
43816
+ class Xse extends Nr {
43815
43817
  static get type() {
43816
43818
  return "SetNode";
43817
43819
  }
@@ -43843,7 +43845,7 @@ class Xse extends _r {
43843
43845
  return `${e.getType(n)}( ${c.join(", ")} )`;
43844
43846
  }
43845
43847
  }
43846
- class Yse extends _r {
43848
+ class Yse extends Nr {
43847
43849
  static get type() {
43848
43850
  return "FlipNode";
43849
43851
  }
@@ -44321,7 +44323,7 @@ const Be = (t, e) => {
44321
44323
  const r = eP(e || t), i = t && t.isNode === !0 ? t.node && t.node.value || t.value : t;
44322
44324
  return J(new Wm(i, r));
44323
44325
  };
44324
- class uN extends _r {
44326
+ class uN extends Nr {
44325
44327
  static get type() {
44326
44328
  return "ArrayNode";
44327
44329
  }
@@ -44376,7 +44378,7 @@ const yP = (...t) => {
44376
44378
  return J(e);
44377
44379
  };
44378
44380
  X("toArray", (t, e) => yP(Array(e).fill(t)));
44379
- class Lne extends _r {
44381
+ class Lne extends Nr {
44380
44382
  static get type() {
44381
44383
  return "AssignNode";
44382
44384
  }
@@ -44441,7 +44443,7 @@ class Lne extends _r {
44441
44443
  }
44442
44444
  const xP = /* @__PURE__ */ te(Lne).setParameterLength(2);
44443
44445
  X("assign", xP);
44444
- class Fne extends _r {
44446
+ class Fne extends Nr {
44445
44447
  static get type() {
44446
44448
  return "FunctionCallNode";
44447
44449
  }
@@ -44507,7 +44509,7 @@ const zne = {
44507
44509
  ">=": "greaterThanEqual",
44508
44510
  "%": "mod"
44509
44511
  };
44510
- class Kt extends _r {
44512
+ class Kt extends Nr {
44511
44513
  static get type() {
44512
44514
  return "OperatorNode";
44513
44515
  }
@@ -44608,14 +44610,14 @@ class Kt extends _r {
44608
44610
  super.deserialize(e), this.op = e.op;
44609
44611
  }
44610
44612
  }
44611
- const wr = /* @__PURE__ */ te(Kt, "+").setParameterLength(2, 1 / 0).setName("add"), ut = /* @__PURE__ */ te(Kt, "-").setParameterLength(2, 1 / 0).setName("sub"), Ge = /* @__PURE__ */ te(Kt, "*").setParameterLength(2, 1 / 0).setName("mul"), Zn = /* @__PURE__ */ te(Kt, "/").setParameterLength(2, 1 / 0).setName("div"), qm = /* @__PURE__ */ te(Kt, "%").setParameterLength(2).setName("mod"), OT = /* @__PURE__ */ te(Kt, "==").setParameterLength(2).setName("equal"), vP = /* @__PURE__ */ te(Kt, "!=").setParameterLength(2).setName("notEqual"), TP = /* @__PURE__ */ te(Kt, "<").setParameterLength(2).setName("lessThan"), VT = /* @__PURE__ */ te(Kt, ">").setParameterLength(2).setName("greaterThan"), wP = /* @__PURE__ */ te(Kt, "<=").setParameterLength(2).setName("lessThanEqual"), SP = /* @__PURE__ */ te(Kt, ">=").setParameterLength(2).setName("greaterThanEqual"), MP = /* @__PURE__ */ te(Kt, "&&").setParameterLength(2, 1 / 0).setName("and"), _P = /* @__PURE__ */ te(Kt, "||").setParameterLength(2, 1 / 0).setName("or"), NP = /* @__PURE__ */ te(Kt, "!").setParameterLength(1).setName("not"), AP = /* @__PURE__ */ te(Kt, "^^").setParameterLength(2).setName("xor"), EP = /* @__PURE__ */ te(Kt, "&").setParameterLength(2).setName("bitAnd"), CP = /* @__PURE__ */ te(Kt, "~").setParameterLength(2).setName("bitNot"), RP = /* @__PURE__ */ te(Kt, "|").setParameterLength(2).setName("bitOr"), PP = /* @__PURE__ */ te(Kt, "^").setParameterLength(2).setName("bitXor"), IP = /* @__PURE__ */ te(Kt, "<<").setParameterLength(2).setName("shiftLeft"), OP = /* @__PURE__ */ te(Kt, ">>").setParameterLength(2).setName("shiftRight"), VP = z(([t]) => (t.addAssign(1), t)), LP = z(([t]) => (t.subAssign(1), t)), FP = /* @__PURE__ */ z(([t]) => {
44613
+ const Sr = /* @__PURE__ */ te(Kt, "+").setParameterLength(2, 1 / 0).setName("add"), ut = /* @__PURE__ */ te(Kt, "-").setParameterLength(2, 1 / 0).setName("sub"), Ge = /* @__PURE__ */ te(Kt, "*").setParameterLength(2, 1 / 0).setName("mul"), Zn = /* @__PURE__ */ te(Kt, "/").setParameterLength(2, 1 / 0).setName("div"), qm = /* @__PURE__ */ te(Kt, "%").setParameterLength(2).setName("mod"), OT = /* @__PURE__ */ te(Kt, "==").setParameterLength(2).setName("equal"), vP = /* @__PURE__ */ te(Kt, "!=").setParameterLength(2).setName("notEqual"), TP = /* @__PURE__ */ te(Kt, "<").setParameterLength(2).setName("lessThan"), VT = /* @__PURE__ */ te(Kt, ">").setParameterLength(2).setName("greaterThan"), wP = /* @__PURE__ */ te(Kt, "<=").setParameterLength(2).setName("lessThanEqual"), SP = /* @__PURE__ */ te(Kt, ">=").setParameterLength(2).setName("greaterThanEqual"), MP = /* @__PURE__ */ te(Kt, "&&").setParameterLength(2, 1 / 0).setName("and"), _P = /* @__PURE__ */ te(Kt, "||").setParameterLength(2, 1 / 0).setName("or"), NP = /* @__PURE__ */ te(Kt, "!").setParameterLength(1).setName("not"), AP = /* @__PURE__ */ te(Kt, "^^").setParameterLength(2).setName("xor"), EP = /* @__PURE__ */ te(Kt, "&").setParameterLength(2).setName("bitAnd"), CP = /* @__PURE__ */ te(Kt, "~").setParameterLength(2).setName("bitNot"), RP = /* @__PURE__ */ te(Kt, "|").setParameterLength(2).setName("bitOr"), PP = /* @__PURE__ */ te(Kt, "^").setParameterLength(2).setName("bitXor"), IP = /* @__PURE__ */ te(Kt, "<<").setParameterLength(2).setName("shiftLeft"), OP = /* @__PURE__ */ te(Kt, ">>").setParameterLength(2).setName("shiftRight"), VP = z(([t]) => (t.addAssign(1), t)), LP = z(([t]) => (t.subAssign(1), t)), FP = /* @__PURE__ */ z(([t]) => {
44612
44614
  const e = R(t).toConst();
44613
44615
  return t.addAssign(1), e;
44614
44616
  }), zP = /* @__PURE__ */ z(([t]) => {
44615
44617
  const e = R(t).toConst();
44616
44618
  return t.subAssign(1), e;
44617
44619
  });
44618
- X("add", wr);
44620
+ X("add", Sr);
44619
44621
  X("sub", ut);
44620
44622
  X("mul", Ge);
44621
44623
  X("div", Zn);
@@ -44643,7 +44645,7 @@ X("decrement", zP);
44643
44645
  const BP = (t, e) => (console.warn('THREE.TSL: "remainder()" is deprecated. Use "mod( int( ... ) )" instead.'), qm(t, e)), kP = (t, e) => (console.warn('THREE.TSL: "modInt()" is deprecated. Use "mod( int( ... ) )" instead.'), qm(R(t), R(e)));
44644
44646
  X("remainder", BP);
44645
44647
  X("modInt", kP);
44646
- class L extends _r {
44648
+ class L extends Nr {
44647
44649
  static get type() {
44648
44650
  return "MathNode";
44649
44651
  }
@@ -44786,10 +44788,10 @@ L.CLAMP = "clamp";
44786
44788
  L.REFRACT = "refract";
44787
44789
  L.SMOOTHSTEP = "smoothstep";
44788
44790
  L.FACEFORWARD = "faceforward";
44789
- const UP = /* @__PURE__ */ E(1e-6), Bne = /* @__PURE__ */ E(1e6), Eg = /* @__PURE__ */ E(Math.PI), kne = /* @__PURE__ */ E(Math.PI * 2), DP = /* @__PURE__ */ te(L, L.ALL).setParameterLength(1), $P = /* @__PURE__ */ te(L, L.ANY).setParameterLength(1), GP = /* @__PURE__ */ te(L, L.RADIANS).setParameterLength(1), jP = /* @__PURE__ */ te(L, L.DEGREES).setParameterLength(1), WP = /* @__PURE__ */ te(L, L.EXP).setParameterLength(1), Rc = /* @__PURE__ */ te(L, L.EXP2).setParameterLength(1), LT = /* @__PURE__ */ te(L, L.LOG).setParameterLength(1), La = /* @__PURE__ */ te(L, L.LOG2).setParameterLength(1), ra = /* @__PURE__ */ te(L, L.SQRT).setParameterLength(1), FT = /* @__PURE__ */ te(L, L.INVERSE_SQRT).setParameterLength(1), Un = /* @__PURE__ */ te(L, L.FLOOR).setParameterLength(1), Py = /* @__PURE__ */ te(L, L.CEIL).setParameterLength(1), Ku = /* @__PURE__ */ te(L, L.NORMALIZE).setParameterLength(1), Za = /* @__PURE__ */ te(L, L.FRACT).setParameterLength(1), us = /* @__PURE__ */ te(L, L.SIN).setParameterLength(1), va = /* @__PURE__ */ te(L, L.COS).setParameterLength(1), qP = /* @__PURE__ */ te(L, L.TAN).setParameterLength(1), HP = /* @__PURE__ */ te(L, L.ASIN).setParameterLength(1), XP = /* @__PURE__ */ te(L, L.ACOS).setParameterLength(1), zT = /* @__PURE__ */ te(L, L.ATAN).setParameterLength(1, 2), kt = /* @__PURE__ */ te(L, L.ABS).setParameterLength(1), ym = /* @__PURE__ */ te(L, L.SIGN).setParameterLength(1), Cg = /* @__PURE__ */ te(L, L.LENGTH).setParameterLength(1), YP = /* @__PURE__ */ te(L, L.NEGATE).setParameterLength(1), ZP = /* @__PURE__ */ te(L, L.ONE_MINUS).setParameterLength(1), BT = /* @__PURE__ */ te(L, L.DFDX).setParameterLength(1), kT = /* @__PURE__ */ te(L, L.DFDY).setParameterLength(1), JP = /* @__PURE__ */ te(L, L.ROUND).setParameterLength(1), QP = /* @__PURE__ */ te(L, L.RECIPROCAL).setParameterLength(1), UT = /* @__PURE__ */ te(L, L.TRUNC).setParameterLength(1), KP = /* @__PURE__ */ te(L, L.FWIDTH).setParameterLength(1), eI = /* @__PURE__ */ te(L, L.TRANSPOSE).setParameterLength(1), Une = /* @__PURE__ */ te(L, L.BITCAST).setParameterLength(2), tI = (t, e) => (console.warn('THREE.TSL: "equals" is deprecated. Use "equal" inside a vector instead, like: "bvec*( equal( ... ) )"'), OT(t, e)), Ds = /* @__PURE__ */ te(L, L.MIN).setParameterLength(2, 1 / 0), Yr = /* @__PURE__ */ te(L, L.MAX).setParameterLength(2, 1 / 0), Iy = /* @__PURE__ */ te(L, L.STEP).setParameterLength(2), rI = /* @__PURE__ */ te(L, L.REFLECT).setParameterLength(2), iI = /* @__PURE__ */ te(L, L.DISTANCE).setParameterLength(2), sI = /* @__PURE__ */ te(L, L.DIFFERENCE).setParameterLength(2), Xo = /* @__PURE__ */ te(L, L.DOT).setParameterLength(2), Oy = /* @__PURE__ */ te(L, L.CROSS).setParameterLength(2), gn = /* @__PURE__ */ te(L, L.POW).setParameterLength(2), nI = /* @__PURE__ */ te(L, L.POW, 2).setParameterLength(1), aI = /* @__PURE__ */ te(L, L.POW, 3).setParameterLength(1), oI = /* @__PURE__ */ te(L, L.POW, 4).setParameterLength(1), lI = /* @__PURE__ */ te(L, L.TRANSFORM_DIRECTION).setParameterLength(2), uI = (t) => Ge(ym(t), gn(kt(t), 1 / 3)), DT = (t) => Xo(t, t), gr = /* @__PURE__ */ te(L, L.MIX).setParameterLength(3), $a = (t, e = 0, r = 1) => J(new L(L.CLAMP, J(t), J(e), J(r))), hI = (t) => $a(t), cI = /* @__PURE__ */ te(L, L.REFRACT).setParameterLength(3), Du = /* @__PURE__ */ te(L, L.SMOOTHSTEP).setParameterLength(3), $T = /* @__PURE__ */ te(L, L.FACEFORWARD).setParameterLength(3), dI = /* @__PURE__ */ z(([t]) => {
44791
+ const UP = /* @__PURE__ */ E(1e-6), Bne = /* @__PURE__ */ E(1e6), Eg = /* @__PURE__ */ E(Math.PI), kne = /* @__PURE__ */ E(Math.PI * 2), DP = /* @__PURE__ */ te(L, L.ALL).setParameterLength(1), $P = /* @__PURE__ */ te(L, L.ANY).setParameterLength(1), GP = /* @__PURE__ */ te(L, L.RADIANS).setParameterLength(1), jP = /* @__PURE__ */ te(L, L.DEGREES).setParameterLength(1), WP = /* @__PURE__ */ te(L, L.EXP).setParameterLength(1), Rc = /* @__PURE__ */ te(L, L.EXP2).setParameterLength(1), LT = /* @__PURE__ */ te(L, L.LOG).setParameterLength(1), La = /* @__PURE__ */ te(L, L.LOG2).setParameterLength(1), ra = /* @__PURE__ */ te(L, L.SQRT).setParameterLength(1), FT = /* @__PURE__ */ te(L, L.INVERSE_SQRT).setParameterLength(1), Un = /* @__PURE__ */ te(L, L.FLOOR).setParameterLength(1), Py = /* @__PURE__ */ te(L, L.CEIL).setParameterLength(1), Ku = /* @__PURE__ */ te(L, L.NORMALIZE).setParameterLength(1), Za = /* @__PURE__ */ te(L, L.FRACT).setParameterLength(1), us = /* @__PURE__ */ te(L, L.SIN).setParameterLength(1), va = /* @__PURE__ */ te(L, L.COS).setParameterLength(1), qP = /* @__PURE__ */ te(L, L.TAN).setParameterLength(1), HP = /* @__PURE__ */ te(L, L.ASIN).setParameterLength(1), XP = /* @__PURE__ */ te(L, L.ACOS).setParameterLength(1), zT = /* @__PURE__ */ te(L, L.ATAN).setParameterLength(1, 2), kt = /* @__PURE__ */ te(L, L.ABS).setParameterLength(1), ym = /* @__PURE__ */ te(L, L.SIGN).setParameterLength(1), Cg = /* @__PURE__ */ te(L, L.LENGTH).setParameterLength(1), YP = /* @__PURE__ */ te(L, L.NEGATE).setParameterLength(1), ZP = /* @__PURE__ */ te(L, L.ONE_MINUS).setParameterLength(1), BT = /* @__PURE__ */ te(L, L.DFDX).setParameterLength(1), kT = /* @__PURE__ */ te(L, L.DFDY).setParameterLength(1), JP = /* @__PURE__ */ te(L, L.ROUND).setParameterLength(1), QP = /* @__PURE__ */ te(L, L.RECIPROCAL).setParameterLength(1), UT = /* @__PURE__ */ te(L, L.TRUNC).setParameterLength(1), KP = /* @__PURE__ */ te(L, L.FWIDTH).setParameterLength(1), eI = /* @__PURE__ */ te(L, L.TRANSPOSE).setParameterLength(1), Une = /* @__PURE__ */ te(L, L.BITCAST).setParameterLength(2), tI = (t, e) => (console.warn('THREE.TSL: "equals" is deprecated. Use "equal" inside a vector instead, like: "bvec*( equal( ... ) )"'), OT(t, e)), Ds = /* @__PURE__ */ te(L, L.MIN).setParameterLength(2, 1 / 0), Yr = /* @__PURE__ */ te(L, L.MAX).setParameterLength(2, 1 / 0), Iy = /* @__PURE__ */ te(L, L.STEP).setParameterLength(2), rI = /* @__PURE__ */ te(L, L.REFLECT).setParameterLength(2), iI = /* @__PURE__ */ te(L, L.DISTANCE).setParameterLength(2), sI = /* @__PURE__ */ te(L, L.DIFFERENCE).setParameterLength(2), Xo = /* @__PURE__ */ te(L, L.DOT).setParameterLength(2), Oy = /* @__PURE__ */ te(L, L.CROSS).setParameterLength(2), gn = /* @__PURE__ */ te(L, L.POW).setParameterLength(2), nI = /* @__PURE__ */ te(L, L.POW, 2).setParameterLength(1), aI = /* @__PURE__ */ te(L, L.POW, 3).setParameterLength(1), oI = /* @__PURE__ */ te(L, L.POW, 4).setParameterLength(1), lI = /* @__PURE__ */ te(L, L.TRANSFORM_DIRECTION).setParameterLength(2), uI = (t) => Ge(ym(t), gn(kt(t), 1 / 3)), DT = (t) => Xo(t, t), yr = /* @__PURE__ */ te(L, L.MIX).setParameterLength(3), $a = (t, e = 0, r = 1) => J(new L(L.CLAMP, J(t), J(e), J(r))), hI = (t) => $a(t), cI = /* @__PURE__ */ te(L, L.REFRACT).setParameterLength(3), Du = /* @__PURE__ */ te(L, L.SMOOTHSTEP).setParameterLength(3), $T = /* @__PURE__ */ te(L, L.FACEFORWARD).setParameterLength(3), dI = /* @__PURE__ */ z(([t]) => {
44790
44792
  const i = 43758.5453, s = Xo(t.xy, ue(12.9898, 78.233)), n = qm(s, Eg);
44791
44793
  return Za(us(n).mul(i));
44792
- }), mI = (t, e, r) => gr(e, r, t), pI = (t, e, r) => Du(e, r, t), fI = (t, e) => (console.warn('THREE.TSL: "atan2" is overloaded. Use "atan" instead.'), zT(t, e)), Dne = $T, $ne = FT;
44794
+ }), mI = (t, e, r) => yr(e, r, t), pI = (t, e, r) => Du(e, r, t), fI = (t, e) => (console.warn('THREE.TSL: "atan2" is overloaded. Use "atan" instead.'), zT(t, e)), Dne = $T, $ne = FT;
44793
44795
  X("all", DP);
44794
44796
  X("any", $P);
44795
44797
  X("equals", tI);
@@ -45078,7 +45080,7 @@ X("varying", (...t) => (console.warn("THREE.TSL: .varying() has been renamed to
45078
45080
  X("vertexStage", (...t) => (console.warn("THREE.TSL: .vertexStage() has been renamed to .toVertexStage()."), Hs(...t)));
45079
45081
  const SI = /* @__PURE__ */ z(([t]) => {
45080
45082
  const e = t.mul(0.9478672986).add(0.0521327014).pow(2.4), r = t.mul(0.0773993808), i = t.lessThanEqual(0.04045);
45081
- return gr(e, r, i);
45083
+ return yr(e, r, i);
45082
45084
  }).setLayout({
45083
45085
  name: "sRGBTransferEOTF",
45084
45086
  type: "vec3",
@@ -45087,7 +45089,7 @@ const SI = /* @__PURE__ */ z(([t]) => {
45087
45089
  ]
45088
45090
  }), MI = /* @__PURE__ */ z(([t]) => {
45089
45091
  const e = t.pow(0.41666).mul(1.055).sub(0.055), r = t.mul(12.92), i = t.lessThanEqual(31308e-7);
45090
- return gr(e, r, i);
45092
+ return yr(e, r, i);
45091
45093
  }).setLayout({
45092
45094
  name: "sRGBTransferOETF",
45093
45095
  type: "vec3",
@@ -45095,7 +45097,7 @@ const SI = /* @__PURE__ */ z(([t]) => {
45095
45097
  { name: "color", type: "vec3" }
45096
45098
  ]
45097
45099
  }), WT = "WorkingColorSpace", qne = "OutputColorSpace";
45098
- class qT extends _r {
45100
+ class qT extends Nr {
45099
45101
  static get type() {
45100
45102
  return "ColorSpaceNode";
45101
45103
  }
@@ -45119,15 +45121,15 @@ class qT extends _r {
45119
45121
  * @return {string} The resolved color space.
45120
45122
  */
45121
45123
  resolveColorSpace(e, r) {
45122
- return r === WT ? pr.workingColorSpace : r === qne ? e.context.outputColorSpace || e.renderer.outputColorSpace : r;
45124
+ return r === WT ? fr.workingColorSpace : r === qne ? e.context.outputColorSpace || e.renderer.outputColorSpace : r;
45123
45125
  }
45124
45126
  setup(e) {
45125
45127
  const { colorNode: r } = this, i = this.resolveColorSpace(e, this.source), s = this.resolveColorSpace(e, this.target);
45126
45128
  let n = r;
45127
- return pr.enabled === !1 || i === s || !i || !s || (pr.getTransfer(i) === jd && (n = ke(SI(n.rgb), n.a)), pr.getPrimaries(i) !== pr.getPrimaries(s) && (n = ke(
45128
- Us(pr._getMatrix(new Ws(), i, s)).mul(n.rgb),
45129
+ return fr.enabled === !1 || i === s || !i || !s || (fr.getTransfer(i) === jd && (n = ke(SI(n.rgb), n.a)), fr.getPrimaries(i) !== fr.getPrimaries(s) && (n = ke(
45130
+ Us(fr._getMatrix(new Ws(), i, s)).mul(n.rgb),
45129
45131
  n.a
45130
- )), pr.getTransfer(s) === jd && (n = ke(MI(n.rgb), n.a))), n;
45132
+ )), fr.getTransfer(s) === jd && (n = ke(MI(n.rgb), n.a))), n;
45131
45133
  }
45132
45134
  }
45133
45135
  const _I = (t, e) => J(new qT(J(t), WT, e)), HT = (t, e) => J(new qT(J(t), e, WT)), Hne = (t, e, r) => J(new qT(J(t), e, r));
@@ -45290,7 +45292,7 @@ class Zne extends Yne {
45290
45292
  }
45291
45293
  }
45292
45294
  const NI = (t, e, r = null) => J(new Zne(t, e, r));
45293
- class Jne extends _r {
45295
+ class Jne extends Nr {
45294
45296
  static get type() {
45295
45297
  return "ToneMappingNode";
45296
45298
  }
@@ -45594,7 +45596,7 @@ class rae extends Re {
45594
45596
  }
45595
45597
  const Ga = /* @__PURE__ */ te(rae).setParameterLength(1, 2), zI = (t) => (t ? bi(t, Ga("discard")) : Ga("discard")).toStack(), iae = () => Ga("return").toStack();
45596
45598
  X("discard", zI);
45597
- class sae extends _r {
45599
+ class sae extends Nr {
45598
45600
  static get type() {
45599
45601
  return "RenderOutputNode";
45600
45602
  }
@@ -45611,12 +45613,12 @@ class sae extends _r {
45611
45613
  setup({ context: e }) {
45612
45614
  let r = this.colorNode || e.color;
45613
45615
  const i = (this.toneMapping !== null ? this.toneMapping : e.toneMapping) || Zb, s = (this.outputColorSpace !== null ? this.outputColorSpace : e.outputColorSpace) || vg;
45614
- return i !== Zb && (r = r.toneMapping(i)), s !== vg && s !== pr.workingColorSpace && (r = r.workingToColorSpace(s)), r;
45616
+ return i !== Zb && (r = r.toneMapping(i)), s !== vg && s !== fr.workingColorSpace && (r = r.workingToColorSpace(s)), r;
45615
45617
  }
45616
45618
  }
45617
45619
  const BI = (t, e = null, r = null) => J(new sae(J(t), e, r));
45618
45620
  X("renderOutput", BI);
45619
- class nae extends _r {
45621
+ class nae extends Nr {
45620
45622
  static get type() {
45621
45623
  return "DebugNode";
45622
45624
  }
@@ -46388,7 +46390,7 @@ class $s extends rt {
46388
46390
  const _ae = /* @__PURE__ */ pe($s, $s.DIRECTION), _a = /* @__PURE__ */ pe($s, $s.WORLD_MATRIX), Nae = /* @__PURE__ */ pe($s, $s.POSITION), Aae = /* @__PURE__ */ pe($s, $s.SCALE), Eae = /* @__PURE__ */ pe($s, $s.VIEW_POSITION), Cae = /* @__PURE__ */ pe($s, $s.RADIUS), jI = /* @__PURE__ */ Be(new Ws()).onObjectUpdate(({ object: t }, e) => e.value.getNormalMatrix(t.matrixWorld)), Rae = /* @__PURE__ */ Be(new zt()).onObjectUpdate(({ object: t }, e) => e.value.copy(t.matrixWorld).invert()), Zm = /* @__PURE__ */ z((t) => t.renderer.overrideNodes.modelViewMatrix || WI).once()().toVar("modelViewMatrix"), WI = /* @__PURE__ */ Xs.mul(_a), Pae = /* @__PURE__ */ z((t) => (t.context.isHighPrecisionModelViewMatrix = !0, Be("mat4").onObjectUpdate(({ object: e, camera: r }) => e.modelViewMatrix.multiplyMatrices(r.matrixWorldInverse, e.matrixWorld)))).once()().toVar("highpModelViewMatrix"), Iae = /* @__PURE__ */ z((t) => {
46389
46391
  const e = t.context.isHighPrecisionModelViewMatrix;
46390
46392
  return Be("mat3").onObjectUpdate(({ object: r, camera: i }) => (e !== !0 && r.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse, r.matrixWorld), r.normalMatrix.getNormalMatrix(r.modelViewMatrix)));
46391
- }).once()().toVar("highpModelNormalViewMatrix"), ZT = /* @__PURE__ */ Go("position", "vec3"), xr = /* @__PURE__ */ ZT.toVarying("positionLocal"), Pg = /* @__PURE__ */ ZT.toVarying("positionPrevious"), Lu = /* @__PURE__ */ z((t) => _a.mul(xr).xyz.toVarying(t.getNamespace("v_positionWorld")), "vec3").once("POSITION")(), qI = /* @__PURE__ */ z((t) => xr.transformDirection(_a).toVarying(t.getNamespace("v_positionWorldDirection")).normalize().toVar("positionWorldDirection"), "vec3").once("POSITION")(), ni = /* @__PURE__ */ z((t) => t.context.setupPositionView().toVarying(t.getNamespace("v_positionView")), "vec3").once("POSITION")(), cs = /* @__PURE__ */ ni.negate().toVarying("v_positionViewDirection").normalize().toVar("positionViewDirection");
46393
+ }).once()().toVar("highpModelNormalViewMatrix"), ZT = /* @__PURE__ */ Go("position", "vec3"), br = /* @__PURE__ */ ZT.toVarying("positionLocal"), Pg = /* @__PURE__ */ ZT.toVarying("positionPrevious"), Lu = /* @__PURE__ */ z((t) => _a.mul(br).xyz.toVarying(t.getNamespace("v_positionWorld")), "vec3").once("POSITION")(), qI = /* @__PURE__ */ z((t) => br.transformDirection(_a).toVarying(t.getNamespace("v_positionWorldDirection")).normalize().toVar("positionWorldDirection"), "vec3").once("POSITION")(), ni = /* @__PURE__ */ z((t) => t.context.setupPositionView().toVarying(t.getNamespace("v_positionView")), "vec3").once("POSITION")(), cs = /* @__PURE__ */ ni.negate().toVarying("v_positionViewDirection").normalize().toVar("positionViewDirection");
46392
46394
  class Oae extends Re {
46393
46395
  static get type() {
46394
46396
  return "FrontFacingNode";
@@ -46674,12 +46676,12 @@ const vl = (t, e, r = null) => J(new kae(t, e, r)), zy = /* @__PURE__ */ z((t) =
46674
46676
  return r.material.flatShading !== !0 && (i = Hs(i, e)), i;
46675
46677
  }).once(), Dae = /* @__PURE__ */ ep(JT.cross(zy), "v_bitangentGeometry").normalize().toVar("bitangentGeometry"), $ae = /* @__PURE__ */ ep(qi.cross(Qm), "v_bitangentLocal").normalize().toVar("bitangentLocal"), nO = ep(Jn.cross(Km), "v_bitangentView").normalize().toVar("bitangentView"), Gae = /* @__PURE__ */ ep(YI.cross(sO), "v_bitangentWorld").normalize().toVar("bitangentWorld"), aO = /* @__PURE__ */ ep(Wa.cross(rw), "v_transformedBitangentView").normalize().toVar("transformedBitangentView"), jae = /* @__PURE__ */ aO.transformDirection(Xs).normalize().toVar("transformedBitangentWorld"), iw = /* @__PURE__ */ Us(Km, nO, Jn), oO = /* @__PURE__ */ cs.mul(iw), Wae = (t, e) => t.sub(oO.mul(e)), qae = /* @__PURE__ */ (() => {
46676
46678
  let t = pc.cross(cs);
46677
- return t = t.cross(pc).normalize(), t = gr(t, Wa, mP.mul(cP.oneMinus()).oneMinus().pow2().pow2()).normalize(), t;
46679
+ return t = t.cross(pc).normalize(), t = yr(t, Wa, mP.mul(cP.oneMinus()).oneMinus().pow2().pow2()).normalize(), t;
46678
46680
  })(), Hae = /* @__PURE__ */ z((t) => {
46679
46681
  const { eye_pos: e, surf_norm: r, mapN: i, uv: s } = t, n = e.dFdx(), a = e.dFdy(), o = s.dFdx(), l = s.dFdy(), h = r, u = a.cross(h), c = h.cross(n), d = u.mul(o.x).add(c.mul(l.x)), m = u.mul(o.y).add(c.mul(l.y)), p = d.dot(d).max(m.dot(m)), f = Jm.mul(p.inverseSqrt());
46680
- return wr(d.mul(i.x, f), m.mul(i.y, f), h.mul(i.z)).normalize();
46682
+ return Sr(d.mul(i.x, f), m.mul(i.y, f), h.mul(i.z)).normalize();
46681
46683
  });
46682
- class Xae extends _r {
46684
+ class Xae extends Nr {
46683
46685
  static get type() {
46684
46686
  return "NormalMapNode";
46685
46687
  }
@@ -46715,7 +46717,7 @@ const f1 = /* @__PURE__ */ te(Xae).setParameterLength(1, 2), Yae = z(({ textureN
46715
46717
  const { surf_pos: e, surf_norm: r, dHdxy: i } = t, s = e.dFdx().normalize(), n = e.dFdy().normalize(), a = r, o = n.cross(a), l = a.cross(s), h = s.dot(o).mul(Jm), u = h.sign().mul(i.x.mul(o).add(i.y.mul(l)));
46716
46718
  return h.abs().mul(r).sub(u).normalize();
46717
46719
  });
46718
- class Jae extends _r {
46720
+ class Jae extends Nr {
46719
46721
  static get type() {
46720
46722
  return "BumpMapNode";
46721
46723
  }
@@ -46998,8 +47000,8 @@ class bO extends Re {
46998
47000
  const l = new cc(s.array, 3), h = s.usage === Cd ? m1 : Rg;
46999
47001
  this.bufferColor = l, a = k(h(l, "vec3", 3, 0)), this.instanceColorNode = a;
47000
47002
  }
47001
- const o = n.mul(xr).xyz;
47002
- if (xr.assign(o), e.hasGeometryAttribute("normal")) {
47003
+ const o = n.mul(br).xyz;
47004
+ if (br.assign(o), e.hasGeometryAttribute("normal")) {
47003
47005
  const l = JI(qi, n);
47004
47006
  qi.assign(l);
47005
47007
  }
@@ -47080,7 +47082,7 @@ class Ooe extends Re {
47080
47082
  gm("vec3", "vBatchColor").assign(f);
47081
47083
  }
47082
47084
  const c = Us(h);
47083
- xr.assign(h.mul(xr));
47085
+ br.assign(h.mul(br));
47084
47086
  const d = qi.div(k(c[0].dot(c[0]), c[1].dot(c[1]), c[2].dot(c[2]))), m = c.mul(d).xyz;
47085
47087
  qi.assign(m), e.hasGeometryAttribute("tangent") && Qm.mulAssign(c);
47086
47088
  }
@@ -47289,7 +47291,7 @@ class wO extends Re {
47289
47291
  * @param {SkinnedMesh} skinnedMesh - The skinned mesh.
47290
47292
  */
47291
47293
  constructor(e) {
47292
- super("void"), this.skinnedMesh = e, this.updateType = Et.OBJECT, this.skinIndexNode = Go("skinIndex", "uvec4"), this.skinWeightNode = Go("skinWeight", "vec4"), this.bindMatrixNode = tr("bindMatrix", "mat4"), this.bindMatrixInverseNode = tr("bindMatrixInverse", "mat4"), this.boneMatricesNode = p1("skeleton.boneMatrices", "mat4", e.skeleton.bones.length), this.positionNode = xr, this.toPositionNode = xr, this.previousBoneMatricesNode = null;
47294
+ super("void"), this.skinnedMesh = e, this.updateType = Et.OBJECT, this.skinIndexNode = Go("skinIndex", "uvec4"), this.skinWeightNode = Go("skinWeight", "vec4"), this.bindMatrixNode = tr("bindMatrix", "mat4"), this.bindMatrixInverseNode = tr("bindMatrixInverse", "mat4"), this.boneMatricesNode = p1("skeleton.boneMatrices", "mat4", e.skeleton.bones.length), this.positionNode = br, this.toPositionNode = br, this.previousBoneMatricesNode = null;
47293
47295
  }
47294
47296
  /**
47295
47297
  * Transforms the given vertex position via skinning.
@@ -47299,7 +47301,7 @@ class wO extends Re {
47299
47301
  * @return {Node<vec3>} The transformed vertex position.
47300
47302
  */
47301
47303
  getSkinnedPosition(e = this.boneMatricesNode, r = this.positionNode) {
47302
- const { skinIndexNode: i, skinWeightNode: s, bindMatrixNode: n, bindMatrixInverseNode: a } = this, o = e.element(i.x), l = e.element(i.y), h = e.element(i.z), u = e.element(i.w), c = n.mul(r), d = wr(
47304
+ const { skinIndexNode: i, skinWeightNode: s, bindMatrixNode: n, bindMatrixInverseNode: a } = this, o = e.element(i.x), l = e.element(i.y), h = e.element(i.z), u = e.element(i.w), c = n.mul(r), d = Sr(
47303
47305
  o.mul(s.x).mul(c),
47304
47306
  l.mul(s.y).mul(c),
47305
47307
  h.mul(s.z).mul(c),
@@ -47316,7 +47318,7 @@ class wO extends Re {
47316
47318
  */
47317
47319
  getSkinnedNormal(e = this.boneMatricesNode, r = qi) {
47318
47320
  const { skinIndexNode: i, skinWeightNode: s, bindMatrixNode: n, bindMatrixInverseNode: a } = this, o = e.element(i.x), l = e.element(i.y), h = e.element(i.z), u = e.element(i.w);
47319
- let c = wr(
47321
+ let c = Sr(
47320
47322
  s.x.mul(o),
47321
47323
  s.y.mul(l),
47322
47324
  s.z.mul(h),
@@ -47542,12 +47544,12 @@ class Goe extends Re {
47542
47544
  */
47543
47545
  setup(e) {
47544
47546
  const { geometry: r } = e, i = r.morphAttributes.position !== void 0, s = r.hasAttribute("normal") && r.morphAttributes.normal !== void 0, n = r.morphAttributes.position || r.morphAttributes.normal || r.morphAttributes.color, a = n !== void 0 ? n.length : 0, { texture: o, stride: l, size: h } = $oe(r);
47545
- i === !0 && xr.mulAssign(this.morphBaseInfluence), s === !0 && qi.mulAssign(this.morphBaseInfluence);
47547
+ i === !0 && br.mulAssign(this.morphBaseInfluence), s === !0 && qi.mulAssign(this.morphBaseInfluence);
47546
47548
  const u = R(h.width);
47547
47549
  It(a, ({ i: c }) => {
47548
47550
  const d = E(0).toVar();
47549
47551
  this.mesh.count > 1 && this.mesh.morphTexture !== null && this.mesh.morphTexture !== void 0 ? d.assign(or(this.mesh.morphTexture, Wr(R(c).add(1), R(Fo))).r) : d.assign(tr("morphTargetInfluences", "float").element(c).toVar()), Ze(d.notEqual(0), () => {
47550
- i === !0 && xr.addAssign(pN({
47552
+ i === !0 && br.addAssign(pN({
47551
47553
  bufferMap: o,
47552
47554
  influence: d,
47553
47555
  stride: l,
@@ -47923,7 +47925,7 @@ class Fs extends Re {
47923
47925
  Fs.ALPHA_TO_COVERAGE = "alphaToCoverage";
47924
47926
  Fs.DEFAULT = "default";
47925
47927
  Fs.HARDWARE = "hardware";
47926
- const ile = () => J(new Fs()), sle = () => J(new Fs(Fs.ALPHA_TO_COVERAGE)), nle = () => J(new Fs(Fs.HARDWARE)), ale = 0.05, fN = /* @__PURE__ */ z(([t]) => Za(Ge(1e4, us(Ge(17, t.x).add(Ge(0.1, t.y)))).mul(wr(0.1, kt(us(Ge(13, t.y).add(t.x))))))), gN = /* @__PURE__ */ z(([t]) => fN(ue(fN(t.xy), t.z))), ole = /* @__PURE__ */ z(([t]) => {
47928
+ const ile = () => J(new Fs()), sle = () => J(new Fs(Fs.ALPHA_TO_COVERAGE)), nle = () => J(new Fs(Fs.HARDWARE)), ale = 0.05, fN = /* @__PURE__ */ z(([t]) => Za(Ge(1e4, us(Ge(17, t.x).add(Ge(0.1, t.y)))).mul(Sr(0.1, kt(us(Ge(13, t.y).add(t.x))))))), gN = /* @__PURE__ */ z(([t]) => fN(ue(fN(t.xy), t.z))), ole = /* @__PURE__ */ z(([t]) => {
47927
47929
  const e = Yr(
47928
47930
  Cg(BT(t.xyz)),
47929
47931
  Cg(kT(t.xyz))
@@ -47933,7 +47935,7 @@ const ile = () => J(new Fs()), sle = () => J(new Fs(Fs.ALPHA_TO_COVERAGE)), nle
47933
47935
  ), s = ue(
47934
47936
  gN(Un(i.x.mul(t.xyz))),
47935
47937
  gN(Un(i.y.mul(t.xyz)))
47936
- ), n = Za(La(r)), a = wr(Ge(n.oneMinus(), s.x), Ge(n, s.y)), o = Ds(n, n.oneMinus()), l = k(
47938
+ ), n = Za(La(r)), a = Sr(Ge(n.oneMinus(), s.x), Ge(n, s.y)), o = Ds(n, n.oneMinus()), l = k(
47937
47939
  a.mul(a).div(Ge(2, o).mul(ut(1, o))),
47938
47940
  a.sub(Ge(0.5, o)).div(ut(1, o)),
47939
47941
  ut(1, ut(1, a).mul(ut(1, a)).div(Ge(2, o).mul(ut(1, o))))
@@ -48111,7 +48113,7 @@ class Pc extends Kb {
48111
48113
  * @return {Node<vec3>} The position in view space.
48112
48114
  */
48113
48115
  setupPositionView() {
48114
- return Zm.mul(xr).xyz;
48116
+ return Zm.mul(br).xyz;
48115
48117
  }
48116
48118
  /**
48117
48119
  * Setups the position in clip space.
@@ -48141,9 +48143,9 @@ class Pc extends Kb {
48141
48143
  const { object: r, geometry: i } = e;
48142
48144
  if ((i.morphAttributes.position || i.morphAttributes.normal || i.morphAttributes.color) && _O(r).toStack(), r.isSkinnedMesh === !0 && SO(r).toStack(), this.displacementMap) {
48143
48145
  const s = vl("displacementMap", "texture"), n = vl("displacementScale", "float"), a = vl("displacementBias", "float");
48144
- xr.addAssign(qi.normalize().mul(s.x.mul(n).add(a)));
48146
+ br.addAssign(qi.normalize().mul(s.x.mul(n).add(a)));
48145
48147
  }
48146
- return r.isBatchedMesh && TO(r).toStack(), r.isInstancedMesh && r.instanceMatrix && r.instanceMatrix.isInstancedBufferAttribute === !0 && vO(r).toStack(), this.positionNode !== null && xr.assign(II(this.positionNode, "POSITION")), xr;
48148
+ return r.isBatchedMesh && TO(r).toStack(), r.isInstancedMesh && r.instanceMatrix && r.instanceMatrix.isInstancedBufferAttribute === !0 && vO(r).toStack(), this.positionNode !== null && br.assign(II(this.positionNode, "POSITION")), br;
48147
48149
  }
48148
48150
  /**
48149
48151
  * Setups the computation of the material's diffuse color.
@@ -48158,7 +48160,7 @@ class Pc extends Kb {
48158
48160
  const s = this.opacityNode ? E(this.opacityNode) : dO;
48159
48161
  ws.a.assign(ws.a.mul(s));
48160
48162
  let n = null;
48161
- (this.alphaTestNode !== null || this.alphaTest > 0) && (n = this.alphaTestNode !== null ? E(this.alphaTestNode) : uO, ws.a.lessThanEqual(n).discard()), this.alphaHash === !0 && ws.a.lessThan(ole(xr)).discard(), this.transparent === !1 && this.blending === Yb && this.alphaToCoverage === !1 ? ws.a.assign(1) : n === null && ws.a.lessThanEqual(0).discard();
48163
+ (this.alphaTestNode !== null || this.alphaTest > 0) && (n = this.alphaTestNode !== null ? E(this.alphaTestNode) : uO, ws.a.lessThanEqual(n).discard()), this.alphaHash === !0 && ws.a.lessThan(ole(br)).discard(), this.transparent === !1 && this.blending === Yb && this.alphaToCoverage === !1 ? ws.a.assign(1) : n === null && ws.a.lessThanEqual(0).discard();
48162
48164
  }
48163
48165
  /**
48164
48166
  * Abstract interface method that can be implemented by derived materials
@@ -48244,7 +48246,7 @@ class Pc extends Kb {
48244
48246
  if (o && o.getScope().hasLights) {
48245
48247
  const h = this.setupLightingModel(e) || null;
48246
48248
  l = AO(o, h, i, s);
48247
- } else i !== null && (l = k(s !== null ? gr(l, i, s) : i));
48249
+ } else i !== null && (l = k(s !== null ? yr(l, i, s) : i));
48248
48250
  return (n && n.isNode === !0 || r.emissive && r.emissive.isColor === !0) && (c1.assign(k(n || cO)), l = l.add(c1)), l;
48249
48251
  }
48250
48252
  /**
@@ -48344,7 +48346,7 @@ class ule extends By {
48344
48346
  }
48345
48347
  }
48346
48348
  const hle = /* @__PURE__ */ te(ule).setParameterLength(0, 2), cle = (t) => J(t).mul(0.5).add(0.5), dle = (t) => J(t).mul(2).sub(1);
48347
- class mle extends _r {
48349
+ class mle extends Nr {
48348
48350
  static get type() {
48349
48351
  return "EquirectUVNode";
48350
48352
  }
@@ -48453,8 +48455,8 @@ const OO = /* @__PURE__ */ te(mle).setParameterLength(0, 1), VO = /* @__PURE__ *
48453
48455
  { name: "f90", type: "float" },
48454
48456
  { name: "dotVH", type: "float" }
48455
48457
  ]
48456
- }), ky = 1 / 6, BO = (t) => Ge(ky, Ge(t, Ge(t, t.negate().add(3)).sub(3)).add(1)), g1 = (t) => Ge(ky, Ge(t, Ge(t, Ge(3, t).sub(6))).add(4)), kO = (t) => Ge(ky, Ge(t, Ge(t, Ge(-3, t).add(3)).add(3)).add(1)), y1 = (t) => Ge(ky, gn(t, 3)), yN = (t) => BO(t).add(g1(t)), xN = (t) => kO(t).add(y1(t)), bN = (t) => wr(-1, g1(t).div(BO(t).add(g1(t)))), vN = (t) => wr(1, y1(t).div(kO(t).add(y1(t)))), TN = (t, e, r) => {
48457
- const i = t.uvNode, s = Ge(i, e.zw).add(0.5), n = Un(s), a = Za(s), o = yN(a.x), l = xN(a.x), h = bN(a.x), u = vN(a.x), c = bN(a.y), d = vN(a.y), m = ue(n.x.add(h), n.y.add(c)).sub(0.5).mul(e.xy), p = ue(n.x.add(u), n.y.add(c)).sub(0.5).mul(e.xy), f = ue(n.x.add(h), n.y.add(d)).sub(0.5).mul(e.xy), g = ue(n.x.add(u), n.y.add(d)).sub(0.5).mul(e.xy), y = yN(a.y).mul(wr(o.mul(t.sample(m).level(r)), l.mul(t.sample(p).level(r)))), T = xN(a.y).mul(wr(o.mul(t.sample(f).level(r)), l.mul(t.sample(g).level(r))));
48458
+ }), ky = 1 / 6, BO = (t) => Ge(ky, Ge(t, Ge(t, t.negate().add(3)).sub(3)).add(1)), g1 = (t) => Ge(ky, Ge(t, Ge(t, Ge(3, t).sub(6))).add(4)), kO = (t) => Ge(ky, Ge(t, Ge(t, Ge(-3, t).add(3)).add(3)).add(1)), y1 = (t) => Ge(ky, gn(t, 3)), yN = (t) => BO(t).add(g1(t)), xN = (t) => kO(t).add(y1(t)), bN = (t) => Sr(-1, g1(t).div(BO(t).add(g1(t)))), vN = (t) => Sr(1, y1(t).div(kO(t).add(y1(t)))), TN = (t, e, r) => {
48459
+ const i = t.uvNode, s = Ge(i, e.zw).add(0.5), n = Un(s), a = Za(s), o = yN(a.x), l = xN(a.x), h = bN(a.x), u = vN(a.x), c = bN(a.y), d = vN(a.y), m = ue(n.x.add(h), n.y.add(c)).sub(0.5).mul(e.xy), p = ue(n.x.add(u), n.y.add(c)).sub(0.5).mul(e.xy), f = ue(n.x.add(h), n.y.add(d)).sub(0.5).mul(e.xy), g = ue(n.x.add(u), n.y.add(d)).sub(0.5).mul(e.xy), y = yN(a.y).mul(Sr(o.mul(t.sample(m).level(r)), l.mul(t.sample(p).level(r)))), T = xN(a.y).mul(Sr(o.mul(t.sample(f).level(r)), l.mul(t.sample(g).level(r))));
48458
48460
  return y.add(T);
48459
48461
  }, wle = /* @__PURE__ */ z(([t, e = E(3)]) => {
48460
48462
  const r = ue(t.size(R(e))), i = ue(t.size(R(e.add(1)))), s = Zn(1, r), n = Zn(1, i), a = TN(t, ke(s, r), Un(e)), o = TN(t, ke(n, i), Py(e));
@@ -48552,7 +48554,7 @@ const wN = /* @__PURE__ */ E(1), x1 = /* @__PURE__ */ E(-2), vf = /* @__PURE__ *
48552
48554
  const a = E(r), o = k(e), l = $a(Ale(a), x1, n), h = Za(l), u = Un(l), c = k(b1(t, o, u, i, s, n)).toVar();
48553
48555
  return Ze(h.notEqual(0), () => {
48554
48556
  const d = k(b1(t, o, u.add(1), i, s, n)).toVar();
48555
- c.assign(gr(c, d, h));
48557
+ c.assign(yr(c, d, h));
48556
48558
  }), c;
48557
48559
  }), b1 = /* @__PURE__ */ z(([t, e, r, i, s, n]) => {
48558
48560
  const a = E(r).toVar(), o = k(e), l = E(_le(o)).toVar(), h = E(Yr(MN.sub(a), 0)).toVar();
@@ -48999,7 +49001,7 @@ function Fle(t) {
48999
49001
  let e = PN.get(t);
49000
49002
  return e === void 0 && (e = /* @__PURE__ */ new WeakMap(), PN.set(t, e)), e;
49001
49003
  }
49002
- class zle extends _r {
49004
+ class zle extends Nr {
49003
49005
  static get type() {
49004
49006
  return "PMREMNode";
49005
49007
  }
@@ -49063,7 +49065,7 @@ function kle(t) {
49063
49065
  return t == null ? !1 : t.height > 0;
49064
49066
  }
49065
49067
  const Ule = /* @__PURE__ */ te(zle).setParameterLength(1, 3);
49066
- class Dle extends _r {
49068
+ class Dle extends Nr {
49067
49069
  static get type() {
49068
49070
  return "MatcapUVNode";
49069
49071
  }
@@ -49079,7 +49081,7 @@ class Dle extends _r {
49079
49081
  }
49080
49082
  }
49081
49083
  const $le = /* @__PURE__ */ pe(Dle);
49082
- class Gle extends _r {
49084
+ class Gle extends Nr {
49083
49085
  static get type() {
49084
49086
  return "RotateNode";
49085
49087
  }
@@ -49498,7 +49500,7 @@ class eue extends WO {
49498
49500
  const HO = /* @__PURE__ */ te(eue), tue = /* @__PURE__ */ z(([t]) => {
49499
49501
  const e = t.toUint().mul(747796405).add(2891336453), r = e.shiftRight(e.shiftRight(28).add(4)).bitXor(e).mul(277803737);
49500
49502
  return r.shiftRight(22).bitXor(r).toFloat().mul(1 / 2 ** 32);
49501
- }), v1 = (t, e) => gn(Ge(4, t.mul(ut(1, t))), e), rue = (t, e) => t.lessThan(0.5) ? v1(t.mul(2), e).div(2) : ut(1, v1(Ge(ut(1, t), 2), e).div(2)), iue = (t, e, r) => gn(Zn(gn(t, e), wr(gn(t, e), gn(ut(1, t), r))), 1 / e), sue = (t, e) => us(Eg.mul(e.mul(t).sub(1))).div(Eg.mul(e.mul(t).sub(1))), Ta = /* @__PURE__ */ z(([t]) => t.fract().sub(0.5).abs()).setLayout({
49503
+ }), v1 = (t, e) => gn(Ge(4, t.mul(ut(1, t))), e), rue = (t, e) => t.lessThan(0.5) ? v1(t.mul(2), e).div(2) : ut(1, v1(Ge(ut(1, t), 2), e).div(2)), iue = (t, e, r) => gn(Zn(gn(t, e), Sr(gn(t, e), gn(ut(1, t), r))), 1 / e), sue = (t, e) => us(Eg.mul(e.mul(t).sub(1))).div(Eg.mul(e.mul(t).sub(1))), Ta = /* @__PURE__ */ z(([t]) => t.fract().sub(0.5).abs()).setLayout({
49502
49504
  name: "tri",
49503
49505
  type: "float",
49504
49506
  inputs: [
@@ -49574,14 +49576,14 @@ class oue extends Re {
49574
49576
  return i;
49575
49577
  }
49576
49578
  }
49577
- const lue = /* @__PURE__ */ te(oue), hi = (t) => (...e) => lue(t, ...e), eh = /* @__PURE__ */ Be(0).setGroup(Ke).onRenderUpdate((t) => t.time), XO = /* @__PURE__ */ Be(0).setGroup(Ke).onRenderUpdate((t) => t.deltaTime), uue = /* @__PURE__ */ Be(0, "uint").setGroup(Ke).onRenderUpdate((t) => t.frameId), hue = (t = 1) => (console.warn('TSL: timerLocal() is deprecated. Use "time" instead.'), eh.mul(t)), cue = (t = 1) => (console.warn('TSL: timerGlobal() is deprecated. Use "time" instead.'), eh.mul(t)), due = (t = 1) => (console.warn('TSL: timerDelta() is deprecated. Use "deltaTime" instead.'), XO.mul(t)), mue = (t = eh) => t.add(0.75).mul(Math.PI * 2).sin().mul(0.5).add(0.5), pue = (t = eh) => t.fract().round(), fue = (t = eh) => t.add(0.5).fract().mul(2).sub(1).abs(), gue = (t = eh) => t.fract(), yue = /* @__PURE__ */ z(([t, e, r = ue(0.5)]) => jO(t.sub(r), e).add(r)), xue = /* @__PURE__ */ z(([t, e, r = ue(0.5)]) => {
49579
+ const lue = /* @__PURE__ */ te(oue), ci = (t) => (...e) => lue(t, ...e), eh = /* @__PURE__ */ Be(0).setGroup(Ke).onRenderUpdate((t) => t.time), XO = /* @__PURE__ */ Be(0).setGroup(Ke).onRenderUpdate((t) => t.deltaTime), uue = /* @__PURE__ */ Be(0, "uint").setGroup(Ke).onRenderUpdate((t) => t.frameId), hue = (t = 1) => (console.warn('TSL: timerLocal() is deprecated. Use "time" instead.'), eh.mul(t)), cue = (t = 1) => (console.warn('TSL: timerGlobal() is deprecated. Use "time" instead.'), eh.mul(t)), due = (t = 1) => (console.warn('TSL: timerDelta() is deprecated. Use "deltaTime" instead.'), XO.mul(t)), mue = (t = eh) => t.add(0.75).mul(Math.PI * 2).sin().mul(0.5).add(0.5), pue = (t = eh) => t.fract().round(), fue = (t = eh) => t.add(0.5).fract().mul(2).sub(1).abs(), gue = (t = eh) => t.fract(), yue = /* @__PURE__ */ z(([t, e, r = ue(0.5)]) => jO(t.sub(r), e).add(r)), xue = /* @__PURE__ */ z(([t, e, r = ue(0.5)]) => {
49578
49580
  const i = t.sub(r), s = i.dot(i), a = s.mul(s).mul(e);
49579
49581
  return t.add(i.mul(a));
49580
49582
  }), bue = /* @__PURE__ */ z(({ position: t = null, horizontal: e = !0, vertical: r = !1 }) => {
49581
49583
  let i;
49582
49584
  t !== null ? (i = _a.toVar(), i[3][0] = t.x, i[3][1] = t.y, i[3][2] = t.z) : i = _a;
49583
49585
  const s = Xs.mul(i);
49584
- return fm(e) && (s[0][0] = _a[0].length(), s[0][1] = 0, s[0][2] = 0), fm(r) && (s[1][0] = 0, s[1][1] = _a[1].length(), s[1][2] = 0), s[2][0] = 0, s[2][1] = 0, s[2][2] = 1, Ym.mul(s).mul(xr);
49586
+ return fm(e) && (s[0][0] = _a[0].length(), s[0][1] = 0, s[0][2] = 0), fm(r) && (s[1][0] = 0, s[1][1] = _a[1].length(), s[1][2] = 0), s[2][0] = 0, s[2][1] = 0, s[2][2] = 1, Ym.mul(s).mul(br);
49585
49587
  }), vue = /* @__PURE__ */ z(([t = null]) => {
49586
49588
  const e = Og();
49587
49589
  return Og(nw(t)).sub(e).lessThan(0).select(Yo, t);
@@ -49620,7 +49622,7 @@ class Sue extends Re {
49620
49622
  * @param {?Node<vec3>} [positionNode=positionLocal] - Vertex positions in local space.
49621
49623
  * @param {?Node<vec3>} [normalNode=normalLocal] - Normals in local space.
49622
49624
  */
49623
- constructor(e, r = null, i = null, s = E(1), n = xr, a = qi) {
49625
+ constructor(e, r = null, i = null, s = E(1), n = br, a = qi) {
49624
49626
  super("vec4"), this.textureXNode = e, this.textureYNode = r, this.textureZNode = i, this.scaleNode = s, this.positionNode = n, this.normalNode = a;
49625
49627
  }
49626
49628
  setup() {
@@ -49628,7 +49630,7 @@ class Sue extends Re {
49628
49630
  let o = a.abs().normalize();
49629
49631
  o = o.div(o.dot(k(1)));
49630
49632
  const l = n.yz.mul(s), h = n.zx.mul(s), u = n.xy.mul(s), c = e.value, d = r !== null ? r.value : c, m = i !== null ? i.value : c, p = Pt(c, l).mul(o.x), f = Pt(d, h).mul(o.y), g = Pt(m, u).mul(o.z);
49631
- return wr(p, f, g);
49633
+ return Sr(p, f, g);
49632
49634
  }
49633
49635
  }
49634
49636
  const YO = /* @__PURE__ */ te(Sue).setParameterLength(1, 6), Mue = (...t) => YO(...t), zh = new hee(), ul = new W(), Bh = new W(), Gx = new W(), gd = new zt(), Mf = new W(0, 0, -1), Rn = new _i(), yd = new W(), _f = new W(), xd = new _i(), Nf = new rr(), Vg = new Bm(), _ue = Yo.flipX();
@@ -50207,7 +50209,7 @@ class Yue extends Fy {
50207
50209
  }
50208
50210
  }
50209
50211
  const Zue = (t, e, r) => J(new Yue(t, e, r)), IN = /* @__PURE__ */ new WeakMap();
50210
- class Jue extends _r {
50212
+ class Jue extends Nr {
50211
50213
  static get type() {
50212
50214
  return "VelocityNode";
50213
50215
  }
@@ -50251,7 +50253,7 @@ class Jue extends _r {
50251
50253
  * @return {Node<vec2>} The motion vector.
50252
50254
  */
50253
50255
  setup() {
50254
- const e = this.projectionMatrix === null ? Ym : Be(this.projectionMatrix), r = this.previousCameraViewMatrix.mul(this.previousModelWorldMatrix), i = e.mul(Zm).mul(xr), s = this.previousProjectionMatrix.mul(r).mul(Pg), n = i.xy.div(i.w), a = s.xy.div(s.w);
50256
+ const e = this.projectionMatrix === null ? Ym : Be(this.projectionMatrix), r = this.previousCameraViewMatrix.mul(this.previousModelWorldMatrix), i = e.mul(Zm).mul(br), s = this.previousProjectionMatrix.mul(r).mul(Pg), n = i.xy.div(i.w), a = s.xy.div(s.w);
50255
50257
  return ut(n, a);
50256
50258
  }
50257
50259
  }
@@ -50285,7 +50287,7 @@ const Que = /* @__PURE__ */ pe(Jue), eV = /* @__PURE__ */ z(([t, e]) => Ds(1, t.
50285
50287
  { name: "base", type: "vec3" },
50286
50288
  { name: "blend", type: "vec3" }
50287
50289
  ]
50288
- }), iV = /* @__PURE__ */ z(([t, e]) => gr(t.mul(2).mul(e), t.oneMinus().mul(2).mul(e.oneMinus()).oneMinus(), Iy(0.5, t))).setLayout({
50290
+ }), iV = /* @__PURE__ */ z(([t, e]) => yr(t.mul(2).mul(e), t.oneMinus().mul(2).mul(e.oneMinus()).oneMinus(), Iy(0.5, t))).setLayout({
50289
50291
  name: "blendOverlay",
50290
50292
  type: "vec3",
50291
50293
  inputs: [
@@ -50303,19 +50305,19 @@ const Que = /* @__PURE__ */ pe(Jue), eV = /* @__PURE__ */ z(([t, e]) => Ds(1, t.
50303
50305
  { name: "blend", type: "vec4" }
50304
50306
  ]
50305
50307
  }), ehe = /* @__PURE__ */ z(([t]) => ke(t.rgb.mul(t.a), t.a), { color: "vec4", return: "vec4" }), the = /* @__PURE__ */ z(([t]) => (Ze(t.a.equal(0), () => ke(0)), ke(t.rgb.div(t.a), t.a)), { color: "vec4", return: "vec4" }), rhe = (...t) => (console.warn('THREE.TSL: "burn" has been renamed. Use "blendBurn" instead.'), eV(t)), ihe = (...t) => (console.warn('THREE.TSL: "dodge" has been renamed. Use "blendDodge" instead.'), tV(t)), she = (...t) => (console.warn('THREE.TSL: "screen" has been renamed. Use "blendScreen" instead.'), rV(t)), nhe = (...t) => (console.warn('THREE.TSL: "overlay" has been renamed. Use "blendOverlay" instead.'), iV(t)), ahe = /* @__PURE__ */ z(([t]) => dw(t.rgb)), ohe = /* @__PURE__ */ z(([t, e = E(1)]) => e.mix(dw(t.rgb), t.rgb)), lhe = /* @__PURE__ */ z(([t, e = E(1)]) => {
50306
- const r = wr(t.r, t.g, t.b).div(3), i = t.r.max(t.g.max(t.b)), s = i.sub(r).mul(e).mul(-3);
50307
- return gr(t.rgb, i, s);
50308
+ const r = Sr(t.r, t.g, t.b).div(3), i = t.r.max(t.g.max(t.b)), s = i.sub(r).mul(e).mul(-3);
50309
+ return yr(t.rgb, i, s);
50308
50310
  }), uhe = /* @__PURE__ */ z(([t, e = E(1)]) => {
50309
50311
  const r = k(0.57735, 0.57735, 0.57735), i = e.cos();
50310
50312
  return k(t.rgb.mul(i).add(r.cross(t.rgb).mul(e.sin()).add(r.mul(Xo(r, t.rgb).mul(i.oneMinus())))));
50311
- }), dw = (t, e = k(pr.getLuminanceCoefficients(new W()))) => Xo(t, e), hhe = /* @__PURE__ */ z(([
50313
+ }), dw = (t, e = k(fr.getLuminanceCoefficients(new W()))) => Xo(t, e), hhe = /* @__PURE__ */ z(([
50312
50314
  t,
50313
50315
  e = k(1),
50314
50316
  r = k(0),
50315
50317
  i = k(1),
50316
50318
  s = E(1),
50317
50319
  // ASC CDL v1.2 explicitly requires Rec. 709 luminance coefficients.
50318
- n = k(pr.getLuminanceCoefficients(new W(), Tg))
50320
+ n = k(fr.getLuminanceCoefficients(new W(), Tg))
50319
50321
  ]) => {
50320
50322
  const a = t.rgb.dot(k(n)), o = Yr(t.rgb.mul(e).add(r), 0).toVar(), l = o.pow(i).toVar();
50321
50323
  return Ze(o.r.greaterThan(0), () => {
@@ -50326,7 +50328,7 @@ const Que = /* @__PURE__ */ pe(Jue), eV = /* @__PURE__ */ z(([t, e]) => Ds(1, t.
50326
50328
  o.b.assign(l.b);
50327
50329
  }), o.assign(a.add(o.sub(a).mul(s))), ke(o.rgb, t.a);
50328
50330
  });
50329
- class che extends _r {
50331
+ class che extends Nr {
50330
50332
  static get type() {
50331
50333
  return "PosterizeNode";
50332
50334
  }
@@ -50392,7 +50394,7 @@ class VN extends sV {
50392
50394
  return new this.constructor(this.passNode, this.textureName, this.previousTexture);
50393
50395
  }
50394
50396
  }
50395
- class Qn extends _r {
50397
+ class Qn extends Nr {
50396
50398
  static get type() {
50397
50399
  return "PassNode";
50398
50400
  }
@@ -50614,7 +50616,7 @@ class ghe extends Qn {
50614
50616
  _createMaterial() {
50615
50617
  const e = new Pc();
50616
50618
  e.isMeshToonOutlineMaterial = !0, e.name = "Toon_Outline", e.side = vy;
50617
- const r = qi.negate(), i = Ym.mul(Zm), s = E(1), n = i.mul(ke(xr, 1)), a = i.mul(ke(xr.add(r), 1)), o = Ku(n.sub(a));
50619
+ const r = qi.negate(), i = Ym.mul(Zm), s = E(1), n = i.mul(ke(br, 1)), a = i.mul(ke(br.add(r), 1)), o = Ku(n.sub(a));
50618
50620
  return e.vertexNode = n.add(o.mul(this.thicknessNode).mul(n.w).mul(s)), e.colorNode = ke(this.colorNode, this.alphaNode), e;
50619
50621
  }
50620
50622
  /**
@@ -50711,7 +50713,7 @@ const yhe = (t, e, r = new Xa(0, 0, 0), i = 3e-3, s = 1) => J(new ghe(t, e, J(r)
50711
50713
  const o = ut(1, r), l = ut(1, o.mul(o).div(a.add(o.sub(r))));
50712
50714
  t.mulAssign(l.div(a));
50713
50715
  const h = ut(1, Zn(1, i.mul(a.sub(l)).add(1)));
50714
- return gr(t, k(l), h);
50716
+ return yr(t, k(l), h);
50715
50717
  }).setLayout({
50716
50718
  name: "neutralToneMapping",
50717
50719
  type: "vec3",
@@ -51750,7 +51752,7 @@ const LN = /* @__PURE__ */ new WeakMap(), dV = /* @__PURE__ */ z(({ depthTexture
51750
51752
  let T = Pt(t, g);
51751
51753
  return t.isArrayTexture && (T = T.depth(i)), T.compare(y);
51752
51754
  }, n = tr("mapSize", "vec2", r).setGroup(Ke), a = tr("radius", "float", r).setGroup(Ke), o = ue(1).div(n), l = o.x.negate().mul(a), h = o.y.negate().mul(a), u = o.x.mul(a), c = o.y.mul(a), d = l.div(2), m = h.div(2), p = u.div(2), f = c.div(2);
51753
- return wr(
51755
+ return Sr(
51754
51756
  s(e.xy.add(ue(l, h)), e.z),
51755
51757
  s(e.xy.add(ue(0, h)), e.z),
51756
51758
  s(e.xy.add(ue(u, h)), e.z),
@@ -51774,38 +51776,38 @@ const LN = /* @__PURE__ */ new WeakMap(), dV = /* @__PURE__ */ z(({ depthTexture
51774
51776
  let m = Pt(t, c);
51775
51777
  return t.isArrayTexture && (m = m.depth(i)), m.compare(d);
51776
51778
  }, n = tr("mapSize", "vec2", r).setGroup(Ke), a = ue(1).div(n), o = a.x, l = a.y, h = e.xy, u = Za(h.mul(n).add(0.5));
51777
- return h.subAssign(u.mul(a)), wr(
51779
+ return h.subAssign(u.mul(a)), Sr(
51778
51780
  s(h, e.z),
51779
51781
  s(h.add(ue(o, 0)), e.z),
51780
51782
  s(h.add(ue(0, l)), e.z),
51781
51783
  s(h.add(a), e.z),
51782
- gr(
51784
+ yr(
51783
51785
  s(h.add(ue(o.negate(), 0)), e.z),
51784
51786
  s(h.add(ue(o.mul(2), 0)), e.z),
51785
51787
  u.x
51786
51788
  ),
51787
- gr(
51789
+ yr(
51788
51790
  s(h.add(ue(o.negate(), l)), e.z),
51789
51791
  s(h.add(ue(o.mul(2), l)), e.z),
51790
51792
  u.x
51791
51793
  ),
51792
- gr(
51794
+ yr(
51793
51795
  s(h.add(ue(0, l.negate())), e.z),
51794
51796
  s(h.add(ue(0, l.mul(2))), e.z),
51795
51797
  u.y
51796
51798
  ),
51797
- gr(
51799
+ yr(
51798
51800
  s(h.add(ue(o, l.negate())), e.z),
51799
51801
  s(h.add(ue(o, l.mul(2))), e.z),
51800
51802
  u.y
51801
51803
  ),
51802
- gr(
51803
- gr(
51804
+ yr(
51805
+ yr(
51804
51806
  s(h.add(ue(o.negate(), l.negate())), e.z),
51805
51807
  s(h.add(ue(o.mul(2), l.negate())), e.z),
51806
51808
  u.x
51807
51809
  ),
51808
- gr(
51810
+ yr(
51809
51811
  s(h.add(ue(o.negate(), l.mul(2))), e.z),
51810
51812
  s(h.add(ue(o.mul(2), l.mul(2))), e.z),
51811
51813
  u.x
@@ -51846,7 +51848,7 @@ const LN = /* @__PURE__ */ new WeakMap(), dV = /* @__PURE__ */ z(({ depthTexture
51846
51848
  const n = E(0).toVar("meanVertical"), a = E(0).toVar("squareMeanVertical"), o = t.lessThanEqual(E(1)).select(E(0), E(2).div(t.sub(1))), l = t.lessThanEqual(E(1)).select(E(0), E(-1));
51847
51849
  It({ start: R(0), end: R(t), type: "int", condition: "<" }, ({ i: u }) => {
51848
51850
  const c = l.add(E(u).mul(o));
51849
- let d = i.sample(wr(tp.xy, ue(0, c).mul(e)).div(r));
51851
+ let d = i.sample(Sr(tp.xy, ue(0, c).mul(e)).div(r));
51850
51852
  i.value.isArrayTexture && (d = d.depth(s)), d = d.x, n.addAssign(d), a.addAssign(d.mul(d));
51851
51853
  }), n.divAssign(t), a.divAssign(t);
51852
51854
  const h = ra(a.sub(n.mul(n)));
@@ -51855,8 +51857,8 @@ const LN = /* @__PURE__ */ new WeakMap(), dV = /* @__PURE__ */ z(({ depthTexture
51855
51857
  const n = E(0).toVar("meanHorizontal"), a = E(0).toVar("squareMeanHorizontal"), o = t.lessThanEqual(E(1)).select(E(0), E(2).div(t.sub(1))), l = t.lessThanEqual(E(1)).select(E(0), E(-1));
51856
51858
  It({ start: R(0), end: R(t), type: "int", condition: "<" }, ({ i: u }) => {
51857
51859
  const c = l.add(E(u).mul(o));
51858
- let d = i.sample(wr(tp.xy, ue(c, 0).mul(e)).div(r));
51859
- i.value.isArrayTexture && (d = d.depth(s)), n.addAssign(d.x), a.addAssign(wr(d.y.mul(d.y), d.x.mul(d.x)));
51860
+ let d = i.sample(Sr(tp.xy, ue(c, 0).mul(e)).div(r));
51861
+ i.value.isArrayTexture && (d = d.depth(s)), n.addAssign(d.x), a.addAssign(Sr(d.y.mul(d.y), d.x.mul(d.x)));
51860
51862
  }), n.divAssign(t), a.divAssign(t);
51861
51863
  const h = ra(a.sub(n.mul(n)));
51862
51864
  return ue(n, h);
@@ -51955,7 +51957,7 @@ class xV extends xce {
51955
51957
  const m = n === qf && s.isPointLightShadow !== !0 ? this.vsmShadowMapHorizontal.texture : a, p = this.setupShadowFilter(e, { filterFn: d, shadowTexture: o.texture, depthTexture: m, shadowCoord: c, shadow: s, depthLayer: this.depthLayer });
51956
51958
  let f = Pt(o.texture, c);
51957
51959
  a.isArrayTexture && (f = f.depth(this.depthLayer));
51958
- const g = gr(1, p.rgb.mix(f, 1), l.mul(f.a)).toVar();
51960
+ const g = yr(1, p.rgb.mix(f, 1), l.mul(f.a)).toVar();
51959
51961
  return this.shadowMap = o, this.shadow.map = o, g;
51960
51962
  }
51961
51963
  /**
@@ -52176,7 +52178,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52176
52178
  { name: "val", type: "float" },
52177
52179
  { name: "b", type: "bool" }
52178
52180
  ]
52179
- }), vr = /* @__PURE__ */ z(([t]) => {
52181
+ }), Tr = /* @__PURE__ */ z(([t]) => {
52180
52182
  const e = E(t).toVar();
52181
52183
  return R(Un(e));
52182
52184
  }).setLayout({
@@ -52187,7 +52189,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52187
52189
  ]
52188
52190
  }), Xt = /* @__PURE__ */ z(([t, e]) => {
52189
52191
  const r = E(t).toVar();
52190
- return e.assign(vr(r)), r.sub(E(e));
52192
+ return e.assign(Tr(r)), r.sub(E(e));
52191
52193
  }), Uce = /* @__PURE__ */ z(([t, e, r, i, s, n]) => {
52192
52194
  const a = E(n).toVar(), o = E(s).toVar(), l = E(i).toVar(), h = E(r).toVar(), u = E(e).toVar(), c = E(t).toVar(), d = E(ut(1, o)).toVar();
52193
52195
  return ut(1, a).mul(c.mul(d).add(u.mul(o))).add(a.mul(h.mul(d).add(l.mul(o))));
@@ -52216,7 +52218,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52216
52218
  { name: "s", type: "float" },
52217
52219
  { name: "t", type: "float" }
52218
52220
  ]
52219
- }), wV = /* @__PURE__ */ hi([Uce, Dce]), $ce = /* @__PURE__ */ z(([t, e, r, i, s, n, a, o, l, h, u]) => {
52221
+ }), wV = /* @__PURE__ */ ci([Uce, Dce]), $ce = /* @__PURE__ */ z(([t, e, r, i, s, n, a, o, l, h, u]) => {
52220
52222
  const c = E(u).toVar(), d = E(h).toVar(), m = E(l).toVar(), p = E(o).toVar(), f = E(a).toVar(), g = E(n).toVar(), y = E(s).toVar(), T = E(i).toVar(), w = E(r).toVar(), v = E(e).toVar(), M = E(t).toVar(), S = E(ut(1, m)).toVar(), _ = E(ut(1, d)).toVar();
52221
52223
  return E(ut(1, c)).toVar().mul(_.mul(M.mul(S).add(v.mul(m))).add(d.mul(w.mul(S).add(T.mul(m))))).add(c.mul(_.mul(y.mul(S).add(g.mul(m))).add(d.mul(f.mul(S).add(p.mul(m))))));
52222
52224
  }).setLayout({
@@ -52254,7 +52256,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52254
52256
  { name: "t", type: "float" },
52255
52257
  { name: "r", type: "float" }
52256
52258
  ]
52257
- }), SV = /* @__PURE__ */ hi([$ce, Gce]), jce = /* @__PURE__ */ z(([t, e, r]) => {
52259
+ }), SV = /* @__PURE__ */ ci([$ce, Gce]), jce = /* @__PURE__ */ z(([t, e, r]) => {
52258
52260
  const i = E(r).toVar(), s = E(e).toVar(), n = Se(t).toVar(), a = Se(n.bitAnd(Se(7))).toVar(), o = E(Zd(a.lessThan(Se(4)), s, i)).toVar(), l = E(Ge(2, Zd(a.lessThan(Se(4)), i, s))).toVar();
52259
52261
  return Lg(o, Yn(a.bitAnd(Se(1)))).add(Lg(l, Yn(a.bitAnd(Se(2)))));
52260
52262
  }).setLayout({
@@ -52277,7 +52279,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52277
52279
  { name: "y", type: "float" },
52278
52280
  { name: "z", type: "float" }
52279
52281
  ]
52280
- }), ri = /* @__PURE__ */ hi([jce, Wce]), qce = /* @__PURE__ */ z(([t, e, r]) => {
52282
+ }), ri = /* @__PURE__ */ ci([jce, Wce]), qce = /* @__PURE__ */ z(([t, e, r]) => {
52281
52283
  const i = E(r).toVar(), s = E(e).toVar(), n = kc(t).toVar();
52282
52284
  return k(ri(n.x, s, i), ri(n.y, s, i), ri(n.z, s, i));
52283
52285
  }).setLayout({
@@ -52300,7 +52302,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52300
52302
  { name: "y", type: "float" },
52301
52303
  { name: "z", type: "float" }
52302
52304
  ]
52303
- }), _s = /* @__PURE__ */ hi([qce, Hce]), Xce = /* @__PURE__ */ z(([t]) => {
52305
+ }), _s = /* @__PURE__ */ ci([qce, Hce]), Xce = /* @__PURE__ */ z(([t]) => {
52304
52306
  const e = E(t).toVar();
52305
52307
  return Ge(0.6616, e);
52306
52308
  }).setLayout({
@@ -52327,7 +52329,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52327
52329
  inputs: [
52328
52330
  { name: "v", type: "vec3" }
52329
52331
  ]
52330
- }), MV = /* @__PURE__ */ hi([Xce, Zce]), Jce = /* @__PURE__ */ z(([t]) => {
52332
+ }), MV = /* @__PURE__ */ ci([Xce, Zce]), Jce = /* @__PURE__ */ z(([t]) => {
52331
52333
  const e = k(t).toVar();
52332
52334
  return Ge(0.982, e);
52333
52335
  }).setLayout({
@@ -52336,7 +52338,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52336
52338
  inputs: [
52337
52339
  { name: "v", type: "vec3" }
52338
52340
  ]
52339
- }), _V = /* @__PURE__ */ hi([Yce, Jce]), as = /* @__PURE__ */ z(([t, e]) => {
52341
+ }), _V = /* @__PURE__ */ ci([Yce, Jce]), as = /* @__PURE__ */ z(([t, e]) => {
52340
52342
  const r = R(e).toVar(), i = Se(t).toVar();
52341
52343
  return i.shiftLeft(r).bitOr(i.shiftRight(R(32).sub(r)));
52342
52344
  }).setLayout({
@@ -52432,7 +52434,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52432
52434
  { name: "xx", type: "int" },
52433
52435
  { name: "yy", type: "int" }
52434
52436
  ]
52435
- }), At = /* @__PURE__ */ hi([Qce, Kce, ede, tde, rde]), ide = /* @__PURE__ */ z(([t, e]) => {
52437
+ }), At = /* @__PURE__ */ ci([Qce, Kce, ede, tde, rde]), ide = /* @__PURE__ */ z(([t, e]) => {
52436
52438
  const r = R(e).toVar(), i = R(t).toVar(), s = Se(At(i, r)).toVar(), n = kc().toVar();
52437
52439
  return n.x.assign(s.bitAnd(R(255))), n.y.assign(s.shiftRight(R(8)).bitAnd(R(255))), n.z.assign(s.shiftRight(R(16)).bitAnd(R(255))), n;
52438
52440
  }).setLayout({
@@ -52453,7 +52455,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52453
52455
  { name: "y", type: "int" },
52454
52456
  { name: "z", type: "int" }
52455
52457
  ]
52456
- }), Ns = /* @__PURE__ */ hi([ide, sde]), nde = /* @__PURE__ */ z(([t]) => {
52458
+ }), Ns = /* @__PURE__ */ ci([ide, sde]), nde = /* @__PURE__ */ z(([t]) => {
52457
52459
  const e = ue(t).toVar(), r = R().toVar(), i = R().toVar(), s = E(Xt(e.x, r)).toVar(), n = E(Xt(e.y, i)).toVar(), a = E(Dn(s)).toVar(), o = E(Dn(n)).toVar(), l = E(wV(ri(At(r, i), s, n), ri(At(r.add(R(1)), i), s.sub(1), n), ri(At(r, i.add(R(1))), s, n.sub(1)), ri(At(r.add(R(1)), i.add(R(1))), s.sub(1), n.sub(1)), a, o)).toVar();
52458
52460
  return MV(l);
52459
52461
  }).setLayout({
@@ -52471,7 +52473,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52471
52473
  inputs: [
52472
52474
  { name: "p", type: "vec3" }
52473
52475
  ]
52474
- }), yw = /* @__PURE__ */ hi([nde, ade]), ode = /* @__PURE__ */ z(([t]) => {
52476
+ }), yw = /* @__PURE__ */ ci([nde, ade]), ode = /* @__PURE__ */ z(([t]) => {
52475
52477
  const e = ue(t).toVar(), r = R().toVar(), i = R().toVar(), s = E(Xt(e.x, r)).toVar(), n = E(Xt(e.y, i)).toVar(), a = E(Dn(s)).toVar(), o = E(Dn(n)).toVar(), l = k(wV(_s(Ns(r, i), s, n), _s(Ns(r.add(R(1)), i), s.sub(1), n), _s(Ns(r, i.add(R(1))), s, n.sub(1)), _s(Ns(r.add(R(1)), i.add(R(1))), s.sub(1), n.sub(1)), a, o)).toVar();
52476
52478
  return MV(l);
52477
52479
  }).setLayout({
@@ -52489,8 +52491,8 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52489
52491
  inputs: [
52490
52492
  { name: "p", type: "vec3" }
52491
52493
  ]
52492
- }), xw = /* @__PURE__ */ hi([ode, lde]), ude = /* @__PURE__ */ z(([t]) => {
52493
- const e = E(t).toVar(), r = R(vr(e)).toVar();
52494
+ }), xw = /* @__PURE__ */ ci([ode, lde]), ude = /* @__PURE__ */ z(([t]) => {
52495
+ const e = E(t).toVar(), r = R(Tr(e)).toVar();
52494
52496
  return Si(At(r));
52495
52497
  }).setLayout({
52496
52498
  name: "mx_cell_noise_float_0",
@@ -52499,7 +52501,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52499
52501
  { name: "p", type: "float" }
52500
52502
  ]
52501
52503
  }), hde = /* @__PURE__ */ z(([t]) => {
52502
- const e = ue(t).toVar(), r = R(vr(e.x)).toVar(), i = R(vr(e.y)).toVar();
52504
+ const e = ue(t).toVar(), r = R(Tr(e.x)).toVar(), i = R(Tr(e.y)).toVar();
52503
52505
  return Si(At(r, i));
52504
52506
  }).setLayout({
52505
52507
  name: "mx_cell_noise_float_1",
@@ -52508,7 +52510,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52508
52510
  { name: "p", type: "vec2" }
52509
52511
  ]
52510
52512
  }), cde = /* @__PURE__ */ z(([t]) => {
52511
- const e = k(t).toVar(), r = R(vr(e.x)).toVar(), i = R(vr(e.y)).toVar(), s = R(vr(e.z)).toVar();
52513
+ const e = k(t).toVar(), r = R(Tr(e.x)).toVar(), i = R(Tr(e.y)).toVar(), s = R(Tr(e.z)).toVar();
52512
52514
  return Si(At(r, i, s));
52513
52515
  }).setLayout({
52514
52516
  name: "mx_cell_noise_float_2",
@@ -52517,7 +52519,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52517
52519
  { name: "p", type: "vec3" }
52518
52520
  ]
52519
52521
  }), dde = /* @__PURE__ */ z(([t]) => {
52520
- const e = ke(t).toVar(), r = R(vr(e.x)).toVar(), i = R(vr(e.y)).toVar(), s = R(vr(e.z)).toVar(), n = R(vr(e.w)).toVar();
52522
+ const e = ke(t).toVar(), r = R(Tr(e.x)).toVar(), i = R(Tr(e.y)).toVar(), s = R(Tr(e.z)).toVar(), n = R(Tr(e.w)).toVar();
52521
52523
  return Si(At(r, i, s, n));
52522
52524
  }).setLayout({
52523
52525
  name: "mx_cell_noise_float_3",
@@ -52525,8 +52527,8 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52525
52527
  inputs: [
52526
52528
  { name: "p", type: "vec4" }
52527
52529
  ]
52528
- }), mde = /* @__PURE__ */ hi([ude, hde, cde, dde]), pde = /* @__PURE__ */ z(([t]) => {
52529
- const e = E(t).toVar(), r = R(vr(e)).toVar();
52530
+ }), mde = /* @__PURE__ */ ci([ude, hde, cde, dde]), pde = /* @__PURE__ */ z(([t]) => {
52531
+ const e = E(t).toVar(), r = R(Tr(e)).toVar();
52530
52532
  return k(Si(At(r, R(0))), Si(At(r, R(1))), Si(At(r, R(2))));
52531
52533
  }).setLayout({
52532
52534
  name: "mx_cell_noise_vec3_0",
@@ -52535,7 +52537,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52535
52537
  { name: "p", type: "float" }
52536
52538
  ]
52537
52539
  }), fde = /* @__PURE__ */ z(([t]) => {
52538
- const e = ue(t).toVar(), r = R(vr(e.x)).toVar(), i = R(vr(e.y)).toVar();
52540
+ const e = ue(t).toVar(), r = R(Tr(e.x)).toVar(), i = R(Tr(e.y)).toVar();
52539
52541
  return k(Si(At(r, i, R(0))), Si(At(r, i, R(1))), Si(At(r, i, R(2))));
52540
52542
  }).setLayout({
52541
52543
  name: "mx_cell_noise_vec3_1",
@@ -52544,7 +52546,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52544
52546
  { name: "p", type: "vec2" }
52545
52547
  ]
52546
52548
  }), gde = /* @__PURE__ */ z(([t]) => {
52547
- const e = k(t).toVar(), r = R(vr(e.x)).toVar(), i = R(vr(e.y)).toVar(), s = R(vr(e.z)).toVar();
52549
+ const e = k(t).toVar(), r = R(Tr(e.x)).toVar(), i = R(Tr(e.y)).toVar(), s = R(Tr(e.z)).toVar();
52548
52550
  return k(Si(At(r, i, s, R(0))), Si(At(r, i, s, R(1))), Si(At(r, i, s, R(2))));
52549
52551
  }).setLayout({
52550
52552
  name: "mx_cell_noise_vec3_2",
@@ -52553,7 +52555,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52553
52555
  { name: "p", type: "vec3" }
52554
52556
  ]
52555
52557
  }), yde = /* @__PURE__ */ z(([t]) => {
52556
- const e = ke(t).toVar(), r = R(vr(e.x)).toVar(), i = R(vr(e.y)).toVar(), s = R(vr(e.z)).toVar(), n = R(vr(e.w)).toVar();
52558
+ const e = ke(t).toVar(), r = R(Tr(e.x)).toVar(), i = R(Tr(e.y)).toVar(), s = R(Tr(e.z)).toVar(), n = R(Tr(e.w)).toVar();
52557
52559
  return k(Si(At(r, i, s, n, R(0))), Si(At(r, i, s, n, R(1))), Si(At(r, i, s, n, R(2))));
52558
52560
  }).setLayout({
52559
52561
  name: "mx_cell_noise_vec3_3",
@@ -52561,7 +52563,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52561
52563
  inputs: [
52562
52564
  { name: "p", type: "vec4" }
52563
52565
  ]
52564
- }), AV = /* @__PURE__ */ hi([pde, fde, gde, yde]), Fg = /* @__PURE__ */ z(([t, e, r, i]) => {
52566
+ }), AV = /* @__PURE__ */ ci([pde, fde, gde, yde]), Fg = /* @__PURE__ */ z(([t, e, r, i]) => {
52565
52567
  const s = E(i).toVar(), n = E(r).toVar(), a = R(e).toVar(), o = k(t).toVar(), l = E(0).toVar(), h = E(1).toVar();
52566
52568
  return It(a, () => {
52567
52569
  l.addAssign(h.mul(yw(o))), h.mulAssign(s), o.mulAssign(n);
@@ -52649,7 +52651,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52649
52651
  { name: "jitter", type: "float" },
52650
52652
  { name: "metric", type: "int" }
52651
52653
  ]
52652
- }), Dc = /* @__PURE__ */ hi([vde, Tde]), wde = /* @__PURE__ */ z(([t, e, r]) => {
52654
+ }), Dc = /* @__PURE__ */ ci([vde, Tde]), wde = /* @__PURE__ */ z(([t, e, r]) => {
52653
52655
  const i = R(r).toVar(), s = E(e).toVar(), n = ue(t).toVar(), a = R().toVar(), o = R().toVar(), l = ue(Xt(n.x, a), Xt(n.y, o)).toVar(), h = E(1e6).toVar();
52654
52656
  return It({ start: -1, end: R(1), name: "x", condition: "<=" }, ({ x: u }) => {
52655
52657
  It({ start: -1, end: R(1), name: "y", condition: "<=" }, ({ y: c }) => {
@@ -52733,7 +52735,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52733
52735
  { name: "jitter", type: "float" },
52734
52736
  { name: "metric", type: "int" }
52735
52737
  ]
52736
- }), Nde = /* @__PURE__ */ hi([wde, _de]), Ade = /* @__PURE__ */ z(([t, e, r]) => {
52738
+ }), Nde = /* @__PURE__ */ ci([wde, _de]), Ade = /* @__PURE__ */ z(([t, e, r]) => {
52737
52739
  const i = R(r).toVar(), s = E(e).toVar(), n = k(t).toVar(), a = R().toVar(), o = R().toVar(), l = R().toVar(), h = k(Xt(n.x, a), Xt(n.y, o), Xt(n.z, l)).toVar(), u = ue(1e6, 1e6).toVar();
52738
52740
  return It({ start: -1, end: R(1), name: "x", condition: "<=" }, ({ x: c }) => {
52739
52741
  It({ start: -1, end: R(1), name: "y", condition: "<=" }, ({ y: d }) => {
@@ -52757,7 +52759,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52757
52759
  { name: "jitter", type: "float" },
52758
52760
  { name: "metric", type: "int" }
52759
52761
  ]
52760
- }), Ede = /* @__PURE__ */ hi([Sde, Ade]), Cde = /* @__PURE__ */ z(([t, e, r]) => {
52762
+ }), Ede = /* @__PURE__ */ ci([Sde, Ade]), Cde = /* @__PURE__ */ z(([t, e, r]) => {
52761
52763
  const i = R(r).toVar(), s = E(e).toVar(), n = k(t).toVar(), a = R().toVar(), o = R().toVar(), l = R().toVar(), h = k(Xt(n.x, a), Xt(n.y, o), Xt(n.z, l)).toVar(), u = k(1e6, 1e6, 1e6).toVar();
52762
52764
  return It({ start: -1, end: R(1), name: "x", condition: "<=" }, ({ x: c }) => {
52763
52765
  It({ start: -1, end: R(1), name: "y", condition: "<=" }, ({ y: d }) => {
@@ -52783,7 +52785,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52783
52785
  { name: "jitter", type: "float" },
52784
52786
  { name: "metric", type: "int" }
52785
52787
  ]
52786
- }), Rde = /* @__PURE__ */ hi([Mde, Cde]), Pde = /* @__PURE__ */ z(([t]) => {
52788
+ }), Rde = /* @__PURE__ */ ci([Mde, Cde]), Pde = /* @__PURE__ */ z(([t]) => {
52787
52789
  const e = t.y, r = t.z, i = k().toVar();
52788
52790
  return Ze(e.lessThan(1e-4), () => {
52789
52791
  i.assign(k(r, r, r));
@@ -52823,9 +52825,9 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52823
52825
  Ze(r.greaterThanEqual(a), () => {
52824
52826
  l.assign(i.sub(s).div(o));
52825
52827
  }).ElseIf(i.greaterThanEqual(a), () => {
52826
- l.assign(wr(2, s.sub(r).div(o)));
52828
+ l.assign(Sr(2, s.sub(r).div(o)));
52827
52829
  }).Else(() => {
52828
- l.assign(wr(4, r.sub(i).div(o)));
52830
+ l.assign(Sr(4, r.sub(i).div(o)));
52829
52831
  }), l.mulAssign(1 / 6), Ze(l.lessThan(0), () => {
52830
52832
  l.addAssign(1);
52831
52833
  });
@@ -52838,7 +52840,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52838
52840
  ]
52839
52841
  }), Ode = /* @__PURE__ */ z(([t]) => {
52840
52842
  const e = k(t).toVar(), r = IT(VT(e, k(0.04045))).toVar(), i = k(e.div(12.92)).toVar(), s = k(gn(Yr(e.add(k(0.055)), k(0)).div(1.055), k(2.4))).toVar();
52841
- return gr(i, s, r);
52843
+ return yr(i, s, r);
52842
52844
  }).setLayout({
52843
52845
  name: "mx_srgb_texture_to_lin_rec709",
52844
52846
  type: "vec3",
@@ -52849,7 +52851,7 @@ const Fce = (t, e) => J(new Lce(t, e)), TV = /* @__PURE__ */ z(({ lightDistance:
52849
52851
  t = E(t), e = E(e);
52850
52852
  const r = ue(e.dFdx(), e.dFdy()).length().mul(0.7071067811865476);
52851
52853
  return Du(t.sub(r), t.add(r), e);
52852
- }, RV = (t, e, r, i) => gr(t, e, r[i].clamp()), Vde = (t, e, r = Zt()) => RV(t, e, r, "x"), Lde = (t, e, r = Zt()) => RV(t, e, r, "y"), PV = (t, e, r, i, s) => gr(t, e, CV(r, i[s])), Fde = (t, e, r, i = Zt()) => PV(t, e, r, i, "x"), zde = (t, e, r, i = Zt()) => PV(t, e, r, i, "y"), Bde = (t = 1, e = 0, r = Zt()) => r.mul(t).add(e), kde = (t, e = 1) => (t = E(t), t.abs().pow(e).mul(t.sign())), Ude = (t, e = 1, r = 0.5) => E(t).sub(r).mul(e).add(r), Dde = (t = Zt(), e = 1, r = 0) => yw(t.convert("vec2|vec3")).mul(e).add(r), $de = (t = Zt(), e = 1, r = 0) => xw(t.convert("vec2|vec3")).mul(e).add(r), Gde = (t = Zt(), e = 1, r = 0) => (t = t.convert("vec2|vec3"), ke(xw(t), yw(t.add(ue(19, 73)))).mul(e).add(r)), jde = (t = Zt(), e = 1) => Nde(t.convert("vec2|vec3"), e, R(1)), Wde = (t = Zt(), e = 1) => Ede(t.convert("vec2|vec3"), e, R(1)), qde = (t = Zt(), e = 1) => Rde(t.convert("vec2|vec3"), e, R(1)), Hde = (t = Zt()) => mde(t.convert("vec2|vec3")), Xde = (t = Zt(), e = 3, r = 2, i = 0.5, s = 1) => Fg(t, R(e), r, i).mul(s), Yde = (t = Zt(), e = 3, r = 2, i = 0.5, s = 1) => xde(t, R(e), r, i).mul(s), Zde = (t = Zt(), e = 3, r = 2, i = 0.5, s = 1) => EV(t, R(e), r, i).mul(s), Jde = (t = Zt(), e = 3, r = 2, i = 0.5, s = 1) => bde(t, R(e), r, i).mul(s), Qde = /* @__PURE__ */ z(([t, e, r]) => {
52854
+ }, RV = (t, e, r, i) => yr(t, e, r[i].clamp()), Vde = (t, e, r = Zt()) => RV(t, e, r, "x"), Lde = (t, e, r = Zt()) => RV(t, e, r, "y"), PV = (t, e, r, i, s) => yr(t, e, CV(r, i[s])), Fde = (t, e, r, i = Zt()) => PV(t, e, r, i, "x"), zde = (t, e, r, i = Zt()) => PV(t, e, r, i, "y"), Bde = (t = 1, e = 0, r = Zt()) => r.mul(t).add(e), kde = (t, e = 1) => (t = E(t), t.abs().pow(e).mul(t.sign())), Ude = (t, e = 1, r = 0.5) => E(t).sub(r).mul(e).add(r), Dde = (t = Zt(), e = 1, r = 0) => yw(t.convert("vec2|vec3")).mul(e).add(r), $de = (t = Zt(), e = 1, r = 0) => xw(t.convert("vec2|vec3")).mul(e).add(r), Gde = (t = Zt(), e = 1, r = 0) => (t = t.convert("vec2|vec3"), ke(xw(t), yw(t.add(ue(19, 73)))).mul(e).add(r)), jde = (t = Zt(), e = 1) => Nde(t.convert("vec2|vec3"), e, R(1)), Wde = (t = Zt(), e = 1) => Ede(t.convert("vec2|vec3"), e, R(1)), qde = (t = Zt(), e = 1) => Rde(t.convert("vec2|vec3"), e, R(1)), Hde = (t = Zt()) => mde(t.convert("vec2|vec3")), Xde = (t = Zt(), e = 3, r = 2, i = 0.5, s = 1) => Fg(t, R(e), r, i).mul(s), Yde = (t = Zt(), e = 3, r = 2, i = 0.5, s = 1) => xde(t, R(e), r, i).mul(s), Zde = (t = Zt(), e = 3, r = 2, i = 0.5, s = 1) => EV(t, R(e), r, i).mul(s), Jde = (t = Zt(), e = 3, r = 2, i = 0.5, s = 1) => bde(t, R(e), r, i).mul(s), Qde = /* @__PURE__ */ z(([t, e, r]) => {
52853
52855
  const i = Ku(t).toVar(), s = ut(E(0.5).mul(e.sub(r)), Lu).div(i).toVar(), n = ut(E(-0.5).mul(e.sub(r)), Lu).div(i).toVar(), a = k().toVar();
52854
52856
  a.x = i.x.greaterThan(E(0)).select(s.x, n.x), a.y = i.y.greaterThan(E(0)).select(s.y, n.y), a.z = i.z.greaterThan(E(0)).select(s.z, n.z);
52855
52857
  const o = Ds(a.x, a.y, a.z).toVar();
@@ -52899,7 +52901,7 @@ var b = /* @__PURE__ */ Object.freeze({
52899
52901
  abs: kt,
52900
52902
  acesFilmicToneMapping: whe,
52901
52903
  acos: XP,
52902
- add: wr,
52904
+ add: Sr,
52903
52905
  addMethodChaining: X,
52904
52906
  addNodeElement: aae,
52905
52907
  agxToneMapping: Nhe,
@@ -53159,7 +53161,7 @@ var b = /* @__PURE__ */ Object.freeze({
53159
53161
  mediumpModelViewMatrix: WI,
53160
53162
  metalness: fne,
53161
53163
  min: Ds,
53162
- mix: gr,
53164
+ mix: yr,
53163
53165
  mixElement: mI,
53164
53166
  mod: qm,
53165
53167
  modInt: kP,
@@ -53233,7 +53235,7 @@ var b = /* @__PURE__ */ Object.freeze({
53233
53235
  output: fc,
53234
53236
  outputStruct: Kle,
53235
53237
  overlay: nhe,
53236
- overloadingFn: hi,
53238
+ overloadingFn: ci,
53237
53239
  parabola: v1,
53238
53240
  parallaxDirection: oO,
53239
53241
  parallaxUV: Wae,
@@ -53247,7 +53249,7 @@ var b = /* @__PURE__ */ Object.freeze({
53247
53249
  pointUV: Uue,
53248
53250
  pointWidth: Ane,
53249
53251
  positionGeometry: ZT,
53250
- positionLocal: xr,
53252
+ positionLocal: br,
53251
53253
  positionPrevious: Pg,
53252
53254
  positionView: ni,
53253
53255
  positionViewDirection: cs,
@@ -54065,7 +54067,7 @@ const ae = UL(null), Tfe = ({
54065
54067
  }), [a, l, h, u]), d = Ne(!1), m = Ne(!1), p = Ne(!1), f = Ne(!1), g = Ne(null), y = async () => {
54066
54068
  const w = n.current;
54067
54069
  if (!(!w || d.current || m.current)) {
54068
- console.log("[Shader] Initializing renderer..."), m.current = !0;
54070
+ m.current = !0;
54069
54071
  try {
54070
54072
  const v = o.current;
54071
54073
  v.isInitialized() || await v.initialize({
@@ -54080,7 +54082,7 @@ const ae = UL(null), Tfe = ({
54080
54082
  null,
54081
54083
  // No metadata to pass
54082
54084
  {}
54083
- ), d.current = !0, m.current = !1, e || v.showLicenseWarning(), console.log("[Shader] Renderer initialized successfully");
54085
+ ), d.current = !0, m.current = !1, e || v.showLicenseWarning();
54084
54086
  } catch (v) {
54085
54087
  throw console.error("[Shader] Initialization failed:", v), m.current = !1, v;
54086
54088
  }
@@ -54091,7 +54093,7 @@ const ae = UL(null), Tfe = ({
54091
54093
  const M = v[0];
54092
54094
  if (!M) return;
54093
54095
  const S = w.getBoundingClientRect(), _ = M.isIntersecting && S && S.width > 0 && S.height > 0;
54094
- _ && !f.current ? (console.log("[Shader] Canvas became visible, initializing..."), y().catch(console.error), f.current = !0) : !_ && f.current && (console.log("[Shader] Canvas became hidden, cleaning up renderer..."), o.current.cleanup(), d.current = !1, m.current = !1, f.current = !1);
54096
+ _ && !f.current ? (o.current.isInitialized() ? o.current.startAnimation() : y().catch(console.error), f.current = !0) : !_ && f.current && (o.current.stopAnimation(), f.current = !1);
54095
54097
  }, { threshold: 0 }), g.current.observe(w));
54096
54098
  };
54097
54099
  return U(() => {
@@ -54100,11 +54102,11 @@ const ae = UL(null), Tfe = ({
54100
54102
  if (!w)
54101
54103
  return;
54102
54104
  const v = w.getBoundingClientRect();
54103
- return v.width > 0 && v.height > 0 ? (console.log("[Shader] Canvas visible on mount, initializing..."), y().catch(console.error), f.current = !0) : (console.log("[Shader] Canvas hidden on mount, setting up observer..."), f.current = !1), T(), () => {
54105
+ return v.width > 0 && v.height > 0 ? (y().catch(console.error), f.current = !0) : f.current = !1, T(), () => {
54104
54106
  if (!p.current) {
54105
54107
  p.current = !0, g.current && (g.current.disconnect(), g.current = null);
54106
54108
  try {
54107
- o.current.cleanup(), d.current = !1, m.current = !1, console.log("[Shader] Renderer cleaned up successfully");
54109
+ o.current.cleanup(), d.current = !1, m.current = !1;
54108
54110
  } catch (S) {
54109
54111
  console.warn("[Shader] Error during cleanup:", S);
54110
54112
  }