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,31 +0,0 @@
1
- import { O as o } from "./three.tsl-Btj1hLsf.js";
2
- import { r as i } from "./ColorAdjustment-CKwpE_4M.js";
3
- const s = {
4
- name: "Saturation",
5
- category: "Adjustments",
6
- description: "Adjust color saturation intensity",
7
- requiresChild: !0,
8
- props: { intensity: {
9
- default: 1,
10
- description: "The intensity of the saturation effect (1 being no change)",
11
- ui: {
12
- type: "range",
13
- min: 0,
14
- max: 3,
15
- step: 0.01,
16
- label: "Intensity"
17
- }
18
- } },
19
- fragmentNode: ({ uniforms: r, childNode: e }) => {
20
- const { vec4: t } = o;
21
- if (!e)
22
- return console.error("You must pass a child component into the Saturation shader."), t(0);
23
- const n = e || t(0, 0, 0, 0);
24
- return t(i(n.rgb, r.intensity.uniform).rgb, n.a);
25
- }
26
- };
27
- var c = s;
28
- export {
29
- s as n,
30
- c as t
31
- };
@@ -1,94 +0,0 @@
1
- import { A as f, N as r, a as u, d as x, j as g, u as v, v as y, x as b } from "./three.tsl-Btj1hLsf.js";
2
- import { t as C } from "./time-DbRMw6Jm.js";
3
- import { r as n } from "./transformations-CsrIJXh-.js";
4
- import { t as A } from "./colorMixing--dhzx0ch.js";
5
- const B = {
6
- name: "SimplexNoise",
7
- category: "Base Layers",
8
- description: "Organic noise with animated movement",
9
- acceptsUVContext: !0,
10
- props: {
11
- colorA: {
12
- default: "#ffffff",
13
- description: "First color",
14
- transform: n,
15
- ui: {
16
- type: "color",
17
- label: "Color A"
18
- }
19
- },
20
- colorB: {
21
- default: "#000000",
22
- description: "Second color",
23
- transform: n,
24
- ui: {
25
- type: "color",
26
- label: "Color B"
27
- }
28
- },
29
- scale: {
30
- default: 2,
31
- description: "Pattern scale (higher = larger patterns)",
32
- ui: {
33
- type: "range",
34
- min: -2,
35
- max: 5,
36
- step: 0.1,
37
- label: "Scale"
38
- }
39
- },
40
- balance: {
41
- default: 0,
42
- description: "Balance between colors (negative = more colorB, positive = more colorA)",
43
- ui: {
44
- type: "range",
45
- min: -1,
46
- max: 1,
47
- step: 0.01,
48
- label: "Balance"
49
- }
50
- },
51
- contrast: {
52
- default: 0,
53
- description: "Pattern contrast (higher = sharper transitions)",
54
- ui: {
55
- type: "range",
56
- min: -2,
57
- max: 5,
58
- step: 0.1,
59
- label: "Contrast"
60
- }
61
- },
62
- seed: {
63
- default: 0,
64
- description: "Random seed for pattern variation",
65
- ui: {
66
- type: "range",
67
- min: 0,
68
- max: 100,
69
- step: 1,
70
- label: "Seed"
71
- }
72
- },
73
- speed: {
74
- default: 1,
75
- description: "Animation speed",
76
- ui: {
77
- type: "range",
78
- min: 0,
79
- max: 5,
80
- step: 0.1,
81
- label: "Speed"
82
- }
83
- }
84
- },
85
- fragmentNode: (o) => {
86
- const { uniforms: e, uvContext: i } = o, t = i ?? b, s = r.x.div(r.y), l = f(t.x.mul(s), t.y), c = C(o, e.speed), a = l.mul(v(e.scale.uniform)).add(e.seed.uniform), m = y(g(a.x, a.y, c.mul(0.5))), p = e.contrast.uniform.add(1), d = u(0, 1, m.mul(p).add(e.balance.uniform).mul(0.5).add(0.5));
87
- return A(e.colorB.uniform, e.colorA.uniform, d, x(0));
88
- }
89
- };
90
- var U = B;
91
- export {
92
- B as n,
93
- U as t
94
- };
@@ -1,107 +0,0 @@
1
- import { O as U } from "./three.tsl-Btj1hLsf.js";
2
- import { n as V, o as W, r as _ } from "./transformations-CsrIJXh-.js";
3
- const F = {
4
- name: "SineWave",
5
- category: "Base Layers",
6
- description: "Animated wave with thickness and softness",
7
- acceptsUVContext: !0,
8
- props: {
9
- color: {
10
- default: "#ffffff",
11
- transform: _,
12
- description: "The color of the sine wave",
13
- ui: {
14
- type: "color",
15
- label: "Color"
16
- }
17
- },
18
- amplitude: {
19
- default: 0.15,
20
- description: "The height/amplitude of the sine wave",
21
- ui: {
22
- type: "range",
23
- min: 0,
24
- max: 1,
25
- step: 0.01,
26
- label: "Amplitude"
27
- }
28
- },
29
- frequency: {
30
- default: 1,
31
- description: "The frequency/number of wave cycles",
32
- ui: {
33
- type: "range",
34
- min: 0.1,
35
- max: 20,
36
- step: 0.1,
37
- label: "Frequency"
38
- }
39
- },
40
- speed: {
41
- default: 1,
42
- description: "The animation speed of the wave",
43
- ui: {
44
- type: "range",
45
- min: -5,
46
- max: 5,
47
- step: 0.1,
48
- label: "Speed"
49
- }
50
- },
51
- angle: {
52
- default: 0,
53
- transform: V,
54
- description: "The rotation angle of the wave (in degrees)",
55
- ui: {
56
- type: "range",
57
- min: 0,
58
- max: 360,
59
- step: 1,
60
- label: "Angle"
61
- }
62
- },
63
- position: {
64
- default: {
65
- x: 0.5,
66
- y: 0.5
67
- },
68
- transform: W,
69
- description: "The center position of the wave",
70
- ui: {
71
- type: "position",
72
- label: "Position"
73
- }
74
- },
75
- thickness: {
76
- default: 0.2,
77
- description: "The thickness of the wave line",
78
- ui: {
79
- type: "range",
80
- min: 0,
81
- max: 2,
82
- step: 0.01,
83
- label: "Thickness"
84
- }
85
- },
86
- softness: {
87
- default: 0.4,
88
- description: "Edge softness of the wave line",
89
- ui: {
90
- type: "range",
91
- min: 0,
92
- max: 1,
93
- step: 0.01,
94
- label: "Softness"
95
- }
96
- }
97
- },
98
- fragmentNode: ({ uniforms: e, uvContext: p }) => {
99
- const { vec2: n, vec4: d, sin: o, cos: f, abs: h, smoothstep: y, screenUV: g, viewportSize: s, time: v, radians: b, PI: x } = U, a = p ?? g, i = s.x.div(s.y), w = n(a.x.mul(i), a.y), T = n(e.position.uniform.x.mul(i), e.position.uniform.y.oneMinus()), t = w.sub(T), r = b(e.angle.uniform), l = f(r), c = o(r), k = t.x.mul(l).sub(t.y.mul(c)), A = t.x.mul(c).add(t.y.mul(l)), S = v.mul(e.speed.uniform), q = o(k.mul(e.frequency.uniform).mul(x.mul(2)).add(S)).mul(e.amplitude.uniform), C = h(A.sub(q)), m = e.thickness.uniform.mul(0.5), u = e.softness.uniform.mul(0.5), P = y(m.add(u), m.sub(u), C);
100
- return d(e.color.uniform.rgb, e.color.uniform.a.mul(P));
101
- }
102
- };
103
- var B = F;
104
- export {
105
- F as n,
106
- B as t
107
- };
@@ -1,22 +0,0 @@
1
- import { r } from "./transformations-CsrIJXh-.js";
2
- const t = {
3
- name: "SolidColor",
4
- category: "Base Layers",
5
- description: "Fill the canvas with a single solid color",
6
- acceptsUVContext: !0,
7
- props: { color: {
8
- default: "#5b18ca",
9
- transform: r,
10
- description: "The solid color to display",
11
- ui: {
12
- type: "color",
13
- label: "Color"
14
- }
15
- } },
16
- fragmentNode: ({ uniforms: o }) => o.color.uniform
17
- };
18
- var l = t;
19
- export {
20
- t as n,
21
- l as t
22
- };
@@ -1,103 +0,0 @@
1
- import { O as K } from "./three.tsl-Btj1hLsf.js";
2
- import { o as z, r as Q } from "./transformations-CsrIJXh-.js";
3
- const W = {
4
- name: "Spherize",
5
- category: "Distortions",
6
- description: "Map content onto a 3D sphere surface with depth distortion",
7
- requiresRTT: !0,
8
- requiresChild: !0,
9
- props: {
10
- radius: {
11
- default: 1,
12
- description: "Radius of the sphere (1 = half viewport height)",
13
- ui: {
14
- type: "range",
15
- min: 0.1,
16
- max: 3,
17
- step: 0.01,
18
- label: "Radius"
19
- }
20
- },
21
- depth: {
22
- default: 1,
23
- description: "How much the sphere bulges toward viewer (0 = flat, higher = more bulge)",
24
- ui: {
25
- type: "range",
26
- min: 0,
27
- max: 3,
28
- step: 0.01,
29
- label: "Depth"
30
- }
31
- },
32
- center: {
33
- default: {
34
- x: 0.5,
35
- y: 0.5
36
- },
37
- transform: z,
38
- description: "The center point of the sphere",
39
- ui: {
40
- type: "position",
41
- label: "Center"
42
- }
43
- },
44
- lightPosition: {
45
- default: {
46
- x: 0.3,
47
- y: 0.3
48
- },
49
- transform: z,
50
- description: "Position of the specular light source",
51
- ui: {
52
- type: "position",
53
- label: "Light Position"
54
- }
55
- },
56
- lightIntensity: {
57
- default: 0.5,
58
- description: "Intensity of the rim light (0 = off)",
59
- ui: {
60
- type: "range",
61
- min: 0,
62
- max: 1,
63
- step: 0.01,
64
- label: "Light Intensity"
65
- }
66
- },
67
- lightSoftness: {
68
- default: 0.5,
69
- description: "Softness of the rim light falloff (0 = hard edge, 1 = soft glow)",
70
- ui: {
71
- type: "range",
72
- min: 0,
73
- max: 1,
74
- step: 0.01,
75
- label: "Light Softness"
76
- }
77
- },
78
- lightColor: {
79
- default: "#ffffff",
80
- transform: Q,
81
- description: "Color of the specular highlight",
82
- ui: {
83
- type: "color",
84
- label: "Light Color"
85
- }
86
- }
87
- },
88
- fragmentNode: ({ uniforms: e, childNode: p, onCleanup: T }) => {
89
- const { vec2: o, vec3: l, vec4: m, float: t, screenUV: I, convertToTexture: L, viewportSize: g, sqrt: q, max: a, smoothstep: R, pow: y, normalize: u, dot: x } = K;
90
- if (!p) return m(0, 0, 0, 0);
91
- const d = L(p);
92
- T(() => {
93
- d?.renderTarget?.dispose && d.renderTarget.dispose();
94
- });
95
- const b = I, v = g.x.div(g.y), s = o(e.center.uniform.x, e.center.uniform.y.oneMinus()), w = e.radius.uniform, i = o(b.x.sub(s.x).mul(v), b.y.sub(s.y)).mul(2).div(w), C = i.x.mul(i.x).add(i.y.mul(i.y)), U = t(1).sub(R(t(0.98), t(1), C)), D = q(a(t(0), t(1).sub(C))), V = t(1).add(D.mul(e.depth.uniform)), P = i.div(V).mul(w).div(2), M = o(P.x.div(v).add(s.x), P.y.add(s.y)), n = d.sample(M), S = o(e.lightPosition.uniform.x, e.lightPosition.uniform.y.oneMinus()), _ = e.lightIntensity.uniform, A = e.lightSoftness.uniform, c = l(e.lightColor.uniform.x, e.lightColor.uniform.y, e.lightColor.uniform.z), h = u(l(i.x, i.y, D)), B = l(0, 0, 1), F = t(1).add(t(4).mul(t(1).sub(A))), G = y(t(1).sub(a(x(h, B), t(0))), F), H = o(S.x.sub(t(0.5)).mul(2), S.y.sub(t(0.5)).mul(2)), N = u(o(h.x, h.y).add(o(1e-4, 1e-4))), O = u(H.add(o(1e-4, 1e-4))), j = y(a(t(0), x(N, O)), t(2)), f = G.mul(j).mul(_).mul(t(2)), k = n.x.add(c.x.mul(f)), E = n.y.add(c.y.mul(f)), J = n.z.add(c.z.mul(f)), r = n.w.mul(U);
96
- return m(k.mul(r), E.mul(r), J.mul(r), r);
97
- }
98
- };
99
- var Z = W;
100
- export {
101
- W as n,
102
- Z as t
103
- };
@@ -1,115 +0,0 @@
1
- import { O as L } from "./three.tsl-Btj1hLsf.js";
2
- import { i as N, o as j, r as g, t as D } from "./transformations-CsrIJXh-.js";
3
- import { t as I } from "./colorMixing--dhzx0ch.js";
4
- const R = {
5
- name: "Spiral",
6
- category: "Base Layers",
7
- description: "Rotating spiral pattern with animated movement",
8
- acceptsUVContext: !0,
9
- props: {
10
- colorA: {
11
- default: "#000000",
12
- transform: g,
13
- description: "Background color",
14
- ui: {
15
- type: "color",
16
- label: "Color A"
17
- }
18
- },
19
- colorB: {
20
- default: "#ffffff",
21
- transform: g,
22
- description: "Spiral stroke color",
23
- ui: {
24
- type: "color",
25
- label: "Color B"
26
- }
27
- },
28
- strokeWidth: {
29
- default: 0.5,
30
- description: "Thickness of spiral stroke",
31
- ui: {
32
- type: "range",
33
- min: 0,
34
- max: 2,
35
- step: 0.01,
36
- label: "Stroke Width"
37
- }
38
- },
39
- strokeFalloff: {
40
- default: 0,
41
- description: "Stroke losing width further from center",
42
- ui: {
43
- type: "range",
44
- min: 0,
45
- max: 1,
46
- step: 0.01,
47
- label: "Stroke Falloff"
48
- }
49
- },
50
- softness: {
51
- default: 0,
52
- description: "Color transition sharpness (0 = hard edge, 1 = smooth fade)",
53
- ui: {
54
- type: "range",
55
- min: 0,
56
- max: 1,
57
- step: 0.01,
58
- label: "Softness"
59
- }
60
- },
61
- speed: {
62
- default: 1,
63
- description: "Animation speed (negative values reverse direction)",
64
- ui: {
65
- type: "range",
66
- min: -3,
67
- max: 3,
68
- step: 0.1,
69
- label: "Speed"
70
- }
71
- },
72
- center: {
73
- default: {
74
- x: 0.5,
75
- y: 0.5
76
- },
77
- transform: j,
78
- description: "The center point of the spiral",
79
- ui: {
80
- type: "position",
81
- label: "Center"
82
- }
83
- },
84
- scale: {
85
- default: 1,
86
- description: "Scale factor for spiral bands (higher = more bands, lower = fewer bands)",
87
- ui: {
88
- type: "range",
89
- min: 0.1,
90
- max: 5,
91
- step: 0.1,
92
- label: "Scale"
93
- }
94
- },
95
- colorSpace: {
96
- default: "linear",
97
- transform: N,
98
- description: "Color space for color interpolation",
99
- ui: {
100
- type: "select",
101
- options: D,
102
- label: "Color Space"
103
- }
104
- }
105
- },
106
- fragmentNode: ({ uniforms: e, uvContext: x }) => {
107
- const { vec2: s, vec4: S, float: a, atan: y, length: k, clamp: o, fract: C, abs: v, mix: w, smoothstep: t, screenUV: W, time: A, fwidth: n, viewportSize: l } = L, i = x ?? W, c = l.x.div(l.y), B = s(i.x.mul(c), i.y), F = s(e.center.uniform.x.mul(c), e.center.uniform.y.oneMinus()), r = B.sub(F), U = A.mul(e.speed.uniform), p = k(r), V = p, _ = y(r.y, r.x).sub(U), M = a(6.283185307), O = _.div(M), f = V.mul(e.scale.uniform).add(O), d = v(C(f).sub(0.5)).mul(2), P = o(e.strokeWidth.uniform, e.strokeFalloff.uniform.mul(5e-3), 1), T = o(e.strokeFalloff.uniform, 0, 1).mul(p).oneMinus(), m = P.mul(T), u = n(f), h = w(a(4).sub(t(0.05, 0.4, e.strokeWidth.uniform.mul(2)).mul(t(0.05, 0.4, e.strokeWidth.uniform.oneMinus().mul(2))).mul(3)).mul(u), n(d), o(u, 0, 1)), z = t(m.sub(h).sub(e.softness.uniform), m.add(h).add(e.softness.uniform), d), b = I(e.colorA.uniform, e.colorB.uniform, z, e.colorSpace.uniform);
108
- return S(b.rgb, b.a);
109
- }
110
- };
111
- var H = R;
112
- export {
113
- R as n,
114
- H as t
115
- };
@@ -1,125 +0,0 @@
1
- import { O as te } from "./three.tsl-Btj1hLsf.js";
2
- import { t as ne } from "./time-DbRMw6Jm.js";
3
- import { o as V, r as oe } from "./transformations-CsrIJXh-.js";
4
- const se = {
5
- name: "Strands",
6
- category: "Base Layers",
7
- description: "Procedural wavy strands with layered animation",
8
- requiresRTT: !1,
9
- requiresChild: !1,
10
- acceptsUVContext: !0,
11
- props: {
12
- speed: {
13
- default: 0.5,
14
- description: "Overall animation speed",
15
- ui: {
16
- type: "range",
17
- min: 0,
18
- max: 1,
19
- step: 0.01,
20
- label: "Speed"
21
- }
22
- },
23
- amplitude: {
24
- default: 1,
25
- description: "Wave height amplitude",
26
- ui: {
27
- type: "range",
28
- min: 0,
29
- max: 5,
30
- step: 0.1,
31
- label: "Amplitude"
32
- }
33
- },
34
- frequency: {
35
- default: 1,
36
- description: "Wave frequency",
37
- ui: {
38
- type: "range",
39
- min: 0,
40
- max: 5,
41
- step: 0.01,
42
- label: "Frequency"
43
- }
44
- },
45
- lineCount: {
46
- default: 12,
47
- description: "Number of wave lines",
48
- ui: {
49
- type: "range",
50
- min: 4,
51
- max: 32,
52
- step: 1,
53
- label: "Line Count"
54
- }
55
- },
56
- lineWidth: {
57
- default: 0.1,
58
- description: "Width of wave lines",
59
- ui: {
60
- type: "range",
61
- min: 0.01,
62
- max: 0.5,
63
- step: 0.01,
64
- label: "Line Width"
65
- }
66
- },
67
- waveColor: {
68
- default: "#f1c907",
69
- transform: oe,
70
- description: "Color of the waves",
71
- ui: {
72
- type: "color",
73
- label: "Wave Color"
74
- }
75
- },
76
- pinEdges: {
77
- default: !0,
78
- description: "Pin waves at edges (fade effect)",
79
- ui: {
80
- type: "checkbox",
81
- label: "Pin Edges"
82
- }
83
- },
84
- start: {
85
- default: {
86
- x: 0,
87
- y: 0.5
88
- },
89
- transform: V,
90
- description: "Starting point of the waves",
91
- ui: {
92
- type: "position",
93
- label: "Start"
94
- }
95
- },
96
- end: {
97
- default: {
98
- x: 1,
99
- y: 0.5
100
- },
101
- transform: V,
102
- description: "Ending point of the waves",
103
- ui: {
104
- type: "position",
105
- label: "End"
106
- }
107
- }
108
- },
109
- fragmentNode: (p) => {
110
- const { uniforms: e, uvContext: z } = p, { vec2: i, vec4: a, cos: o, abs: M, smoothstep: d, mix: v, max: U, screenUV: A, viewportSize: y, float: t, Fn: g } = te, D = z ?? A, x = ne(p, e.speed), l = g(([n]) => o(n).add(o(n.mul(1.2).add(1.6))).add(o(n.mul(1.4).add(1.5))).div(3));
111
- return g(([n]) => {
112
- const u = y.x.div(y.y), h = i(e.start.uniform.x.mul(u), e.start.uniform.y.oneMinus()), _ = i(e.end.uniform.x.mul(u), e.end.uniform.y.oneMinus()), I = i(n.x.mul(u), n.y), b = _.sub(h), C = b.length(), m = b.div(C), N = i(m.y.negate(), m.x), w = I.sub(h), s = w.dot(m).div(C), O = w.dot(N), S = s.mul(10), R = O.mul(10), k = e.pinEdges.uniform.select(d(t(0), t(0.1), s).mul(d(t(1), t(0.9), s)), t(1)), c = e.pinEdges.uniform.select(o(s.mul(6.28)).mul(0.5).add(0.5).oneMinus(), t(1)), B = o(s.mul(6.28)).mul(0.5).add(0.5).oneMinus(), f = a(0, 0, 0, 0).toVar(), P = e.lineCount.uniform;
113
- for (let r = 0; r < 32; r++) {
114
- const j = t(r).lessThan(P), W = t(r), G = W.div(P), H = t(0.5), J = t(1.33), q = x.mul(J), E = W.add(S.mul(H)), F = l(E.add(q)).mul(0.5).add(0.5), L = v(t(0.01), e.lineWidth.uniform, F.mul(c)).mul(0.5), K = t(0.6), Q = t(2), X = l(E.add(q.mul(G.add(1)))).mul(v(K, Q, c)).mul(e.amplitude.uniform), Y = l(S.mul(e.frequency.uniform).add(x)).mul(c).mul(e.amplitude.uniform).add(X), Z = M(R.sub(Y)), T = t(0.01), $ = d(L.add(T), L.sub(T), Z), ee = a(e.waveColor.uniform.r, e.waveColor.uniform.g, e.waveColor.uniform.b, $).mul(F);
115
- f.assign(U(f, j.select(ee, a(0, 0, 0, 0))));
116
- }
117
- return f.mul(a(1, 1, 1, B.mul(k)));
118
- })(D);
119
- }
120
- };
121
- var de = se;
122
- export {
123
- se as n,
124
- de as t
125
- };
@@ -1,103 +0,0 @@
1
- import { O as S, a as U, g as C } from "./three.tsl-Btj1hLsf.js";
2
- import { t as F } from "./edges-CDzKsauJ.js";
3
- import { a as R, o as W } from "./transformations-CsrIJXh-.js";
4
- const _ = {
5
- name: "Stretch",
6
- category: "Distortions",
7
- description: "Stretch content towards a direction from 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: W,
17
- description: "The center point of the stretch effect",
18
- ui: {
19
- type: "position",
20
- label: "Center"
21
- }
22
- },
23
- strength: {
24
- default: 1,
25
- description: "The intensity of the stretch effect",
26
- ui: {
27
- type: "range",
28
- min: 0,
29
- max: 1,
30
- step: 0.01,
31
- label: "Strength"
32
- }
33
- },
34
- angle: {
35
- default: 0,
36
- description: "The direction of the stretch in degrees",
37
- ui: {
38
- type: "range",
39
- min: 0,
40
- max: 360,
41
- step: 1,
42
- label: "Angle"
43
- }
44
- },
45
- falloff: {
46
- default: 0,
47
- description: "Controls the sharpness of the transition (0 = sharp edge, 1 = gradual transition)",
48
- ui: {
49
- type: "range",
50
- min: 0,
51
- max: 1,
52
- step: 0.01,
53
- label: "Falloff"
54
- }
55
- },
56
- edges: {
57
- default: "stretch",
58
- description: "How to handle edges when distortion pushes content out of bounds",
59
- transform: R,
60
- ui: {
61
- type: "select",
62
- options: [
63
- {
64
- label: "Stretch",
65
- value: "stretch"
66
- },
67
- {
68
- label: "Transparent",
69
- value: "transparent"
70
- },
71
- {
72
- label: "Mirror",
73
- value: "mirror"
74
- },
75
- {
76
- label: "Wrap",
77
- value: "wrap"
78
- }
79
- ],
80
- label: "Edges"
81
- }
82
- }
83
- },
84
- uvTransformNode: ({ uv: t, uniforms: n, viewportSize: f }) => {
85
- const { vec2: e, float: o, sin: u, cos: p } = S, c = f.x.div(f.y), r = e(t.x.mul(c), t.y), m = e(n.center.uniform.x.mul(c), n.center.uniform.y.oneMinus()), h = r.sub(m), s = n.angle.uniform.mul(Math.PI / 180), a = e(p(s), u(s)), i = h.dot(a), g = h.sub(a.mul(i)), v = n.falloff.uniform, x = C(o(1e-3), o(75), v), l = U(i.div(x), o(0), o(1)), d = n.strength.uniform.mul(o(100)), b = o(1).add(d.mul(l)), T = i.div(b), V = a.mul(T).add(g), y = m.add(V);
86
- return e(y.x.div(c), y.y);
87
- },
88
- fragmentNode: ({ uniforms: t, childNode: n, onCleanup: f }) => {
89
- const { vec2: e, vec4: o, screenUV: u, viewportSize: p, convertToTexture: c, float: r, sin: m, cos: h } = S;
90
- if (!n) return o(0, 0, 0, 0);
91
- const s = c(n);
92
- f(() => {
93
- s?.renderTarget?.dispose && s.renderTarget.dispose();
94
- });
95
- const a = p.x.div(p.y), i = e(u.x.mul(a), u.y), g = e(t.center.uniform.x.mul(a), t.center.uniform.y.oneMinus()), v = i.sub(g), x = t.angle.uniform.mul(Math.PI / 180), l = e(h(x), m(x)), d = v.dot(l), b = l.mul(d), T = v.sub(b), V = t.falloff.uniform, y = C(r(1e-3), r(75), V), j = U(d.div(y), r(0), r(1)), w = t.strength.uniform.mul(r(100)), D = r(1).add(w.mul(j)), A = d.div(D), E = l.mul(A).add(T), M = g.add(E), P = e(M.x.div(a), M.y);
96
- return F(P, s.sample(P), s, t.edges.uniform);
97
- }
98
- };
99
- var I = _;
100
- export {
101
- _ as n,
102
- I as t
103
- };