shaders 2.5.94 → 2.5.96

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 (237) hide show
  1. package/dist/core/Blur-CXXttTb1.js +138 -0
  2. package/dist/core/{ChannelBlur-CCaPXjka.js → ChannelBlur-gzP71FWd.js} +37 -2
  3. package/dist/core/{Crescent-DPxGWdPH.js → Crescent-BkRt-XWy.js} +1 -1
  4. package/dist/core/{Cross-CDyzf8TT.js → Cross-kkY7feuC.js} +1 -1
  5. package/dist/core/{Crystal-DSuN8TNY.js → Crystal-xVyUhVD-.js} +1 -1
  6. package/dist/core/CursorRipples-Cgm7N0Bp.js +289 -0
  7. package/dist/core/CursorTrail-CCRbdwHJ.js +263 -0
  8. package/dist/core/{Ellipse-BNmzdnpK.js → Ellipse-CXxGqTYI.js} +1 -1
  9. package/dist/core/{Emboss-nrduRrVs.js → Emboss-ClQV27Mt.js} +1 -1
  10. package/dist/core/{Flower-B4xPp0Qa.js → Flower-MAwlZEv8.js} +1 -1
  11. package/dist/core/{Glass-CRfTkmRy.js → Glass-DDBKYclp.js} +46 -8
  12. package/dist/core/Glow-BwaPYDRZ.js +174 -0
  13. package/dist/core/GridDistortion-DtaRNrTZ.js +278 -0
  14. package/dist/core/Liquify-cE5dxrfh.js +351 -0
  15. package/dist/core/{Neon-CUKnkAK8.js → Neon-Dg8UfC7P.js} +1 -1
  16. package/dist/core/{Polygon-C1y6Nyh4.js → Polygon-DRCs3CYs.js} +1 -1
  17. package/dist/core/ProgressiveBlur-B8xwWyTM.js +236 -0
  18. package/dist/core/{Ring-Chj1tp_P.js → Ring-QApyKPzE.js} +1 -1
  19. package/dist/core/{RoundedRect-BEj6tE1e.js → RoundedRect-Ca9af9xe.js} +1 -1
  20. package/dist/core/{Shatter-CZMOHj60.js → Shatter-BssZTRYJ.js} +154 -66
  21. package/dist/core/{Star-fPw1j10r.js → Star-DiXwnPGP.js} +1 -1
  22. package/dist/core/TiltShift-CI3FlfYk.js +252 -0
  23. package/dist/core/{Trapezoid-Cr61vRvN.js → Trapezoid-BX_hmeZJ.js} +1 -1
  24. package/dist/core/{Vesica-AXTA8DJU.js → Vesica-DU0f85NG.js} +1 -1
  25. package/dist/core/{VideoTexture-BobyGZGr.js → VideoTexture-DJrkry82.js} +1 -1
  26. package/dist/core/{WebcamTexture-BXj7sqND.js → WebcamTexture-Cf8J7JB1.js} +1 -1
  27. package/dist/core/computeBlur-C3oX720H.js +141 -0
  28. package/dist/core/effects/glass.d.ts +1 -1
  29. package/dist/core/effects/glass.d.ts.map +1 -1
  30. package/dist/core/index.js +213 -128
  31. package/dist/core/registry.js +102 -101
  32. package/dist/core/renderer.d.ts +19 -1
  33. package/dist/core/renderer.d.ts.map +1 -1
  34. package/dist/core/shaderRegistry-B_84rvO8.js +244 -0
  35. package/dist/core/shaders/Blur/index.d.ts.map +1 -1
  36. package/dist/core/shaders/Blur/index.js +2 -1
  37. package/dist/core/shaders/BrightnessContrast/index.js +1 -1
  38. package/dist/core/shaders/Bulge/index.js +1 -1
  39. package/dist/core/shaders/CRTScreen/index.js +1 -1
  40. package/dist/core/shaders/ChannelBlur/index.d.ts.map +1 -1
  41. package/dist/core/shaders/ChannelBlur/index.js +2 -1
  42. package/dist/core/shaders/Checkerboard/index.js +1 -1
  43. package/dist/core/shaders/ChromaFlow/index.js +1 -1
  44. package/dist/core/shaders/ChromaticAberration/index.js +1 -1
  45. package/dist/core/shaders/Circle/index.js +1 -1
  46. package/dist/core/shaders/ConcentricSpin/index.js +1 -1
  47. package/dist/core/shaders/ConicGradient/index.js +1 -1
  48. package/dist/core/shaders/ContourLines/index.js +1 -1
  49. package/dist/core/shaders/Crescent/index.js +2 -2
  50. package/dist/core/shaders/Cross/index.js +2 -2
  51. package/dist/core/shaders/Crystal/index.js +2 -2
  52. package/dist/core/shaders/CursorRipples/index.d.ts.map +1 -1
  53. package/dist/core/shaders/CursorRipples/index.js +1 -1
  54. package/dist/core/shaders/CursorTrail/index.d.ts.map +1 -1
  55. package/dist/core/shaders/CursorTrail/index.js +1 -1
  56. package/dist/core/shaders/DOMTexture/index.js +1 -1
  57. package/dist/core/shaders/DiamondGradient/index.js +1 -1
  58. package/dist/core/shaders/DiffuseBlur/index.js +1 -1
  59. package/dist/core/shaders/Dither/index.js +1 -1
  60. package/dist/core/shaders/DotGrid/index.js +1 -1
  61. package/dist/core/shaders/DropShadow/index.js +1 -1
  62. package/dist/core/shaders/Duotone/index.js +1 -1
  63. package/dist/core/shaders/Ellipse/index.js +2 -2
  64. package/dist/core/shaders/Emboss/index.js +2 -2
  65. package/dist/core/shaders/FallingLines/index.js +1 -1
  66. package/dist/core/shaders/FilmGrain/index.js +1 -1
  67. package/dist/core/shaders/FloatingParticles/index.js +1 -1
  68. package/dist/core/shaders/FlowField/index.js +1 -1
  69. package/dist/core/shaders/Flower/index.js +2 -2
  70. package/dist/core/shaders/FlowingGradient/index.js +1 -1
  71. package/dist/core/shaders/Form3D/index.js +1 -1
  72. package/dist/core/shaders/Glass/index.d.ts.map +1 -1
  73. package/dist/core/shaders/Glass/index.js +3 -2
  74. package/dist/core/shaders/GlassTiles/index.js +1 -1
  75. package/dist/core/shaders/Glitch/index.js +1 -1
  76. package/dist/core/shaders/Glow/index.d.ts.map +1 -1
  77. package/dist/core/shaders/Glow/index.js +2 -1
  78. package/dist/core/shaders/Godrays/index.js +1 -1
  79. package/dist/core/shaders/Grayscale/index.js +1 -1
  80. package/dist/core/shaders/Grid/index.js +1 -1
  81. package/dist/core/shaders/GridDistortion/index.d.ts.map +1 -1
  82. package/dist/core/shaders/GridDistortion/index.js +1 -1
  83. package/dist/core/shaders/Group/index.js +1 -1
  84. package/dist/core/shaders/Halftone/index.js +1 -1
  85. package/dist/core/shaders/HexGrid/index.js +1 -1
  86. package/dist/core/shaders/HueShift/index.js +1 -1
  87. package/dist/core/shaders/ImageTexture/index.js +1 -1
  88. package/dist/core/shaders/Invert/index.js +1 -1
  89. package/dist/core/shaders/Kaleidoscope/index.js +1 -1
  90. package/dist/core/shaders/LensFlare/index.js +1 -1
  91. package/dist/core/shaders/LinearBlur/index.js +1 -1
  92. package/dist/core/shaders/LinearGradient/index.js +1 -1
  93. package/dist/core/shaders/Liquify/index.d.ts.map +1 -1
  94. package/dist/core/shaders/Liquify/index.js +1 -1
  95. package/dist/core/shaders/Mirror/index.js +1 -1
  96. package/dist/core/shaders/MultiPointGradient/index.js +1 -1
  97. package/dist/core/shaders/Neon/index.js +2 -2
  98. package/dist/core/shaders/Paper/index.js +1 -1
  99. package/dist/core/shaders/Perspective/index.js +1 -1
  100. package/dist/core/shaders/Pixelate/index.js +1 -1
  101. package/dist/core/shaders/Plasma/index.js +1 -1
  102. package/dist/core/shaders/PolarCoordinates/index.js +1 -1
  103. package/dist/core/shaders/Polygon/index.js +2 -2
  104. package/dist/core/shaders/Posterize/index.js +1 -1
  105. package/dist/core/shaders/ProgressiveBlur/index.d.ts.map +1 -1
  106. package/dist/core/shaders/ProgressiveBlur/index.js +2 -1
  107. package/dist/core/shaders/RadialGradient/index.js +1 -1
  108. package/dist/core/shaders/RectangularCoordinates/index.js +1 -1
  109. package/dist/core/shaders/Ring/index.js +2 -2
  110. package/dist/core/shaders/Ripples/index.js +1 -1
  111. package/dist/core/shaders/RoundedRect/index.js +2 -2
  112. package/dist/core/shaders/Saturation/index.js +1 -1
  113. package/dist/core/shaders/Sharpness/index.js +1 -1
  114. package/dist/core/shaders/Shatter/index.d.ts.map +1 -1
  115. package/dist/core/shaders/Shatter/index.js +1 -1
  116. package/dist/core/shaders/SimplexNoise/index.js +1 -1
  117. package/dist/core/shaders/SineWave/index.js +1 -1
  118. package/dist/core/shaders/Solarize/index.js +1 -1
  119. package/dist/core/shaders/SolidColor/index.js +1 -1
  120. package/dist/core/shaders/Spherize/index.js +1 -1
  121. package/dist/core/shaders/Spiral/index.js +1 -1
  122. package/dist/core/shaders/Star/index.js +2 -2
  123. package/dist/core/shaders/Strands/index.js +1 -1
  124. package/dist/core/shaders/Stretch/index.js +1 -1
  125. package/dist/core/shaders/Stripes/index.js +1 -1
  126. package/dist/core/shaders/StudioBackground/index.js +1 -1
  127. package/dist/core/shaders/Swirl/index.js +1 -1
  128. package/dist/core/shaders/TiltShift/index.d.ts.map +1 -1
  129. package/dist/core/shaders/TiltShift/index.js +2 -1
  130. package/dist/core/shaders/Tint/index.js +1 -1
  131. package/dist/core/shaders/Trapezoid/index.js +2 -2
  132. package/dist/core/shaders/Tritone/index.js +1 -1
  133. package/dist/core/shaders/Truchet/index.js +1 -1
  134. package/dist/core/shaders/Twirl/index.js +1 -1
  135. package/dist/core/shaders/Vesica/index.js +2 -2
  136. package/dist/core/shaders/Vibrance/index.js +1 -1
  137. package/dist/core/shaders/VideoTexture/index.js +2 -2
  138. package/dist/core/shaders/Vignette/index.js +1 -1
  139. package/dist/core/shaders/Voronoi/index.js +1 -1
  140. package/dist/core/shaders/WaveDistortion/index.js +1 -1
  141. package/dist/core/shaders/Weave/index.js +1 -1
  142. package/dist/core/shaders/WebcamTexture/index.js +2 -2
  143. package/dist/core/shaders/ZoomBlur/index.js +1 -1
  144. package/dist/core/types.d.ts +49 -0
  145. package/dist/core/types.d.ts.map +1 -1
  146. package/dist/core/utilities/computeBlur.d.ts +50 -0
  147. package/dist/core/utilities/computeBlur.d.ts.map +1 -0
  148. package/dist/js/createShader.js +1 -1
  149. package/dist/react/Shader.js +1 -1
  150. package/dist/registry.js +2 -2
  151. package/dist/solid/engine/Shader.js +1 -1
  152. package/dist/svelte/index.js +1 -1
  153. package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
  154. package/package.json +1 -1
  155. package/dist/core/Blur-DTyNQt1R.js +0 -78
  156. package/dist/core/CursorRipples-Bo-3LZoC.js +0 -186
  157. package/dist/core/CursorTrail-C-0lpOV1.js +0 -160
  158. package/dist/core/Glow-CKWIRcBt.js +0 -108
  159. package/dist/core/GridDistortion-DXM5MgSc.js +0 -183
  160. package/dist/core/Liquify-CqcAWBwZ.js +0 -228
  161. package/dist/core/ProgressiveBlur-BcHBSVDo.js +0 -128
  162. package/dist/core/TiltShift-BysRsV8v.js +0 -141
  163. package/dist/core/shaderRegistry-BzOzMO4V.js +0 -244
  164. /package/dist/core/{BrightnessContrast-BoR9bi58.js → BrightnessContrast-CJTOpQCn.js} +0 -0
  165. /package/dist/core/{Bulge-DN2R75Hp.js → Bulge-Chpbxxzj.js} +0 -0
  166. /package/dist/core/{CRTScreen-DolQEkb1.js → CRTScreen-CTwXU-NX.js} +0 -0
  167. /package/dist/core/{Checkerboard-_IUtUrDv.js → Checkerboard-ucave4-a.js} +0 -0
  168. /package/dist/core/{ChromaFlow-Cq6hDVjX.js → ChromaFlow-BZXyVHtK.js} +0 -0
  169. /package/dist/core/{ChromaticAberration-G8_bwQtD.js → ChromaticAberration-DsMj-vBw.js} +0 -0
  170. /package/dist/core/{Circle--0oHzoCi.js → Circle-QgCuVo44.js} +0 -0
  171. /package/dist/core/{ConcentricSpin-BzxzMieZ.js → ConcentricSpin-Crfxti93.js} +0 -0
  172. /package/dist/core/{ConicGradient-BXXizzIs.js → ConicGradient-CQAPYlQg.js} +0 -0
  173. /package/dist/core/{ContourLines-C0XSJEkE.js → ContourLines-KTHC32hd.js} +0 -0
  174. /package/dist/core/{DOMTexture-Dw3Qakny.js → DOMTexture-D-RkeyMs.js} +0 -0
  175. /package/dist/core/{DiamondGradient-TsOxHjg_.js → DiamondGradient-BC3ugP8a.js} +0 -0
  176. /package/dist/core/{DiffuseBlur-BqIV4JLM.js → DiffuseBlur-eyM1v3ad.js} +0 -0
  177. /package/dist/core/{Dither-D_YF6z03.js → Dither-CDfDotR6.js} +0 -0
  178. /package/dist/core/{DotGrid-CiDt4NmI.js → DotGrid-T9YbgC3V.js} +0 -0
  179. /package/dist/core/{DropShadow-BRoXryDA.js → DropShadow-jMhnYPXZ.js} +0 -0
  180. /package/dist/core/{Duotone-CGHcHB9f.js → Duotone-Bl02WcA2.js} +0 -0
  181. /package/dist/core/{FallingLines-vdw8KxhV.js → FallingLines-CArEXajJ.js} +0 -0
  182. /package/dist/core/{FilmGrain-BqQeKO6Z.js → FilmGrain-Ph73aoC_.js} +0 -0
  183. /package/dist/core/{FloatingParticles-DR5cv6Eh.js → FloatingParticles-BtwGRl_d.js} +0 -0
  184. /package/dist/core/{FlowField-DpP32B1X.js → FlowField-RyqiRxyI.js} +0 -0
  185. /package/dist/core/{FlowingGradient-lSouJxmq.js → FlowingGradient-C0Zoyfd6.js} +0 -0
  186. /package/dist/core/{Form3D-DQD-0zrd.js → Form3D-rKpxb9t3.js} +0 -0
  187. /package/dist/core/{GlassTiles-B7aAvcTQ.js → GlassTiles-k1C4a4u8.js} +0 -0
  188. /package/dist/core/{Glitch-CgmgjLea.js → Glitch-DzPMkBu4.js} +0 -0
  189. /package/dist/core/{Godrays-o-3Im6H1.js → Godrays-DAYmq-BP.js} +0 -0
  190. /package/dist/core/{Grayscale-Bip62olI.js → Grayscale-lYKBBkGY.js} +0 -0
  191. /package/dist/core/{Grid-hwQnF_hs.js → Grid-BJ-nxN3i.js} +0 -0
  192. /package/dist/core/{Group-BexPm4Fb.js → Group-DpozigtX.js} +0 -0
  193. /package/dist/core/{Halftone-onLYU4dF.js → Halftone-BVL2oy37.js} +0 -0
  194. /package/dist/core/{HexGrid-BkqEEgfh.js → HexGrid-D-EmQ4kI.js} +0 -0
  195. /package/dist/core/{HueShift-BldS-av9.js → HueShift-D9K0ynaS.js} +0 -0
  196. /package/dist/core/{ImageTexture-DLCjc5cM.js → ImageTexture-CArkZMfh.js} +0 -0
  197. /package/dist/core/{Invert-C2LI5GXr.js → Invert-DCnwo_Xq.js} +0 -0
  198. /package/dist/core/{Kaleidoscope-CxWjs5jx.js → Kaleidoscope-BytHro3k.js} +0 -0
  199. /package/dist/core/{LensFlare-BNO7tCXH.js → LensFlare-B0vv4x97.js} +0 -0
  200. /package/dist/core/{LinearBlur-Ds6rm8u-.js → LinearBlur-BFewxPjV.js} +0 -0
  201. /package/dist/core/{LinearGradient-BZjDhnZp.js → LinearGradient-BKUf_u7r.js} +0 -0
  202. /package/dist/core/{Mirror-5W3sul9v.js → Mirror-DIle92J8.js} +0 -0
  203. /package/dist/core/{MultiPointGradient-lpUGnrLq.js → MultiPointGradient-DDwac_mm.js} +0 -0
  204. /package/dist/core/{Paper-14yYPnWW.js → Paper-bMSMCeYK.js} +0 -0
  205. /package/dist/core/{Perspective-POVbIGPc.js → Perspective-BmfvQV6W.js} +0 -0
  206. /package/dist/core/{Pixelate-CxUxBDeN.js → Pixelate-Dl26r6IT.js} +0 -0
  207. /package/dist/core/{Plasma-DM9TU0VN.js → Plasma-CJWS1TvX.js} +0 -0
  208. /package/dist/core/{PolarCoordinates-t4Wa00gQ.js → PolarCoordinates-lq6K4WBm.js} +0 -0
  209. /package/dist/core/{Posterize-Dk4DE8Ee.js → Posterize-BjH7Zscm.js} +0 -0
  210. /package/dist/core/{RadialGradient-CSXQIa5L.js → RadialGradient-DiGFPgrn.js} +0 -0
  211. /package/dist/core/{RectangularCoordinates-YaZ_uRXb.js → RectangularCoordinates-COkNDxi0.js} +0 -0
  212. /package/dist/core/{Ripples-wJx2FwJY.js → Ripples-C8Q17Hvz.js} +0 -0
  213. /package/dist/core/{Saturation-B500nPZH.js → Saturation-CgDaiq6n.js} +0 -0
  214. /package/dist/core/{Sharpness-NqY4_gKZ.js → Sharpness-CRXT0D30.js} +0 -0
  215. /package/dist/core/{SimplexNoise-2-J7EbY9.js → SimplexNoise-KfTCAfpL.js} +0 -0
  216. /package/dist/core/{SineWave-OWJVWsI1.js → SineWave-Ckeap_YM.js} +0 -0
  217. /package/dist/core/{Solarize-CEhQxL9Z.js → Solarize-DhtQYYpW.js} +0 -0
  218. /package/dist/core/{SolidColor-Dlzm61ZG.js → SolidColor-6yUkGybH.js} +0 -0
  219. /package/dist/core/{Spherize-CXf4_Mkm.js → Spherize-8LXrGGG_.js} +0 -0
  220. /package/dist/core/{Spiral-CSXNX92f.js → Spiral-Bs7uZrBr.js} +0 -0
  221. /package/dist/core/{Strands-BPVy1zbt.js → Strands-DsAAVemq.js} +0 -0
  222. /package/dist/core/{Stretch-CFAjfvny.js → Stretch-D7P2R5lV.js} +0 -0
  223. /package/dist/core/{Stripes-BSGzno-I.js → Stripes-DF8agIiJ.js} +0 -0
  224. /package/dist/core/{StudioBackground-81AihXcZ.js → StudioBackground-BFeNfwEu.js} +0 -0
  225. /package/dist/core/{Swirl-D_ZvZtDS.js → Swirl-BwezrSAA.js} +0 -0
  226. /package/dist/core/{Tint-C6xN-Qot.js → Tint-BdXlqlzz.js} +0 -0
  227. /package/dist/core/{Tritone-Dk8GcpYo.js → Tritone-BlJ7cchN.js} +0 -0
  228. /package/dist/core/{Truchet-BFd2XYD3.js → Truchet-Bnn0fwbF.js} +0 -0
  229. /package/dist/core/{Twirl-CA0r8U7e.js → Twirl-C5ijhqz1.js} +0 -0
  230. /package/dist/core/{Vibrance-Dq1jBFJb.js → Vibrance-dqIV6GBe.js} +0 -0
  231. /package/dist/core/{Vignette-DB8x78Up.js → Vignette-DB1wO1dm.js} +0 -0
  232. /package/dist/core/{Voronoi-ALXxxHBo.js → Voronoi-C3WIJFWc.js} +0 -0
  233. /package/dist/core/{WaveDistortion-CHb75HO3.js → WaveDistortion-BKma8-Ju.js} +0 -0
  234. /package/dist/core/{Weave-j4CrCig4.js → Weave-xuu_vQ5e.js} +0 -0
  235. /package/dist/core/{ZoomBlur-Cl75kL8E.js → ZoomBlur-UcS2iFT2.js} +0 -0
  236. /package/dist/core/{browser-DIoaEnIX.js → browser-ClWxLlIB.js} +0 -0
  237. /package/dist/core/{sdf-Bux00UoZ.js → sdf-DyC2H_qS.js} +0 -0
