shaders 2.2.14 → 2.2.15

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 (122) hide show
  1. package/dist/core/{AngularBlur-BTUdXC0g.js → AngularBlur-ClvtyURQ.js} +12 -13
  2. package/dist/core/{Ascii-Bu8ii7oo.js → Ascii-BT0-K_vw.js} +28 -29
  3. package/dist/core/{Blob-CzWSpVTR.js → Blob-BlQ_1T_8.js} +12 -13
  4. package/dist/core/{Blur-BzUO9yxF.js → Blur-421AjWLH.js} +8 -9
  5. package/dist/core/{Bulge-BCXYAzig.js → Bulge-CZRVoR6C.js} +6 -7
  6. package/dist/core/{CRTScreen-cJ3XHrI9.js → CRTScreen-C_U9g_IR.js} +8 -9
  7. package/dist/core/{ChannelBlur-BEK1qzGn.js → ChannelBlur-5pzcB6Zv.js} +4 -5
  8. package/dist/core/{Checkerboard-B8CnUlbi.js → Checkerboard-CrQkqXhD.js} +10 -11
  9. package/dist/core/{ChromaFlow-AHO3C4o3.js → ChromaFlow-CNrQdL8f.js} +16 -17
  10. package/dist/core/{ChromaticAberration-nVg3r1FK.js → ChromaticAberration-D9H7O17Y.js} +6 -7
  11. package/dist/core/{Circle-C8ltF4BZ.js → Circle-DnLaDn8V.js} +7 -8
  12. package/dist/core/{CursorTrail-BcaRHjU5.js → CursorTrail-NY6n97VG.js} +19 -20
  13. package/dist/core/{DiffuseBlur-Dq_vFrB1.js → DiffuseBlur-C_n01ABk.js} +11 -12
  14. package/dist/core/{Dither-CpN3vGSh.js → Dither-4s-c4zh4.js} +6 -7
  15. package/dist/core/{DotGrid-BFUzeSQw.js → DotGrid-BYl8XdMi.js} +9 -10
  16. package/dist/core/{Duotone-DGNEAlye.js → Duotone-DbewOoB4.js} +12 -13
  17. package/dist/core/{FilmGrain-BAKXXtLg.js → FilmGrain-zA_-knOw.js} +7 -8
  18. package/dist/core/{FloatingParticles-Fv8JIzKk.js → FloatingParticles-BhVnqMsE.js} +22 -23
  19. package/dist/core/{GlassTiles-5MyBj1ff.js → GlassTiles-CFI57glh.js} +7 -8
  20. package/dist/core/{Glow-DvJj7BB7.js → Glow-CQgl3IoS.js} +10 -11
  21. package/dist/core/{Godrays-D3VnYrAm.js → Godrays-BBCtZxbv.js} +18 -19
  22. package/dist/core/{Grayscale-oWIF3PV5.js → Grayscale-CAEFLteL.js} +9 -10
  23. package/dist/core/{Grid-Bov7AA9m.js → Grid-DlM-rVbZ.js} +5 -6
  24. package/dist/core/{GridDistortion-CWYom5Dw.js → GridDistortion-ZOZphSAT.js} +29 -30
  25. package/dist/core/{Group-CPk-7fiA.js → Group-BQAs3RiH.js} +7 -8
  26. package/dist/core/{Halftone-F7fsdu7W.js → Halftone-ci4ga-_J.js} +8 -9
  27. package/dist/core/{HueShift-CiS4hdtk.js → HueShift-CyxzPcJV.js} +11 -12
  28. package/dist/core/{ImageTexture-B3Q29OHX.js → ImageTexture-CdAGsPuH.js} +18 -20
  29. package/dist/core/{Invert-Cyc4JHWc.js → Invert-iPsiIqNZ.js} +7 -8
  30. package/dist/core/{LinearBlur-BTC54qzk.js → LinearBlur-BEaaoIk-.js} +13 -14
  31. package/dist/core/{LinearGradient-DPe-Z-lw.js → LinearGradient-DR_7RxLX.js} +10 -11
  32. package/dist/core/{Liquify-D2nzMDzq.js → Liquify-Bi02_ugh.js} +33 -34
  33. package/dist/core/{Pixelate-irPzmtQm.js → Pixelate-CSsdT1rr.js} +4 -5
  34. package/dist/core/{PolarCoordinates-Ck5ZWrQO.js → PolarCoordinates-D626ml58.js} +10 -11
  35. package/dist/core/{Posterize-DICq_t96.js → Posterize-DhZkMaC7.js} +8 -10
  36. package/dist/core/{ProgressiveBlur-BuORe3VH.js → ProgressiveBlur-CGtCfLF8.js} +16 -17
  37. package/dist/core/{RadialGradient-CbaCbOJj.js → RadialGradient-C0_WzmbH.js} +13 -14
  38. package/dist/core/{RectangularCoordinates-1LIDaeHR.js → RectangularCoordinates-DfXw7fhI.js} +6 -7
  39. package/dist/core/{Ripples-0Ufm3-fY.js → Ripples-DkemN3eh.js} +9 -10
  40. package/dist/core/{Saturation-DbSXtSeK.js → Saturation-Dup81Pnq.js} +7 -8
  41. package/dist/core/{SimplexNoise-BKB94dhx.js → SimplexNoise-BYEiCjDj.js} +9 -10
  42. package/dist/core/{SineWave-CkWtnzHF.js → SineWave-C6MRPtsy.js} +9 -10
  43. package/dist/core/{SolidColor-DaB-FHNX.js → SolidColor-BZHRczgb.js} +1 -1
  44. package/dist/core/{Spherize-CqjZj4yV.js → Spherize-DOAnDx2l.js} +13 -14
  45. package/dist/core/{Spiral-BkzSmPUL.js → Spiral-BMjnWXh1.js} +11 -12
  46. package/dist/core/{Strands-DyrV6zDO.js → Strands-BOVsuJLe.js} +14 -15
  47. package/dist/core/{Stretch-DeBlJ-NH.js → Stretch-D6bHc6yp.js} +13 -14
  48. package/dist/core/{Swirl-BHn9Ji7_.js → Swirl-BFoc0ImG.js} +14 -15
  49. package/dist/core/{TiltShift-DiArippe.js → TiltShift-BiNvvhzj.js} +14 -15
  50. package/dist/core/{Tritone-DrzxJUaq.js → Tritone-gdx2AA0m.js} +9 -10
  51. package/dist/core/{Twirl-C6xj1p52.js → Twirl-BsV8YbqC.js} +8 -9
  52. package/dist/core/{Vibrance-C6lNgpWH.js → Vibrance-C182fbSw.js} +5 -6
  53. package/dist/core/{WaveDistortion-DcXxPZ2w.js → WaveDistortion-CmaS2zDB.js} +12 -13
  54. package/dist/core/{ZoomBlur-_feIVJs6.js → ZoomBlur-DLf5xQ16.js} +10 -11
  55. package/dist/core/{colorMixing-C-FChLp0.js → colorMixing--dhzx0ch.js} +10 -11
  56. package/dist/core/edges-CDzKsauJ.js +15 -0
  57. package/dist/core/index.js +636 -684
  58. package/dist/core/renderer.d.ts.map +1 -1
  59. package/dist/core/shaders/AngularBlur/index.js +3 -3
  60. package/dist/core/shaders/Ascii/index.js +2 -2
  61. package/dist/core/shaders/Blob/index.js +5 -5
  62. package/dist/core/shaders/Blur/index.js +2 -2
  63. package/dist/core/shaders/Bulge/index.js +4 -4
  64. package/dist/core/shaders/CRTScreen/index.js +2 -2
  65. package/dist/core/shaders/ChannelBlur/index.js +2 -2
  66. package/dist/core/shaders/Checkerboard/index.js +4 -4
  67. package/dist/core/shaders/ChromaFlow/index.js +3 -3
  68. package/dist/core/shaders/ChromaticAberration/index.js +3 -3
  69. package/dist/core/shaders/Circle/index.js +3 -3
  70. package/dist/core/shaders/CursorTrail/index.js +4 -4
  71. package/dist/core/shaders/DiffuseBlur/index.js +4 -4
  72. package/dist/core/shaders/Dither/index.js +3 -3
  73. package/dist/core/shaders/DotGrid/index.js +3 -3
  74. package/dist/core/shaders/Duotone/index.js +4 -4
  75. package/dist/core/shaders/FilmGrain/index.js +2 -2
  76. package/dist/core/shaders/FloatingParticles/index.js +3 -3
  77. package/dist/core/shaders/GlassTiles/index.js +2 -2
  78. package/dist/core/shaders/Glow/index.js +2 -2
  79. package/dist/core/shaders/Godrays/index.js +3 -3
  80. package/dist/core/shaders/Grayscale/index.js +2 -2
  81. package/dist/core/shaders/Grid/index.js +3 -3
  82. package/dist/core/shaders/GridDistortion/index.js +4 -4
  83. package/dist/core/shaders/Group/index.js +2 -2
  84. package/dist/core/shaders/Halftone/index.js +3 -3
  85. package/dist/core/shaders/HueShift/index.js +2 -2
  86. package/dist/core/shaders/ImageTexture/index.js +2 -2
  87. package/dist/core/shaders/Invert/index.js +2 -2
  88. package/dist/core/shaders/LinearBlur/index.js +3 -3
  89. package/dist/core/shaders/LinearGradient/index.js +4 -4
  90. package/dist/core/shaders/Liquify/index.js +4 -4
  91. package/dist/core/shaders/Pixelate/index.js +2 -2
  92. package/dist/core/shaders/PolarCoordinates/index.js +4 -4
  93. package/dist/core/shaders/Posterize/index.js +2 -2
  94. package/dist/core/shaders/ProgressiveBlur/index.js +3 -3
  95. package/dist/core/shaders/RadialGradient/index.js +4 -4
  96. package/dist/core/shaders/RectangularCoordinates/index.js +4 -4
  97. package/dist/core/shaders/Ripples/index.js +5 -5
  98. package/dist/core/shaders/Saturation/index.js +2 -2
  99. package/dist/core/shaders/SimplexNoise/index.js +5 -5
  100. package/dist/core/shaders/SineWave/index.js +3 -3
  101. package/dist/core/shaders/SolidColor/index.js +3 -3
  102. package/dist/core/shaders/Spherize/index.js +3 -3
  103. package/dist/core/shaders/Spiral/index.js +4 -4
  104. package/dist/core/shaders/Strands/index.js +4 -4
  105. package/dist/core/shaders/Stretch/index.js +4 -4
  106. package/dist/core/shaders/Swirl/index.js +5 -5
  107. package/dist/core/shaders/TiltShift/index.js +3 -3
  108. package/dist/core/shaders/Tritone/index.js +4 -4
  109. package/dist/core/shaders/Twirl/index.js +4 -4
  110. package/dist/core/shaders/Vibrance/index.js +2 -2
  111. package/dist/core/shaders/WaveDistortion/index.js +4 -4
  112. package/dist/core/shaders/ZoomBlur/index.js +3 -3
  113. package/dist/core/three.tsl-Btj1hLsf.js +43845 -0
  114. package/dist/core/{time-5uQ65blS.js → time-DbRMw6Jm.js} +4 -5
  115. package/dist/core/{transformations-DBjTkQ5b.js → transformations-CsrIJXh-.js} +176 -177
  116. package/dist/react/index.cjs +83 -79
  117. package/dist/react/index.js +50779 -50512
  118. package/dist/svelte/index.js +50786 -50519
  119. package/dist/vue/index.js +50430 -50163
  120. package/package.json +1 -1
  121. package/dist/core/edges-B-tVdqcI.js +0 -16
  122. package/dist/core/three.tsl-BqgDcRt9.js +0 -43424
