shaders 2.2.23 → 2.2.25

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 (213) hide show
  1. package/dist/core/AngularBlur-Dl2gwk68.js +64 -0
  2. package/dist/core/Ascii-Dha_QpT3.js +286 -0
  3. package/dist/core/Beam-CTN9Ni43.js +139 -0
  4. package/dist/core/Blob-CxFDZovO.js +218 -0
  5. package/dist/core/Blur-Y2FsmFk_.js +77 -0
  6. package/dist/core/Bulge-Cb-t0xqI.js +132 -0
  7. package/dist/core/CRTScreen-CtERsenz.js +112 -0
  8. package/dist/core/ChannelBlur-CvM6GJgZ.js +118 -0
  9. package/dist/core/Checkerboard-CgB-egNY.js +83 -0
  10. package/dist/core/ChromaFlow-vRCwhQpN.js +222 -0
  11. package/dist/core/ChromaticAberration-FTquTQIL.js +88 -0
  12. package/dist/core/Circle-Daziv5d7.js +67 -0
  13. package/dist/core/CursorTrail-Bsz9e6Fn.js +145 -0
  14. package/dist/core/DiffuseBlur-Cj2PtRNd.js +83 -0
  15. package/dist/core/Dither-D2Nf4p3w.js +66 -0
  16. package/dist/core/DotGrid-CzOwquo4.js +75 -0
  17. package/dist/core/Duotone-XuTN9tI7.js +65 -0
  18. package/dist/core/FilmGrain-D3-nbi12.js +28 -0
  19. package/dist/core/FloatingParticles-D9Nnu1qg.js +217 -0
  20. package/dist/core/GlassTiles-CnjCvajI.js +69 -0
  21. package/dist/core/Glow-BluFc9be.js +75 -0
  22. package/dist/core/Godrays-ChLh_vGl.js +144 -0
  23. package/dist/core/Grayscale-DRny75A9.js +20 -0
  24. package/dist/core/Grid-DgyDa4H1.js +58 -0
  25. package/dist/core/GridDistortion-BAspCYvp.js +188 -0
  26. package/dist/core/Group-Dul7PUBl.js +14 -0
  27. package/dist/core/Halftone-Ifv5F_FT.js +65 -0
  28. package/dist/core/HueShift-De8ukMWs.js +31 -0
  29. package/dist/core/ImageTexture-DvYcQgJB.js +143 -0
  30. package/dist/core/Invert-Fz0NtIJc.js +21 -0
  31. package/dist/core/LinearBlur-LmhnQoA4.js +62 -0
  32. package/dist/core/LinearGradient-xbloQjzt.js +133 -0
  33. package/dist/core/Liquify-DMe1V5-O.js +175 -0
  34. package/dist/core/Pixelate-Cv8537Pj.js +37 -0
  35. package/dist/core/PolarCoordinates-DDvDhBE-.js +112 -0
  36. package/dist/core/Posterize-3m3xkWOz.js +29 -0
  37. package/dist/core/ProgressiveBlur-EGkevObV.js +121 -0
  38. package/dist/core/RadialGradient-B7ZZB_VJ.js +71 -0
  39. package/dist/core/RectangularCoordinates-muWR8mZS.js +101 -0
  40. package/dist/core/Ripples-8XaZaXQF.js +117 -0
  41. package/dist/core/Saturation-CYFI1jzN.js +30 -0
  42. package/dist/core/SimplexNoise-DJUe0wz_.js +99 -0
  43. package/dist/core/SineWave-Dl3nFO1W.js +120 -0
  44. package/dist/core/SolidColor-CWGq_Bjq.js +21 -0
  45. package/dist/core/Spherize-C-jZEUsN.js +128 -0
  46. package/dist/core/Spiral-BSB_R39p.js +132 -0
  47. package/dist/core/Strands-0stO5BMy.js +161 -0
  48. package/dist/core/Stretch-B645paha.js +133 -0
  49. package/dist/core/Swirl-CVnbawit.js +173 -0
  50. package/dist/core/TiltShift-0CxNRI6L.js +134 -0
  51. package/dist/core/Tritone-Daa-I5UD.js +76 -0
  52. package/dist/core/Twirl-2CJVZEtk.js +96 -0
  53. package/dist/core/Vibrance-DRtecEvb.js +30 -0
  54. package/dist/core/WaveDistortion-BscXN2rs.js +173 -0
  55. package/dist/core/ZoomBlur-CAqK0Kju.js +62 -0
  56. package/dist/core/colorMixing-BXiTAqJU.js +69 -0
  57. package/dist/core/edges-Bn_OIa_h.js +26 -0
  58. package/dist/core/index.js +2257 -1604
  59. package/dist/core/shaderRegistry.d.ts.map +1 -1
  60. package/dist/core/shaders/AngularBlur/index.js +3 -7
  61. package/dist/core/shaders/Ascii/index.js +2 -6
  62. package/dist/core/shaders/Beam/index.d.ts +71 -0
  63. package/dist/core/shaders/Beam/index.d.ts.map +1 -0
  64. package/dist/core/shaders/Beam/index.js +4 -0
  65. package/dist/core/shaders/Blob/index.js +5 -9
  66. package/dist/core/shaders/Blur/index.js +2 -6
  67. package/dist/core/shaders/Bulge/index.js +4 -8
  68. package/dist/core/shaders/CRTScreen/index.js +2 -6
  69. package/dist/core/shaders/ChannelBlur/index.js +2 -6
  70. package/dist/core/shaders/Checkerboard/index.js +4 -8
  71. package/dist/core/shaders/ChromaFlow/index.js +3 -7
  72. package/dist/core/shaders/ChromaticAberration/index.js +3 -7
  73. package/dist/core/shaders/Circle/index.js +3 -7
  74. package/dist/core/shaders/CursorTrail/index.js +4 -8
  75. package/dist/core/shaders/DiffuseBlur/index.js +4 -8
  76. package/dist/core/shaders/Dither/index.js +3 -7
  77. package/dist/core/shaders/DotGrid/index.js +3 -7
  78. package/dist/core/shaders/Duotone/index.js +4 -8
  79. package/dist/core/shaders/FilmGrain/index.js +2 -6
  80. package/dist/core/shaders/FloatingParticles/index.js +3 -7
  81. package/dist/core/shaders/GlassTiles/index.js +2 -6
  82. package/dist/core/shaders/Glow/index.js +2 -6
  83. package/dist/core/shaders/Godrays/index.js +3 -7
  84. package/dist/core/shaders/Grayscale/index.js +2 -8
  85. package/dist/core/shaders/Grid/index.js +3 -7
  86. package/dist/core/shaders/GridDistortion/index.js +4 -8
  87. package/dist/core/shaders/Group/index.js +2 -6
  88. package/dist/core/shaders/Halftone/index.js +3 -7
  89. package/dist/core/shaders/HueShift/index.js +2 -8
  90. package/dist/core/shaders/ImageTexture/index.js +2 -6
  91. package/dist/core/shaders/Invert/index.js +2 -6
  92. package/dist/core/shaders/LinearBlur/index.js +3 -7
  93. package/dist/core/shaders/LinearGradient/index.js +4 -8
  94. package/dist/core/shaders/Liquify/index.js +4 -8
  95. package/dist/core/shaders/Pixelate/index.js +2 -6
  96. package/dist/core/shaders/PolarCoordinates/index.js +4 -8
  97. package/dist/core/shaders/Posterize/index.js +2 -7
  98. package/dist/core/shaders/ProgressiveBlur/index.js +3 -7
  99. package/dist/core/shaders/RadialGradient/index.js +4 -8
  100. package/dist/core/shaders/RectangularCoordinates/index.js +4 -8
  101. package/dist/core/shaders/Ripples/index.js +5 -9
  102. package/dist/core/shaders/Saturation/index.js +2 -8
  103. package/dist/core/shaders/SimplexNoise/index.js +5 -9
  104. package/dist/core/shaders/SineWave/index.js +3 -7
  105. package/dist/core/shaders/SolidColor/index.js +3 -7
  106. package/dist/core/shaders/Spherize/index.js +3 -7
  107. package/dist/core/shaders/Spiral/index.js +4 -8
  108. package/dist/core/shaders/Strands/index.js +4 -8
  109. package/dist/core/shaders/Stretch/index.js +4 -8
  110. package/dist/core/shaders/Swirl/index.js +5 -9
  111. package/dist/core/shaders/TiltShift/index.js +3 -7
  112. package/dist/core/shaders/Tritone/index.js +4 -8
  113. package/dist/core/shaders/Twirl/index.js +4 -8
  114. package/dist/core/shaders/Vibrance/index.js +2 -8
  115. package/dist/core/shaders/WaveDistortion/index.js +4 -8
  116. package/dist/core/shaders/ZoomBlur/index.js +3 -7
  117. package/dist/core/telemetry/index.js +189 -157
  118. package/dist/core/time-CTJvRUZ4.js +10 -0
  119. package/dist/core/transformations-DxfQXZWi.js +4715 -0
  120. package/dist/react/components/Beam.d.ts +31 -0
  121. package/dist/react/components/Beam.d.ts.map +1 -0
  122. package/dist/react/generatePresetCode-CCibXbtZ.js +645 -0
  123. package/dist/react/index.d.ts +1 -0
  124. package/dist/react/index.d.ts.map +1 -1
  125. package/dist/react/index.js +7649 -104600
  126. package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
  127. package/dist/react/utils/generatePresetCode.js +2 -5
  128. package/dist/registry.js +224 -0
  129. package/dist/solid/components/Beam.d.ts +28 -0
  130. package/dist/solid/components/Beam.d.ts.map +1 -0
  131. package/dist/solid/index.d.ts +1 -0
  132. package/dist/solid/index.d.ts.map +1 -1
  133. package/dist/solid/index.js +6691 -102524
  134. package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
  135. package/dist/solid/utils/generatePresetCode.js +586 -537
  136. package/dist/svelte/components/Beam.svelte.d.ts +19 -0
  137. package/dist/svelte/generatePresetCode-CymgoDq_.js +645 -0
  138. package/dist/svelte/index.d.ts +1 -0
  139. package/dist/svelte/index.js +6175 -102455
  140. package/dist/svelte/utils/generatePresetCode.js +2 -5
  141. package/dist/vue/components/Beam.vue.d.ts +57 -0
  142. package/dist/vue/components/Beam.vue.d.ts.map +1 -0
  143. package/dist/vue/generatePresetCode-CRJmU8iF.js +649 -0
  144. package/dist/vue/index.d.ts +1 -0
  145. package/dist/vue/index.d.ts.map +1 -1
  146. package/dist/vue/index.js +6929 -103492
  147. package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
  148. package/dist/vue/utils/generatePresetCode.js +2 -5
  149. package/package.json +12 -1
  150. package/dist/core/AngularBlur-ClvtyURQ.js +0 -56
  151. package/dist/core/Ascii-BT0-K_vw.js +0 -196
  152. package/dist/core/Blob-BlQ_1T_8.js +0 -169
  153. package/dist/core/Blur-421AjWLH.js +0 -64
  154. package/dist/core/Bulge-CZRVoR6C.js +0 -103
  155. package/dist/core/CRTScreen-C_U9g_IR.js +0 -91
  156. package/dist/core/ChannelBlur-5pzcB6Zv.js +0 -89
  157. package/dist/core/Checkerboard-CrQkqXhD.js +0 -75
  158. package/dist/core/ChromaFlow-CNrQdL8f.js +0 -134
  159. package/dist/core/ChromaticAberration-D9H7O17Y.js +0 -82
  160. package/dist/core/Circle-DnLaDn8V.js +0 -62
  161. package/dist/core/ColorAdjustment-CKwpE_4M.js +0 -14
  162. package/dist/core/CursorTrail-NY6n97VG.js +0 -105
  163. package/dist/core/DiffuseBlur-C_n01ABk.js +0 -69
  164. package/dist/core/Dither-4s-c4zh4.js +0 -61
  165. package/dist/core/DotGrid-BYl8XdMi.js +0 -61
  166. package/dist/core/Duotone-DbewOoB4.js +0 -66
  167. package/dist/core/FilmGrain-zA_-knOw.js +0 -28
  168. package/dist/core/FloatingParticles-BhVnqMsE.js +0 -160
  169. package/dist/core/GlassTiles-CFI57glh.js +0 -52
  170. package/dist/core/Glow-CQgl3IoS.js +0 -66
  171. package/dist/core/Godrays-BHMix_Bh.js +0 -105
  172. package/dist/core/Grayscale-CAEFLteL.js +0 -21
  173. package/dist/core/Grid-DlM-rVbZ.js +0 -50
  174. package/dist/core/GridDistortion-ZOZphSAT.js +0 -147
  175. package/dist/core/Group-BQAs3RiH.js +0 -17
  176. package/dist/core/Halftone-ci4ga-_J.js +0 -55
  177. package/dist/core/HueShift-CyxzPcJV.js +0 -32
  178. package/dist/core/ImageTexture-CdAGsPuH.js +0 -105
  179. package/dist/core/Invert-iPsiIqNZ.js +0 -20
  180. package/dist/core/LinearBlur-BEaaoIk-.js +0 -56
  181. package/dist/core/LinearGradient-DR_7RxLX.js +0 -111
  182. package/dist/core/Liquify-Bi02_ugh.js +0 -139
  183. package/dist/core/Pixelate-CSsdT1rr.js +0 -38
  184. package/dist/core/PolarCoordinates-D626ml58.js +0 -103
  185. package/dist/core/Posterize-DhZkMaC7.js +0 -46
  186. package/dist/core/ProgressiveBlur-CGtCfLF8.js +0 -102
  187. package/dist/core/RadialGradient-C0_WzmbH.js +0 -71
  188. package/dist/core/RectangularCoordinates-DfXw7fhI.js +0 -92
  189. package/dist/core/Ripples-DkemN3eh.js +0 -106
  190. package/dist/core/Saturation-Dup81Pnq.js +0 -31
  191. package/dist/core/SimplexNoise-BYEiCjDj.js +0 -94
  192. package/dist/core/SineWave-C6MRPtsy.js +0 -107
  193. package/dist/core/SolidColor-BZHRczgb.js +0 -22
  194. package/dist/core/Spherize-DOAnDx2l.js +0 -103
  195. package/dist/core/Spiral-BMjnWXh1.js +0 -115
  196. package/dist/core/Strands-BOVsuJLe.js +0 -125
  197. package/dist/core/Stretch-D6bHc6yp.js +0 -103
  198. package/dist/core/Swirl-BFoc0ImG.js +0 -148
  199. package/dist/core/TSLBase-BFMvTOak.js +0 -8053
  200. package/dist/core/TiltShift-BiNvvhzj.js +0 -114
  201. package/dist/core/Tritone-gdx2AA0m.js +0 -75
  202. package/dist/core/Twirl-BsV8YbqC.js +0 -82
  203. package/dist/core/Vibrance-C182fbSw.js +0 -31
  204. package/dist/core/WaveDistortion-CmaS2zDB.js +0 -132
  205. package/dist/core/ZoomBlur-DLf5xQ16.js +0 -56
  206. package/dist/core/colorMixing--dhzx0ch.js +0 -21
  207. package/dist/core/edges-CDzKsauJ.js +0 -15
  208. package/dist/core/three.tsl-Btj1hLsf.js +0 -43845
  209. package/dist/core/time-DbRMw6Jm.js +0 -10
  210. package/dist/core/transformations-CsrIJXh-.js +0 -3992
  211. package/dist/react/generatePresetCode-DaS7jkcT.js +0 -626
  212. package/dist/svelte/generatePresetCode-DaS7jkcT.js +0 -626
  213. package/dist/vue/generatePresetCode-Cd1B-Y9j.js +0 -632