@@ -1,4 +1,5 @@
1
1
  import "../../transformations-B5lM6fYX.js";
2
2
  import "../../alpha-C4ptedXe.js";
3
- import { n as componentDefinition, t as TiltShift_default } from "../../TiltShift-BysRsV8v.js";
3
+ import "../../computeBlur-C3oX720H.js";
4
+ import { n as componentDefinition, t as TiltShift_default } from "../../TiltShift-CI3FlfYk.js";
4
5
  export { componentDefinition, TiltShift_default as default };
@@ -1,3 +1,3 @@
1
1
  import "../../transformations-B5lM6fYX.js";
2
- import { n as componentDefinition, t as Tint_default } from "../../Tint-C6xN-Qot.js";
2
+ import { n as componentDefinition, t as Tint_default } from "../../Tint-BdXlqlzz.js";
3
3
  export { componentDefinition, Tint_default as default };
@@ -1,5 +1,5 @@
1
1
  import "../../transformations-B5lM6fYX.js";
2
2
  import "../../colorMixing-BPpDnR5I.js";
3
- import "../../sdf-Bux00UoZ.js";
4
- import { n as componentDefinition, t as Trapezoid_default } from "../../Trapezoid-Cr61vRvN.js";
3
+ import "../../sdf-DyC2H_qS.js";
4
+ import { n as componentDefinition, t as Trapezoid_default } from "../../Trapezoid-BX_hmeZJ.js";
5
5
  export { componentDefinition, Trapezoid_default as default };