@@ -1,7 +1,6 @@
1
- import { k as V, m as q } from "./three.tsl-BqgDcRt9.js";
2
- import { o as I } from "./transformations-DBjTkQ5b.js";
3
- q();
4
- const P = {
1
+ import { O as _ } from "./three.tsl-Btj1hLsf.js";
2
+ import { o as q } from "./transformations-CsrIJXh-.js";
3
+ const I = {
5
4
  name: "AngularBlur",
6
5
  category: "Blurs",
7
6
  description: "Radial motion blur rotating around a center point",
@@ -24,7 +23,7 @@ const P = {
24
23
  x: 0.5,
25
24
  y: 0.5
26
25
  },
27
- transform: I,
26
+ transform: q,
28
27
  description: "The center point of the rotation",
29
28
  ui: {
30
29
  type: "position",
@@ -33,25 +32,25 @@ const P = {
33
32
  }
34
33
  },
35
34
  fragmentNode: ({ uniforms: r, childNode: a, onCleanup: y }) => {
36
- const { vec2: l, vec4: u, float: t, screenUV: x, sin: v, cos: h, Fn: T, convertToTexture: b } = V;
35
+ const { vec2: l, vec4: u, float: t, screenUV: x, sin: v, cos: T, Fn: b, convertToTexture: h } = _;
37
36
  if (!a) return u(0, 0, 0, 0);
38
- const o = b(a);
37
+ const o = h(a);
39
38
  y(() => {
40
39
  o?.renderTarget?.dispose && o.renderTarget.dispose();
41
40
  });
42
41
  const c = l(r.center.uniform.x, r.center.uniform.y.oneMinus()), A = r.intensity.uniform.mul(5e-3);
43
- return T(() => {
44
- const e = x.sub(c), s = u(0).toVar(), i = t(0).toVar(), _ = A.div(t(31));
42
+ return b(() => {
43
+ const e = x.sub(c), s = u(0).toVar(), i = t(0).toVar(), B = A.div(t(31));
45
44
  for (let n = 0; n < 32; n++) {
46
- const d = t(n).div(t(31)).sub(0.5).mul(2), m = t(1).div(t(2.506628)).mul(t(-0.5).mul(d).mul(d).div(t(0.64)).exp()), p = _.mul(t(n)), f = h(p), g = v(p), B = l(e.x.mul(f).sub(e.y.mul(g)), e.x.mul(g).add(e.y.mul(f))).add(c), C = o.sample(B).mul(m);
47
- s.assign(s.add(C)), i.assign(i.add(m));
45
+ const d = t(n).div(t(31)).sub(0.5).mul(2), m = t(1).div(t(2.506628)).mul(t(-0.5).mul(d).mul(d).div(t(0.64)).exp()), p = B.mul(t(n)), f = T(p), g = v(p), C = l(e.x.mul(f).sub(e.y.mul(g)), e.x.mul(g).add(e.y.mul(f))).add(c), V = o.sample(C).mul(m);
46
+ s.assign(s.add(V)), i.assign(i.add(m));
48
47
  }
49
48
  return s.div(i);
50
49
  })();
51
50
  }
52
51
  };
53
- var w = P;
52
+ var w = I;
54
53
  export {
55
- P as n,
54
+ I as n,
56
55
  w as t
57
56
  };
@@ -1,6 +1,5 @@
1
- import { A as x, C as $e, b as Re, d as Y, k as _e, m as ke, p as Ee, r as De, t as qe } from "./three.tsl-BqgDcRt9.js";
2
- import { DataTexture as Ge, NearestFilter as ee, RGBAFormat as Je, UnsignedByteType as Ve } from "three";
3
- ke();
1
+ import { O as $e, S as Re, d as Y, k as x, p as ke, r as Ee, t as _e, y as De } from "./three.tsl-Btj1hLsf.js";
2
+ import { DataTexture as qe, NearestFilter as ee, RGBAFormat as Ge, UnsignedByteType as Je } from "three";
4
3
  const d = {
5
4
  name: "Ascii",
6
5
  category: "Stylize",
@@ -79,8 +78,8 @@ const d = {
79
78
  }
80
79
  },
81
80
  fragmentNode: ({ uniforms: a, childNode: $, onCleanup: R, onBeforeRender: te }) => {
82
- const { vec2: v, vec3: _, vec4: k, floor: M, fract: ae, dot: E, ceil: oe, sqrt: ne, screenUV: le, texture: re, viewportSize: ce, convertToTexture: se } = _e;
83
- if (!$) return k(0, 0, 0, 0);
81
+ const { vec2: v, vec3: k, vec4: E, floor: M, fract: ae, dot: _, ceil: oe, sqrt: ne, screenUV: le, texture: re, viewportSize: ce, convertToTexture: se } = $e;
82
+ if (!$) return E(0, 0, 0, 0);
84
83
  const w = se($);
85
84
  R(() => {
86
85
  w?.renderTarget?.dispose && w.renderTarget.dispose();
@@ -93,9 +92,9 @@ const d = {
93
92
  "Space Mono": "Space+Mono",
94
93
  "Roboto Mono": "Roboto+Mono",
95
94
  "Courier Prime": "Courier+Prime"
96
- }, b = /* @__PURE__ */ new Set();
95
+ }, y = /* @__PURE__ */ new Set();
97
96
  async function ie(e) {
98
- if (b.has(e) || !D[e]) return;
97
+ if (y.has(e) || !D[e]) return;
99
98
  const n = D[e];
100
99
  if (!document.querySelector(`link[href*="${n}"]`)) {
101
100
  const t = document.createElement("link");
@@ -114,9 +113,9 @@ const d = {
114
113
  break;
115
114
  } catch {
116
115
  }
117
- await new Promise((r) => setTimeout(r, 500)), b.add(e);
116
+ await new Promise((r) => setTimeout(r, 500)), y.add(e);
118
117
  } else
119
- await new Promise((t) => setTimeout(t, 1e3)), b.add(e);
118
+ await new Promise((t) => setTimeout(t, 1e3)), y.add(e);
120
119
  } catch {
121
120
  }
122
121
  }
@@ -127,8 +126,8 @@ const d = {
127
126
  const c = p.getContext("2d");
128
127
  c.clearRect(0, 0, p.width, p.height), c.fillStyle = "#ffffff", c.font = `${W}px "${t}", ${t}, monospace`, !c.font.includes(t) && !c.font.includes("IBM") && !c.font.includes("Plex") && (c.font = `${W}px ${t}, monospace`), c.textAlign = "center", c.textBaseline = "middle";
129
128
  for (let C = 0; C < u; C++) {
130
- const Ae = e[C], Be = Math.floor(C / i), Pe = C % i * h + h / 2, Ie = Be * h + h / 2;
131
- c.fillText(Ae, Pe, Ie);
129
+ const Be = e[C], Pe = Math.floor(C / i), Ae = C % i * h + h / 2, Ie = Pe * h + h / 2;
130
+ c.fillText(Be, Ae, Ie);
132
131
  }
133
132
  const Ue = c.getImageData(0, 0, p.width, p.height);
134
133
  return {
@@ -142,56 +141,56 @@ const d = {
142
141
  fontFamily: t,
143
142
  uvScale: i * h / l
144
143
  };
145
- }, ue = d.props.characters.default, de = d.props.cellSize.default, pe = d.props.fontFamily.default, he = d.props.spacing.transform ? d.props.spacing.transform(d.props.spacing.default) : d.props.spacing.default, y = a?.characters?.uniform?.value ?? ue, G = a?.cellSize?.uniform?.value ?? de, F = a?.fontFamily?.uniform?.value ?? pe, J = a?.spacing?.uniform?.value ?? he;
144
+ }, ue = d.props.characters.default, de = d.props.cellSize.default, pe = d.props.fontFamily.default, he = d.props.spacing.transform ? d.props.spacing.transform(d.props.spacing.default) : d.props.spacing.default, b = a?.characters?.uniform?.value ?? ue, G = a?.cellSize?.uniform?.value ?? de, F = a?.fontFamily?.uniform?.value ?? pe, J = a?.spacing?.uniform?.value ?? he;
146
145
  let o = {
147
146
  data: new Uint8Array(l * l * 4),
148
147
  width: l,
149
148
  height: l,
150
149
  atlasSize: 3,
151
150
  cellSize: G,
152
- charCount: y.length,
153
- characters: y,
151
+ charCount: b.length,
152
+ characters: b,
154
153
  fontFamily: F,
155
154
  uvScale: 1
156
155
  };
157
- const s = new Ge(o.data, l, l, Je, Ve);
156
+ const s = new qe(o.data, l, l, Ge, Je);
158
157
  s.minFilter = ee, s.magFilter = ee, s.generateMipmaps = !1, s.needsUpdate = !0;
159
- const me = re(s), T = x(o.charCount), U = x(o.cellSize), A = x(o.uvScale);
160
- let m = y, f = G, S = F, g = J;
161
- const V = async () => {
158
+ const me = re(s), T = x(o.charCount), U = x(o.cellSize), B = x(o.uvScale);
159
+ let m = b, f = G, S = F, g = J;
160
+ const O = async () => {
162
161
  const e = a?.characters?.uniform?.value ?? m, n = a?.cellSize?.uniform?.value ?? f, t = a?.fontFamily?.uniform?.value ?? S, r = a?.spacing?.uniform?.value ?? g;
163
- o = await q(e, n, t, r), s.image.data = o.data, s.needsUpdate = !0, T.value = o.charCount, U.value = o.cellSize, A.value = o.uvScale, m = e, f = n, S = t, g = r;
162
+ o = await q(e, n, t, r), s.image.data = o.data, s.needsUpdate = !0, T.value = o.charCount, U.value = o.cellSize, B.value = o.uvScale, m = e, f = n, S = t, g = r;
164
163
  };
165
164
  setTimeout(() => {
166
- V().catch((e) => {
165
+ O().catch((e) => {
167
166
  console.error("Failed to initialize atlas:", e);
168
167
  }), ie(a?.fontFamily?.uniform?.value ?? F).then(() => {
169
- V().catch((e) => {
168
+ O().catch((e) => {
170
169
  console.error("Failed to update atlas with custom font:", e);
171
170
  });
172
171
  }).catch((e) => {
173
172
  console.error("Failed to load font:", e);
174
173
  });
175
174
  }, 0);
176
- let O = 0, z = !1;
175
+ let V = 0, z = !1;
177
176
  te(() => {
178
177
  const e = Date.now();
179
- if (e - O < 16 || z) return;
178
+ if (e - V < 16 || z) return;
180
179
  const n = a.characters?.uniform?.value ?? m, t = a.cellSize?.uniform?.value ?? f, r = a.fontFamily?.uniform?.value ?? S, u = a.spacing?.uniform?.value ?? g;
181
- !n || n.length === 0 || (n !== m || t !== f || r !== S || u !== g) && (O = e, z = !0, q(n, t, r, u).then((i) => {
182
- o = i, s.image.data = o.data, s.needsUpdate = !0, T.value = o.charCount, U.value = o.cellSize, A.value = o.uvScale, m = n, f = t, S = r, g = u, z = !1;
180
+ !n || n.length === 0 || (n !== m || t !== f || r !== S || u !== g) && (V = e, z = !0, q(n, t, r, u).then((i) => {
181
+ o = i, s.image.data = o.data, s.needsUpdate = !0, T.value = o.charCount, U.value = o.cellSize, B.value = o.uvScale, m = n, f = t, S = r, g = u, z = !1;
183
182
  }).catch((i) => {
184
183
  console.error("Failed to update atlas:", i), z = !1;
185
184
  }));
186
185
  }), R(() => {
187
186
  s.dispose();
188
187
  });
189
- const fe = U.mul(1.5), N = ce.div(fe), L = le.mul(N), Se = M(L), ge = ae(L), X = a.spacing?.uniform ?? x(J), Z = v(0.5), j = ge.sub(Z), Ce = j.div(X).add(Z), ve = De(Ee(qe(j), v(X.mul(0.5)))), ze = Se.add(v(0.5)).div(N), B = w.sample(ze), xe = E(B.rgb, _(0.299, 0.587, 0.114)), P = T, H = M(xe.mul(0.8).add(0.1).mul(P).min(P.sub(1e-4))), I = oe(ne(P)), Me = H.mod(I), we = M(H.div(I)), K = Y(1).div(I).mul(A), be = v(Me, we).mul(K).add(Ce.mul(K)), Q = me.sample(be), ye = E(Q.rgb, _(0.299, 0.587, 0.114)).lessThan(0.1);
190
- return k(Q.rgb.mul(B.rgb), $e(Re(ye, ve), Y(0), B.a));
188
+ const fe = U.mul(1.5), N = ce.div(fe), L = le.mul(N), Se = M(L), ge = ae(L), X = a.spacing?.uniform ?? x(J), Z = v(0.5), j = ge.sub(Z), Ce = j.div(X).add(Z), ve = Ee(ke(_e(j), v(X.mul(0.5)))), ze = Se.add(v(0.5)).div(N), P = w.sample(ze), xe = _(P.rgb, k(0.299, 0.587, 0.114)), A = T, H = M(xe.mul(0.8).add(0.1).mul(A).min(A.sub(1e-4))), I = oe(ne(A)), Me = H.mod(I), we = M(H.div(I)), K = Y(1).div(I).mul(B), ye = v(Me, we).mul(K).add(Ce.mul(K)), Q = me.sample(ye), be = _(Q.rgb, k(0.299, 0.587, 0.114)).lessThan(0.1);
189
+ return E(Q.rgb.mul(P.rgb), Re(De(be, ve), Y(0), P.a));
191
190
  }
192
191
  };
193
- var Le = d;
192
+ var Ne = d;
194
193
  export {
195
194
  d as n,
196
- Le as t
195
+ Ne as t
197
196
  };
@@ -1,9 +1,8 @@
1
- import { k as fo, m as bo } from "./three.tsl-BqgDcRt9.js";
2
- import { t as yo } from "./time-5uQ65blS.js";
3
- import { i as xo, o as Co, r as g, t as vo } from "./transformations-DBjTkQ5b.js";
4
- import { t as So } from "./colorMixing-C-FChLp0.js";
5
- bo();
6
- const Ao = {
1
+ import { O as fo } from "./three.tsl-Btj1hLsf.js";
2
+ import { t as bo } from "./time-DbRMw6Jm.js";
3
+ import { i as yo, o as xo, r as g, t as Co } from "./transformations-CsrIJXh-.js";
4
+ import { t as vo } from "./colorMixing--dhzx0ch.js";
5
+ const So = {
7
6
  name: "Blob",
8
7
  category: "Base Layers",
9
8
  description: "Organic animated blob with 3D lighting and gradients",
@@ -140,7 +139,7 @@ const Ao = {
140
139
  x: 0.5,
141
140
  y: 0.5
142
141
  },
143
- transform: Co,
142
+ transform: xo,
144
143
  description: "The center point of the blob",
145
144
  ui: {
146
145
  type: "position",
@@ -149,22 +148,22 @@ const Ao = {
149
148
  },
150
149
  colorSpace: {
151
150
  default: "linear",
152
- transform: xo,
151
+ transform: yo,
153
152
  description: "Color space for color interpolation",
154
153
  ui: {
155
154
  type: "select",
156
- options: vo,
155
+ options: Co,
157
156
  label: "Color Space"
158
157
  }
159
158
  }
160
159
  },
161
160
  fragmentNode: (p) => {
162
- const { uniforms: i, uvContext: D } = p, { vec2: f, vec3: c, vec4: X, float: o, screenUV: Y, smoothstep: s, sin: e, length: b, viewportSize: y, pow: x, max: Z, normalize: C, dot: I, reflect: N } = fo, v = D ?? Y, l = yo(p, i.speed, i.seed), S = i.colorA.uniform, A = i.colorB.uniform, P = i.size.uniform, u = i.deformation.uniform, B = i.softness.uniform, _ = i.highlightIntensity.uniform, L = i.highlightX.uniform, R = i.highlightY.uniform, T = i.highlightZ.uniform, U = i.highlightColor.uniform, w = B.mul(o(0.3)), V = B.mul(o(2)).add(o(0.5)), m = o(0.5), z = y.x.div(y.y), k = f(v.x.mul(z), v.y), M = f(i.center.uniform.x.mul(z), i.center.uniform.y.oneMinus()), t = k.sub(M), O = b(t), j = P, n = o(4), F = e(t.x.mul(n.mul(o(0.8))).add(l.mul(o(0.8)))).mul(e(t.y.mul(n.mul(o(0.7))).add(l.mul(o(0.6))))).add(e(t.x.mul(n.mul(o(1.2))).sub(t.y.mul(n.mul(o(0.9))).add(l.mul(o(0.4)))))).mul(o(0.15)).mul(u), G = e(t.x.mul(n.mul(o(1.4))).sub(l.mul(o(0.5)))).mul(e(t.y.mul(n.mul(o(1.1))).add(l.mul(o(0.7))))).mul(o(0.12)).mul(u).mul(s(o(0.15), o(0.25), m)), W = e(t.x.mul(n.mul(o(1.8))).add(t.y.mul(n.mul(o(1.6))).add(l.mul(o(0.3))))).add(e(t.x.mul(n.mul(o(0.6))).sub(l.mul(o(0.9))))).mul(o(0.1)).mul(u).mul(s(o(0.3), o(0.4), m)), q = e(t.x.mul(n.mul(o(2.2))).add(l.mul(o(0.2)))).mul(e(t.y.mul(n.mul(o(1.9))).sub(l.mul(o(0.8))))).mul(o(0.08)).mul(u).mul(s(o(0.45), o(0.55), m)), E = e(t.x.mul(n.mul(o(2.8))).sub(t.y.mul(n.mul(o(2.4))).add(l.mul(o(0.6))))).mul(o(0.06)).mul(u).mul(s(o(0.6), o(0.7), m)), J = e(t.x.mul(n.mul(o(3.2))).add(l.mul(o(1.1)))).add(e(t.y.mul(n.mul(o(3.5))).sub(l.mul(o(0.4))))).mul(o(0.04)).mul(u).mul(s(o(0.75), o(0.85), m)), K = F.add(G).add(W).add(q).add(E).add(J), h = j.add(K), H = x(s(h.add(w), h.sub(w), O), V), Q = b(t), $ = h, a = s(o(0), $, Q), oo = o(1).sub(a.mul(o(0.1))), to = C(c(t.x.mul(a.add(o(0.2))), t.y.mul(a.add(o(0.2))), oo)), eo = C(c(L, R, T)), lo = c(o(0), o(0), o(1)), io = N(eo.negate(), to), no = o(32), so = x(Z(o(0), I(io, lo)), no), uo = a.mul(o(0.5)).add(o(0.5)), mo = so.mul(uo).mul(_).mul(H), r = t.x.mul(o(3)), d = t.y.mul(o(3)), ao = e(r.add(l.mul(o(0.4)))).mul(e(d.add(l.mul(o(0.3))))).add(e(r.mul(o(0.7)).add(d.mul(o(0.8))).add(l.mul(o(0.2))))).mul(o(0.5)).add(o(0.5)), ro = e(r.mul(o(1.3)).sub(l.mul(o(0.5)))).mul(e(d.mul(o(1.1)).add(l.mul(o(0.6))))).add(e(r.mul(o(0.5)).sub(d.mul(o(0.6)).sub(l.mul(o(0.3)))))).mul(o(0.5)).add(o(0.5)), co = ao.mul(o(0.6)).add(ro.mul(o(0.4))), ho = So(S, A, s(o(0.1), o(0.9), co), i.colorSpace.uniform).rgb, go = S.a.add(A.a).div(o(2)), po = U.rgb.mul(mo);
161
+ const { uniforms: i, uvContext: D } = p, { vec2: f, vec3: c, vec4: X, float: o, screenUV: Y, smoothstep: s, sin: e, length: b, viewportSize: y, pow: x, max: Z, normalize: C, dot: I, reflect: N } = fo, v = D ?? Y, l = bo(p, i.speed, i.seed), S = i.colorA.uniform, A = i.colorB.uniform, P = i.size.uniform, u = i.deformation.uniform, B = i.softness.uniform, L = i.highlightIntensity.uniform, R = i.highlightX.uniform, T = i.highlightY.uniform, U = i.highlightZ.uniform, V = i.highlightColor.uniform, w = B.mul(o(0.3)), O = B.mul(o(2)).add(o(0.5)), m = o(0.5), z = y.x.div(y.y), _ = f(v.x.mul(z), v.y), k = f(i.center.uniform.x.mul(z), i.center.uniform.y.oneMinus()), t = _.sub(k), M = b(t), j = P, n = o(4), F = e(t.x.mul(n.mul(o(0.8))).add(l.mul(o(0.8)))).mul(e(t.y.mul(n.mul(o(0.7))).add(l.mul(o(0.6))))).add(e(t.x.mul(n.mul(o(1.2))).sub(t.y.mul(n.mul(o(0.9))).add(l.mul(o(0.4)))))).mul(o(0.15)).mul(u), G = e(t.x.mul(n.mul(o(1.4))).sub(l.mul(o(0.5)))).mul(e(t.y.mul(n.mul(o(1.1))).add(l.mul(o(0.7))))).mul(o(0.12)).mul(u).mul(s(o(0.15), o(0.25), m)), W = e(t.x.mul(n.mul(o(1.8))).add(t.y.mul(n.mul(o(1.6))).add(l.mul(o(0.3))))).add(e(t.x.mul(n.mul(o(0.6))).sub(l.mul(o(0.9))))).mul(o(0.1)).mul(u).mul(s(o(0.3), o(0.4), m)), q = e(t.x.mul(n.mul(o(2.2))).add(l.mul(o(0.2)))).mul(e(t.y.mul(n.mul(o(1.9))).sub(l.mul(o(0.8))))).mul(o(0.08)).mul(u).mul(s(o(0.45), o(0.55), m)), E = e(t.x.mul(n.mul(o(2.8))).sub(t.y.mul(n.mul(o(2.4))).add(l.mul(o(0.6))))).mul(o(0.06)).mul(u).mul(s(o(0.6), o(0.7), m)), J = e(t.x.mul(n.mul(o(3.2))).add(l.mul(o(1.1)))).add(e(t.y.mul(n.mul(o(3.5))).sub(l.mul(o(0.4))))).mul(o(0.04)).mul(u).mul(s(o(0.75), o(0.85), m)), K = F.add(G).add(W).add(q).add(E).add(J), h = j.add(K), H = x(s(h.add(w), h.sub(w), M), O), Q = b(t), $ = h, a = s(o(0), $, Q), oo = o(1).sub(a.mul(o(0.1))), to = C(c(t.x.mul(a.add(o(0.2))), t.y.mul(a.add(o(0.2))), oo)), eo = C(c(R, T, U)), lo = c(o(0), o(0), o(1)), io = N(eo.negate(), to), no = o(32), so = x(Z(o(0), I(io, lo)), no), uo = a.mul(o(0.5)).add(o(0.5)), mo = so.mul(uo).mul(L).mul(H), r = t.x.mul(o(3)), d = t.y.mul(o(3)), ao = e(r.add(l.mul(o(0.4)))).mul(e(d.add(l.mul(o(0.3))))).add(e(r.mul(o(0.7)).add(d.mul(o(0.8))).add(l.mul(o(0.2))))).mul(o(0.5)).add(o(0.5)), ro = e(r.mul(o(1.3)).sub(l.mul(o(0.5)))).mul(e(d.mul(o(1.1)).add(l.mul(o(0.6))))).add(e(r.mul(o(0.5)).sub(d.mul(o(0.6)).sub(l.mul(o(0.3)))))).mul(o(0.5)).add(o(0.5)), co = ao.mul(o(0.6)).add(ro.mul(o(0.4))), ho = vo(S, A, s(o(0.1), o(0.9), co), i.colorSpace.uniform).rgb, go = S.a.add(A.a).div(o(2)), po = V.rgb.mul(mo);
163
162
  return X(ho.add(po), go.mul(H));
164
163
  }
165
164
  };
166
- var Do = Ao;
165
+ var Ho = So;
167
166
  export {
168
- Ao as n,
169
- Do as t
167
+ So as n,
168
+ Ho as t
170
169
  };
@@ -1,5 +1,4 @@
1
- import { k as z, m as S } from "./three.tsl-BqgDcRt9.js";
2
- S();
1
+ import { O as S } from "./three.tsl-Btj1hLsf.js";
3
2
  const B = {
4
3
  name: "Blur",
5
4
  category: "Blurs",
@@ -17,10 +16,10 @@ const B = {
17
16
  label: "Intensity"
18
17
  }
19
18
  } },
20
- fragmentNode: ({ uniforms: _, childNode: f, onCleanup: g }) => {
21
- const { vec2: r, vec4: n, float: s, screenUV: T, convertToTexture: h, viewportSize: v, Fn: x } = z;
19
+ fragmentNode: ({ uniforms: z, childNode: f, onCleanup: g }) => {
20
+ const { vec2: r, vec4: n, float: s, screenUV: T, convertToTexture: v, viewportSize: x, Fn: h } = S;
22
21
  if (!f) return n(0, 0, 0, 0);
23
- const o = h(f);
22
+ const o = v(f);
24
23
  g(() => {
25
24
  o?.renderTarget?.dispose && o.renderTarget.dispose();
26
25
  });
@@ -38,8 +37,8 @@ const B = {
38
37
  0.278,
39
38
  0.135,
40
39
  0.056
41
- ], b = 6.214, w = _.intensity.uniform.mul(0.06), i = h(x(() => {
42
- const a = T, l = w, c = r(1).div(v), t = n(0).toVar();
40
+ ], b = 6.214, w = z.intensity.uniform.mul(0.06), i = v(h(() => {
41
+ const a = T, l = w, c = r(1).div(x), t = n(0).toVar();
43
42
  for (let e = -6; e <= 6; e++) {
44
43
  const u = s(y[e + 6] / b), d = r(s(e), s(0)).mul(l).mul(c), m = a.add(d), p = o.sample(m).mul(u);
45
44
  t.assign(t.add(p));
@@ -48,8 +47,8 @@ const B = {
48
47
  })());
49
48
  return g(() => {
50
49
  i?.renderTarget?.dispose && i.renderTarget.dispose();
51
- }), x(() => {
52
- const a = T, l = w, c = r(1).div(v), t = n(0).toVar();
50
+ }), h(() => {
51
+ const a = T, l = w, c = r(1).div(x), t = n(0).toVar();
53
52
  for (let e = -6; e <= 6; e++) {
54
53
  const u = s(y[e + 6] / b), d = r(s(0), s(e)).mul(l).mul(c), m = a.add(d), p = i.sample(m).mul(u);
55
54
  t.assign(t.add(p));
@@ -1,7 +1,6 @@
1
- import { d as i, h as A, k as V, m as R } from "./three.tsl-BqgDcRt9.js";
2
- import { t as S } from "./edges-B-tVdqcI.js";
3
- import { a as w, o as E } from "./transformations-DBjTkQ5b.js";
4
- R();
1
+ import { O as V, d as i, m as R } from "./three.tsl-Btj1hLsf.js";
2
+ import { t as S } from "./edges-CDzKsauJ.js";
3
+ import { a as w, o as E } from "./transformations-CsrIJXh-.js";
5
4
  const P = {
6
5
  name: "Bulge",
7
6
  category: "Distortions",
@@ -93,12 +92,12 @@ const P = {
93
92
  u(() => {
94
93
  s?.renderTarget?.dispose && s.renderTarget.dispose();
95
94
  });
96
- const a = d.x.div(d.y), f = n(t.x.mul(a), t.y), r = n(e.center.uniform.x.mul(a), e.center.uniform.y.oneMinus()), m = f.sub(r), p = x(m), l = e.radius.uniform.mul(0.5), v = e.falloff.uniform, T = y(l.mul(i(1).sub(v).sub(i(1e-3)).max(i(0))), l, p).oneMinus(), g = p.div(l), F = g.mul(g), q = A(i(0), i(1).sub(F)), D = T.mul(q), h = e.strength.uniform.negate().mul(D), C = i(1).add(h), _ = m.mul(C), M = r.add(_), U = n(M.x.div(a), M.y);
95
+ const a = d.x.div(d.y), f = n(t.x.mul(a), t.y), r = n(e.center.uniform.x.mul(a), e.center.uniform.y.oneMinus()), m = f.sub(r), p = x(m), l = e.radius.uniform.mul(0.5), v = e.falloff.uniform, T = y(l.mul(i(1).sub(v).sub(i(1e-3)).max(i(0))), l, p).oneMinus(), g = p.div(l), F = g.mul(g), q = R(i(0), i(1).sub(F)), D = T.mul(q), h = e.strength.uniform.negate().mul(D), C = i(1).add(h), A = m.mul(C), M = r.add(A), U = n(M.x.div(a), M.y);
97
96
  return S(U, s.sample(U), s, e.edges.uniform);
98
97
  }
99
98
  };
100
- var $ = P;
99
+ var H = P;
101
100
  export {
102
101
  P as n,
103
- $ as t
102
+ H as t
104
103
  };
@@ -1,6 +1,5 @@
1
- import { k as E, m as N } from "./three.tsl-BqgDcRt9.js";
2
- N();
3
- const W = {
1
+ import { O as E } from "./three.tsl-Btj1hLsf.js";
2
+ const N = {
4
3
  name: "CRTScreen",
5
4
  category: "Stylize",
6
5
  description: "Retro CRT monitor simulation with scanlines",
@@ -75,18 +74,18 @@ const W = {
75
74
  }
76
75
  },
77
76
  fragmentNode: ({ uniforms: n, childNode: a, onCleanup: d }) => {
78
- const { vec2: o, vec3: c, vec4: u, float: e, screenUV: t, sin: i, fract: p, smoothstep: f, length: h, convertToTexture: g } = E;
77
+ const { vec2: i, vec3: c, vec4: u, float: e, screenUV: t, sin: o, fract: p, smoothstep: f, length: g, convertToTexture: h } = E;
79
78
  if (!a) return u(0, 0, 0, 0);
80
- const s = g(a);
79
+ const s = h(a);
81
80
  d(() => {
82
81
  s?.renderTarget?.dispose && s.renderTarget.dispose();
83
82
  });
84
- const b = n.pixelSize.uniform, S = n.colorShift.uniform, x = n.scanlineIntensity.uniform, y = n.scanlineFrequency.uniform, C = n.brightness.uniform, T = n.contrast.uniform, m = S.mul(e(2e-3)), v = t.add(o(m, e(0))), z = t, q = t.sub(o(m, e(0))), R = s.sample(v).r, V = s.sample(z).g, _ = s.sample(q).b, k = c(R, V, _).sub(e(0.5)).mul(T).add(e(0.5)).mul(C), F = i(t.y.mul(y).mul(e(3.14159 * 2))), I = e(1).sub(x.mul(F.mul(e(0.5)).add(e(0.5)))), r = k.mul(I), U = b.mul(e(0.5)), l = p(t.mul(U)), M = i(l.x.mul(e(6.28318))).mul(e(0.1)).add(e(0.95)), w = i(l.x.mul(e(6.28318)).add(e(2.09))).mul(e(0.1)).add(e(0.95)), D = i(l.x.mul(e(6.28318)).add(e(4.18))).mul(e(0.1)).add(e(0.95)), P = c(r.r.mul(M), r.g.mul(w), r.b.mul(D)), j = h(t.sub(o(0.5, 0.5))), B = f(e(0.8), e(0.3), j);
83
+ const b = n.pixelSize.uniform, S = n.colorShift.uniform, x = n.scanlineIntensity.uniform, y = n.scanlineFrequency.uniform, C = n.brightness.uniform, T = n.contrast.uniform, m = S.mul(e(2e-3)), v = t.add(i(m, e(0))), z = t, q = t.sub(i(m, e(0))), R = s.sample(v).r, V = s.sample(z).g, F = s.sample(q).b, I = c(R, V, F).sub(e(0.5)).mul(T).add(e(0.5)).mul(C), U = o(t.y.mul(y).mul(e(3.14159 * 2))), k = e(1).sub(x.mul(U.mul(e(0.5)).add(e(0.5)))), r = I.mul(k), M = b.mul(e(0.5)), l = p(t.mul(M)), _ = o(l.x.mul(e(6.28318))).mul(e(0.1)).add(e(0.95)), w = o(l.x.mul(e(6.28318)).add(e(2.09))).mul(e(0.1)).add(e(0.95)), D = o(l.x.mul(e(6.28318)).add(e(4.18))).mul(e(0.1)).add(e(0.95)), P = c(r.r.mul(_), r.g.mul(w), r.b.mul(D)), j = g(t.sub(i(0.5, 0.5))), B = f(e(0.8), e(0.3), j);
85
84
  return u(P.mul(B), e(1));
86
85
  }
87
86
  };
88
- var G = W;
87
+ var W = N;
89
88
  export {
90
- W as n,
91
- G as t
89
+ N as n,
90
+ W as t
92
91
  };
@@ -1,5 +1,4 @@
1
- import { k as C, m as k } from "./three.tsl-BqgDcRt9.js";
2
- k();
1
+ import { O as C } from "./three.tsl-Btj1hLsf.js";
3
2
  const A = {
4
3
  name: "ChannelBlur",
5
4
  category: "Blurs",
@@ -62,10 +61,10 @@ const A = {
62
61
  0.278,
63
62
  0.135,
64
63
  0.056
65
- ], w = 6.214, R = m.redIntensity.uniform.mul(0.1), _ = m.greenIntensity.uniform.mul(0.1), z = m.blueIntensity.uniform.mul(0.1), u = v(B(() => {
64
+ ], w = 6.214, R = m.redIntensity.uniform.mul(0.1), z = m.greenIntensity.uniform.mul(0.1), _ = m.blueIntensity.uniform.mul(0.1), u = v(B(() => {
66
65
  const n = S, f = t(1).div(O), r = e(0).toVar(), a = e(0).toVar(), l = e(0).toVar();
67
66
  for (let d = -6; d <= 6; d++) {
68
- const s = e(V[d + 6] / w), o = e(d).mul(f.x), c = t(o.mul(R), e(0)), g = t(o.mul(_), e(0)), y = t(o.mul(z), e(0)), b = i.sample(n.add(c)).r.mul(s), T = i.sample(n.add(g)).g.mul(s), h = i.sample(n.add(y)).b.mul(s);
67
+ const s = e(V[d + 6] / w), o = e(d).mul(f.x), c = t(o.mul(R), e(0)), g = t(o.mul(z), e(0)), y = t(o.mul(_), e(0)), b = i.sample(n.add(c)).r.mul(s), T = i.sample(n.add(g)).g.mul(s), h = i.sample(n.add(y)).b.mul(s);
69
68
  r.assign(r.add(b)), a.assign(a.add(T)), l.assign(l.add(h));
70
69
  }
71
70
  return p(r, a, l, e(1));
@@ -75,7 +74,7 @@ const A = {
75
74
  }), B(() => {
76
75
  const n = S, f = t(1).div(O), r = e(0).toVar(), a = e(0).toVar(), l = e(0).toVar();
77
76
  for (let s = -6; s <= 6; s++) {
78
- const o = e(V[s + 6] / w), c = e(s).mul(f.y), g = t(e(0), c.mul(R)), y = t(e(0), c.mul(_)), b = t(e(0), c.mul(z)), T = u.sample(n.add(g)).r.mul(o), h = u.sample(n.add(y)).g.mul(o), q = u.sample(n.add(b)).b.mul(o);
77
+ const o = e(V[s + 6] / w), c = e(s).mul(f.y), g = t(e(0), c.mul(R)), y = t(e(0), c.mul(z)), b = t(e(0), c.mul(_)), T = u.sample(n.add(g)).r.mul(o), h = u.sample(n.add(y)).g.mul(o), q = u.sample(n.add(b)).b.mul(o);
79
78
  r.assign(r.add(T)), a.assign(a.add(h)), l.assign(l.add(q));
80
79
  }
81
80
  const d = i.sample(n).a;
@@ -1,8 +1,7 @@
1
- import { k as B, m as U } from "./three.tsl-BqgDcRt9.js";
2
- import { i as _, r as f, t as w } from "./transformations-DBjTkQ5b.js";
3
- import { t as A } from "./colorMixing-C-FChLp0.js";
4
- U();
5
- const F = {
1
+ import { O as B } from "./three.tsl-Btj1hLsf.js";
2
+ import { i as U, r as f, t as w } from "./transformations-CsrIJXh-.js";
3
+ import { t as A } from "./colorMixing--dhzx0ch.js";
4
+ const _ = {
6
5
  name: "Checkerboard",
7
6
  category: "Base Layers",
8
7
  description: "Classic checkerboard pattern with two alternating colors",
@@ -50,7 +49,7 @@ const F = {
50
49
  },
51
50
  colorSpace: {
52
51
  default: "linear",
53
- transform: _,
52
+ transform: U,
54
53
  description: "Color space for color interpolation",
55
54
  ui: {
56
55
  type: "select",
@@ -60,17 +59,17 @@ const F = {
60
59
  }
61
60
  },
62
61
  fragmentNode: ({ uniforms: o, uvContext: m }) => {
63
- const { vec2: u, float: e, floor: h, mod: b, fract: g, smoothstep: y, min: r, screenUV: C, viewportSize: s } = B, c = m ?? C, x = s.x.div(s.y), S = u(c.x.mul(x), c.y.oneMinus()), k = o.cells.uniform, l = o.softness.uniform, a = S.mul(k), n = h(a), i = b(n.x.add(n.y), 2);
62
+ const { vec2: u, float: e, floor: b, mod: h, fract: g, smoothstep: y, min: r, screenUV: C, viewportSize: s } = B, c = m ?? C, x = s.x.div(s.y), S = u(c.x.mul(x), c.y.oneMinus()), v = o.cells.uniform, l = o.softness.uniform, a = S.mul(v), n = b(a), i = h(n.x.add(n.y), 2);
64
63
  let d = i;
65
64
  if (l) {
66
- const t = g(a), v = r(r(t.x, e(1).sub(t.x)), r(t.y, e(1).sub(t.y))), V = l.mul(0.5), p = y(e(0), V, v);
65
+ const t = g(a), k = r(r(t.x, e(1).sub(t.x)), r(t.y, e(1).sub(t.y))), V = l.mul(0.5), p = y(e(0), V, k);
67
66
  d = i.mul(p).add(e(0.5).mul(e(1).sub(p)));
68
67
  }
69
68
  return A(o.colorA.uniform, o.colorB.uniform, d, o.colorSpace.uniform);
70
69
  }
71
70
  };
72
- var D = F;
71
+ var q = _;
73
72
  export {
74
- F as n,
75
- D as t
73
+ _ as n,
74
+ q as t
76
75
  };
@@ -1,8 +1,7 @@
1
- import { k as Vt, m as Wt } from "./three.tsl-BqgDcRt9.js";
2
- import { r as X } from "./transformations-DBjTkQ5b.js";
3
- import { DataTexture as at, FloatType as lt, LinearFilter as _, RGFormat as nt } from "three";
4
- Wt();
5
- const jt = {
1
+ import { O as _t } from "./three.tsl-Btj1hLsf.js";
2
+ import { r as X } from "./transformations-CsrIJXh-.js";
3
+ import { DataTexture as at, FloatType as lt, LinearFilter as L, RGFormat as nt } from "three";
4
+ const Wt = {
6
5
  name: "ChromaFlow",
7
6
  category: "Interactive",
8
7
  description: "Interactive liquid flow effect that follows your cursor",
@@ -87,10 +86,10 @@ const jt = {
87
86
  }
88
87
  },
89
88
  fragmentNode: ({ uniforms: u, onBeforeRender: st, onCleanup: rt }) => {
90
- const { vec2: l, vec4: it, float: t, uniform: Y, screenUV: n, texture: W, smoothstep: v, mix: dt } = Vt, o = 128, f = new Float32Array(o * o * 2), r = new Float32Array(o * o * 2), w = new at(f, o, o, nt, lt);
91
- w.magFilter = _, w.minFilter = _, w.needsUpdate = !0;
89
+ const { vec2: l, vec4: it, float: t, uniform: Y, screenUV: n, texture: W, smoothstep: v, mix: dt } = _t, o = 128, f = new Float32Array(o * o * 2), r = new Float32Array(o * o * 2), w = new at(f, o, o, nt, lt);
90
+ w.magFilter = L, w.minFilter = L, w.needsUpdate = !0;
92
91
  const C = new at(r, o, o, nt, lt);
93
- C.magFilter = _, C.minFilter = _, C.needsUpdate = !0;
92
+ C.magFilter = L, C.minFilter = L, C.needsUpdate = !0;
94
93
  const F = W(w), b = W(C), ct = Y(0.5), mt = Y(0.5), q = Y(0), D = Y(0);
95
94
  let j = 0.5, B = 0.5, G = Date.now();
96
95
  st(({ pointer: p }) => {
@@ -98,15 +97,15 @@ const jt = {
98
97
  G = tt;
99
98
  const ot = s > 0 ? (p.x - j) / s : 0, et = s > 0 ? (p.y - B) / s : 0;
100
99
  q.value = q.value * 0.85 + ot * 0.15, D.value = D.value * 0.85 + et * 0.15, ct.value = p.x, mt.value = p.y;
101
- const V = u.intensity.uniform.value, Yt = u.radius.uniform.value * 0.05, zt = u.momentum.uniform.value, x = new Float32Array(f), i = new Float32Array(r), It = 1 - s / Math.max(0.1, 1);
100
+ const _ = u.intensity.uniform.value, Yt = u.radius.uniform.value * 0.05, zt = u.momentum.uniform.value, x = new Float32Array(f), i = new Float32Array(r), It = 1 - s / Math.max(0.1, 1);
102
101
  for (let a = 0; a < o * o * 2; a++) x[a] = f[a] * It;
103
102
  for (let a = 0; a < o; a++) for (let d = 0; d < o; d++) {
104
103
  const e = (a * o + d) * 2, S = 1 - s / Math.max(0.4, 1);
105
104
  if (i[e] = r[e] * S, i[e + 1] = r[e + 1] * S, Math.abs(f[e]) > 1e-3 || Math.abs(f[e + 1]) > 1e-3) {
106
105
  const T = zt * 50 * s, A = d - f[e] * T, R = a - f[e + 1] * T, c = Math.floor(A), m = Math.floor(R), h = c + 1, y = m + 1;
107
106
  if (c >= 0 && m >= 0 && h < o && y < o) {
108
- const M = A - c, U = R - m, Tt = (m * o + c) * 2, Ut = (m * o + h) * 2, _t = (y * o + c) * 2, Lt = (y * o + h) * 2;
109
- i[e] = (r[Tt] * (1 - M) * (1 - U) + r[Ut] * M * (1 - U) + r[_t] * (1 - M) * U + r[Lt] * M * U) * S;
107
+ const M = A - c, U = R - m, Tt = (m * o + c) * 2, Ut = (m * o + h) * 2, Lt = (y * o + c) * 2, Vt = (y * o + h) * 2;
108
+ i[e] = (r[Tt] * (1 - M) * (1 - U) + r[Ut] * M * (1 - U) + r[Lt] * (1 - M) * U + r[Vt] * M * U) * S;
110
109
  }
111
110
  }
112
111
  }
@@ -114,9 +113,9 @@ const jt = {
114
113
  const e = (a * o + d) * 2, S = (d + 0.5) / o, T = (a + 0.5) / o, A = S - p.x, R = T - p.y, c = Math.sqrt(A * A + R * R), m = Math.sqrt(q.value * q.value + D.value * D.value), h = Yt * Math.min(m * m * 20, 1);
115
114
  if (c < h * 2 && Math.abs(ot) + Math.abs(et) > 0.01) {
116
115
  const y = Math.exp(-c * c / (h * h));
117
- x[e] += q.value * y * (V * 100) * s * 0.01, x[e + 1] += D.value * y * (V * 100) * s * 0.01;
116
+ x[e] += q.value * y * (_ * 100) * s * 0.01, x[e + 1] += D.value * y * (_ * 100) * s * 0.01;
118
117
  const M = Math.min(m * 10, 1);
119
- i[e] += y * (V * 100) * s * 0.01 * M, i[e + 1] = 0;
118
+ i[e] += y * (_ * 100) * s * 0.01 * M, i[e + 1] = 0;
120
119
  }
121
120
  x[e] = Math.max(-1, Math.min(1, x[e])), x[e + 1] = Math.max(-1, Math.min(1, x[e + 1])), i[e] = Math.max(0, Math.min(1, i[e])), i[e + 1] = 0;
122
121
  }
@@ -124,12 +123,12 @@ const jt = {
124
123
  }), rt(() => {
125
124
  w.dispose(), C.dispose();
126
125
  });
127
- const ut = b.sample(n).x, z = l(t(1 / 128), t(1 / 128)), ft = b.sample(n.add(l(z.x, t(0)))).x, pt = b.sample(n.add(l(t(0), z.y))).x, xt = b.sample(n.add(l(z.x.negate(), t(0)))).x, ht = b.sample(n.add(l(t(0), z.y.negate()))).x, yt = ut.add(ft).add(pt).add(xt).add(ht).mul(t(0.2)), k = v(t(0), t(0.1), yt), I = l(t(1 / 128), t(1 / 128)), vt = F.sample(n).xy, wt = F.sample(n.add(l(I.x, t(0)))).xy, Ct = F.sample(n.add(l(t(0), I.y))).xy, gt = F.sample(n.add(l(I.x.negate(), t(0)))).xy, Mt = F.sample(n.add(l(t(0), I.y.negate()))).xy, g = vt.add(wt).add(Ct).add(gt).add(Mt).mul(t(0.2)), Ft = u.baseColor.uniform, bt = u.upColor.uniform, qt = u.downColor.uniform, Dt = u.leftColor.uniform, St = u.rightColor.uniform, L = g.x.mul(g.x).add(g.y.mul(g.y)).sqrt(), At = v(t(0.01), t(0.1), L), E = g.x.div(L.add(t(1e-3))), H = g.y.div(L.add(t(1e-3))), N = v(t(0), t(0.7), E.max(t(0))), P = v(t(0), t(0.7), E.negate().max(t(0))), Z = v(t(0), t(0.7), H.max(t(0))), J = v(t(0), t(0.7), H.negate().max(t(0))), Rt = Dt.mul(P).add(St.mul(N)), Xt = qt.mul(J).add(bt.mul(Z)), K = P.add(N), O = Z.add(J), Q = K.add(O).add(t(1e-3)), $ = dt(Ft, Rt.mul(K.div(Q)).add(Xt.mul(O.div(Q))), At);
128
- return it($.rgb.mul(k), $.a.mul(k));
126
+ const ut = b.sample(n).x, z = l(t(1 / 128), t(1 / 128)), ft = b.sample(n.add(l(z.x, t(0)))).x, pt = b.sample(n.add(l(t(0), z.y))).x, xt = b.sample(n.add(l(z.x.negate(), t(0)))).x, ht = b.sample(n.add(l(t(0), z.y.negate()))).x, yt = ut.add(ft).add(pt).add(xt).add(ht).mul(t(0.2)), E = v(t(0), t(0.1), yt), I = l(t(1 / 128), t(1 / 128)), vt = F.sample(n).xy, wt = F.sample(n.add(l(I.x, t(0)))).xy, Ct = F.sample(n.add(l(t(0), I.y))).xy, gt = F.sample(n.add(l(I.x.negate(), t(0)))).xy, Mt = F.sample(n.add(l(t(0), I.y.negate()))).xy, g = vt.add(wt).add(Ct).add(gt).add(Mt).mul(t(0.2)), Ft = u.baseColor.uniform, bt = u.upColor.uniform, qt = u.downColor.uniform, Dt = u.leftColor.uniform, St = u.rightColor.uniform, V = g.x.mul(g.x).add(g.y.mul(g.y)).sqrt(), At = v(t(0.01), t(0.1), V), H = g.x.div(V.add(t(1e-3))), N = g.y.div(V.add(t(1e-3))), O = v(t(0), t(0.7), H.max(t(0))), P = v(t(0), t(0.7), H.negate().max(t(0))), Z = v(t(0), t(0.7), N.max(t(0))), k = v(t(0), t(0.7), N.negate().max(t(0))), Rt = Dt.mul(P).add(St.mul(O)), Xt = qt.mul(k).add(bt.mul(Z)), J = P.add(O), K = Z.add(k), Q = J.add(K).add(t(1e-3)), $ = dt(Ft, Rt.mul(J.div(Q)).add(Xt.mul(K.div(Q))), At);
127
+ return it($.rgb.mul(E), $.a.mul(E));
129
128
  }
130
129
  };
131
- var Et = jt;
130
+ var Et = Wt;
132
131
  export {
133
- jt as n,
132
+ Wt as n,
134
133
  Et as t
135
134
  };
@@ -1,7 +1,6 @@
1
- import { k as T, m as C } from "./three.tsl-BqgDcRt9.js";
2
- import { n as v } from "./transformations-DBjTkQ5b.js";
3
- C();
4
- const R = {
1
+ import { O as T } from "./three.tsl-Btj1hLsf.js";
2
+ import { n as C } from "./transformations-CsrIJXh-.js";
3
+ const v = {
5
4
  name: "ChromaticAberration",
6
5
  category: "Stylize",
7
6
  description: "Separate RGB channels for a prismatic distortion effect",
@@ -21,7 +20,7 @@ const R = {
21
20
  },
22
21
  angle: {
23
22
  default: 0,
24
- transform: v,
23
+ transform: C,
25
24
  description: "Direction of the chromatic aberration in degrees",
26
25
  ui: {
27
26
  type: "range",
@@ -76,8 +75,8 @@ const R = {
76
75
  return i(b, O, x, y);
77
76
  }
78
77
  };
79
- var S = R;
78
+ var S = v;
80
79
  export {
81
- R as n,
80
+ v as n,
82
81
  S as t
83
82
  };
@@ -1,7 +1,6 @@
1
- import { k as g, m as v } from "./three.tsl-BqgDcRt9.js";
2
- import { o as y, r as x } from "./transformations-DBjTkQ5b.js";
3
- v();
4
- const b = {
1
+ import { O as g } from "./three.tsl-Btj1hLsf.js";
2
+ import { o as v, r as y } from "./transformations-CsrIJXh-.js";
3
+ const x = {
5
4
  name: "Circle",
6
5
  category: "Base Layers",
7
6
  description: "Generate a circle with adjustable size and softness",
@@ -9,7 +8,7 @@ const b = {
9
8
  props: {
10
9
  color: {
11
10
  default: "#ffffff",
12
- transform: x,
11
+ transform: y,
13
12
  description: "The color of the circle",
14
13
  ui: {
15
14
  type: "color",
@@ -43,7 +42,7 @@ const b = {
43
42
  x: 0.5,
44
43
  y: 0.5
45
44
  },
46
- transform: y,
45
+ transform: v,
47
46
  description: "The center point of the circle",
48
47
  ui: {
49
48
  type: "position",
@@ -56,8 +55,8 @@ const b = {
56
55
  return c(e.color.uniform.rgb, e.color.uniform.a.mul(h));
57
56
  }
58
57
  };
59
- var k = b;
58
+ var k = x;
60
59
  export {
61
- b as n,
60
+ x as n,
62
61
  k as t
63
62
  };