@@ -1,114 +0,0 @@
1
- import { O } from "./three.tsl-Btj1hLsf.js";
2
- import { n as U, o as j } from "./transformations-CsrIJXh-.js";
3
- const E = {
4
- name: "TiltShift",
5
- category: "Blurs",
6
- description: "Selective focus blur mimicking tilt-shift photography",
7
- requiresRTT: !0,
8
- requiresChild: !0,
9
- props: {
10
- intensity: {
11
- default: 50,
12
- description: "Maximum blur intensity at edges",
13
- ui: {
14
- type: "range",
15
- min: 0,
16
- max: 100,
17
- step: 1,
18
- label: "Intensity"
19
- }
20
- },
21
- width: {
22
- default: 0.3,
23
- description: "Width of the sharp focus area",
24
- ui: {
25
- type: "range",
26
- min: 0,
27
- max: 1,
28
- step: 0.01,
29
- label: "Width"
30
- }
31
- },
32
- falloff: {
33
- default: 0.3,
34
- description: "Distance over which blur transitions to full strength",
35
- ui: {
36
- type: "range",
37
- min: 0,
38
- max: 1,
39
- step: 0.01,
40
- label: "Falloff"
41
- }
42
- },
43
- angle: {
44
- default: 0,
45
- transform: U,
46
- description: "Rotation angle of the focus line (in degrees)",
47
- ui: {
48
- type: "range",
49
- min: 0,
50
- max: 360,
51
- step: 1,
52
- label: "Angle"
53
- }
54
- },
55
- center: {
56
- default: {
57
- x: 0.5,
58
- y: 0.5
59
- },
60
- transform: j,
61
- description: "Center point of the focus line",
62
- ui: {
63
- type: "position",
64
- label: "Center"
65
- }
66
- }
67
- },
68
- fragmentNode: ({ uniforms: e, childNode: g, onCleanup: h }) => {
69
- const { vec2: n, vec4: l, float: o, screenUV: c, convertToTexture: x, viewportSize: y, radians: C, cos: R, sin: V, dot: F, abs: W, smoothstep: _, mix: q, Fn: b } = O;
70
- if (!g) return l(0, 0, 0, 0);
71
- const r = x(g);
72
- h(() => {
73
- r?.renderTarget?.dispose && r.renderTarget.dispose();
74
- });
75
- const T = C(e.angle.uniform), D = R(T), I = n(V(T).negate(), D), M = n(e.center.uniform[0], e.center.uniform[1].oneMinus()), P = W(F(c.sub(M), I)), v = e.width.uniform.mul(0.5), k = e.falloff.uniform, w = _(v, v.add(k), P), B = e.intensity.uniform.mul(0.06), S = w.mul(B), z = [
76
- 0.056,
77
- 0.135,
78
- 0.278,
79
- 0.487,
80
- 0.726,
81
- 0.923,
82
- 1,
83
- 0.923,
84
- 0.726,
85
- 0.487,
86
- 0.278,
87
- 0.135,
88
- 0.056
89
- ], A = 6.214, u = x(b(() => {
90
- const a = c, d = n(1).div(y), t = l(0).toVar();
91
- for (let s = -6; s <= 6; s++) {
92
- const i = o(z[s + 6] / A), f = n(o(s), o(0)).mul(S).mul(d), m = a.add(f), p = r.sample(m).mul(i);
93
- t.assign(t.add(p));
94
- }
95
- return t;
96
- })());
97
- return h(() => {
98
- u?.renderTarget?.dispose && u.renderTarget.dispose();
99
- }), b(() => {
100
- const a = c, d = n(1).div(y), t = l(0).toVar();
101
- for (let i = -6; i <= 6; i++) {
102
- const f = o(z[i + 6] / A), m = n(o(0), o(i)).mul(S).mul(d), p = a.add(m), L = u.sample(p).mul(f);
103
- t.assign(t.add(L));
104
- }
105
- const s = t;
106
- return q(r.sample(a), s, w);
107
- })();
108
- }
109
- };
110
- var J = E;
111
- export {
112
- E as n,
113
- J as t
114
- };
@@ -1,75 +0,0 @@
1
- import { O as g } from "./three.tsl-Btj1hLsf.js";
2
- import { i as C, r as i, t as M } from "./transformations-CsrIJXh-.js";
3
- import { t as l } from "./colorMixing--dhzx0ch.js";
4
- const T = {
5
- name: "Tritone",
6
- category: "Adjustments",
7
- description: "Map colors to three tones: shadows, midtones, highlights",
8
- requiresRTT: !0,
9
- requiresChild: !0,
10
- props: {
11
- colorA: {
12
- default: "#ce1bea",
13
- transform: i,
14
- description: "First color (used for shadows/darkest areas)",
15
- ui: {
16
- type: "color",
17
- label: "Color A (Shadows)"
18
- }
19
- },
20
- colorB: {
21
- default: "#2fff00",
22
- transform: i,
23
- description: "Second color (used for midtones)",
24
- ui: {
25
- type: "color",
26
- label: "Color B (Midtones)"
27
- }
28
- },
29
- colorC: {
30
- default: "#ffff00",
31
- transform: i,
32
- description: "Third color (used for highlights/brightest areas)",
33
- ui: {
34
- type: "color",
35
- label: "Color C (Highlights)"
36
- }
37
- },
38
- blendMid: {
39
- default: 0.5,
40
- description: "Midpoint position between the three colors",
41
- ui: {
42
- type: "range",
43
- min: 0,
44
- max: 1,
45
- step: 0.01,
46
- label: "Midpoint"
47
- }
48
- },
49
- colorSpace: {
50
- default: "linear",
51
- transform: C,
52
- description: "Color space for color interpolation",
53
- ui: {
54
- type: "select",
55
- options: M,
56
- label: "Color Space"
57
- }
58
- }
59
- },
60
- fragmentNode: ({ uniforms: o, childNode: n, onCleanup: d }) => {
61
- const { vec3: c, vec4: s, dot: p, smoothstep: e, screenUV: f, convertToTexture: u } = g;
62
- if (!n) return s(0, 0, 0, 0);
63
- const r = u(n);
64
- d(() => {
65
- r?.renderTarget?.dispose && r.renderTarget.dispose();
66
- });
67
- const a = r.sample(f), t = p(a.rgb, c(0.299, 0.587, 0.114)), m = e(o.blendMid.uniform.sub(0.25), o.blendMid.uniform, t), h = l(o.colorA.uniform, o.colorB.uniform, m, o.colorSpace.uniform), b = e(o.blendMid.uniform, o.blendMid.uniform.add(0.25), t);
68
- return s(l(h, l(o.colorB.uniform, o.colorC.uniform, b, o.colorSpace.uniform), e(o.blendMid.uniform.sub(0.1), o.blendMid.uniform.add(0.1), t), o.colorSpace.uniform).rgb, a.a);
69
- }
70
- };
71
- var y = T;
72
- export {
73
- T as n,
74
- y as t
75
- };
@@ -1,82 +0,0 @@
1
- import { O as x } from "./three.tsl-Btj1hLsf.js";
2
- import { t as v } from "./edges-CDzKsauJ.js";
3
- import { a as w, o as A } from "./transformations-CsrIJXh-.js";
4
- const E = {
5
- name: "Twirl",
6
- category: "Distortions",
7
- description: "Rotate and twist content around a center point",
8
- requiresRTT: !0,
9
- requiresChild: !0,
10
- props: {
11
- center: {
12
- default: {
13
- x: 0.5,
14
- y: 0.5
15
- },
16
- transform: A,
17
- description: "The center point of the twirl effect",
18
- ui: {
19
- type: "position",
20
- label: "Center"
21
- }
22
- },
23
- intensity: {
24
- default: 1,
25
- description: "The strength of the twirl effect",
26
- ui: {
27
- type: "range",
28
- min: -5,
29
- max: 5,
30
- step: 0.1,
31
- label: "Intensity"
32
- }
33
- },
34
- edges: {
35
- default: "stretch",
36
- description: "How to handle edges when distortion pushes content out of bounds",
37
- transform: w,
38
- ui: {
39
- type: "select",
40
- options: [
41
- {
42
- label: "Stretch",
43
- value: "stretch"
44
- },
45
- {
46
- label: "Transparent",
47
- value: "transparent"
48
- },
49
- {
50
- label: "Mirror",
51
- value: "mirror"
52
- },
53
- {
54
- label: "Wrap",
55
- value: "wrap"
56
- }
57
- ],
58
- label: "Edges"
59
- }
60
- }
61
- },
62
- uvTransformNode: ({ uv: n, uniforms: o }) => {
63
- const { vec2: i, cos: l, sin: u, length: m } = x, r = i(o.center.uniform.x, o.center.uniform.y.oneMinus()), e = n.sub(r), c = o.intensity.uniform.mul(m(e)), d = l(c), t = u(c), p = d.mul(e.x).sub(t.mul(e.y)), s = t.mul(e.x).add(d.mul(e.y));
64
- return i(p.add(r.x), s.add(r.y));
65
- },
66
- fragmentNode: ({ uniforms: n, childNode: o, onCleanup: i }) => {
67
- const { vec2: l, vec4: u, cos: m, sin: r, length: e, screenUV: c, convertToTexture: d } = x;
68
- if (!o)
69
- return console.error("You must pass a child component into the Twirl shader."), u(0);
70
- const t = d(o);
71
- i(() => {
72
- t?.renderTarget?.dispose && t.renderTarget.dispose();
73
- });
74
- const p = c, s = l(n.center.uniform.x, n.center.uniform.y.oneMinus()), a = p.sub(s), f = n.intensity.uniform.mul(e(a)), g = m(f), y = r(f), T = g.mul(a.x).sub(y.mul(a.y)), b = y.mul(a.x).add(g.mul(a.y)), h = l(T.add(s.x), b.add(s.y));
75
- return v(h, t.sample(h), t, n.edges.uniform);
76
- }
77
- };
78
- var _ = E;
79
- export {
80
- E as n,
81
- _ as t
82
- };
@@ -1,31 +0,0 @@
1
- import { O as i } from "./three.tsl-Btj1hLsf.js";
2
- import { i as o } from "./ColorAdjustment-CKwpE_4M.js";
3
- const s = {
4
- name: "Vibrance",
5
- category: "Adjustments",
6
- description: "Selective saturation adjustment protecting skin tones",
7
- requiresChild: !0,
8
- props: { intensity: {
9
- default: 0,
10
- description: "The intensity of the vibrance effect",
11
- ui: {
12
- type: "range",
13
- min: -2,
14
- max: 2,
15
- step: 0.01,
16
- label: "Intensity"
17
- }
18
- } },
19
- fragmentNode: ({ uniforms: r, childNode: t }) => {
20
- const { vec4: e } = i;
21
- if (!t)
22
- return console.error("You must pass a child component into the Vibrance shader."), e(0);
23
- const n = t || e(0, 0, 0, 0);
24
- return e(o(n.rgb, r.intensity.uniform).rgb, n.a);
25
- }
26
- };
27
- var m = s;
28
- export {
29
- s as n,
30
- m as t
31
- };
@@ -1,132 +0,0 @@
1
- import { O as E } from "./three.tsl-Btj1hLsf.js";
2
- import { t as X } from "./edges-CDzKsauJ.js";
3
- import { a as Y } from "./transformations-CsrIJXh-.js";
4
- const F = {
5
- name: "WaveDistortion",
6
- category: "Distortions",
7
- description: "Wave-based distortion with multiple waveform types",
8
- requiresRTT: !0,
9
- requiresChild: !0,
10
- props: {
11
- strength: {
12
- default: 0.3,
13
- description: "Distortion intensity",
14
- ui: {
15
- type: "range",
16
- min: 0,
17
- max: 1,
18
- step: 0.01,
19
- label: "Strength"
20
- }
21
- },
22
- frequency: {
23
- default: 1,
24
- description: "Number of bends/waves",
25
- ui: {
26
- type: "range",
27
- min: 0.1,
28
- max: 10,
29
- step: 0.1,
30
- label: "Frequency"
31
- }
32
- },
33
- speed: {
34
- default: 1,
35
- description: "Animation speed",
36
- ui: {
37
- type: "range",
38
- min: 0,
39
- max: 5,
40
- step: 0.1,
41
- label: "Speed"
42
- }
43
- },
44
- angle: {
45
- default: 0,
46
- description: "Direction of wave distortion in degrees",
47
- ui: {
48
- type: "range",
49
- min: 0,
50
- max: 360,
51
- step: 1,
52
- label: "Angle"
53
- }
54
- },
55
- waveType: {
56
- default: "sine",
57
- description: "Shape of the distortion wave",
58
- transform: (r) => ({
59
- sine: 0,
60
- triangle: 1,
61
- square: 2,
62
- sawtooth: 3
63
- })[r] ?? 0,
64
- ui: {
65
- type: "select",
66
- options: [
67
- {
68
- label: "Sine",
69
- value: "sine"
70
- },
71
- {
72
- label: "Triangle",
73
- value: "triangle"
74
- },
75
- {
76
- label: "Square",
77
- value: "square"
78
- },
79
- {
80
- label: "Sawtooth",
81
- value: "sawtooth"
82
- }
83
- ],
84
- label: "Wave Type"
85
- }
86
- },
87
- edges: {
88
- default: "stretch",
89
- description: "How to handle edges when distortion pushes content out of bounds",
90
- transform: Y,
91
- ui: {
92
- type: "select",
93
- options: [
94
- {
95
- label: "Stretch",
96
- value: "stretch"
97
- },
98
- {
99
- label: "Transparent",
100
- value: "transparent"
101
- },
102
- {
103
- label: "Mirror",
104
- value: "mirror"
105
- },
106
- {
107
- label: "Wrap",
108
- value: "wrap"
109
- }
110
- ],
111
- label: "Edges"
112
- }
113
- }
114
- },
115
- uvTransformNode: ({ uv: r, uniforms: e }) => {
116
- const { vec2: u, sin: y, cos: d, abs: W, fract: w, step: s, float: n, PI: f, time: a } = E, A = a.mul(e.speed.uniform).mul(0.5), T = e.angle.uniform.mul(f).div(180), t = d(T), i = y(T), m = r.sub(u(0.5, 0.5)), c = u(m.x.mul(t).sub(m.y.mul(i)), m.x.mul(i).add(m.y.mul(t))).add(u(0.5, 0.5)).y.mul(e.frequency.uniform).mul(f.mul(2)).add(A), v = w(c.div(f.mul(2))), x = y(c), g = W(v.mul(2).sub(1)).mul(2).sub(1), b = s(n(0.5), v).mul(2).sub(1), p = v.mul(2).sub(1), o = e.waveType.uniform, h = s(o, n(0.5)), D = s(n(0.5), o).mul(s(o, n(1.5))), V = s(n(1.5), o).mul(s(o, n(2.5))), N = s(n(2.5), o), q = x.mul(h).add(g.mul(D)).add(b.mul(V)).add(p.mul(N)).mul(e.strength.uniform).mul(0.5), l = q.mul(t), P = q.mul(i);
117
- return u(r.x.add(l), r.y.add(P));
118
- },
119
- fragmentNode: (r) => {
120
- const { uniforms: e, childNode: u, onCleanup: y } = r, { vec2: d, vec4: W, sin: w, cos: s, abs: n, fract: f, step: a, convertToTexture: A, screenUV: T, float: t, PI: i, time: m } = E;
121
- if (!u) return W(0, 0, 0, 0);
122
- const c = T, v = m.mul(e.speed.uniform).mul(0.5), x = e.angle.uniform.mul(i).div(180), g = s(x), b = w(x), p = c.sub(d(0.5, 0.5)), o = d(p.x.mul(g).sub(p.y.mul(b)), p.x.mul(b).add(p.y.mul(g))).add(d(0.5, 0.5)).y.mul(e.frequency.uniform).mul(i.mul(2)).add(v), h = f(o.div(i.mul(2))), D = w(o), V = n(h.mul(2).sub(1)).mul(2).sub(1), N = a(t(0.5), h).mul(2).sub(1), q = h.mul(2).sub(1), l = e.waveType.uniform, P = a(l, t(0.5)), R = a(t(0.5), l).mul(a(l, t(1.5))), _ = a(t(1.5), l).mul(a(l, t(2.5))), z = a(t(2.5), l), U = D.mul(P).add(V.mul(R)).add(N.mul(_)).add(q.mul(z)).mul(e.strength.uniform).mul(0.5), H = U.mul(g), I = U.mul(b), C = d(c.x.add(H), c.y.add(I)), S = A(u);
123
- return y(() => {
124
- S?.renderTarget?.dispose && S.renderTarget.dispose();
125
- }), X(C, S.sample(C), S, e.edges.uniform);
126
- }
127
- };
128
- var k = F;
129
- export {
130
- F as n,
131
- k as t
132
- };
@@ -1,56 +0,0 @@
1
- import { O as C } from "./three.tsl-Btj1hLsf.js";
2
- import { o as z } from "./transformations-CsrIJXh-.js";
3
- const B = {
4
- name: "ZoomBlur",
5
- category: "Blurs",
6
- description: "Radial zoom blur expanding from a center point",
7
- requiresRTT: !0,
8
- requiresChild: !0,
9
- props: {
10
- intensity: {
11
- default: 30,
12
- description: "Intensity of the zoom blur effect",
13
- ui: {
14
- type: "range",
15
- min: 0,
16
- max: 100,
17
- step: 1,
18
- label: "Intensity"
19
- }
20
- },
21
- center: {
22
- default: {
23
- x: 0.5,
24
- y: 0.5
25
- },
26
- transform: z,
27
- description: "Center point of the zoom blur",
28
- ui: {
29
- type: "position",
30
- label: "Center"
31
- }
32
- }
33
- },
34
- fragmentNode: ({ uniforms: t, childNode: i, onCleanup: m }) => {
35
- const { vec2: p, vec4: a, float: e, screenUV: f, Fn: g, convertToTexture: v } = C;
36
- if (!i) return a(0, 0, 0, 0);
37
- const o = v(i);
38
- m(() => {
39
- o?.renderTarget?.dispose && o.renderTarget.dispose();
40
- });
41
- const u = p(t.center.uniform.x, t.center.uniform.y.oneMinus()), x = t.intensity.uniform.mul(0.01);
42
- return g(() => {
43
- const y = f, n = a(0).toVar(), r = e(0).toVar();
44
- for (let s = 0; s < 32; s++) {
45
- const c = e(s).div(e(31)), l = c.sub(0.5).mul(2), d = e(1).div(e(2.506628)).mul(e(-0.5).mul(l).mul(l).div(e(0.64)).exp()), T = e(1).add(x.mul(c)), b = y.sub(u).div(T).add(u), h = o.sample(b).mul(d);
46
- n.assign(n.add(h)), r.assign(r.add(d));
47
- }
48
- return n.div(r);
49
- })();
50
- }
51
- };
52
- var q = B;
53
- export {
54
- B as n,
55
- q as t
56
- };
@@ -1,21 +0,0 @@
1
- import { O as C, m as E } from "./three.tsl-Btj1hLsf.js";
2
- var { vec3: o, vec4: G, float: n, pow: r, sqrt: M, atan: H, cos: P, sin: j } = C, k = (u) => o(u.x.mul(1.2249401).sub(u.y.mul(0.2249404)).sub(u.z.mul(0)), u.x.mul(-0.0420569).add(u.y.mul(1.0420571)).add(u.z.mul(0)), u.x.mul(-0.0196376).sub(u.y.mul(0.0786361)).add(u.z.mul(1.0982735))), v = (u) => o(u.x.mul(0.8224621).add(u.y.mul(0.177538)).add(u.z.mul(0)), u.x.mul(0.0331941).add(u.y.mul(0.9668058)).add(u.z.mul(0)), u.x.mul(0.0170826).add(u.y.mul(0.0723974)).add(u.z.mul(0.9105199))), T = (u) => {
3
- const s = u.x, l = u.y, t = u.z, c = s.mul(0.4122214708).add(l.mul(0.5363325363)).add(t.mul(0.0514459929)), e = s.mul(0.2119034982).add(l.mul(0.6806995451).add(t.mul(0.1073969566))), x = s.mul(0.0883024619).add(l.mul(0.2817188376)).add(t.mul(0.6299787005)), d = r(c, n(1 / 3)), m = r(e, n(1 / 3)), a = r(x, n(1 / 3));
4
- return o(d.mul(0.2104542553).add(m.mul(0.793617785)).sub(a.mul(0.0040720468)), d.mul(1.9779984951).sub(m.mul(2.428592205)).add(a.mul(0.4505937099)), d.mul(0.0259040371).add(m.mul(0.7827717662)).sub(a.mul(0.808675766)));
5
- }, _ = (u) => {
6
- const s = u.x, l = u.y, t = u.z, c = s.add(l.mul(0.3963377774)).add(t.mul(0.2158037573)), e = s.sub(l.mul(0.1055613458)).sub(t.mul(0.0638541728)), x = s.sub(l.mul(0.0894841775)).sub(t.mul(1.291485548)), d = r(c, n(3)), m = r(e, n(3)), a = r(x, n(3));
7
- return o(d.mul(4.0767416621).sub(m.mul(3.3077115913)).add(a.mul(0.2309699292)), d.mul(-1.2684380046).add(m.mul(2.6097574011)).sub(a.mul(0.3413193965)), d.mul(-0.0041960863).sub(m.mul(0.7034186147)).add(a.mul(1.707614701)));
8
- }, w = (u) => {
9
- const s = u.x, l = u.y, t = u.z;
10
- return o(s, M(l.mul(l).add(t.mul(t))), H(t, l));
11
- }, D = (u) => {
12
- const s = u.x, l = u.y, t = u.z;
13
- return o(s, l.mul(P(t)), l.mul(j(t)));
14
- };
15
- const I = (u, s, l, t) => {
16
- const c = o(u.x, u.y, u.z), e = o(s.x, s.y, s.z), x = u.w, d = s.w, m = x.mul(n(1).sub(l)), a = d.mul(l), i = m.add(a), O = E(i, n(1e-3)), b = (p, A) => p.mul(m).add(A.mul(a)).div(O), R = b(c, e), g = k(c), B = k(e), y = T(g), z = T(B), f = v(_(D(b(w(y), w(z))))), q = v(_(b(y, z))), L = t.greaterThanEqual(n(0.5)), h = t.greaterThanEqual(n(1.5)).select(q, L.select(f, R)), W = i;
17
- return G(h.x, h.y, h.z, W);
18
- };
19
- export {
20
- I as t
21
- };
@@ -1,15 +0,0 @@
1
- import { O } from "./three.tsl-Btj1hLsf.js";
2
- var { vec2: l, vec4: h, step: r, abs: y, mod: b, fract: X, float: n, select: c } = O;
3
- const k = (s, t) => {
4
- const o = s.clamp(l(0, 0), l(1, 1)), a = s, p = b(y(s.x), n(2)), m = b(y(s.y), n(2)), x = l(c(r(n(1), p), n(2).sub(p), p), c(r(n(1), m), n(2).sub(m), m)), u = X(s);
5
- return c(r(n(0.5), t), c(r(n(1.5), t), c(r(n(2.5), t), u, x), a), o);
6
- }, q = (s, t, o, a) => {
7
- const p = r(n(0), s.x).mul(r(s.x, n(1))), m = r(n(0), s.y).mul(r(s.y, n(1))), x = p.mul(m), u = h(t.rgb, t.a.mul(x));
8
- if (!o) return c(r(n(0.5), a), u, t);
9
- const w = b(y(s.x), n(2)), B = b(y(s.y), n(2)), Y = l(c(r(n(1), w), n(2).sub(w), w), c(r(n(1), B), n(2).sub(B), B)), E = o.sample(Y), _ = l(X(s.x), X(s.y)), H = o.sample(_);
10
- return c(r(n(0.5), a), c(r(n(1.5), a), c(r(n(2.5), a), H, E), u), t);
11
- };
12
- export {
13
- k as n,
14
- q as t
15
- };