@@ -1,5 +1,5 @@
1
1
  import "../../transformations-B5lM6fYX.js";
2
2
  import "../../alpha-C4ptedXe.js";
3
3
  import "../../colorMixing-BPpDnR5I.js";
4
- import { n as componentDefinition, t as Tritone_default } from "../../Tritone-Dk8GcpYo.js";
4
+ import { n as componentDefinition, t as Tritone_default } from "../../Tritone-BlJ7cchN.js";
5
5
  export { componentDefinition, Tritone_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../transformations-B5lM6fYX.js";
2
2
  import "../../colorMixing-BPpDnR5I.js";
3
- import { n as componentDefinition, t as Truchet_default } from "../../Truchet-BFd2XYD3.js";
3
+ import { n as componentDefinition, t as Truchet_default } from "../../Truchet-Bnn0fwbF.js";
4
4
  export { componentDefinition, Truchet_default as default };
@@ -1,5 +1,5 @@
1
1
  import "../../edges-CfGcQniB.js";
2
2
  import "../../transformations-B5lM6fYX.js";
3
3
  import "../../alpha-C4ptedXe.js";
4
- import { n as componentDefinition, t as Twirl_default } from "../../Twirl-CA0r8U7e.js";
4
+ import { n as componentDefinition, t as Twirl_default } from "../../Twirl-C5ijhqz1.js";
5
5
  export { componentDefinition, Twirl_default as default };
@@ -1,5 +1,5 @@
1
1
  import "../../transformations-B5lM6fYX.js";
2
2
  import "../../colorMixing-BPpDnR5I.js";
3
- import "../../sdf-Bux00UoZ.js";
4
- import { n as componentDefinition, t as Vesica_default } from "../../Vesica-AXTA8DJU.js";
3
+ import "../../sdf-DyC2H_qS.js";
4
+ import { n as componentDefinition, t as Vesica_default } from "../../Vesica-DU0f85NG.js";
5
5
  export { componentDefinition, Vesica_default as default };
@@ -1,2 +1,2 @@
1
- import { n as componentDefinition, t as Vibrance_default } from "../../Vibrance-Dq1jBFJb.js";
1
+ import { n as componentDefinition, t as Vibrance_default } from "../../Vibrance-dqIV6GBe.js";
2
2
  export { componentDefinition, Vibrance_default as default };
@@ -1,3 +1,3 @@
1
- import "../../browser-DIoaEnIX.js";
2
- import { n as componentDefinition, t as VideoTexture_default } from "../../VideoTexture-BobyGZGr.js";
1
+ import "../../browser-ClWxLlIB.js";
2
+ import { n as componentDefinition, t as VideoTexture_default } from "../../VideoTexture-DJrkry82.js";
3
3
  export { componentDefinition, VideoTexture_default as default };
@@ -1,3 +1,3 @@
1
1
  import "../../transformations-B5lM6fYX.js";
2
- import { n as componentDefinition, t as Vignette_default } from "../../Vignette-DB8x78Up.js";
2
+ import { n as componentDefinition, t as Vignette_default } from "../../Vignette-DB1wO1dm.js";
3
3
  export { componentDefinition, Vignette_default as default };
@@ -1,5 +1,5 @@
1
1
  import "../../transformations-B5lM6fYX.js";
2
2
  import "../../colorMixing-BPpDnR5I.js";
3
3
  import "../../time-DUqSFWvT.js";
4
- import { n as componentDefinition, t as Voronoi_default } from "../../Voronoi-ALXxxHBo.js";
4
+ import { n as componentDefinition, t as Voronoi_default } from "../../Voronoi-C3WIJFWc.js";
5
5
  export { componentDefinition, Voronoi_default as default };
@@ -2,5 +2,5 @@ import "../../edges-CfGcQniB.js";
2
2
  import "../../transformations-B5lM6fYX.js";
3
3
  import "../../alpha-C4ptedXe.js";
4
4
  import "../../time-DUqSFWvT.js";
5
- import { n as componentDefinition, t as WaveDistortion_default } from "../../WaveDistortion-CHb75HO3.js";
5
+ import { n as componentDefinition, t as WaveDistortion_default } from "../../WaveDistortion-BKma8-Ju.js";
6
6
  export { componentDefinition, WaveDistortion_default as default };
@@ -1,3 +1,3 @@
1
1
  import "../../transformations-B5lM6fYX.js";
2
- import { n as componentDefinition, t as Weave_default } from "../../Weave-j4CrCig4.js";
2
+ import { n as componentDefinition, t as Weave_default } from "../../Weave-xuu_vQ5e.js";
3
3
  export { componentDefinition, Weave_default as default };
@@ -1,3 +1,3 @@
1
- import "../../browser-DIoaEnIX.js";
2
- import { n as componentDefinition, t as WebcamTexture_default } from "../../WebcamTexture-BXj7sqND.js";
1
+ import "../../browser-ClWxLlIB.js";
2
+ import { n as componentDefinition, t as WebcamTexture_default } from "../../WebcamTexture-Cf8J7JB1.js";
3
3
  export { componentDefinition, WebcamTexture_default as default };
@@ -1,4 +1,4 @@
1
1
  import "../../transformations-B5lM6fYX.js";
2
2
  import "../../alpha-C4ptedXe.js";
3
- import { n as componentDefinition, t as ZoomBlur_default } from "../../ZoomBlur-Cl75kL8E.js";
3
+ import { n as componentDefinition, t as ZoomBlur_default } from "../../ZoomBlur-UcS2iFT2.js";
4
4
  export { componentDefinition, ZoomBlur_default as default };
@@ -9,6 +9,26 @@ export interface UniformDefinition {
9
9
  compileTime?: boolean;
10
10
  compileTimeWhen?: (previousValue: any, newValue: any) => boolean;
11
11
  _lastCompiledValue?: any;
12
+ /**
13
+ * Present when a driver resolves to a GPU-side TSL expression (e.g. mouse driver).
14
+ * Returns the current CPU-side scalar value so compute shaders can read it without
15
+ * needing to evaluate the GPU expression. Updated every frame via driver state.
16
+ */
17
+ getCpuValue?: () => number;
18
+ /**
19
+ * Present when a prop-map driver is active. Gives compute shaders access to the
20
+ * source texture and remapping uniforms so they can sample per-pixel values via
21
+ * textureLoad rather than relying on the fragment-only screenUV.
22
+ */
23
+ mapComputeInfo?: {
24
+ sourceTexture: any;
25
+ channel: MapChannel;
26
+ inputMin: any;
27
+ inputMax: any;
28
+ outputMin: any;
29
+ outputMax: any;
30
+ curve: any;
31
+ };
12
32
  }
13
33
  /**
14
34
  * Defines types of masks that can be applied to components
@@ -448,6 +468,25 @@ export interface FragmentNodeParams {
448
468
  * The element's direct children are available for copyElementImageToTexture.
449
469
  */
450
470
  domCanvas?: HTMLCanvasElement;
471
+ /**
472
+ * Outputs from the compute shader pass, if this component defines a computeNode
473
+ * and the renderer is running in WebGPU mode. Undefined when WebGL fallback is active.
474
+ */
475
+ computeOutputs?: Record<string, any>;
476
+ }
477
+ /**
478
+ * Return value from a component's computeNode function.
479
+ */
480
+ export interface ComputeNodeResult {
481
+ /**
482
+ * Textures or buffers produced by the compute pass, passed to fragmentNode via computeOutputs.
483
+ */
484
+ outputs: Record<string, any>;
485
+ /**
486
+ * Called each frame before compute dispatch. Should update uniforms and return
487
+ * the list of compute nodes to dispatch this frame, or null to skip.
488
+ */
489
+ getComputeNodes: (params: RenderCallbackParams) => any[] | null;
451
490
  }
452
491
  /**
453
492
  * The definition of a component within the Shader library.
@@ -509,6 +548,16 @@ export interface ComponentDefinition<T extends ComponentProps = ComponentProps>
509
548
  * A function that returns the Three TSL fragment node for this component.
510
549
  */
511
550
  fragmentNode: (params: FragmentNodeParams) => Node;
551
+ /**
552
+ * Optional GPU compute pass. Called once at composition time when the renderer
553
+ * is running in WebGPU mode. Returns compute nodes to dispatch each frame and
554
+ * output textures/buffers that are forwarded to fragmentNode via computeOutputs.
555
+ *
556
+ * When the renderer falls back to WebGL, this function is never called and
557
+ * computeOutputs will be undefined — the fragmentNode should implement a CPU
558
+ * fallback for that path.
559
+ */
560
+ computeNode?: (params: FragmentNodeParams) => ComputeNodeResult | null;
512
561
  /**
513
562
  * Optional function returning per-prop custom sample UVs for prop maps.
514
563
  * Shaders with cell-based patterns (e.g. DotGrid, Grid) should implement this
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;OAIG;IACH,YAAY,CAAC,EAAE;QACX,sEAAsE;QACtE,OAAO,EAAE,MAAM,CAAA;QACf,2FAA2F;QAC3F,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,mDAAmD;QACnD,QAAQ,CAAC,EAAE;YACP,GAAG,EAAE,MAAM,CAAA;YACX,KAAK,EAAE,MAAM,CAAA;SAChB,CAAA;KACJ,CAAA;IAED;;OAEG;IACH,KAAK,EAAE;SACF,CAAC,IAAI,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACnC,CAAA;IAED;;OAEG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAElD;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,iBAAiB,GAAG,IAAI,CAAA;IAEtE;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAChE"}
@@ -0,0 +1,50 @@
1
+ import { StorageTexture } from 'three/webgpu';
2
+
3
+ export interface GaussianBlurComputeResult {
4
+ /** Horizontal + vertical compute nodes, dispatched in order each frame */
5
+ computeNodes: any[];
6
+ /** Final blurred StorageTexture — sample this in the fragment shader */
7
+ outputTexture: InstanceType<typeof StorageTexture>;
8
+ /** Call each frame to update the blur sigma from the current prop value (in pixels). */
9
+ updateRadius: (pixelRadius: number) => void;
10
+ }
11
+ export interface VariableBlurComputeResult {
12
+ /** Blur map fill + horizontal + vertical compute nodes */
13
+ computeNodes: any[];
14
+ /** Final blurred StorageTexture */
15
+ outputTexture: InstanceType<typeof StorageTexture>;
16
+ /** StorageTexture to write per-pixel blur radii into (R channel = radius in pixels) */
17
+ blurMapTexture: InstanceType<typeof StorageTexture>;
18
+ /** Write-only TSL node for the blur map — use with textureStore in your fill kernel */
19
+ blurMapWriteNode: any;
20
+ }
21
+ /**
22
+ * Create a 2-pass separable Gaussian blur backed by compute shaders.
23
+ *
24
+ * Uses textureLoad (not textureSample) for compute-shader-compatible reads.
25
+ * Integer pixel coordinates avoid the need for a sampler binding.
26
+ *
27
+ * @param inputTexture - TSL texture node to blur (e.g. from convertToTexture)
28
+ * @param width - Render width in pixels
29
+ * @param height - Render height in pixels
30
+ * @param onCleanup - Cleanup callback registration
31
+ */
32
+ export declare function createGaussianBlurCompute(inputTexture: any, width: number, height: number, onCleanup: (cb: () => void) => void): GaussianBlurComputeResult;
33
+ /**
34
+ * Create a 2-pass separable Gaussian blur with per-pixel variable radius.
35
+ *
36
+ * The caller provides a blur map StorageTexture (R channel = blur radius in pixels).
37
+ * A fill compute pass to write the blur map is the caller's responsibility — use the
38
+ * returned `blurMapWriteNode` with textureStore in your own Fn().
39
+ *
40
+ * The Gaussian weights are fixed (bell-curve shape); only the spatial extent varies
41
+ * per pixel. At radius=0 all taps land on the center texel (sharp); at large radius
42
+ * taps spread proportionally.
43
+ *
44
+ * @param inputTexture - TSL texture node to blur
45
+ * @param width - Physical pixel width
46
+ * @param height - Physical pixel height
47
+ * @param onCleanup - Cleanup callback registration
48
+ */
49
+ export declare function createVariableGaussianBlurCompute(inputTexture: any, width: number, height: number, onCleanup: (cb: () => void) => void): VariableBlurComputeResult;
50
+ //# sourceMappingURL=computeBlur.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computeBlur.d.ts","sourceRoot":"","sources":["../../src/utilities/computeBlur.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAC,cAAc,EAAC,MAAM,cAAc,CAAA;AAyB3C,MAAM,WAAW,yBAAyB;IACtC,0EAA0E;IAC1E,YAAY,EAAE,GAAG,EAAE,CAAA;IACnB,wEAAwE;IACxE,aAAa,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAA;IAClD,wFAAwF;IACxF,YAAY,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9C;AAED,MAAM,WAAW,yBAAyB;IACtC,0DAA0D;IAC1D,YAAY,EAAE,GAAG,EAAE,CAAA;IACnB,mCAAmC;IACnC,aAAa,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAA;IAClD,uFAAuF;IACvF,cAAc,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAA;IACnD,uFAAuF;IACvF,gBAAgB,EAAE,GAAG,CAAA;CACxB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACrC,YAAY,EAAE,GAAG,EACjB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,GACpC,yBAAyB,CAmG3B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iCAAiC,CAC7C,YAAY,EAAE,GAAG,EACjB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,GACpC,yBAAyB,CAqF3B"}
@@ -41,7 +41,7 @@ async function createShader(canvas, preset, options) {
41
41
  if (isExternalUser()) {
42
42
  const checkRendering = () => {
43
43
  if (renderer.getPerformanceStats().fps > 0) {
44
- telemetryCollector = startTelemetry(renderer, "2.5.94", options?.disableTelemetry || false, false);
44
+ telemetryCollector = startTelemetry(renderer, "2.5.96", options?.disableTelemetry || false, false);
45
45
  if (telemetryCollector) telemetryCollector.start();
46
46
  telemetryStartTimeout = null;
47
47
  } else telemetryStartTimeout = setTimeout(checkRendering, 500);
@@ -89,7 +89,7 @@ const Shader = ({ children, disableTelemetry = false, colorSpace = "p3-linear",
89
89
  return;
90
90
  }
91
91
  if (rendererRef.current.getPerformanceStats().fps > 0) {
92
- telemetryCollectorRef.current = startTelemetry(rendererRef.current, "2.5.94", disableTelemetry, isPreview);
92
+ telemetryCollectorRef.current = startTelemetry(rendererRef.current, "2.5.96", disableTelemetry, isPreview);
93
93
  if (telemetryCollectorRef.current) telemetryCollectorRef.current.start();
94
94
  telemetryStartTimeoutRef.current = null;
95
95
  } else telemetryStartTimeoutRef.current = window.setTimeout(checkRendering, 500);
package/dist/registry.js CHANGED
@@ -1512,7 +1512,7 @@ export const shaderRegistry = [
1512
1512
  "map"
1513
1513
  ],
1514
1514
  "min": 0,
1515
- "max": 100,
1515
+ "max": 200,
1516
1516
  "step": 1,
1517
1517
  "label": "Intensity",
1518
1518
  "group": "Effect"
@@ -1528,7 +1528,7 @@ export const shaderRegistry = [
1528
1528
  "map"
1529
1529
  ],
1530
1530
  "min": 0,
1531
- "max": 100,
1531
+ "max": 200,
1532
1532
  "step": 1,
1533
1533
  "label": "Intensity",
1534
1534
  "group": "Effect"
@@ -67,7 +67,7 @@ function Shader(allProps) {
67
67
  const checkRendering = () => {
68
68
  const stats = rendererInstance.getPerformanceStats();
69
69
  if (stats.fps > 0) {
70
- const version = "2.5.94";
70
+ const version = "2.5.96";
71
71
  telemetryCollector = startTelemetry(rendererInstance, version, props.disableTelemetry, props.isPreview);
72
72
  if (telemetryCollector) {
73
73
  telemetryCollector.start();
@@ -20546,7 +20546,7 @@ function Shader($$anchor, $$props) {
20546
20546
  const checkRendering = () => {
20547
20547
  if (!rendererInstance) return;
20548
20548
  if (rendererInstance.getPerformanceStats().fps > 0) {
20549
- telemetryCollector = startTelemetry(rendererInstance, "2.5.94", disableTelemetry(), isPreview());
20549
+ telemetryCollector = startTelemetry(rendererInstance, "2.5.96", disableTelemetry(), isPreview());
20550
20550
  if (telemetryCollector) telemetryCollector.start();
20551
20551
  telemetryStartTimeout = null;
20552
20552
  } else telemetryStartTimeout = window.setTimeout(checkRendering, 500);
@@ -60,7 +60,7 @@ var Shader_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineC
60
60
  const startTelemetryWhenReady = () => {
61
61
  const checkRendering = () => {
62
62
  if (rendererInstance.value.getPerformanceStats().fps > 0) {
63
- telemetryCollector = startTelemetry(rendererInstance.value, "2.5.94", props.disableTelemetry, props.isPreview);
63
+ telemetryCollector = startTelemetry(rendererInstance.value, "2.5.96", props.disableTelemetry, props.isPreview);
64
64
  if (telemetryCollector) telemetryCollector.start();
65
65
  telemetryStartTimeout = null;
66
66
  } else telemetryStartTimeout = setTimeout(checkRendering, 500);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shaders",
3
- "version": "2.5.94",
3
+ "version": "2.5.96",
4
4
  "description": "Shader magic for modern frontends",
5
5
  "author": "Shader Effects Inc.",
6
6
  "homepage": "https://shaders.com/",
@@ -1,78 +0,0 @@
1
- import { t as unpremultiplyAlpha } from "./alpha-C4ptedXe.js";
2
- import { Fn, convertToTexture, float, screenUV, vec2, vec4, viewportSize } from "three/tsl";
3
- const componentDefinition = {
4
- name: "Blur",
5
- category: "Blurs",
6
- description: "A simple Gaussian blur effect",
7
- requiresRTT: true,
8
- requiresChild: true,
9
- props: { intensity: {
10
- default: 50,
11
- description: "Intensity of the blur effect",
12
- ui: {
13
- type: ["range", "map"],
14
- min: 0,
15
- max: 100,
16
- step: 1,
17
- label: "Intensity",
18
- group: "Effect"
19
- }
20
- } },
21
- fragmentNode: ({ uniforms, childNode, onCleanup }) => {
22
- if (!childNode) return vec4(0, 0, 0, 0);
23
- const childTexture = convertToTexture(childNode);
24
- onCleanup(() => {
25
- if (childTexture?.renderTarget?.dispose) childTexture.renderTarget.dispose();
26
- });
27
- const weights = [
28
- .056,
29
- .135,
30
- .278,
31
- .487,
32
- .726,
33
- .923,
34
- 1,
35
- .923,
36
- .726,
37
- .487,
38
- .278,
39
- .135,
40
- .056
41
- ];
42
- const weightSum = 6.214;
43
- const scaledIntensity = uniforms.intensity.uniform.mul(.06);
44
- const horizontalTexture = convertToTexture(Fn(() => {
45
- const uv$1 = screenUV;
46
- const blurRadius = scaledIntensity;
47
- const pixelSize = vec2(1).div(viewportSize);
48
- const total = vec4(0).toVar();
49
- for (let x = -6; x <= 6; x++) {
50
- const weight = float(weights[x + 6] / weightSum);
51
- const offset = vec2(float(x), float(0)).mul(blurRadius).mul(pixelSize);
52
- const sampleCoord = uv$1.add(offset);
53
- const sample = childTexture.sample(sampleCoord).mul(weight);
54
- total.assign(total.add(sample));
55
- }
56
- return total;
57
- })());
58
- onCleanup(() => {
59
- if (horizontalTexture?.renderTarget?.dispose) horizontalTexture.renderTarget.dispose();
60
- });
61
- return Fn(() => {
62
- const uv$1 = screenUV;
63
- const blurRadius = scaledIntensity;
64
- const pixelSize = vec2(1).div(viewportSize);
65
- const total = vec4(0).toVar();
66
- for (let y = -6; y <= 6; y++) {
67
- const weight = float(weights[y + 6] / weightSum);
68
- const offset = vec2(float(0), float(y)).mul(blurRadius).mul(pixelSize);
69
- const sampleCoord = uv$1.add(offset);
70
- const sample = horizontalTexture.sample(sampleCoord).mul(weight);
71
- total.assign(total.add(sample));
72
- }
73
- return unpremultiplyAlpha(total);
74
- })();
75
- }
76
- };
77
- var Blur_default = componentDefinition;
78
- export { componentDefinition as n, Blur_default as t };
@@ -1,186 +0,0 @@
1
- import { t as applyEdgeHandling } from "./edges-CfGcQniB.js";
2
- import { c as transformEdges } from "./transformations-B5lM6fYX.js";
3
- import { t as unpremultiplyAlpha } from "./alpha-C4ptedXe.js";
4
- import { DataTexture, FloatType, LinearFilter, RGFormat } from "three";
5
- import { convertToTexture, float, screenUV, texture, vec2, vec4 } from "three/tsl";
6
- var GRID_SIZE = 128;
7
- const componentDefinition = {
8
- name: "CursorRipples",
9
- category: "Interactive",
10
- description: "Fluid-like ripple distortion",
11
- requiresRTT: true,
12
- requiresChild: true,
13
- props: {
14
- intensity: {
15
- default: 10,
16
- description: "Strength of the ripple distortion",
17
- ui: {
18
- type: ["range", "map"],
19
- min: 0,
20
- max: 20,
21
- step: .1,
22
- label: "Intensity",
23
- group: "Effect"
24
- }
25
- },
26
- decay: {
27
- default: 10,
28
- description: "How quickly ripples fade (higher = faster)",
29
- ui: {
30
- type: "range",
31
- min: 0,
32
- max: 20,
33
- step: .1,
34
- label: "Decay",
35
- group: "Effect"
36
- }
37
- },
38
- radius: {
39
- default: .5,
40
- description: "Radius of cursor influence",
41
- ui: {
42
- type: "range",
43
- min: .1,
44
- max: 1,
45
- step: .1,
46
- label: "Radius",
47
- group: "Effect"
48
- }
49
- },
50
- chromaticSplit: {
51
- default: 1,
52
- description: "RGB channel separation along ripple edges",
53
- ui: {
54
- type: ["range", "map"],
55
- min: 0,
56
- max: 3,
57
- step: .1,
58
- label: "Chromatic Split",
59
- group: "Effect"
60
- }
61
- },
62
- edges: {
63
- default: "stretch",
64
- description: "How to handle edges when distortion pushes content out of bounds",
65
- transform: transformEdges,
66
- compileTime: true,
67
- ui: {
68
- type: "select",
69
- options: [
70
- {
71
- label: "Stretch",
72
- value: "stretch"
73
- },
74
- {
75
- label: "Transparent",
76
- value: "transparent"
77
- },
78
- {
79
- label: "Mirror",
80
- value: "mirror"
81
- },
82
- {
83
- label: "Wrap",
84
- value: "wrap"
85
- }
86
- ],
87
- label: "Edges",
88
- group: "Effect"
89
- }
90
- }
91
- },
92
- fragmentNode: ({ uniforms, onBeforeRender, childNode, onCleanup, dimensions }) => {
93
- const buffers = [new Float32Array(GRID_SIZE * GRID_SIZE), new Float32Array(GRID_SIZE * GRID_SIZE)];
94
- let currentBuffer = 0;
95
- const displacementData = new Float32Array(GRID_SIZE * GRID_SIZE * 2);
96
- const displacementTexture = new DataTexture(displacementData, GRID_SIZE, GRID_SIZE, RGFormat, FloatType);
97
- displacementTexture.magFilter = LinearFilter;
98
- displacementTexture.minFilter = LinearFilter;
99
- displacementTexture.needsUpdate = true;
100
- const displacementField = texture(displacementTexture);
101
- let prevX = .5;
102
- let prevY = .5;
103
- let lastTime = Date.now();
104
- let prevMaxAbsVal = 1;
105
- onBeforeRender(({ pointer }) => {
106
- const currentTime = Date.now();
107
- const dt = Math.min((currentTime - lastTime) / 1e3, .016);
108
- lastTime = currentTime;
109
- const aspect = dimensions.width / dimensions.height;
110
- const substeps = 1;
111
- const decay = uniforms.decay.uniform.value;
112
- const radius = uniforms.radius.uniform.value * .05;
113
- const rawVelX = dt > 0 ? (pointer.x - prevX) / dt : 0;
114
- const rawVelY = dt > 0 ? (pointer.y - prevY) / dt : 0;
115
- const mouseSpeed = Math.min(Math.sqrt(rawVelX * rawVelX + rawVelY * rawVelY), 2);
116
- prevX = pointer.x;
117
- prevY = pointer.y;
118
- if (mouseSpeed <= .01 && prevMaxAbsVal < 1e-6) return;
119
- const dampFactor = 1 - decay * .004;
120
- let maxAbsVal = 0;
121
- for (let s = 0; s < substeps; s++) {
122
- const curr$1 = buffers[currentBuffer];
123
- const prev = buffers[1 - currentBuffer];
124
- if (s === 0 && mouseSpeed > .01) {
125
- const influenceRadius = radius * 3;
126
- const minJ = Math.max(1, Math.floor((pointer.x - influenceRadius) * GRID_SIZE));
127
- const maxJ = Math.min(GRID_SIZE - 2, Math.ceil((pointer.x + influenceRadius) * GRID_SIZE));
128
- const minI = Math.max(1, Math.floor((pointer.y - influenceRadius) * GRID_SIZE));
129
- const maxI = Math.min(GRID_SIZE - 2, Math.ceil((pointer.y + influenceRadius) * GRID_SIZE));
130
- for (let i = minI; i <= maxI; i++) for (let j = minJ; j <= maxJ; j++) {
131
- const idx = i * GRID_SIZE + j;
132
- const cellX = (j + .5) / GRID_SIZE;
133
- const cellY = (i + .5) / GRID_SIZE;
134
- const ddx = aspect >= 1 ? (cellX - pointer.x) * aspect : cellX - pointer.x;
135
- const ddy = aspect >= 1 ? cellY - pointer.y : (cellY - pointer.y) / aspect;
136
- const dist = Math.sqrt(ddx * ddx + ddy * ddy);
137
- if (dist < influenceRadius) {
138
- const influence = Math.exp(-dist * dist / (radius * radius));
139
- curr$1[idx] -= influence * mouseSpeed * dt * 3;
140
- }
141
- }
142
- }
143
- for (let i = 1; i < GRID_SIZE - 1; i++) for (let j = 1; j < GRID_SIZE - 1; j++) {
144
- const idx = i * GRID_SIZE + j;
145
- const next = ((curr$1[idx - 1] + curr$1[idx + 1] + curr$1[idx - GRID_SIZE] + curr$1[idx + GRID_SIZE]) * .5 - prev[idx]) * dampFactor;
146
- prev[idx] = next;
147
- const absNext = next < 0 ? -next : next;
148
- if (absNext > maxAbsVal) maxAbsVal = absNext;
149
- }
150
- currentBuffer = 1 - currentBuffer;
151
- }
152
- prevMaxAbsVal = maxAbsVal;
153
- const curr = buffers[currentBuffer];
154
- for (let i = 1; i < GRID_SIZE - 1; i++) for (let j = 1; j < GRID_SIZE - 1; j++) {
155
- const idx = i * GRID_SIZE + j;
156
- const dIdx = idx * 2;
157
- displacementData[dIdx] = (curr[idx + 1] - curr[idx - 1]) * .5;
158
- displacementData[dIdx + 1] = (curr[idx + GRID_SIZE] - curr[idx - GRID_SIZE]) * .5;
159
- }
160
- displacementTexture.needsUpdate = true;
161
- });
162
- onCleanup(() => {
163
- displacementTexture.dispose();
164
- });
165
- if (!childNode) return vec4(0, 0, 0, 0);
166
- const childTexture = convertToTexture(childNode);
167
- onCleanup(() => {
168
- if (childTexture?.renderTarget?.dispose) childTexture.renderTarget.dispose();
169
- });
170
- const displacement = displacementField.sample(screenUV).xy;
171
- const intensityScale = uniforms.intensity.uniform.mul(.1);
172
- const scaledDisplacement = displacement.mul(intensityScale);
173
- const maxDisp = float(.15);
174
- const clampedDisplacement = scaledDisplacement.clamp(vec2(maxDisp.negate(), maxDisp.negate()), vec2(maxDisp, maxDisp));
175
- const chromaticScale = uniforms.chromaticSplit.uniform.mul(.1);
176
- const rUV = screenUV.sub(clampedDisplacement.mul(float(1).add(chromaticScale)));
177
- const gUV = screenUV.sub(clampedDisplacement);
178
- const bUV = screenUV.sub(clampedDisplacement.mul(float(1).sub(chromaticScale)));
179
- const rSample = applyEdgeHandling(rUV, childTexture.sample(rUV), childTexture, uniforms.edges.uniform.value);
180
- const gSample = applyEdgeHandling(gUV, childTexture.sample(gUV), childTexture, uniforms.edges.uniform.value);
181
- const bSample = applyEdgeHandling(bUV, childTexture.sample(bUV), childTexture, uniforms.edges.uniform.value);
182
- return unpremultiplyAlpha(vec4(rSample.r, gSample.g, bSample.b, gSample.a));
183
- }
184
- };
185
- var CursorRipples_default = componentDefinition;
186
- export { componentDefinition as n, CursorRipples_default as t };